It is currently Mon Jul 16, 2018 6:19 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 
Noobie
Noobie

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?
Code:
//using fopen
$res = fopen( "https://xx.yyy.ch/desiredpage", "r" );

//using fsockopen
$res = fsockopen( "ssl://xx.yyy.ch/desiredpage", 443, $errno, $errstr, $timeout = 30);


The errors look like this:
Code:
Warning: fopen(https://xx.yyy.ch/desiredpage) [function.fopen]: failed to open stream: Permission denied in /home/www/ethsms.cogia.net/food.php on line 65

and
Code:
Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://xx.yyy.ch:443 (Permission denied) in /home/www/ethsms.cogia.net/food.php 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.


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

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

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...


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

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:  
cron
100WebSpace © 2011