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.

apache php problem

Discussion in 'EasyApache' started by ike, Sep 17, 2007.

  1. ike

    ike Well-Known Member

    Joined:
    Apr 22, 2003
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Last night i used apache upgrade to upgrade my php to 5.2.4 from 4.x and it all looked to work right but its not.

    if i go to a website on my server that used to run fine all i get is a file download pop upfor for an unknown file.
    if i click find from the popup it goes look for it at MS. and says this.

    Windows has the following information about this MIME type. This page will help you find software needed to open your file.

    MIME Type: application/x-httpd-php

    Description: UnKnown

    i searched everywhere in the forum before i posted here. It must be something small but for the life of me dont know and am wondering if anyone else has had this. I am assuming its a php error as any site with just plain jpgs or html load fine. even one guy has coppermine still working and loading but my main site is all php/flash.
    this is that part of http.conf

    AddHandler application/x-httpd-php .php .php4 .php3
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php-source .phps
    AddType application/x-httpd-php .phtml
    AddHandler cgi-script .cgi .pl
    AddType text/html .shtml
    AddType application/x-tar .tgz
    AddType text/vnd.wap.wml .wml
    AddType image/vnd.wap.wbmp .wbmp
    AddType text/vnd.wap.wmlscript .wmls
    AddType application/vnd.wap.wmlc .wmlc
    AddType application/vnd.wap.wmlscriptc .wmlsc


    should there be a php5 in there now im on php4? although i did try it with php5 and was the same thing.

    any help would be appreciated.

    thanks in advance
     
  2. ike

    ike Well-Known Member

    Joined:
    Apr 22, 2003
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    anyone got any ideas? any help would be great.
     
  3. rajesh_

    rajesh_ Active Member

    Joined:
    Oct 9, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Even i am getting same error. Any help plz.
     
  4. cPanelBilly

    cPanelBilly Guest

    Please open a support ticket for this issue.
     
  5. trevHCS

    trevHCS Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    69
    Likes Received:
    1
    Trophy Points:
    8
    I'm really clutching at straws here, but I looked on a working server with PHP5 and it's pretty similar, except it doesn't have that AddHandler line for PHP. Not entirely sure if that'll break anything, but might be worth commenting out and restarting Apache.

    Btw, when you rebuilt Apache, you did remember to tick the "PHP" box? It caught me out a couple of times when I couldn't figure why selecting PHP5 and various options didn't rebuild PHP. Then I realised it was unticked and that explained why Apache rebuilt in a couple of mins.

    Might be worth running php -v from the command line just to see what version it claims to have.

    Also I'd check there's nothing strange in any .htaccess files overriding things.


    Ours hasn't. I think that's if you want .php5 file extensions to be parsed by PHP.


    Edit: Or do as Billy suggested. Started replying to this about 2 hours ago. :)


    Trev
     
  6. PCZero

    PCZero Well-Known Member

    Joined:
    Dec 13, 2003
    Messages:
    526
    Likes Received:
    34
    Trophy Points:
    28
    Location:
    Earth
    Any feedback on this yet? I am having the eact same issue!
     
  7. PCZero

    PCZero Well-Known Member

    Joined:
    Dec 13, 2003
    Messages:
    526
    Likes Received:
    34
    Trophy Points:
    28
    Location:
    Earth
    DOH! I didnt realize that when you changed the PHP version number in WHM that the PHP check box became unchecked!
     
  8. DJ XtAzY

    DJ XtAzY Member

    Joined:
    Dec 23, 2006
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    I also have that error, where if u access a php file, it cause the browser to download the php file. The only way I can fix this is remove the

    Code:
    AddType x-httpd-php5 .php5 .php
    AddHandler x-httpd-php5 .php5 .php .php4 .php3 .php2 .phtml
    
    which was added to .htaccess after i perform the apache update

    But then i still get the errors in the error_log saying it cant find x-http-php5
     
  9. trevHCS

    trevHCS Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    69
    Likes Received:
    1
    Trophy Points:
    8
    With me it happened when I reloaded the previous config - for some reason it unchecks that and I guess can cause a bit of chaos. Easiest way to tell is if Apache rebuilds in about 2 mins then PHP hasn't installed as that takes about 15 - 20.


    DJ XtAzY - do you have the "AddType application/x-httpd-php .php" in your httpd.conf file or are you running 2 versions of PHP in which case I'd guess you'd need the x-httpd-php5 bit?

    Trev
     
  10. ike

    ike Well-Known Member

    Joined:
    Apr 22, 2003
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    to be honest i got mine semi working but just going through the update again. I dont think i changed too much. i did check the flash box for sure but now you mention it maybe the first time i selected on the new php i didnt have the php module box checked. i still have problems though. my php seems fine but i have a couple of webpages that use gallery and now theyre all internal 500 server errors. I am sure it must be one of those options i havent ticked. i assume you cant have the perl module and php together from what it says in brackets. This was the first time ive ever upgraded my apache/php so im completely lost as to what i should have installed with it and the list of options is long so ill just paste the options and what i checked = x and hopefully one of you guys see something i need for programs like gallery. any help would be so excellent.

    x Expires Module
    x Raise FD_SETSIZE to 16384 (System Wide)
    x Prevent Users from reading other webroots
    x Frontpage Module
    Gzip Module (experimental) (Version 1.3.26.1a)
    x Raise HARD_SERVER_LIMIT
    Perl Module (not required to run .cgi scripts/not compatible with php) (Version 1.29)
    x Php Module
    x Version 5.2.4
    x Bc Math
    x Calendar Support
    Curl (Version 7.15.3)
    Curl SSL Support (Version 2.8.30)
    Dom XSLT
    Exif
    x Flash
    x FTP
    GD (Version latest)
    GetText
    Iconv (experimental)
    Imap Module (Version 2004g)
    Java (must already be installed, or install will fail)
    Mb String
    Mcrypt (Version 2.5.7)
    Memory Limit (experimental)
    Mhash (Version 0.8.18)
    Ming Support (Not Recommended due to various problems) (Version 0.3beta1)
    x Magic Quotes
    MM Session Module (Version 1.3.1)
    x Mysql Module
    SNMP
    Openssl Support
    x Discard Path
    PDFlib (requires license for commerical use; see www.pdflib.com/pdffiles/PDFlib-Lite-
    x Pear
    Postgresql (will break 7.2.x or earlier, please make sure you have 7.3.x or later installed)
    Pspell Module
    Sablot XSLT [may cause problems with chili!asp]
    SafeMode
    x Sockets
    Use System Mysql
    x Track Vars
    Freetype Support
    Versioning
    WDDX
    XML RPC
    Zip
    x Zlib
    x PHP suEXEC Support
    x Report Build Errors to cPanel
    Reset Apache Config to Default (last resort)
    x Rewrite Module
    x Skip Apache Build if up to date
    x SSL Module (Version 2.8.30)
    x suEXEC Module
    Verbose Build (show configure and gcc output)

    I am sure i am the cause of my problems, any help with what boxes you check would be extremely appreciated, thanks in advance.
     
  11. rajesh_

    rajesh_ Active Member

    Joined:
    Oct 9, 2006
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Any fixes?
     
  12. trevHCS

    trevHCS Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    69
    Likes Received:
    1
    Trophy Points:
    8
    Ike - go back to it again and click "Load previous config" just to save you ticking things. Then make sure the PHP box gets selected.

    Ones I suspect you might need for this are:

    - GD (almost certainly)
    - GetText
    - Exif
    - Freetype
    - Zip (possibly)

    The one I'd be very careful about is "PHP suEXEC Support" as I've been warned in the past this can cause upsets. If you know you need it then leave this on, but otherwise I'd consider not enabling it. Not found an absolute answer to this yet.

    It's virtually guaranteed you'll need GD however as that does a lot of image stuff.

    As for the error500 - I'm assuming these aren't running from the cgi-bin? Might be related to having PHP suExec I guess - from what I've heard that can make it act a bit like Perl when it comes to errors.

    If that doesn't fix it, try looking in the error log in Cpanel (think it's under stats) and see if that gives any more clues.


    Edit: I probably wouldn't select "Skip Apache Build if up to date" as you want to force an update ideally to make sure everything gets reinstalled.

    Trev
     
Loading...

Share This Page