|
-
October 6th, 2009, 08:54 PM
#1
How can I set PHP5 as default?
Hello all,
on the server machine I am working, there is for some unexplained reason both PHP4 and PHP5 installed. Actually, for PHP4, there is only the PHP4-core files as I saw in the administration panel. However, I have a script that has shown some errors when being executed via PHP4 but works ok when PHP5 takes over. My question is, is there a way to "tell" Apache that I want to use only PHP4? The weird thing is that there's only the php5_apache2 module installed, but when I write in a terminal :
,
I get:
Code:
PHP 4.3.10 (cli) (built: Apr 23 2005 04:10:27)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
and also, when I ran:
,
I get: but I can see that there is also there. And if I write:
, I get:
Code:
PHP 5.0.3 (cgi) (built: Apr 23 2005 08:18:44)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.3, Copyright (c) 1998-2004 Zend Technologies
Is there something in the Apache configuration file that I must change so that Apache will use Php5 only?
Thank you!
-
October 9th, 2009, 10:01 AM
#2
Re: How can I set PHP5 as default?
You can do it in two ways. I would suggest #1 first.
1. Edit your Apache configuration file (httpd.conf) to use PHP 5 instead of 4.
2. Create/Edit the root .htaccess file to default to PHP5.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|