Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-06-17, 21:30:03

Author Topic: How Change PHP config on secondary PHP?  (Read 8696 times)

0 Members and 1 Guest are viewing this topic.

Offline WISTFUL

  • Senior Member
  • *
  • Posts: 247
  • Karma: +0/-0
    • View Profile
How Change PHP config on secondary PHP?
« on: 2013-03-13, 23:11:28 »
Where can I change php config for secondary php?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: How Change PHP config on secondary PHP?
« Reply #1 on: 2013-03-14, 08:13:21 »
1. Copy /home/apache/etc/suphp.conf to /home/apache/etc/custom.suphp.conf

2. Open /home/apache/etc/custom.suphp.conf. You will see:
Code: [Select]
...
[handlers]
;Handler for php-scripts
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"
...
You can copy 'lxphpcgi.sh' to 'lxphpcgi2.sh' and then modified 'lxphpcgi2.sh'.

3. Copy /home/apache/etc/custom.suphp.conf to /etc/suphp.conf

4. Restart services with 'sh /script/restart-services'.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline WISTFUL

  • Senior Member
  • *
  • Posts: 247
  • Karma: +0/-0
    • View Profile
Re: How Change PHP config on secondary PHP?
« Reply #2 on: 2013-03-17, 14:29:36 »
For edit php.ini, is it enough that I just edit "/usr/local/lxlabs/ext/php/etc/php.ini" instead above steps?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: How Change PHP config on secondary PHP?
« Reply #3 on: 2013-03-17, 15:09:45 »
Beside used by secondary php, this '/usr/local/lxlabs/ext/php/etc/php.ini' using by Kloxo itself. If you modified this php.ini maybe affect to Kloxo panel too.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline WISTFUL

  • Senior Member
  • *
  • Posts: 247
  • Karma: +0/-0
    • View Profile
Re: How Change PHP config on secondary PHP?
« Reply #4 on: 2013-03-17, 16:31:45 »
Thanks mustafa,
So I try below steps but I am not sure of its correctness.

1. Duplicate '/home/apache/etc/suphp.conf' to '/home/apache/etc/custom.suphp.conf'
2. Edit '/home/apache/etc/custom.suphp.conf' and change lxphpcgi.sh to custom.lxphpcgi.sh
3. Edit '/usr/local/lxlabs/ext/php/etc/custom.lxphpcgi.sh' and comment 'export PHPRC="/usr/local/lxlabs/ext/php/etc"' and uncomment 'export PHP_INI_SCAN_DIR="/usr/local/lxlabs/ext/php/etc/php.d"'
4. Edit '/etc/suphp.conf' and change lxphpcgi.sh to custom.lxphpcgi.sh
5. Run 'sh /script/fixweb' and 'sh /script/restart-services'.

If above steps is correct, Now which ini file should be edited that for example memory_limit changed from 80000M to 128M in secondary-php?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: How Change PHP config on secondary PHP?
« Reply #5 on: 2013-03-17, 16:51:56 »
1. Duplicate '/home/apache/etc/suphp.conf' to '/home/apache/etc/custom.suphp.conf'
2. Edit '/home/apache/etc/custom.suphp.conf' and change lxphpcgi.sh to custom.lxphpcgi.sh
3. Edit '/usr/local/lxlabs/ext/php/etc/custom.lxphpcgi.sh' and change 'export PHPRC="/home/httpd"'
4. Copy '/usr/local/lxlabs/ext/php/etc/php.ini' to '/home/httpd/php.ini' and then modified '/home/httpd/php.ini'
5. Edit '/etc/suphp.conf' and change lxphpcgi.sh to custom.lxphpcgi.sh
6. Run 'sh /script/fixweb' and 'sh /script/restart-services'.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline WISTFUL

  • Senior Member
  • *
  • Posts: 247
  • Karma: +0/-0
    • View Profile
Re: How Change PHP config on secondary PHP?
« Reply #6 on: 2013-06-29, 22:11:34 »
Quote from: "MRatWork"
1. Duplicate '/home/apache/etc/suphp.conf' to '/home/apache/etc/custom.suphp.conf'
2. Edit '/home/apache/etc/custom.suphp.conf' and change lxphpcgi.sh to custom.lxphpcgi.sh
3. Edit '/usr/local/lxlabs/ext/php/etc/custom.lxphpcgi.sh' and change 'export PHPRC="/home/httpd"'
4. Copy '/usr/local/lxlabs/ext/php/etc/php.ini' to '/home/httpd/php.ini' and then modified '/home/httpd/php.ini'
5. Edit '/etc/suphp.conf' and change lxphpcgi.sh to custom.lxphpcgi.sh
6. Run 'sh /script/fixweb' and 'sh /script/restart-services'.

