Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 26
  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    8

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

    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...ress/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. #2
    Member
    Join Date
    Jun 2007
    Posts
    8

    Default

    Oh and forgot to add, an example can be:

    http://artisticimpulses.com/pages/me.php

    Ignor the content!

  3. #3
    Member TechBrein's Avatar
    Join Date
    Jul 2006
    Posts
    17

    Default

    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. #4
    Member
    Join Date
    Jun 2007
    Posts
    8

    Default

    That didn't seem to work. My whole file is empty with just those two lines, is that right?

  5. #5
    Member
    Join Date
    Jun 2007
    Posts
    8

    Default

    would someone be able to post there whole php.ini file or .htaccess file?

  6. #6
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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. #7
    Member
    Join Date
    Jun 2007
    Posts
    8

    Default

    so why does my site display these things?

  8. #8
    Member
    Join Date
    Jun 2007
    Posts
    8

    Default

    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!
    Last edited by artisticimpulse; 06-13-2007 at 09:28 AM.

  9. #9
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by artisticimpulse View Post
    so why does my site display these things?

    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. #10
    Member
    Join Date
    Jun 2007
    Posts
    8

    Default

    I am talking to my host, what do they need to do?
    artisticimpulses.com
    aberrant@artisticimpulses.com

  11. #11
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by artisticimpulse View Post
    I am talking to my host, what do they need to do?
    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. #12
    Member
    Join Date
    Jun 2007
    Posts
    8

    Default

    Cool! Will tell me host now. Thanks for your help, your have been very helpful for me and my host!
    artisticimpulses.com
    aberrant@artisticimpulses.com

  13. #13
    Member jugo's Avatar
    Join Date
    Nov 2005
    Posts
    61

    Default

    Get a more knowlegable host.
    Game Servers, Website hosting and Dedicated Servers
    Freaks Network, Inc.

    Joomla Site Design and Modules
    http://www.mh2design.com

  14. #14
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2002
    Posts
    686
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    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
    Last edited by Snowman30; 07-17-2007 at 08:10 AM.

  15. #15
    Member
    Join Date
    Apr 2005
    Posts
    35

    Angry

    Quote Originally Posted by artisticimpulse View Post
    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...ress/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

    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

Similar Threads & Tags
Similar threads

  1. php.ini works in webroot but no subdirectories
    By section31 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-07-2009, 04:50 PM
  2. custom php.ini no longer works with PHP 5.2.8
    By Website Rob in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-07-2009, 06:30 PM
  3. Seperate PHP.ini file for a site.
    By rosewood in forum Data Protection
    Replies: 2
    Last Post: 08-27-2008, 09:00 PM
  4. Upgrade php 4.4.4 => 4.4.7 and allow_url_fopen no longer works
    By krisdv in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 07-16-2007, 04:32 PM
  5. PHP Version 4.4.2, register_globals ON php.ini no longer works!
    By sh4ka in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-02-2006, 04:06 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube