Results 1 to 7 of 7

Thread: PHP / MySQL troubles (after manual install)

  1. #1

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    PHP / MySQL troubles (after manual install)

    This kind of relates to a previous post I posted here.

    At first I thought my phpmyadmin installation is at fault, for I get the following error when I open it (after I installed Apache, MySQL, PHP, PEAR, phpmyadmin manually)
    The connection was reset
    The connection to the server was reset while the page was loading.
    I gave up and stared using MySQL Administrator. (Which is great, thanks for the tip Kows)

    However, just now I got back to this site I am working on, and I realize this problem occur whenever I hit the database (try to connect, I'm working on a simple sample to replicate the problem).

    Anyone had a similar problem? I downloaded and installed the latest versions of A,M,P,P,pma, and verified they work after each install.
    The thing I'm really new to is PEAR, so suspect I might have messed up something there.

    Will probably be told to check my php.ini. So just for the heck of it I enabled all extensions. Uurgh.should have backed it up first (slapping myself).
    I'm attaching that. (it' looks a bit more complicated than I'm used too).
    Attached Files Attached Files
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: PHP / MySQL troubles (after manual install)

    This is very similar to a problem I have had previously, and I don't remember what I did. however, I have never used PEAR and I'm almost certain it's not even related to PHP. I think I may have played with MySQL's settings, or possibly even completely reinstalled MySQL. either way, it was a problem with the way I installed MySQL. try reinstalling it, if you'd like.

  3. #3

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: PHP / MySQL troubles (after manual install)

    Wish I could have said "Thanks for the tip, that worked out great".

    Uninstalled (can be a problem if done wrong, but I got that), re-installed, and re-configured several times with different settings...No luck obviously.

    Could it be due to the fact I'm using Win7? Naah, Xampp was working just fine before.

    A simple piece of code like this cause everything to go down the drain (decided to work with sth really simple to nut this out):
    Code:
    $dbh = mysql_connect('localhost', 'root', 'password') or die("Unable to connect to MySQL");
    With that in a page, all I get is "Problem loading page"..not even a mysql error or sth.
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  4. #4
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: PHP / MySQL troubles (after manual install)

    yeah, as far as I recall, it's a problem with the MySQL or Apache services (I'm leaning toward MySQL being the real problem here), or something. I seriously can't remember what it was. you could try making sure both services are running correctly -- but I don't know how to recreate the problem and can't remember how to fix it. the services log may have some errors in it that could help give you something concrete to google, though.

    but, no, it's not Windows 7. I have a working install of Apache, MySQL and PHP on my Windows 7 machine, and I didn't run into this!

    you might even want to try reinstalling Apache, but I really think it's MySQL. for all I know, the package you had installed before might have left some files lying around that caused some problems. I'm not so sure about that though.. maybe you could try another install of the package-deal just to see if it works!

  5. #5

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: PHP / MySQL troubles (after manual install)

    Here's the weirdest thing...
    Basically as I said before, to "re-produce" my problem, in the simplest way, my index.php in my www folder look like this:
    Code:
    <html>
    	<body>
    	<?php 
    		$dbh = mysql_connect('localhost', 'root', 'Pass@word1') or die("Unable to connect to MySQL");
    		print "Connected to MySQL<br>";
    		mysql_close($dbh);
    	?>
    	</body>
    </html>
    This "break" the page completely (without the db code, and just having phpinfo() works perfectly fine.
    Now, I go and all I do is add "phpinfo();" before the db code....php info get displayed and at the bottom ""Connected to MySQL".

    Does this proof anything? Don't even ask how I got to add phpinfo() there....bored/frustrated out of my skull I guess.
    So this work fine! (No, really! Nothing else change!)
    Code:
    <html>
    	<body>
    	<?php 
    		phpinfo();
    		$dbh = mysql_connect('localhost', 'root', 'Pass@word1') or die("Unable to connect to MySQL");
    		print "Connected to MySQL<br>";
    		mysql_close($dbh);
    	?>
    	</body>
    </html>
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  6. #6

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: PHP / MySQL troubles (after manual install)

    PS: Posted the problem on my cr@ppy website with some more details, as I want to ask on other forums also. (Not that I know any as good as VBF)
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  7. #7
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: PHP / MySQL troubles (after manual install)

    I really don't know. as far as reproduction goes, I meant recreating the problem with your install so that I could try to fix it, really. ;(

    good luck, though

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width