Joaquin Herrero wrote:
The problem I had when tried to compile php4 (or php5) from ports is this:
mach:/usr/ports/www/php4# /usr/bin/make
===> www/php4/core
===> Checking files for php4-core-4.4.0p0
php-4.4.0.tar.gz doesn't seem to exist on this system.
Attempting to fetch /usr/ports/distfiles/php-4.4.0.tar.gz from
http://us2.php.net/distributions/
.
100% |**************************************************| 6133
00:00
Size does not match for /usr/ports/distfiles/php-4.4.0.tar.gz
/bin/sh: test: 30000: unexpected operator/operand
*** Error code 2
Same happens with php5.
Anyone knows what is the problem here? I tried from a 4.0 machine and I got
the same problem.
The problem is that the PHP team either changed the URL of the
PHP 4.4.0 tarball, or the PHP 4.4.0 tarball is no longer available.
If you try using a web browser to access
http://us2.php.net/distributions/php-4.4.0.tar.gz directly (which
is essentially what the ports mechanism is trying to do), you'll see
an error page.
To get around it, try the following steps:
1. cd /usr/ports/distfiles
2. ftp ftp://ftp.openbsd.org/pub/OpenBSD/distfiles/php-4.4.0.tar.gz
3. cd /usr/ports/www/php4
4. make
You might have to repeat the above steps for other PHP tarballs.
Re step #2, I would not recommend using that step very often.. it's
much more preferable to grab the tarballs from their original locations
(or mirrors).. the OpenBSD distfiles FTP location is meant as a last
resort.
I would also highly recommend using OpenBSD 4.0 and/or a more up-to-date
version of PHP. There has been numerous security fixes since PHP 4.4.0
(see http://www.php.net/ChangeLog-4.php).
Hope it helps,
Lawrence
--
Lawrence Teo
Calyptix Security
http://www.calyptix.com/