Administrator Handbook Table of contents version française LinkedIn social network LinkedIn social network LinkedIn social network LinkedIn social network Share on social media

Adding PHP support to LoriotPro WEB Server


Introduction

LoriotPro WEB server use an ISAPI interface to PHP for accessing MySQL Database. PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. PHP also provides a complete and native set of function that allow you to access MySQL Database.

Using ISAPI function calls, Web pages can invoke programs that are written as DLLs on the server, typically to access data in a database.

When a WEB page is displayed by the LoriotPro WEB server and if PHP script are embedded in this page, they are frowarded to the PHP interpreter that execute the script. Most of the Scripts that we provide performs access to a MySQL Database.

The following daigram display the component of the infrastructure


Installation steps

If you do not use the EASYphp installation package and you want to install php only follow this steps:

Download the PHP program (installation is not really necessary, you need only that dll files and the ini files)

http://www.php.net

We will work with PHP version 4.

Download the current PHP zip package (php-4.4.0-Win32.zip) and unzip it in the c:\php directory for example

Copy the file php4isapi.dll to the LoriotPro /bin/isapi directory

Remark: You should find this php4isapi.dll file in the php\sapi directory after the unzipping of php

Check if the file php4ts.dll is present in your windows system directory (e.g. in c:\windows\system32). If not, copy it from your php directory to this windows system directory)

Edit the php.ini-dist file.

You will then have to save it with the filename:c:\windows\php.ini

On LoriotPro check that the WEB server allow access to PHP with ISAPI

Right click and open the properties windows

Check that Permit direct PHP is allowed


Password settings

Scripts that we provide use a defaut unser and password setting. You whould check that these settings are correct with you Database access security settings

You might have to modify the l_connection_data.php3 file located in /bin/www/www and set the right parameters.

File : l_connection_data.php3

<?
$MySQL_Host="localhost";
$MySQL_User="root";
$MySQL_Passw="";
$db="loriotpro";
/*
if (! @$cc=mysql_connect("$MySQL_Host","$MySQL_User","$MySQL_Passw")) {
   echo "Unable to establish the connection at ",$MySQL_Host,"<br>";
   exit;
}
*/
?>

Remark : These scripts could be used by other HTTP servers than the one provided with LoriotPro. The Apache server has been tested successfully.

Warning : The HTML and PHP scripts provided are only examples. Security holes that could be link to the use of these files remain possible.


Testing PHP installation

Access the LoriotPro WEB Remote console and enter http://localhost:8010/www/test.php as link.

The address of the server could be different from localhost:8010 if you have installed the server on another port.

This PHP script should display PHP information if PHP is well installed and working.


Adding PHP extensions (option)

If you want to add scripting feature to the WEB server and need to use PHP extension, you will want to install some extensions for added functionality.

You will need to change the 'extension_dir' setting to point to your php-install-dir, or where you have placed your 'php_*.dll' files. ex: c:\php\extensions

Choose which extensions you would like to load when PHP starts. It is advisable to first get PHP working and tested without any extensions before enabling them in php.ini.

The following table describes some of the extensions available. You can choose which extensions you would like to load when PHP starts by uncommenting the: 'extension=php_*.dll' lines in php.ini.

Extension Description Notes
php_bz2.dll bzip2 compression functions None
php_calendar.dll Calendar conversion functions Built in since PHP 4.0.3
php_cpdf.dll ClibPDF functions None
php3_crypt.dll Crypt functions unknown
php_ctype.dll ctype family functions None
php_curl.dll CURL, Client URL library functions Requires: libeay32.dll, ssleay32.dll (bundled)
php_cybercash.dll Cybercash payment functions None
php_db.dll DBM functions Deprecated. Use DBA instead (php_dba.dll)
php_dba.dll DBA: DataBase (dbm-style) Abstraction layer functions None
php_dbase.dll dBase functions None
php3_dbm.dll Berkeley DB2 library unknown
php_domxml.dll DOMXML functions Requires: libxml2.dll (bundled)
php_dotnet.dll .NET functions None
php_exif.dll Read EXIF headers from JPEG None
php_fbsql.dll FrontBase functions None
php_fdf.dll FDF: Forms Data Format functions. Requires: fdftk.dll (bundled)
php_filepro.dll filePro functions Read-only access
php_ftp.dll FTP functions Built-in since PHP 4.0.3
php_gd.dll GD library image functions None
php_gettext.dll Gettext functions Requires: gnu_gettext.dll (bundled)
php_hyperwave.dll HyperWave functions None
php_iconv.dll ICONV characterset conversion Requires: iconv-1.3.dll (bundled)
php_ifx.dll Informix functions Requires: Informix libraries
php_iisfunc.dll IIS management functions None
php_imap.dll IMAP POP3 and NNTP functions PHP 3: php3_imap4r1.dll
php_ingres.dll Ingres II functions Requires: Ingres II libraries
php_interbase.dll InterBase functions Requires: gds32.dll (bundled)
php_java.dll Java extension Requires: jvm.dll (bundled)
php_ldap.dll LDAP functions Requires: libsasl.dll (bundled)
php_mhash.dll Mhash Functions None
php_ming.dll Ming functions for Flash None
php_msql.dll mSQL functions Requires: msql.dll (bundled)
php3_msql1.dll mSQL 1 client unknown
php3_msql2.dll mSQL 2 client unknown
php_mssql.dll MSSQL functions Requires: ntwdblib.dll (bundled)
php3_mysql.dll MySQL functions Built-in in PHP 4
php3_nsmail.dll Netscape mail functions unknown
php3_oci73.dll Oracle functions unknown
php_oci8.dll Oracle 8 functions Requires: Oracle 8 client libraries
php_openssl.dll OpenSSL functions Requires: libeay32.dll (bundled)
php_oracle.dll Oracle functions Requires: Oracle 7 client libraries
php_pdf.dll PDF functions None
php_pgsql.dll PostgreSQL functions None
php_printer.dll Printer functions None
php_sablot.dll XSLT functions Requires: sablot.dll (bundled)
php_snmp.dll SNMP get and walk functions NT only!
php_sybase_ct.dll Sybase functions Requires: Sybase client libraries
php_yaz.dll YAZ functions None
php_zlib.dll ZLib compression functions None

 


www.loriotpro.com