Installing PHP 5.2


#1

Recently (i.e. two days ago) I contacted DH support in regards as to whether they’d be upgrading PHP 5 to 5.2 (which is the current stable release I believe).

They replied that they are thinking about it but will probably only be in a few months. I could wait that long, but there are a couple of new features that I would like to take advantage of.

So, they showed me the wiki page, http://wiki.dreamhost.com/index.php/Installing_PHP5#Compiling_a_Customized_PHP_5

Now, I don’t know anything about Unix systems or shells or any of that kind of stuff, but I did find those steps and the commands relatively easy to understand.

However, when I ran the “installscript”, it ended giving me long lines of code (something like -gcc DHAVE_CONFIG blablabla) and finishing with Killed (I’m not sure exactly what it was, but I’ll try again tomorrow and post it if it’s needed). I know the installscript is supposed to end with “---------- INSTALL COMPLETE! ----------”, so seeing as it didn’t I did not continue and merely removed the files and folders it created.

Anyone have any ideas what might be causing this?
I don’t want to contact support seeing as the wiki mentions support for those instructions is not provided by the DH tech support… :frowning:
If needed I’ll test it again tomorrow and post how it ends.
Thanks in advance.


#2

It sounds as though you have run into the “proc killer” that runs on Dreamhost to “kill” processes that take too much time to execute.

I have two suggestions that might help:

  1. Google for the nix command “nice”, which allows you to run processes at a lower priority, and consider using it to run your script.

  2. Break the single large script into smaller component pieces, and run the one at a time, in sequence, until you have completed the same steps as the single large script.

You are correct the DH support will not help with any of this, though there is some previous discussion in the forums about your situation and the “proc killer”. Good Luck!

–rlparker


#3

Thank you very much for your help.

I tried running it as: nice ./installscript
But it was still killed in the process:

[quote]./libtool: line 1: 26460 Killed gcc [lots and lots and lots of stuff (about 7 lines of it)]
make[2]: *** [xpointer.lo] Error 1
make[2]: Leaving directory /[removed this in case it violates any rules]/source/libxml2-2.6.27' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/[removed this in case it violates any rules]/source/libxml2-2.6.27’
make: *** [all] Error 2
[7up]$
[/quote]

I then tried running it in separate pieces and when I arrived at making libxml2 it gave me the exact same error as above >.<

Damn. Guess I’ll have to wait until DH decides to upgrade.

Thanks anyway :slight_smile:


#4

we are in the client side. I guess we can’t do anything :frowning:

Save [color=#CC0000]$97[/color] (max discount) on dreamhost by using promo code: [color=#CC0000]97CRAZY[/color].


#5

RazorIce,

From looking at your post, it seems you used nice with the default value (10). You might have better luck/success if you try it with the highest “niceness” of 19.

Check “man nice” or this thread for tips on options/parameter for using nice.

Just a thought. Good Luck!

–rlparker


#6

Okay, I ran it as nice -n 19 ./installscript
Everything too much longer to do… >.<
It’s still giving me that exact error.
It is something to do with libxml2. I don’t know which of the extensions I need. I would like to just have a setup exactly as it is now (DH PHP 5.1.2?) but with PHP 5.2.0
I’ll try to remove the libxml2 bits later.
Thanks a lot for the help :smiley:


#7

RazorIce,

I just learned something interesting hanging out on the Dreamhost IRC channel on Freenode:

Until yesterday (1/12/2007), there was an “issue” with the DH procwatch program that kills processes that was causing it to not properly recognize “niced” processes - I suspect that is part of your problem.

According to “those who should know”, that problem has been corrected, and proper use of nice is now “respected” by the proc killer.

You might want to try your PHP5 install script again now, and see if you have better luck. Just a thought :wink:

–rlparker


#8

Do let us know if that’s fixed.

It’d be a bummer if nice was broken. Yes, it should be slower but that’s because you’re asking for the “navel contemplation time” of the processor. In exchange, you won’t be killed if things are working right.

Wholly


#9

Sorry, I might not have been clear about that in my previous post. The DH people involved with it say it is fixed, and is now working properly.

–rlparker


#10

Well, I’d like to thank you for all the help, but I gave up a while ago, seeing as I think the problem comes from the actual installation (make, make install) bits.
I did try running it with nice again, and it was killed again, but due to an error, I think because of the gcc commands (though I understand nothing about them…)

It would help if the wiki had some more trouble-shooting guides on the Installing a custom PHP5 build.

But yes, thank you very much for the help :smiley:


#11

Hello,

I’m also trying to install PHP 5.2 as documented on the wiki (http://wiki.dreamhost.com/index.php/Installing_PHP5), and it’s not working for me either.

The script appears to get killed. Specifically, the error is “gcc: Internal error: Killed (program cc1)”.

This happens even when I run the script at maximum niceness. I used “nice -n 19 ./installscript”.

Any ideas would be sincerely appreciated. I’ll be glad to provide any more info that’d be useful.

– Charles


#12

Update: I’ve split the installer into parts. The downloading and unpacking of all the bits works fine, as I’d expected.

What was less expected was that I can’t even successfully compile the first package (libiconv) without getting error “gcc: Internal error: Killed (program cc1)”, even at niceness 19.

Is there anything else I can post that would allow an expert to understand what’s wrong?

– Charles


#13

rlparker reported that a bug had been found in the process killer that wasn’t honoring the niceness of a process. Your server may not have been fixed yet. You might want to submit your problems to support and see if they can check the script.

Wholly


#14

I’m not an expert on this, but I don’t think that error is related to the Dreamhost process killer “bug” re. nice. Check this google search.

I’m still wading through the results looking for a solution, but I think it’s unrelated to the proc killer in the sense of running too long, or consuming too much cpu - but may be being killed because of using too much memory, and I can’t think of a workaround for that at present. Still investigating. :wink:

–rlparker


#15

Well, FWIW, after a few hours of playing and waiting I’ve been able to install PHP 5.2.

I split the install script into two parts, one to get and untar the prereqs, and one to make PHP 5 and the prereqs.

Since I’m a novice and make many changes, I put them at the bottom of this page rather than replacing the script I used as source:

http://wiki.dreamhost.com/index.php/PHP_5_install_script

Problems:

  • This still isn’t as reliable as it should be. Sometimes the script just seems to stop for no reason.

  • Ideally, both scripts would simply include a separate file with user-editable settings, but I tried both the “.” and “source” commands and neither seemed to work.

Any help sanity-checking and improving these is appreciated!

– Charles


#16

That’s nice work, Charles (no pun intended, but I guess it’s a pun none-the-less :wink: ). Thanks for taking the time to share back and for putting your versions of the scripts in the wiki.

–rlparker