Step 2. Install and Configure PHP Php is used throughout the
DataWise® software suite and must be installed in directory
C:\Php or
D:\Php for many of the
DataWise® scripts to properly function. If this directory doesn't already exist, create it.
From the
https://www.php.net/ web site, click the
Downloads button and then the
Windows downloads link. Click on the
Zip link of the most recent
Thread Safe release. Additionally, take notice of the Visual Studio or VC redistributable that the Php release was built with. That version will need to be installed on the target computer. Once the Php zipped file has been downloaded, unzip it to the C:\Php directory.
The
C:\Php directory needs to contain a file
Php.ini to allow Php to properly function. The new
C:\Php directory will not contain this file. It will, however, contain the files
php.ini-development and
php.ini-production. File
php.ini-production can be copied into
Php.ini or some already customized
Php.ini file can be copied into directory
C:\Php.
If file
php.ini-production is copied into
Php.ini, the following lines (with appropriate modifications) should be appended to it:
[WebPIChanges]
error_log=c:\Apache24\logs\php_errors.log
upload_tmp_dir=C:\Temp
session.save_path=C:\Temp
cgi.force_redirect=0
cgi.fix_pathinfo=1
fastcgi.impersonate=1
fastcgi.logging=0
max_execution_time=300
date.timezone=America/Los_Angeles
extension_dir="C:\PHP\ext\"
[ExtensionList]
extension=php_mbstring.dll
;extension=php_gd2.dll
extension=php_gettext.dll
extension=php_curl.dll
extension=php_exif.dll
;extension=php_xmlrpc.dll
extension=php_openssl.dll
extension=php_soap.dll
#extension=php_pdo_sqlite.dll
extension=php_imap.dll
extension=php_tidy.dll
extension=php_pdo_odbc.dll
extension=php_pdo_mysql.dll
#extension=php_pdo_sqlsrv_72_ts_x64.dll
#extension=php_sqlsrv_72_ts_x64.dll
extension=php_com_dotnet.dll
extension=php_ftp.dll
extension=php_sockets.dll
Note that the DLL's for MS-SQL are commented out. If an MS-SQL database is to be used, those drivers must be downloaded from appropriate web sites.
Insure that the Apache web server is properly configured to interpret PHP scripts by appending the following lines to the file \Apache24\htdocs\httpd.conf
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:/Php/"
LoadModule php_module "C:/Php/php8apache2_4.dll"
AddHandler application/x-httpd-php .php
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
The name of the php_module "C:/Php/php8apache2_4.dll" may need to be changed depending upon the verion of Php installed.
The Apache web server should be restarted after installing Php. To test if Php has been properly installed, create file phpinfo.php in \Apache24\htdocs containing the following lines:
<?php
phpinfo();
?>
Then, go to URL
http://localhost/phpinfo.php. A display similar to the display below should be generated. If the only output is
<?php
phpinfo();
?>
then the php has not been properly installed. Contact
DataWise® Environmental Monitoring, Inc. for support.
Previous Next