babyewok Posted November 13, 2009 Report Share Posted November 13, 2009 I just updated php to 5.2.9 so that it reflects the version running on my hosting account and it seems that I can no longer view my php includes (php parsed in HTML files). Upgrading php is all the I have done - the includes were working fine before. I can access a Prestashop shop that I have set up (uses php), so the php is running correctly. I don't know whether it is just php being parsed in html files that is no longer working or the php include function itself. Any ideas? Quote Link to comment Share on other sites More sharing options...
Ric Posted November 13, 2009 Report Share Posted November 13, 2009 Which version of Uniform Server did you perform the upgrade on? All the bestRic Quote Link to comment Share on other sites More sharing options...
babyewok Posted November 13, 2009 Author Report Share Posted November 13, 2009 Which version of Uniform Server did you perform the upgrade on? All the bestRic It's Version 4 Quote Link to comment Share on other sites More sharing options...
Ric Posted November 13, 2009 Report Share Posted November 13, 2009 Oops! I think I asked a silly question This page lists stables releases of 4-Series http://wiki.uniformserver.com/index.php/4....Server_releases Are you using one of these? Could you post some simple code that fails just makes it easier to isolate the problem All the bestRic Quote Link to comment Share on other sites More sharing options...
babyewok Posted November 13, 2009 Author Report Share Posted November 13, 2009 Thanks for your help. It is 4.0 and I upgraded php to 5.2.9-2. It seems to fail when I have an html page and just want to show a menu with a php include (worked fine before and I have tried a number of htaccess changes for parsing php): <?php include("php-includes/menu.php"); ?> It's just annoying because I upgraded php to resolve one problem and ended up causing another! Quote Link to comment Share on other sites More sharing options...
Ric Posted November 13, 2009 Report Share Posted November 13, 2009 OK You have two options: Add the following line to file: UniServer\udrive\www\.htaccessAddType application/x-httpd-php .html .htm Alternatively edit this file: UniServer\udrive\usr\local\apache2\conf\httpd.conf Locate this line: AddType application/x-httpd-php .phtml .php3 .phpChange to AddType application/x-httpd-php .html .htm .phtml .php3 .php All the bestRic Quote Link to comment Share on other sites More sharing options...
babyewok Posted November 13, 2009 Author Report Share Posted November 13, 2009 I thought I had already tried every htaccess option under the sun, but apparently not that one! Turns out that the particular site I was working on required AddHandler x-httpd-php .php .html .htm which uniserver didn't like. I changed it to the one you suggested and it works fine now. In fact I'm wondering if I've been slightly dappy and that the problem was actually that when the site went live, the server it was on didn't like the .htaccess file that worked in Uniserver, so I changed it. Obviously that then caused it not to work on Uniserver. I did do the php ugrade at around the same time, so I just blamed it on that! Oh well, thank you for helping me work it though! Quote 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.