Jump to content

Completely new to sql


The Praetorian

Recommended Posts

Right. So I have a remote server all set up on my computer. I'm using xampp, which has Apache and Mysql all rolled into one program.And I'm not really sure where to go now. I've been having a lot of really random problems. The tutorials I've been looking at have just done more to confuse me than anything.First.The structure of my local server seems to be different from my web server (the one I pay for). On there, it's root/public_html/(all my html files, pictures, css files and so on.) Public_html is technically the root, in the sense that it's where I put my index file.Within that directory there's a directory called cgi-bin, and that's where I put the cgi script that does my meta tags. Works fine on my web server.However, when I try to get it to work on my local server, nothing happens. On my local server, the structure is different. The cgi-bin is one level above my root folder. I tried creating a folder called cgi-bin in my root folder and transferring the files over, but that still didn't do the trick. Now, the path for the cgi script, the part that goes into the head of each of my html files that's effected, says root/cgi-bin/(program folder)/program.cgi. Going to that link should let me access the program. Instead, it gives me an error where that script appears on my pages. Nothing else is effected.I'm completely baffled by this, since I assumed the local server would run cgi scripts... am I mistaken?The other problem that I've been having is that all the tutorials I see keep telling me I need to use a dos window for my sql stuff. (Setting up tables, etc). But there doesn't seem to be any way to access the dos window... The server I got came with mysql which has a control panel for creating tables and databases, but none of the tutorials tell me how to use it. They all just tell me what to do in dos....

Link to comment
Share on other sites

I'll try to be of some help here, so lets see . . . First, mysql admin in dos is based on the assumption that you do not have a wbe based tool. Since you do have a web based tool, the developer of that product should have some sort of documentation to help you use it - I'm not aware of anyone who develops help tutorials for commercial products for no charge.As far as the configuration issue you have, it can be tricky. If things work on your remote server but not locally, then check your application server to be sure script execution is enabled. Aside from that, you'll need to set up dynamic path definitions. Where you set a global variable "webroot" and set it appropriately fro the server being used. As long as you scripts are prefix with that variable, then all your tasks should work fine.This is an example on how I do it in ColdFusion:

<!--- establish root directory and url ---><cfif #cgi.local_addr# IS "(your global ip)">	<!--- live server --->	<cfset dirused="d:\inetpub\yourdomain">	<cfset urlused="http://www.yourdomain.net/">	<cfset session.mailserver="mail.yourdomain.net">	<cfset webroot="/">	<cfelse>	<!--- dev server --->	<cfset dirused="s:\Inetpub\wwwroot\yourdomain">	<cfset urlused="http://192.168.0.103/yourdomain">	<cfset session.mailserver="mail.yourdomain.net">	<cfset webroot="/yourdomain/"></cfif>

Link to comment
Share on other sites

Hm. Most of that made sense to me, but the code example I didn't understand at all. I've only been reading up on php and sql for a day or so.. so.. heh.I'm pretty sure the path to the cgi file is universal though. Lemme paste it for you.<!--#exec cgi="/cgi-bin/metablaster/metablast.cgi" -->So as you can see it should work, so long as there's a cgi-bin in my root folder. But adding one didn't do anything.As for cgi, the program that I download to make a server says that cgi is supported.

Link to comment
Share on other sites

your cgi-bin is C:\Program Files\xampp\cgi-binXAMPP comes with PHPMyAdmin witch you can use to manage you mysql database.To connect trough command you use the following statement:

C:\>mysql -h host_name -u user_name -p

mysql will then ask you to enter the password for access.Ruud Hermans

Link to comment
Share on other sites

I think you would be better off asking this question on the apachefriends forum sinds it could be possible that you need to download a add-on for XAMPP.However I never had trouble running Perl script from the storage path I gave in my previous post. But if I'm right you need to change it for running Perl scripts for example I need to change.

#!/usr/bin/perl

to

#!C:\apachefriends\xampp\perl\bin\perl

Try if this link provides you with more info.http://cs.uccs.edu/~cs301/apache/apacheWin32Setup.htmlRuud Hermans

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...