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 include() problems

Discussion in 'General Discussion' started by gioppil, Nov 8, 2007.

  1. gioppil

    gioppil Registered

    Joined:
    Apr 8, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I have a server running apache 2.2 and php 5.2.4 which has been running fine for a while but suddently has started having problems with all php inclusion functions like include() require() ecc..

    All sites on the server are broken.

    I have notice wich all the include like for example include(config.php) are broken and return this error:
    Warning: require(includes/configure.php) [function.require]: failed to open stream: No such file or directory in /home/<user>/public_html/ecommerce/includes/application_top.php on line 29

    Fatal error: require() [function.require]: Failed opening required 'includes/configure.php' (include_path='/home/<user>/php') in /home/<user>/public_html/ecommerce/includes/application_top.php on line 29


    If i change in include statement with the full path like include(/home/<user>/public_html/includes/config.php) all work fine.

    I have tried to rebuild apache with a lot of different config but nothing change, same error.

    this problem is for all the sites on the server, yesterday all right... today disaster!

    why? what happen?
    how i can do for solve this problem?

    Thanks!
     
  2. 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
    How was PHP compiled? As an Apache module? SuPHP?

    One thing you might want to look at is what's generating that include path of /home/user/php?
     
  3. gioppil

    gioppil Registered

    Joined:
    Apr 8, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    This is my build

    on dir
    /usr/local/apache/conf/userdata/std/2/<user>
    called by httpd.conf

    i have the file cp_php_magic_include_path.conf one for every user on the server

    inside i find where is the strange include /home/<user>/php

    <IfModule concurrent_php.c>
    php4_admin_value include_path "/home/<user>/php:/usr/php4/lib/php:/usr/local/php4/lib/php"
    php5_admin_value include_path "/home/<user>/php"
    </IfModule>
    <IfModule !concurrent_php.c>
    <IfModule mod_php4.c>
    php_admin_value include_path "/home/<user>/php:/usr/php4/lib/php:/usr/local/php4/lib/php"
    </IfModule>
    <IfModule mod_php5.c>
    php_admin_value include_path "/home/<user>/php"
    </IfModule>
    <IfModule sapi_apache2.c>
    php_admin_value include_path "/home/<user>/php:/usr/php4/lib/php:/usr/local/php4/lib/php"
    </IfModule>
    </IfModule>

    I have replaced real username with <user>


    Thanks a lot :eek:
     
  4. firexit

    firexit Active Member

    Joined:
    Nov 4, 2004
    Messages:
    29
    Likes Received:
    1
    Trophy Points:
    8
    same here!

    hio..
    same prob when i upgraded the cpanel WHM ?
    how can it be solved?
    what is adding the /php to the include!??!
    10x
     
Loading...

Share This Page