GetDotted Domains

Viewing Thread:
"php fopen error"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Fri 02/11/07 at 23:25
Regular
Posts: 9
Can anyone shed some light on the following problem?

I have three areas of web space on Freeola servers 2, 6 and 8.
On server 8 I have some graphics that I need to access from the other two servers. Before attempting to include the required graphics a check, using the php function 'fopen', is made to see if the file exists (if it doesn't a default graphic is used).

The code on server 2 works as expected, ie it finds the file, opens it and then closes it.

The code on server 6 is identical but generates a 'failed to open stream: Permission denied in /freeola/ users/ 6/ 9/ srnumber/ htdocs/ path/ functions.php on line xxx'

The thing that is puzzling me is that it works from one server but not the other. Any suggestions/ideas/solutions would be greatly appreciated.
Fri 25/01/08 at 13:19
Regular
Posts: 13
Eccles,
Any news on the fopen problems?
Thu 24/01/08 at 14:58
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
Hi toshinmac,

The issue with sessions and open_basedir should now be fixed. Could you send me the full paths of the scripts that are having trouble using fopen and also the paths of the ones that work on web server 2 and I can then check this out more thoroughly. You can use the link under my avatar to send me a message.
Wed 23/01/08 at 23:09
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
No need for a ticket. I'll pass this on to the server engineers tomorrow. I'm not sure how the configuration inconsistencies arose but I'm guessing it through a software upgrade. All the servers should have the same configuration obviously.
Wed 23/01/08 at 22:21
Regular
Posts: 9
Hi postmanpat,

Thanks for the feedback.

Nothing to do with this issue but discovered whilst trying to work around the problem.

I tried putting some code onto server 8 - the first line of which is:
session_start();
and I get:
Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(/var/tmp/) is not within the allowed path(s): (/freeola/users/) in
/freeola/users/8/5/srnumber/htdocs/index.php5 on line 2

Fatal error: session_start() [ function.session-
start
]: Failed to initialize storage module: files (path: ) in
/freeola/users/8/5/srnumber/htdocs/index.php5 on line 2

The code works without issue on server 6 so I looked further into the problem by looking at the server settings using phpinfo();

Server 8 (and some of the others) have 'open_basedir' set to '/freeola/users/'
Server 6 has 'open_basedir' set to 'no value'.

It looks as though there is some inconsistency across the servers in the way that they have been configured.

I think this one warrants a ticket in the first instance.
Wed 23/01/08 at 21:43
Regular
Posts: 13
Hi toshinmac,
They tried to say the problem must be with my script, but after a while they said they'd look into it, and now we've got the response from Eccles which appears to admit they do have something strange going on. I guess we'll have to wait and see ;)

Hi Eccles,
How long until this is sorted? Just a rough guess please ... Are we talking hours, days or weeks.
Thanks
Wed 23/01/08 at 12:42
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
Our web servers should be blocked from allowing outbound http access, so any that allow this are lucky! We are looking at getting this restriction removed so that you can check remote files or use things like RSS feeds.
Hopefully I can update you soon and let you know what the decision is.
Tue 22/01/08 at 23:16
Regular
Posts: 9
Hi,
Rather than go down a ticket raising avenue, I moved the site onto one of the servers where it all worked fine. Not a permanent fix, which I'm now beginning to regret, as the server I moved to (server 3) is now generating the error. So it looks as though I may have to raise a support ticket.
Have you had any joy with the ticket you raised, yet? I'd be interested to know the outcome or if a generic fix is available.

Cheers.
Sat 19/01/08 at 16:16
Regular
Posts: 13
Hi,

How / Did, this problem get resolved?
Because I am suffering from the same problem.
I have some PHP pages which use fopen and if I upload them to either server 0 or 1 they display the error, but if I upload them to server 2 they work fine. And I really want to be able to use them on my web site hosted on server 0.
Also, I swear at the start of the week the same PHP pages were working fine on server 0.
I have raised a support ticket regarding this, so hopefully it will get fixed soon.

Thanks
Sat 03/11/07 at 00:03
Regular
Posts: 9
Hi,
Thanks for the reply. I've checked the servers and found that allow_url_fopen is ON.

The file permissions are set at 755. I wouldn't have thought the permissions to be an issue as the code works perfectly on server 2.

I have done a test using the same code on server0 and find that it fails from there as well.
Fri 02/11/07 at 23:42
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
I'm not 100% but it seems as though allow_url_fopen is not set on server 6 (assuming your file permissions are correct). What does running phpinfo(); on server 6 show? If it shows it as disabled but the other servers are showing as enabled the drop us a support ticket.
If it's read only access you need then why not try is_file()?

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

10/10
Over the years I've become very jaded after many bad experiences with customer services, you have bucked the trend. Polite and efficient from the Freeola team, well done to all involved.
Best Provider
The best provider I know of, never a problem, recommend highly
Paul

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.