I will use a LAMP stack to solve the session-management requirement. So, before proceeding into the project, you must verify the availability of the required services on the machine. It is assumed that a working Linux installation is available. Few words on Apache and MySQL servers might make things easy. Checking Apache and MySQL servers requires root user privileges. Either use the su - or sudo command to obtain root user privileges before running the Isbinlservice tooL.
Both Apache and MySQL run in the background as daemons, and their status can be checked using the Isbinl service command. The server can be in anyone of the three states on the machine: a) the service is available and rurming; b) the service is available on the system, but not rurming¬starting the service is easy; c) the service is not available on the machine-download and install the required service.
The availability of the Apache server on a machine may be tested by issuing the command Isbinlservice httpd status on the command window. The response for this command might say 'httpd is running', wherein we can proceed to the next stage. If the service is available on the machine, but not currently running, the response would say 'httpd is stopped'. No problem! Issue the command Isbinlservice httpd start. The third possible response to Isbinlservice httpd status command which means the Apache server needs to be installed on the machine.
Follow the same procedure to check the availability of the MySQL database server on the machine, after substituting mysqld for httpd in the previous command sequences. Figure 1 shows the command window and the browser window when the services are rightly installed on the system. Note that I've used a Fedora 9 installation for this article. If the service command is not the default command to start and stop services (daemons) on your system, please consult the documentation to find out the substituting command.
After ensuring that the services are available, check for the availability of the PHP scripting language by issuing the php -version command and look at the response. If the version number, build date, etc, are displayed, it means PHP is available. If a message stating "php: command not found" is displayed instead, then you need to install PHP, of course.
Once the Apache, MySQL and PHP servers are ready, you can readily run and test the scripts provided in this article. For those who use very old versions of the Apache server, PHP might require a few configurations; in recent versions, PHP does not require any further configurations.




Reply With Quote
Copyright Techfuels
Bookmarks