Help with Apache

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Help with Apache

Postby cragdire » 17. September 2009 11:36

Hi,

I am new to this, so I really need some good help.

I am using Dreamweaver, but I have never used the database ever and I am trying to learn it. I have manually tried to get Apache working (the program by inself and the services worked). I tried to tie it with PHP without any luck. So I removed Apache and tried Xampp. I have tried 1.7.2 and 1.7.1.

I have tried to make sure I had all the items wiped out in the apache directory before I installed 1.7.2. The program loads and everything is waiting to start. I try Apache and it's busy. I found port 80 taken by the IIS. I can turn that off manually and I tried starting Apache again. It says it's busy and it won't start.

So is there hidden files I need to delete to get a real refresh on the load of Apache?

I really don't know where to go from here and I need some help. Is there anybody who can take the time to help a beginner?

thx

Mike
cragdire
 
Posts: 10
Joined: 17. September 2009 11:29

Re: Help with Apache

Postby Gadrin » 17. September 2009 17:12

I'm new too, but I just downloaded an ebook yesterday and it mentions a URL to configure Apache for
Windows.

I just installed XAMPP and it pretty much worked with PHP from the get-go.

http://httpd.apache.org/docs/2.0/platform/windows.html

You can change the Port 80 to a different port in the config (I don't know if the URL mentions that or not).

You can give it a try and always change it back.

Code: Select all
If you had installation problems, note that you might experience errors, such as the “no services installed”
error if Apache is trying to share port 80 with another Web server or application, such as a firewall. To fix
this, open your httpd.conf file in the c:\program files\Apache group\Apache2\conf directory
and locate the following lines:
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80
Change the last line of this block to read
Listen 8080
Then locate the following lines:
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn’t have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
ServerName www.yourdomainnamehere.com:80
Change the last line of this code to the following:
ServerName www.yourdomainnamehere.com:8080


If you're looking for the e-book it's:

Beginning PHP5, Apache, and
MySQL® Web Development
Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec,
Jeremy Stolz, Michael K. Glass

>
Gadrin
 
Posts: 27
Joined: 08. April 2009 23:43

Re: Help with Apache

Postby Gadrin » 17. September 2009 17:24

Oh, cool if you go to

http://httpd.apache.org/docs/2.0/platfo ... .html#inst

You'll notice #4 gives you the option to install with another WWW server.

So it looks like the instructions above will work regarding the LISTEN 8080 and the other item 8)

>
Gadrin
 
Posts: 27
Joined: 08. April 2009 23:43

Re: Help with Apache

Postby cragdire » 19. September 2009 12:48

Hi,

Thx for the help and I change the port to 8080 like you suggested and I did that. 8080 is free. It was saved for Tomcat which I don't need.

I tried running the Xampp control panel and I try to start apache and it says service started but the running light doesn't come on. I can't go to the admin button so I really believe its not running. It's a configuration problem.

Has anybody seen this before? Please let me know.

thx

Mike
cragdire
 
Posts: 10
Joined: 17. September 2009 11:29

Re: Help with Apache

Postby Izzy » 19. September 2009 12:58

Try and start Apache using the apache_start.bat file as it usually returns a reason why it can't start.

Also check in the server's error log file C:\xampp\apache\logs\
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Help with Apache

Postby cragdire » 19. September 2009 13:03

Thx again for the quick reply.

I found the reason from another post which I read thru.

I went to the svr page in windows from Xampp and I changed the Apache to manual.

I tried starting it there and I get a

"Windows could not start Apache 2.2 service on local computer. Error 3 : The system cannot find the path specified."

Is that in the httpd file which I changed the port from 80 to 8080. What should the path be?

thx

Mike
cragdire
 
Posts: 10
Joined: 17. September 2009 11:29

Re: Help with Apache

Postby cragdire » 19. September 2009 13:38

It's also looking for c:\apache\bin\httpd.exe

That was the original apache which I had working. I removed it, but it still has ties into the system. I can't change where it looks, or I don't know how.

I tried to look for the httpd.exe on my computer, but it's not there. What should the file be that it looks for now and how do I change it manually.

Should I remove xampp and go into the registry and remove all apache stuff and reinstall xampp?

Let me know please.

thx

Mike
cragdire
 
Posts: 10
Joined: 17. September 2009 11:29

Re: Help with Apache

Postby Izzy » 20. September 2009 00:52

