homepage Welcome to WebmasterWorld Guest from 54.161.192.61
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Very strange Apache error
Running commands that don't exist? HELP!
KMxRetro

10+ Year Member



 
Msg#: 174 posted 3:21 pm on Apr 28, 2003 (gmt 0)

Hi all,
I just decided to test a nice little script I'd written for Imagemagick (in PHP). Basically it resizes images and after a couple of initial problems last night, it was working. It worked up until 3am (GMT).

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

 

mischief

10+ Year Member



 
Msg#: 174 posted 2:43 am on Apr 30, 2003 (gmt 0)

Hi KMxRetro,

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?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved