php version change by refresh (php selector)

khoshdel

New member
Joined
Jun 16, 2016
Messages
7
Hello

I installed two php version by custombuild2.

HTML:
#PHP Settings
php1_release=5.5
php1_mode=suphp
php2_release=5.6
php2_mode=suphp

and after that:

HTML:
./build update
./build php n

and now i can change php version for my domains in domain setup section.

but when i use phpinfo() function, i see different php version.
http://regux.com/info.php

its my httpd.conf:

HTML:
# Auto generated apache config file by DirectAdmin version 1.50.1
# Modifying this file is not recommended as any changes you make will be
# overwritten when the user makes any changes to their website

# For global config changes that affect all Users, see this guide:
# http://help.directadmin.com/item.php?id=2
# For local config changes that only affect one User, see this guide:
# http://help.directadmin.com/item.php?id=3


<Directory "/home/reguxcom/public_html">
	<IfModule mod_suphp.c>
		suPHP_Engine ON
		suPHP_UserGroup reguxcom reguxcom
	</IfModule>
	<IfModule mod_ruid2.c>
		RMode config
		RUidGid reguxcom reguxcom
		#RGroups apache access
		RGroups @none
	</IfModule>
	<IfModule mod_security2.c>
		SecAuditLogStorageDir /var/log/modsec_audit/reguxcom
	</IfModule>
	<IfModule mod_fcgid.c>
		SuexecUserGroup reguxcom reguxcom
	</IfModule>
</Directory>

<VirtualHost 185.8.172.176:80 >
	ServerName www.regux.com
	ServerAlias www.regux.com regux.com  regux.co www.regux.co regux.ir www.regux.ir regux.net www.regux.net regux.org www.regux.org
	ServerAdmin [email protected]
	DocumentRoot /home/reguxcom/domains/regux.com/public_html
	UseCanonicalName OFF
	<IfModule !mod_ruid2.c>
		SuexecUserGroup reguxcom reguxcom
	</IfModule>
	<IfModule mod_ruid2.c>
		RMode config
		RUidGid reguxcom reguxcom
		#RGroups apache access
		RGroups @none
	</IfModule>
	<IfModule mod_security2.c>
		SecAuditLogStorageDir /var/log/modsec_audit/reguxcom
	</IfModule>
	CustomLog /var/log/httpd/domains/regux.com.bytes bytes
	CustomLog /var/log/httpd/domains/regux.com.log combined
	ErrorLog /var/log/httpd/domains/regux.com.error.log
	<Directory /home/reguxcom/domains/regux.com/public_html>
		AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,Includes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None
		Options -ExecCGI
		suPHP_Engine ON
		suPHP_UserGroup reguxcom reguxcom
		<FilesMatch "\.php$">
			AddHandler x-httpd-php56 .php
		</FilesMatch>
		<FilesMatch \.php55$>
			AddHandler x-httpd-php55 .php55
		</FilesMatch>
	</Directory>
</VirtualHost>

<VirtualHost 185.8.172.176:443 >
	SSLEngine on
	SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
	SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
	SSLCACertificateFile /etc/httpd/conf/ssl.crt/server.ca
	ServerName www.regux.com
	ServerAlias www.regux.com regux.com  regux.co www.regux.co regux.ir www.regux.ir regux.net www.regux.net regux.org www.regux.org
	ServerAdmin [email protected]
	DocumentRoot /home/reguxcom/domains/regux.com/private_html
	UseCanonicalName OFF
	<IfModule !mod_ruid2.c>
		SuexecUserGroup reguxcom reguxcom
	</IfModule>
	<IfModule mod_ruid2.c>
		RMode config
		RUidGid reguxcom reguxcom
		#RGroups apache access
		RGroups @none
	</IfModule>
	<IfModule mod_security2.c>
		SecAuditLogStorageDir /var/log/modsec_audit/reguxcom
	</IfModule>
	CustomLog /var/log/httpd/domains/regux.com.bytes bytes
	CustomLog /var/log/httpd/domains/regux.com.log combined
	ErrorLog /var/log/httpd/domains/regux.com.error.log
	<Directory /home/reguxcom/domains/regux.com/private_html>
		AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,Includes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None
		Options -ExecCGI
		suPHP_Engine ON
		suPHP_UserGroup reguxcom reguxcom
		<FilesMatch "\.php$">
			AddHandler x-httpd-php56 .php
		</FilesMatch>
		<FilesMatch \.php55$>
			AddHandler x-httpd-php55 .php55
		</FilesMatch>
	</Directory>
</VirtualHost>

can i fix my websites php version ?
 
Thanks for your Reply

After running ./build php n, apache will restart automatically. i also restarted server but problem remains.
 
I've got two suhp versions with CB 2 and selector is working fine.
try to run
Code:
./build rewrite_confs

if it does not help, then try to edit /etc/httpd/conf/extra/httpd-suphp.conf and change to change:

Code:
suPHP_Engine on

to

Code:
#suPHP_Engine on

and restart apache.
 
I've got two suhp versions with CB 2 and selector is working fine.
try to run
Code:
./build rewrite_confs

if it does not help, then try to edit /etc/httpd/conf/extra/httpd-suphp.conf and change to change:

Code:
suPHP_Engine on

to

Code:
#suPHP_Engine on

and restart apache.

I did it, but the problem still remains.

HTML:
[root@centos custombuild]# ./build rewrite_confs
WARNING: It's not recommended to use apache with mod_ruid2 & suPHP enabled. It's a redundant and slow combination.
Checking to ensure /etc/httpd/conf/ssl.crt/server.ca is set.
Using 185.8.172.176 for your server IP
Installing Comodo Rule Set for ModSecurity...
Updating to latest CWAF client version
current version is up to date
update process finished!
Installation of ModSecurity Rule Set has been finished.
Writing data to /etc/httpd/conf/extra/httpd-suphp.conf
Done.
Restarting apache.
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@centos custombuild]# nano /etc/httpd/conf/extra/httpd-suphp.conf
[root@centos custombuild]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
 
I've got two suhp versions with CB 2 and selector is working fine.
try to run
Code:
./build rewrite_confs

if it does not help, then try to edit /etc/httpd/conf/extra/httpd-suphp.conf and change to change:

Code:
suPHP_Engine on

to

Code:
#suPHP_Engine on

and restart apache.

look at this link pls.
https://geopeeker.com/fetch/?url=http://regux.com/info.php

my php version is different at the same time from different location.
 
Back
Top