I am a newbie with limited knowledge. This issue refers to SUSE 11
I need to be able to allow ftp uploads from within a web browser which I know can be done with a PHP script. I have got to the stage where I have successfully installed Apache and vsptd and configured them so that I can see the linux box from a remote computer (both HTTP and ftp).
I have seen my exact question asked but not answered in this forum.
From my research, I understand that PHP needs to have ftp enabled. The nearest instructions I have found say that I have to run the following in the PHP source directory:
./configure -enable -ftp
I don’t know which directory is the PHP source directory, and I have tried doing a system wide search for “configure” without success.
And I have read chapters 21 and 22 in the SUSE reference manual - they didn’t help.
Is it possible to give me sufficently simple instructions on what to do?
I think you’re confusing a few protocols. First, PHP via Apache is not
going to use FTP normally, and PHP doesn’t run via vsftpd (or any other
FTP server) because PHP is interpreted. Using a web browser to upload
files is possible but I don’t think it actually uses FTP in any way but
instead just uses HTTP to send the files. This would use PHP, but still
may not be the best option for you.
So, what are your needs? Do you need to upload via a web browser and if
so, why? If it is because you are uploading from a certain place on your
website with a form and a submit button then that makes sense and PHP
could help with that, but if you want the web browser to “talk” FTP then
usually you point it to ftp://your.site.goes.here/incoming/directory/here
and then let it handle the FTP communications entirely and leave PHP out
of the mix. If this is something you will be doing full time a full FTP
client will make you much happier since they often support continuing a
transfer after it fails, progress bars that are nicer, simpler
authentication, recursive uploads/downloads, etc. With all this said it
comes down to what your needs are.
Good luck.
bctony wrote:
> I am a newbie with limited knowledge. This issue refers to SUSE 11
>
> I need to be able to allow ftp uploads from within a web browser which
> I know can be done with a PHP script. I have got to the stage where I
> have successfully installed Apache and vsptd and configured them so that
> I can see the linux box from a remote computer (both HTTP and ftp).
>
> I have seen my exact question asked but not answered in this forum.
>
> From my research, I understand that PHP needs to have ftp enabled. The
> nearest instructions I have found say that I have to run the following
> in the PHP source directory:
>
> ./configure -enable -ftp
>
> I don’t know which directory is the PHP source directory, and I have
> tried doing a system wide search for “configure” without success.
>
> And I have read chapters 21 and 22 in the SUSE reference manual - they
> didn’t help.
>
> Is it possible to give me sufficently simple instructions on what to
> do?
>
> Many thanks in advance for any help.
>
> Tony
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
I need to embed an ftp client within a web page to make uploads as easy as possible for the least computer literate; i.e. those who would experience difficulty using a standalone client like FileZilla.
One way to do this is to embed a third party product called “ftp navigator” available from the Adobe Dreamweaver add-ons collection. This product is written in PHP and for it to work the PHP server on the host has to be able to connect to the ftp server on the host: hence the “./ configure -enable -ftp” command to the PHP builder.
In the case of the Apache version in SUSE which has PHP5 enabled by default, the PHP5 server doesn’t have the ftp access option compiled in by default. I want to know how to turn it on.
I hope this is a bit clearer, and I apologise if my first question was garbled,
Fine re your explanation on the client side, but on the server side, the two services are distinct. The Apache server (which is what serves PHP pages) doesn’t do FTP. So you would need to set up vsftpd separately. There are various tutorials on this. I would recommend using FTP over SSL to protect passwords and using a separate password database so that you don’t have to create logins and hand out login passwords, which could be dangerous.
The php5-ftp module is more likely to allow PHP pages to act as a FTP client, and isn’t relevant to your task.
As ken wrote you can use the php-ftp module there’s quite a lot of info on the web.
Did a google for “php ftp” and got a lot of hits there is a tutorial here PHP’s FTP functions tutorial