Php version


#1

I’m not really a beginner, but then again I don’t mess with this backend stuff much. I’ve been told that my php version is not up to date and that this is something my server host should take care of. So, I guess my question is what do I do to get the updated version of php? I’ve done searches and haven’t found this topic here. I apologize if I’ve missed it somewhere.

thanks,
stef


#2

DreamHost presently has two major versions of PHP installed by default: PHP 4.4.7 and PHP 5.2.3. You can choose in the Control Panel which version of PHP your domain(s) will use, and you can have different versions set for different domains within your account.

That said, if you want to “upgrade” to a different version than either of those, you can install your won version of PHP as described in the DH Wiki (though this is considered by many to be somewhat challenging).

DreamHost allows you to do this, but will not offer support of any kind for such custome installations, so if you choose to install your own PHP, you are pretty much on your own (except for whatever help you can get here,m or from other “non-DreamHost” folks).

All that said, what version are you currently running, and what version are you being told you should be running?

–rlparker


#3

i’m using the 4.4.7 version and want the other version you mentioned. is the process of changing this dummy proof? lol. anyway, i’ll give it a shot and see what happens. thank you!


#4

To switch the php version, you can go to DH panel --> Domains --> Manage Domains --> Edit. Simply click the drop down menu and save changes.

Save $97 (MAX Discount) with code: [color=#CC0000]97YES[/color] Sign Up NOW or More Codes Here


#5

Actually, with the possible exception of some “old” scripts you might be running not liking PHP5 (such as relying on register_globals being set to on), updgrading your domain to use the “newer” PHP5 is very easy and painless.

Go to the Control Panel -> Domains -> Manage Domains, and click the “Edit” link under the “Web Hosting” column for the domain you want to work on. On the screen that follows, just use the “pull down” selector for “PHP version” (first thing on the page) to select PHP 5.2.x (should be either 5.2.2 or 5.2.3 - depending upon your server), and submit the change using the “Change fully hosted settings now” bottom at the bottom of the first section.

Give the change a “few minutes” to take effect and you are done. That’s it! :slight_smile:

–rlparker


#6

I changed it. thank you very much!!!


#7

Oops! Sorry about chiming in “late” with that “what he said” post - I was typing when you were and I got distracted. I didn’t realize you had answered already when I submitted my post. :wink:

–rlparker


#8

You are welcome, and it’s good to hear you have it working! :slight_smile:

–rlparker


#9

Your comment is always clearer :stuck_out_tongue:

Save $97 (MAX Discount) with code: [color=#CC0000]97YES[/color] Sign Up NOW or More Codes Here


#10

I tried the installation, but it ended up installing it in my shell account instead of my web directory. Any tips?

Update: I think I found it. I created a new shell account (as the wiki suggested) instead of just giving my existing username the shell access.

I’ve changed that now and I’m going through the install again. Hopefully with better results.

Last update: Yup, that was it. Don’t create a new shell account.


#11

You can choose and switch between PHP4 and PHP5 easily via Dreamhost CP.

O97 - $97 off
[color=#00CC00]Another hosting I recommend.[/color]


#12

Guess what?

I checked in my dreamhost control panel (domains -> manage domains -> gurusfeet.com -> edit) the version of PHP and it is 5.2.2, I even explicitly saved the settings with the 5.2.2 selected in the PHP version field.

BUT:

when I run from the shell of that server the command “PHP -v” I get that the version is 4.4.7

I checked it also with the command “curl -I http://www.gurusfeet.com” and got the same 4.4.7 version.

Have I missed something? or maybe Dreamhost missed something…:slight_smile:


#13

Try:

/usr/local/php5/bin$ /usr/local/php5/bin/php -v
PHP 5.2.3 (cli) (built: Aug 21 2007 17:24:23)
Copyright © 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright © 1998-2007 Zend Technologies
with Zend Extension Manager v1.2.0, Copyright © 2003-2006, by Zend Technologies
with Zend Optimizer v3.2.2, Copyright © 1998-2006, by Zend Technologies

After you saved your settings, did you wait a while before running your curl test? It takes several minutes for the update to take effect.

–rlparker


#14

I did