100 Web Space

PHP: fopen() / fsockopen(): Permission denied.
Page 1 of 1

Author:  fl4ke [ Sun Oct 12, 2008 7:32 pm ]
Post subject:  PHP: fopen() / fsockopen(): Permission denied.

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( "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:
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

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.

Author:  palmer100 [ Mon Oct 13, 2008 8:23 pm ]
Post subject: 


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

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group