Jump to content

Weirdest Ever MySQL / PHP problem with Manual AMPPP installation


Recommended Posts

I'm having an issue on my local machine I never witnessed in my entire life with PHP, and can't figure it out for the love of Darwin.

ANY HELP, TIPS, POINTERS, "LOOK AT.."'S is welcome!

 

For what it matter, I got Apache, MySQL, PHP, PEAR working perfectly fine on their own.  Altering the http.config to the php.ini, everything works, until I try to connect to MySQL, the page just "break".

However, if in that simple file I try connect to the server, I add "phpinfo();" before it, it works fine (of course after printing out my php info)

 

Described to problem in detail on my own site (just messy thing I used to try new things), should you need to know more.

 

Really at a dead end, and after quite a while doing PHP, I'm about to start some serious work, and gotta figure this out real fast!  (By the way, it's all my my local machine, on which XAMPP and WAMP worked fine before)

Link to comment
Share on other sites

To be honest I got no clue how to "read" apache's error log.

So what I did was stop Apache, clear out the error log and start Apache again.

I then browsed to localhost (not having phpinfo() in index.php) which reproduced the problem.

Here's what's in error.log now:

[Mon Dec 07 00:22:39 2009] [notice] Apache/2.2.14 (Win32) PHP/5.2.11 configured -- resuming normal operations

[Mon Dec 07 00:22:39 2009] [notice] Server built: Sep 28 2009 22:41:08

[Mon Dec 07 00:22:39 2009] [notice] Parent: Created child process 7196

[Mon Dec 07 00:22:39 2009] [notice] Child 7196: Child process is running

[Mon Dec 07 00:22:39 2009] [notice] Child 7196: Acquired the start mutex.

[Mon Dec 07 00:22:39 2009] [notice] Child 7196: Starting 64 worker threads.

[Mon Dec 07 00:22:39 2009] [notice] Child 7196: Starting thread to listen on port 80.

[Mon Dec 07 00:22:52 2009] [notice] Parent: child process exited with status 255 -- Restarting.

[Mon Dec 07 00:22:52 2009] [notice] Apache/2.2.14 (Win32) PHP/5.2.11 configured -- resuming normal operations

[Mon Dec 07 00:22:52 2009] [notice] Server built: Sep 28 2009 22:41:08

[Mon Dec 07 00:22:52 2009] [notice] Parent: Created child process 5248

[Mon Dec 07 00:22:53 2009] [notice] Child 5248: Child process is running

[Mon Dec 07 00:22:53 2009] [notice] Child 5248: Acquired the start mutex.

[Mon Dec 07 00:22:53 2009] [notice] Child 5248: Starting 64 worker threads.

[Mon Dec 07 00:22:53 2009] [notice] Child 5248: Starting thread to listen on port 80.

Link to comment
Share on other sites

I followed waht is enabled in a coworker's php.ini (done by xampp) without luck

 

Anyone got a minute to "Inspect" my attached php.ini (txt)?

 

Tomorrow is my last day before i will be force to back off to xampp again and hear a lot of "we told you so"

`

 

[attachment deleted by admin]

Link to comment
Share on other sites

About the only affect outputting the phpinfo() content would have on getting output from your code to work is if you have some buffering that is not being satisfied or a content-type problem...

 

It would really help if you posted your code. For all we know you are doing this inside of a HTML tag and any errors or output are appearing in the "view source" of the page but are not being rendered.

 

Also, what exact lines did you add or alter in the httpd.conf? Because this sounds like a content-type problem.

Link to comment
Share on other sites

This is the full code in my index.php (remember, this problem comes up with any pages that access the database that worked before.  Even phpmyadmin)

<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>

In my http.config I changed

* DocumentRoot "D:/www"

* <Directory "D:/www">

And added alias directories like this:

Alias "/lenocin" "D:\Repository\lenocin\trunk\Projects\lenocin" 
<directory "D:\Repository\lenocin\trunk\Projects\lenocin" >
Options Indexes FollowSymlinks MultiViews Includes
        	AllowOverride None
      	 Order allow,deny
        Allow from all
</directory>

 

Dont' want to be lazy, but this is all I can recall right now (It's past midnight here though...)  So I attached a copy of my http.config if that might help

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

Hate to admit this, but I gave up and reverted to xampp.

Some more things I tried:

Uncomment ALL extensions in php.ini

Ensure ALL dll's in the extension directory is listed in php

Installed older versions of MySQL (same as installed by XAMPP)

 

Figured I'll step by step refactor the XAMPP installation until its' pretty much the same as a manual AMPP installation.  :-(

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.