MRatWork Forum by Mustafa Ramadhan
Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: sandipcd on 2016-04-24, 08:10:08
-
I am using Drupal 7. It needs php 5.5.
So do I use php55u_ or php55w_ ?
And what is the difference ?
And which PHP type is suitable ? suphp, suphp_event, php-fpm_event or others ?
I have read php requirements for drupal, but not found these - https://www.drupal.org/requirements/php#7
Please help.
-
Depend on Kloxo-MR version. In Kloxo-MR 7.0, just install 'multiple php', select 'php55m' in 'php used' where 'php branch' stay in 'php 5.4u'.
-
Inside Customer account in 'PHP Configure', under 'Multiple PHP Already Installed', now it is showing 'php54m php55m'. But under Domain in the 'Web / PHP Selector' it is only showing Default PHP selected. It is not showing to select PHP version. So, how to do this ?
Have run the script 'sh /script/fixphp', 'sh /script/restart-web -y', 'service httpd restart'. But not successful.
-
Add php in 'multiple php install' under 'webserver configure'.
-
Already added. Please see the print screen.
-
Update your Kloxo-MR 7.0 to latest one until you found 'web / php selector' change to 'web options'.
-
Using Kloxo-MR: 7.0.0.b-2016050403 version. Is there any new release after this ?
Let me know the command to update Kloxo-Mr ?
-
Using Kloxo-MR: 7.0.0.b-2016050403 version. Is there any new release after this ?
Let me know the command to update Kloxo-Mr ?
Yum clean all; yum update -y; sh /script/cleanup.
-
I have run the command 3 times 'yum clean all; yum update -y; sh /script/cleanup'.
Now it is showing 'web features' under 'Domain Home'. Also have selected in 'PHP Selected' 'php55m'. When a phpinfo.php file is created under this domain name, still it is showing that using php 5.4.45. Here you can see - http://openid11.tk/phpinfo.php
So, now how to use this php55m in drupal website ?
-
I have run the command 3 times 'yum clean all; yum update -y; sh /script/cleanup'.
Now it is showing 'web features' under 'Domain Home'. Also have selected in 'PHP Selected' 'php55m'. When a phpinfo.php file is created under this domain name, still it is showing that using php 5.4.45. Here you can see - http://openid11.tk/phpinfo.php
So, now how to use this php55m in drupal website ?
try to restart the web server with 'sh /script/restart-web -y'
-
Have run the command 'sh /script/restart-web -y'.
And also have run 'sh /script/fixphp'; 'sh /script/fixweb-all'; 'sh /script/fixwebcache'; 'sh /script/restart-php-fpm'; 'sh /script/restart-web'.
But still it does not fix, it is showing using php 5.4.45. Here you can see - http://openid11.tk/phpinfo.php. Please see the print screen attached.
-
Have run the command 'sh /script/restart-web -y'.
And also have run 'sh /script/fixphp'; 'sh /script/fixweb-all'; 'sh /script/fixwebcache'; 'sh /script/restart-php-fpm'; 'sh /script/restart-web'.
But still it does not fix, it is showing using php 5.4.45. Here you can see - http://openid11.tk/phpinfo.php. Please see the print screen attached.
Did you tick 'enable multiple php' in 'admin > servers > localhost > php configure'?.
-
Yes, I have tick 'Multiple PHP Enable (for 'php-fpm')' in admin > Servers > localhost > PHP Configure.
Also I have tick 'Enable Multiple PHP As Secondary PHP' under 'PHP Type' in admin > Servers > localhost > Webserver Configure.
But still it is not working.
-
check your .htaccess file
-
.htaccess file code is given below. Is this alright ?
###Start Kloxo PHP config Area
### begin content - please not remove this line
#<IfModule mod_rewrite.c>
# ## MR -- authentically for letsencrypt for webroot-based
# RewriteRule /\.|^\.(?!well-known/) - [F]
#</FilesMatch>
### MR -- using php version different with default php
### 1. Using suphp
### - Copy between '#<FilesMatch \.php$>' to '#</FilesMatch>' and
### then remove '#' from '#<FilesMatch', '#</FilesMatch>' and one of '#SetHandler'
#<FilesMatch \.php$>
#SetHandler x-httpd-php
#SetHandler x-httpd-php52
#SetHandler x-httpd-php53
#SetHandler x-httpd-php54
#SetHandler x-httpd-php55
#SetHandler x-httpd-php56
#SetHandler x-httpd-php70
#</FilesMatch>
### OR
### 2. Using fcgid
### - Copy from '#Options' to '#FCGIWrapper' and
### then remove '#' for one of '#FCGIWrapper'
#Options +ExecCGI
#<FilesMatch \.php$>
# SetHandler fcgid-script
#</FilesMatch>
#FCGIWrapper /usr/bin/php-cgi .php
#FCGIWrapper /usr/bin/php52m-cgi .php
#FCGIWrapper /usr/bin/php53m-cgi .php
#FCGIWrapper /usr/bin/php54m-cgi .php
#FCGIWrapper /usr/bin/php55m-cgi .php
#FCGIWrapper /usr/bin/php56m-cgi .php
#FCGIWrapper /usr/bin/php70m-cgi .php
### end content - please not remove this line
###End Kloxo PHP config Area
-
Use this
###Start Kloxo PHP config Area
### begin content - please not remove this line
#<IfModule mod_rewrite.c>
# ## MR -- authentically for letsencrypt for webroot-based
# RewriteRule /\.|^\.(?!well-known/) - [F]
#</FilesMatch>
### MR -- using php version different with default php
### 1. Using suphp
### - Copy between '#<FilesMatch \.php$>' to '#</FilesMatch>' and
### then remove '#' from '#<FilesMatch', '#</FilesMatch>' and one of '#SetHandler'
<FilesMatch \.php$>
#SetHandler x-httpd-php
#SetHandler x-httpd-php52
#SetHandler x-httpd-php53
#SetHandler x-httpd-php54
SetHandler x-httpd-php55
#SetHandler x-httpd-php56
#SetHandler x-httpd-php70
</FilesMatch>
### OR
### 2. Using fcgid
### - Copy from '#Options' to '#FCGIWrapper' and
### then remove '#' for one of '#FCGIWrapper'
#Options +ExecCGI
#<FilesMatch \.php$>
# SetHandler fcgid-script
#</FilesMatch>
#FCGIWrapper /usr/bin/php-cgi .php
#FCGIWrapper /usr/bin/php52m-cgi .php
#FCGIWrapper /usr/bin/php53m-cgi .php
#FCGIWrapper /usr/bin/php54m-cgi .php
#FCGIWrapper /usr/bin/php55m-cgi .php
#FCGIWrapper /usr/bin/php56m-cgi .php
#FCGIWrapper /usr/bin/php70m-cgi .php
### end content - please not remove this line
###End Kloxo PHP config Area
-
After use this code PHP is not working. See here - http://openid11.tk/phpinfo.php
-
Try This
###Start Kloxo PHP config Area
### begin content - please not remove this line
#<IfModule mod_rewrite.c>
# ## MR -- authentically for letsencrypt for webroot-based
# RewriteRule /\.|^\.(?!well-known/) - [F]
#</FilesMatch>
### MR -- using php version different with default php
### 1. Using suphp
### - Copy between '#<FilesMatch \.php$>' to '#</FilesMatch>' and
### then remove '#' from '#<FilesMatch', '#</FilesMatch>' and one of '#SetHandler'
##<FilesMatch \.php$>
#SetHandler x-httpd-php
#SetHandler x-httpd-php52
#SetHandler x-httpd-php53
#SetHandler x-httpd-php54
#SetHandler x-httpd-php55
#SetHandler x-httpd-php56
#SetHandler x-httpd-php70
##</FilesMatch>
### OR
### 2. Using fcgid
### - Copy from '#Options' to '#FCGIWrapper' and
### then remove '#' for one of '#FCGIWrapper'
Options +ExecCGI
<FilesMatch \.php$>
SetHandler fcgid-script
</FilesMatch>
#FCGIWrapper /usr/bin/php-cgi .php
#FCGIWrapper /usr/bin/php52m-cgi .php
#FCGIWrapper /usr/bin/php53m-cgi .php
#FCGIWrapper /usr/bin/php54m-cgi .php
FCGIWrapper /usr/bin/php55m-cgi .php
#FCGIWrapper /usr/bin/php56m-cgi .php
#FCGIWrapper /usr/bin/php70m-cgi .php
### end content - please not remove this line
###End Kloxo PHP config Area
-
Use this code and seeing 'Internal Server Error'. http://openid11.tk/phpinfo.php
Also I have send you login info by PM.
-
I found this issue where using firefox. Need clear firefox cache.
-
I found this issue where using firefox. Need clear firefox cache.
Open in Chrome, open in mobile, change the folder - but it still showing php 5.4.45 version.
Any idea ?
-
Inform here "cat /opt/configs/apache/conf/domains/yourdomain.com.conf|grep '.sock'" (change yourdomain.com with your real domain.
-
Try Kloxo-MR 7.0 to 2016060105.
-
Try Kloxo-MR 7.0 to 2016060105.
My version is 7.0.0.b-2016053003. How to get 2016060105 ?
-
Inform here "cat /opt/configs/apache/conf/domains/yourdomain.com.conf|grep '.sock'" (change yourdomain.com with your real domain.
[root@server1 ~]# cat /opt/configs/apache/conf/domains/openid11.tk.conf|grep '.s ock'
FastCGIExternalServer "/home/kloxo/httpd/cp/cp.openid11. tk.0fake" -socket /opt/configs/php-fpm/sock/php55m-apache.sock -idle-timeout 300 0 -pass-header Authorization
SetHandler "proxy:unix:/opt/configs/php-fpm/sock /php55m-apache.sock|fcgi://localhost"
FastCGIExternalServer "/home/kloxo/httpd/webmail/webmail .openid11.tk.0fake" -socket /opt/configs/php-fpm/sock/php55m-apache.sock -idle-t imeout 3000 -pass-header Authorization
SetHandler "proxy:unix:/opt/configs/php-fpm/sock /php55m-apache.sock|fcgi://localhost"
FastCGIExternalServer "/home/hostingultraso123/openid11/ openid11.tk.0fake" -socket /opt/configs/php-fpm/sock/php55m-hostingultraso123.so ck -idle-timeout 3000 -pass-header Authorization
SetHandler "proxy:unix:/opt/configs/php-fpm/sock /php55m-hostingultraso123.sock|fcgi://localhost"
FastCGIExternalServer "/home/kloxo/httpd/cp/cp.openid11. tk.1fake" -socket /opt/configs/php-fpm/sock/php55m-apache.sock -idle-timeout 300 0 -pass-header Authorization
SetHandler "proxy:unix:/opt/configs/php-fpm/sock /php55m-apache.sock|fcgi://localhost"
FastCGIExternalServer "/home/kloxo/httpd/webmail/webmail .openid11.tk.1fake" -socket /opt/configs/php-fpm/sock/php55m-apache.sock -idle-t imeout 3000 -pass-header Authorization
SetHandler "proxy:unix:/opt/configs/php-fpm/sock /php55m-apache.sock|fcgi://localhost"
FastCGIExternalServer "/home/hostingultraso123/openid11/ openid11.tk.1fake" -socket /opt/configs/php-fpm/sock/php55m-hostingultraso123.so ck -idle-timeout 3000 -pass-header Authorization
SetHandler "proxy:unix:/opt/configs/php-fpm/sock /php55m-hostingultraso123.sock|fcgi://localhost"
-
So, look like your domain conf is normal.
Try using 'phpversion();' instead 'phpinfo()' in your php file.
-
After installing CentOS 6.8, now got success. But have to check for other domain also.
-
So, look like your domain conf is normal.
Try using 'phpversion();' instead 'phpinfo()' in your php file.
In Rackspace Cloud Server, I have CentOS 6.7, Kloxo-Mr 7. Here php version is not taking by website. I have selected php 5.5 under Domain name. Tried using 'phpinfo();' - showing php 5.4. And try 'phpversion();', showing nothing but white screen. Here it is - http://sandipchoudhury.com/phpinfo.php
Also here using php type - suphp.
So, what is the solution ?
-
Need select 'php-fpm' for 'php type' if using apache or proxy.
-
Need select 'php-fpm' for 'php type' if using apache or proxy.
I have selected php-fpm_event. Is this right ?
-
Yes.
-
Need select 'php-fpm' for 'php type' if using apache or proxy.
Please see the attached file for the services running in the server. So, related to services is php type 'php-fpm_event' is right ?
-
Inform here 'sh /script/restart-web -y'.
-
Inform here 'sh /script/restart-web -y'.
Please see information -
[root@server1 ~]# sh /script/restart-web -y
Stopping php-fpm (PHP Used): [FAILED]
Starting php-fpm (PHP Used): [05-Jun-2016 03:56:30] ERROR: An another FPM instance seems to already listen on /opt/configs/php-fpm/sock/php-apache.sock
[05-Jun-2016 03:56:30] ERROR: FPM initialization failed
[FAILED]
-------------------------------------------------------------------
Stopping php54m-fpm (Multiple Php): [ OK ]
Stopping php55m-fpm (Multiple Php): [ OK ]
Stopping php56m-fpm (Multiple Php): [ OK ]
Starting php54m-fpm (Multiple Php): [ OK ]
Starting php55m-fpm (Multiple Php): [ OK ]
Starting php56m-fpm (Multiple Php): [ OK ]
-------------------------------------------------------------------
Stopping nginx: [FAILED]
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] still could not bind()
[FAILED]
-------------------------------------------------------------------
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
-------------------------------------------------------------------
- For help, type '/script/restart-web [--help|-h]'
[root@server1 ~]#
-
Try 'pkill -9 php-fpm; sh /script/restart-all -y'.
-
Try 'pkill -9 php-fpm; sh /script/restart-all -y'.
Here is the output -
[root@server1 ~]# pkill -9 php-fpm
[root@server1 ~]# pkill -9 php-fpm; sh /script/restart-all -y
Shutting down system logger: [ OK ]
Starting system logger: [ OK ]
-------------------------------------------------------------------
Shutting down MySQL... SUCCESS!
Starting MySQL... SUCCESS!
-------------------------------------------------------------------
Stopping named: . [ OK ]
Starting named: [ OK ]
-------------------------------------------------------------------
Stopping php-fpm (PHP Used): [FAILED]
Starting php-fpm (PHP Used): [ OK ]
-------------------------------------------------------------------
Stopping php54m-fpm (Multiple Php): [FAILED]
Stopping php55m-fpm (Multiple Php): [FAILED]
Stopping php56m-fpm (Multiple Php): [FAILED]
Starting php54m-fpm (Multiple Php): [ OK ]
Starting php55m-fpm (Multiple Php): [ OK ]
Starting php56m-fpm (Multiple Php): [ OK ]
-------------------------------------------------------------------
Stopping nginx: [FAILED]
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] still could not bind()
[FAILED]
-------------------------------------------------------------------
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
-------------------------------------------------------------------
*** Process for QMAIL service ***
Stopping qmail-toaster: svscan qmail logging.
qmail-send: no process killed
Starting qmail-toaster: svscan.
-------------------------------------------------------------------
- For help, type '/script/restart-mail [--help|-h]'
-------------------------------------------------------------------
Stopping pure-ftpd: [ OK ]
Starting pure-ftpd: [ OK ]
-------------------------------------------------------------------
Stopping kloxo-phpcgi: [FAILED]
Starting kloxo-phpcgi ('php54s' in 'fpm' mode): [ OK ]
Stopping kloxo-hiawatha: [ OK ]
Starting kloxo-hiawatha: [ OK ]
-------------------------------------------------------------------
[root@server1 ~]#
-
If not using nginx/nginx-proxy, try 'chkconfig nginx off; sh /script/restart-web -y'.
-
If not using nginx/nginx-proxy, try 'chkconfig nginx off; sh /script/restart-web -y'.
Have run the command. Output given below. And print screen attached.
[root@server1 ~]# chkconfig nginx off
[root@server1 ~]# sh /script/restart-web -y
Stopping php-fpm (PHP Used): [ OK ]
Starting php-fpm (PHP Used): [ OK ]
-------------------------------------------------------------------
Stopping php54m-fpm (Multiple Php): [ OK ]
Stopping php55m-fpm (Multiple Php): [ OK ]
Stopping php56m-fpm (Multiple Php): [ OK ]
Starting php54m-fpm (Multiple Php): [ OK ]
Starting php55m-fpm (Multiple Php): [ OK ]
Starting php56m-fpm (Multiple Php): [ OK ]
-------------------------------------------------------------------
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
-------------------------------------------------------------------
- For help, type '/script/restart-web [--help|-h]'
[root@server1 ~]#
-
If you choose 'apache' only, better remove nginx with 'yum remove nginx -y'.
-
If you choose 'apache' only, better remove nginx with 'yum remove nginx -y'.
I think, I have removed. See output below and see print screen.
[root@server1 ~]# yum remove nginx -y
Loaded plugins: fastestmirror, priorities, protectbase, replace
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 0:1.11.1-1.el6.ngx will be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
nginx x86_64 1.11.1-1.el6.ngx @mratwork-nginx 2.1 M
Transaction Summary
================================================================================
Remove 1 Package(s)
Installed size: 2.1 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : nginx-1.11.1-1.el6.ngx.x86_64 1/1
warning: /etc/nginx/nginx.conf saved as /etc/nginx/nginx.conf.rpmsave
warning: /etc/nginx/fastcgi_params saved as /etc/nginx/fastcgi_params.rpmsave
warning: /etc/nginx/conf.d/default.conf saved as /etc/nginx/conf.d/default.conf.rpmsave
Verifying : nginx-1.11.1-1.el6.ngx.x86_64 1/1
Removed:
nginx.x86_64 0:1.11.1-1.el6.ngx
Complete!
[root@server1 ~]#