CapĂ­tulo 49. Build Problems

1. I got the latest version of PHP using the anonymous CVS service, but there's no configure script!
2. I'm having problems configuring PHP to work with Apache. It says it can't find httpd.h , but it's right where I said it is!
3. While configuring PHP ( ./configure ), you come across an error similar to the following:
4. When I try to start Apache, I get the the following message:
5. When I run configure, it says that it can't find the include files or library for GD, gdbm, or some other package!
6. When it is compiling the file language-parser.tab.c , it gives me errors that say yytname undeclared .
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.
8. When linking PHP, it complains about a number of undefined references.
9. I can't figure out how to build PHP with Apache 1.3.
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.
11. It says to use: --activate-module=src/modules/php4/libphp4.a , but that file doesn't exist, so I changed it to --activate-module=src/modules/php4/libmodphp4.a and it doesn't work!? What's going on?
12. When I try to build Apache with PHP as a static module using --activate-module=src/modules/php4/libphp4.a it tells me that my compiler is not ANSI compliant.
13. When I try to build PHP using --with-apxs I get strange error messages.
14. During make , I get errors in microtime, and a lot of RUSAGE_ stuff.
15. I want to upgrade my PHP. Where can I find the ./configure line that was used to build my current PHP installation?
16. When building PHP with the GD library it either gives strange compile errors or segfaults on execution.

Be sure to read the installation Be sure to read the installation instructions carefully and note that you need both flex and bison installed to compile PHP .




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:



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:



If you see the above line, change it to this:



Last, if you reconfigure/reinstall Apache, add a make clean to the process after ./configure and before make .