Jump to content

PHP running properly on root, but not on subfolders


Recommended Posts

Greetings,

 

I successfully (somewhat) installed Apache 2.2, PHP 5.32 and MySQL 5.1 on my local server. I added the following code to a test page:

 

 

<?php

echo "hello";

?>

 

And it works! But when I add the same code to a test page in a subfolder, it shows the following in the browser:

 

echo 'This is a test'; } mysql_close(); ?>

 

It seems that PHP will not run in any of the subfolders under htdocs. Please help!

Link to comment
Share on other sites

  • 4 weeks later...

I would check to ensure that caching is disabled in the server such as APC, Zend, etc.

 

Also, if you are using a template system such as Smarty, it could produce odd results if not used correctly.

 

As the Admin said, the code you quoted could not produce the message that you are seeing, so it must either be coming from another script, different code, or something that has been cached somewhere from another piece of code.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.