PHP Wysardry
PHP

Restrictions on the use of PHP.



Home / PHP / Issues

Back | Next

Performance Issues

If you have already read the performance issues in the SSI section, you can skip this section as the information is basically the same.

Before you decide to start using PHP you should be aware of the performance issues involved.  Basically, it slows down the loading of your documents.

On a standard server setup without PHP, when a document is requested it opens the file and sends the contents back to the requesting browser.  The server does not attach any meaning to the contents, or even check that it is what you say it is.

For instance, if you accidentally placed a sound or image into a file called mypage.html, the server would neither know or care.  It just supplies the file to the browser byte for byte.

With PHP installed and enabled, the server has to work a lot harder.  It has to look at the contents of files and try to process them.  Although it doesn't have to act on the entire contents, it does have to search for and act on any special PHP commands the document contains.

If the command is to include the content of another document, it has to open that document and process it too.  If the scripting language is used, it also has to use precious CPU time for that.

All this searching and processing takes time - enough time to be noticeable to visitors.  You are going to have to decide whether the reduced development time is enough of a reason to slow down the delivery of your pages.

Having said that, in many cases using PHP instead of a combination of SSI and CGI can actually be quicker.  It is still noticeably slower than static HTML though.


Restrictions

There are also several restrictions on using PHP at Spaceports:-

Location
Any documents containing PHP commands and related files to be included must be on the CGI-BIN server.  (See the CGI-BIN section for restrictions inherent in using that server.)

File names
HTML documents containing PHP code must have an extension of .php for the commands within them to be processed.  Included files do not have this restriction, unless they too contain PHP code.

Version
The version of PHP installed is currently PHP 4.  Certain functions from previous versions of PHP do not work as intended, or in some cases at all.  Most freeware scripts you find should by now have a PHP 4 compatible version available (PHP 4 files usually have a .php extension instead of .php3)

Commands
The options available for sending server commands via PHP are restricted for security reasons.
Site Menu

Bravenet

Section Menu


Copyright © 2000-2003 Wysardry

Most recently updated on 11 May, 2003

Home / PHP / Issues

Back | Next


Please feel free to contact us with any comments or suggestions
PHP
PHP Wysardry

This site is hosted by Spaceports