[thelist] php/MySql Help Please
Andrew Forsberg
andrew at thepander.co.nz
Tue Oct 2 22:04:26 CDT 2001
> >> in fact, die() isn't even called.
> >>
> >> no matter what i pass to die(), it doesn't happen.
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.
Are you experimenting in a simple page environment? 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:
<?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
If you don't then you're probably right, and you do need to have a
look around in php.ini.
Best,
Andrew
--
Andrew Forsberg
---
the pander - http://thepander.co.nz/
uberNET - http://uber.net.nz/
More information about the thelist
mailing list