Forums
This topic is locked
SQL: 500 Internal Server Error
07 Jul 2004 01:59:00 Am Raza posted:
Recently, my pc crashed and my web development has come to a sudden halt. I've logged about 12 hours on this and can't take much more. I may reformat and try again... but I'm very skeptical about that helping.1) Tried manually connecting to SQL - this worked.
2) Reinstalling my server and DW - I did this a few times now.
3) Installed MySQL ODBC (never needed to before).
4) PHPMyAdmin connect - this works
The only time the 500 error occurs is when I use DreamWeaver to connect to my SQL database. In the APPLICATIONS TAB, I try to add a database and BAM... the horrible 500 error. I tried disabling the 'show simple errors' tab in my internet settings and it didn't help. I get the error whether or not the server is running on the background. The server is local (localhost).
I'm using Apache / MySQL / PHPMyAdmin (all the latest stable versions). These came with PHPDEV. I've also tried EasyPHP with no luck. I'm using WinXP Pro and DW MX 2004.
Anyone know what I should do!? E-mail me @ or reply to this forum.
Please help... next week I start working on a site and can't handle not having access to MySQL!
Am
-----------------
In artformation
Replies
Replied 18 Sep 2007 19:50:27
18 Sep 2007 19:50:27 Am Raza replied:
Newer versions of DW seem to not do this as often.
I no longer use DW to manage my connection to an SQL database. I suggest developers stop using it. Hard code a function to connect to your DB and call it to a variable. For example:
<pre id=code><font face=courier size=2 id=code>// DB connections function
function connect() {
$db = mysql_connect("localhost","username","password" or die(mysql_error));
return($db);
}
// How to call connection
$db = connect();
mysql_select_db("db name",$db);</font id=code></pre id=code>
DW makes it really easy to get into PHP/MySQL development, but when it starts getting finicky, it's time to go advanced. It's worth it!
In artformation
I no longer use DW to manage my connection to an SQL database. I suggest developers stop using it. Hard code a function to connect to your DB and call it to a variable. For example:
<pre id=code><font face=courier size=2 id=code>// DB connections function
function connect() {
$db = mysql_connect("localhost","username","password" or die(mysql_error));
return($db);
}
// How to call connection
$db = connect();
mysql_select_db("db name",$db);</font id=code></pre id=code>
DW makes it really easy to get into PHP/MySQL development, but when it starts getting finicky, it's time to go advanced. It's worth it!
In artformation