Default DirectAdmin's page is blank after downgrading php v8.1 to php v7.4

Johnws2022

Verified User
Joined
Jan 14, 2022
Messages
103
I installed AlmaLinux 9 on my VPS server today, and installed DirectAdmin on top of it. Something is going not right.

Because my WP website uses PHP v7.4, I need to downgrade PHP v8.1 to 7.4.

1. Before I downgraded PHP version, I created two domains and DNS records in DirectAdmin's control panel - they both work well

2. After I downgraded PHP version to 7.4, all domains and their DNS records I created in DirectAdmin's control panel are not propagated well? - their default DireactAdmin pages are blank like this one:


But its DNS records seem propagate well here:



Previously I installed Centos Stream 9 instead of AlmaLinux 9, and it worked really well without issues.

Any advice is very appreciated.

Cheers
 
Last edited:
I found out that SSL certificates are not automatically created after the downgrade of PHP version. And under "Paste a pre-generated certificate and key" there are no Key and Certificate are created. How can I fix that?

Many thanks

 
I have followed this guide:


and found out SSL is already set auto. But I still restart DirectAdmin in SSH.

Those new domains added after downgrading PHP version have now appeared in SSL section, but their default DirectAdmin page is still blank.

Well, it is the new version of DirectAdmin causing such issue or that issue is caused by the downgrade of PHP version. Before today, there was no issue after downgrade of PHP version.

Any advice is very appreciated.

Thanks
Thon
 
In some occasions, downgrading PHP can cause some odd issues.

Maybe the best solution is to upgrade again, have your first php setting use php 8.1 so that will be the Directadmin default, things will be running fine on that.
Then as second php version, install the PHP 7.4 which you require. As soon as you installed a second php version, then on user level, the user can swap PHP versions as they want.
So in that case it's just a question of going to user or user level, set php to 7.4 and that might work better (no guarantees).

Your problems (as said in the other thread) have nothing to do with having Centos 9 Stream or Almalinux 9, they are the same.

At this point, your problems are your DNS settings and/or propagation. Check this:

Be sure you have set your correct nameserve records at your domain registrar. Because at this moment, ns1 and ns2.mengu43pet.site because at this moment they can not be found. Or if you recently set them, wait 24-48 hours for propagation.
I see the record is seen in the UK, India, Brazil and Pakistan is the dns checker site is correct. So it will take some time to get around the world.

Also check that they are also configured correctly and have the according a records in the domain, like should be.
If that is done, then you have to wait for the propagation process to complete.
 
In some occasions, downgrading PHP can cause some odd issues.

Maybe the best solution is to upgrade again, have your first php setting use php 8.1 so that will be the Directadmin default, things will be running fine on that.
Then as second php version, install the PHP 7.4 which you require. As soon as you installed a second php version, then on user level, the user can swap PHP versions as they want.
So in that case it's just a question of going to user or user level, set php to 7.4 and that might work better (no guarantees).

Your problems (as said in the other thread) have nothing to do with having Centos 9 Stream or Almalinux 9, they are the same.

At this point, your problems are your DNS settings and/or propagation. Check this:

Be sure you have set your correct nameserve records at your domain registrar. Because at this moment, ns1 and ns2.mengu43pet.site because at this moment they can not be found. Or if you recently set them, wait 24-48 hours for propagation.
I see the record is seen in the UK, India, Brazil and Pakistan is the dns checker site is correct. So it will take some time to get around the world.

Also check that they are also configured correctly and have the according a records in the domain, like should be.
If that is done, then you have to wait for the propagation process to complete.
I wish I could use PHP v8.1. My WP theme has been discontinued by its developer about 3 years ago; it uses PHP version 7.4

I think it is the latest version of DirectAdmin causing such issues; I did not have this issue with the previous DirectAdmin version. What I do right now, I create all needed domains in DA control panel before downgrading PHP version; that is the best way for now!
 
Shall DA developers fix this issue; I mean it should be compatible with and work for any older versions of PHP.
 
I wish I could use PHP v8.1.
You didn't read my post very well. I didn't say you needed to use php 8.1. I said to install that as first so -directadmin- would use it.
Then install php 7.4 as second php version and have your site choose the php 7.4 version and then you have what you want.

