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.

How this happen know everyone can download .php file from WWW

Discussion in 'General Discussion' started by cLub2Share, Jul 11, 2005.

  1. cLub2Share

    cLub2Share Well-Known Member

    Joined:
    Oct 4, 2003
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    united Arab Emirates
    cPanel Access Level:
    Website Owner
    Twitter:
    Hello

    i try to upgrade today to php5 and when i go to check one of the site we have in the server i find that user can download any php file from WWW how this happen .. i just go head and Disbled the site unitel we get this fix it is easy someone download the configfile .. i hope someone have the answer.

    thankyou
     
  2. wmoore025

    wmoore025 Active Member

    Joined:
    Jul 3, 2005
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    I don't know if this will pertain to anything since, it happened when u upgraded,,

    In Whm try and check your Php open_basedir Tweak Settings

    Best of luck to you, i havent upgraded to 5, yet...
     
  3. euselect

    euselect Well-Known Member

    Joined:
    Aug 3, 2003
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Hi there,

    PHP scripts ( source ) being displayed or downloaded by the user is the side effect of not have PHP compiled into apache ( or apaches config not recognising that PHP is installed ) .

    Either way, the webserver does not know what to do when it serves the PHP file so it offers it for download or display. It does not understand that it should parse the webpage using PHP.

    I am not sure how you rebuilt apache, but you may not have noticed the build error that should have been displayed as it rebuilt ?

    In order to resolve this, i would suggest that you recompile apache with php 4.x ( whatever you upgraded from to version 5 ) to return to your previous functioning config.
    And then, if at all possible do a test build of apache/php5 on a spare / test machine. Verify the results are good before rebuilding your live servers.


    HTH

    Cheers

    Neil
     
  4. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    i been seeing this.

    do this:

    wax the cpapache folder in /home

    then:

    cd /usr/lib/mysql
    rename .a .a_old *.a
    rename .la .la_old *.la

    rebuild apache in WHM with php5 when done do this


    cd /usr/lib/mysql
    rename .a_old .a *.a_old
    rename .la_old .la *.la_old

    restart things a couple times .. make sure they work.
     
  5. Tre

    Tre Registered

    Joined:
    Jul 17, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I'm getting the same problem while trying to upgrade from PHP 4.4 to 5.04.

    Someone please help!

    Thanks
     
Loading...

Share This Page