PHP and MySQL
nathan r. hruby
yellowdog-general@lists.terrasoftsolutions.com
Thu Jun 12 15:08:01 2003
On 12 Jun 2003, Neben Kabon wrote:
> No. When I view the source, the code stops at the point at which the db
> connection should occur.
>
> Even the html closing tags following the php script does not output.
>
> If I try to do something else like phpinfo(); that works O.K. but not if
> I try connecting to the database.
>
Most likely your mysql_connect() syntax is oncorrect and php jsut isn;t
outputing any errors, becasue the default php is set to display_errors =
Off and display_startup_errors = Off which won;t show a whit of errored
out put and behave exactly as you describe.
If this is a development machine, edit these two lines for the entries in
/etc/php.conf (if using the YDL RPM's, /usr/lib/php.ini or
/usr/local/lib/php.ini otherwise) or if this is a production machine, add
ini_set() calls to enable these at the top of your php scripts to enable
this behavoir and then comment them out when fixed.
The theory is that not having erros displayed by default is a good thing
because they can give an attacker a better clue about login flow, what
functions you're using and divludge your filesystem layout.
-n
--
----------------------------------------
nathan hruby <nathan@drama.uga.edu>
computer services specialist
uga drama & theatre
reality is a moving target
----------------------------------------