cragdire wrote:It's also looking for c:\apache\bin\httpd.exe
Here is a couple of things you can try and doing number 2. first may be the easiest and possibly the quickest and if that fails look at doing number 1. after number 2.

1. I don't know what OS you are using but you may have an entry in the System Path Variables remaining from your old Apache installation.

In the Windows Control Panel->System->Advanced->Environment Variables you should see 2 sections User variables and System variables - in Vista they may be named differently.

Under User variables look for PATH (note this is all upper case).
See if the path C:\apache\bin\httpd.exe or similar is listed in the Value section.

Under System variables look for Path (note different case).
Once again look for the path C:\apache\bin\httpd.exe or similar.

If you see the path C:\apache\bin\httpd.exe in any of the Variable items then select the item and click on Edit.

I usually open a text editor and copy and paste the item in the Edit Window for editing (much easier), then when finished deleting the C:\apache\bin\httpd.exe path I again copy and then paste back into the open Edit Window, overwriting the current data.

Or if you wish simply delete the C:\apache\bin\httpd.exe path from any item by selecting and then clicking on the edit button - the path may simply be C:\apache\bin\ either way it should be removed as XAMPP does not make any entries in the System Variables.

Also the C:\apache\bin\httpd.exe may be included in another Variable so check them all and if present remove it again using the Edit button.

Finally when you are satisfied the apache path does not exist in any of the Variables, click on OK then OK again and close the Windows Control Panel.

Then do a reboot and see if you have fixed your path issues.



2. Click on Start>Run...
Type sc delete apache2.2
Click OK

This should remove the entry in the Service Control Manager - check by once again clicking on the SCM button in the XAMPP Control Panel.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Help with Apache

Postby cragdire » 20. September 2009 02:50

Thanks for the reply Izze,

Yes, you are right on deleted all of those things. I decided to get brave and edit my system registry. I removed all instances of Apache stuff, about 10 things in all and rebooted. I reinsalled XAMPP and now Apache comes up and so does PHP.

Thx

But now I have more questions and I am not sure if this is the thread I should use. I have both Apache running and PHP. Are they tied together now? Is there anything else I need to do for these two. I did run the admin for each one and I get a blank page on both. Is that correct or should I get something else. I want to tie dreamweaver with this, but I want to make sure I head to that path when I know everything is all right. Let me know if there are any more cks I need to do.

thx

Mike
cragdire
 
Posts: 10
Joined: 17. September 2009 11:29

Re: Help with Apache

Postby Izzy » 20. September 2009 03:10

cragdire wrote:I reinsalled XAMPP and now Apache comes up and so does PHP.
Did you uninstall and delete the existing xampp folder before reinstalling XAMPP again as per the readme_en.txt file and on the XAMPP for Windows home page?

What do you mean by "Apache comes up and so does PHP"?

What do you see when you go to http://localhost:8080 in your browser?
The Admin button will not work when the port is changed from 80.

Can you run all the menu items in the Welcome Page?

cragdire wrote:I have both Apache running and PHP. Are they tied together now?
How do you know that Apache (PHP runs with Apache) and MySQL are both running?

Yes XAMPP is a complete package containing all those apps needed to run a web server and all should work "right out of the box" if you followed the very simple installation instructions.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Help with Apache

Postby cragdire » 20. September 2009 03:23

Sorry about the confusion.

1. Yes, I deleted everything that was xampp and apache. I did follow the readme_en.txt file.
2. When I mean Apache comes up and so does MySql, when I have the console up, I can manually start up the system and it says its running. I couldn't get the Apache to come up running. I was incorrect to mention PHP.
3. I type in localhost and I get a blank page. Not the page I expected. I am still looking for that solution. It must be pointing wrong, but I am unsure which doc. to change.
4. I can't get to the welcome page.
5. The reason I asked about

I agree with this statement.
"Yes XAMPP is a complete package containing all those apps needed to run a web server and all should work "right out of the box" if you followed the very simple installation instructions."
I had to delete items that where on my computer before XAMPP. That is what started the whole issue. I might have more things inhibiting the welcome screens I should get. Maybe I didn't fix the registry or I need to change a file.

Any ideas?

thx

Mike
cragdire
 
Posts: 10
Joined: 17. September 2009 11:29

Re: Help with Apache

Postby Izzy » 20. September 2009 03:28

