Forums and Chat for Indonesia's English-speaking community
Topic Options
Rate This Topic
#5138 - 19 Mar 06 15:45 php problem
KuKuKaChu Moderator Offline
Pooh Bah

Registered: 09 Oct 05
Posts: 10790
Loc: Centre of the Universe
any php programmers here??

i want to read a cgi file on another server (attributes set to 777) using php.

i've tried :

$aLine = file("http://server.com/cgi/filename.cgi")

but this does not work; file is always not found even though it's there ... i can open html extension files, even though the permissions are exactly the same ...

any suggestions?
_________________________
KuKuKaChu: dangerously too sophisticated

Top
#5139 - 19 Mar 06 15:58 Re: php problem
Ena Offline
Member*

Registered: 26 Nov 05
Posts: 765
Loc: Sydney
thats english???
i suggest im a luddite!
_________________________
http://au.youtube.com/watch?v=bIEOZCcaXzE

..take only what you need..

Top
#5140 - 19 Mar 06 16:03 Re: php problem
KuKuKaChu Moderator Offline
Pooh Bah

Registered: 09 Oct 05
Posts: 10790
Loc: Centre of the Universe
trust me ... it's an extremely simple code fragment wink

just as well you don't have to see what goes on behind JakChat wink
_________________________
KuKuKaChu: dangerously too sophisticated

Top
#5141 - 20 Mar 06 05:17 Re: php problem
Polar Bear Offline
Pujangga Besar

Registered: 23 Nov 05
Posts: 6177
Quote:
Originally posted by KuKuKaChu:
any php programmers here??

i want to read a cgi file on another server (attributes set to 777) using php.

i've tried :

$aLine = file("http://server.com/cgi/filename.cgi")

but this does not work; file is always not found even though it's there ... i can open html extension files, even though the permissions are exactly the same ...

any suggestions?
I dont understand, that should work no problem.

Any firewall issues?

Top
#5142 - 20 Mar 06 07:00 Re: php problem
KuKuKaChu Moderator Offline
Pooh Bah

Registered: 09 Oct 05
Posts: 10790
Loc: Centre of the Universe
don't know about firewall problems; however, it seems that my okusi server (in canada) is "protecting" files with extension .cgi. if i rename the .cgi file with a .txt extension, for example, i can open it no problem. so there's something on the server side which is intervening whenever something from outside the server attempts to read .cgi file contents ...

unfortunately, my knowledge of unix is less than complete so i don't know how to get around this ... any suggestions as to what i could do??
_________________________
KuKuKaChu: dangerously too sophisticated

Top
#5143 - 20 Mar 06 07:12 Re: php problem
Polar Bear Offline
Pujangga Besar

Registered: 23 Nov 05
Posts: 6177
UNIX is a highy configurable beast. Unlike Windows, you can optimise UNIX to preform for appications etc. It also has good security features. It looks like someone has disallowed CGI file access.

not sure of a quick solution, but i have a meeting with a UNIX Engineer this afternoon, I will discuss with him.

Top
#5144 - 20 Mar 06 20:37 Re: php problem
g00f13 Offline
Member*

Registered: 12 Nov 05
Posts: 739
Loc: earth
Kuku, I'm not much of a programmer, but as I understand it, a cgi file can only be 'captured' once run.

Another thing you can try is to use the IP address instead of the named address.

Top
#5145 - 21 Mar 06 04:34 Re: php problem
Polar Bear Offline
Pujangga Besar

Registered: 23 Nov 05
Posts: 6177
But if he can read it with a txt extension.....

Top
#5146 - 21 Mar 06 09:58 Re: php problem
KuKuKaChu Moderator Offline
Pooh Bah

Registered: 09 Oct 05
Posts: 10790
Loc: Centre of the Universe
Quote:
Originally posted by g00f13:
Kuku, I'm not much of a programmer, but as I understand it, a cgi file can only be 'captured' once run.

Another thing you can try is to use the IP address instead of the named address.
yeah, tried that, but no deal. seems to be something other than normal unix security permissions that is blocking access to files with .cgi extension. if i rename the files with .txt extensions, i can access them.
_________________________
KuKuKaChu: dangerously too sophisticated

Top


Moderator:  NetCop