PHP Stopped working within my directory?

Discussion in 'PHP' started by timallard, Jan 10, 2008.

  1. #1
    Hello, im trying to install a php games arcade script.
    I imported the db and everythign, but it seems like ALL php isnt working within that directory.

    for example: timothyallard.com/agames its not rendering out anything but RAW php code...

    I checked and php works fine outside this directory...no idea..i need to get this site up asap...any ideas?

    I think it has something to do with GZIP maybe? not to sure or familiar with this err. all help would be greatly appreciated.

    thanks!
     
    timallard, Jan 10, 2008 IP
  2. Dr. XYZ

    Dr. XYZ Guest

    Messages:
    226
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try adding an .htaccess file within such directory with the following lines

    AddType application/x-httpd-php .php
    
    <Files index>
       ForceType application/x-httpd-php 
    </Files>
    
    Code (markup):
    ·​
     
    Dr. XYZ, Jan 10, 2008 IP
  3. timallard

    timallard Well-Known Member

    Messages:
    1,634
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    158
    #3
    thanks for the reply, but still not working...any other ideas?
     
    timallard, Jan 10, 2008 IP
  4. phpl33t

    phpl33t Banned

    Messages:
    456
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Is it for all scripts in the dir, or just the index? If just the index, make sure the whole file uploaded.
     
    phpl33t, Jan 10, 2008 IP
  5. timallard

    timallard Well-Known Member

    Messages:
    1,634
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    158
    #5
    all scripts in dir :/ im stumped...
     
    timallard, Jan 10, 2008 IP
  6. phpl33t

    phpl33t Banned

    Messages:
    456
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Wierd man. Try a different directory like /games or /arcade. Hard to say without being in there.
     
    phpl33t, Jan 10, 2008 IP
  7. timallard

    timallard Well-Known Member

    Messages:
    1,634
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    158
    #7
    when i change the directory to /agame it asks me to download a file.... WEIRD....any ideas?

    you have chosen to open... which is a:application/x-httpd-php
     
    timallard, Jan 10, 2008 IP
  8. phpl33t

    phpl33t Banned

    Messages:
    456
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hmmmm, better get your host to take a gander for you chief. This is strange.
     
    phpl33t, Jan 10, 2008 IP
  9. timallard

    timallard Well-Known Member

    Messages:
    1,634
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    158
    #9
    thanks for all the help tho! yea i think its time to give em a ring :/
     
    timallard, Jan 10, 2008 IP
  10. ausome

    ausome Peon

    Messages:
    97
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Hey Tim,

    What's showing in your error logs? Anything.

    Have you checked the permissions on the folder/files?

    I gather from what you said , it's just This Directory having a hissy fit and PHP is
    running fine everywhere else.

    It'll be something simple. Tis why its a bugga to fix!

    Was it uploaded as Binary or Ascii. That's caused grief in the past.

    That's about all I can think of.

    Let us know what it was.
    Cheers
    Tim
     
    ausome, Jan 11, 2008 IP
  11. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Your content is being served as "Content-Type: x-mapp-php4" and it should be "text/html" instead.

    Here's your full header for reference:

    HTTP/1.1 200 OK
    Date: Sat, 12 Jan 2008 05:29:44 GMT
    Server: Apache/1.3.33 (Unix)
    Last-Modified: Thu, 10 Jan 2008 17:31:40 GMT
    ETag: "14acfb0-7a3-4786567c"
    Accept-Ranges: bytes
    Content-Length: 1955
    Keep-Alive: timeout=2, max=200
    Connection: Keep-Alive
    Content-Type: x-mapp-php4
     
    Gordaen, Jan 11, 2008 IP
  12. timallard

    timallard Well-Known Member

    Messages:
    1,634
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    158
    #12
    thanks for all the help this is now resolved! I appreciate it all. I also changed the directory, as the link above has changed.
     
    timallard, Jan 12, 2008 IP