From ddjolley at gmail.com Mon Jan 15 12:00:43 2007
From: ddjolley at gmail.com (Doug Jolley)
Date: Mon, 15 Jan 2007 12:00:43 -0800
Subject: [OCLUG-devel] PHP/MySQL
Message-ID:
Hi --
I'm appending a short PHP program that I have written. It is intended to
establish and test an interface to a MySQL database. The program
happens to be named test1.php. When I run the program manually
by entering 'php test1.php' at a shell prompt it works perfectly and I
see an output line that says, 'Row count: 6
'. That is just
what I would expect. However, when I use a browser to display
test1.php, I only see the 2 header lines. An examination of the source
(i.e., view source) reveals that the thing stalls out and has no output
after the 2nd header line. My only guess would be that I have some
sort of mis-configuration of PHP but I have no idea what it would be.
If anyone has any thoughts, I'd love to hear them. Thanks for any
input.
... doug
Test 1
Test 1
PHP To MySQL Connection Test
Row count: $row_count
\n";
mysql_close($link);
?>
~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://localhost.localdomain/pipermail/oclug-devel/attachments/20070115/c70c5131/attachment.html
From scrane at cornerkitchenpeddler.com Mon Jan 15 12:29:44 2007
From: scrane at cornerkitchenpeddler.com (Stephen Crane)
Date: Mon, 15 Jan 2007 12:29:44 -0800
Subject: [OCLUG-devel] PHP/MySQL
In-Reply-To:
References:
Message-ID: <200701151229.44968.scrane@cornerkitchenpeddler.com>
On Monday 15 January 2007 12:00, Doug Jolley wrote:
> Hi --
>
> I'm appending a short PHP program that I have written. It is intended to
> establish and test an interface to a MySQL database. The program
> happens to be named test1.php. When I run the program manually
> by entering 'php test1.php' at a shell prompt it works perfectly and I
> see an output line that says, 'Row count: 6
'. That is just
> what I would expect. However, when I use a browser to display
> test1.php, I only see the 2 header lines. An examination of the source
> (i.e., view source) reveals that the thing stalls out and has no output
> after the 2nd header line. My only guess would be that I have some
> sort of mis-configuration of PHP but I have no idea what it would be.
> If anyone has any thoughts, I'd love to hear them. Thanks for any
> input.
>
> ... doug
I assume you've configured apache (or whatever server you're using) for php,
correct? That would be the first thing I'd check. If it's working properly on
the CLI, I would think that the php config is ok, and the problem lies with
the apache config. Just a thought, perhaps you could post the relevent parts
of your apache config.
- Stephen