File system & ftp_get/ftp_fget issues
| From: | Jaime Kikpole | Date: | Fri, 18 Oct 2002 21:55:59 +0000 |
| Subject: | File system & ftp_get/ftp_fget issues | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-120569@lists.php.net to get a copy of this message | ||
Running PHP 4.2.3 with FTP compiled into the interpreter. I have
some code that uses ftp_get that doesn't work correctly. The FTP daemon
actually hands off the text file, but the PHP script doesn't write it to
disk (/tmp/pmrc.$username) for some unknown reason. If I su to the user
that runs httpd (apache), it is able to manually run FTP and download the
file to that same path. So its probably not file privileges.
I changed the code to use fopen() and ftp_fget() and now it mostly
works. It gives the following message at the top of the page:
Warning: ftp_fget(): in
/usr/local/squirrelmail/plugins/procfilter/procfilter_options.php on line
178.
Then it proceeds to do everything correctly. According to the
syslog output, the FTP server received the connection, login, and get
command and completed processing them in about 1 or 2 seconds, but it
takes 1 to 3 minutes for the page to appear in my browser. I can deal
with the delay, although I bet its a symptom of the problem and therefore
a clue. The error message at the top of the screen is just silly, though.
Why is it giving me an uninformative error message and then doing things
correctly anyway?
Any suggestions are appreciated.
Thanks,
Jaime
--
Network Administrator
Cairo-Durham Central School District