Web DevCenter
oreilly.comSafari Books Online.Conferences.
MySQL Conference and Expo April 14-17, 2008, Santa Clara, CA

Sponsored Developer Resources

Web Columns
Adobe GoLive
Essential JavaScript

Web Topics
All Articles
Scripting Languages

Atom 1.0 Feed RSS 1.0 Feed RSS 2.0 Feed

Learning Lab

GoLive 6: Adobe's Open Source Embrace
Pages: 1, 2

Problems With Preconfigured Releases

The downside of Adobe's prefab offerings is that you're reliant on them to update the various components. For instance, in a remarkable burst of releases just after Adobe shipped GoLive 6.0, a major PHP vulnerability was discovered and fixed, and the Apache Software Foundation released PHP 4.2.0 and Apache 2.0.35 (the first post-beta 2.0 release).

The question remains whether Adobe will hop on and at least offer a patch script to repair the PHP vulnerability; and whether when PHP matures into full support for Apache 2.0 -- it's listed as experimental in the current release -- they'll also offer up revised servers.

Related Reading

Apache Pocket Ref
By Andrew Ford

In the meantime, patching the PHP vulnerability is simple. Find the php.ini configuration file, which for Adobe's installation is in the ./GoLive Preconfigured Servers/php_server/apache directory. Comment out the line that reads file_uploads = On (line 373 in the version I have) by adding a semicolon at the start of the line. Restart the Apache servers.

Installing Your Own

You can go a step further and bypass their installation altogether by collecting and installing a full Apache, PHP, and JSP setup. I'm not a JSP expert, so I leave that one to the ONJava.com site, which has more information about Tomcat and its relative, Jakarta: http://www.onjava.com/onjava/jsp_servlets/. But I can offer insight into configuring Apache with all the bells and whistles.

Start with Apache 1.3.23, the last 1.3 release (httpd.apache.org). Although 2.0 is now the recommended version, you can't rely on PHP support, as noted above. If you need SSL support, retrieve OpenSSL (www.openssl.org) and mod_ssl (www.modssl.org). From www.php.net, retrieve 4.2.0.

If you want to handle XML in various forms through Apache and PHP, you'll need Sablotron. GoLive's Dynamic Content allows you to retrieve information from XML, including using XSL transformations on the XML data. To install Sablotron you may also need to download a whole set of XML libraries. Consult XML.com for more on that aspect of installation and configuration.

MySQL can be downloaded in various forms, including ready-to-go packages, from MySQL.com.

If you need SSL support, which I typically include, visit www.modssl.org and www.openssl.org to retrieve the necessary pieces for SSL inside Apache. You don't need external certificates to use SSL, although they can be useful.

Now you can proceed to assemble the distributions.

  1. Gunzip and untar these files in a temporary construction directory.
  2. Change to the Apache directory and run ./configure; this sets Apache up to handle the PHP installation.
  3. Jump up a level and change to the OpenSSL directory. Run its configuration process; see its Readme and Install documentation. Skip this step to omit SSL support.
  4. Change to the Sablotron directory, and configure with this command: ./configure --disable-javascript Then compile and install it. (There are options to include JavaScript libraries from Netscape, but I was unable to get these to work.)
  5. Change to the PHP directory, and enter the following, making changes to the newest version numbers if newer versions are available. Remove the openssl line and the \ on the previous line if you're not including SSL support. Omit the lines --enable-xslt and --with-xslt-sablot to exclude XML data source processing.
    ./configure \
    	--with-mysql \
    	--with-apache=../apache_1.3.23 \
    	--with-config-file-path=/etc \
    	--enable-magic-quotes \
    	--enable-debugger \
    	--enable-track-vars \
    	--with-db3=/usr/local/BerkeleyDB.3.1 \
    	--with-openssl=../openssl-0.9.6c/ \
    	--enable-xslt \
  6. Change back to your construction directory and install the file below as apache-configure (making changes for version numbers as needed). Remove the openssl line and the \ on the previous line if you're not including SSL support.
    cd mod_ssl-2.8.7-1.3.23
    ./configure \
    	 --prefix=/usr/apache13 \
    	 --verbose \
    	 --enable-module=expires \
    	 --enable-module=usertrack \
    	 --enable-module=rewrite \
    	 --enable-module=status \
    	 --enable-module=proxy \
    	 --enable-module=so \
    	 --activate-module=src/modules/php4/libphp4.a \
    	 --with-apache=../apache_1.3.23 \	 
    cd ..
    cd apache_1.3.23
    make install
  7. Run the program while in the construction directory:
    sh ./apache-configure
    The script compiles and installs the software.
  8. Set up the configuration files. Apache includes documentation and sample files in the path /usr/apache13/conf (if you installed using the above settings). Make sure and use the directives required to pass PHP code on to the PHP processor.

Related Reading

PHP Pocket Reference
By Rasmus Lerdorf

PHP has its documentation online and you can edit the /etc/php.ini file to meet the requirements of GoLive, which will tell you the settings you need to change as appropriate.

For more on configuring Apache and PHP, visit the subsection of the ONLamp.com site devoted to it.

Sweat of the Brow

It may appear to be much more work than you're ready to take on to install these servers. But, in fact, it's a one-time exercise. After you've installed and configured the servers, GoLive's humming engine can leap to life and you should practically never have to even touch the server configuration again. Until, of course, the inevitable newer releases.

Glenn Fleishman is a freelance technology journalist contributing regularly to The New York Times, The Seattle Times, Macworld magazine, and InfoWorld. He maintains a wireless weblog at wifinetnews.com.

Return to the Web Development DevCenter.