Re: Trouble with PEAR Capatcha

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 31, 2016 at 10:37 AM, Karl-Arne Gjersøyen <karlarneg@xxxxxxxxx>
wrote:

> Hello. I am trying to write a form with capatcha but run into trouble.
> Below is what my error_log tells me. I am using LAMP on a Ubuntu Desktop.
> (Laters version)
>
> The link to the <img src="capatcha.php"> is broken or the error is in Line
> 42 that is like this:
>
> file_put_contents(md5(session_id()) . '.png', $png);
>
>
> [Thu Mar 31 16:28:39.294818 2016] [:error] [pid 10425] [client
> 127.0.0.1:41186] PHP Warning:
> file_put_contents(d41d8cd98f00b204e9800998ecf8427e.png): failed to open
> stream: Permission denied in /home/karl-arne/public_html/privat/s.php on
> line 42, referer: http://localhost/~karl-arne/privat/captcha_skjema.php
> karl-arne@karlarne-Lenovo-Z50-70:~/public_html/privat$ sudo ps aux | grep
> httpd
> [sudo] password for karl-arne:
> karl-ar+ 29230  0.0  0.0  17184  2212 pts/12   S+   16:30   0:00 grep
> --color=auto httpd
> karl-arne@karlarne-Lenovo-Z50-70:~/public_html/privat$
>
> I am using the example from
> http://pear.php.net/manual/en/package.text.text-captcha.example.php
>
> Thanks.
>
>
> Karl
>

1) Use absolute paths [optional
2) Make sure you have permission where you are writing to, which is why you
are getting the error: 'Permission denied'

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux