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 files not executing

Discussion in 'General Discussion' started by deepak_k_rana, Dec 10, 2006.

  1. deepak_k_rana

    deepak_k_rana Member

    Joined:
    Nov 7, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Hello Cpanel,

    I am facing a wiered problem on my server, recently i upgraded my cpanel version. And also upgraded the PHP ver to 5.0 .

    Ever since after the upgrade, my php files on the server has stoped working..

    For example... www.abc-site.com/index.php

    if that is the link, instead of opening index.php the files starts downloading.
    Eventually the problem is arrising on all the sites i am hosting.

    Please help in looking to matter..

    Regards
    Deepak
     
  2. deepak_k_rana

    deepak_k_rana Member

    Joined:
    Nov 7, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Path to PERL /usr/bin/perl
    Perl modules Click to view
    Path to sendmail /usr/sbin/sendmail
    Apache version 1.3.36 (Unix)
    MySQL version 5.0.18-standard
    PHP version
    PHP info Click to view
    PERL version 5.8.7
    Operating system Linux
    Kernel version 2.4.21-47.0.1.ELsmp
    Machine Type i686
    cPanel version 10.9.0-STABLE-96
     
  3. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Rebuild Apache - Trust me on this, been there done that error more than once.
     
  4. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    try rebuilding apache, and uncheck the box which says to skip apache build if apache is up to date
     
  5. deepak_k_rana

    deepak_k_rana Member

    Joined:
    Nov 7, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Hello rhenderson & katmai

    Thanks very much for the suggestions.. Very much appreciated.

    Actually i had been trying to Rebuild Apache from WHM, Eventually it wasn't happening.

    Later on i tried through SSH

    Code:
    /scripts/easyapache
    Which worked finally for me.. and eventualy i am on Ver PHP 4.4.3 .

    Although Apache is still on Ver 1.3.36 . i was trying to upgrade it 1.3.37.

    But Unless my PHP is working I am happy. :)

    Regards
    Deepak
     
  6. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    It's not uncommon for the PHP compile portion of EasyApache to fail and either
    leave you with a non-working PHP binary or make the mistake of commenting
    out required configuration commands in your httpd.conf file.

    Per the former, I usually prefer to compile PHP manually for that exact reason
    and is very easy to do and is no more difficult than using Easy Apache and
    gives you a lot more control over your PHP installation.

    I actually wrote a simple PHP upgrade script that will upgrade your PHP all totally
    automatically using your current PHP options that you have installed now if
    anyone is particularly interested.

    Now regarding the latter, that's just a matter of opening up your httpd.conf file
    and making sure you still have the required "LoadModule" and related lines.
     
  7. Silver_2000

    Silver_2000 Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    338
    Likes Received:
    1
    Trophy Points:
    18
    Id love to see your script

    The WHM apache rebuild screwed up my server too ..
     
  8. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Yeah not much point recompiling apache when all you need is PHP
    and comping and installing PHP is really simple.

    Will have to talk more later though ---

    I just got back from dinner a few minutes ago and am going downhill
    very fast with a pretty nasty allergy reaction and debating whether to
    go to bed or the hospital at this moment. Just thought I'd try to
    keep myself awake though checking for messages but I think I better
    stop now and go lay down.
     
  9. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    i never use whm buildapache. used like 4 times, failed each time. anyway this might depend on the options each and everyone of us selects, nevertheless, there is the possibility that your net crashes and you might miss all the action.

    /scripts/easyapache always works like a charm. no need for any other scripts. i mean ... what's to be ? if rebuilding apache and select option to load previous config then press enter ... seems pretty straightforward to me.
     
  10. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Morning ...

    If you want to compile PHP manually, this should help ....

    The first thing you want to do is login to your server by SSH as root
    and change to the /usr/local/src directory (IE: cd /usr/local/src)

    Next, you will want to download the source for PHP and the following
    command will download PHP v5.2.0 as an example:
    Code:
    wget http://us3.php.net/get/php-5.2.0.tar.gz/from/us2.php.net/mirror
    
    Unpack the archive you just downloaded and then change to the
    directory of the source folder you unpacked ...
    Code:
    tar zcvf php-5.2.0.tar.gz
    cd php-5.2.0
    
    Now, to build PHP, you will generally just run the following commands:

    ./configure <<< with whatever options you want >>>
    make
    make test
    make install

    (Don't forget to restart Apache afterwards!)

    When only upgrading, you will probably want to use the same './configure' line
    as your original PHP that is currently installed. That line is displayed any
    time you view the output of any page using phpinfo() and you can
    cut and paste the ./configure line from that page.

    (OR) You can use the script below which basically does the same thing ...
    Code:
    #!/bin/bash
    IFS="$"
    
    /bin/bash <<EOF
    make clean
    $(php -i | grep "configure" | replace "'" "" | replace "Configure Command =>" "")
    make
    make test
    EOF
    
    echo "If build was successful, you can type 'make install' now to install ..."
    
     
Loading...

Share This Page