Technology TidBits

Answers to various technical questions on php programming, mysql, linux, and many more categories.



How can I force my php scripts to run php5 ?:
Last updated: 03/10/2010
Add comment
Votes: 0
Comments: 0
Some hosting providers are still using php 4 as their default for scripts, but offer php5 as well.  To force your scripts to all use php5, you can try adding this to a .htaccess file on your site:

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php


This tells the server to use php5 when it sees any .php extension on a file.  If it doesn't work, remove the lines from the file, and contact your hosting provider.

Other questions in this category:
What causes an Error 400 when running php on IIS?
Function to handle string substitution in php
What causes array problems with php from one host to another?
My php installation can't write to the Save Session Path - how do I fix it?
how can I output my php arrays in a readable html format using print_r?
How can I get mysql table definitions in my php script?
How can I execute commands on mysql using a php script?
How can I capture the contents of an included file?
How can I slash out a price to denote a sale price in html and php?
php session id keeps changing on every reload - how can I fix this?
How can I get php errors to show in the browser?
How can I keep leading zeros when building a CSV file?
When I try adding text to images in php, the color does not match what I want. How can I fix this?
How can I get bounced emails from my email CGI or PHP script?
How can I modify a script that relies on register globals being turned on?
Configuring htmleditor to do file uploads using php
How can I format my php print_r statements to be more readable in html?
How can I make a state drop down list for my forms?
Why doesn't ftp_connect work in my php script?
Why isn't my ioncube installation not working?
How can I remove strange characters from a string in php?
How can I test a portion of my php code without everyone seeing it?
How can I turn off the + / - that shows up in my oscommerce product listing?



Powered by KnowledgebasePublisher 1.1
Banner
Need a developer for your next project? Find a freelancer here.
Content provided by Roberts WebForge, Inc.