Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

apachectl script is broken under 10.6.5

It seems that since the 10.6.5 update, the apachectl script is no longer working. This script has the line:-

ULIMIT MAXFILES="ulimit -S -n `ulimit -H -n`"

Which boils down to trying to run "ulimit -S -n unlimited", which then results in the error:-

-bash: ulimit: open files: cannot modify limit: Invalid argument

This should not really be a problem, as using the work 'unlimited' should be accepted by the ulimit command. But it's not!

As a temporary fix I have modified my apachectl script to change the line to read as follows:-

ULIMIT MAXFILES="ulimit -S -n 10240"

I got that limit by trial and error as someone on #httpd had recommended 65000! I guess there are some people that will know how to make a sensible target for this figure.

MacPro (2008), Mac OS X (10.6.5), 8800GT

Posted on Nov 11, 2010 6:37 AM

Reply
12 replies

Nov 12, 2010 9:29 AM in response to g@rgoyle

From http://support.apple.com/kb/HT4435:

Apache

CVE-ID: CVE-2010-0408, CVE-2010-0434

Available for: Mac OS X v10.6 through v10.6.4, Mac OS X Server v10.6 through v10.6.4

Impact: Multiple vulnerabilities in Apache 2.2.14

Description: Apache is updated to version 2.2.15 to address several vulnerabilities, the most serious of which may lead to a denial of service. Further information is available via the Apache web site at http://httpd.apache.org/

Nov 12, 2010 9:36 AM in response to g@rgoyle

I thought I was going crazy. I just got my new laptop and I thought I did something wrong to it. So it was the software update. But can you explain the socket error?

/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

Dec 5, 2010 4:01 PM in response to iJohn78

Launch Terminal.app from an administrator user, and issue the following commands:


$ cd /usr/sbin/
$ sudo cp apachectl apachectl_save
$ sudo nano apachectl


sudo will require you to enter your administrative user's password.

nano is probably the easiest command-line text editor, and includes on-screen help. Follow the on-screen instructions to find the above line, and change it per the instructions earlier in the thread.

Dec 5, 2010 5:27 PM in response to iJohn78

iJohn78 wrote:
I did that and finally changed the script (the error message disappeared), but now nothing happens when I type sudo apachectl graceful and I still can't view anything in localhost.


You should probably start your own thread to discuss this issue. "sudo apachectl graceful" won't do anything except restart Apache.

apachectl script is broken under 10.6.5

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.