Jump to content
Larry Ullman's Book Forums

Questions On Installation


Recommended Posts

I'm having some trouble with the installation and hoping I can get some help here, since I can't really proceed with the book until I've got the development environment installed properly. I'm using windows xp.

 

Question 1. XAMPP - The installation seems to have gone fine, and I got the "Congratulations ..." message at the end of it, as shown in the book. However when I click the Apache "Start" button I only get a very brief green "running" indication and then it goes away. Is this normal and is Apache running, even when the indication goes away? The log at the bottom of the window says:

 

Apache started (port 80)

Busy ...

 

FYI, when I start MySQL the "running" indicator stays on. In the book there is a picture of the control panel that shows both indicators on at the same time. I don't get that on my install.

 

 

Question 2. Set a password for the root MySQL user - in short the problem is that when I attempt to set the root passwod I get the error ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'

 

Here's the blow by blow:

 

I installed the xampp folder in by c:/ directory.

 

Next I'm following the instruction to "Immediately change the password for the root MySQL user"

 

I'm not on a hosted server so my understanding is that I can't use PHPadmin

 

I don't know how to use the command-line mysql client so I go to the Accessing MySQL section of Chapter 4, “Introduction to MySQL.” I use the command window and navigate to a c:\ prompt and type in C:\xampp\mysql\bin\mysql which returns a mysql> prompt . So far so good I think. It seems that I need to now go back to Appendix A "To assign a password to the root user via the MySQL client" I then type in as instructed:

 

SET PASSWORD FOR 'root'@' localhost' = PASSWORD ('thepassword'); except with my own password (letters and numbers)

 

In return I get an error beep and the following:

 

ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'

 

I'm clueless on how to proceed?

 

 

Question 3. Looking ahead to when I have this working, I noticed this instruction:

 

Your Web root directory—where your PHP scripts should be placed in order to test them—is the htdocs folder in the directory where XAMPP was installed. Following these installation instructions, this would be C:\xampp\htdocs.

 

To me this means that I'm going to place the demonstration files (downloaded for the book) in the htdocs folder, and point the program that runs them to the chapter 1-19 folder or file. Is this correct?

Link to comment
Share on other sites

Both should be "running". MySQL starts for mine on start up, but I have to "start" Apache. You obviously need both to do this.

You can use PHPMyAdmin with XAMPP it comes pre packaged http://localhost/phpmyadmin/index.php

 

If you load http://localhost/ what is returned? The XAMPP success page?

 

yes the htdocs folder is where you need the files to go, that is essentially the web root in XAMPP terms

 

As for the busy error Google it, could you perhaps have Skype or something else using Port 80?

  • Upvote 1
Link to comment
Share on other sites

Jonathon,

 

Thanks for the reply, but I have to admit that I'm more confused now than before. Here's why:

 

Both should be "running". MySQL starts for mine on start up, but I have to "start" Apache. You obviously need both to do this.

You can use PHPMyAdmin with XAMPP it comes pre packaged http://localhost/phpmyadmin/index.php

When I try that URL I get a 404 Page Not Found.

 

If you load http://localhost/ what is returned? The XAMPP success page?

Interestingly, when I try that URL I am prompted for a user name and password. I have no idea what application is doing the prompting. Is there some way to tell?

 

yes the htdocs folder is where you need the files to go, that is essentially the web root in XAMPP terms

Good, I did something right

 

As for the busy error Google it, could you perhaps have Skype or something else using Port 80?

I'm surprised that the busy thing is an error, as I thought it was normal. In the part of the book "To Install XAMPP on Windows", image D shows the control panel, and Apache returns busy there also, so I thought maybe it was the normal condition. Does it not show busy on yours?

Link to comment
Share on other sites

It sounds like Apache is trying to start and then fails for some reason. You should check the Apache error log to see what the problem is. Off the top of my head I don't know where that is on XAMPP, but you can search the XAMPP directory or check the XAMPP documentation. A conflict with Skype or a similar application would be a reasonable cause here.

Link to comment
Share on other sites

Larry,

 

I looked around the control panel but didn't find anyplace to display the Apache log. I don't have Skype installed. I went to apachefriends.org to view the XAMPP documentation as you suggest but their website says "There is no real manual or handbook for XAMPP. We wrote the documentation in the form of FAQs" and searching the FAQ I found nothing on an error log. I'm a bit stuck now, other than trying a de-install/re-install, which I'll do tomorrow. I doubt that I'll be the only reader to run into difficulty with the install, and any assistance rendered here will probably benefit a number of other readers.

Link to comment
Share on other sites

My Apache error.log file is located in C:\xampp\apache\logs ...

 

If you had enabled Microsoft's Internet Information Sevices (IIS) prior to installing XAMPP, it is likely using port 80, and you may have to configure Apache to use port 8080 (or change IIS to use port 8080). To change it for Apache, you'll need to open httpd.conf in a text editor and change the line that starts with "Listen." The httpd.conf file is normally located in C:\xampp\apache\conf. After modifying the file you will need to stop and restart Apache.

Link to comment
Share on other sites

My Apache error.log file is located in C:\xampp\apache\logs ...

 

