It is currently Sun May 31, 2020 7:29 pm

All times are UTC

Forum rules

Please click here to view the forum rules

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: PHP: fopen() / fsockopen(): Permission denied.
PostPosted: Sun Oct 12, 2008 7:32 pm 

Joined: Sun Oct 12, 2008 5:56 pm
Posts: 1
Hi all.
I just created a free web space account and wanted to test one of my scripts, when i encountered an error.
Problem is as follows:
I need to call an extern script and at first i did so by using fopen(). It then resulted in an error, so I tried fsockopen, changed the whole code but still there is an error that says "Permission denied". I don't get why I don't have permission to access a freely available resource (->web page).. Any ideas?
//using fopen
$res = fopen( "", "r" );

//using fsockopen
$res = fsockopen( "ssl://", 443, $errno, $errstr, $timeout = 30);

The errors look like this:
Warning: fopen( [function.fopen]: failed to open stream: Permission denied in /home/www/ on line 65

Warning: fsockopen() [function.fsockopen]: unable to connect to ssl:// (Permission denied) in /home/www/ on line 90
Permission denied (13)

When I run it on my own test environment it works perfectly. Could it be because I use https?

Thanks in advance.

 Post subject:
PostPosted: Mon Oct 13, 2008 8:23 pm 

Joined: Wed Oct 01, 2008 7:07 pm
Posts: 1
Location: UK

I'm no PHP expert but have you tried not using HTTPS?
Obviously you will require certificates and ports being available for the pages to work. I'd keep it simple first - get it working on port 80 HTTP and then upgrade it to HTTPS...

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ]  Moderators: KJ, fhmagic, Moderators, Support Team

All times are UTC

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
100WebSpace © 2011