Jump to content
The Uniform Server Community

php includes not working after php update


babyewok
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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 best

Ric :rolleyes:

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

OK You have two options:

 

Add the following line to file: UniServer\udrive\www\.htaccess

AddType 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 .php

Change to

AddType application/x-httpd-php .html .htm .phtml .php3 .php

 

 

All the best

Ric :rolleyes:

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
 Share

×
×
  • Create New...