cakephp error Uncaught exception 'LogicException' - php

I'm new to cakePHP and I've been having real difficulty getting it working on my free aws account. I first tried setting up LAMP on my own, but gave up and am now trying to use the bitnami LAMP stack:
https://aws.amazon.com/amis/bitnami-lapp-stack-5-4-13-1-64-bit-ubuntu-12-04
Anyways, that seemed to work, and I was following the cakePHP Blogs tutorial:
http://book.cakephp.org/2.0/en/getting-started.html
I got the mySQL database and tables all set up, and just to test I went to the cakePHP dir:
http://[my amazon instance].compute-1.amazonaws.com/cakephp/
Page loads up with no problems.
But if I reload that page, I get an error:
PHP Fatal error: Uncaught exception 'LogicException' with message 'Passed array does not specify an existing static method (class 'App' does not have a method 'load')' in /opt/bitnami/frameworks/cakephp/lib/Cake/bootstrap.php:133\nStack trace:\n#0 /opt/bitnami/frameworks/cakephp/lib/Cake/bootstrap.php(133): spl_autoload_register(Array)\n#1 /opt/bitnami/frameworks/cakephp/app/webroot/index.php(77): include('/opt/bitnami/fr...')\n#2 {main}\n thrown in /opt/bitnami/frameworks/cakephp/lib/Cake/bootstrap.php on line 133
At that point, nothing to do but restart apache. Once again the page shows up one time, then reload and it errors as above.
Halp!

Related

Symfony Uncaught PHP Exception ErrorException at session_start()

I've been getting this error: REQUES Uncaught PHP Exception ErrorException: "Warning: Erroneous data format for unserializing 'Ramsey\Uuid\Lazy\LazyUuidFromString'" at C:\Users\Alex\Desktop\ALM\ALM-proto\vendor\symfony\http-foundation\Session\Storage\NativeSessionStorage.php line 153 whenever I run my symfony server. It prevents my localhost:8000 page from loading. I've opened the file from the error message and found out that this block of code is the culprit. By commenting it out, I no longer see the error, and the page loads. However, because I don't have access to the session, it causes other problems. So I need this block of code of code to work. How can I fix this?
if (!session_start()) {
throw new \RuntimeException('Failed to start the session');
}
Here are my Symfony project specs:
Symfony 4.3.11
PHP 7.4.16
Composer 2.0.11
OS: Windows 10

How to Bulk Delete in PHP-OpenCloud/OpenStack

I've got a problem iam currently building a php backend with connect to an OVH object storage
and I would like to make a bulk delete using the php-opencloud sdk
According to the documentation there is a function named batchDelete() or bulkDelete() which does exactly what i am searching for but when I call it, php throw an error saying the called method does not exist (I have seen in the GitHub that batchDelete is deprecated and we should use instead bulkDelete but none of them work)
$openstack
->objectStoreV1()
->batchDelete($list);
Fatal error: Uncaught RuntimeException: OpenStack\ObjectStore\v1\Service::batchDelete is not defined
OR
$openstack
->objectStoreV1()
->bulkDelete($list);
Fatal error: Uncaught RuntimeException: OpenStack\ObjectStore\v1\Service::bulkDelete is not defined
Could someone help me please ?

PHP Fatal Error with Userfrosting now server always shows Error 500

I was managing my server and after a composer update I receive this message:
PHP Fatal error: Uncaught TypeError: Argument 1 passed to UserFrosting\System\Facade::setFacadeContainer() must be an instance of Interop\Container\ContainerInterface, instance of Slim\Container given, called in /home/arteller/www/userfrosting/app/system/UserFrosting.php on line 53 and defined in /home/arteller/www/userfrosting/app/system/Facade.php:210
After this, I receive only 500 Internal Error from my server.
The error persists every time I also try to use the command "php bakery bake" or something related to bakery.
Anyone can help?
You need to update to UserFrosting 4.3.3 or later, and run composer update again. This issue was introduced by Slim, which introduced a breaking change recently.

Symfony 3: Unable to find template

I've created an entity with generate:doctrine:entity and its controller too with generate:doctrine:crud.
All works well on local, but on the server I receive this error:
request.CRITICAL: Uncaught PHP Exception InvalidArgumentException:
"Unable to find template "entity/index.html.twig"
And the error is right, as there is no template for the entity and its actions.
But my question is: why on local Symfony "guesses" the template and anyway arranges a page while on remote it doesn't?
This error should appear also on local, why it isn't?

Drupal failed after update

I just updated Drupal core from 7.4 to 7.26. After running update.php site stopped working – both public and admin part. When I load it fatal error occurs:
Fatal error: Call to undefined function _system_default_theme_features() in /[drupal_path]/includes/theme.inc on line 1422
and when I reload it another fatal error apperars:
Fatal error: Call to a member function getDirectoryPath() on a non-object in /[drupal_path]/modules/image/image.module on line 83
next reload – first error, one more – second. Also, second error is loading much faster.
And one more thing, after applaying update.php I got one failed, I don't know if this is connected:
media_gallery module
Update #7009
Failed: FieldException: Próba aktualizacji egzemplarza nieistniejącego pola media_gallery_media. w field_update_instance() (linia 557 z /[drupal_path]/modules/field/field.crud.inc).
which is something like:
Failed: FieldException: Attempt to update an instance of a nonexistent field media_gallery_media. in field_update_instance() (line 557 in /[drupal_path]/modules/field/field.crud.inc).
PHP Version 5.5.6
Any tips where the problem is? I was trying disabling some modules from db, but this did't help.
It's difficult to explain the reason and to provide a solution.
My attempt would be to copy the DB and the files on a neutral platform (local machine or so) and experiment with the update.php script.
My suspicion would be that media module needs also update since it's using the old URI function definition (call). Also try to update other modules that are working with files.
The update is quite big since 7.4 to 7.22 (years of improvement). Reading the change log would be helpful but not realistic.
Did you also cleared the cache? (via drush if the web interface not working - /?q=admin/config/development/performance)
Please don't forget to post the solution if you find one for other users with the same issue.

Categories