Talk:Installing PHP4

Getting these error messages at the end of the PHP4 installation process
- Have any of you had experience of receiving these error messages at the end of PHP installation?

make[3]: *** [onceenv] Error 1 make[3]: Leaving directory `/home/.milton/essaymonster/source/imap-2004g/c-client' make[2]: *** [lnp] Error 2 make[2]: Leaving directory `/home/.milton/essaymonster/source/imap-2004g/c-client' make[1]: *** [OSTYPE] Error 2 make[1]: Leaving directory `/home/.milton/essaymonster/source/imap-2004g' make: *** [ldb] Error 2

---

I followed the instructions for creating the installscript, but I'm getting this:

-- [quid]$ vim installscript [quid]$ chmod x installscript [quid]$ ./installscript --13:52:52-- http://us3.php.net/distributions/php-4.4.2.tar.gz => `php-4.4.2.tar.gz' Resolving us3.php.net... 216.194.113.175 Connecting to us3.php.net[216.194.113.175]:80... connected. HTTP request sent, awaiting response... 416 Requested Range Not Satisfiable

Continued download failed on this file, which conflicts with `-c'. Refusing to truncate existing file `php-4.4.2.tar.gz'. - UPDATE: if you get this error it's probably because you've already run this install script once before and there are still remenants of the PHP packages in your TMP directory. to erase your TMP directory:  cd ..  - cd out of your Home folder to the ROOT level of the server.  cd tmp  - inside the tmp folder you should see a directory with your USER NAME rm -r {USER NAME}   - delete the tmp directory with your USER NAME. rerun the install script and it should work without the 416 error.

Thanks
Thanks for the help... couldn't have done this without you!

This seems to need to be on a primary domain and not a sub-domain to work!

Adding To Another Domain
Instead of installing php4 more then once, try this:

command one - new file: vim installagain

Insert:

#!/bin/bash

export DOMAIN="NEW-DOMAIN-HERE"

# Where is php installed?

INSTALLDIR=${HOME}/php

#copy PHP CGI

mkdir -p ${HOME}/${DOMAIN}/cgi-bin

chmod 0755 ${HOME}/${DOMAIN}/cgi-bin

cp ${INSTALLDIR}/bin/php ${HOME}/${DOMAIN}/cgi-bin/php.cgi

''echo -- UPDATE COMPLETE! --''

command two - chmod: chmod +x installagain

command three - run file: ./installagain

--

Hello!

How can I understand - when my domen using my compilation of PHP or Dreamhost's version? Can I switch them?

Thanks!


 * One sure fire way would be to enable allow_url_fopen and see if you can include  an external website. -- Theraven 03:43, 15 August 2007 (PDT)

FEEDBACK
This works a treat, although if the script fails you may need to go and clear out the files you've downloaded to ~/dist directory

NB: Regarding setting the DOMAIN var, this simply refers to the directory name your site is under, this would normally be www.yourdomain.com or whatever, however, if like myself you have set your web directory of your account to something other than your domain name (such as 'www') then you need to ensure that that is reflected in the script.

When I ran this I had a problem because the php download sites seem to be missing version 4.4.4 currently. I changed the version to 4.4.6 in the script and it all worked fine -- 4/21/07

Host could not be found error message
What is going on?

essaymonster@rootbeer:~$ ./installscript --19:58:31-- http://sunsite.bilkent.edu.tr/infosystems/phpweb/distributions/php-4.4.4.tar.gz => `php-4.4.4.tar.gz' Resolving sunsite.bilkent.edu.tr... failed: Host not found.


 * THe error message is telling you that there is a problem connecting to sunsite.bilkent.edu.tr. Article "talk" pages are for discussion of the *article*, not general support-type question about the subject; you should use the DH Forums for such questions. -- Rlparker 21:37, 13 August 2007 (PDT)


 * DH support isn't going to do you any good either, "sunsite.bilkent.edu.tr" is neither hosted nor registered by DH. By the way, the host exists, but the file does not. The file name in question has been updated on the article page. Edit your installscript to reflect the change. -- Theraven 03:26, 15 August 2007 (PDT)

To solve this issue I found a copy of php-4.4.7.tar.gz and uploaded it to my server and directed the url there. -- deadhippo 12:09, 31 May 2008 (PDT)