Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


PHP Not recognized inside folder

PHP Not recognized inside folder

PHP Not recognized inside folder

I am having trouble getting a page to see any php. If I put the page in the root of the site - no problems, but inside a folder it ignores the code entirely.
Suspect that there need to be an inclusion to activate php inside the folder but have no clue on how to implement that. Searched online and see there is a possibility to edit the htaccess file inside the folder but the explanation did not include any type of example.
Your help is appreciated greatly.
Thanks Keith

RE: PHP Not recognized inside folder

How are you attempting to run the page with PHP inside the folder?

When placed inside the folder, does the file have execute permissions?

Phil AKA Vacunita
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech

RE: PHP Not recognized inside folder

I created a php message system using MYSQL on my host. I am trying to use it on a new host (that I have newly been asked to work on for a company I am associated with).
Rather then mix my multiple files with the Joomla system that is already in place, I placed all of my files in a folder on the root.

I typically have an include that points to the connection string and the pages are loading, but there is no indication of any php being read.. after seeing that I simple put and echo statement at the top of page.

CODE -->

echo "HI";
If the page is in the folder - nothing.. if I place it in the root the page executes the statement and stops loading as expected.

Sorry that I don't quite understand what you are saying as far as execute permissions.. Do you mean that I have to go the file manager and add execute permissions to the folder? If so I have done that in the past on my hosts and I am sure that I can do it here as well.

RE: PHP Not recognized inside folder

I did change the permission on the main folder. There were no parameter that included sub folders and file (at least as far as I can see with this host). The permission change did not change the function of the page. The identical page on the root works, the file inside the folder - nothing.

RE: PHP Not recognized inside folder

Check the root .htaccess file to see if it has any <files> directive that prohibit files extensions from being executed in some folders

The Joomla .htaccess file may also be redirecting your sub directory to somewhere or nowhere, test the status headers that your script URL returns.

Putting arbitrary files and folders in the document root of any CMS system can have unexpected results because of the global rewrites/redirects implemented by the CMS.


Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

RE: PHP Not recognized inside folder

I agree with Chris its more likely to do with how the Joomla system is handling the URL requests to folders off the root than PHP itself not running.

If there was an issue with PHP not running, you would at least see the text and code from the file in the browser. Since you see nothing, it suggests the file in the folder is not even being read.

Take a look at the .htaccess file in the root of the server if there is one. You may need to add a rule there for the folder you created to be properly redirected.



RewriteCond %{REQUEST_FILENAME} !\/foldername\/ 

Phil AKA Vacunita
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close