Chemovenetory
v2.0 - Web based software
Part- I . Web Server Installation Notes
This note is prepared using windows, however same steps
will be used for all operating system.
Requirements:
Windows /Linux / Unix/BSD/Mac OSX either server or stand alone machine with assigned IP address
Chemoventory is compatible with any operating systems, which has PHP, Mysql and Zend Optimizer installed.
What
will be supplied with chemoventory package?
Your chemoventory package should have many directories and files
/chemoventory/*.* files and folders
/chemoventory/include/*.* directory
/chemoventory/test/*.* directory - to test php and mysql
(/download, /upload , /msds , /analysis & /admin are not required for Lite version)
Unpack the chemoventory distribution package and install in chemoventory directory.
e.g. c:/web/chemoventory or /home/chemoventory/www/


In unix system, you need to have appropriate file permissions.
Download
these programs
If using apache download apache2.0 or 1.3 (free)
Download php (free)
http://www.php.net/downloads.php
Use PHP version 4.1.0 or above, please use binary version
Download mysql (may be free, consult license page)
http://www.mysql.com/downloads/
any stable mysql version (4.1)
Download Zend Optimizer ( free precompiled versions are available)
http://zend.com/store/free_download.php?pid=13
or write to us, we will send you free copy.
Optionally, you may require are mysql GUI interface
PHP
& Apache web server Installation
http://us4.php.net/manual/en/install.apache.php
http://us4.php.net/manual/en/install.apache2.php for apache2
gunzip apache_1.3.x.tar.gz
tar xvf apache_1.3.x.tar
cd apache_1.3.x
./configure --prefix=/www
cd ../php-x.x.x
./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
make
make install
cd ../apache_1.3.x
./configure --activate-module=src/modules/php4/libphp4.a
make
make install
Use your normal procedure for restarting the Apache server. (You must
stop and restart the server, not just cause the server to reload by
use a HUP or USR1 signal.)
Unix PHP installation
gunzip php-x.x.x.tar.gz
tar xvf php-x.x.x.tar
cd ../php-x.x.x
cp php.ini-dist /usr/local/lib/php.ini
In windows use default installation and settings. Remember to add appropriate server name and domain name


To add web alias edit the httpd.conf file, which is usually located under
C:\Program Files\Apache Group\Apache2\conf\ or /etc/apache/conf/ directory


add chemoventory files location in the http.conf file near or after alias
Alias
/chemoventory/ "C:/web/chemoventory/"
<Directory
"C:/chemoventory">
Options
Indexes FollowSymlinks MultiViews
AllowOverride
Indexes
Order allow,deny
Allow from
all
</Directory>
Restart apache and make sure you see something in your browser for this url http://localhost/ and or for this http://localhost/chemoventory/test/index.html
Make sure IIS is installed and running. If you are not sure, open browser and type the url
If you see error message or not working, your system does not have IIS or any web server not installed. Check your services by Windows à settings à control Panelà Administrative tools à Services or
Once IIS is installed, open the chemoventory web directory and share the directory. (XP and in some windows 2000 it is possible). In IIS windows XP right click and select sharing and security, you will see the window below.


For other windows versions, you have to find the IIS
Windows à settings à control Panel tools à IIS à Administrative
And create web alias “chemoventory” for the physical directory
http://us2.php.net/install.windows
Download php binary with installer package. Install with default options. If you are using IIS, the installer will configure the all files to be copied in different location. TO manually install PHP or to configure with apache use the method given below
Installing PHP and apache server
Windows only …
1. Copy the php
files under a directory (for example : c:\php\)
(be careful don't use c:\Program Files\php\ because of the space between
Program and Files)
2. copy php4ts.dll , php4isapi.dll & libmysql.dll (if php5) from the directory to WINNT/system or WINDOWS/system32 directories
Copy the php4apache.dll or relevant file to module directory
And restart web server
windows & unix…
3. php.ini-dist from your installation directory to the c:/WINDOWS/ or c:/winnt/
directory and rename it to php.ini . Unix users can find it in “/etc/httpd/php.ini”
4. Edit php.ini file to indicate in which directory you have copied your php files.
(extension_dir = c:\php\extensions ; directory in which the loadable extensions (modules) reside.)
5. In the php.ini file edit to enable mysql and gd2 extensions in the php by un-commenting extension=php_gd2.dll & extension=php_mysql.dll
PHP 5 by default does not have mysql enabled. For windows php4 by default mysql has been enabled
6. Edit the httpd.conf file using text editor or create one using the httpd.conf example provided there.
Add the following or for Apache2.0 Near line # 173 make sure this line is present and uncommented
LoadModule php4_module
modules/php4apache2.dll
If apache 1.3 or 1.2
LoadModule php4_module
c:/php/sapi/php4apache.dll
AddModule mod_php4.c
The following additional configuration in apache httpd.conf will enhance apache & PHP server (near line 320)

unix or dos command line users can restart apache by #apachectl stop; #apachectl start
Testing
PHP
Open your systems browser with the following URL http://localhost/chemoventory/test/test.php You should see something like shown below. Note the PHP version. Otherwise, please troubleshoot your php.ini configuration and web configuration. Several forums are available to support. Also write to admin@chemolink.com

Common pitfalls:
Web server not installed
Web service was not running (check your web service either from services in windows or #ps –al | grep –v apache
Web alias set properly
Php.ini configured properly
You should also see the following in the same page, if mysql configuration in php is correct (mysql installation is different)


Pitfall: extension location not pointed properly
Some of the php specific .dll or *.so were not copied in the directory mentioned
Configuring email in php
1. You need to update the php.ini file according to your
configuration
[mail function]
; For Win32 only.
SMTP = smtp.sbcglobal.yahoo.com
smtp_port = 25
; For Win32 only.
sendmail_from = admin@chemolink.com
; For Unix only. You may supply arguments as well (default:
"sendmail -t -i").
;sendmail_path =
2. Test email functionality in chemoventory/test/test_email.php
http://localhost/chemoventory/test/test_email.php
You should get email. Otherwise configure further and retest this step. If the
SMTP is not accessible, you should try using pear configuration in the
following files.
3. see the files in include section send_email.inc.php,
send_email_pear.inc.php and send_email_smtp.inc.php
Depending on the smtp or pear
configuration, you should edit the
file send_email.inc.php accordingly.
By default this line is commented, uncomment this line, if you want to use SMTP
@mail($email ,$subject, $text )
To configure php-pear
go to dos command line and type the following: (assuming default pear path)
c:/php> php c:/php/pear/go-pear.php
accept all defaults
Make sure this file exists c:/php/pear/pear/Mail.php
or appropriately change the path
restart webserver
Edit t send_email.inc.php file to enter values for
$headers["From"]
$params["host"]
If authentication is required (some email system requires authentication)
$params["auth"] = true;
$params["username"] = "username";
$params["password"] = "password";
To install the Zend Optimizer under UNIX or Mac OSX
1. Execute the following command and follow the instructions:
./install.sh
Note Be sure to download the Zend Optimizer version that corresponds
with the platform you use.
2. If you are running under Apache, restart your Apache Web server. For Apache V1.3,
use the commands:
apachectl stop; apachectl start
OpenBSD, Solaris/x86
To install the Zend Optimizer under these platforms
1. Unzip the package file by running the command
gunzip -c <package name> | tar xvf -
2. The unzipped files is placed in a directory with the same name as the package but
without the .tar.gz suffix.
Copy the ZendOptimizer.so file to your system. It is suggested to copy into the
directory /usr/local/Zend/lib.
3. Add the following lines to your php.ini file (preferably into /usr/local/lib).
Do not add any extra spaces or tabs:
zend_optimizer.optimization_level=15
zend_extension="/usr/local/Zend/lib/ZendOptimizer.so"
1. To ensure that your PHP installation is compatible with the Zend Optimizer, it is
recommended to use the Windows packages posted in the Zend Store which are
compiled in non-debug mode The Zend Optimizer works only with non-debug PHP
binaries.
2. The Zend Optimizer for Windows package is a self-extracting installer. Simply run
the package file, and follow the installation instructions.
3. If you are running a server module (e.g. ISAPI), restart your server. For Microsoft
IIS, run net stop iisadmin, and then net start w3svc, from a command line console.