y2khines
12-02-2006, 11:45 AM
Hello all..
I'm switching to bluehost and can't get FTP via PHP access to work. PHPINFO shows that FTP is enabled...
./configure' '--enable-pic' '--with-libdir=lib64' '--prefix=/usr' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-iconv' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pdflib' '--with-pear' '--with-pgsql=/usr' '--with-pspell' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--with-zlib'
... But I can't get my main script to connect to my remote FTP server. Here's a simple script using curl, and it also fails to connect. My old webhost account with my previous provider is still active, and this script along with the main script work fine.
<?
// create a new curl resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "ftp://uname:password@13.13.13.13/foldername/version.inf");
curl_setopt($ch, CURLOPT_HEADER, 1);
// grab URL and pass it to the browser
curl_exec($ch);
// close curl resource, and free up system resources
if (curl_errno($ch))
{
echo curl_error($ch);
}
else
{
curl_close($ch);
}
?>
Any ideas?
Thanks.
CH
I'm switching to bluehost and can't get FTP via PHP access to work. PHPINFO shows that FTP is enabled...
./configure' '--enable-pic' '--with-libdir=lib64' '--prefix=/usr' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-iconv' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pdflib' '--with-pear' '--with-pgsql=/usr' '--with-pspell' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--with-zlib'
... But I can't get my main script to connect to my remote FTP server. Here's a simple script using curl, and it also fails to connect. My old webhost account with my previous provider is still active, and this script along with the main script work fine.
<?
// create a new curl resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "ftp://uname:password@13.13.13.13/foldername/version.inf");
curl_setopt($ch, CURLOPT_HEADER, 1);
// grab URL and pass it to the browser
curl_exec($ch);
// close curl resource, and free up system resources
if (curl_errno($ch))
{
echo curl_error($ch);
}
else
{
curl_close($ch);
}
?>
Any ideas?
Thanks.
CH