imagemagick wird nicht erkannt

Hier können Probleme und alles andere in Deutscher Sprache gelöst werden.
xeomueller
Regular
Posts: 11
Joined: Tue Aug 01, 2006 8:45 pm
Location: Leipzig
Contact:

Post by xeomueller »

also ich danke dir wirklich für deine mühe. Ich hoffe das Problem hilft anderen später auch mal weiter :)

ich habe php 4.4.0 auf dem server
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Was sagt denn auf SSH-Ebene ein:

"ls -la /usr/local/bin/convert"?

Evtl. sind die permissions da nicht ganz exakt gesetzt, so dass PHP daran einen schluckauf kriegt?

Viele Grüße,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
xeomueller
Regular
Posts: 11
Joined: Tue Aug 01, 2006 8:45 pm
Location: Leipzig
Contact:

Post by xeomueller »

-rwxrwxrwx 1 root root 26564 Aug 1 17:58 /usr/local/bin/convert
ergibt:

Code: Select all

-rwxrwxrwx  1 root root 26564 Aug  1 17:58 /usr/local/bin/convert
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Puh, da bin ich jetzt ratlos und kann nur auf einen PHP-Bug tippen, dass die is_executable() funktion einen Bug hat. Möchtest Du den Bug mit dem kleinen Code und deinen Snippets in den PHP-Bugtracker eintragen?

Viele Grüße
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
xeomueller
Regular
Posts: 11
Joined: Tue Aug 01, 2006 8:45 pm
Location: Leipzig
Contact:

Post by xeomueller »

ööhm, wenn du mir sagst wie und wo? Ich habe sowas noch nie gemacht. Aber ich machs :)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Unter http://bugs.php.net. Dort trägst Du alle Versionsnummer sachen ein und weist auf den kleinen Beispielcode hin:

Code: Select all

<?php
$dir = '/usr/local/bin';
if (function_exists('is_executable')) echo 'is_executable exists ';
if (function_exists('is_executable') && is_executable($dir . '/convert')) { echo 'File is executable'; } else { echo 'File is NOT executable '; }
if (is_file($dir . '/convert')) echo 'File IS_FILE '; 
und dann das, was Du als Ausgabe erhälst:

Code: Select all

is_executable exists File is NOT executable
und was Du erwarten würdest:

Code: Select all

is_executable exists File is executable File IS_FILE
Und dann noch das, was "ls -la /usr/local/bin/convert" bei Dir ausgegeben hat. Ich hoffe dass reicht denen dann. :)

Viele Grßüe,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Ich habe hier auch ein Problem mit Image magick:

Ich habe meinen Hoster gefragt, wo bei ihm magick liegt und das dann eingetragen. Doch es funktioniert nicht.

Hier mal meine Mail an meinen Hoster und seine Antwort.
> Konnte folgendes Programm nicht ausführen: "/usr/local/srv/binary/ -antialias -resize '130x130'
'/home/xxx/htdocs/uploads/test.JPG'
'/home/xxx/htdocs/uploads/test.serendipityThumb.JPG'", Fehlermeldung: ,
Rückgabewert: 127

>

> Und wenn ich (wie bei anderen Installationen gesehen) noch ein convert dranhänge, dann hilft das auch nicht:

>

> Konnte folgendes Programm nicht ausführen: "/usr/local/srv/binary/convert -antialias -resize '130x130'
'/home/xxx/htdocs/uploads/test.JPG'
'/home/xxx/htdocs/uploads/test.serendipityThumb.JPG'", Fehlermeldung: ,
Rückgabewert: 127
Antwort:
Benutzt Du die Parameter für v.5 oder 6? Diese sind in der Reihenfolge

unterschiedlich.
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Du musst "/usr/local/srv/binary/convert" eintragen, nicht nur den Pfad.

Viele Grüße,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Hab' ich doch gemacht!?
> Und wenn ich (wie bei anderen Installationen gesehen) noch ein convert dranhänge, dann hilft das auch nicht:
Es ging mir deshalb auch mehr um die Frage meines Hosters zur Version.
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Die Parameterreihenfolge ist egal, leider hat das nichts mit dem Problem zu tun.

Das Problem scheint eher daran zu liegen, dass die Execution-Parameter von der 'convert' Binary evtl. falsch sind, oder dass PHP exec() Einschränkungen hat.

Schreib Dir mal ein einfaches PHP SCript:

Code: Select all

<?php
passthru('/usr/bin/whoami');
Grüße,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Hm, und was soll dann passieren? Hier passiert jedenfalls nix.
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Da sollte dann "www" oder "wwwrun" oder so rauskommen. Wenn da nix rauskommt heißt dass, dass generell anscheinend keine externen Shell-Programme bei Dir ausgeführt werden können.

"whoami" sollte jedenfalls ein Standard-Linux-Utility auf jedem Server sein.

Grüße,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Und insbesondere das hier sollte doch auch was zeigen, oder?

Code: Select all

<?php

passthru('/usr/bin/whoami');

passthru('/usr/local/srv/binary/convert -help');
?>
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Jupp, genau. Probier alternativ mal exec()?

[etwas doku unter http://php.net/exec ]

Grüße,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Code: Select all

<?php

echo "system:<br>";

system("/usr/bin/whoami",$ausgabe1);  
echo sprintf($ausgabe1);


system("/usr/local/srv/binary/convert -help",$ausgabe);  
echo sprintf($ausgabe);

echo "passthru:<br>";

passthru('/usr/bin/whoami');

passthru('/usr/local/srv/binary/convert -help');


echo "exec:<br>";


$cmd1=escapeshellcmd('/usr/bin/whoami');
exec($cmd1, $output1, $result1);
                echo sprintf($cmd1, $output1[0], $result1);


$cmd=escapeshellcmd('/usr/local/srv/binary/convert -help');
exec($cmd, $output, $result);
                echo sprintf($cmd, $output[0], $result);


?>

liefert mir

Code: Select all

system:
127
127

passthru:

exec:
/usr/bin/whoami/
usr/local/srv/binary/convert -help
Ciao, Stephan
Post Reply