Port-O-Problems

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

Port-O-Problems

Postby Bennie6 » 01. March 2009 05:49

Hey, everyone!

A few months ago I installed XAMPP, and have been doing 'PHP' tutorials on it. Now, when I tried to create a database, using this code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="generator" content="NoteTab Light" />
<title>http://www.w3schools.com/php/php_mysql_create.asp:db1.php</title>
</head>
<body>

<?php

$con=mysql_connect("localhost","root","");

if (!con){//_______________________'if'[l]

die('Could not connect: '.mysql_error());

//____________________________end 'if'[r]

if (mysql_query("CREATE DATABASE my_db",$con))

{//_______________________________second 'if'[l]

echo "Database created";

}//_________________________end second 'if'[r]

else

{//________________________'else' [l]

echo "Error creating database: ".mysql_error();

}//_____________________end 'else'[r]

mysql_close($con);

?>


</body>
</html>........................................I got a "Parse Error."

So, I put a name and password into that 'MySQL administrator' thing to see what it did...and I got a desktop "Access violation at address 1000IF7 in module 'LIBMYSQL.dll'.." alert that started multiplying like a horde of wild bunnies! I finally "stopped" the administrator by right-clicking its icon down in the Taskbar Notification area; but my computer kept crashing after that. I turned off the apache server using the 'Control Panel,' but the server kept starting up again by itself. After having to 'Power Off' my computer, I restarted it and uninstalled the whole XAMPP package, except for my personal files in the 'htdoc' folder, amist a flurry of "Access violation..." window alerts that were flying at me from every direction! I thought I was in Perl Harbor!

Next, I reinstalled XAMPP using the xampp-win32-1.7.0-installer.exe, and I got these two alerts:

--Ports 80 or 443 (SSL) already in use! Installing Apache 2.2 service failed.

--Port 3306 already in use! Installing MySQL service failed!

And, of course, now I can't open up any PHP files.

Does anyone know what changes I should make on my computer before reinstalling XAMMP again? (I uninstalled it a second time.) Please use simple, step-by-step instructions: I don't understand nipits or technical jargon, as I'm new to all of this. But, I can follow simple, step-by-step, explicit instructions. Thank you.

Sincerely,

Bennie6

P.S. If I'm able to get everything installed again, I'd be happy if I could create a database using PHP and SQL, and just avoid the automated tools. Is the code that I used above flawed in some way? Thanks for any information that you can share.

P.P.S Dear Charlie [No MySQL Admin in XAMPP (WinMySQLAdmin error generator) by charlieahern on 28. February 2009 17:32]: I feel your pain. My computer has crashed like the Stock Market every time I've tried to install new sofware over the last three years.

P.P.P.S. (if there is such an abbreviation):

Initially, I followed the advice given to 'acestu': [Winmysql Problem by acestu on 27. February 2009 16:19]. The advice was to 'Remove this: ("WinMySQLAdmin.exe"), from your startup folder.' I deleted the 'WinMySQLAdmin.exe'; but then the administrator wouldn't start at all. (Was I supposed to move it to another folder instead of deleting it?) When I reinstalled the administrator, using an 'Undo' arrow, the second wave of Window Alerts commenced.
Bennie6
 
Posts: 3
Joined: 01. March 2009 04:25

Port-O-Problems--Update One

Postby Bennie6 » 01. March 2009 22:20

Hello, everyone. How's your Sunday.

A few minutes ago I downloaded another 'xampp-win32-1.7.0-installer.exe,' for the heck of it, and now the XAMPP Control Panel that was downloaded reports that the 'MySql service' is running. The Apache server didn't download, though. There was the same 'Ports 80 or 443 (SSL) already in use!' window alert. The Control Panel says that the Apache service is 'started;' yet when I tried to start Apache in the 'Services' folder, a window alert said, 'Windows could not start the Apache2.2 on Local Computer. For more information, review the System Event Log...refer to service-specific error code 1.'

I don't know where the 'System Event Log' is, if it matters.

I did a 'Network Configuration Wizard' on my FileZilla Client, that I installed awhile back, separate from the XAMPP download, and it showed that everything was working fine, as far as it was concerned.

I found that my ports '80' and '443' weren't 'being blocked,' if that means anything, when I used the 'Open Port Check Tool' at tp://www.canyouseeme.org/.

And here I sit, Apache-less, waiting for a solution to my dilemma...from someone out there...maybe you!

Sincerely,

Bennie6

P.S. How do you get permission to upload images? Sometimes an actual photo of a desktop is worth a thousand words.
Bennie6
 
Posts: 3
Joined: 01. March 2009 04:25

Port-O-Problems--Epilogue

Postby Bennie6 » 02. March 2009 02:06

Dear Fellow Forumers,

Thank God I was moseying around that "Services" folder today. [You get there by clicking on the "SCM" button on the XAMPP Control Panel.] It caused me to remember what had happened a couple of months ago:

I was trying to install Php and Apache separately, per the instructions in the book that I had started reading, "PHP5/MySQL Programming for the Absolute Beginner," by Andy Harris; but the Apache server wouldn't recognize the Php, no matter what I did!

Then, I discovered an article on the web, "Install PHP5 on Windows," by Edward Tanguay. It pointed out:

"Before we install Apache, we need to make sure the Windows Internet Information Server (IIS) is disabled (if it is installed and running). The reason is that IIS and Apache are both web servers and they will conflict if they are both running at the same time. Note that if you want continue to use IIS (e.g. for local ASP.NET website development), you will be able to easily switch IIS and Apache on and off so you can use both. This step just tells you how to switch IIS off temporarily so we can install Apache."

And, even though I turned "IIS" off on my computer, I still couldn't get the Apache server to recognize the PHP. A window kept saying, "Syntac error on line 241...Cannot add module via name 'mod_php5.c'...."

At any rate, I read about XAMPP on some Php forum around that time...and I downloaded XAMPP shortly there afterwards, with no problems. I don't recall if I had turned off "IIS" before that installation (you do that by clicking on "IIS Admin" in the "Services" window, and then clicking on "Stop the service."); but I turned off "IIS Admin" just now...a voila!--I was able to "Start" Apache2.2 (in that same "Services" window), and now all of my .php files (that I populated my new "htdocs" folder with) open up just like old times! I then restarted "IIS Admin." [Before, as I recall, I was able to open a test.asp file from my NoteTab Light Text Editor as easily as I opened up .php files. But I can't now open up an .asp file that I just created. I'm not sure where it should be "Saved" to. I put it in the "htdocs" folder, but it didn't open from there. I must be doing something wrong.]