Some files has been modified in new version

If below steps is correct please accept it:

1. Duplicate '/home/apache/etc/suphp.conf' to '/home/apache/etc/custom.suphp.conf'
2. Edit '/home/apache/etc/custom.suphp.conf' and change phpcgi.sh to custom.phpcgi.sh
3. Edit '/home/apache/etc/suphp/custom.phpcgi.sh' and change 'export PHPRC="/home/httpd"'
4. Copy '/home/apache/etc/suphp/php.ini' to '/home/httpd/php.ini' and then modified '/home/httpd/php.ini'
5. Edit '/etc/suphp.conf' and change phpcgi.sh to custom.phpcgi.sh
6. Run 'sh /script/fixweb' and 'sh /script/restart-services'.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
.

Offline WISTFUL

  • Senior Member
  • *
  • Posts: 247
  • Karma: +0/-0
    • View Profile
Re: How Change PHP config on secondary PHP?
« Reply #7 on: 2013-07-01, 12:34:46 »
Or Is it enough that we edit '/home/apache/etc/suphp/php.ini' from first ?!
« Last Edit: 1970-01-01, 01:00:00 by Guest »
.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: How Change PHP config on secondary PHP?
« Reply #8 on: 2013-07-01, 20:26:20 »
I want tell you something about secondary PHP.

Kloxo-MR using suphp for secondary php. Suphp have 2 importance conf files (/etc/suphp.conf and /etc/httpd/conf.d/suphp52.conf) where 2 of this file copied from /home/apache/etc/suphp.conf and /home/apache/etc/conf.d/suphp52.conf.

This is content of /etc/suphp.conf:
Code: [Select]
[global]
logfile=/var/log/httpd/suphp_log
loglevel=info
webserver_user=apache
docroot=/
env_path=/bin:/usr/bin
umask=0022
min_uid=500
min_gid=48

; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=false

;Send minor error messages to browser
errors_to_browser=false

[handlers]
;Handler for php-scripts
x-httpd-php="php:/usr/bin/php-cgi"
; x-httpd-php52="php:/usr/local/lxlabs/ext/php/bin/php_cgi"
x-httpd-php52="php:/home/apache/etc/suphp/phpcgi.sh"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"

;;; MR -- for using php52 just enough add 'AddHandler x-httpd-php52 .php' on .htaccess.
;;; it's make possible running 'dual php' on server!

and content of etc/httpd/conf.d/suphp52.conf:
Code: [Select]
### MR -- read /usr/local/lxlabs/kloxo/file/apache/conf.d/suphp.conf.original for full description ###

LoadModule suphp_module modules/mod_suphp.so

suPHP_Engine On

#AddHandler x-httpd-php .php
#AddHandler x-httpd-php .php .php4 .php3 .phtml

suPHP_AddHandler x-httpd-php
suPHP_AddHandler x-httpd-php52

DirectoryIndex index.php

You can add additional setting (because want suphp not use 'standard' x-httpd-php52) like:
Code: [Select]
[handlers]
...
;Handler for php-scripts
x-httpd-php="php:/usr/bin/php-cgi"
; x-httpd-php52="php:/usr/local/lxlabs/ext/php/bin/php_cgi"
x-httpd-php52="php:/home/apache/etc/suphp/phpcgi.sh"

x-httpd-php52s="php:/home/httpd/tester.com/php5.fcgi"
...

and then inside .htaccess you enable activate 'AddHandler x-httpd-php52s .php' instead 'AddHandler x-httpd-php52 .php'
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline WISTFUL

  • Senior Member
  • *
  • Posts: 247
  • Karma: +0/-0
    • View Profile
Re: How Change PHP config on secondary PHP?
« Reply #9 on: 2013-07-02, 11:41:22 »
I add below line to '/etc/suphp.conf' :
Code: [Select]
x-httpd-php52-myname="php:/home/httpd/mydomain.com/php5.fcgi"Then add 'AddHandler x-httpd-php52-myname .php' instead 'AddHandler x-httpd-php52 .php' inside .htaccess

New when I try to visit my site, browser prompts for download php page!
« Last Edit: 1970-01-01, 01:00:00 by Guest »
.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: How Change PHP config on secondary PHP?
« Reply #10 on: 2013-07-02, 19:43:52 »
Are you sure mod_suphp already installed?. Check with 'yum list installed mod_suphp'.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline WISTFUL

  • Senior Member
  • *
  • Posts: 247
  • Karma: +0/-0
    • View Profile
Re: How Change PHP config on secondary PHP?
« Reply #11 on: 2013-07-02, 22:42:40 »
# yum list installed mod_suphp
Code: [Select]
Loaded plugins: fastestmirror, priorities, protectbase, replace, security
Loading mirror speeds from cached hostfile
Excluding mirror: centos.copahost.com
Excluding mirror: mirror.de.leaseweb.net
 * base: centos.mirror.linuxwerk.com
Excluding mirror: mirror.de.leaseweb.net
 * extras: mirror.optimate-server.de
Excluding mirror: mirror.de.leaseweb.net
Excluding mirror: mirror.nl.leaseweb.net
 * kloxo-mr-epel: mirrors.n-ix.net
 * kloxo-mr-ius: mirrors.ircam.fr
Excluding mirror: centos.copahost.com
 * updates: ftp.plusline.de
base                                                     | 3.7 kB     00:00
extras                                                   | 3.4 kB     00:00
kloxo-mr-centalt                                         |  951 B     00:00
kloxo-mr-centosec                                        | 2.9 kB     00:00
kloxo-mr-epel                                            | 4.2 kB     00:00
kloxo-mr-ius                                             | 2.2 kB     00:00
kloxo-mr-ius/primary_db                                  | 126 kB     00:00
kloxo-mr-ius-centos5                                     | 2.2 kB     00:00
kloxo-mr-ius-centos5/primary_db                          | 124 kB     00:00
kloxo-mr-nginx                                           | 2.9 kB     00:00
kloxo-mr-release-neutral-arch                            | 1.9 kB     00:00
kloxo-mr-release-neutral-noarch                          | 1.9 kB     00:00
kloxo-mr-release-version-arch                            | 1.9 kB     00:00
kloxo-mr-release-version-noarch                          | 1.9 kB     00:00
kloxo-mr-varnish-3.0                                     |  951 B     00:00
updates                                                  | 3.4 kB     00:00
updates/primary_db                                       | 3.2 MB     00:00
0 packages excluded due to repository protections
Installed Packages
mod_suphp.x86_64         0.7.1-3.mr.el6         @kloxo-mr-release-version-arch

In kloxo control panel when I try select php-fpm_event + enable secondary again (click their update) get below error:
Quote
Alert: mod_fastcgi_update_failed
« Last Edit: 1970-01-01, 01:00:00 by Guest »
.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: How Change PHP config on secondary PHP?
« Reply #12 on: 2013-07-03, 00:29:25 »
Inform here content of /etc/httpd/conf.d/suphp.conf, /etc/httpd/conf.d/suphp52.conf and /etc/httpd/conf.d/php.conf
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline WISTFUL

  • Senior Member
  • *
  • Posts: 247
  • Karma: +0/-0
    • View Profile
Re: How Change PHP config on secondary PHP?
« Reply #13 on: 2013-07-03, 07:26:52 »
/etc/httpd/conf.d/suphp.conf
Code: [Select]
#This module not uninstalled but inactive.
#See /home/apache/etc/conf.d to find out 'original' this file
/etc/httpd/conf.d/suphp52.conf
Code: [Select]
### MR -- read /usr/local/lxlabs/kloxo/file/apache/conf.d/suphp.conf.original for full description ###

LoadModule suphp_module modules/mod_suphp.so

suPHP_Engine On

#AddHandler x-httpd-php .php
#AddHandler x-httpd-php .php .php4 .php3 .phtml

suPHP_AddHandler x-httpd-php
suPHP_AddHandler x-httpd-php52

DirectoryIndex index.php
/etc/httpd/conf.d/php.conf
Code: [Select]
#This module not uninstalled but inactive.
#See /home/apache/etc/conf.d to find out 'original' this file
« Last Edit: 1970-01-01, 01:00:00 by Guest »
.

Offline WISTFUL

  • Senior Member
  • *
  • Posts: 247
  • Karma: +0/-0
    • View Profile
Re: How Change PHP config on secondary PHP?
« Reply #14 on: 2013-07-04, 20:29:03 »
Quote from: "MRatWork"
On latest version of Kloxo-MR, php.ini for secondary php is inside '/home/apache/etc/suphp'. You can modified it.

Php.ini inside /usr/local/lxlabs/ext/php/etc for Kloxo-MR itself. Don't touch it.
So, If still you don't find it's solution, Can I modify '/home/apache/etc/suphp/php.ini' directly?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
.

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.086 seconds with 22 queries.

web stats analysis