MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: Anik on 2013-01-25, 22:38:42

Title: Is suphp okay now?
Post by: Anik on 2013-01-25, 22:38:42
Before in kloxo MR suphp was not working (about 4-5 months ago). php was giving output as the source code.
So is it now working?
Title: Re: Is suphp okay now?
Post by: Viking on 2013-01-25, 23:36:16
Quote from: "Anik"
Before in kloxo MR suphp was not working (about 4-5 months ago). php was giving output as the source code.
So is it now working?
It works
Title: Re: Is suphp okay now?
Post by: Anik on 2013-01-26, 00:05:04
Thanks. i will try and let know here.
Title: Re: Is suphp okay now?
Post by: lupetalo on 2013-01-30, 14:28:23
For me it never worked on Kloxo MR...
Title: Re: Is suphp okay now?
Post by: Anik on 2013-01-30, 17:09:24
so how it can be fixed?
Title: Re: Is suphp okay now?
Post by: MRatWork on 2013-01-30, 18:34:38
Quote from: "Anik"
so how it can be fixed?
Using suphp on 'primary php' must be disabling 'secondary php' (using suphp) first.

Suphp os very rigid related to ownership and permissions of files and dirs. Running 'sh /script/fix-chownchmod'.
Title: Re: Is suphp okay now?
Post by: Anik on 2013-01-30, 18:43:00
Quote from: "MRatWork"
Using suphp on 'primary php' must be disabling 'secondary php' (using suphp) first.
I tried this trick in early version of kloxo MR but it never worked. Now i will do a full backup and then try to change back to suphp and will update about it here.

Quote from: "MRatWork"
Suphp os very rigid related to ownership and permissions of files and dirs. Running 'sh /script/fix-chownchmod'.

yes i know, but suphp is still the lightest php module i have ever got. It even worked for me on a very low end box where all others (like php-fpm) failed. So i just want to give it a try to see it now works on klos MR or not.
Title: Re: Is suphp okay now?
Post by: MRatWork on 2013-01-30, 18:52:09
Quote from: "Anik"
Quote from: "MRatWork"
Using suphp on 'primary php' must be disabling 'secondary php' (using suphp) first.
I tried this trick in early version of kloxo MR but it never worked. Now i will do a full backup and then try to change back to suphp and will update about it here.

Quote from: "MRatWork"
Suphp os very rigid related to ownership and permissions of files and dirs. Running 'sh /script/fix-chownchmod'.

yes i know, but suphp is still the lightest php module i have ever got. It even worked for me on a very low end box where all others (like php-fpm) failed. So i just want to give it a try to see it now works on klos MR or not.

Instead using suphp as 'primary php', why not using 'secondary php' (using suphp by default). So, you have 2 php version and 2 php-type.

Running website with suphp just modified .htaccess on website directory root.
Title: Re: Is suphp okay now?
Post by: MRatWork on 2013-01-30, 18:58:32
See:

1. http://dev301.potissima.com/primary-php/ (http://dev301.potissima.com/primary-php/) --> use php-fpm_event
2. http://dev301.potissima.com/secondary-php/ (http://dev301.potissima.com/secondary-php/) --> use suphp
Title: Re: Is suphp okay now?
Post by: Anik on 2013-01-30, 19:05:05
Actually i want to use suphp because the whole last year i used it and i don't have any single problem with it.
now after changing to php-fpm (event) i get hell lot of trouble. connection reset problem, i need to restart it manually over time, 500 error, resource allocation error, config trouble etc.
So i want to have a tension free life, :) thats all.
Title: Re: Is suphp okay now?
Post by: MRatWork on 2013-01-30, 19:19:46
Quote from: "Anik"
Actually i want to use suphp because the whole last year i used it and i don't have any single problem with it.
now after changing to php-fpm (event) i get hell lot of trouble. connection reset problem, i need to restart it manually over time, 500 error, resource allocation error, config trouble etc.
So i want to have a tension free life, :) thats all.
Using nginx-proxy or just httpd?.

Better make a new thread about your issue and we can start again discuss about it.
Title: Re: Is suphp okay now?
Post by: Anik on 2013-01-30, 19:46:22
nginxproxy.

