Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A workaround for a manual install of PHP 5.0.2 glitch UNIX
PHP 5 is out, and a binary installer is available for Panther. No Jaguar support is available. However, it is completely possible to install PHP on your Jaguar machine. In fact, you may have problems installing it in Panther, since there is a "misfeature" in the configuration file. Before you begin, make sure you have the Developer Tools and BSD subsystem installed and up to date.

One thing you must make sure you have is libxml2. You can use Fink, or install from source. If you use Fink, then xml2-config should be in /sw/bin. If you installed from source, then it should be in /usr/local/bin or /usr/bin. If it is in /usr/bin or /usr/local/bin, you should be fine; the configure script can handle these locations by itself. It's the Fink thing we have a problem with.

If you ask configure for help, by typing...
./configure --help
... it will tell you that to define your own libxml location, you should add --with-libxml-dir=DIRNAME. This is standard Unix configure syntax. However, since we know that the xml2-config file is in /sw/bin, we might be tempted to run configure this way:
./configure --with-libxml-dir=/sw/bin
This is how every other configure script I have ever seen works -- if you give it a direct path, it uses it. But this is not how PHP does it. For some reason, the configure script adds a /bin to the directory you chose. So the configure script is now searching in /sw/bin/bin. Which doesn't (or shouldn't) exist. The fix is very simple:
./configure --with-libxml-dir=/sw
Let configure add its own /bin, and everyone is happy. It may seem like this is a trivial thing, and it is. But the only way to catch the problem is to open configure and look at lines 17934 and 17935. Which is what I did -- it was easy to fix after that. This is the first time I have seen a configure script like this. Normally, it would just search the path, and your path hopefully contains the Fink directory. By hardcoding in the search path, the developers have potentially confused a lot of people. Barring any other mishaps, you should be able to complete the installation by typing:
$ make
$ make install
Getting your Apache server to recognize it is another story altogether! Happy coding!
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[4,134 views]  

A workaround for a manual install of PHP 5.0.2 glitch | 2 comments | Create New Account
Click here to return to the 'A workaround for a manual install of PHP 5.0.2 glitch' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A workaround for a manual install of PHP 5.0.2 glitch
Authored by: cfoster on Nov 20, '04 12:04:13AM

For pre-compiled versions of PHP 5 that run on Panther, I highly recommend Marc Liyanage's outstanding Entropy.ch web site.

He has a variety of compiled installers for PHP 4, PHP5, MySQL, PostgreSQL, etc.

And lots of other helpful guides.



[ Reply to This | # ]
A workaround for a manual install of PHP 5.0.2 glitch
Authored by: worker201 on Nov 20, '04 03:55:25PM

Yeah, the official PHP site has binaries for Panther too. Unfortunately, my friend was using Jaguar, and the binaries are not supported on that release. So we had to install from source. Binaries are darn convenient, but they aren't always appropriate. Besides, you learn a lot more when you build from source :)



[ Reply to This | # ]