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!

PHP Options vs php.ini

Discussion in 'EasyApache' started by Ishware, May 3, 2018.

  1. Ishware

    Ishware Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    193
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Panama City, FL
    cPanel Access Level:
    Root Administrator
    In PHP Options for a site, I have selected 7.2 and have set post_max_size and upload_max_filesize to 1G. After some trouble with a Wordpress theme, the theme tech support fixed the issue by putting a php.ini in the public root consisting of setting the two above options to 256MB.

    …shouldn't my PHP Options already handle this? And yet, their solution fixed the problem.

    What am I missing here? o_O
     
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,855
    Likes Received:
    135
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello @Ishware

    The only reason I can think of that it wouldn't have reflected the new value is if there was a php.ini, local.ini or .user.ini in the document root for the domain which was superseding the global values added for the PHP 7.2 php.ini file. Where exactly did you change the values originally?

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Ishware likes this.
  3. Ishware

    Ishware Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    193
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Panama City, FL
    cPanel Access Level:
    Root Administrator
    Note: The problem appears to have been resolved. But more details because I failed to give them:

    I completely failed to mention I'm running CloudLinux+CageFS, I'm sorry. I keep forgetting not everyone's using it. d'oh

    A while ago¹ I set the default PHP 7.2 options to long execution times and large upload limits just because that works well on my server. Most definitely since that time, it's worked because my main client keeps running into Wordpress upload limits because I keep forgetting to set new domains to use PHP 7.2; but doing so solves the problem.

    What's weird about this is that about a week or so ago when she noticed the problem, I tested on other Wordpress sites and the problem appeared to be on all Wordpress sites using Divi — so she opened a ticket with Divi, who solved it by putting a php.ini with just the two lines from my first post inside the public root of one of the sites.

    I definitely haven't added php.ini, local.ini, or user.ini to the document root anywhere.

    I just tested again on a site that I haven't touched and… it works again. So who knows?

    _____________________________________
    ¹ Like 2-3 months ago, if not more
     
  4. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,855
    Likes Received:
    135
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Ishware

    are you using alt-php or ea-php? Not that it should make a huge difference but if you're modifying those values in the multiphp ini editor and modifying ea-php72 not alt-php72 it could be the cause of the issue as well. I'm just speculating at this point though because without access to the server it's difficult to determine why it's not being referenced. It could be that divi was looking for a local .ini file as well.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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