This question already has answers here:
Symfony 2 - Fatal error: Cannot redeclare class SessionHandlerInterface in C:\...\app\cache\dev\classes.php on line 532
(7 answers)
Closed 6 years ago.
I have a working symfony project on my linux computer.
I'm trying to set it up with hosting www.one.com
I wrote a .htaccess file but I'm getting the following error:
Fatal error: Cannot declare interface Symfony\Component\DependencyInjection\ContainerAwareInterface, because the name is already in use in /customers/x/x/x/xxxxxxxxxx.be/httpd.www/var/cache/dev/classes.php on line 6397
Can anyone help me in the write direction?
ps:
I followed the guide http://trac.symfony-project.org/wiki/InstallingSymfonyOnOne but it does not seems to be working.
A guide which you are following is about Symfony 1.x, interface you mention is from Symfony 2 so you have a mismatch here. Try to follow this guide (and remember that Symfony 1.x and 2.x/3.x has nothing in common).
And just a guess: try to clear the cache on your new machine:
app/console cache:clear --env=prod
Related
I know that it already has answer in PHP Fatal error: Class 'WP_UnitTestCase' not found when trying to run test-sample But it doesn't fixed my issue. I am trying to initialize php unit testing with my wordpress plugin using phpunit. I found this tutorial and it was easy to follow. Here's the link
https://www.smashingmagazine.com/2017/12/automated-testing-wordpress-plugins-phpunit/
Everything was working great until the below step.
When I came to this Step in tutorial where the command I tried to run
phpunit tests/test-sample.php
and I get:
PHP Fatal error: Class 'WP_UnitTestCase' not found in PHP Fatal error: Class 'WP_UnitTestCase' not found in /var/www/html/testwordpress/wp-content/plugins/wp-ultimate-csv-importer/tests/test-sample.php on line 11
I don't Know how to solve this issue. I found the same question in Stackoverflow. Here's the Link:
PHP Fatal error: Class 'WP_UnitTestCase' not found when trying to run test-sample
But it was in windows. Somehow he managed to fix it. I checked his solution and it says that issue in MySQL.
But in my case, MySQL works fine and I am in linux with the flavor of Ubuntu. Help me with some solutions to fix this problem in Linux
This question already has answers here:
How to install MySQLi on MacOS
(16 answers)
Closed 5 years ago.
I am runing codeingiter on local host and was working fine but after completing my project i moved files on my server now the problem is that I am keep getting an unusual error with codeigniter which I had never been got before I searched on google a lot but the problem is that I am not getting an accurate answer related to my issue
Fatal error: Call to undefined function mysqli_init() in /home/begazed/public_html/demo/begazed/system/database/drivers/mysqli/mysqli_driver.php on line 125
A PHP Error was encountered
Severity: Error
Message: Call to undefined function mysqli_init()
Filename: mysqli/mysqli_driver.php
Line Number: 125
Backtrace:
Can anyone help me out to resolve this issue
Your server does not have php-mysql package installed. You will have to install it and reload the server. Package might be different on the basis of your PHP version. I hope this helped.
I have tried to run/debug multiple projects on PhpStorm (two of them are imported, one is created on phpstorm) Each of them gives me (different) PHP Fatal errors when I run or debug.
This is the first error.
PHP Fatal error: Class 'Doctrine\Tests\Common\Cache\CacheTest' not found in C:\wamp64\www\bodisatva\vendor\doctrine\cache\tests\Doctrine\Tests\Common\Cache\ApcCacheTest.php on line 10
Problem is that CacheTest exists.
The second project:
PHP Fatal error: Class 'Doctrine\Tests\DoctrineTestCase' not found in C:\wamp64\www\larasocial\vendor\doctrine\inflector\tests\Doctrine\Tests\Common\Inflector\InflectorTest.php on line 8
Again, it exists.
Project that I completely set up on PhpStorm for testing.
PHP Fatal error: Class 'Tests\Behat\Gherkin\Keywords\KeywordsTest' not found in C:\wamp64\www\larazine\vendor\behat\gherkin\tests\Behat\Gherkin\Keywords\ArrayKeywordsTest.php on line 8
Different and same.
Am I missing something? I tried to google these errors only to find specific (but probably outdated as I had even more errors trying them) solutions.
How did you configure PHPUnit in File | Settings | Languages & Frameworks | PHP | PHPUnit? Is it PHPunit 5 or 6? You might want to attach a screenshot of your config here.
Are there any inspection errors in C:\wamp64\www\larasocial\vendor\doctrine\inflector\tests\Doctrine\Tests\Common\Inflector\InflectorTest.php on line 8, e.g. DoctrineTestCase or TestCase are highlighted?
This question already has answers here:
"Call to undefined function sqlsrv_connect()" when trying to connect to Azure DB from PHP
(2 answers)
Closed 6 years ago.
How can I get sqlsrv in Registered PHP Streams of my php installation?
I am getting the following error:
Fatal error: Call to undefined function sqlsrv_error() in C:\inetpub\wwwroot\twickenham2013\class\sqlsrv.class.php on line 14
How can I fix this?
Im facing the same issue.
Thats because the Registered PHP streams(phpinfo()) does not contain sqlsrv field.
this can be checked using the code
<?php
phpinfo();
?>
add the necessary .dll files in you xampp/php/ext. and edit the php.ini document.
To download the necessary .dll files and for more detailed installation instructions, see the PHP docs: http://php.net/manual/en/sqlsrv.installation.php
This question already has an answer here:
PHPUnit error while creating unit test cases
(1 answer)
Closed 9 years ago.
am trying to write my first test in PHPUnit in Netbeans. I tried to follow the example on the Netbeans website http://netbeans.org/kb/docs/php/phpunit.html but I keep getting the error below. I dont have a clue what is happening as I did everything just the way I was instructed on the website.
> PHP Fatal error: Class 'Calculator' not found in C:\wamp\www\Calculator\tests\CalculatorTest.php on line 18
PHP Stack trace:
PHP 1. {main}() C:\wamp\bin\php\php5.3.8\phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() C:\wamp\bin\php\php5.3.8\phpunit:46
PHP 3. PHPUnit_TextUI_Command->run() C:\wamp\bin\php\php5.3.8\pear\PHPUnit\TextUI\Command.php:130
PHP 4. PHPUnit_TextUI_TestRunner->doRun() C:\wamp\bin\php\php5.3.8\pear\PHPUnit\TextUI\Command.php:192
PHP 5. PHPUnit_Framework_TestSuite->run() C:\wamp\bin\php\php5.3.8\pear\PHPUnit\TextUI\TestRunner.php:325
PHPUnit 3.6.12 by Sebastian Bergmann.
PHP 6. PHPUnit_Framework_TestSuite->run() C:\wamp\bin\php\php5.3.8\pear\PHPUnit\Framework\TestSuite.php:705
PHP 7. PHPUnit_Framework_TestSuite->runTest() C:\wamp\bin\php\php5.3.8\pear\PHPUnit\Framework\TestSuite.php:745
PHP 8. PHPUnit_Framework_TestCase->run() C:\wamp\bin\php\php5.3.8\pear\PHPUnit\Framework\TestSuite.php:772
PHP 9. PHPUnit_Framework_TestResult->run() C:\wamp\bin\php\php5.3.8\pear\PHPUnit\Framework\TestCase.php:751
PHP 10. PHPUnit_Framework_TestCase->runBare() C:\wamp\bin\php\php5.3.8\pear\PHPUnit\Framework\TestResult.php:649
PHP 11. CalculatorTest->setUp() C:\wamp\bin\php\php5.3.8\pear\PHPUnit\Framework\TestCase.php:801
Any help would be appreciated to help me understand what am doing wrong please.
Screen shot
You should make sure that the file containing the class Calculator can be found by the unittest.
require_once dirname(__FILE__) . '/../Calculator.php';
The test class is placed in a subdirectory, so you need to declare the path relative to the file, containing the unittest. Maybe your application uses autoloading, but your unittest doesn't know about it.
If you use Netbeans to create the unittest, the path should already be correct.
PHP Fatal error: Class 'Calculator' not found
If you did the same as in the webpage, why can Calculator be loaded in the web?
Try including the files he is complaining about.