Hi,
I got a result using the ls-command. But not using the convert-command. The
server isn't in safe mode (checked using phpinfo()). I just got the server
error-log:
----[ SNAP ]----
[2003-07-24 15:56:12]: info: (real/target/actual) uid: (admin7/admin/admin)
gid:
(admin7/admin/admin) cmd: php-script alt_doc_root:
/home/virtual/site7/fst/var/
www chroot: 1
[2003-07-24 15:56:28]: info: (real/target/actual) uid: (admin7/admin/admin)
gid:
(admin7/admin/admin) cmd: php-script alt_doc_root:
/home/virtual/site7/fst/var/
www chroot: 1
[2003-07-24 15:59:59]: info: (real/target/actual) uid: (admin7/admin/admin)
gid:
(admin7/admin/admin) cmd: php-script alt_doc_root:
/home/virtual/site7/fst/var/
www chroot: 1
[2003-07-24 16:00:16]: info: (real/target/actual) uid: (admin7/admin/admin)
gid:
(admin7/admin/admin) cmd: php-script alt_doc_root:
/home/virtual/site7/fst/var/
www chroot: 1
[2003-07-24 16:02:48]: info: (real/target/actual) uid: (admin7/admin/admin)
gid:
(admin7/admin/admin) cmd: php-script alt_doc_root:
/home/virtual/site7/fst/var/
www chroot: 1
[2003-07-24 16:06:06]: info: (real/target/actual) uid: (admin7/admin/admin)
gid:
(admin7/admin/admin) cmd: php-script alt_doc_root:
/home/virtual/site7/fst/var/
www chroot: 1
[2003-07-24 16:06:12]: info: (real/target/actual) uid: (admin7/admin/admin)
gid:
(admin7/admin/admin) cmd: php-script alt_doc_root:
/home/virtual/site7/fst/var/
www chroot: 1
[2003-07-24 16:10:22]: info: (real/target/actual) uid: (admin7/admin/admin)
gid:
(admin7/admin/admin) cmd: php-script alt_doc_root:
/home/virtual/site7/fst/var/
www chroot: 1
----[/SNAP]----
Any idea?
Greetings,
Roger
"Shawn Wilson" <sh***@glassgiant.com> schreef in bericht
news:3F***************@glassgiant.com...
Roger Godefroy wrote:
> Just a little problem I guess... I have stripped out just an > imageresize string for ImageMagic in a php-file:
>
> <?
> exec('convert -quality 100 -antialias -sample 100x100
> /var/www/html/aftermath2.jpg /var/www/html/thumb_aftermath.jpg');
> ?>
>
> The string would work in a shell, but not using the above php-file.
> Any idea's?
When you tried it in the shell, did you use the exact same file in the
exact same directory?
Yupz... in the same folder as the php-script and jpg-file using the
exact string as in the php-file.
Do you get any error messages (use -debug and -log)? Just some
guesses/suggestions:
Are you 100% certain the path is correct (did you blindly copy path
from old server)?
Also without the path it would work on the "old" server. On the new
server, it wouldn't work with the full path /var/www/html or just the filename.
Is the original file at least 100x100?
Original file is 1600x1200
Try 'convert /var/www/html/aftermath2.jpg
/var/www/html/thumb_aftermath.jpg'. That'll at least confirm it's not
the sample, quality or antialias.
Also no output. However executing in a shell, it would...
Make sure /var/www/html/thumb_aftermath.jpg doesn't exist (could have
trouble replacing).
File not existing...
If you have SSH or Telnet access to the server, try just running the
command. Try with a different image type. I had a helluva time with
PNGs - IM was configured wrong.
Also when testing with a .gif, no result... :(
Hmmm...
Did you try the log?
Maybe try something simple, like
passthru("ls -l /var/www/html/");
If you get a list of stuff in that directory, try passthru with your
convert command...
Maybe this is on the right track:
From PHP.net (exec function)
Note that when in 'Safe Mode' you must have the script or program you are
trying to execute in the 'safe_mode_exec_dir'. You can find out what this
directory is by using phpinfo().
HTH,
Shawn
--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com