Page 1 of 1
PHP 5 on my server.
Posted: Fri Aug 10, 2007 1:46 pm
by JellyFish
I called my hosting provider and they said I am able to use PHP 5 rather then PHP 4, which I'm using.
But, in order to do this they said I need to use an htaccess file to notify my server that I would like to use php 5 as my default version.
How could I do this with an htaccess file, or is there any other way for me to set php 5 as my default version? I'm on a shared hosting server so I would be restricted to some things.
Thanks in advance.
Posted: Fri Aug 10, 2007 1:49 pm
by thiscatis
add this
AddType x-mapp-php5 .php4
or
AddType x-mapp-php5 .php
not sure
try

Posted: Fri Aug 10, 2007 1:56 pm
by JellyFish
I tried both of them then looked at my phpinfo file. It still states 'PHP Version 4.3.11'.

Posted: Fri Aug 10, 2007 2:00 pm
by thiscatis
That's possible, they only make sure the PHP files are actually parsed by the PHP5 engine.
It works on my server.
Posted: Fri Aug 10, 2007 2:01 pm
by thiscatis
what does this give you
Code: Select all
<?php
class BaseClass {
function __construct() {
print "In BaseClass constructor\n";
}
}
class SubClass extends BaseClass {
function __construct() {
parent::__construct();
print "In SubClass constructor\n";
}
}
$obj = new BaseClass();
$obj = new SubClass();
?>
Posted: Fri Aug 10, 2007 2:03 pm
by JellyFish
thiscatis wrote:That's possible, they only make sure the PHP files are actually parsed by the PHP5 engine.
It works on my server.
Then why does my php version say PHP 4?
EDIT:
Code: Select all
<?php
class BaseClass {
function __construct() {
print "In BaseClass constructor\n";
}
}
class SubClass extends BaseClass {
function __construct() {
parent::__construct();
print "In SubClass constructor\n";
}
}
$obj = new BaseClass();
$obj = new SubClass();
echo $obj->__construct();
?>
returns:
Code: Select all
In BaseClass constructor In SubClass constructor
But what does that mean?
Posted: Fri Aug 10, 2007 2:09 pm
by thiscatis
It means you can now use PHP5 features.
Posted: Fri Aug 10, 2007 2:33 pm
by JellyFish
thiscatis wrote:It means you can now use PHP5 features.
Is it? grEAT! But does this mean that I can use the built-in cURL library?
Posted: Fri Aug 10, 2007 2:42 pm
by superdezign
JellyFish wrote:Is it? grEAT! But does this mean that I can use the built-in cURL library?
Wasn't cURL built into PHP 4...?
Posted: Fri Aug 10, 2007 2:44 pm
by John Cartwright
cURL is php4, yes.
Posted: Fri Aug 10, 2007 2:46 pm
by JellyFish
superdezign wrote:JellyFish wrote:Is it? grEAT! But does this mean that I can use the built-in cURL library?
Wasn't cURL built into PHP 4...?
Well, according to Tech Support, I need cURL 7.11. He also said that PHP 5 would have the right version.
Posted: Fri Aug 10, 2007 5:03 pm
by John Cartwright
So whats the problem?
Posted: Fri Aug 10, 2007 6:38 pm
by JellyFish
Jcart wrote:So whats the problem?
Well, does php 5 compiler have cURL 7.11?
Posted: Sat Aug 11, 2007 3:37 am
by volka