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 and apache problems

Discussion in 'EasyApache' started by FearlessG1, Sep 10, 2006.

  1. FearlessG1

    FearlessG1 Active Member

    Joined:
    May 5, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    arg! i have been attempting to fix my problems non stop for about 3 days now and i finally broke down and need to ask for help. it started a couple days ago when none of my hosted site domains names would work, but the ip address would. i did the bind fix and all was well. i also upgrades my kernel and went from centos 4.3 to 4.4. i then got brave as everything i was doing was going great, and i upgrade to apache 2. what a mistake! it was been downhill from there. i have rebuilt apache countless times, i though my backups were making backup of everything including whm and all but it appears i was mistaken as i cannot find a way to rollback my entire whm/apache and all other system settings. i have zend installed as i use modernbill for billing, i was using php 5.1.4, when i did the apache upgrade i told it to upgrade php to 5.1.6 . at first the apache builts were not working because i had changed a username earlier in the week and whm did not make the changes in the httpd.conf file so i had to go in there and manually make the changes. now the apache was building but things were all screwed up still, i had to go in httpd.conf and make a bunch of changes just to get apache to startup (using the httpd.conf configtest i was able to tell what needed to be changed). well needless to say i still have problems. i gave up on apache 2 and went back to apache 1.3.37 (i had 36 installed before starting all this) and tried to put php bag the way it was. since the new easyapache in whm is WAY more complicated than it used to be, i dont know which settings to enable or disable when it comes to apache, but the php part of it i understand. i downgraded to cpanel current install from edge, which gave me the friendly looking whm apache upgrade screen again and built it with the correct settings. site still did not work, i went back to edge, and it still doesnt work. when i go to my site the browser is trying to download the php files. i have csf installed and have gotten a couple hundred emails saying lfd: Suspicious process running with the body : Time: Sun Sep 10 10:18:33 2006
    PID: 14519
    Account: nobody
    Uptime: 63 seconds


    Executable:

    /usr/local/apache1/bin/httpd (deleted)


    Command Line (often faked in exploits):

    /usr/local/apache/bin/httpd -DSSL under user nobody

    im lost, frustrated and have no idea where to turn. please help!
     
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    This may be risky but after 3 days, yikes, I can't imagine this would hurt anything further.

    Try a rebuild and check the box that says
    Reset Apache Config to Default (last resort)

    Be sure you do have things backed up. First I would go through the httpd.conf backups and save a copy from the last working version pre apache2.

    I did this for a client that was in the a situation like you and Things were back running fast and easy on their high traffic site.
     
  3. FearlessG1

    FearlessG1 Active Member

    Joined:
    May 5, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    heres what i got

    Code:
    Saving configuration...
    Building configuration...
    
    **** Building Apache 1 **
    
    ---- --
    Running Adding --enable-sockets support...
    
    	to config options...
    End Adding --enable-sockets support
    ---- --
    
    ---- --
    Running Adding --enable-bcmath support...
    
    	to config options...
    End Adding --enable-bcmath support
    ---- --
    
    ---- --
    Running Adding --with-mysql support...
    
    	to config options...
    End Adding --with-mysql support
    ---- --
    
    ---- --
    Running Adding --enable-magic-quotes support...
    
    	to config options...
    End Adding --enable-magic-quotes support
    ---- --
    
    ---- --
    Running Adding --enable-calendar support...
    
    	to config options...
    End Adding --enable-calendar support
    ---- --
    
    ---- --
    Running Adding  --with-pear=/opt/pear support...
    
    	to config options...
    End Adding  --with-pear=/opt/pear support
    ---- --
    
    ---- --
    Running Adding --enable-discard-path support...
    
    	to config options...
    End Adding --enable-discard-path support
    ---- --
    
    ---- --
    Running Adding --with-zlib support...
    
    	to config options...
    End Adding --with-zlib support
    ---- --
    
    ---- --
    Running Adding --enable-ftp support...
    
    	to config options...
    End Adding --enable-ftp support
    ---- --
    
    ---- --
    Running Adding frontpage...
    
    	Preparing Server for FP...
    	to static mods...
    End Adding frontpage
    ---- --
    
    ---- --
    Running PHP 5 support...
    
    	adding to "do in src tree" list...
    End PHP 5 support
    ---- --
    
    ---- --
    Running Webroot protection...
    
    	setting it up...
    
    Done!
    
    End Webroot protection
    ---- --
    
    ---- --
    Running Apache 1 httpd core...
    
    	Setting up SSL...
    		Building mod_ssl..
    
    Done!
    
    		Done Building mod_ssl
    	Applying patches if any...
    Setting /home permissions to 0711......Done
    Setting permissions for.....fearless...duclaw...rvadmin...adam222...charity...lmunns......Done
    
    Done!
    
    Done!
    
    Done!
    
    Done!
    
    	Doing module tasks that require apache source...
    			./configure
    			--with-apache=/home/cpeasyapache/work/cPanelEA/Apache1.pm.build/apache_1.3.37
    			--with-libxml-dir=/opt/xml2/
    			--enable-sockets
    			--enable-bcmath
    			--with-mysql
    			--with-mysqli
    			--enable-magic-quotes
    			--enable-calendar
    			--with-pear=/opt/pear
    			--enable-discard-path
    			--with-zlib
    			--enable-ftp
    
    Done!
    
    Done!
    
    Done!
    
    	Configure Apache 1 source tree...
    		[easyapache] Building Apache 1 with:
    
    			--prefix=/usr/local/apache1
    			--logfiledir=/usr/local/apache/logs
    			--sysconfdir=/usr/local/apache/conf
    			--enable-suexec
    			--suexec-logfile=/usr/local/apache/logs/suexec_log
    			--suexec-caller=nobody
    			--suexec-uidmin=100
    			--suexec-gidmin=100
    			--suexec-docroot=/
    			--suexec-userdir=public_html
    			--enable-module=so
    			--enable-module=ssl
    			--enable-module=rewrite
    			--add-module=../mod_frontpage.c
    			--activate-module=src/modules/php5/libphp5.a
    
    Done!
    
    	Making Apache 1...
    
    Done!
    
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf/ssl.crt) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf/ssl.crt) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf/ssl.crt) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf/ssl.crt) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf/) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    	Installing Apache 1...
    
    Done!
    
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf/ssl.crt) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf/ssl.crt) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf/ssl.crt) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf/ssl.crt) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf.1.orig/ssl.crt) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf.1.orig/ssl.crt) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf.1.orig/ssl.crt) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf.1.orig/ssl.crt) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 183.
    Copying a symlink (/usr/local/apache/conf.1.orig/) whose target does not exist at /usr/local/cpanel/Cpanel/cPanelFunctions.pm line 755
    Could not determine user for ServerName 26.198.232.72.reverse.layeredtech.com at /usr/lib/perl5/site_perl/5.8.7/Apache/Admin/Config.pm line 217
    httpd.conf SRC: 1 TRG: 1
    	Coercing apachectl...
    
    Done!
    
    	APXSing required mods...
    		adding module mod_auth_passthrough.c
    
    Done!
    
    		adding module mod_bwlimited.c
    
    Done!
    
    		adding module mod_log_bytes.c
    
    Done!
    
    End Apache 1 httpd core
    ---- --
    
    
    **** Done building apache 1, starting post run tasks **
    
    Cleaning up build directories...
    Done
    
    Done!
    
    /usr/local/apache/bin/apachectl restart: httpd restarted
    when i go to my website im still getting the download prompt to download the php file as well as when i go to my billing area, i am prompted to download a php file.
     
  4. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Ok, your php modules are probably not loading.
    check your httpd.conf to see if your php modules are either missing or commented out.

    If you saved a good working httpd conf, replacing that may be the only fix you need to get your php back quick and easy.
     
  5. FearlessG1

    FearlessG1 Active Member

    Joined:
    May 5, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    thanks for your assistance so far heres where i am, i downgraded to current on whm. then rebuilt apache in whm using php 5.1.6 with all of my desired settings. when i go to my site it still tried to download the php file. when i login to the client cpanel i am showing the following server info :

    Operating system Linux
    Service Status Click to View
    Kernel version 2.6.9-42.0.2.EL
    Machine Type i686
    Apache version 1.3.36 (Unix)
    PERL version 5.8.7
    Path to PERL /usr/bin/perl
    Path to sendmail /usr/sbin/sendmail
    Installed Perl Modules Click to View
    PHP version
    MySQL version 5.0.24-standard
    cPanel Build 10.9.0-CURRENT 5
    Theme cPanel X v2.5.0
    Documentation Click to View

    when i go to apache status in whm i am shown:
    Server Version: Apache/1.3.37 (Unix) mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
    Server Built: Sep 10 2006 21:38:29

    so it appears the apache version is not showing as the same on the whm as it is on the cpanel. also note that no php version shows up at all.

    i have attached my current httpd.conf file. thanks again for any and all help!!
     

    Attached Files:

  6. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Ok thanks for the config file...

    Just as I thought, your php modules are commented out. Find these lines in your config file,

    #LoadModule php5_module libexec/libphp5.so

    Remove the # to look like this

    LoadModule php5_module libexec/libphp5.so

    Also Find this line
    #AddModule mod_php5.c

    and again remove the # to look like this

    AddModule mod_php5.c

    then restart apache. Your php will probably work fine.
     
    #6 jayh38, Sep 11, 2006
    Last edited: Sep 11, 2006
  7. FearlessG1

    FearlessG1 Active Member

    Joined:
    May 5, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    i made those changes to the httpd.conf and i am still being prompted to download and i am still showing no php version when i login to client cpanel area. also, the site i had originally changed the username for does not load at all via the domain name.

    when i go to my site some pages come up with

    Warning: include(home.php) [function.include]: failed to open stream: Operation not permitted in /home/fearless/public_html/x.php on line 27

    Warning: include() [function.include]: Failed opening 'home.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/fearless/public_html/x.php on line 27

    and my modernbill products site comes up with:

    Warning: include(website_widget_creator.php) [function.include]: failed to open stream: Operation not permitted in /home/fearless/public_html/sales/billing/app-modernbill-order/products.php on line 47

    Warning: include() [function.include]: Failed opening 'website_widget_creator.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/fearless/public_html/sales/billing/app-modernbill-order/products.php on line 47


    im desperate :(
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    For the lfd issues, you can add the following to /etc/csf/csf.pignore to prevent it being triggered:

    exe:/usr/local/apache1/bin/httpd

    Then restart lfd.
     
  9. FearlessG1

    FearlessG1 Active Member

    Joined:
    May 5, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    thanks chirp
     
Loading...

Share This Page