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!

allow_url_fopen Does Not Change

Discussion in 'EasyApache' started by denverdataman, Jun 18, 2018.

  1. denverdataman

    denverdataman Active Member

    Joined:
    Jun 21, 2016
    Messages:
    32
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Denver
    cPanel Access Level:
    Root Administrator
    Hi,

    I have a site running on PHP 7.0.30 with EasyAache 4. I am trying to change the PHP value of allow_url_fopen to ON and cannot. I have tried using php.ini, .user.ini, .htaccess, and with ini_set () in my setting file for Drupal. None of it works. I have tried the same code in another server and it works fine. Does anyone have a "trick" for getting allow_url_fopen to work on a cPanel server?

    Thanks,
    Steve
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,551
    Likes Received:
    253
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello,


    Are you running PHP-FPM or CloudLinux's Alt-PHP on the server?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. denverdataman

    denverdataman Active Member

    Joined:
    Jun 21, 2016
    Messages:
    32
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Denver
    cPanel Access Level:
    Root Administrator
    Yes, I am running php_fpm.

    Thanks,
    Steve
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,551
    Likes Received:
    253
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Erdem Karabay likes this.
  5. denverdataman

    denverdataman Active Member

    Joined:
    Jun 21, 2016
    Messages:
    32
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Denver
    cPanel Access Level:
    Root Administrator
    Hl Lauren,

    I am sorry if I am missing something. I added that line to the .user.ini and ran the rebuild command but no change. Is there another place I should be putting the code?

    Thanks,
    Steve
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,551
    Likes Received:
    253
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @denverdataman

    I apologize if I didn't explain properly, changes made in the .user.ini for this are overridden by the php-fpm configuration if the setting exists, since this one does, you'd need to make the changes to the yaml file for php-fpm based on the instructions in the documentation I provided.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. denverdataman

    denverdataman Active Member

    Joined:
    Jun 21, 2016
    Messages:
    32
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Denver
    cPanel Access Level:
    Root Administrator
    Hi,

    If anyone is reading this in the future I am not sure this is how it should be but I found my fix. If you look at the documentation for PHP-FPM (Configurations Values of PHP-FPM - Version 68 Documentation - cPanel Documentation) allow_url_fopen should be on by default. I turned it on using the instructions provided for cPanel. This made no change. It was OFF in the php.ini file at /opt/cpanel/ea-php70/root/etc. Turning it on in the php.ini did the trick.

    This does nothing for explaining why trying to turn it on in any other place at the domain level did nothing.

    -Steve
     
  8. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,551
    Likes Received:
    253
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @denverdataman

    User level modifications will have no effect if it is disabled globally. So you can enable allow_url_fopen in
    /opt/cpanel/ea-php70/root/etc then disable it for specific domains but not the other way around.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Erdem Karabay

    Erdem Karabay Registered

    Joined:
    Aug 6, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Istanbul, Turkey
    cPanel Access Level:
    Website Owner
    Hi,

    Thank you so much for solved my big problem. I just signed up to say that..

    Grateful to you
     
  10. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,551
    Likes Received:
    253
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Erdem Karabay

    I'm really glad to hear that it helped and thanks for letting us know!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. SamL

    SamL Member

    Joined:
    Jul 30, 2018
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    Hi Lauren. I have the same problem as above but can't see where I should put
    php_admin_flag[allow_url_fopen] = on
    I do not know if I have fpm enabled.
    I have WHM, tried PHP ini editors for php 5.6 and 7.0, I have set allow_url_fopen to enabled, and restarted. Nothing happened.
    tried the same in cPanel nothing happened.
    Then searched my server for php.ini the highest level was at root level, when edting I have file generatored by
    cPanel MultiPHP INI Editor it doesn't have either allow url fopen on or off, its just not included even though I had set enabled in the MultiPHP Editor.
    I added
    php_admin_flag[allow_url_fopen] = on
    allow_url_fopen = on
    Nothing has changed.
    Whats the point in having it in the Multi PHP INI Editor if it doesn't do anything? How do I enable?

    Thanks
     
  12. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,551
    Likes Received:
    253
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    HI @SamL

    You can see if you have php-fpm enabled in MultiPHP Manager through WHM it should be displayed to the right of the domain name list at WHM>>Software>>MultiPHP Manager. If you're changing the setting for PHP versions and nothing is changing I would lean toward you having FPM enabled.

    Thanks!
     
    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