After updating Mac OSX to version 10.6.5 you may come across an error if you try to restart apache via the command line.
You will see this error:
Mac:~ root# apachectl restart
/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument
This is due to an update that was released to patch Apache to version 2.2.15 to patch some vulnerabilities in it.
This error can be fixed by editing the ulimit line that is in the apachectl init script.
Fix the Error
- Open the file
Mac:~ root# vi /usr/sbin/apachectl - Find this line
ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`" - Replace it with this line
ULIMIT_MAX_FILES=""
This will fix the error and you will be able to start apache from the command line.
Post a Comment