cragdire wrote:I couldn't get the Apache to come up running.
Now lets go back to an earlier post that you seemed to overlook:
viewtopic.php?p=149391#p149391

Answers may be contained in the response from running the bat file and/or in the log file.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Help with Apache

Postby cragdire » 22. September 2009 10:55

I got everything working and I wanted to report that.

Xampp does the job and thank you.

Things I believe all people should do before they try this.

1. Make sure you don't have a copy of Apache and or PHP on your system. If you decide to use Xampp, you need to make sure it's completely gone. Check your registry and delete all references to Apache.

2. Don't play around with any other port. I had the IIS on port 80 which Apache wants. I can change it to 8080 and Apache could run. Great, but it didn't help me when I was doing all the tutorials on setting up a database. Use 80 only. Inhibit your IIS. You don't need it.

3. Once you install your Xampp, you can check your admin screens. It goes to the MyPHP Admin and Apache. If you changed your Apache to port 8080, the buttons won't work. You need the 8080 in it http address. That is why it's better to do 80. Once your screens come up, you are good at that point.

4. Change your passwords for both. Now I really recommend this link. It is awesome. It explains a lot and it really made me to understand the relationships with MySQL, PHP and Apache. http://www.adobe.com/devnet/dreamweaver ... hp_02.html

5. If you are using dreamweaver as your web development tool, that tutorial will help you with everything you need to start. It teaches on how to change your passwords, make a database (simple), how to add a person, what database and password. That info is very important because you learn why you add that in the database drop down link in dreamweaver. Your connection. Now I understand.

6. It shows where you put your xampp directory, the start of the new root is Htdocs. If you put other folders after Htdocs (sub-folders), they are your new roots for your databases. The above link has a sample database to use. Great starting point.

Hopefully this helps somebody.

thx

Mike
cragdire
 
Posts: 10
Joined: 17. September 2009 11:29

Re: Help with Apache

Postby Golgar_2000 » 02. October 2009 07:32

Hi, I Believe I Have A Solution.
I Have Always Manually Gone & Downloaded, Installed & Configured All The Separate Programs, Apache, PHP, etc. Never Had A Problem I Couldn't Fix Or Find A Solution For, Anyway, I Have Just Downloaded & Installed XAMPP 1.7.2 Also The Tomcat Add-on. Now Everything Was Fine First Run All Services Ran Fine.

Apache
MySql
FileZilla
Mercury &
Tomcat.

The Problem Started After I Restarted My Computer. No Apache? It Says It Started But Nothing, Hmmm Strange. All The Configuration Files Where Correct. So I Mucked Around For A While, Researched Everywhere & Even Tried To Install Apache Over The Apache Directory In XAMPP. Still Nothing. So I Started Again. Uninstall, Re-Install. Hey Apache Is Working Again. This Time No Restart. So I Just Clicked The Stop Apache Button, All Good. Ok Start Apache, NOTHING AGAIN. Sound Familiar?

Now Is Not The Time To Scream, It Has Already Told You The Problem. Apache. Very Simple, Go & Check Out The Error Log (Open With Notepad) The Log Files Are Located Here

" \xampp\apache\logs

Go To The Bottom Of The Log File & You Will See The Date, Time & Status. I Found That A File Was Missing Or Could Not Be Located. The Problem Was Related To Tomcat Which Stopped Apache From Starting.

"mod_jk.so" Was Missing From " \xampp\tomcat\Server\xampp\apache\modules\

So I Found A Copy Of "mod_jk.so" Located In " \xampp\apache\modules

So Very Simple. I Copied "mod_jk.so" From “ \xampp\apache\modules To “ \xampp\tomcat\Server\xampp\apache\modules\

Clicked The Start Apache Button & TADA Apache Is Working Again.

Now If A Different File Is Missing Try Searching Your Computer For It & If You Don’t Have It Download The ZIP File From Apache.org & You Should Find It In There.

In Conclusion If Apache Won't Start Or Won't Stay On Check You Log Files It Will Tell You The Problem. I Hope This Has Helped.
Golgar_2000
 
Posts: 10
Joined: 02. October 2009 06:18

Re: Help with Apache

Postby Izzy » 02. October 2009 08:20

Golgar_2000 wrote:"mod_jk.so" Was Missing From " \xampp\tomcat\Server\xampp\apache\modules\
http://community.apachefriends.org/f/viewtopic.php?p=149962#p149962
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 151 guests