Gossamer Forum
Home : General : Internet Technologies :

using mySQL local

(Page 2 of 2)
> >
Quote Reply
Re: [perlman] using mySQL local In reply to
How can I test a form script? Actually fill out the form and such? I can't do this with the cmd window?

uh...you go to the webpage via your web browser where the form is located like:

http://localhost/cgi-bin/myscript.cgi

(just like you would do with your script on your shared production web server)

In terms of the "banner", I am unsure what you mean.

What I would recommend doing is the following:

1) Create a folder in htdocs called something like "MYSITE".

2) Add a LISTEN entry at the top of the httpd.conf file:

Listen 127.0.0.1:8081

3) Then in the httpd.conf file, add a VirtualHost Entry, like the following:

<VirtualHost 127.0.0.1:8081>
ServerAdmin webmaster@yourproductiondomain.com
DocumentRoot C:/Apache/htdocs/MYSITE
ServerName mysite.localhost:8081
ErrorLog C:/Apache/logs/mysite-error_log.log
CustomLog C:/Apache/logs/mysite-access_log common.log
</VirtualHost>

4) Then open your "HOSTS" file in the following folder:

C:\Windows\System32\Drivers\ETC\

Make sure that you have the following entries in that file:

127.0.0.1 localhost
127.0.0.1 mysite.localhost

5) Restart Apache

Then go to:

http://mysite.localhost:8081/

And that will be one site that you can test scripts and other web pages.

The problem may be is that you have not edited the "index.html" file in the \htdocs\ folder and that is why the banner keeps coming up. I would not touch any of the default files in that folder.

I would simply create a new website as I've demonstrated above and use that to test your website.

I do that with additional ports to test multiple client websites.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] using mySQL local In reply to
Thought all of you said were going to work fine, but at one point it failed.
I couldn't restart Apache! And now I can't get it working!

Quote:
The requested operation has failed!


It pops up when I try to start Apache. Had to been something I've done when following your instructions.

Take a look at this:

Code:
#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

<VirtualHost 127.0.0.1:8081>
ServerAdmin webmaster@mydomain.com
DocumentRoot C:/Programfiler/Apache Group/Apache2/htdocs/MYSITE
ServerName mysite.localhost:8081
ErrorLog C:/Programfiler/Apache Group/Apache2/logs/mysite-error_log.log
CustomLog C:/Programfiler/Apache Group/Apache2/logs/mysite-access_log common.log
</VirtualHost>

(Programfiler means Program Files. Norwegian..)

You see the difference?

The one at top is displayed in httpd.conf. As a comment.
The other one I filled in.

I tested it and it worked when I removed that piece of code!
With it it crashes.

I'm not sure what to fill in there. Got any tips?

Thanks for the help so far! Smile

- perlman
Quote Reply
Re: [perlman] using mySQL local In reply to
Code:
apachectl configtest

- wil
Quote Reply
Re: [Wil] using mySQL local In reply to
So, you gave me a piece of code. Thanks.
Now, where to place it?

- perlman, fuzzy and confused. Tongue
Quote Reply
Re: [perlman] using mySQL local In reply to
You can't use that apachectl command on windows. Restart apache using the shortcut link under your Start button and the error will show.

It looks like your format for ErrorLog and CustomLog is wrong. Your path has a space so you'll probably need to quote the string using " "
Quote Reply
Re: [perlman] using mySQL local In reply to
Btw I've moved the thread to Internet Technologies as it's not perl related.
Quote Reply
Re: [Paul] using mySQL local In reply to
Added the "" but it didn't help me much.
Should I shorten the address down to just /logs/mysite-access_log common.log and so on?

Or would that have no effect?

And I wondered where my thread had gone when I noticed it was gone. It quite shook me up.
But now my pulse is back to normal and I'm working fine, thank you.

- perlman
Quote Reply
Re: [perlman] using mySQL local In reply to
Try the suggestion in paragraph 1.
Quote Reply
Re: [Paul] using mySQL local In reply to
Code:
<VirtualHost 127.0.0.1:8081>
ServerAdmin imfuzzy@start.no
DocumentRoot C:/Programfiler/Apache Group/Apache2/htdocs/MYSITE
ServerName mysite.localhost:8081
ErrorLog C:/Programfiler/Apache Group/Apache2/logs/mysite-error_log.log
CustomLog "C:/Programfiler/Apache Group/Apache2/logs/mysite-access_log common.log"
</VirtualHost>
Its this line I get error on: DocumentRoot C:/Programfiler/Apache Group/Apache2/htdocs/MYSITE

The url is correct. But can I use it this way? Without the dummy-host.example.com??
Quote Reply
Re: [perlman] using mySQL local In reply to
Like I said, you need to quote all the paths that have spaces in, so there are 3 of them. You've only quoted 1.

The format still looks wrong though, why do you have common.log seperated from the rest of the path?

Last edited by:

Paul: Jun 2, 2003, 4:01 AM
Quote Reply
Re: [Paul] using mySQL local In reply to
Quote:
<VirtualHost 127.0.0.1:8081>
ServerAdmin webmaster@yourproductiondomain.com
DocumentRoot C:/Apache/htdocs/MYSITE
ServerName mysite.localhost:8081
ErrorLog C:/Apache/logs/mysite-error_log.log
CustomLog C:/Apache/logs/mysite-access_log common.log
</VirtualHost>

That code was given to me by Stealth.
He's the one with the spaces!

- perlman
Quote Reply
Re: [perlman] using mySQL local In reply to
Change common.log to common
Quote Reply
Re: [Paul] using mySQL local In reply to
Worth a shot, but it didn't work. Got an error on that line afterwards.
hmmm...

Looks like this will never end.

- perlman
Quote Reply
Re: [perlman] using mySQL local In reply to
Uh...and that is the exact codes I am using in my httpd.conf file and it works just fine.

The problem is in the codes you posted above, you are using * rather than the non-routable IP address of 127.0.0.1.

Also, make sure that you rem out NameVirtualHost by making sure you have the following codes:

# Use name-based virtual hosting.
#
# NameVirtualHost *

in the httpd.conf file.

Also, if you start Apache from the command prompt, you will see an error message, also look in the error logs (which is easily linked from your Start/Programs/Apache option).
========================================
Buh Bye!

Cheers,
Me

Last edited by:

Stealth: Jun 2, 2003, 6:33 PM
Quote Reply
Re: [Stealth] using mySQL local In reply to
Didn't quite follow you there.

Quote:
The problem is in the codes you posted above, you are using * rather than the non-routable IP address of 127.0.0.1.

Where?

Quote:
Also, make sure that you rem out NameVirtualHost by making sure you have the following codes:

# Use name-based virtual hosting.
#
# NameVirtualHost *

in the httpd.conf file.

I have the exact code in the file, and isn't that just a comment?

Quote:
Also, if you start Apache from the command prompt, you will see an error message, also look in the error logs (which is easily linked from your Start/Programs/Apache option).

Looked at both the Access log and the error log. I just find information about all the internet pages I have visited and nothing about the httpd.conf.

Thanks.

- perlman
Quote Reply
Re: [perlman] using mySQL local In reply to
uh...open the httpd.conf file and use the FIND feature in your text editor and search for NameVirtualHost.

And look at your codes you posted above, you are using * in the VirtualHost directive, you need to use 127.0.0.1:8081

AND also did ya add the LISTEN 8081 in the PORT section of the httpd.conf file.

It would be good for you to slow down and read advice and instructions more carefully, rather than simply copying and pasting codes.
========================================
Buh Bye!

Cheers,
Me
> >