I have recently started encountering issues when trying to access my hosted phpMyAdmin. I am getting a 500 inernal server error when trying to access it and as expected getting nothing but a blank page in my browser.
I have had a look at the error log for phpMyAdmin and noticed the following error is being raised:
PHP Fatal error: Call to undefined function PMA_sanitize() in /usr/share/phpMyAdmin/libraries/Message.class.php on line 541
Firstly, I reinstalled phpMyAdmin and after this, was able to access it fine for a while before I began experiencing the same issue again.
I had a look around the web and came across the following blog here with a potential fix for this problem. I did what the blog suggested and added the following:
require_once('./libraries/sanitizing.lib.php');
at the top of the following file:
/usr/share/phpMyAdmin/libraries/Message.class.php
this worked for a while but then got another 500 internal server error. So again I checked the error log and got the following error message:
PHP Fatal error: Cannot redeclare PMA_checkLink() (previously declared in /usr/share/phpMyAdmin/libraries/sanitizing.lib.php:15) in /usr/share/phpMyAdmin/libraries/sanitizing.lib.php on line 35
As well as these fatal errors I am getting the following warning messages but not sure if these have anything to do with the issue:
PHP Warning: Unknown: Unable to allocate memory for pool. in Unknown on line 0
PHP Warning: require_once(): Unable to allocate memory for pool. in /usr/share/phpMyAdmin/index.php on line 13
PHP Warning: require(): Unable to allocate memory for pool. in /usr/share/phpMyAdmin/libraries/common.inc.php on line 52
PHP Warning: require_once(): Unable to allocate memory for pool. in /usr/share/phpMyAdmin/libraries/Error_Handler.class.php on line 12
PHP Warning: require_once(): Unable to allocate memory for pool. in /usr/share/phpMyAdmin/libraries/Error.class.php on line 12
I am running a dedicated Centos 6 server with PHP version 5.3.3, Apache version 2.2.15, mysql version 5.1.61 & phpMyAdmin version 3.5.7
If anyone can shed some light on this, that would be excellent!
require_once(): Unable to allocate memory for pool. means there was not enough memory to include some of the declaration files from PhpMyAdmin.
These files having not been included, the definitions they contain were not loaded. Hence your first errors Call to undefined function PMA_sanitize().
The blog post you linked to advises adding an inclusion at a dubious location, leading you to include some definition files where it shouldn't. Hence your second error Cannot redeclare PMA_checkLink().
If I were you I would rollback all changes in the PhpMyAdmin code and try to address the first problem. This question will probably provide you with the right procedure.
Related
I am working on a Joomla site, and just recently updated PHP to 7.2, but my site started throwing errors. I have also updated Joomla to the latest version, but errors still appear. I'm not good in PHP and don't know how to fix it.
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Color has a deprecated constructor in /public_html/templates/jf_social/features/color.php on line 11
Warning: require_once(/public_html/libraries/joomla/document/html/renderer/head.php): failed to open stream: No such file or directory in /public_html/templates/jf_social/error.php on line 52
Fatal error: require_once(): Failed opening required '/public_html/libraries/joomla/document/html/renderer/head.php' (include_path='.:/php:/opt/cpanel/ea-php73/root/usr/share/pear') in /public_html/templates/jf_social/error.php on line 52
I think error comes from my Joomla template, I am using this one https://www.joomforest.com/joomla/templates/jf-social
I can't receive support from that template developers, because my subscription is expired, and changing the template will take a lot of time for me,
can you please anyone advise how to fix it?
Thank you very much!
Try to delete the line 52
require_once(/public_html/libraries/joomla/document/html/renderer/head.php)
from the File
/public_html/templates/jf_social/error.php
The renderer/head.php doesnt be supported any more in your joomla version. If there are no more errors, everything is fine, if not your template is not supported any more.
Then go to the file
/public_html/templates/jf_social/features/color.php
and edit the line
function Color($hex){
to
function __construct($hex){
I have an IIS 7 server setup with numerous domains. I'm testing PHP 7 on one of the domains. It works perfectly and the speed of this version is amazing. However, it tends to crash usually after half an hour or after a couple of hours showing the following browser error:
URL is currently unable to handle this request.
HTTP ERROR 500
I have enabled PHP errors logging and manage to pinpoint the error:
PHP Fatal error: require_once(): Failed opening required '/wp-
admin/includes/class-wp-site-icon.php' (include_path='.;C:\php\pear') in
\wp-admin\includes\admin.php on line 74
No idea what I can do here as it is a file within Wordpress.
I moved wordpress from one server to other...home page is running fine but when I click to category pages/links it shows these errors
Warning: require(./wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /home/server/public_html/index.php on line 17
Warning: require(./wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /home/server/public_html/index.php on line 17
Fatal error: require() [function.require]: Failed opening required './wp-blog-header.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/server/public_html/index.php on line 17
I searched on google and tried accordingly but not solved. I tried wp-codex tech like http://codex.wordpress.org/Changing_The_Site_URL but also failed. I have the wp-blog-header file in my directory but still not working....any help ...thanx in advance
Change php version for 7. My tech.support make this and problem was done
I had a similar issue and the problem was with the PHP version used which in my case by default was PHP 5.2 and it was throwing the 500 status code error.
When upgrading the PHP version to 5.3 the 500 status code was gone but Wordpress returned this error:
Your server is running PHP version 5.3.29 but WordPress 5.4.2 requires at least 5.6.20.
Note to myself (and everyone else with this error): When moving Wordpress websites between different servers make sure you are running the minimum required PHP version.
Also remember:
Note: If you are in a legacy environment where you only have older PHP or MySQL versions, WordPress also works with PHP 5.6.20+ and MySQL 5.0+, but these versions have reached official End Of Life and as such may expose your site to security vulnerabilities.
According to WP docs the recommended PHP is version 7.3.
Try the default theme and see if you still have the error. If so the theme you are using is causing the error - as in my case. The page that had an error was calling a file in "pages" that was not there. When I changed what is to show on that page to something current - the error went
I have mysql_connect running with no problem on my site...
I have a script that i'm running from a CRON job, and here it decides to not work, and output these two errors:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/ssh2.so' - /usr/lib64/php/modules/ssh2.so: cannot open shared object file: No such file or directory in Unknown on line 0
Fatal error: Call to undefined function mysql_connect() in /home/mysite/public_html/phpMySQLAutoBackup/files/schema_for_export.php on line 22
Yes, I'm using phpMySQLAutoBackup
Any ideas? This befuddles me...
The time I got one of these (Unable to load dynamic library ...) I was missing a module. In your case my guess would be that you're missing "libssh2"
Similar to PHP Errors on a cronjob, works fine at prompt
Check your $PATH, permissions, & any environment variables...
I keep getting these error messages in my error log:
PHP Fatal error: Uncaught exception 'Doctrine_Connection_Exception' with message 'PDO Connection Error: SQLSTATE[00000] [1135] Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
PHP Fatal error: Class 'Doctrine_Connection_Exception' not found in /var/www/vhosts/domain.com/httpdocs/application/plugins/doctrine/lib/Doctrine/Connection.php on line 474
PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/var/www/vhosts/domain.com/httpdocs/system/codeigniter/CodeIgniter.php' (include_path='.:') in /var/www/vhosts/domain.com/httpdocs/index.php on line 140
PHP Warning: require_once(/var/www/vhosts/domain.com/httpdocs/system/codeigniter/CodeIgniter.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: Too many open files in system in /var/www/vhosts/domain.com/httpdocs/index.php on line 140, referer: ''
I do not know if these issues are related to each other or not. Just thought I'd mention it.
Everytime one of this error occurs, the corresponding page on my site does not load. Please help me decode the issue.
Some more information - The site is hosted on Media temple's DV plan.
Thanks in advance,
Kamalesh
For the first error: Your SQL server is out of memory. This isn't fixable by PHP, you need to (let someone) configure your SQL server so it has more available memory -OR- profile and optimize your queries (if possible).
The second error: Some PHP file can't find the file that contains the Doctrine_Connection_Exception, from the first error I can see that it does exists and sometimes can be found, I'm guessing it's a problem with your include path,
Thanks for your suggestions. I think I have figured out the problem.
We switched on 'keep_alive' in httpd.conf recently. The errors have stopped propping up on switching it off.