May 22

These instructions are for installing Axis 2 on top of a Tomcat server installed via XAMPP.

  1. Install Tomcat on top of XAMPP
  2. Download the latest copy of Axis2 from here:  http://ws.apache.org/axis2/download.cgi
  3. Unzip the WAR file
  4. Copy axis2.war to xampp\tomcat\webapps
  5. If Tomcat is running, it should unpack and install the WAR file automatically (you should see a new axis2 folder being created).
  6. If for some reason it doesn’t unpack the WAR file, restart Tomcat
  7. Assuming that you installed Tomcat on port 8080, go to: http://localhost:8080/axis2/
  8. You should see the local Axis 2 Home page.

Links

Tags: , , , ,

May 18

These instructions are for installing Apache Tomcat as an Add-on to XAMPP under Windows.  It is strongly suggested that you upgrade or install the latest version of XAMPP.  Otherwise the installation isn’t as easy.

  1. Install XAMPP – make sure you have the latest — upgrade if necessary
  2. Download the latest JDK from Sun and run the installer
  3. Download the latest version of the Tomcat Add-on from Apache Friends and run the installer
  4. To test things out run xampp\tomcat_start.bat
  5. Browse to http://localhost:8080  - assuming you installed at the default of port 8080
  6. If you don’t see the local Apache Tomcat home page, you may have a port conflict.
    • Try changing the port by modifying install_dir/conf/server.xml
    • For example: if port 8080 isn’t working, try changing the port to 8081, save server.xml, restart the service and try browsing to http://localhost:8081.

Install as a Service

  1. Open up a command prompt
  2. cd  \xampp\tomcat\bin
  3. At the command prompt type: service install
  4. It will tell you that it created a service called “Tomcat6.” That’s true. But if you look in the Service applet, the display name is actually “Apache Tomcat.”
  5. By default the service is set to Manual and not running.
  6. If you want to run this as a service, without having to manually start it every time you reboot:
    • Go to Start > Control Panel > Administrative Tools > Services
    • Switch the Apache Tomcat service to Automatic and Start it.
  7. Reboot your PC and make sure that you can still browse to http://localhost:8080 — adjusting for whatever port you used.

Tags: , ,

May 08

MediaWiki is the wiki software used by Wikipedia.

Installing Locally Under Windows

  1. Install XAMPP
  2. Create a database in MySQL called “wikidb” and create a user called “wikiuser”
  3. Then visit this link (skip the part about installing XAMPP): http://www.mediawiki.org/wiki/Manual:Newcomers_guide_to_installing_on_Windows

Installing on an ISP

  1. I use siteground.com for hosting.
  2. They provide online instructions for installing MediaWiki and several other popular packages on their site.

Tags:

May 03

“This tutorial is intended for developers who wish to extract data from a database and insert it into XML files so that it can be processed in some way, usually by transforming it into HTML using an XSL file.”

http://www.tonymarston.net/php-mysql/dom.html

The tips in this article made it possible for me to write a few PHP classes that have saved me a TON of work over the years. Where I work now I manage an internal Web site that uses PHP and MySQL. All pages are generated by using PHP to convert SQL queries to XML and then passing the results to an XSLT file.

Tags: ,

May 02

What is XAMPP?

From the http://www.apachefriends.org Web site:

“Many people know from their own experience that it’s not easy to install an Apache web server and it gets harder if you want to add MySQL, PHP and Perl.

XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use – just download, extract and start.”

Install XAMPP

Linux Users

  • These instructions focus on installing for Windows.
  • Linux users may want to check out IBM’s page on the subject. Their installation page even includes an example of accessing a database using the PHP Pear library which is included with the XAMPP install:
  • http://www-128.ibm.com/developerworks/linux/library/l-xampp/

