By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,564 Members | 810 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,564 IT Pros & Developers. It's quick & easy.

File open website page error

100+
P: 196
The error :

http://www.somesite.com
Warning: fopen() [function.fopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /etc/etc/etc/etc/test.php on line 766

Warning: fopen(http://www.somesite.com) [function.fopen]: failed to open stream: Success in /home/etc/etc/etc/etc/test.php on line 766
Unable to open file!

I cant actually figure out what the error is reffering to???

By the way the code of line 766 is:

Expand|Select|Wrap|Line Numbers
  1. $file = fopen($nextPage, "r") or exit("Unable to open file!");
  2.  
My guess is that it reffering to not being able to open the address contain in the variable $nextPage.

Can someone please tell me if this is the actual error or if its reffering to something else.
May 20 '08 #1
Share this Question
Share on Google+
5 Replies


100+
P: 196
Don't worry i figured out what the problem was,

It was so simple, i was trying to open a non existant file lol;

Thanks anyway
May 20 '08 #2

hsriat
Expert 100+
P: 1,654
Don't worry i figured out what the problem was,

It was so simple, i was trying to open a non existant file lol;

Thanks anyway
You should try file_exists in case its not sure whether file is there or not.
May 20 '08 #3

mageswar005
P: 72
Hi,
Please give the chmod permission(777) for folder.

by
mageswaran
May 22 '08 #4

ronverdonk
Expert 2.5K+
P: 4,258
Hi,
Please give the chmod permission(777) for folder.

by
mageswaran
And why is that? OP only needs to open the file for read.

Ronald
May 22 '08 #5

dlite922
Expert 100+
P: 1,584
Hi,
Please give the chmod permission(777) for folder.

by
mageswaran
Are you trying to hack OP's server? relax, he's not writing to the folder.
May 23 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.