Script problems: try local hosting

alcramer

New Member
Messages
53
Reaction score
0
Points
0
Hi all--

In reading the forums, I've seen a lot of postings regarding script problems. People get 404's , can't connect to mySql, or whatever.

A good way to miminize the hassles of getting a site up & running is to build it on your own machine, get it running, then upload it to your x10hosting account. If it runs on your own (local) machine, but doesn't run on x10hosting, you know you've got some kind of config problem & a little detective work (and/or advice from Corey) will likely solve the problem.

If your site doesn't work, there's a million places to look for the fatal error. If your site works on one platform (your local machine), but doesn't work when you upload it to x10hosting, there's only a handful of places to look.

To get your site to work on your own machine, you need (at most):
1. Apache server; 2. Perl and/or PHP; 3. mySql. This sounds like a big deal but it's not.

If you're running Windows, go to
http://www.ricocheting.com/server
That's got detailed info on installing these tools. I've done this on Windows systems win98--winXP and it's really easy. No need to screw around with GNU compilers: you just download the precompiled binaries and install.

If you're running MAC-OsX, it's even easier: Apache + Perl + Php are preinstalled. Put your .htm files in ~/Sites, and your scripts in
/Library/WebServer/CGI-Executables
You may need to click (on main menu) <apple-logo>/System Preferences/Sharing and enable "Personal Web Sharing" (that turns Apache on), but I think this option is ON by default for Ox10.3 forward.

You can save a lot a time if you're uploading something that's known to work! If you try this approach & run into problems, drop me a line & I'll see if I can help.

Al Cramer
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
Thanks for the tutorial, hopefully people will use the search function and find this.

Moved to tutorials
 

lionheart8

New Member
Messages
177
Reaction score
0
Points
0
Another alternative probably simpler alternative is Xampp from www.apachefriends.org ...

One only needs to download & install it. There are versions for Windows & Linux.

When installing, it's best to make apache & mysql services - which makes it unnecessary for one to start them when one wants to use them. That way, they are started with Windows.

Once installed, php files are placed in htdocs directory in xampp. A file halloworld.php in the directory mysite placed in htdocs would be accessed at http://localhost/mysite/halloworld.php ...

To access & create databases, simply go to http://localhost/phpmyadmin where you will find Phpmyadmin like found in the cpanel.

Xampp offers much more, including a mail server, ftp, etc

In this case, u dont have to install Apache, mysql, etc individually. You have the whole package ready after installing Xampp. :biggrin:
 
Top