Hosting Knowledge Base

Home » Knowledge Base » Control Panel » Website Manager » Hosting Settings

Knowledge Base

Hosting Settings

Restrictions on the PHP functions file() and fopen()

When using the PHP functions files() and fopen() you need to specify the local path to the file instead of being a link.
For example, if you use fopen("http://yoursite.com/index.htm","r");, your fopen() function might not work properly, because your account will not be able to access the file.
To resolve this problem you have two options:
1. If you use a paid hosting plan by enabling the outgoing HTTP connections for your account using the “How to establish a connection to remote scripts/servers, RSS feeds?
2. You need to replace the path to the file from http://yoursite.com/index.htm to index.htm, thus making your function look like this: fopen("index.htm","r");

 

How to establish a connection to remote scripts/servers, RSS feeds?

Due to security reasons, the outgoing connections for all customer accounts are disabled by default. This means your scripts, hosted on our servers, will not be able to communicate with other servers.

Enabling connection to external/remote servers is possible only for paid hosting plan customers using the Control Panel -> Hosting Tools -> Website Manager -> Hosting Settings -> “Firewall Options” and finally clicking on the “Enable” button. This will enable the outbound connections on ports 80, 443 and 3306.