Results 1 to 7 of 7

Thread: PHP wont run in some directories

  1. #1
    Registered
    Join Date
    Nov 2007
    Location
    tampa, fl
    Posts
    11
    Rep Power
    0

    PHP wont run in some directories

    Hi,

    PHP won't run in some of my directories. I put in a "test.php" file, I get an internal server error message. I rename the file to "test.html" and it works fine (I used only html for testing purposes).

    It works in my /htdocs/ directory and one directory above. Other than that it doesnt work.

    not sure if it is an issue with .htaccess or php.ini or what.

    Any ideas?

    Thanks!

  2. #2
    Registered
    Join Date
    Nov 2007
    Location
    tampa, fl
    Posts
    11
    Rep Power
    0
    Seems like it won't run any deeper than 2 subdirectories in. After 3 directories in it seems to stop working?

  3. #3
    target='_blank' snowmaker's Avatar
    Join Date
    Nov 2002
    Location
    Not in Solomons anymore.
    Posts
    3,442
    Rep Power
    21
    It should only work properly in htdocs or subdirs below (within) that, it shouldn't work at all in a directory above or at the same level as htdocs. What is the content of the file? I'll create a similar file and test it myself.
    Last edited by snowmaker; 1-10-17 at 10:28 PM. Reason: added 'same level as'
    -bruce /* somdcomputerguy */
    'If you change the way you look at things, the things you look at change.'

  4. #4
    target='_blank' snowmaker's Avatar
    Join Date
    Nov 2002
    Location
    Not in Solomons anymore.
    Posts
    3,442
    Rep Power
    21
    I've just created a PHP file with only one echo command. The file is 5 subdirs below htdocs.

    See it here - http://somdcomputerguy.com/subdir1/s...bdir5/test.php

    The file itself looks like this, and has a 644 permission level.
    PHP Code:
    <?
      
    echo "I am working!";
    ?>
    -bruce /* somdcomputerguy */
    'If you change the way you look at things, the things you look at change.'

  5. #5
    Registered
    Join Date
    Nov 2007
    Location
    tampa, fl
    Posts
    11
    Rep Power
    0
    Weird. I renamed the folder and it is working now.

    I think something got messed up when I "renamed" the folder from uppercase to lowercase.

    I'll leave it at the new name for now.

    Thanks!

  6. #6
    target='_blank' snowmaker's Avatar
    Join Date
    Nov 2002
    Location
    Not in Solomons anymore.
    Posts
    3,442
    Rep Power
    21
    You bet bud. Glad you got it working.
    -bruce /* somdcomputerguy */
    'If you change the way you look at things, the things you look at change.'

  7. #7

    Join Date
    Nov 2001
    Location
    Louisiana
    Posts
    611
    Rep Power
    16
    If I remember correctly, php is case sensitive with file names but html is not. I try to always use lower-case names for all php files and pictures.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •