PHP for NetWare (For Apache 2.0)

1.0 Introduction
1.1 Security Enabling
2.0 Installing, Configuring and Testing the PHP Setup
2.1 Software Requirements
2.2 Installing PHP
2.3 Configuring PHP
2.4 Testing/Executing the PHP scripts From the Web Browser
3.0 PHP Extensions
3.1 LDAP Extension
3.2 MySQL Extension
3.3 OpenSSL Extension
3.4 UCS Extension
3.5 XML Extension
3.6 XSLT Extension
3.7 Third Party Extensions
4.0 Sample Scripts
5.0 Documentation
5.1 Viewable and Downloadable Documentation
5.2 News Groups
6.0 What's New
6.1 New Extensions
6.2 Defect Fixes
7.0 Known Defects and Issues
7.1 FTP Functionality Issue
7.2 Usage of Single-Quoted Strings for System() and Exec() Functions
7.3 Socket Related Features
7.4 Environment Implementation
7.5 Infinite Scripts
7.6 Miscellaneous Issues
7.7 Mail functionality
8.0 Legal Notices

1.0 Introduction

This version of PHP for NetWare® is based on the release version 4.2.3 of the PHP source code.


1.1 Security Enabling

PHP for NetWare is security enabled for accessing UCX components.

The user can now modify specific directives in the php.ini file, to restrict the file access and the loading of the NetWare loadable modules (NLMTM) using system () and Exec () functions. For more information refer to the PHP documentation in the NDK documentation site.

The PHP entry (PHP=ON or PHP=OFF) in sys:\system\nwsec.ini file now only affects PHP2UCS extension and not the base PHP.


2.0 Installing, Configuring and Testing the PHP Setup


2.1 Software Requirements


2.2 Installing PHP

Run the self-extracting executable downloaded from the NDK site for PHP.


2.3 Configuring PHP

  1. Insert the following line in the httpd.conf file in the sys:/apache2/conf directory:

    include sys:/apache2/conf/mod_php.conf

    PHP works with the Apache Web Server using the mod_php Apache module. The configuration for this interface is provided in the mod_php.conf file under the Apache configuration folder (sys:/apache2/conf).

  2. Enter the following command at the server console and add the php folder to the search path:

    search add sys:/php

    You can also add this command to the autoexec.ncf file before starting the Apache Web Server.

  3. Configure the following directives in the php.ini file present in the sys:\php directory, to execute freely downloadable scripts without problems.


2.4 Testing/Executing the PHP scripts From the Web Browser

To test or execute a script from the browser the script or the subdirectory containing the script should be in the sys:\apache2\htdocs directory.

Enter the URL of the form

http://server_name:port_number/destination_directory/script_name

For example, the URL for executing the script phpinfo.php available in the sys:/apache2/htdocs/phpscripts directory will be:
http://server_name:port_number/phpscripts/phpinfo.php

If the setup is correct, information about the PHP setup and the various configuration parameters which can be modified in php.ini are also displayed.


3.0 PHP Extensions

PHP extensions are available under sys:/php/ext. They can be loaded along with PHP by setting suitable configuration in php.ini. For example, to load the PHP-LDAP extension, add the following line in the php.ini file under the NetWare extensions section:

extension=php_ldap.nlm;

Also, add the PHP Extension folder to the search path by using the following command:

search add sys:/php/ext

You can add this command to the autoexec.ncf file before starting the Apache Web Server.


3.1 LDAP Extension

This extension requires the LDAP Libraries for C (NetWare) to be installed. You can download the LDAP libraries from the NDK site for LDAP libraries.


3.2 MySQL Extension

This extension can be used to access a MySQL database residing on the same server or any other server.

NOTE:  A PHP extension for MySQL 4.1 database is included and is named phpmysql4.1.nlm. To use this with MySQL 4.1 database, keep a copy of the existing phpmysql.nlm (which is for MySQL 4.0 database) and rename phpmysql4.1.nlm to phpmysql.nlm. Then restart Apache2.


3.3 OpenSSL Extension

