Forum Moderators: phranque
I awake this morning to find that Apache has died. I try to restart apache and get the following errors:-
sh: -c: line 1: `/usr/bin/mogrify -resize 90% /home/rewired/www/html/admin/scratch/temp/screen7_(1).jpg'
sh: -c: line 1: syntax error near unexpected token `('
sh: -c: line 1: `/usr/bin/mogrify -resize 90% /home/rewired/www/html/admin/scratch/temp/screen7_(1).jpg'
sh: -c: line 1: syntax error near unexpected token `('
sh: -c:
That code comes from my PHP script, which shouldn't be running. The image name indicates that this problem was caused the second time I used the script, and I've worked out the syntax error problem and fixed it.
The problem I have is that despite fixing, Apache still will not start and dies with that error. I've removed the PHP script, just in case it was running again. Still dies. I've recompiled and reinstalled PHP and Apache (version 1.3.27 of Apache, 4.3.1 of PHP) - it still dies. Rebooted a thousand times, still dies.
I assume that the sh: -c means that this command is running from the shell. The processlist shows nothing of any consequence or anything related. I even checked my httpd.conf to make sure that the command didn't find its way in there.
If anyone could help, I would be SO grateful. My site is still down because of this.
Thank you in advance
What command are you using to start apache? If it's via a system startup script, you might want to try this:
apachectl start Bit of a long shot, but it might help if there's something wrong with the script you would normally use. Also, what does it say in Apache's error log? Does it print the "sh -c" error to your terminal?