PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This makes it suitable for embedding small pieces of dynamic content into web pages. PHP is also the technology behind most of the world's popular Free Software web applications (including WordPress, MediaWiki, Drupal, Joomla, …). This page gives details on how to set up your webspace for use with PHP.
To use PHP, your scripts should generally have a
For most accounts, this will cause them to run under PHP 7, specifically the
latest Debian-stable version. For shell accounts hosted on sphinx,
other versions are also available.
For most accounts, this is all that is required. Older accounts on sphinx may additionally require the execute bits to be set on any PHP files.
For security reasons, PHP scripts will not be executed if they are
world-writable. You can remove world write permission from a single script with
chmod o-w myscript.php or use
chmod -R o-w . to
remove world write permission from the current directory and all its contents.
Using a custom PHP configuration file
Occasionally it is necessary to override some of PHP's configuration parameters. This can be done by creating a custom configuration file to override the system default values.
Simply name your custom configuration file
.user.ini and place it
in the root directory of your website. Note that the first character of the
filename is a dot.
How PHP is invoked
PHP is commonly invoked through the
mod_php Apache module, but for
security reasons we do not use
Instead, we use a custom CGI shim. You may occasionally come across online
documentation which assumes everyone uses
mod_php, and is thus not
directly applicable to our configuration. Please
contact support if you need any
In the unlikely event that our CGI shim isn't fast enough for your site, you can arrange to run your PHP scripts as persistent FastCGI processes.
Thanks to Anja Skrba, a Croatian translation of this page is available here.
- Support Index
- Domains, DNS and SSL
- Hosting accounts
- HTTPS hosting
- Execute bits [sphinx only]
- PHP versions [sphinx only]
- Using PHP with FastCGI
- Why we don't use mod_php
- Sender Rewriting Scheme (SRS)
- Spam filtering
- Sphinx shell accounts
- Web and Email hosting
- Miscellaneous topics
- Support by email