PHP for NetWare can use the functions of OpenSSL for generating and verifying the signatures and for sealing (encrypting) and opening (decrypting) data through OpenSSL extensions. This is an alpha version.


3.4 UCS Extension

This extension can be used to access UCX components, Java Beans and Remote ActiveX components.


3.5 XML Extension

This extension can be used to create XML parsers and then define handlers for different XML events. Each XML parser also has a few parameters that can be modified.


3.6 XSLT Extension

PHP for NetWare can use this extension to provide a processor independent API to XSLT transformations. This is an alpha version.

Some of the open source sample applications that use XSLT extensions are:

These applications can be downloaded from the above-mentioned URLs. The readme in the download gives instructions on how to install and use them.


3.7 Third Party Extensions

The following third party extensions are supported.

For more information, refer to the PHP News Group.


4.0 Sample Scripts

PHP sample scripts are available at sys:/php/webdemo directory. To execute these samples, copy them to sys:/apache2/htdocs directory.

It is suggested not to have these sample scripts on a production server under sys:/apache2/htdocs folder.


5.0 Documentation


5.1 Viewable and Downloadable Documentation

The documentation for PHP can be downloaded or viewed at the NDK documentation site.

We've enabled Start menu documentation entries. After installing the documentation, use the NDK Documents entry on your Start menu to quickly locate and access NDK documentation.

To read or print the documentation, you need Adobe Acrobat Reader 4.0 or later. For a free download, see the Adobe site.


5.2 News Groups

The following news groups are available for discussions.


6.0 What's New


6.1 New Extensions

MySQL 4.1 compatible MySQL extension is now bundled.


6.2 Defect Fixes

Includes fixes for the following defects:


7.0 Known Defects and Issues


7.1 FTP Functionality Issue

Scripts using FTP functionality will not get executed from NetWare 5.1 SP7 server.


7.2 Usage of Single-Quoted Strings for System() and Exec() Functions

For the system() and exec() functions, we recommend that you use only single-quoted strings with any combination of slashes to separate directories. For example:

system('sys:\system\rconag6.nlm'); or system('sys:\\system\\rconag6.nlm');

If double-quoted strings need to be used, then use a double slashes. For example:

system("sys:\\system\\rconag6.nlm");

If double-quoted strings are used with single slashes and if the NLM name starts with the letter r, t, n---for example, system("sys:\system\rconag6.nlm");---then the NLM will not load.

This is because the letters will be considered as \r or \t or \n.


7.3 Socket Related Features


7.4 Environment Implementation

Environment implementation (getenv, putenv, etc.) is dependent on the underlying LibC implementation.


7.5 Infinite Scripts

When an infinite or a recursive script is being run from one browser, running even a simple script from another browser may cause the server to hang or abend.

Stopping an infinite script by unloading Apache at the server console might cause the server to hang or abend.


7.6 Miscellaneous Issues


7.7 Mail functionality

The Mail functionality will not work if the SMTP Server Name is entered instead of the IP address, for the SMTP variable under [mail function] section in php.ini file.


8.0 Legal Notices

Novell, Inc. makes no representations or warranties with respect to the contents or use of this documentation, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc. reserves the right to revise this publication and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes.

Further, Novell, Inc. makes no representations or warranties with respect to any software, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc. reserves the right to make changes to any and all parts of Novell software, at any time, without any obligation to notify any person or entity of such changes.

You may not export or re-export this product in violation of any applicable laws or regulations including, without limitation, U.S. export regulations or the laws of the country in which you reside.

Copyright © 2002 -2004 Novell, Inc. All rights reserved. No part of this publication may be reproduced, photocopied, stored on a retrieval system, or transmitted without the express written consent of the publisher.

Copyright (c) 1999, 2000 The PHP Group. All rights reserved. For list of conditions and disclaimer refer to sys:/php/license document.

Novell and NetWare are registered trademark of Novell, Inc. in the United States and other countries.

Universal Component System, UCS, and NLM are trademark of Novell, Inc. in the United States and other countries.

All third-party products are the property of their respective owners.