[thelist] php/MySql Help Please

Warden, Matt mwarden at mattwarden.com
Tue Oct 2 22:17:53 CDT 2001


On Oct 3, Andrew Forsberg had something to say about Re: [thelist]...

>Do you mean that a file with nothing in it but:
>
><?php
>die("<p>G'BYE</p>");
>?>
>
>shows up as an empty page? That sounds like a broken php install to me.

No, it's not the method. It never get's called because php doens't know
there's an error (I assume tha's why.

>Are you experimenting in a simple page environment? 

Sure am.

>It could be 
>something else in a complex script that means the mysql_query() 
>command isn't even getting run, let alone the die(). Can you try 
>running a small script like this on your server:

no, it's getting run. "select 1 from table" works fine and i can print out
1. it's just that errors aren't being reported.

><?php
>mysql_connect('hostname','username','password')
>	or die("Could not connect");
>mysql_select_db("databasename")
>	or die("Could not select database");
>mysql_query("This is really not going to work as an SQL query")
>	or die(mysql_error());
>?>
>
>You should get a page with:
>You have an error in your SQL syntax near 'This is really not going 
>to work as an SQL query' at line 1

I have something similar up. I've switched between putting bogus data into
the mysql_connect(...), mysql_select_db(...) and, yes, mysql_query(...)

and, as i said, i DO get the error messages through the commandline tool.

>If you don't then you're probably right, and you do need to have a 
>look around in php.ini.

ok.

we were just hoping for a prod into the right direction. ron's been
without sleep for 7.5 months (or thereabouts) reading php documentation
trying to find a config switch for this.

why you'd ever want to turn off error messages globally? i dunno.

then again, i asked the same question about "magic quotes" <shiver
number="infinite">


ttyl,



--
mattwarden
mattwarden.com





More information about the thelist mailing list