Can't allow_url_fopen turn on.

Discussion in 'Server Operation' started by czarekplpl, Oct 23, 2015.

  1. czarekplpl

    czarekplpl New Member

    Hello.
    On Centos 7 with Apache 2.4 and PHP 5.4 I would like to turn on allow_url_fopen
    In php.ini:
    Code:
    allow_url_fopen = On
    allow_url_include = On
    but it still looks like not eneabled.
    I use this test: tt.php
    Code:
    <?php
    $a = ini_get('allow_url_open');
    if ($a === true)
        echo 'allow_url_open is ON';
    else
        echo 'allow_url_open is OFF';
    
    And it shows:
    Code:
    allow_url_open is OFF
    I try Php 5.6 and the result is same.
    How to fix this problem?
     
  2. florian030

    florian030 Well-Known Member HowtoForge Supporter

    Better use the custom php.ini settings for the webdomain
     
  3. czarekplpl

    czarekplpl New Member

    I tryed to make file php.ini
    Code:
    allow_url_fopen = On
    and put this file in the website root directory and it also does not work.
    I have no idea where the problem is???
     
  4. gral

    gral Member

    Double check that you are modifying the correct php.ini , do a phpinfo and modify the php.ini you see at, Loaded Configuration File field , if you enable the function right there then must work.
    You can check the function status from phpinfo as well
     
  5. czarekplpl

    czarekplpl New Member

    How to definitely check if it works or not.
    I see in info.php that
    allow_url_fopen = On
    but my test file show OFF and I also cannot see the pictures on generated pdf.
     

Share This Page