reyjany Posted June 15, 2010 Share Posted June 15, 2010 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! Quote Link to comment https://forums.phpfreaks.com/topic/204872-php-running-properly-on-root-but-not-on-subfolders/ Share on other sites More sharing options...
trq Posted June 16, 2010 Share Posted June 16, 2010 That same code could not possibly produce that result. Post the actual code. Quote Link to comment https://forums.phpfreaks.com/topic/204872-php-running-properly-on-root-but-not-on-subfolders/#findComment-1072893 Share on other sites More sharing options...
myrddinwylt Posted July 10, 2010 Share Posted July 10, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/204872-php-running-properly-on-root-but-not-on-subfolders/#findComment-1084215 Share on other sites More sharing options...
PFMaBiSmAd Posted July 10, 2010 Share Posted July 10, 2010 It's most likely that the actual code was using a short open tag and was not being seen as php code. Quote Link to comment https://forums.phpfreaks.com/topic/204872-php-running-properly-on-root-but-not-on-subfolders/#findComment-1084232 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.