PHP update made site not load

jemesouviens

Verified User
Joined
Jun 28, 2018
Messages
43
Hello. I was recommended by my wordpress to update my version of PHP. I was running PHP7.3 I think. I updated to PHP 8.1.21 and now my website wont load, and when I go to the WordPress login page, it shows me all kinds of writing, but no login page. Its like raw HTML code.
Please advise me how I can fix this?
 
while updating Custombuild using the normal SSH procedure, it told me to change php-mod to php-fpm because it was now obsolete. IS this what broke my website?
 
Last edited:
<?php

/* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/

/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/

define( 'WP_USE_THEMES', true );

/** Loads the WordPress Environment and Template */
require DIR . '/wp-blog-header.php';
 
This is what your website generated.

It's either something conflics or the install of the php did not go as planned.
 
I guess it's 99% sure a failed php install.
But please remove your link from your second post.
 
change php-mod to php-fpm
Did you also install mod_htscanner then? Because by default installation (if I'm correct) php does not support .htaccess files which Wordpress also makes use of.

Try this. It also rebuilds php too.
Code:
cd /usr/local/directadmin/custombuild
./build update
./build set mod_ruid2 no
./build set_php htscanner yes
./build mod_htscanner2
./build php n
./build rewrite_confs
 
its also possible that some of your plugins are not PHP 8.1 ready, did you test it before ?
 
there have many break change between 7.3 to 8.1

please note, before you doing any dangerous thing or enable debug mode, besure you denied from any connection except yourself. otherwise sensitive data might show to public.
 
I have reverted back to PHP7.3 and still not working. Now I am getting Cannot connect to server. NSURLErrorDomain
 
I now see httpd is stopped, and won't allow me to restart it via DirectAdmin.
/usr/bin/systemctl restart httpd.service 2>&1
 
Check the logfiles as to why the service is stopped.

Try restarting via SSH as root
service restart httpd
and see if and which error that it throws.

If it says something about the journalctl -xe or so, just use that command to display the errors.
 
Ah never mind, I see you asked here:

Next time please keep things in your own topic with the issue, we could have handled this here too.
 
[root@harvest2 custombuild]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/etc/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2023-07-21 12:28:06 EDT; 8s ago
Process: 2794 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 2794 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."

Jul 21 12:28:05 harvest2.a1websolutions.com systemd[1]: Starting The Apache HTTP Server...
Jul 21 12:28:06 harvest2.a1websolutions.com httpd[2794]: AH00526: Syntax error on line 23 of /usr/local/directadmin/data/users/harvest/httpd.conf:
Jul 21 12:28:06 harvest2.a1websolutions.com httpd[2794]: <VirtualHost> cannot occur within <VirtualHost> section
Jul 21 12:28:06 harvest2.a1websolutions.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 21 12:28:06 harvest2.a1websolutions.com systemd[1]: Failed to start The Apache HTTP Server.
Jul 21 12:28:06 harvest2.a1websolutions.com systemd[1]: Unit httpd.service entered failed state.
Jul 21 12:28:06 harvest2.a1websolutions.com systemd[1]: httpd.service failed.
[root@harvest2 custombuild]#
 
This might as well have been written in Chinese .. I would understand just as much :(

Can I pay somebody to come and fix my server for me?? I am getting very frantic.
 
rebuild apache, maybe... can solved this problem.

when you change mode of PHP, you need to rebuild webserver ( apache ).
 
The problems seemed to begin when custombuild told me to set both php-mod and php-ruid2 to "no" in the options.conf

Is there ANY way I can reverse this??? :cry:
:cry:
 
let me guest, what's command you missing ?
Code:
cd /usr/local/directadmin/custombuild
./build update
./build set mod_ruid2 no
./build set_php htscanner yes
./build set php1_release 8.1
./build set php1_mode php-fpm

./build apache
./build mod_htscanner2
./build php n
./build rewrite_confs

order command should be like this.
 
Back
Top