Page 1 of 1

Forcing php5 to run on a server that is running php4 & 5

Posted: Tue Sep 12, 2006 10:56 pm
by rcfearn
Hi,

I have come across a situtuation that I have never ever encountered before with a hosting provider that is running both php4 & php5 simultaneously.

My problem is that I am trying to implement a payment gateway system that requires the Curl & OpenSSL libraries in order for it to operate correctly.

The code at this point wont run on the host account, it will however run on several other accounts that I have with other providers. The host is question claims that they are only running Curl & OpenSSL under php5 and that I will need to change my code to force it to use the php5 module.

And so my question is...

How do I re-code a PHP script to explicitly force it to run using the PHP5 module?

is it as simple as changing the tags?

i.g. <php5 ?>

or renaming the file?

my_cart.php5

------------------------------------------------------------------------------------------------------

This is the second failed implementation of php script from reputable 3rd party payment gateways on this server and my first inclination is to simply switch to another host. I would like to try and avoid this as I have an SSL certificate with current host that I will have to set up again, a cost (of time and money) I would prefer to avoid if possible.


Thanks in advance

Rob

Posted: Tue Sep 12, 2006 11:00 pm
by feyd
What you need to do depends entirely on the host's set up. I would guess that they use .php5 for file extensions to be run under PHP 5. You may need to alter the code as well though. For instance, "var" is a deprecated keyword in favor of "public." Whether you need to alter the code is again dependant on the host's settings for PHP 5.

Posted: Tue Sep 12, 2006 11:37 pm
by rcfearn
Thanks the .php5 extension forces the php5 module to fire up.

Cheers
Rob