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 doesnt work after apache upgraded to ver 2

Discussion in 'EasyApache' started by mehrdad abed, Jun 1, 2007.

  1. mehrdad abed

    mehrdad abed Well-Known Member

    Joined:
    Mar 18, 2006
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    16
    I've upgraded the apache to ver "2" using easyapache, but now my php files aren't run anymore and it just prompts me to download the php source file,anyhow I think the problem should be relied on file httpd.conf cause i don't find any php module includes there,

    I've rebuilt apache ver 2 along with different versions of php (4.4.6, 4.4.2, 5.1.4) several times but the problem persists,

    please help.
     
  2. eNetHosts

    eNetHosts Well-Known Member

    Joined:
    Apr 21, 2007
    Messages:
    195
    Likes Received:
    0
    Trophy Points:
    16
  3. gorilla

    gorilla Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    699
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney / Australia
    try compile apache 2 with php5.2.2 and if it still not working then just run
    /scripts/rebuildhttpdconf ;)
     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    You need to look at your httpd.conf file and see how PHP has been setup ...

    EasyApache often leaves the PHP module commented out when it shouldn't be
    and vice versa and that can cause your server to not recognize PHP code and
    try to download script files instead of executing them.

    Another cause is when PHP fails to compile because of bad options, etc.
    I've noticed many times in many installations where EasyApache failed to
    compile PHP correctly but then didn't have enough sanity checks to realize
    itself that the compile for PHP had failed leaving everything unfinished
    after EasyApache was done running.

    It is for this exact precise reason though that I generally recommend that
    everyone manually compile PHP and install it yourself and leave
    EasyApache to just deal with the Apache upgrade alone.

    It saves a lot of headaches doing it that way ...

    If you must use EasyApache to setup your PHP (don't know how, etc)
    then I would recommend that you keep the PHP options selected in
    EasyApache to an absolute minimum to what you really need and
    also don't select the "versioning" option either.
     
  5. eNetHosts

    eNetHosts Well-Known Member

    Joined:
    Apr 21, 2007
    Messages:
    195
    Likes Received:
    0
    Trophy Points:
    16
    We had a similar problem as noted in the linked post.

    Yesterday we tried the latest php upgrade build however apache didn't want to work with php.

    Tried to build to 5.2.2 today and it works fine :)
     
  6. trhosting.net

    trhosting.net Well-Known Member

    Joined:
    Mar 7, 2006
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Turkey
    Compiled PHP several times and tried /scripts/rebuildhttpdconf but still php doesn't work.

    We tried it on a fresh installed server that have only one trial account.
     
  7. mehrdad abed

    mehrdad abed Well-Known Member

    Joined:
    Mar 18, 2006
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    16
    please mind, it dosent work with php under 5.
     
  8. eNetHosts

    eNetHosts Well-Known Member

    Joined:
    Apr 21, 2007
    Messages:
    195
    Likes Received:
    0
    Trophy Points:
    16
    When you build, ensure it's building to 5.2.2 and not the default when you do upgrade Apache.
     
Loading...

Share This Page