Also, I just discovered that the "db1.php" file that's shown at the top of this thread was missing a "right-side bracket":

<?php

$con=mysql_connect("localhost","root","");

if (!con){//_______________________'if'[l]

die('Could not connect: '.mysql_error());

}//____________________________end 'if'[r]_____________the 'right-side bracket' was missing here.

if (mysql_query("CREATE DATABASE my_db",$con))

{//_______________________________second 'if'[l]

echo "Database created";

}//_________________________end second 'if'[r]

else

{//________________________'else' [l]

echo "Error creating database: ".mysql_error();

}//_____________________end 'else'[r]

mysql_close($con);

?>

I just opened up the file as "http://localhost/db1.php"...and the resulting page said "Database created!"

I've got a ton of tutorials to tackle, so good-bye, and thank you for your moral support over the last 24 hours.

Bennie6

P.S. Perhaps you'd like to check out my brand new (Dec.'08), first-ever website, "whowillbethenextonline.com." It's for showcasing the little I've learned over the last year or so about web pages that I gleaned from books and online tutorials. I got my first computer three years ago. I include a link to my website when I send out E-mail resumes, or fill them out online. The website shows where my current abilities lie. I'm hoping to improve, and maybe get a job working with computers in some capacity. Let me know what you think of the site!

P.P.S. I also downloaded and activated the "xampp-patch2-win32-1.7.0-installer.exe." I recall seeing somewhere on this forum that that was possibly a "fix" for the problem with the "MySql Administrator." Whether it is or not, I don't think I'll be opening up that Administrator anytime soon!
Bennie6
 
Posts: 3
Joined: 01. March 2009 04:25


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 53 guests