Posts

Showing posts from April, 2008

Configuring PHP in Apache 2 in Windows

1. Install php and crate a dir in c:\php and copy the unzipped file there Copy all the dll's under php to c:\windows\system32 reanme php.ini-dist to php.ini and put it in path c:\windows for example Also in php.ini add support to mysql "As with enabling any PHP extension (such as php_mysql.dll), the PHP directive extension_dir should be set to the directory where the PHP extensions are located. See also the Manual Windows Installation Instructions. An example extension_dir value for PHP 5 is c:\php\ext" 2. In the Apache httpd.conf After #ExtendedStatus On Add LoadModule rewrite_module modules/mod_rewrite.so LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php .php4 Then set permission to # # This should be changed to whatever you set DocumentRoot to. # Options Indexes Includes FollowSymLinks MultiViews ExecCGI AllowOverride All Note - check the security risk

Periodic refresh with AJAX

Hint use - timerID = window.setInterval("ajaxFunction()",5000); Below is the AJAX script And in the HTML body < body onload="ajaxFunction()">

Deploying under tomcat

Deploying under tomcat 1 Class inmcservlet.class is under the package proto.inmc.fm.servlet. 2 Directory strcture of tomcat depolyment D:\Program Files\Apache Group\apache-tomcat-6.0.16\apache-tomcat-6.0.16\webapps\inmc\WEB-INF\classes\proto\inmc\fm\servlet Under servlet inmcservlet.class 3. The web Xml Web.xml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> inmcservlet proto.inmc.fm.servlet.inmcservlet inmcservlet /servlet/inmcservlet2 4 . The url string http://localhost:8080/inmc/servlet/inmcservlet2