WP-Admin causes error log on certain functions when using PHP 7.3
-
WP-Admin causes error log on certain functions when using PHP 7.3 I get an error log when trying php 7.3 in cpanel
-
Hi @djusstattoo, could you please share with me the error message and the URL of the page where you are seeing the error?
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/punkmmur/public_html/wp-includes/wp-db.php:1564 Stack trace: #0 /home/punkmmur/public_html/wp-includes/wp-db.php(592): wpdb->db_connect() #1 /home/punkmmur/public_html/wp-includes/load.php(409): wpdb->__construct(‘punkmmur_calyps…’, ‘7S4T]52!pg’, ‘punkmmur_calyps…’, ‘localhost’) #2 /home/punkmmur/public_html/wp-settings.php(106): require_wp_db() #3 /home/punkmmur/public_html/wp-config.php(93): require_once(‘/home/punkmmur/…’) #4 /home/punkmmur/public_html/wp-load.php(37): require_once(‘/home/punkmmur/…’) #5 /home/punkmmur/public_html/wp-admin/admin.php(31): require_once(‘/home/punkmmur/…’) #6 /home/punkmmur/public_html/wp-admin/index.php(10): require_once(‘/home/punkmmur/…’) #7 {main} thrown in /home/punkmmur/public_html/wp-includes/wp-db.php on line 1564
It was page editor and extensions that wouls give an error message. But on php 7.3 there are more bugs:
https://tatouagecalypso.com/wp-admin/index.phpThe website works its just wp-admin that bugs on 7.3.
Hi @noisysocks here is the info you wanted. Just a bit higher in text.
What version of WordPress are you running? Please upgrade to WordPress 5.0 which supports PHP 7.3. Please also make sure that your environment has either MySQL 5.6+ or MariaDB 10+ installed. You can contact your web host to have this arranged.
@noisysocks I get the error log on php 7.3 on all of wp-admin. Website works. On php 7.2 i get access to wp-admin but i can’t go to the pages page. It has an error log about mysql connect…php 5.6 ??? It used to work fine with php 7.1 could it be super cache or another plugin?
I was updated to wordpress 5.0.2
-
This reply was modified 6 years, 4 months ago by
djusstattoo.
-
This reply was modified 6 years, 4 months ago by
djusstattoo.
This may be a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.
If you can install plugins, install “Health Check”: https://wordpress.org/plugins/health-check/ On the troubleshooting tab, you can click the button to disable all plugins and change the theme for you, while you’re still logged in, without affecting normal visitors to your site.
29
You can use mysqli_connect($mysql_hostname , $mysql_username) instead of mysql_connect($mysql_hostname , $mysql_username).
mysql_* functions were removed as of PHP 7. You now have two alternatives: MySQLi and PDO.
should i do this?
@noisysocks Isn’t wp-includes a wordpress directory? That wp-db.php is out of date. But its in wp-includes.
public_html/wp-includes/wp-db.php:1564
load.php
wp-db.php
wp-settings.php
admin.php and others
are all in the wordpress 5.0 folders. They are using mysql-connect which is depreciated. I don’t see how desactivating plugins would help with wordpress core files…
all the errors listed come from wordpress .php files. And it’s exactly whats not working is wp-admin…the site works well no error log or plugin or theme conflict. It’s blocking wordpress back end editor with the mysql connect function.
Again website is fine just wp-admin is innacessable. with php 7.2 /wp-admin/ is accessible juste the pages and extensions pages that block the error log higher. With php 7.3 all of wp-admin is blocked and error logged.@noisysocks
No php works desactivated all plugins and running twentyseventeen freshly restored, tried setting cachesetting to false in wp-config.php the WP_USE_EXT_MYSQL function is not defined. i renamed .htacces i renamed themes folders i renamed plugins folder to desactivate all i went to phpmyadmin in options table set to twentyseventeen theme and a:0:{} plugins nto desactivate all plugins. went back and forth in php versions and its really stuck in error mode. */wp-admin doesn’t work but website works but is displaying different themes on different pages.@noisysocks
The problem was MySQLI php modules where not activated.
We had to activate: nd_mysqlsPlus caching was being a part of the problem even if plugin was desactivated. It would still load error message page as cached. Thats why reverting back to previous php versions would not work it would always serve the error message from cache.
Even if /wp=admin didn’t work, the website was still ok and running probably caching was saving it.
We had to access https://tatouagecalypso.com/wp-admin with url parameters to bypass caching bu adding https://tatouagecalypso.com/wp-admin/?d=asdd or just /?.
So php modules have to be activated website now runs pnp 7.3 with nd_mysqls activated in php options in Cpanel.
-
This reply was modified 6 years, 4 months ago by
- The topic ‘WP-Admin causes error log on certain functions when using PHP 7.3’ is closed to new replies.