After I run composer update on AWS PHP SDK I started to get this error:
Fatal error: Interface 'Guzzle\Common\HasDispatcherInterface' not found in <path>
There is HasDispatcherInterface.php file in <path>, but I still get the error. Is this a bug? If it is, is there any workaround?
So it turned out this is about a 12 year old bug of PHP. https://bugs.php.net/bug.php?id=18556
When you use setlocale('tr_TR'), PHP can not find any class or method has an 'I' letter in its name. Even if its a standart library. Great.
Related
I am trying to initialize php unit testing with my wordpress plugin using phpunit. I am running xampp on windows. My xampp installation is also on my E: drive if that makes any difference. I am following along with this tutorial:
https://www.smashingmagazine.com/2017/12/automated-testing-wordpress-plugins-phpunit/
I have gotten to the part where I run
install-wp-tests.sh wordpress_test root '' localhost latest
I run that and it pops up and closes quickly, so I don't know if it is really working or not. I then try to run
phpunit tests/test-sample.php
and I get:
PHP Fatal error: Class 'WP_UnitTestCase' not found in E:\xampp\htdocs\wp-content\plugins\SRBC\tests\test-sample.php on line 11
Fatal error: Class 'WP_UnitTestCase' not found in E:\xampp\htdocs\wp-content\plugins\SRBC\tests\test-sample.php on line 11
I assume that means the install-wp-test.sh isn't installing correctly and it is missing those classes. Any ideas?
Ended up needing to install SVN for windows. Also had to add the mysqladmin.exe path to the PATH environment variable. Then finally needed this :
https://wordpress.stackexchange.com/questions/249402/error-when-setting-up-phpunit-tests-with-wp-cli-scaffold
And after all that and 3 hours! I got it to work correctly!
Hope this helps someone else.
hi this my error when i want implement RSA algorithm in PHP how to fix this problem everything seems okay and i not changing anything
Fatal error: Class 'phpseclib\Math\BigInteger' not found in
phpseclib/Crypt/RSA.php on line 509 this is line 509 in __construct
method of RSA class $this->zero = new BigInteger(0);
how to fix this problem
My guess: you're trying to use either the 2.0 version (or the master branch in github) of phpseclib and aren't using an autoloader (eg. Composer), as is required by those versions.
If you don't want to use an autoloader then you'll need to use the 1.0 branch.
use below code as header
Phpseclib\Math\BigInteger
istead of
phpseclib\Math\BigInteger
name start with Capital later in update versions. It resolved my issue
I'm using the Barryvdh/laravel-dompdf which is a laravel 5 wrapper for the domPDF library (Link to GIT). But after I ran a composer update on my project, I get a error message when I try to convert a html file to a pdf file. The error is as follow FatalErrorException in class.pdf.php line 1876: Call to undefined method Cpdf::o_rapport(). I couldn't find a solution for the specific problem so I tried to downgrade the version of the Barryvdh/laravel-dompdfand run composer again, but that didn't help. So after that I looked at the stacktrace and tried finding the piece of code that fires the FatalError, but nowhere in the code the method o_rapport() is being called, even if I use the search function of my IDE to search my complete project for this method, no reference are found so that is a dead end aswell.
Now I want to ask if someone did encounter the same problem as me and how to fix this.
I want to run Guzzle on Xampp server, but when I try to run it, I get message:
Fatal error: Class 'Guzzle\Http\Exception\BadResponseException' not found in D:\2 Workspace\5 Aptana\OpenTok\Guzzle\Http\Exception\ClientErrorResponseException.php on line 8
I need it as a part of PHP API for OpenTok project. I can't use composer, so I downloaded it manually, but it doesn't work. I think it can be something with namespace and use.
What should I do to get this working?
I just pulled in the latest version of Codeception using Composer and ran vendor/bin/codecept bootstrap and received the error when it tried to the Build Inital Guy Classes:
PHP InvalidArgumentException: Given expression is not a regex. In:
vendor/symfony/finder/Symfony/Component/Finder/Expression/Regex.php on line 77
It actually does seem to complete, but whenever I run vendor/bin/codecept run I also get this same error.
For reference i'm using:
Laravel Latest
Composter Latest
PHP 5.4.25
Thanks for the assistance.
As a workaround, you can disable xdebug for php5-cli.