1949f
![]() |
|
|
|
|
|||||||
| Web & Network Services Discussion related to network/web services such as apache, bind, sendmail, etc. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I'm having trouble getting Apache22 to work. So far I can say PHP5 seems to cause the trouble. Only I can't figure out what the problem is. When I start apache, it says all is ok. But when I check with sockstat -4, nothing is listening on port 80. When I disable this line in httpd.conf, Apache runs fine. Code:
LoadModule php5_module libexec/apache22/libphp5.so I tried to set apache's LogLevel to debug, to figure out what goes wrong. But I can't find anything.
Last edited by DutchDaemon; March 23rd, 2012 at 00:26. |
|
#2
|
||||
|
||||
|
Have a look in /var/log/httpd-error.log.
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#3
|
|||
|
|||
|
I did, but that didn't give me much to go on. But now I have PHP5 compiled with debug support, it's coughing up something interresting. Only I don't really understand why it produces these errors
![]() Code:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/bz2.so' - Cannot open "/usr/local/lib/php/20090626-debug/bz2.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/calendar.so' - Cannot open "/usr/local/lib/php/20090626-debug/calendar.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/ctype.so' - Cannot open "/usr/local/lib/php/20090626-debug/ctype.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/curl.so' - Cannot open "/usr/local/lib/php/20090626-debug/curl.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/dom.so' - Cannot open "/usr/local/lib/php/20090626-debug/dom.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/fileinfo.so' - Cannot open "/usr/local/lib/php/20090626-debug/fileinfo.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/filter.so' - Cannot open "/usr/local/lib/php/20090626-debug/filter.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/gd.so' - Cannot open "/usr/local/lib/php/20090626-debug/gd.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/gettext.so' - Cannot open "/usr/local/lib/php/20090626-debug/gettext.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/gmp.so' - Cannot open "/usr/local/lib/php/20090626-debug/gmp.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/hash.so' - Cannot open "/usr/local/lib/php/20090626-debug/hash.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/iconv.so' - Cannot open "/usr/local/lib/php/20090626-debug/iconv.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/imap.so' - Cannot open "/usr/local/lib/php/20090626-debug/imap.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/json.so' - Cannot open "/usr/local/lib/php/20090626-debug/json.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/ldap.so' - Cannot open "/usr/local/lib/php/20090626-debug/ldap.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/mbstring.so' - Cannot open "/usr/local/lib/php/20090626-debug/mbstring.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/mcrypt.so' - Cannot open "/usr/local/lib/php/20090626-debug/mcrypt.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/mysql.so' - Cannot open "/usr/local/lib/php/20090626-debug/mysql.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/mysqli.so' - Cannot open "/usr/local/lib/php/20090626-debug/mysqli.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/openssl.so' - Cannot open "/usr/local/lib/php/20090626-debug/openssl.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/pdf.so' - Cannot open "/usr/local/lib/php/20090626-debug/pdf.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/pdo.so' - Cannot open "/usr/local/lib/php/20090626-debug/pdo.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/pdo_sqlite.so' - Cannot open "/usr/local/lib/php/20090626-debug/pdo_sqlite.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/pgsql.so' - Cannot open "/usr/local/lib/php/20090626-debug/pgsql.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/phar.so' - Cannot open "/usr/local/lib/php/20090626-debug/phar.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/posix.so' - Cannot open "/usr/local/lib/php/20090626-debug/posix.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/readline.so' - Cannot open "/usr/local/lib/php/20090626-debug/readline.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/recode.so' - Cannot open "/usr/local/lib/php/20090626-debug/recode.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/session.so' - Cannot open "/usr/local/lib/php/20090626-debug/session.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/simplexml.so' - Cannot open "/usr/local/lib/php/20090626-debug/simplexml.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/snmp.so' - Cannot open "/usr/local/lib/php/20090626-debug/snmp.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/soap.so' - Cannot open "/usr/local/lib/php/20090626-debug/soap.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/sockets.so' - Cannot open "/usr/local/lib/php/20090626-debug/sockets.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/sqlite.so' - Cannot open "/usr/local/lib/php/20090626-debug/sqlite.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/sqlite3.so' - Cannot open "/usr/local/lib/php/20090626-debug/sqlite3.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/tokenizer.so' - Cannot open "/usr/local/lib/php/20090626-debug/tokenizer.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/xml.so' - Cannot open "/usr/local/lib/php/20090626-debug/xml.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/xmlreader.so' - Cannot open "/usr/local/lib/php/20090626-debug/xmlreader.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/xmlwriter.so' - Cannot open "/usr/local/lib/php/20090626-debug/xmlwriter.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/zip.so' - Cannot open "/usr/local/lib/php/20090626-debug/zip.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/zlib.so' - Cannot open "/usr/local/lib/php/20090626-debug/zlib.so" in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/apc.so' - Cannot open "/usr/local/lib/php/20090626-debug/apc.so" in Unknown on line 0 Last edited by DutchDaemon; March 23rd, 2012 at 00:26. |
|
#4
|
|||
|
|||
|
My suggestion is to uninstall php5 and apache_php5 module.
My question is this: Did you download and install PHP5 and not just Apache's PHP5 module? Apache server uses a PHP5 module but still needs PHP5 installed. Also check to see those data paths and see if those files exist. From the errors I see... it seems like it's failing to find those files. Therefor either you didn't install PHP5 and just installed Apache's PHP5 module or the files were installed or put somewhere else. The error that it spit out simply says that it can't load the PHP library saying that all files can't be found at such and such place. I can't actually help you out there. Just giving my opinion/advice based on what you've shown so far. Hope this helped any. Last edited by DutchDaemon; March 24th, 2012 at 23:09. |
|
#5
|
|||
|
|||
|
Thanks I'll try uninstalling and reinstalling PHP5.
Quote:
Last edited by DutchDaemon; March 26th, 2012 at 11:46. Reason: [port] tags |
|
#6
|
|||
|
|||
|
I uninstalled and reinstalled lang/php5 and lang/php5-extensions. Still no luck. What am I doing wrong?
Last edited by DutchDaemon; April 2nd, 2012 at 17:43. Reason: [port] tags |
|
#7
|
||||
|
||||
|
Leave PHP out of it, for the time being. Make sure Apache is working correctly, then move on to PHP.
If I remember correctly only two lines need to be added to httpd.conf to get PHP working.
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#8
|
|||
|
|||
|
I did, when I disable those two lines in httpd.conf, apache runs just fine. As soon as I enable PHP, the trouble begins.
Last edited by DutchDaemon; April 2nd, 2012 at 17:43. |
|
#9
|
|||
|
|||
|
I bet PHP extensions are still ending up in:
/usr/local/lib/php/20090626/ instead of: /usr/local/lib/php/20090626-debug/ even though you have Code:
WITH_DEBUG=true I'm facing a similar problem - I don't know the answer. Last edited by DutchDaemon; April 5th, 2012 at 23:48. Reason: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816 |
|
#10
|
|||
|
|||
|
I ended up destroying the entire install, So I did a clean reinstall of FreeBSD. I installed named and that went well. Installed Apache22 and that went well too. Installed php5 and ran into the same problem. I simply can't get php5 to work and I can't figure out what's going wrong :'(
During the compilation php5 complained about an old version of devel/pcre. I fixed that with portupgrade devel/pcre. After that php5 would compile fine. Last edited by DutchDaemon; April 7th, 2012 at 00:49. |
|
#11
|
||||
|
||||
|
Sounds like you installed a bunch of stuff before updating the ports tree. When the ports tree is installed from the installer, it is what was current when that release came out and should be immediately upgraded.
Also, before installing or upgrading anything, it's important to read /usr/ports/UPDATING. There's a recent note in there about pcre. Just rebuilding that port alone is not enough. |
|
#12
|
|||
|
|||
|
So I did a clean FreeBSD9 install. I installed www/apache22, lang/php5 and lang/php5-extensions. And PHP still doesn't work! However, Apache does start and seems to run fine, even with PHP enabled and no debug compiled. So there is some progress!
![]() I have this in httpd.conf Code:
LoadModule php5_module libexec/apache22/libphp5.so
AddType applications/x-http-php .php
AddType applications/x-http-php-source .phps
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
How should I proceed to figure out what's wrong and finally solve this problem? ![]() Edit: When I run this on the commandline php /usr/local/www/apache22/data/index.php, it spits out the expected result (phpinfo() and some echo'd text). So PHP seems to work fine, as does Apache. It's combining the two that's keeping me awake at night
Last edited by DutchDaemon; April 11th, 2012 at 21:24. Reason: Use [port] tags, e.g. [port]www/apache22[/port]. |
|
#13
|
||||
|
||||
|
Code:
applications/x-http-php -> application/x-httpd-php |
|
#14
|
|||
|
|||
|
That's it! You are a lifesaver!
![]() It's always the small errors that cause the mayor problems
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] Apache22 won’t start! | arie01 | Web & Network Services | 12 | March 15th, 2012 16:36 |
| [Solved] what does this error mean when i try to start apache22? | baronobeefdip | Web & Network Services | 4 | December 1st, 2011 06:22 |
| [Solved] Can't start apache22 | folivora | Web & Network Services | 9 | October 18th, 2011 08:04 |
| [Solved] Apache22 will not auto start | dpalme | Web & Network Services | 8 | February 23rd, 2011 01:40 |
| Can't start Apache22 | Nokobon | Web & Network Services | 12 | June 8th, 2009 19:01 |