I can't get APC to work properly with my Zend+Doctrine application. When I turn APC on I get the error:
Fatal error: Access to undeclared static property: Zend_Loader_Autoloader::$_instance in /var/www/libs/Zend/Loader/Autoloader.php on line 92
I've seen lots of people complaining about that but no one seem to have solved their problem, except by this guy: Access to undeclared static property: Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver::
I tried that aproach, upgrading APC from 3.1.3 to 3.1.9. It didn't work for me.
I tried enabling nclude_once_override:
apc.include_once_override = 1
Didn't work either.
I also tried to get APC not to cache Zend_Loader_Autoloader by addint the following line to apc.ini:
apc.filters = Autoloader.php
It solved the primary problem, but caused another one:
Warning: call_user_func() expects parameter 1 to be a valid callback, class 'Zend_Loader' not found in /var/www/libs/Zend/Loader/Autoloader.php on line 472 Warning: call_user_func() expects parameter 1 to be a valid callback, class 'Zend_Loader' not found in /var/www/libs/Zend/Loader/Autoloader.php on line 472 Fatal error: Class 'Doctrine_Event' not found in /var/www/libs/Doctrine/Record.php on line 801
Next thing I did was get APC not to cache Zend_Loader
apc.filters = Autoloader.php,Loader.php
Solves the problem above, but other classes can't be found:
Fatal error: Class 'Zend_Exception' not found in /var/www/libs/Zend/Loader.php on line 99
I got APC not to cache Zend_Exception, but other classes won't be found.
Note that the errors occur only from the 2nd time the page loads on, after the cache is cleared. First page load works like a charm.
Anyone faced a similar problem and was able to solve it?
Thank you very much.
You need session_write_close():
\Zend_Session::setSaveHandler($foo);
register_shutdown_function('session_write_close');
Related
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.
I am receiving following errors when I try to access pages and the site becomes inaccessible(error 500).
PHP Fatal error: Class Drupal\Core\Database\Statement contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Drupal\Core\Database\StatementInterface::fetchObject) in /projects/core/lib/Drupal/Core/Database/Statement.php on line 16
PHP Fatal error: Class Drupal\Core\Session\SessionHandler contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (SessionHandlerInterface::read) in /projects/core/lib/Drupal/Core/Session/SessionHandler.php on line 15
Restarting server will solve the issue for a limited time. Just found it was a memory issue. changed the memory_limit to 128, 256 and 512 but really seems to have happen randomly while browsing my website
Apache/2.4.29, PHP 7.0.26
Hey just need to delete cache or run drupal cron. for more details, please go to following the link.
https://www.drupal.org/project/drupal/issues/2668564
Hope it will useful for you.
When I try to execute any controller of my CodeIgniter project i receive this error:
Fatal error: Class CI_Session_files_driver contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (SessionHandlerInterface::read) in D:\Git\crud-farm\system\libraries\Session\drivers\Session_files_driver.php on line 49
A PHP Error was encountered
Severity: Error
Message: Class CI_Session_files_driver contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (SessionHandlerInterface::read)
Filename: drivers/Session_files_driver.php
Line Number: 49
Backtrace:
I tried to replace CodeIgniter system files but it didn't work. The problem appears in all projects
Problem solved by restarting Apache.
I attach the url which saved me: http://forum.codeigniter.com/thread-64763.html
In my case i did the following
Restart apache
That's it!
The files in system should not be modified. My files were modified somehow and were throwing error. I resolved my problem as below.
Download fresh codeigniter and extract files
copy system files from fresh codeigniter into your project and overwrite the whole system folder.
This should fix your problem.
I'm learing laravel 5. A day, when I run php artisan command I got this error
Catchable fatal error: Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be an instance of Illuminate\Http\Request, null given, called in C:\xampp\htdocs\premiumlens\vendor\laravel\framework\src\Illuminate\Routing\RoutingServiceProvider.php on line 62 and defined in C:\xampp\htdocs\premiumlens\vendor\laravel\framework\src\Illuminate\Routing\UrlGenerator.php on line 102
Almost application functions work perfect. But may not all. I'm sure the error is not caused by UrlGenerator.php
Now I cant use any artisan functions. How can I detect which file cause this issue.
Thank you !
I think you used url() helper in your config file, find where you put url() helper in your config file and remove it. your problem will be solved. i had this same problem and solved by removing url() form config file..
url('bassets/plugins/highcharts/highcharts.css'),
I recently made a site for someone with Smarty, everything worked like it should. When I had to edit something today (~ 2 weeks after initial release) i deleted the smarty cache to update all pages, now the pages are not generated anymore, it only gives the following error:
Catchable fatal error: Argument 1 passed to _smarty_template_buffer::append_subtree() must be an instance of _smarty_parsetree, instance of _smarty_text given, called in /home/public_html/classes/Smarty/sysplugins/smarty_internal_templateparser.php on line 2167 and defined in /home/public_html/classes/Smarty/sysplugins/smarty_internal_parsetree.php on line 268
The weird thing is, after some page refreshes it randomly does generate the page without the error. I can't tell why this behaviour is happening.
The PHP version is 5.4.17
Can anyone help me with this problem?