I've just run an update for my CakePHP version (3.1.7). And now I'm unable to run my app, with a fatal error :
Fatal error: Class 'DateTimeImmutable' not found in /opt/lampp/htdocs/my-app/vendor/cakephp/chronos/src/Chronos.php on line 50
I found this issue on Github, where I noticed that
DateTimeImmutable was not present in 5.4
So I install PHP5.6.20 on my PC, but after restarting Xampp, I still get the same error. How can I fix this ?
PHP's installation on the PC is not related to Xampp. So installing PHP doesn't solve the problem. But installing a new version of Xampp with PHP 5.6.
It's a PHP Version Problem make sure You're using PHP > 5.5v
Related
I'm currently working on an api which has been developed using Lumen 5.4. I'm trying to run this on my local XAMPP for Linux 7.4.3. But I keep getting the following error,
lumen.ERROR:
Symfony\Component\Debug\Exception\FatalThrowableError:
Call to undefined function xxx\Prometheus\Storage\apcu_add() in
/opt/lampp/htdocs/xxx-api/vendor/xxx/php-prometheus-exporter/src/Storage/APCU.php:78
Current PHP version is 7.4.3. I have installed apcu along with apcu_bc and added the following to php.ini as well,
extension=apc.so
apc.enabled="1"
but I'm not seeing any apc related info in phpinfo.php page.
Any help is appreciated.
I am getting Interface 'JsonSerializable' not found error in my site.
I am using Laravel 5.4 and PHP 7.1.13.
JSON module is also enabled in Cpanel.
But still i am getting following error:
PHP Fatal error: Interface 'JsonSerializable' not found in
/******/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php on line 22
PHP Fatal error: Interface 'JsonSerializable' not found in
/******/vendor/laravel/framework/src/Illuminate/Support/Collection.php
on line 17
Thanks in advance!
Check your Php info Settings, Json is Enabled.
PHP Fatal error: Interface 'JsonSerializable' not found - My Php Version is 7.0.17
I have faced the same problem in my Cpanel. When I upgrade the PHP version of my Cpanel MultiPHP Manager, it works fine.
Upgrade PHP version 7.4 to 8.0.
I got the same error on cpanel, I solved it by changing the php version from 7.3 to 7.4 under MultiPHP Manager.
~regards
I'm getting this error when trying to install orocrm :
Fatal error: Cannot use 'True' as class name as it is reserved in
C:\xampp\htdocs\crm-application\vendor\oro\platform\src\Oro\Component\ConfigExpression\Condition\True.php
on line 10
Any idea what might be the cause of this?
You are using PHP7. For now OroCrm doesn't support PHP7.
You need to downgrade PHP to 5.6 version.
I have PHP 5.4 on a litespeed web server. PHP has been compiled properly with memcached module and we also installed properly memcached library.
In fact the problem suddenly happened without any change at all (server side) when I run the artisan command, I am getting this error:
PHP Fatal error: Class 'Memcached' not found in /laravel/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php on line 52
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Memcached' not found
I googled the issue but was unable to find a solution. I am using Laravel 5.0.
I edited the app/Http/Routes.php and returned new Memcached at the top of the file and the php object was returned so it means memcached is properly installed on the server...
Any help would be appreciated.
Found the solution. My problem was when I was running the artisan command, the artisan was using another version of PHP (different than the Litespeed one) and this PHP was not compiled with memcached.
I am using XAMPP 1.7.0. I have followed these instructions to install memcached and it works fine for Windows 7 but when I have it installed in Windows Server it shows
Fatal error: Class 'Memcache' not found
I have tried many times to do this but am failing.
This question has been solved here: Class 'Memcache' not found & PHP
Your problem is probably that the dll file you used is not working with your PHP version;
This is your solution (I quote from my own answer)
I found the working dll files for PHP 5.4.4
I don't knowhow stable they are but they work for sure. Credits goes
to this link.
http://x32.elijst.nl/php_memcache-5.4-nts-vc9-x86.zip
http://x32.elijst.nl/php_memcache-5.4-vc9-x86.zip
It is the 2.2.5.0 version, I noticed after compiling it (for PHP
5.4.4).
Please note that it is not 2.2.6 but works. I also mirrored them in my
own FTP. Mirror links:
http://mustafabugra.com/resim/php_memcache-5.4-vc9-x86.zip
http://mustafabugra.com/resim/php_memcache-5.4-nts-vc9-x86.zip