Windows Users

  • The XAMPP install tries to install to port 80. If MS-IIS is running on the server, set it’s port to 81 before running the XAMPP installer.
  • Go to http://www.apachefriends.org download and run the Windows installer.
  • When installing, just leave the defaults. I recommend NOT checking the option to run the applications as services during install. That’s because when I did check those options, I got an error that Apache and Filezilla couldn’t install because the ports were busy. I think it was just tripping over itself. I had to reboot and run the XAMPP console to try again – then it worked.
  • Launch the XAMPP console (there should be an icon on your desktop).
  • For Apache, MySQL and FileZilla, check the “Svc” option on the right. FileZilla will start automatically. Click the Start button for the other two services.
  • Make sure there are no errors in the console.
  • Click on the Settings… button and check Enable the XAMPP Service, check the Apache, MySQL and FileZilla modules and clik OK
  • Visit http://localhost to configure your server.
    • Follow the recommendation to check the Status and verify that everything is working.
    • Make sure you visit http://localhost/security/index.php and secure your server. There should be a link and / or suggestion on the page for resolving each unsecure issue.
    • Once a XAMPP username and password is in place you’ll need that to visit the root of http://localhost. When you get prompted with the browser password dialog, enter the username and the password that you assigned to the XAMPP directory. You can make your life easier by checking the part about remembering your password (if that’s an option).
    • To secure FileZilla, launch the Admin from the XAMPP console. Then under Edit / Users change the password for newuser. Then revisit http://localhost/security/ and make sure that FileZilla is now secure.
    • If this is a development machine, the XAMPP page suggests that you just leave PHP unsecure.

If Apache Won’t Start …

On one machine with a fresh install of XP I ran into a problem where Apache wouldn’t start. I was getting this error:

The Apache service named  reported the following error:
>>> (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted.
: make_sock: could not bind to address 0.0.0.0:443
  • Edit file: xampp\apache\conf\extra\httpd-ssl.conf
  • Change the Listen port to 444
  • Restart the service
  • If for some reason port 444 is also not available, keep upping the port number until you find a free port.

In case you didn’t know, by default the first non-secure Web server on a machine usually listens on port 80. The first secure server usually listens on port 443. Web masters are free to change the port as they see fit. In fact you will have to if there is a conflict as in the case above. But visitors browsing the site will need to integrate the port into their URLs. For example, if you install Apache on port 80, and Microsoft IIS (MS-IIS) on port 81, users will need to include port 81 in their URL’s to visit the MS-IIS server like this: http://www.yourdomain.com:81/. If you don’t include the port for a non-secure URL, the browser will assume it needs to access the server on port 80. For a secure connection (https) the browser will assume port 443 by default.

If that doesn’t work …

Try running xampp\apache_start.bat and see what you get for an error message.

In one case of upgrading XAMPP, I got this error message:

httpd.exe: Syntax error on line 478 of C:/xampp/apache/conf/httpd.conf: Syntax error on line 7 of C:/xampp/apache/conf/extra/httpd-xampp.conf: API module structure ‘php5_module’ in file C:/xampp/apache/bin/php5apache2.dll is garbled – expected signature 41503232 but saw 41503230 – perhaps this is not an Apache module DSO, or was compiled for a different Apache version?

I fixed it by updating the reference in xampp\apache\conf\extra\httpd-xampp.conf to point to the 2.2 file:

    LoadModule php5_module “C:/xampp/apache/bin/php5apache2_2.dll”

configure http-xampp.conf

To create virtual directories for Apache

  • Edit file: xampp\apache\conf\extra\httpd-xampp.conf
  • Add aliases like this just above the aliases for other directories, such as /security and /phpmyadmin:
   Alias /webapps "C:/devmca/webapps/"
   <Directory "C:/devmca/webapps">
       AllowOverride AuthConfig
       Order allow,deny
       Allow from all
   </Directory>

   Alias /phpbb2 "C:/phpBB2/"
       <Directory "C:/phpBB2">
           AllowOverride AuthConfig
           Order allow,deny
           Allow from all
   </Directory>

configure php.ini

  • Edit file: xampp\apache\bin\php.ini
  • Update SMTP Settings (adjust for you settings, if known):
[Date]
; Defines the default timezone used by the date functions
date.timezone = America/New_York
[mail function]
; For Win32 only.
SMTP = smtp.yourdomain.com
smtp_port = 25
; For Win32 only.
sendmail_from = mallen
  • Restart Apache

Windows Firewall Issues

If you install under Windows XP and have the Windows Firewall running, you will probably need to open up the ports for your Web and FTP server. It may work fine if you run a test from the server where you installed XAMPP. But if other machines can’t browse to your Web server and FTP times out it’s probably a firewall issue.

  • Start > Control Panel
  • Double-click on Windows Firewall
  • If you are having a problem, the firewall will most likely be in the On position – leave it as is.
  • Click on the Exceptions tab
  • Use the Add Port … button to open up ports 80 and 21 – unless of course you set your Web server and FTP server to listen on different ports

See also …

You may also find this link helpful: http://www.keitr.com/tutorials/xampp

Tags: , , ,