PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Problem mit PHP imagecreatefromjpeg


darph
2004-07-29, 15:23:03
Also php.net sagt

imagecreatefromjpeg
(PHP 3>= 3.0.16, PHP 4 , PHP 5)
imagecreatefromjpeg -- Erzeugt ein neues Bild im JPEG-Format, welches aus einer Datei oder von einer URL gelesen wird


Das funzt aber net.

Wenn ich eine Pfadangabe mache, klappt es.
$bild="./bilder/einfahrt.jpg";

- das klappt.

aber $bild = "http://localhost/bilder/einfahrt.jpg";

klappt nicht und gibt eine abenteuerliche Fehlermeldung aus.

Die Datei gibt es und die Pfadangabe stimmt auch.

Es liegt eindeutig an der URL.

Aber warum geht das nicht, wenn php.net sagt, daß das geht?




Hier die Fehlermeldung ;(

<br />
<b>Warning</b>: imagecreatefromjpeg: Unable to open 'http://localhost/bilder/einfahrt.jpg' for reading in <b>e:\container\phpdev\www\functions.php</b> on line <b>66</b><br />
<br />
<b>Warning</b>: imagecopyresized(): supplied argument is not a valid Image resource in <b>e:\container\phpdev\www\functions.php</b> on line <b>72</b><br />
ÿØÿàJFIFÿþ;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 50
ÿÛC 

(1#%(:3=<9387@H\N@DWE78PmQW_bghg>Mqypdx\egcÿÛC//cB8BccccccccccccccccccccccccccccccccccccccccccccccccccÿÀOx"ÿÄ
ÿĵ}!1AQa"q2?‘¡#B±ÁRÑð$3br‚
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂà ÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ
ÿĵw!1AQaq"2?B‘¡±Á #3RðbrÑ
$4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂà ÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?óú(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€
(¢€?ÿÙ<br />
<b>Warning</b>: imagedestroy(): supplied argument is not a valid Image resource in <b>e:\container\phpdev\www\functions.php</b> on line <b>75</b><br />

Kant
2004-07-29, 15:35:10
Hallo,

2 Ideen :

a) allow_url_fopen ist nicht auf "1" (in php.ini)

b) Nur bei Windows : "On Windows versions prior to PHP 4.3.0, the following functions do not support remote file accessing: include(), include_once(), require(), require_once() and the imagecreatefromXXX functions in the Reference XLII, Image Functions extension."

darph
2004-07-29, 15:39:09
Original geschrieben von Kant
Hallo,

2 Ideen :

a) allow_url_fopen ist nicht auf "1" (in php.ini)ist "On"
Original geschrieben von Kant
b) Nur bei Windows : "On Windows versions prior to PHP 4.3.0, the following functions do not support remote file accessing: include(), include_once(), require(), require_once() and the imagecreatefromXXX functions in the Reference XLII, Image Functions extension."
PHP Version 4.2.3

Das könnte es gewesen sein. :rolleyes: ;(

na gut, muß ich 'blind' weiter entwickeln ;(


Danke