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.

PHP.ini file, confusion? My site no longer works right?

Discussion in 'General Discussion' started by artisticimpulse, Jun 13, 2007.

  1. artisticimpulse

    Joined:
    Jun 12, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I own Artisticimpulses.com, and my host recently updated our version of PHP to PHP 5.2.2 and I have read everywhere that my php.ini file should have:

    allow_url_include = On
    &
    allow_url_fopen = On


    Displayed somewhere.

    Yet when I opened that file, it was empty, I also checked the .htaccess and yet that was empty as well. Because of this, this is what is displayed on my site when I open it:

    Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home2/artistic/public_html/index.php on line 1

    Warning: include(http://aberrant.artisticimpulses.com/wordpress/index.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home2/artistic/public_html/index.php on line 1

    Warning: include() [function.include]: Failed opening 'http://aberrant.artisticimpulses.com/wordpress/index.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/artistic/public_html/index.php on line 1


    Any idea what I need to put in my php.ini file? I am kind of new to this and its very confusing. Any help would be brilliant!

    Nathan
     
  2. artisticimpulse

    Joined:
    Jun 12, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
  3. TechBrein

    TechBrein Member

    Joined:
    Jul 31, 2006
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Open your .htaccess file and add the following lines:

    php_flag allow_url_fopen On
    php_flag allow_url_include On

    This should fix the issue, hopefully.
     
  4. artisticimpulse

    Joined:
    Jun 12, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    That didn't seem to work. My whole file is empty with just those two lines, is that right?
     
  5. artisticimpulse

    Joined:
    Jun 12, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    would someone be able to post there whole php.ini file or .htaccess file?
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    IIRC, the bug of users being able to create their own php.ini files to override the server's php.ini file was fixed by or before PHP version 5.2.2.
     
  7. artisticimpulse

    Joined:
    Jun 12, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    so why does my site display these things?
     
  8. artisticimpulse

    Joined:
    Jun 12, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I have tried finding a possible solution, yet I cant get anywhere?

    If someone was even kind enough to send me an email with their .htaccress and/or php.ini file attached, aberrant@artisticimpulses.com, and instructions on where to put it, then that would be grand. Because currently my site doesn't work!
     
    #8 artisticimpulse, Jun 13, 2007
    Last edited: Jun 13, 2007
  9. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator

    URL file-access is disabled in the server configuration in /home2/artistic/public_html/index.php on line 1


    That is likely because your server administrator/web hosting provider has disabled such functionality. You will need to contact them to enable such functionality on the server you are using.
     
  10. artisticimpulse

    Joined:
    Jun 12, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I am talking to my host, what do they need to do?
     
  11. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Two solutions:

    Easy (but not most secure) Solution: Have your web hosting provider enable allow_url_fopen in php.ini

    Better Solution: Don't use File I/O functions in PHP to handle data from external URLs. Refer to the PHP documentation at PHP.net on how you can do this.
     
  12. artisticimpulse

    Joined:
    Jun 12, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Cool! Will tell me host now. Thanks for your help, your have been very helpful for me and my host!
     
  13. jugo

    jugo Active Member

    Joined:
    Nov 23, 2005
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Get a more knowlegable host.
     
  14. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    i have actually noticed that allow_url_include is not included in php 5.2.3's php.ini file and allow_url_fopen does not work around this problem for everyone, and adding allow_url_include = on to the servers php.ini file will correct this, but of course at a risk of security
     
    #14 Snowman30, Jul 17, 2007
    Last edited: Jul 17, 2007
  15. Kimber

    Kimber Active Member

    Joined:
    Apr 16, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6

    Did you ever get your usr/lib/php:/usr/local/lib/php' error fixed? I am having the same problem and even with reading the forum am very very lost on what to do.

    Kimberly
     
  16. Frimon86

    Frimon86 BANNED

    Joined:
    Jun 4, 2007
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    This might help

    I could suggest maybe finding someone you can hire to manage your server or hirign a freelancer?? Did you try asking your host Kimberly?
     
  17. Kimber

    Kimber Active Member

    Joined:
    Apr 16, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6


    My .htaccess file says:


    Options All -Indexes
    AddHandler application/x-httpd-php .htm .html

    Where I am suppose to add or change to put in

    change in php.ini the line
    allow_url_fopen = On
    with
    allow_url_include = On
     
  18. Kimber

    Kimber Active Member

    Joined:
    Apr 16, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6

    1) I have a webhost I have contacted but I would still like to know if this is a cpanel or web hosting problem. Someone has screwed up here and I like to who because I have these php codes up for a very long time with no problem. Then all at once a problem...!

    2) I don't hire freelancers because everyone I have ever hired had ripped me off. They tell me they can do programming they can't do and normally mess stuff up more than the fix it.

    Right now I would like to know what the problem is so I can contact my web hosting company and says: "This is my problem and I need to get this fixed" but it doesn't do me much good if I can't find out what is wrong ( in english - not all us grew up with computers) then how so I can tell them what the problem is.
     
  19. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The issue you are experiencing is a PHP configuration issue, not a cPanel/WHM issue. Additionally, it is likely if your web hosting provider has upgraded to a later version of PHP such as 5.2.3 that some settings in your php.ini files are no longer being processed. This was a long-standing unintended functionality of PHP that was recently fixed.
     
  20. Kimber

    Kimber Active Member

    Joined:
    Apr 16, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6

    What do I need to have my web host make my php processing again?

    Thank you
    Kimberly
     
Loading...

Share This Page