Frequent Questions: Simple Hosting - General Questions

Can I debug my code remotely with xdebug?

Using xdebug to debug your code remotely from within your favorite IDE is perfectly possible on PHP/MySQL Simple Hosting instances as long as you have a public IP address for the instance to connect to.

To do so, indicate the following directives in your instance’s php-custom.ini configuration file:

zend_extension = /usr/lib/php5/20100525/xdebug.so
xdebug.default_enable=on
xdebug.remote_autostart = On
xdebug.remote_connect_back = Off
xdebug.remote_enable = On
xdebug.remote_handler =  dbgp
xdebug.remote_host = X.X.X.X
xdebug.remote_port = 9000

The xdebug.remote_host directive must contain your public IP address.

Once the file has been modified, the instance must be restarted for the parameters to be taken into account.

Note

Xdebug connects to the client machine on port 9000 via TCP by default. Make sure your firewall is configured to allow incoming connections on this port!

Client-side configuration depends on the software used. A list of clients is available at xdebug.org.

Public IP addresses of instances for authorization

A Simple Hosting instance does not have an public IP Address, but rather, a private IP address; this is because they are not intended to be accessed directly. All of the connections that are made to the instance (notably for websites that they host) are made through web accelerators (varnish) that are ahead of the instances.

Consequently, the IP addresses to authorize in order to allow the passage of requests coming from an instance are those from the datacenter where the instance is located:

  • LU-BI1: 217.70.186.133 and 217.70.186.134
  • FR-SD3: 155.133.132.64/26
  • FR-SD5: 155.133.138.64/26
  • FR-SD6: 155.133.142.64/26

Warning

It is important to keep in mind that any Simple Hosting instance can make requests from these IPs, whether it is your own or not.