Pomoć oko WAMP i stranice u php

Pozdrav ljudi. Problem je ovaj. Kada pokrenem stranicu index.php koja mi je potrebna dobijem ovaj rezultat u bilo kojem browseru kojeg koristim.

Warning: imagecreatefrompng(captcha.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in C:\xampp\htdocs\youpwncaptcha\index.php on line 12

Warning: imagepng() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\youpwncaptcha\index.php on line 16

Warning: imagedestroy() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\youpwncaptcha\index.php on line 17

Warning: imagecreatefrompng(captcha.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in C:\xampp\htdocs\youpwncaptcha\captchabreaker.php on line 8

Warning: imagecopy() expects parameter 2 to be resource, boolean given in C:\xampp\htdocs\youpwncaptcha\captchabreaker.php on line 40
*
Warning: unlink(fbcaptcha.jpg) [function.unlink]: No such file or directory in C:\xampp\htdocs\youpwncaptcha\index.php on line 23

Warning: unlink(captcha.png) [function.unlink]: No such file or directory in C:\xampp\htdocs\youpwncaptcha\index.php on line 24

Dakle riječ o 2 php fajla i može li mi ko reći zašto nastaje ovaj error? I kako da ga riješim. Nalazio sam nešto po netu tipa da nisu u redu admin prava, da ih treba promjeniti.

Našao sam sličan problem na ovom forumu ali nije mi puno pomogao.

Usput ista stvar mi se dešavala i na wamp i na xamp. Tako da nije do toga.

Onako na brzinu, jesi li probao istestirati da li ti server podržava Captcha-u?
imaš skriptu za test jedne verzije captcha-e http://www.hotdreamweaver.com/uploads/captchatest-build200802.zip,
no znam da moraš imati GD2 ekstenzije i mislim TTF da se zove ili tako nekako :slight_smile:

Evo uradio sam to. Stavio sam u folder test.php i pozvao ga u browseru. Poruka kaže “Congratulations! You can generate captcha images from your server.”

Dakle to smo prošli. Šta dalje? Je li greška u kodu php fajlova?

pa daj nam error log koji ti izbaci appache…

[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagecreatefromjpeg(fbcaptcha.jpg) [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: failed to open stream: No such file or directory in D:\\wamp\\www\\youpwncaptcha\\index.php on line 8
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. imagecreatefromjpeg() D:\\wamp\\www\\youpwncaptcha\\index.php:8
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagepng() expects parameter 1 to be resource, boolean given in D:\\wamp\\www\\youpwncaptcha\\index.php on line 9
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. imagepng() D:\\wamp\\www\\youpwncaptcha\\index.php:9
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagecreatefrompng(captcha.png) [<a href='function.imagecreatefrompng'>function.imagecreatefrompng</a>]: failed to open stream: No such file or directory in D:\\wamp\\www\\youpwncaptcha\\index.php on line 12
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. imagecreatefrompng() D:\\wamp\\www\\youpwncaptcha\\index.php:12
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagefilter() expects parameter 1 to be resource, boolean given in D:\\wamp\\www\\youpwncaptcha\\index.php on line 13
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. imagefilter() D:\\wamp\\www\\youpwncaptcha\\index.php:13
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagefilter() expects parameter 1 to be resource, boolean given in D:\\wamp\\www\\youpwncaptcha\\index.php on line 15
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. imagefilter() D:\\wamp\\www\\youpwncaptcha\\index.php:15
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagepng() expects parameter 1 to be resource, boolean given in D:\\wamp\\www\\youpwncaptcha\\index.php on line 16
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. imagepng() D:\\wamp\\www\\youpwncaptcha\\index.php:16
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagedestroy() expects parameter 1 to be resource, boolean given in D:\\wamp\\www\\youpwncaptcha\\index.php on line 17
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. imagedestroy() D:\\wamp\\www\\youpwncaptcha\\index.php:17
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagecreatefrompng(captcha.png) [<a href='function.imagecreatefrompng'>function.imagecreatefrompng</a>]: failed to open stream: No such file or directory in D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php on line 8
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. breakcaptcha() D:\\wamp\\www\\youpwncaptcha\\index.php:19
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   3. imagecreatefrompng() D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php:8
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagecopy() expects parameter 2 to be resource, boolean given in D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php on line 40
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. breakcaptcha() D:\\wamp\\www\\youpwncaptcha\\index.php:19
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   3. imagecopy() D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php:40
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagecopy() expects parameter 2 to be resource, boolean given in D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php on line 40
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. breakcaptcha() D:\\wamp\\www\\youpwncaptcha\\index.php:19
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   3. imagecopy() D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php:40
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagecopy() expects parameter 2 to be resource, boolean given in D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php on line 40
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. breakcaptcha() D:\\wamp\\www\\youpwncaptcha\\index.php:19
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   3. imagecopy() D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php:40
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagecopy() expects parameter 2 to be resource, boolean given in D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php on line 40
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. breakcaptcha() D:\\wamp\\www\\youpwncaptcha\\index.php:19
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   3. imagecopy() D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php:40
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagecopy() expects parameter 2 to be resource, boolean given in D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php on line 40
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. breakcaptcha() D:\\wamp\\www\\youpwncaptcha\\index.php:19
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   3. imagecopy() D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php:40
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  imagecopy() expects parameter 2 to be resource, boolean given in D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php on line 40
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. breakcaptcha() D:\\wamp\\www\\youpwncaptcha\\index.php:19
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   3. imagecopy() D:\\wamp\\www\\youpwncaptcha\\captchabreaker.php:40
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  unlink(fbcaptcha.jpg) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in D:\\wamp\\www\\youpwncaptcha\\index.php on line 23
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. unlink() D:\\wamp\\www\\youpwncaptcha\\index.php:23
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Warning:  unlink(captcha.png) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in D:\\wamp\\www\\youpwncaptcha\\index.php on line 24
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() D:\\wamp\\www\\youpwncaptcha\\index.php:0
[Sun Jan 22 00:20:07 2012] [error] [client 127.0.0.1] PHP   2. unlink() D:\\wamp\\www\\youpwncaptcha\\index.php:24

Momci mislim da sam našao rješenje problema. Kad detaljno iz analiziram javim se. Nemojte se zamarati sa čitanjem ovog loga gore.

Neznam, mislio sam da neki modul fali, ja bi to frknuo gore na server i probao ako radi gore na netu. Puno put mene zna stekat taj wamp a na netu radi… dan danas nemogu pokrenuti ovu svoju stranicu lokalno isto baca error, na netu sve 5

Problem je bio linija koda u index.php
Da bi radilo funkcija mora uzimati vrijednost, a kad nema slike onda javlja ovaj error. Kada sam postavio sliku u folder onda je ok. E sad pošto je na kraju index.php komanda unlink za taj fajl drugi put kad otvorim localhost dešava se ovo isto gore. Tek kad stavim // ispred unlink komande onda mogu više puta otvarati localhost.


Copyright © 2020 WM Forum - AboutContact - Sponsored by: Mydataknox & Webmaster.Ninja