yes i want to create. just give me a idea about what title i will give to it.  :)
Title: Re: Is suphp okay now?
Post by: Anik on 2013-02-02, 14:26:14
just finished checking with every possible combination in latest kloxo-MR. but suphp did not worked. Still it refuses to execute the php code.
Title: Re: Is suphp okay now?
Post by: MRatWork on 2013-02-02, 15:11:43
Quote from: "Anik"
just finished checking with every possible combination in latest kloxo-MR. but suphp did not worked. Still it refuses to execute the php code.
Inform 'cat /var/log/httpd/suphp_log' and 'dir /etc/httpd/conf.d'.

Also inform here for 'service httpd restart'.

FYI, different approach for suphp for primary and secondary php.
Title: Re: Is suphp okay now?
Post by: Anik on 2013-02-02, 15:43:50
Code: [Select]
[root@feirox ~]# cat /var/log/httpd/suphp_log
cat: /var/log/httpd/suphp_log: No such file or directory
[root@feirox ~]# dir /etc/httpd/conf.d
README            php.nonconf     ruid2.nonconf   welcome.conf
fastcgi.nonconf   proxy_ajp.conf  ssl.conf        ~lxcenter.conf
php.conf.rpmsave  rpaf.conf       webalizer.conf
[root@feirox ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

Tested with suphp_event, apache, php53u & php52
Title: Re: Is suphp okay now?
Post by: MRatWork on 2013-02-02, 16:33:32
Missing suphp config on your system.

Follow this:

1. select suphp_worker/_event in 'website config' and better select 'php' (because already as 5.3 and php53u have a problem with centos 6)
2. try reinstall suphp with 'yum reinstall mod_php'
3. Modified code inside /home/apache/etc/suphp.conf from:
Code: [Select]
...
x-httpd-php="php:/usr/bin/php-cgi"
x-httpd-php52="php:/usr/local/lxlabs/ext/php/bin/php_cgi"
...
to:
Code: [Select]
...
x-httpd-php="php:/usr/bin/php-cgi"
; x-httpd-php52="php:/usr/local/lxlabs/ext/php/bin/php_cgi"
x-httpd-php52="php:/usr/local/lxlabs/ext/php/etc/lxphpcgi.sh"
...
4. copy /home/apache/etc/suphp.conf to /etc/suphp.conf and to /usr/local/lxlabs/kloxo/file/apache/etc/suphp
5. Rename /etc/httpd/conf.d/suphp.conf to /etc/httpd/conf.d/suphp.nonconf
6. Copy /home/apache/etc/conf.d/suphp52.conf to /etc/httpd/conf.d/suphp52.conf
7. Add in most top in .htaccess on domain root dir with 'AddHandler x-httpd-php .php' (using suphp for primary-php) or 'AddHandler x-httpd-php52 .php' (using suphp for secondary-php)
Title: Re: Is suphp okay now?
Post by: Anik on 2013-02-03, 14:04:11
Code: [Select]
5. Rename /etc/httpd/conf.d/suphp.conf to /etc/httpd/conf.d/suphp.nonconf
There is no suphp.conf file in that directory.

Code: [Select]
7. Add in most top in .htaccess on domain root dir with 'AddHandler x-httpd-php .php' (using suphp for primary-php) or 'AddHandler x-httpd-php52 .php' (using suphp for secondary-php)
If i don't add anything i see some creeped page. sometimes white, sometimes red, sometimes source code, sometimes un formatted html etc.
I want to use suphp as primary so added 'AddHandler x-httpd-php .php' but got 500 error.
This 'AddHandler x-httpd-php52 .php' worked but is it using as secondary?

Page creation time is little slow. (1-2Sec)
Title: Re: Is suphp okay now?
Post by: Anik on 2013-02-03, 14:15:59
I think system is still using php-fpm as primary php. how to use suphp as only one?

and how to decrease the page creation time?
Title: Re: Is suphp okay now?
Post by: Anik on 2013-02-03, 22:28:53
so you recommend me to use php-fpm instead of suphp?
Title: Re: Is suphp okay now?
Post by: quacos on 2013-04-08, 17:01:15
Same here. On a freshly installed Kloxo MR, I see just PHP sources with suphp.