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!

  • 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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.