tomk358 Posted October 7, 2009 Report Share Posted October 7, 2009 I have a site that I'm trying to run locally with uniform server, and am having issues. For some reason I can't get my include() statements in php to work.They just come through as text, rather than get interpreted as php scripts.The includes are all .php files. I tried adding "allow_url_include = on" to both the php.ini file in my site's top directory,and adding it to the main php.ini, but neither worked. I tried running uniserver as a service, and as a process, that also didn't work. Any ideas? Quote Link to comment Share on other sites More sharing options...
Ric Posted October 7, 2009 Report Share Posted October 7, 2009 I am sure the helpful members will point you in the right direction. I am off to be bed. All the bestRic Quote Link to comment Share on other sites More sharing options...
kalpz Posted October 8, 2009 Report Share Posted October 8, 2009 Hi tomk358, Are you able to show me those two files? I'll be able to help you from a PHP viewpoint. ThanksKalpz Quote ATOMIC Web Hosting 2007 - 2011 Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail) E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/ Link to comment Share on other sites More sharing options...
tomk358 Posted October 20, 2009 Author Report Share Posted October 20, 2009 Ok, so I've got index.phpin the body of that document I have the following:<? include("topnav.php");?> Then I have topnav.php with just some text to test. When I view index.php on localhost through uniserver, it doesn't include the content from topnav.php, as it would on my ISP's webserver. Ideas? Quote Link to comment Share on other sites More sharing options...
Ric Posted October 21, 2009 Report Share Posted October 21, 2009 You are using short tags this has been disabled in Uniform Server to force users to be standards compliant! The line: include("topnav.php");?>Should be: <?php include("topnav.php");?> Uniform Server is not draconian hence you can enable short tags in php.ini Edit the three ini files:UniServer\usr\local\php\php.iniUniServer\usr\local\php\php.ini_delvelopment_nanoUniServer\usr\local\php\php.ini_production_nano Search for line: short_open_tag = OffChange to: short_open_tag = On I would recommend always use the long tag <?php format.Think about it, what happens if you move to an ISP that is standards compliant! All the bestRic Quote Link to comment Share on other sites More sharing options...
tomk358 Posted October 21, 2009 Author Report Share Posted October 21, 2009 Ah! Thanks so much. Quote Link to comment Share on other sites More sharing options...
kalpz Posted October 27, 2009 Report Share Posted October 27, 2009 Ah, I too should have known that! As soon as I get Uniform Server I turn on the short tags. Oh well, glad its solved! Quote ATOMIC Web Hosting 2007 - 2011 Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail) E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/ Link to comment 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.