You are doing a whole bunch of unneeded work and there is no need at all to downgrade php. Use the multi-php version of DA.

that is the best way for now!
No it's not. But it's your free choice.
 
You didn't read my post very well. I didn't say you needed to use php 8.1. I said to install that as first so -directadmin- would use it.
Then install php 7.4 as second php version and have your site choose the php 7.4 version and then you have what you want.

You are doing a whole bunch of unneeded work and there is no need at all to downgrade php. Use the multi-php version of DA.


No it's not. But it's your free choice.
Do you have a guide of how to install PHP v7.4?
 
Ofcourse, there is nothing to it.
It can be done via the custombuild GUI but I always do everything console.

I presume you are running php-fpm and some php 8.x version is running as first php version and no other php versions are running.

This required you to login via SSH as root.

Then these commands should work:
Code:
cd /usr/local/directadmin/custombuild
./build set php2_release 7.4
./build set php2_mode php-fpm
./build php
./build rewrite_confs

After that you will have php 7.4 as the second php version.

So with then 2 php versions running, every domain can choose which php version they want to run.
To switch to another php version, go to the Domain Setup, then click on the domain, and then you will see (probably right upper side) the "php version chooser" (freely translated so might be called slightly different in English).

Click on that, a popup will open, choose your php version (so 7.4 if you want) and click save and you're done.
 
found a guide here:


Well I use the same exactly commands, but I called downgrading. so I am on the right way.

Tested AlmaLinux 9 on a different server, it seems working well.

The issue I have learned today is:

1. all domains created in DA before downgrade of PHP version must be fully propagated before starting to downgrade; otherwise their propagations will be broken.

2. Or wait until the downgrade of PHP version is completed before creating more domains and their DNS records in DA's Control Panel.
 
Ofcourse, there is nothing to it.
It can be done via the custombuild GUI but I always do everything console.

I presume you are running php-fpm and some php 8.x version is running as first php version and no other php versions are running.

This required you to login via SSH as root.

Then these commands should work:
Code:
cd /usr/local/directadmin/custombuild
./build set php2_release 7.4
./build set php2_mode php-fpm
./build php
./build rewrite_confs

After that you will have php 7.4 as the second php version.

So with then 2 php versions running, every domain can choose which php version they want to run.
To switch to another php version, go to the Domain Setup, then click on the domain, and then you will see (probably right upper side) the "php version chooser" (freely translated so might be called slightly different in English).

Click on that, a popup will open, choose your php version (so 7.4 if you want) and click save and you're done.
Thanks
 
Well I use the same exactly commands, but I called downgrading. so I am on the right way.
Might be. Downgrading is going back to a previous version of some application, so for example change php 8.0 to php 7.4. Needs recompiling.

What I was doing is what is adding a php version. And I don't use fastcgi but php-fpm.
Adding means you can use either of them and switch to your liking.

This is for example a perfect way to check if some site (f.e. Wordpress) can run on a higher PHP version. Mostly WP can, but some addons not yet. And this way you can switch, test, and if it doesn't work, just switch back to the older version via the Domain settings. Without the need of compiling php again and again.

The issue I have learned today is:
Better learn to never downgrade if possible. Try to start installation then on the correct version to begin with, works better.

Best thing is:
1.) Install and wait until everything is working.
2.) Install at least 2 php versions. The first for DA itself to run on and might best make dat a current version like 8.2 or 8.3 at the moment.
Then add one or two older versions as php2 and php3. Or even a newer one, depending on your choices.
3.) After all is compiled, then start creating or adding your domains. Then you don't need to wait for anything. On installation you can choose the desired php version in the domain settings and you're done.
Want to upgrade later, just in the domain settings, switch to a higher version of php which is already present on the server.
And no recompiling required.
 
Might be. Downgrading is going back to a previous version of some application, so for example change php 8.0 to php 7.4. Needs recompiling.

What I was doing is what is adding a php version. And I don't use fastcgi but php-fpm.
Adding means you can use either of them and switch to your liking.

This is for example a perfect way to check if some site (f.e. Wordpress) can run on a higher PHP version. Mostly WP can, but some addons not yet. And this way you can switch, test, and if it doesn't work, just switch back to the older version via the Domain settings. Without the need of compiling php again and again.


