The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

User php.ini not working

Discussion in 'EasyApache' started by elfuzzo, Jul 11, 2017.

Tags:
  1. elfuzzo

    elfuzzo Registered

    Joined:
    Jul 11, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sydney, AU
    cPanel Access Level:
    Root Administrator
    Hi,

    I've checked out the "EA4 php.ini/local.ini behavior" thread at EA4 php.ini/local.ini behavior but I'm still a little confused.

    In order to get a WordPress website's downloads working correctly I had to enable allow_url_fopen in WHM using Software >> MultiPHP INI Editor - this got the downloads working, so I then disabled it (on the understanding that this is the global setting) and enabled the setting using MultiPHP INI Editor in the user's cPanel.

    But when I look at the phpinfo for that user's website it listed allow_url_fopen as being disabled (both Local Value and Master Value), even though it still shows as enabled in the user's MultiPHP INI Editor.

    So where is that setting likely getting overridden? I was of the understanding that a php.ini in the user's public_html directory could override settings with specified values created by the user's MultiPHP INI Editor... is this not the case?

    TIA
     
  2. Catalyst

    Catalyst Registered

    Joined:
    Apr 11, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    I'd love to know the same thing. Latest version, fresh install ... then threw on CloudLinux ... then removed it ... Nada.

    Realize it doesn't work with DSO... But it doesn't work with cgi, fcgi, or suphp either ...
     
  3. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    174
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    While editing the php.ini you need to make sure that you are editing the proper php.ini , it should be according to the version of PHP that is set to use for the website. e.g. if your website running on php 5.6 and you enabled some parameter with php.ini of php 7 then its not going to work. If you have suphp enabled then you can create an individual php.ini and allow the parameters there.
     
  4. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,399
    Likes Received:
    52
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    In the user's home directory inside the public_html list all the hidden files, there is a file .user* something and this is where you will see the change. Check it.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know which PHP handler is enabled for the version of PHP associated with this account? If it's suPHP, could you verify if the suPHP_ConfigPath directive is used in the account's .htaccess file?

    Thank you.
     
  6. Catalyst

    Catalyst Registered

    Joined:
    Apr 11, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    Any handler. And adding suPHP_Configpath results in a 500 Error. Suggestions?
     
  7. elfuzzo

    elfuzzo Registered

    Joined:
    Jul 11, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sydney, AU
    cPanel Access Level:
    Root Administrator
    Sorry for the delay in replying - I think my problem was I hadn't copied from the main PHP config first...
    I'll try this a bit later and let you know how I go.

    Catalyse - I too at some got an error using suPHP_Configpath in .htaccess, but mine said there wasn't MySQL support enabled (which I realise now was probably because the original PHP config file wasn't copied first).
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    You should only use this directive if you are using suPHP (it's not required, I was just checking to see if you were using it). The following document explains how this works:

    The cPanel PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation

    Could you let us know if this document helps?

    Thank you.
     
  9. Catalyst

    Catalyst Registered

    Joined:
    Apr 11, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    Actually, what's in that document doesn't make any sense at all (why should we have to do that, if we've already set php.ini in local.ini and customers have used the tool that's supposed to make it happen?). Regardless --- doesn't work. Not happening.

    Here's the thing: it used to work, same setup, different server (CentOS 6 vs 7).

    Just upgraded to cPanel 64.0-32 without any change.

    This is unnecessarily frustrating.
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hi @Catalyst,

    Would you mind providing the step-by-step instructions of the steps you are taking to make the modifications, as well as let us know the specific version of PHP and handler utilized on the account? I'll go through and attempt to reproduce the issue using the same steps to see what could be the problem.

    Thank you.
     
  11. Catalyst

    Catalyst Registered

    Joined:
    Apr 11, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    Seriously?

    Out of the box install, on CentOS 7. Go to site's Cpanel. Change remote_fopen. No change.

    Now, go a step further, read all of this documentation you have and try all of these workarounds ... and there's no difference.
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    This was brought up as part of internal case CPANEL-12426. The issue here is that "allow_url_fopen" is considered a global PHP configuration value, and thus enabling it on a per-domain basis isn't allowed when it's disabled in the global PHP configuration file.

    Thank you.
     
Loading...

Share This Page