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. 2017-11-08, 00:02:39

Author Topic: php command line  (Read 1474 times)

0 Members and 1 Guest are viewing this topic.

Offline djscooby

  • Valuable Member
  • *
  • Posts: 119
  • Karma: +0/-0
    • View Profile
php command line
« on: 2013-09-03, 20:38:36 »
Hi Guys

How can i enable php command line , i have php53-cli installed but still not working for clients (using php53u fpm with apache+nginx proxy)?

Also MR is there any update on php(fpm version) disable functions per client ? cause using php-fpm is not possible for now (at least as i know+test) only by modifying php.ini and changes are for all clients..

Thanks in advance for you answers :)
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: php command line
« Reply #1 on: 2013-09-03, 21:54:08 »
Portions of php.ini able declare inside php-fpm configs for earch user/client.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline djscooby

  • Valuable Member
  • *
  • Posts: 119
  • Karma: +0/-0
    • View Profile
Re: php command line
« Reply #2 on: 2013-09-03, 23:13:19 »
Quote from: "MRatWork"
Portions of php.ini able declare inside php-fpm configs for earch user/client.

Thanks MR for answering

Can you please give an example ?
You mean i just copy what i need from php.ini inside /etc/php-fpm.d/CLIENT.conf ?

For example will  max-upload size and disable_functions
work inside php-fpm clients conf ?


Also any idea on php cli would be great, tried setting these paths for a client /usr/bin/php-cgi & /usr/local/bin/php but neither works...


PS: BTW Is there any problem today with the repos ? i get this error all day with yum :
Code: [Select]
http://centos.alt.ru/repository/centos/5/i386/repodata/repomd.xml: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: kloxo-mr-centalt. Please verify its path and try again
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: php command line
« Reply #3 on: 2013-09-03, 23:53:16 »
1. Copy '/usr/local/lxlabs/kloxo/file/php-fpm/tpl/php53-fpm-pool.conf.tpl' to ' /usr/local/lxlabs/kloxo/file/php-fpm/tpl/custom.php53-fpm-pool.conf.tpl'
2. Modified custom file to (let say set 'log_error' from 'on' to 'off' for certain client):

from:
Code: [Select]
...
php_admin_flag[log_errors] = on
...

to:
Code: [Select]
...
<?php
    
if ($user !== 'admin') {
?>


php_admin_flag[log_errors] = on

<?php
    
} else {
?>


php_admin_flag[log_errors] = on

<?php
    
}
?>

...

3. run 'sh /script/fixweb; sh /script/restart-web'

============
Note:
- Disable_functions not declare in php-fpm config that mean use declare in /etc/php.ini
- You can declare with 'php_admin_flag[disable_functions] = exec, shell_exec' (for example).
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: php command line
« Reply #4 on: 2013-09-03, 23:56:10 »
For running php command-line with different php.ini, use this command:
Code: [Select]
php -c <your fullpath of php.ini> -f <your php file>
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline djscooby

  • Valuable Member
  • *
  • Posts: 119
  • Karma: +0/-0
    • View Profile
Re: php command line
« Reply #5 on: 2013-09-04, 21:15:59 »
php_admin_flag[disable_functions] = exec,proc_show etc etc etc.. didnt work but gives config errors and php-fpm cant start,
 
Code: [Select]
php_admin_value[disable_function]
worked, strangely though even while phpinfo() shows that these functions are now enabed for the client they still they don't work!
I need to enable them inside php.ini

phpmaxupload and maxpostsize worked fine per client with this method , strange !


Thank you very much for the example , at least now i can define max_memory and max_upload per client :)

PS: Please have a look at kloxomr repos, "/centos.alt.ru/" is not working and yum dont work unless disabled...
« 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.03 seconds with 17 queries.

web stats analysis
 
Mirror created by MasterkinG32.CoM