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
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,721
    Likes Received:
    186
    Trophy Points:
    143
    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
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,721
    Likes Received:
    186
    Trophy Points:
    143
    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
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,721
    Likes Received:
    186
    Trophy Points:
    143
    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
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,721
    Likes Received:
    186
    Trophy Points:
    143
    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
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,721
    Likes Received:
    186
    Trophy Points:
    143
    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...
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