Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've run into a really weird issue. I was debugging a server 500 error script on our EC2 instance and found that we didn't have ioncube loaders installed. So I went to go install them and I created a new file at /etc/php.d/zend.ini and initially I inserted the value of extension=/usr/local/ioncube/ioncube_loader_lin_5.3.so and restarted httpd at which point it told me:

The ionCube Loader is a Zend-Engine extension and not a module
Please specify the Loader using 'zend_extension' in php.ini
PHP Fatal error:  Unable to start ionCube Loader module in Unknown on line 0

So I changed the contents of zend.ini to zend_extension=/usr/...etc. Now when I attempt to restart httpd I get this error:

Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

I can't even run /etc/init.d/httpd stop without it erroring. I've since removed zend.ini to see if that's what caused it and it doesn't seem to be.

Any ideas?

share|improve this question
2  
Check to see what's listening on port 80. Make sure port 80 is clear. Then start apache. –  David Schwartz Jun 20 '12 at 0:15
    
Did you restart using sudo? –  ceejayoz Jun 20 '12 at 15:00
add comment

2 Answers

If there isn't anything listening on port 80 as per the suggestion from David Schwartz, the problem is most likely that you have two Listen 80 directives in your Apache config. They may not be near each other or even in the same file.

Try grep -r Listen /etc/httpd to find them and remove one of them.

share|improve this answer
    
THANK YOU!!!!!! –  t q Nov 17 '12 at 3:16
add comment

Zend-server should be remove

yum zend-server remove

Remove

rm -f /var/lock/subsys/httpd

close process httpd

ipcs -s | grep apache |  perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'

See the status apache

/etc/init.d/httpd status

Then start apache

/etc/init.d/httpd start
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.