Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

php includes not working after php update

Featured Replies

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?

Which version of Uniform Server did you perform the upgrade on?

 

All the best

Ric :rolleyes:

  • Author

Which version of Uniform Server did you perform the upgrade on?

 

All the best

Ric :rolleyes:

 

It's Version 4

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:

  • Author

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!

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:

  • Author

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!

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.