FYI, here's a nice step by step on how to patch your 4.0.6 source tree. If your machine doesn't have patch installed on your box, or are running Windows, this posting won't help you much, and you should just download the latest version of PHP.

Anyone who wants to bitch about the quality of PHP, its docs, its web page design, or its authors should consider how much they paid for PHP, and how much more they could get from those folks if they were willing to just write the occasional check to support the project instead of just bitching about it.

First, get the patches by JUST CLICKING on the patches listed on the http://www.php.net/downloads.php page. Don't right click and select save as, don't shift click, just click once with the left mouse button.

On my Linux box running mozilla this brings up the patch on the page in text mode.

Select save as for each patch, and save it as it is.

On my linux box, I had to 'gunzip rfc1867.c.diff-4.0.6.gz' but not the other file, php-4.0.6-memlimit.diff.

Assuming your source files are where mine are, and you downloaded the files to your home directory do this with appropriate changes:

cd /usr/local/src/php-4.0.6
cd Zend
patch -p 0 </home/smarlowe/php-4.0.6-memlimit.diff
cd ../main
patch -p0 </home/smarlowe/rfc1867.c.diff-4.0.6
cd ..
make clean
./configure --your-options-here
make
make install

    1: I run X on my workstation, not my server, then transfer the files onto the server... But I do have X installed on the server, so that if a Windows Sysadmin has to fix anything... :-) well, you know.

    2: A make clean isn't a requirement, but I've seen far too many times that the compile failed for no apparent reason, and make clean was the fix. Once or twice I've had crash prone PHP libs show up from not doing a make clean, when the change didn't get quite picked up right.. Also, with dual PIII - 750s it's not that big of a deal to rebuild PHP. Now Postgresql takes a lot of time, no matter how fast your box is...

    If you do use wget, then you need to use it like this:

    wget -o rfc1867.c.diff-4.0.6.gz http://www.php.net/do_download.php?download_file=rfc1867.c.diff-4.0.6.gz

    So you get the file with the right name, otherwise it will get do_download.php as the file name.

      Write a Reply...