Re: Compiling PHP4
| From: | Rasmus Lerdorf | Date: | Tue, 30 May 2000 15:17:56 +0000 |
| Subject: | Re: Compiling PHP4 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-643@lists.php.net to get a copy of this message | ||
> 1. --enable-inline-optimization: Is this recommended? Is this
> experimental?
No, this is not experimental. You should actually compile PHP with this
switch. If you get an error and run out of memory while compiling, remove
this switch and try again. It basically will make your PHP executable
slightly faster.
> 2. --with-zlib: Why would one need this and does it take up more space?
> If it is in /usr/local/lib/libz or something, is the option
> --with-zlib=/usr/local ?
zlib gives you the ability to manipulate compressed files directly.
See: http://www.php.net/manual/ref.zlib.php
> 3. --with-mysql: I am having problems including libs from mysql.
> Lets say MySQL is in /opt/mysql, do I do --with-mysql=/opt/mysql or
> --with-mysql=/opt ??? Also, are these libs dynamically or statically
> linked? What about --with-mysql, are the libs included statically linked
PHP will check for:
$i/include/mysql/mysql.h and $i/include/mysql.h where $i is the directory
you feed the --with-mysql switch. --with-mysql by itself will statically
link in the bundled MySQL support which doesn't rely on any external
libraries. If you feed --with-mysql a path it will either dynamically or
statically link the MySQL client library depending on which one you have
installed.
> ? Which option would reduce the size of the executable?
Why do you care? You could run 'strip' on the executable after compiling
if you really think the executable size makes any difference (which it
doesn't).
> 4. What the heck is pear? How much space does it take in an executable
PEAR is a user-space framework for PHP applications. It does not affect
the PHP executable in any way.
> 5.--disable-debug: Does this reduce error reporting produced by PHP when
> functions fail and errors are produced? On sun, sometime php fail
> without any error being produced. Does this effect this? How much space
> would this save?
You should compile with --disable-debug. It doesn't reduce the
user-visible error reporting.
-Rasmus