Building PHP on Solaris
1. During configure, you'll get an error that says something to the effect that the "-E" option is unsupported. Thats easy, you just change "grep" to "/usr/local/bin/grep", or wherever you have GNU grep installed.
2. Again, configure will complain about incorrect status from expr and a broken test. There is one instance where 2 shell vars are added. Use let from BASH instead of mucking with the Solaris expr. Also change all occurrences of expr to /bin/expr.
3. Install any missing packages from sunfreeware.com. I built PHP from scratch because I needed to make it work for an apache 1.3 installation, and the SUN freeware site helpfully included a libphp5.so that seemed to only work for apache 2.x.
4. When you finally have everything up and running, trying to start httpd will result in this:
bash-2.05a$ ./apache restart
httpd restarting.
bash-2.05a$ /home/cariapa/apache/bin/apachectl restart: configuration broken, ignoring restart
/home/cariapa/apache/bin/apachectl restart: (run 'apachectl configtest' for details)
bash-2.05a$ cd ../bin
bash-2.05a$ ./apachectl configtest
Syntax error on line 262 of /home/cariapa/apache/conf/httpd.conf:
Cannot load /home/cariapa/apache/libexec/libphp5.so into server: ld.so.1: httpd: fatal: relocation error: file /home/cariapa/apache/libexec/libphp5.so: symbol xmlParserInputBufferCreateFilenameDefault: referenced symbol not found
bash-2.05a$ echo $LD_LIBRARY_PATH
/usr/lib:/usr/X/lib:/usr/local/lib
bash-2.05a$ LD_LIBRARY_PATH="/usr/local/lib:/usr/lib:/usr/X/lib"
bash-2.05a$ ./apachectl configtest
Syntax OK
So evidently Solaris sticks some kind of XML2 library in /usr/lib, which is part of another Solaris XML package. Avoid!
As an addendum, making PHP with all options on this Sun T200, Solaris 10 system took about 10 minutes. 8GB of memory, Dec 2005 vintage. AFAIK it was only serving up a couple of static web pages at the time. I later compiled PHP at home on my little Dell Inspiron (also 2005 model) running Centos 5. Again all options, 512 GB of RAM, 1 PentiumM 1.8GHz. Took about 2 minutes. I make cleaned to make sure I wasn't doing something wrong, and ran it again. Same time.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home