Re: Not a regular file?

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

 



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@xxxxxxxxxxxxxxxxxxxx> escreveu na mensagem 
news:C64D4509.2BE0%kmiller13@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxx> wrote:

On Thu, Jun 4, 2009 at 9:07 AM, Miller, Terion
<tmiller@xxxxxxxxxxxxxxxxxxxx> 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





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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