MozPHP is a Mozilla PHP integration package. With MozPHP you can execute PHP scripts in Mozilla directly without the need for a local HTTP server.
Currently the integration is one way, i.e. it is not possible to access Mozilla internals from PHP scripts. This may change in the future but there are no concrete plans for this.
Copyright (c) 2003-2004 Dr. Thomas Schilz
MozPHP is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
MozPHP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
MozPHP has been developed and tested with Mozilla 1.3.1, 1.4 and 1.5 under Linux and Windows. It won't work with older versions of Mozilla and it has not been tested with other operating systems.
The Mozilla 1.4 binaries have been reported to work with Mozilla Firebird 0.6.1 too. The Mozilla 1.5 binaries should work with Mozilla Firebird 0.7 too.
Of course you also need to have PHP installed on your system. MozPHP works with PHP4 only.
Download the MozPHP-x_y_win32.zip suitable for your Mozilla and extract it in your Mozilla installation directory. You should now find the following files in the components directory:
Download MozPHP-x_y_linux.zip suitable for your Mozilla and extract it in your Mozilla installation directory. You should now find the following files in the components directory:
Close any open Mozilla windows. Backup and then delete compreg.dat and xpti.dat in the components directory. Restart Mozilla.
Navigator / Helper Applications click on the
New Type button
and add an entry for extension
php3 if you like) as follows:
OK you should find the newly defined type in the
File types list like this:
This step is no longer needed in MozPHP version 0.1.4 and higher since MIME type text/php is now assigned to files with extension .php by the cfh protocol handler when opening such files using the cfh: protocol.
As a simple test if MozPHP has been installed correctly download test.php and save it in some directory DIR on your local hard disk. Then open cfh://DIR/test.php. As a result you should see something like this:
Now click at the
GET Test link, and the result should look as follows:
Finally enter some text, eg.
foo into the input field and click at
POST Test button. Now you should get this:
If you have a problem using or compiling MozPHP, please read the unasked questions. If you can't find a solution for your problem there, try to find out what is going wrong by reading the sources. If you find a solution please send the modifications you made to firstname.lastname@example.org. If you really can't fix the problem yourself, send an email to email@example.com with a detailed description of the problem and of the computing environment you are working with.
Your help is appreciated in the further development of MozPHP.