Javascript debugger
Website design
↑
This section gathers most common errors that occur at build time.
6.1. | I got the latest version of PHP using the anonymous CVS service, but there's no configure script! |
You have to have the GNU autoconf package installed so you can
generate the configure script from | |
6.2. |
I'm having problems configuring PHP to work with Apache.
It says it can't find |
You need to tell the configure/setup script the location of the
top-level of your Apache source tree. This means that
you want to specify | |
6.3. |
While configuring PHP ( checking lex output file root... ./configure: lex: command not found |
Be sure to read the installation instructions carefully and note that you need both flex and bison installed to compile PHP. Depending on your setup you will install bison and flex from either source or a package, such as a RPM. | |
6.4. | When I try to start Apache, I get the following message: fatal: relocation error: file /path/to/libphp4.so: |
This error usually comes up when one compiles the Apache core program as a DSO library for shared usage. Try to reconfigure apache, making sure to use at least the following flags: --enable-shared=max --enable-rule=SHARED_CORE
For more information, read the top-level Apache
| |
6.5. | When I run configure, it says that it can't find the include files or library for GD, gdbm, or some other package! |
You can make the configure script looks for header files and libraries in non-standard locations by specifying additional flags to pass to the C preprocessor and linker, such as: CPPFLAGS=-I/path/to/include LDFLAGS=-L/path/to/library ./configure If you're using a csh-variant for your login shell (why?), it would be: env CPPFLAGS=-I/path/to/include LDFLAGS=-L/path/to/library ./configure | |
6.6. |
When it is compiling the file |
You need to update your version of Bison. You can find the latest version at » http://www.gnu.org/software/bison/bison.html. | |
6.7. | When I run make, it seems to run fine but then fails when it tries to link the final application complaining that it can't find some files. |
Some old versions of make that don't correctly put the compiled versions of the files in the functions directory into that same directory. Try running cp *.o functions and then re-running make to see if that helps. If it does, you should really upgrade to a recent version of GNU make. | |
6.8. | When linking PHP, it complains about a number of undefined references. |
Take a look at the link line and make sure that all of the appropriate libraries are being included at the end. Common ones that you might have missed are '-ldl' and any libraries required for any database support you included. If you're linking with Apache 1.2.x, did you remember to add the appropriate information to the EXTRA_LIBS line of the Configuration file and re-rerun Apache's Configure script? See the installation chapter for more information.
Some people have also reported that they had to add '-ldl' immediately
following | |
6.9. | I can't figure out how to build PHP with Apache 1.3. |
This is actually quite easy. Follow these steps carefully:
Note: You can also use the new Apache
| |
6.10. | I have followed all the steps to install the Apache module version on Unix, and my PHP scripts show up in my browser or I am being asked to save the file. |
This means that the PHP module is not getting invoked for some reason. Three things to check before asking for further help:
| |
6.11. |
It says to use: |
Note that the | |
6.12. |
When I try to build Apache with PHP as a static module using
|
This is a misleading error message from Apache that has been fixed in more recent versions. | |
6.13. |
When I try to build PHP using |
There are three things to check here. First, for some reason
when Apache builds the apxs Perl script, it sometimes ends up
getting built without the proper compiler and flags variables.
Find your apxs script (try the command which apxs),
it's sometimes found in my $CFG_CFLAGS_SHLIB = ' '; # substituted via Makefile.tmpl If this is what you see, you have found your problem. They may contain just spaces or other incorrect values, such as 'q()'. Change these lines to say: my $CFG_CFLAGS_SHLIB = '-fpic -DSHARED_MODULE'; # substituted via Makefile.tmpl The second possible problem should only be an issue on Red Hat 6.1 and 6.2. The apxs script Red Hat ships is broken. Look for this line: my $CFG_LIBEXECDIR = 'modules'; # substituted via APACI install If you see the above line, change it to this: my $CFG_LIBEXECDIR = '/usr/lib/apache'; # substituted via APACI install Last, if you reconfigure/reinstall Apache, add a make clean to the process after ./configure and before make. | |
6.14. |
During make, I get errors in microtime,
and a lot of |
During the make portion of installation, if you encounter problems that look similar to this: microtime.c: In function `php_if_getrusage':
Your system is broken. You need to fix your $ cat >test.c <<X If that spews out errors, you know your include files are messed up. | |
6.15. |
When compiling PHP with MySQL, configure runs fine but during
|
First, it's important to realize that this is a Note: As of PHP 4.3.2, you'll also see the following text after the build (make) completes: Build complete. | |
6.16. | I want to upgrade my PHP. Where can I find the ./configure line that was used to build my current PHP installation? |
Either you look at config.nice file, in the source tree of your current PHP installation or, if this is not available, you simply run a <?php phpinfo(); ?> script. On top of the output the ./configure line, that was used to build this PHP installation is shown. | |
6.17. | When building PHP with the GD library it either gives strange compile errors or segfaults on execution. |
Make sure your GD library and PHP are linked against the same depending libraries (e.g. libpng). | |
6.18. | When compiling PHP I seemingly get random errors, like it hangs. I'm using Solaris if that matters. |
Using non-GNU utilities while compiling PHP may cause problems. Be
sure to use GNU tools in order to be certain that compiling PHP will
work. For example, on Solaris, using either the SunOS BSD-compatible
or Solaris versions of |