Re: Not a regular file?

From: Date: Thu, 04 Jun 2009 14:39:01 +0000
Subject: Re: Not a regular file?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-293608@lists.php.net to get a copy of this message
I´m not sure, nut I think you cant put a file into a ftp server using http, you must use the $_SERVER["DOCUMENT_ROOT"] to get the file you want to put. -- João Cândido de Souza Neto SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS Fone: (0XX41) 3033-3636 - JS www.siens.com.br ""Miller, Terion"" <tmiller@springfi.gannett.com> escreveu na mensagem news:C64D4509.2BE0%kmiller13@springfi.gannett.com... Here is my code for the ftp_put $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); $FilePath = "http://localhost:8888/HarrisAutomate/output/WebImagesHiRes/$ImageName"; $remote_path = "/httpdocs/Announcements/photos/obitsTest/"; set_time_limit(120); ftp_pasv($conn_id, true); // upload a file if (ftp_put($conn_id, $remote_path, $FilePath, FTP_BINARY)) { echo "successfully uploaded $ImageName\n"; } else { echo "There was a problem while uploading n"; } // close the connection ftp_close($conn_id); Since it is passing a full path I don't know how it can be only going to the directory? On 6/4/09 9:22 AM, "haliphax" <haliphax@gmail.com> wrote: On Thu, Jun 4, 2009 at 9:07 AM, Miller, Terion <tmiller@springfi.gannett.com> wrote: > I've never encountered this error: > > Warning: ftp_put() [function.ftp-put]: > /httpdocs/Announcements/photos/obitsTest/: Not a regular file in > /Applications/MAMP/htdocs/HarrisAutomate/ObitsTester.php on line 149 > There was a problem while uploading 659428.jpg 658626 > > Can't find much info on how to correct it, anyone seen this? http://www.lmgtfy.com/?q=php+%22not+a+regular+file%22 Apparently, it's not actually a file in the first place. Just a guess--but most all incidents of ftp_put throwing this error that I've found in web searches point to someone using it on a directory/etc. -- // Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#293608) next »