Better learn to never downgrade if possible. Try to start installation then on the correct version to begin with, works better.

Best thing is:
1.) Install and wait until everything is working.
2.) Install at least 2 php versions. The first for DA itself to run on and might best make dat a current version like 8.2 or 8.3 at the moment.
Then add one or two older versions as php2 and php3. Or even a newer one, depending on your choices.
3.) After all is compiled, then start creating or adding your domains. Then you don't need to wait for anything. On installation you can choose the desired php version in the domain settings and you're done.
Want to upgrade later, just in the domain settings, switch to a higher version of php which is already present on the server.
And no recompiling required.
Thanks for great support
 
My main domain with .co is propagated well within less than 15 minutes, the rest of my domains takes hours to be done. Well I need to wait till all these domains to be well propagated by checking their DA's default pages. Normally it wont take long like this, but with latest version of DA, it takes so long ....
 
Thanks for great support
You're welcome.

In your first post it was not .co but .site and nameservers weren't propagating properly, so logically neither are your domains.

I'ts not DA which makes it take that long. If nameservers are configured properly in Directadmin, then propagating domains and nameservers are taking just as long as with any panel.
DA has no influence on propagation unless something is configured wrongly.

And in case it would be DA, then we all would have the same issue. But that is not the case.
 
You're welcome.

In your first post it was not .co but .site and nameservers weren't propagating properly, so logically neither are your domains.

I'ts not DA which makes it take that long. If nameservers are configured properly in Directadmin, then propagating domains and nameservers are taking just as long as with any panel.
DA has no influence on propagation unless something is configured wrongly.

And in case it would be DA, then we all would have the same issue. But that is not the case.
DNS records are configured correctly. I had to reinstall my server again with a different IP because my main website has been off for 4 hours while other domains are not propagated. This time I configured only that main domain, and keep the rest after the PHP downgrade. Wow: all those domains are well propagated within 15 minutes - no idea of what is going on.
 
You're welcome.

In your first post it was not .co but .site and nameservers weren't propagating properly, so logically neither are your domains.

I'ts not DA which makes it take that long. If nameservers are configured properly in Directadmin, then propagating domains and nameservers are taking just as long as with any panel.
DA has no influence on propagation unless something is configured wrongly.

And in case it would be DA, then we all would have the same issue. But that is not the case.
My main domain with .co is always fast propagated well within 10 or 15 minutes. I mean other domains did not on a bad vps server when posting this issue
 
with a different IP because
There you go. Different ip, then again nameservers need to propagate newly, that takes time.
Also some registrars more fastly update their DNS than other registrars. I know when at one registrar I update my nameservers, they are propagated almost everywhere on the Europe side where I am within 2 hours.
With another registrar, I often takes 4 hours.
But I never ever had nameservers with new ip's propagated within 10-15 minutes, not even on cPanel. Only changes in already propagated domains where done that quickly. And sometimes new domains with already propagated nameservers, if I was lucky.

However I'm being blind here because I don't have info and can't see what's going on. But it's for sure not DA, because DA does not do propagation. Maybe the .co registry is faster than other registry's, I don't know, could have different causes.
 
There you go. Different ip, then again nameservers need to propagate newly, that takes time.
Also some registrars more fastly update their DNS than other registrars. I know when at one registrar I update my nameservers, they are propagated almost everywhere on the Europe side where I am within 2 hours.
With another registrar, I often takes 4 hours.
But I never ever had nameservers with new ip's propagated within 10-15 minutes, not even on cPanel. Only changes in already propagated domains where done that quickly. And sometimes new domains with already propagated nameservers, if I was lucky.

However I'm being blind here because I don't have info and can't see what's going on. But it's for sure not DA, because DA does not do propagation. Maybe the .co registry is faster than other registry's, I don't know, could have different causes.
So you dont believe my domains at Namecheap.com and internetbs.net are propagated within 15 minutes. I have no reasons to lie, sir! This fast propagation happens all the times before I posted this issue here.
 
So you dont believe my domains at Namecheap.com and internetbs.net are propagated within 15 minutes.
I didn't say that. I suggest you read again what I was talking about.
Hint: changing ip's on nameservers and then 15 minutes.

Next to that, if I never had this within 15 minutes is that not a statement that I don't believe you don't either.
 
Back
Top