how to switch to php5 in ps

how to switch to php5 in ps

Posted by: patricktan
Posted on: 2009-05-30 02:28:00

I must have missed something. I thought DH had already started using php5 in all the servers. But php -v shows PHP 4.4.9 in private server.

If I am not wrong, I remember somebody mentioned that DH private server is running php4. But it seems that php5 is already installed in private server. I am wondering whether there is a quick way to switch to php5 in private server.

Re: how to switch to php5 in ps

Posted by: sdayman
Posted on: 2009-05-30 06:04:00

That's just what's first found on the command line due to path settings. Try creating a .php file on your site with the following:

<?php 
echo phpinfo();
echo "\n";
?>


And then load that page in your browser. It'll show what version of PHP your site is running, and what its current PHP settings are.

-Scott

Re: how to switch to php5 in ps

Posted by: sXi
Posted on: 2009-05-30 18:14:00

php -v will echo the CLI version.

Defaults are CLI=PHP4 - CGI=PHP5




How To Install PHP.INI / ionCube on DreamHost

Re: how to switch to php5 in ps

Posted by: patricktan
Posted on: 2009-05-31 00:37:00

Thank you for replies.

phpinfoI() shows PHP Version 5.2.6.

But one of my script complains that Call to undefined function: stream_get_line(). It is a php5 function.

I can manually set path to php5 bin directory to execute the script like /usr/local/php5/bin/php myscript.php but I don't think that is the right way of doing that.

What else did I miss?

Re: how to switch to php5 in ps

Posted by: sXi
Posted on: 2009-05-31 16:58:00

Manually setting the path should work fine wink




How To Install PHP.INI / ionCube on DreamHost

Re: how to switch to php5 in ps

Posted by: patricktan
Posted on: 2009-06-01 02:12:00

I'll do that for now.

Thank you for the help

Tags: private serverfree domainsservers