#11228 [Com]: anonymous access incomlete authentication ( fopen() )
| From: | Indian-American62 at hotmail dot com | Date: | Tue, 20 Jul 2004 15:05:17 +0000 |
| Subject: | #11228 [Com]: anonymous access incomlete authentication ( fopen() ) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-62939@lists.php.net to get a copy of this message | ||
ID: 11228
Comment by: Indian-American62 at hotmail dot com
Reported By: kluit at home dot nl
Status: Closed
Bug Type: *Directory/Filesystem functions
Operating System: linux
PHP Version: 4.0.4pl1
New Comment:
<a href=http://www.geocities.com/ylesreuhcs6322/>American
Indian</a>
Previous Comments:
------------------------------------------------------------------------
[2001-05-31 23:21:45] sniper@php.net
I now added the 'from' directive example into php.ini-dist
file which is distributed with the php sources.
--Jani
------------------------------------------------------------------------
[2001-05-31 23:21:07] sniper@php.net
You have to use urlencode() on the password:
<?php
$passwd=urlencode("sniper@php.net");
$fp=fopen("ftp://anonymous:".$passwd."@ftp.funet.fi/pub/README",
"r");
echo fread($fp, 100);
fclose($fp);
?>
OR you can use the undocumented 'from' directive in php.ini
to set your default anonymous ftp/http server password:
from="sniper@iki.fi"
--Jani
------------------------------------------------------------------------
[2001-05-31 19:22:13] kluit at home dot nl
Using the fopen() command as fopen (ftp://url/file) logs on as user
anonymous, but the password send in not a complete e-mail adres. My
remote server declined acces. An
fopen(ftp://anonymous:john@doe.com@server/file, r) does not work,
resulting in a bad file description error.
I found my ISP server letting itself trick with john!doe.com
and fopen(anonymous:john!doe.com@server/file, r) is being correct
interpreted by php.
Maybe it's an idea to include a full e-mail adres in anonymous access
or to change the @ separater to something else?
gr. robin
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=11228&edit=1