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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rcfearn
Forum Newbie
Posts: 2
Joined: Tue Sep 12, 2006 10:08 pm

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

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
rcfearn
Forum Newbie
Posts: 2
Joined: Tue Sep 12, 2006 10:08 pm

Post by rcfearn »

Thanks the .php5 extension forces the php5 module to fire up.

Cheers
Rob
Post Reply