• Resolved wordpress19801

    (@wordpress19801)


    I downloaded PHP and WordPress, modified the config file to link to my db and then went to my https://localhost but am getting the error:

    HTTP Error 502.2 – Bad Gateway
    The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are “PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect()

    My guess is that something needs to be modified with my php.ini file – like some mysql extensions. I do have these uncommented:

    extension=mysqli
    extension=pdo_mysql

    I’m running PHP 7.3.6 and Windows 2008. Any ideas for how I can troubleshoot?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p

    (@t-p)

    502 Bad Gateway is likely a server error. Try contacting your hosting provider.

    Meanwhile try:
    – clearing your cookies, cache
    – different browsers

    Thread Starter wordpress19801

    (@wordpress19801)

    Thanks, I’m managing the server myself. Digging a bit deeper, I see

    The headers it did return are “PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect()

    Based on the link below I think the php.ini configuration is off where mysqli is not loading properly.

    https://www.ads-software.com/support/topic/error-using-wp-admininstall-php-call-to-undefined-function-mysql_connect/

    Not sure how the config file should be modified (I tried what was done in the link), but I’ll keep digging.

    Are you running Apache or IIS? Not sure how Windows handles PHP & Apache/IIS, but have you tried to restart the Apache/IIS/PHP services?

    Thread Starter wordpress19801

    (@wordpress19801)

    Thanks, I’m using IIS 7.5 and was able to figure it out. I’ll describe it incase it helps anyone else googling for help:

    An old version of PHP (5.3) had been installed on the server and was interfering with settings for the version of PHP (7.3.6). The whole time I could view the php info page so I thought PHP was working properly, but the WordPress install kept doing odd things – 502 errors, 500 errors, redirecting errors. I also noticed that when I went to the PHP Manager in IIS I wasn’t able to load the php-cgi module – IIS was throwing some strange error. So I wiped out both copies of PHP on the server, installed and configured the latest version (7.3.7), and then everything started working as intended and was able to do the 5-minute WP install.

    Moderator t-p

    (@t-p)

    Glad its sorted ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error on Install – HTTP Error 502.2 – Bad Gateway’ is closed to new replies.