Support » Fixing WordPress » PHP 7.3 errors

  • Hello

    I tried to update to PHP 7.3 but when I want to login I get this error.

    Warning: Use of undefined constant WP_CONTENT_DIR – assumed ‘WP_CONTENT_DIR’ (this will throw an Error in a future version of PHP) in /home/f3157076/public_html/wp/wp-includes/load.php on line 141
    Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

    Can someone help

    Thanks

    The page I need help with: [log in to see the link]

Viewing 15 replies - 16 through 30 (of 52 total)
  • Thank you, @lujeffcoat
    Obrigado, @marcoshiga

    Just so you know i was able to fix this issue by removing the .htaccess file in the root folder. Under the home directory. This does not appear to effect anything else with the site.

    Thank you @informago

    The conflicting .htaccess files was the issue for me so renaming the root file solved the problem.

    darleenwitmer

    (@darleenwitmer)

    HI
    I was able to fix most errors regarding content and MySQL
    Warning: Use of undefined constant WP_CONTENT_DIR – assumed ‘WP_CONTENT_DIR’ (this will throw an Error in a future version of PHP) in /home/f3157076/public_html/wp/wp-includes/load.php on line 141
    Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
    I was still. left with the
    Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

    In public HTML folder had to rename php.ini file – so that PHP 7.3 could install correctly
    On hostgator

    qfactoralpha

    (@qfactoralpha)

    I solved this issue by going into my .htaccess file and removing the bit that said:

    # Use PHP71 as default
    AddHandler application/x-httpd-php71 .php
    <IfModule mod_suphp.c>
    suPHP_ConfigPath /opt/php71/lib
    </IfModule>

    There was also a block under it, which I think is host-dependent (hostgator in my case), which I also removed. This fixed the issue. Deleting .htaccess and letting it auto-generate also helped.

    zephyrss

    (@zephyrss)

    Had the same problem. @informago’s solution was a fantastic fix. My .htaccess file still exists under a different name for the time being. Hopefully an official patch will show up soon.

    Many thanks, @informago!

    mohamedamineg

    (@mohamedamineg)

    @informago
    Thanks

    ydacad

    (@ydacad)

    Thank you very much @informago

    Your solution worked perfectly well. My sites like yours are on Hostgator.
    Just renaming the htaccess file solved the problem.

    It is contributors like you who save so many people so much grief..

    With loads of sincere thanks !

    @informago Yes. It was worked for me. Great sharing.

    • This reply was modified 2 months, 3 weeks ago by makader.

    @informago THANK YOU – you have saved my sanity. Do you have a “buy me a coffee” or “ko-fi” link? Or a favourite charity I can make a small donation to?

    Thank you so much, @creativecatapps ! I did by a free will to help other people who have faced the same trouble as I did, your thanks is enough to me. But if you really feel the need to show your gratitude this way, I offer you two good options:

    https://www.buymeacoffee.com/informago (as you suggested)
    https://paypal.me/informago

    Have a great day!

    I don’t like ‘me too!’ posts BUT – ME TOO!
    @informago – I gained a better understanding of what could be happening.
    It was the reply by @supermike72 that made the difference for me.

    This is issue has stopped me from updating for a long time and this is the first time that I looked into the .htaccess in the HOME directory. I always checked the public_html and thought that was the only one.

    home/.htaccess renamed
    all plugins reactivated
    my site is up and running!!!

    Thanks so much to both for stopping me long enough to see what I was doing.

    • This reply was modified 2 months, 2 weeks ago by ubaphygg.
    • This reply was modified 2 months, 2 weeks ago by ubaphygg.

    I’m glad to know about it, @ubaphygg ! 😉 I have written a very detailed article about it in portuguese language in my blog:

    https://blog.lucianoreis.com/2020/07/04/wordpress-trava-apos-upgrade-para-php-7-3/

    I have a similar error.
    During a new installation of WordPress I get the following message: “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”

    System:
    CentOS Linux 8.2.2004
    Webmin 1,953
    Virtualmin 6.10
    Nginx
    PHP 7.2

    Log error Nginx:

    [error] 19696 # 0: * 16 FastCGI sent in stderr: “PHP Warning: Use of undefined constant WP_CONTENT_DIR – assumed ‘WP_CONTENT_DIR’ (this will throw an Error in a future version of PHP) in / home / myvideoimage / public_html / wp -includes / load.php on line 141 “while reading response header from upstream, client: 192.168.1.12, server: myvideoimage.com, request:” GET /wp-admin/install.php HTTP / 1.1 “, upstream:” fastcgi : // unix: /var/php-nginx/159611529162207.sock/socket: “, host:” 192.168.1.13 ”
    2020/08/01 09:44:09 [error] 19696 # 0: * 16 FastCGI sent in stderr: “PHP Warning: Use of undefined constant WP_CONTENT_DIR – assumed ‘WP_CONTENT_DIR’ (this will throw an Error in a future version of PHP ) in /home/myvideoimage/public_html/wp-includes/load.php on line 141 “while reading response header from upstream, client: 192.168.1.12, server: myvideoimage.com, request:” GET / wp-admin / install. php HTTP / 1.1 “, upstream:” fastcgi: // unix: /var/php-nginx/159611529162207.sock/socket: “, host:” 192.168.1.13 ”

    I specify that the PHP-Mysqlnd library is installed.

    Do you have any idea about the problem and how to solve it?
    I tried to insert the line: define (‘WP_CONTENT_DIR’, ABSPATH. ‘Wp-content’);
    at the end of wp-config.php, but it doesn’t work.

    Thank you very much.

Viewing 15 replies - 16 through 30 (of 52 total)
  • You must be logged in to reply to this topic.