Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
Joined: Nov 2001
Posts: 134
Hello all.

I'm in the process of moving a site across to a new server, and we are using Photopost (yes I have posted this question there also).

It appears with the newer version of PHP and the Windows OS, there are now problems executing external commands from PHP, specifically MOGRIFY to resize the files.

The error we are getting:

The error is:

Warning: exec(): Unable to fork ["e:/imagemagick/mogrify.exe" -size 100x66 -quality 70 -geometry 100x66 g:/webs/www.bm3w.co.uk/public_html/ug/data/526/67-thumb.jpg] in G:\webs\www.bm3w.co.uk\public_html\ug\image-inc.php on line 58


Error creating thumbnail! Error code: -1

Command:

"e:/imagemagick/mogrify.exe" -size 100x66 -quality 70 -geometry 100x66 g:/webs/www.bm3w.co.uk/public_html/ug/data/526/67-thumb.jpg


I've done a few searches, and it appears to be a problem of quotes, and the offending line (at least for this occurance, im sure there will be others) is..

// set this to NT if the default doesnt work for you and you are running on an NT server
$OS = "any";

if ( $OS == "any" ) {
exec( $syscmd, $return, $retval );
}
else {
exec( "cmd.exe /c" $syscmd, $return, $retval );
}

return( $retval );
}


I've tried setting it to NT as it suggests, and ive tried amending the line to:

exec( "cmd.exe /c $syscmd, $return, $retval" );

(moving the " to the end) but that doesnt work, it just ignores that line, but continues on the script.

Now I have no idea about PHP, so have hit a wall as far as this goes..

Anyone come across similar issues?

thanks!

Sponsored Links
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
I would suggest following this link and going to the Photopost Site and asking there. Michael P would probably be quicker in response over there..

http://www.photopost.com/forum/

Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
Joined: Nov 2001
Posts: 134
Thanks, as I mentioned, already posted there.. just increasing my chances of a solution.

Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
Joined: Nov 2001
Posts: 134
Seems this is def. related to Windows 2003 and current version of PHP... Photopost guys say I should speak to my host.. who is me.. .so that doesnt really help me

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
From what I have been hearing about Windows 2003 it's compatibile with very little atm. I have a client who is building some windows 2003 servers and he is running into alot of driver incompatibility issues. He won't move his client PCs over to it until it gets a little older and grows some more so is sticking with Windows 2000 Professional on his client workstations.

Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
fork error message are usually caused by a permission problem.
Does the apache/IIS user have execute permissions for cmd.exe?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Astaran is right on this one

The error is a permissions one as you have not given the proper permissions to cmd.exe and photopost to use such things.

There is a ImageMagick Thread on the installation forum in photopost site that listed what permissions need to be given. Alas though Windows 2003 is tough at best to get things right.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Thats why I refuse to use Microsoft Products on a Webserver...

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Because you don't know how to set it up? You just gotta ask the right people and asking a pack of linux users ain't the right people

Those who make money from doing installs, modifications, even full software apps (threads and photopost included) are throwing away a good chunk of money by ignoring MS customers (which there are a lot of).

I've got a friend who's big into M$ and .net stuff, I'll see if he has time to explain a bit


- Allen wavey
- What Drives You?
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Allen,

Matt's problem was solved when the proper permissiona were applied.

Here is a reply from Donb over at Photopost.

[]
You need to allow the IWAM, IUSR, etc accounts access to cmd.exe

HOWEVER, please do some research on this before you do it as there are significant security risks involved.

Gotta love IIS exploits.[/]

His mogrify is working now. But you being the windows guru yourself here know the security risks involved. There is a thread explaining just how to get Mogrify working on Windows. Believe me I do installs on windows and I dont throw away money. I will get the install working. Windows has huge security holes that Microsoft seems know and keeps coming out with patch after patch.

I think the larger issue here is Microsoft ever going to step up to the plate. They seem happy because they are on top to release whatever they choose no matter how bug ridden.

Sponsored Links
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
[]AllenAyres said:
Because you don't know how to set it up? You just gotta ask the right people and asking a pack of linux users ain't the right people

Those who make money from doing installs, modifications, even full software apps (threads and photopost included) are throwing away a good chunk of money by ignoring MS customers (which there are a lot of).

I've got a friend who's big into M$ and .net stuff, I'll see if he has time to explain a bit [/]

No I know too well how to set it up. I am a Field Technician for a Finanacial News Company and Thats all I do and after working with winblows for such a long time I have come to appreciate Linux and Unix


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)