Browse DevX
Sign up for e-mail newsletters from DevX


Use XML to Build Services Cheaply Using PHP and MySQL : Page 3

Using the open source technologies of PHP and MySQL you can create server-side applications that abstract databases and return XML. Get all the flexibility of XML without laying out cash, and show your boss a cheap alternative to J2EE or .NET Web services in a runtime environment.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Step 2. Download and Install Apache and the PHP Hypertext Processor
Download and install the version of Apache that is appropriate for your platform.

You can test to see if the server is running by typing http://localhost:<port> where <port> is the port that you selected when installing the web server, e.g. if you select 8080 as the port, test the server by pointing your browser to http://localhost:8080.

If the server is properly running, you should see the default Apache Web page.

The PHP hypertext parser may be downloaded from the PHP download page at http://www.php.net/downloads.php. For this article, I used PHP 4.3.2. Documentation is available on the PHP home page.

Unzip the PHP file to a directory on your hard driver (for example C:\php4). In this directory, you will find a file called php.ini-dist. Rename it to php.ini and move it to your Windows directory. In addition, take the files MSVCRT.DLL and PHP4TS.DLL and move them to your Windows\System directory.

In your \Program Files\Apache Group\Apache\conf directory, you will find a file called httpd.conf. You will need to make three modifications to this file.

First, in the ScriptAlias section, add the following line:

ScriptAlias /php4/ "C:/php4/"

In the AddType section, comment out any lines that configure php3, and add the following lines instead:

AddType application/x-httpd-php .php .phtml AddType application/x-httpd-php-source .phps

In the Action section, add the following line:

Action application/x-httpd-php /php4/php.exe

Now you can save the file and restart the Apache server. It should now be set up to run PHP. You can test the PHP functionality by creating a simple text file containing the following text, and saving it out as test.php in the htdocs directory.

<? Phpinfo() ?>

If you navigate to the page using http://localhost:8080/text.php you should see a page containing a lot of information on PHP. Check your httpd.conf settings carefully on this page to see that they match the settings noted above.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date