I opened the logs folder and found it empty

 

If you had enabled Microsoft's Internet Information Sevices (IIS) prior to installing XAMPP, it is likely using port 80, and you may have to configure Apache to use port 8080 (or change IIS to use port 8080). To change it for Apache, you'll need to open httpd.conf in a text editor and change the line that starts with "Listen." The httpd.conf file is normally located in C:\xampp\apache\conf. After modifying the file you will need to stop and restart Apache.

 

Yes I believe I have IIS enabled. I opened the httpd.conf and found the LISTEN lines as follows:

 

#Listen 0.0.0.0:80

#Listen [::]:80

Listen 80

 

I changed the 80s to 8080s so it reads as follows

 

#Listen 0.0.0.0:8080

#Listen [::]:8080

Listen 8080

 

but when I run apache the behavior is the same (it never changes to "running") and the message in the control panel still reads Apache started [Port 80]. That seems to suggest it isn't trying to use port 8080. Any further suggestions?

Link to comment
Share on other sites

You're better off Googling for this error, I looked briefly earlier there are many similar threads and questions. I wouldn't just re-install just yet.

 

Thanks, I googled it on "apache won't start on xampp" and found this article

 

http://www.netshinesoftware.com/component/option,com_myblog/Itemid,65/show,Apache-wont-start-on-XAMPP.html/

 

It suggests first checking to see if anything else is using port 80, which I did, but found nothing. (I don't have skype installed either).

 

It then suggests swapping the php.ini file from the /xampp/apache/bin/ folder with one from the /xampp/php/ folder. Interestingly, I didn't find a php.ini file in my /xampp/apache/bin/ folder.

 

Ideas?

Link to comment
Share on other sites

I did some searching around regarding why I don't see any log files and found this interesting guidance

 

Be aware that if httpd cannot access its log directory (perhaps /var/log/httpd or a symlink in /etc/httpd/logs) it will not start up or even log a message.

 

Maybe this is my problem, since apache isn't starting or logging. Problem is I don't know what to do with the information. The page it came from is at http://wiki.apache.org/httpd/Logs

Link to comment
Share on other sites

For the benefit of anyone with the same problem, what I've learned so far is that if there is no log file, it means that Apache has never started. With no log file you'll want to be using the control panel 3 http://www.apachefriends.org/f/viewtopic.php?f=16&t=48932 but check also that it may already be in your xampp folder. In my install the desktop shortcut it creates go to the older control panel, but it did install the newer version, I just had to double-click it.

 

With cp3 I now get these errors

 

8:47:05 AM [main] Xampp version: 1.7.7

8:47:05 AM [main] Control center version: 3.0.2 [ Compiled: Jul 21th 2011 - build #1 ]

8:47:05 AM [main] Running as admin - good!

8:47:05 AM [main] Working with basedir: "c:\xampp\"

8:47:05 AM [main] Initializing moduls

8:47:05 AM [apache] Possible problem detected: Port 80 in use by "inetinfo.exe"!

8:47:05 AM [apache] Possible problem detected: Port 443 in use by "inetinfo.exe"!

8:47:05 AM [mysql] "c:\xampp\mysql\bin\mysqld.exe" seems to be running on port 3306?

8:47:05 AM [mercury] Possible problem detected: Port 25 in use by "inetinfo.exe"!

8:47:05 AM [mercury] Possible problem detected: Port 25 in use by "inetinfo.exe"!

8:47:05 AM [main] Starting check-timer

 

so I can see that I have the port 80 conflict with IIS but I don't know why my edit of the httpd.conf file isn't changing the port to 8080

Link to comment
Share on other sites

OK I got this resolved, with the assistance of folks on the apache friends forum http://www.apachefriends.org/f/viewtopic.php?f=16&t=49397&p=190518#p190518

 

Since I have visual studio installed, I had IIS running. Disabling IIS solved most of the port 80 conflicts, but another component of IIS, MsDepSvc.exe also uses port 80 and I had to end the process through the task manager to get apache to run. We'll see if this is really a fix, or if it just gets apache running at the expense of something else that will be needed. I'll post here with any other problems/learnings.

  • Upvote 1
Link to comment
Share on other sites

Sorry Jeff, I was on holiday and just got back to checking the forum today.

 

I had a similar problem when setting up XAMPP and I ended up changing IIS to use port 8080, since I use Apache more often. You should be able to have both running, but you'll need to access the one using port 8080 with //localhost:8080/ instead of just //localhost/.

Link to comment
Share on other sites

Paul, thanks for responding, hope you had a good holiday. I'm fine with cancelling IIS whenever I want to run Apache. My bigger headache right now is that I haven't been able to set a password for the root user. I've tried the command in the book, and tried doing it also from phpmydmin and both return the same result: ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'

 

Any idea of how to get past this?

Link to comment
Share on other sites

  • 2 weeks later...

hey sir is there a differences if im going to use wamp server instead of xampp? will this affect my study particularly following your book because you use xampp? and as you have tackled on how to configure apache in xampp is there also a need to configure apache in wamp?

Link to comment
Share on other sites

 Share

×
×
  • Create New...