LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-12-2011, 03:14 AM   #1
astroboy44
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Rep: Reputation: 0
Connecting to pureftp server..


Hi guys,I am trying to connect to pureftp server but unable to do it.
I'm testing on localhost.I have started httpd and pure-ftpd server.
PHP Code:
<?php
$ftp_server
="localhost";
ftp_connect($ftp_server) or die("connection failed");
?>
When I execute the above code I get "connection failed".But when I type ftp://localhost/ in the browser directly ,it works perfectly fine and shows the ftp folder.
I'd be glad if anyone could help me.
Thank you.
 
Old 01-13-2011, 02:14 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Why do you need ftp connection within a php would be my first question when native browsers support the ftp protocol?
 
Old 01-15-2011, 10:26 PM   #3
astroboy44
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by trickykid View Post
Why do you need ftp connection within a php would be my first question when native browsers support the ftp protocol?
I am developing a ftp file explorer so I need it.
 
Old 01-16-2011, 01:16 PM   #4
bmarx
Member
 
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 202

Rep: Reputation: 34
A few questions:

Does the php error log show anything? Does the pure-ftpd server error log show anything? Have you tried disabling your firewall? Are you able to ftp to localhost from the command line ($ftp localhost)? Have you tried doing a packet capture on the loopback interface during both connection attempts ($tcpdump -s 0 -i lo)?
 
Old 01-17-2011, 01:04 PM   #5
astroboy44
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bmarx View Post
A few questions:

Does the php error log show anything? Does the pure-ftpd server error log show anything? Have you tried disabling your firewall? Are you able to ftp to localhost from the command line ($ftp localhost)? Have you tried doing a packet capture on the loopback interface during both connection attempts ($tcpdump -s 0 -i lo)?
wow, didn't do any of those you mentioned there.Will try and get back.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pureftp Golf Linux - Software 1 04-09-2006 08:41 PM
pureftp config mattsoftnet Linux - Software 1 02-20-2006 09:20 AM
bad ftp speeds from server (slack10.1 + pureftp) ride153 Linux - Networking 2 10-30-2005 07:24 PM
can not connect to my pureftp server from Linux client, but i can from windows client bonito SUSE / openSUSE 5 03-16-2005 10:45 PM
Pureftp - cannot see files? paidhitman Linux - Newbie 1 07-30-2004 07:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration