473,224 Members | 1,607 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

Function file() not working out of the box on several linux distribution

I have a problem getting the file() function in PHP to work on several
linux distributions, for example fedora core 3.

For example file('http://someurl.com/') do not return the content of
that page.

This is when I use the version of Apache and PHP that comes with the
operating system. When I compile Apache and PHP from source it works.
Is there some configuration that can be done so it will work? I need to
make it work on a server where I can not recompile from the source of
Apache and PHP.

Jon Berg.

Jul 17 '05 #1
2 1378
jo******@gmail.com wrote:
For example file('http://someurl.com/') do not return the content of
that page.


Does file() work when requesting "http://www.google.com/"? Then the site you
are probing requires more headers (e.g. user-agent, cookies) than the file()
function provides by default. Try opening the site in FireFox with the
LiveHeaders extension installed and check the received headers.

It is also possible that some boxes simply do not have access to the site,
in which case the configuration of the machine hosting the site should be
modified.
JW

Jul 17 '05 #2
On 24 Jun 2005 07:16:23 -0700, jo******@gmail.com wrote:
I have a problem getting the file() function in PHP to work on several
linux distributions, for example fedora core 3.

For example file('http://someurl.com/') do not return the content of
that page.

This is when I use the version of Apache and PHP that comes with the
operating system. When I compile Apache and PHP from source it works.
Is there some configuration that can be done so it will work? I need to
make it work on a server where I can not recompile from the source of
Apache and PHP.


http://uk.php.net/manual/en/ref.file...llow-url-fopen

Unless:
http://uk.php.net/manual/en/configur...-fopen-wrapper
... was used at compile time.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Peter Maas | last post by:
Recently I replaced Win2k with Linux on my desktop computer. Using mostly multi-platform software I thought this would be easy. It was not as easy as expected getting wxPython to work. There seemed...
0
by: Jim Williams | last post by:
I am not able to get MYSQL running on Suse Linux Enterprise Server. I tried stopping with the command mysqld and it reported, "Shtudown Complete." Then when I tried to restart it with the...
17
by: gnu | last post by:
You can compile anything you want. Redistribute anything you want. You can name the OS distribution your name burn CDs with it and make a donation to 100 schools. You can make a distribution boot...
26
by: blah | last post by:
ok, i m going to use Linux for my Python Programs, mainly because i need to see what will these fork() and exec() do. So, can anyone tell me which flavour of linux i should use, some say that...
2
by: nospam_timur | last post by:
I'm writing a Linux device driver that needs to compile with several different Linux versions. In my code, I need to reference certain functions by their address alone. Something like this: ...
1
by: Benny Ng | last post by:
Dear All, Now I just finished my winform application. And a part of that is to send email reminder to the users. It's working fine in the server that with SMTP service in Windows 2003. But now...
15
by: dspfun | last post by:
Hi, Is it possible to print the function name of the calling function? For example, f1() and f2() both calls f3(), in f3() I would like to print the name of the function calling f3() which...
44
by: climber.cui | last post by:
Hi all, Does anyone have experience on the thread-safty issue with malloc()? Some people said this function provided in stdlib.h is not thread- safe, but someone said it is thread safe. Is it...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.