Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    3

    Default php include() problems

    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. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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. #3
    Registered User
    Join Date
    Apr 2007
    Posts
    3

    Default

    This is my build

    Apache 2.2.6
    [info ↑] Access
    [info ↑] Actions
    [info ↑] Alias
    [info ↑] AuthnDefault
    [info ↑] AuthzHost
    [info ↑] Autoindex
    [info ↑] DIR
    [info ↑] Expires
    [info ↑] Mod FCGID
    fastcgi support
    Fileprotect
    Prevent Users from reading other webroots
    [info ↑] Frontpage
    [info ↑] Headers
    [info ↑] Log Config
    [info ↑] Mime
    [info ↑] Negotiation
    [info ↑] mod_proxy
    [info ↑] Setenvif
    [info ↑] Status
    [info ↑] UniqueId
    [info ↑] Userdir
    [info ↑] Mod Bandwidth
    v2.1 for Apache 1.3, v0.8 for Apache 2.x - see URL for details

    PHP 4.4.7
    [info ↑] Bcmath
    [info ↑] Calendar
    [info ↑] Exif
    [info ↑] FTP
    [info ↑] GD
    [info ↑] Imap
    [info ↑] Magic Quotes
    [info ↑] MailHeaders
    [info ↑] Mcrypt
    [info ↑] Mhash
    [info ↑] Mysql of the system
    compile mysql support against the system libraries (only option for PHP 4)
    [info ↑] PGsql
    Requires PostgreSQL 7.3 or higher to already be installed. You can do that with /scripts/installpostgres
    Safe PHP CGI
    prevents users from overriding system php.ini
    [info ↑] Sockets
    [info ↑] TTF
    [info ↑] Zlib
    Requires that zlib is installed and up to date

    PHP 5.2.4
    [info ↑] Bcmath
    [info ↑] Calendar
    [info ↑] Exif
    [info ↑] FTP
    [info ↑] GD
    [info ↑] Imap
    [info ↑] Magic Quotes
    [info ↑] MailHeaders
    [info ↑] Mcrypt
    [info ↑] Mysql
    compile mysql support against php bundled libraries (if the system mysql is checked it takes precedence of this option)
    [info ↑] Mysql of the system
    compile mysql (and mysqli if its checked) support against the system libraries
    [info ↑] PGsql
    Requires PostgreSQL 7.3 or higher to already be installed. You can do that with /scripts/installpostgres
    Safe PHP CGI
    prevents users from overriding system php.ini
    [info ↑] Sockets
    [info ↑] TTF
    [info ↑] Zlib
    Default PHP Version (.php files) 5
    PHP 5 Handler dso
    PHP 4 Handler none
    Suexec on
    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

  4. #4
    Member
    Join Date
    Nov 2004
    Posts
    30

    Default 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

Similar Threads & Tags
Similar threads

  1. PHP or include
    By msh100 in forum Themes and Branding
    Replies: 2
    Last Post: 06-29-2008, 05:32 PM
  2. Include Problems
    By ManXP in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-24-2007, 03:40 PM
  3. php include path
    By KarterJK in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-19-2004, 12:38 PM
  4. CGI/PHP include?
    By andy7t in forum Themes and Branding
    Replies: 1
    Last Post: 03-15-2004, 01:52 PM
  5. How can I recompile php to include GD
    By mvd in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-15-2003, 12:08 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube