Cant change default PHP version

ericosman

Verified User
Joined
Nov 25, 2019
Messages
59
Location
Weert
Hi,

When i want to visit one of the websites i host i sometimes get a failed connection (also when i use tools like gtmetrix) a tool will keep fetching the website untill it even fails. If i reload the page it will say my website is fast....

I read on the internet it is normal for the first try to be slow(er) but i think this is a whole new eara.

The most time I get a failed connection is when i would try to visit a website early in the morning (fist connection of the day?)

This is one of the errors i can get using Google lighthouse speed check:
Lighthouse returned error: FAILED_DOCUMENT_REQUEST.

But when i look at my error logbook from Directadmin it's empty.

I use:
Centos-release-7-7.1908.0.el7.centos.x86_64
Directadmin
Openlightspeed
PHP 7.4 / 7.3 lsphp
MariaDB 10.4

Is anyone familiar this issue and how to solve it? and if anyone has some recommendations i would love to know.
 

Zhenyapan

Verified User
Joined
Feb 23, 2018
Messages
361
Location
UA
Check error/access logs for this domain or general logs of OpenLightspeed, there must be shown reason of received error.
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,096
Location
LT, EU
Could be a bug in OpenLiteSpeed (try switching the webservers, if that helps - open a ticket/forum post for them).
 

ericosman

Verified User
Joined
Nov 25, 2019
Messages
59
Location
Weert
Could be a bug in OpenLiteSpeed (try switching the webservers, if that helps - open a ticket/forum post for them).
After changing back to Apache (following this site https://help.directadmin.com/item.php?id=662 (changed 7.2 to 7.3) i now have issues with php version

I set to run PHP 7.3.
If i look at the site it runs PHP version: 7.2.7

This is in my error log when i select 7.3[php-fpm] with php selector
Code:
[Sun Mar 29 15:49:11.235071 2020] [proxy:error] [pid 21219] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket /usr/local/php73/sockets/username.sock (*) failed
[Sun Mar 29 15:49:11.235127 2020] [proxy_fcgi:error] [pid 21219] [client 86.82.95.46:63755] AH01079: failed to make connection to backend: httpd-UDS
And when i select PHP 7.4 mod_php it runs 7.2.3
 
Last edited:

ericosman

Verified User
Joined
Nov 25, 2019
Messages
59
Location
Weert
Also Ioncube is not installed (even tho it says this after i build ioncube


There is no ionCube loader available for PHP 7.4.
ionCube loader 10.3.9 is now installed for PHP 7.3.
ionCube loader 10.3.9 is now installed for PHP 7.2.
Restarting php-fpm73.
Restarting php-fpm72.


extension_dir/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902/usr/local/php74/lib/php/extensions/no-debug-non-zts-20190902
include_path.:/usr/local/lib/php.:/usr/local/lib/php
 
Last edited:

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,096
Location
LT, EU
As your first line says "There is no ionCube loader available for PHP 7.4." :) It should be available soon.
 

ericosman

Verified User
Joined
Nov 25, 2019
Messages
59
Location
Weert
Did you run “./build php” when you chnged php options in options.conf?
Now i have 7.4.4 working (y)
The only problem is, when i want to set PHP 7.3 as default (following this link https://help.directadmin.com/item.php?id=345)
I also removed OLS and NGIX at the Remove Software page

I think it doenst want to remove PHP 7.4 mod_php :
PHP 7.4 (mod_php) and change it to PHP 7.4 (php-fpm) and set
PHP 7.3 (php-fpm) and change it to PHP 7.3 (mod_php)

Because when i set it to:
PHP 7.3 (mod_php) and change it to PHP 7.3 (php-fpm) and set
PHP 7.4 (php-fpm) and change it to PHP 7.4 (mod_php)


I get the following message :
Code:
Configuring SAPI modules
checking for Apache 2.0 handler-module support via DSO through APXS... yes
checking for setproctitle... no
checking sys/pstat.h usability... no
checking sys/pstat.h presence... no
checking for sys/pstat.h... no
checking for PS_STRINGS... no
checking for CLI build... yes
checking for embedded SAPI library support... configure: error:
+--------------------------------------------------------------------+
|                        *** ATTENTION ***                           |
|                                                                    |
| You've configured multiple SAPIs to be build. You can build only   |
| one SAPI module plus CGI, CLI and FPM binaries at the same time.   |
+--------------------------------------------------------------------+
Sidenote: Now i run apache, this runs better (for now) then OLS, but I guess it's smarter running ngix_apache (so i get the speed of Ngix with the .htaccess of apache?) This because most (not all) sites are Wordpress based.
 
Last edited:

ericosman

Verified User
Joined
Nov 25, 2019
Messages
59
Location
Weert
I have changed to NGIX_Apache.
Now i still have to set PHP 7.3 to default but i keep getting the error about the SAPIs. Does anyone have a clue?
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,096
Location
LT, EU
I have changed to NGIX_Apache.
Now i still have to set PHP 7.3 to default but i keep getting the error about the SAPIs. Does anyone have a clue?
Is mod_php used? If not CB 2.0 rev. 2450 might help, if mod_php is used - I'd need to check it again..
 

ericosman

Verified User
Joined
Nov 25, 2019
Messages
59
Location
Weert
Is mod_php used? If not CB 2.0 rev. 2450 might help, if mod_php is used - I'd need to check it again..
No i changed to php-fpm , and I run CB 2.0 Rev 2449
Before when i ran OLS i had 7.3 as default (because of Ioncube). But somehow i did something wrong and made 7.4 default.

I updated to 2450 and or looks like it's fixed... still waiting to be complete
It’s fixed! Thanks! May i know what the problem caused?
 
Last edited:
Top