Error 404 while running PHP installscript


#1

I am trying to install the custom PHP with iconv library installed by following instruction on wiki.dreamhost.com (http://wiki.dreamhost.com/Installing_PHP4)

Everytime I try to run the installscript it showing connection error 404 shown at the bottom.

Does anyone know why?

essaymonster@rootbeer:~$ ./installscript
–14:04:21-- 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… 139.179.10.17
Connecting to sunsite.bilkent.edu.tr[139.179.10.17]:80… connected.
HTTP request sent, awaiting response… 404 Not Found
14:04:22 ERROR 404: Not Found.


#2

yes. read the error message. Can you browse to http://sunsite.bilkent.edu.tr/infosystems/phpweb/distributions/php-4.4.4.tar.gz? No? Neither can I, so it looks like that file is no longer available at that address.

http://sunsite.bilkent.edu.tr/infosystems/phpweb/distributions/php-4.4.7.tar.gz is available however, and it is a newer version, so I think I would use that. :wink:

Reading the error message generally helps you figure out what has happened - sometimes it helps a lot! :wink:

–rlparker


#3

You can correct this by correctly specifying the correct version number for the PHP your want to install (for version 4, that is 4.4.7).

Near the top of the script, set the PHP variable to a current version, for example, change:

Update version information here.

PHP=“php-4.4.4”

to

Update version information here.

PHP=“php-4.4.7”

and run the script again. BTW, for your compilation, your other post indicates you also need to enable bcmath, so don’t forget to modify the script to do that for you while you are at it. :slight_smile:

–rlparker


#4

hey, it works. I didn’t know what version it’s available for me to download, even if I had carefully read the message, I still won’t know how to fix it.

sorry for this stupid question. =P


#5

Heh, No Problem! I updated that wiki page with the change, and expanded the comment a little to make it more clear.

Did you enable the bcmath package while you were at it? :wink:

–rlparker


#6

(message copied from http://discussion.dreamhost.com/showthreaded.pl?Cat=&Board=3rdparty&Number=88571&page=&view=&sb=&o=&vc=1#Post88571)

"From looking at the error message you provided, it is not even clear than iconv is in any way involved; the error message is reporting that your script can’t the function bcdiv() (included in libbcmath) – one of the BCMath Arbitrary Precision Mathematics Functions.

According to that manual page, and a phpinfo() run on one of my domains, that does not appear to be enabled on DreamHost’s PHP. From the manual:

“These functions are only available if PHP was configured with --enable-bcmath.”

So you mean libbcmath is already came with DreamHost’s default version but libiconv is not? Therefore, if my chat forum need both I will need to compile my own PHP from scratch? or I just have to enable them in the PHP.ini ?


#7

Well, no … I’m sorry I was not more clear. What I was trying to say is that “iconvert” is available on Dreamhost, but that turns out not to be the relevant question in your case, as what you are needing is the *PHP library libiconv , which is a different thing. (see my previous followup post).

My tests via phpinfo() indicate that libiconv is not installed by default (and if that is what DH support was talking about with you, then they are correct). The PHP 4 custopm install script you were using does prepare this for you, so that should not be an issue if you use this install script.

Secondly, the error message you provided does not appear to be related to libiconv, but rather is related to bcmath being missing. Per the manual page that I linked from php.net, is is shipped with PHP 4.4.7, but needs to be enabled at compile time (you can not do it just via php.ini) - you need to compile PHP bcmath enabled, as described here. Tat is why I mentioned in earlier in this thread.

To do this, all you have to do was add the line “–enable-bcmath” to the “# What PHP features do you want enabled?” section of the install scrikpt, and when it is completed you should be good to go (the install script handles the libiconv already).

So, in that install script, instead of:

What PHP features do you want enabled?

PHPFEATURES="–prefix=${INSTALLDIR}
–with-config-file-path=${INSTALLDIR}/etc/php4
–enable-force-cgi-redirect
–with-xml --with-libxml-dir=${INSTALLDIR}
–with-freetype-dir=${INSTALLDIR}
–enable-soap
–with-xsl=${INSTALLDIR}
–with-openssl=/usr
–with-mhash=${INSTALLDIR}
–with-mcrypt=${INSTALLDIR}
–with-zlib-dir=${INSTALLDIR}
–with-jpeg-dir=/usr
–with-png-dir=/usr
–with-gd
–enable-gd-native-ttf
–enable-ftp
–enable-sockets
–enable-wddx
–with-iconv=${INSTALLDIR}
–enable-sqlite-utf8
–enable-calendar
–with-curl=${INSTALLDIR}
–enable-mbstring
–enable-mbregex
–with-mysql=/usr --with-mysqli
–with-imap=${INSTALLDIR}"

---- end of user-editable bits. Hopefully! ----

You add the line to enable bcmath like so:

What PHP features do you want enabled?

PHPFEATURES="–prefix=${INSTALLDIR}
–with-config-file-path=${INSTALLDIR}/etc/php4
[color=#0000CC]–enable-bcmath[/color]
–enable-force-cgi-redirect
–with-xml --with-libxml-dir=${INSTALLDIR}
–with-freetype-dir=${INSTALLDIR}
–enable-soap
–with-xsl=${INSTALLDIR}
–with-openssl=/usr
–with-mhash=${INSTALLDIR}
–with-mcrypt=${INSTALLDIR}
–with-zlib-dir=${INSTALLDIR}
–with-jpeg-dir=/usr
–with-png-dir=/usr
–with-gd
–enable-gd-native-ttf
–enable-ftp
–enable-sockets
–enable-wddx
–with-iconv=${INSTALLDIR}
–enable-sqlite-utf8
–enable-calendar
–with-curl=${INSTALLDIR}
–enable-mbstring
–enable-mbregex
–with-mysql=/usr --with-mysqli
–with-imap=${INSTALLDIR}"

---- end of user-editable bits. Hopefully! ----

.Then, when you run the install script, you should have as a result a PHP 4.4.7 compilation with libiconv and bcmath installed/enabled (which are the two issues you have reported so far).

–rlparker