another LAMP problem

From: Garrett Gaston 
------------------------------------------------------
Having overcome my last LAMP problem I've hit another problem almost immedi=
ately. My apache server seems to be working just fine as does php=2C I'm ab=
le to execute phpinfo() without a problem. I wrote a little php to query a =
few lines in a VERY simple MySQL database. When the page loads it's a blank=
 web page=2C no errors and no results. There are two entries in the table t=
hat I'M trying to query so I would expect to see two lines outputted as htm=
l. The code is below. Any ideas? Note that fname & lname are just variable =
I retrieved from an html form via $

=============================================================== From: William Wade ------------------------------------------------------ php.net/manual/en/function.var-dump.php var

=============================================================== From: Mike Harrison ------------------------------------------------------

=============================================================== From: Garrett Gaston ------------------------------------------------------ Thanks guys=2C I'll try some of this out. People from several different for= ums have replied back that my code worked fine on their system so I'M think= ing that this isn't a syntax problem. Date: Thu=2C 14 Mar 2013 23:12:27 +0000 From: cluon@geeklabs.com To: chugalug@chugalug.org Subject: Re: [Chugalug] another LAMP problem

=============================================================== From: William Wade ------------------------------------------------------ Try running it at the command line. See what happens. It should still print out the stuff. This way you can take Apache out of the loop and test just PHP and code. $ php filename.php Wil

=============================================================== From: Ed King ------------------------------------------------------ while you're at it, run:=A0=A0=A0=A0=A0=A0 php -l filename.php aka phplint :)=A0=20 --- On Thu, 3/14/13, William Wade wrote: From: William Wade Subject: Re: [Chugalug] another LAMP problem To: "Chattanooga Unix Gnu Android Linux Users Group" Date: Thursday, March 14, 2013, 10:03 PM Try running it at the command line. See what happens. It should still print= out the stuff. This way you can take Apache out of the loop and test just = PHP and code. $ php filename.php=0A=0A Wil On Thu, Mar 14, 2013 at 9:28 PM, Garrett Gaston wro= te: =0A=0A=0A=0A=0AThanks guys, I'll try some of this out. People from several = different forums have replied back that my code worked fine on their system= so I'M thinking that this isn't a syntax problem. =0A=0A Date: Thu, 14 Mar 2013 23:12:27 +0000 From: cluon@geeklabs.com To: chugalug@chugalug.org =0A=0ASubject: Re: [Chugalug] another LAMP problem

=============================================================== From: Lisa Ridley ------------------------------------------------------ Turn on Php error display ... At the beginning of your Php script insert ini=

=============================================================== From: Randy Yates ------------------------------------------------------ I'll throw in another useful PHP debugging utility: FirePHP. Install it, install the firefox extension, make sure that firephp is enabled in the appropriate places (see the documentation), include the class files in your project, and log your variables like this: Firephp::getInstance(true)->log($variable); You'll get a pretty dump of the variable in the firebug/firephp console. This is especially handy when doing some ajax requests on a php server.

=============================================================== From: Joshua Estes ------------------------------------------------------ There's a few things I would recommend as well. There's a lot of knowledge in the php.ini file. It has some documentation in there about production and development settings. If you aren't sure you can run `php --ini` on the command line. (note, Lunix will sometimes have a php.ini for apache and one for the cli) Check your apache logs, sometimes apache will catch something and you will never see a response. Also, look into xdebug and get installed on you dev box. It's an amazing thing to have =) As Lisa said above, http://php.net/ini