Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

phpsuexec / php.ini / php_accelerator

Discussion in 'General Discussion' started by webignition, Mar 4, 2005.

  1. webignition

    webignition Well-Known Member

    Jan 22, 2005
    Likes Received:
    Trophy Points:
    I've had a good look round for answers to my query, but having found none I was hoping that someone had experienced the same issue and would like to offer some help.

    The situation is as follows. I'm was happily using the ioncube php accelerator and the continued to do so after enabling phpsuexec.

    However with phpsuexec enabled, as I'm sure everyone is aware, specific php configuration values can't be specified in .htaccess files and need to be put in a php.ini file placed in the same directory as the executing php script.

    For one site I'm building a few image editing scripts need access to more memory and need to be able to accept posted files of a moderately large size - ok, a maximum of 4 meg at present but this may change (upwards not downwards!).

    In the same directory as these php scripts execute, which happens to be the site's root, sits a php.ini file (e.g. containing nothing more than the required values to increase the memory limit, increase the maximum post size etc, and also set the include path. So far so good - everything is ticking over fine.

    Having noticed that there seemed to be very few php accelerator files lying around in /tmp - more precisely only one (when there once used to be plenty), I started wondering whether php accelerator was still doing its thing - checked in /usr/lib/php.ini and there were all the settings as I would have expected.

    But taking a look at the output of php_info(), I noticed that there was no reference to php accelerator and the path for php.ini was of the form /home/user/public_html/php.ini

    In order to get php_accelerator working again, I thought it would be no more tricky than adding the correct line(s) to the local php.ini file. But then I realised that this would be somewhat of a time consuming task since the site has many scripts in many directories all with their own php.ini to sort out the include path. As a guess I'd say there are about 40 php.ini's sitting around - not that many, but still enough to make me think that there is an easier way.

    I had previously assumed that, under phpsuexec, the global php.ini file would be used and then only the settings in local php.ini files would override those in global php.ini, with all other settings in the global php.ini being obeyed - now I'm not so sure that this is the case.

    My first question is then: under phpsuexec and with local php.ini files lying around here and there, are the settings in /usr/lib/php.ini still obeyed, or is only a local php.ini used and the global ignored?

    Assuming the answer to my first question is yes, is there any way of making use of both the global php.ini and a local php.ini?

    Or am I just stuck with having to update all of the local php.ini files as the /usr/lib/php.ini is being ignored?

    Thanks very much to anyone who can help!

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice