Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

PHP funkcija ftp_connect.

[es] :: PHP :: PHP funkcija ftp_connect.

[ Pregleda: 1371 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

*Winy*
NS

Član broj: 17202
Poruke: 119
*.adsl.eunet.rs.



+3 Profil

icon PHP funkcija ftp_connect.31.10.2011. u 12:35 - pre 151 meseci
Pozdrav,

Imam sledeci problem:
bilo bi potrebno da se web aplikacija konektuje na ftp server. Koristio sam ftp_connect u formi ftp_connect('server.net',21,10) pa cak i samo ftp('server.net').
Na xampp serveru sve fercera kako sam zamislio ali na centos serveru sve se gubi. Ne dobijam nikakvu gresku ali konekcija nije uspesna. Ftp je takodje enable-ovan na centos-u.
U ipatables-u je otvoren port 21 kao i port 20 ali idalje nista. Cak sam i zaustavio firewall na trenutak ali ne pomaze. Telnetom medjutim uspevam da se konektujem na 21. port servera.

Ako neko ima neku ideju molim da se javi.

Hvala u napred!
NeverHood
 
Odgovor na temu

*Winy*
NS

Član broj: 17202
Poruke: 119
*.adsl.eunet.rs.



+3 Profil

icon Re: PHP funkcija ftp_connect.31.10.2011. u 14:06 - pre 151 meseci
Ovo sam nasao i pomoglo je:

I had some major problems running ftp_connect from my Web Browser and not from the CLI from 1 server and yet from another Internal server I had no trouble at all. After a few hours I figured out this was because SELINUX was enabled on one server and DISABLED on the server that it worked on.

So in short, if you are having trouble with connecting in your Web Browser make sure you have HTTPD connect's enabled in it like so at the command prompt:

; Turns it on temporarily.
/usr/sbin/setsebool httpd_can_network_connect=1

; Turns it on Permenantly
/usr/sbin/setsebool -P httpd_can_network_connect=1

I hope this helps make someones life a little easier. :)
(I actually found this fix on the fopen manual page).


NeverHood
 
Odgovor na temu

dakipro
Dalibor Jovic
Web Developer
Bergen, Norway

Moderator
Član broj: 31848
Poruke: 1792
*.dynamic.sbb.rs.

Sajt: norway.dakipro.com


+190 Profil

icon Re: PHP funkcija ftp_connect.31.10.2011. u 14:29 - pre 151 meseci
Pohvale sto si nesebicno podelio resenje problema
 
Odgovor na temu

[es] :: PHP :: PHP funkcija ftp_connect.

[ Pregleda: 1371 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.