when installing php-5.3.5 on AMD64, make install on php gives this:
cannot access `/usr/local/apache2/modules/libphp5.so': No such file or directory
Apparently a lot of things can cause this problem.
Finally I tried an earlier version of PHP (5.3.3) from another AMD64 machine, and what do you know, libphp5.so was created in the .libs folder this time!
So now I can upgrade php to 5.3.5 and the file is there in the apache modules. But if you are trying to install PHP 5.3.5 for the first time, it seems like libphp5.so never gets created.