PDA

View Full Version : http error code 500 internal server error


desertdirk
02-24-2010, 02:01 AM
While trying to set up a database driven page I can make the connection ok, and I can create server behaviors, but when I create a record set in "bindings" and try to test it I get this internal error 500. I have seen this problem on other forums but no resolutions to it.
any help out there?

this is Dreamweaver CS3

edbr
02-24-2010, 02:33 AM
500 errors are very vague usually, sometimes cause by small typo errors even

see if this returns data, make a page , include your connection

<?php
include('script/conn.php'); // rename as per connection


$sql = "SELECT * FROM table"; // rename table

$result = mysql_query($sql);
$row = mysql_fetch_array($result);?>


then in your body
put

<?php while($row = mysql_fetch_array($result)){

echo $row['title'];
}
?>

rename title to one of your fields and see if it returns data. if so i would look carefully for a typo in the dw code

desertdirk
02-24-2010, 03:04 PM
The error that comes up is within Dreamweaver in a small dialog box. When I create a connection in the database window, and test it, it will show all the tables in the database. When I create a server behavior such as delete record, it will connect to the database and allow me to select the table I want. When I try to test the record set in the database bindings box, I get the error.

The actual pages I create and upload to my server work with no problems.
DD

edbr
02-25-2010, 12:08 AM
ah sorry i misunderstood, does it do this if you try a different behaviour say, testing an entered value?

desertdirk
02-25-2010, 12:48 AM
yes it does. I have created a delete record page and the delete record behavior. In the dialog when I test, it will ask for a record number (primary index) and when I enter a number i get the error. This happens regardless of the server behavior I try.

And the odd thing is that it is connecting thru dreamweaver to the data base because in the database dialog box it will show the list of tables in the database.

edbr
02-25-2010, 01:16 AM
i havent used that wizard for a long time but it sounds more like an dreamweaver problem possibly a file corrupted somewhere, could need a reinstall i think

desertdirk
02-25-2010, 01:31 AM
You know, that is not really the answer I was looking for :) but you are most likely right.
thanks
DD

desertdirk
03-01-2010, 11:29 PM
I hate when problems are a result of something just changing.

Anyway, for a very long time I was using my web hosting service as the test server and this worked fine. Until this problem arose. Now I changed the test server to my local machine and that fixed the problem. I don't know what changed but it must have been something with my host.

Oh well. thanks for the help

Dirk

desertdirk
03-02-2010, 02:49 PM
ok
Another solution if others are looking. if you do not have an .htaccess file in your root, put one there and add:

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

This turns off security, so when you are finished working with dreamweaver, comment out those lines so that it looks like this:

#<IfModule mod_security.c>
#SecFilterEngine Off
#SecFilterScanPOST Off
#</IfModule>

you will have to do this each time you use dreamweaver if you have your host set as the testing server.
DD

JMB
03-03-2012, 02:18 PM
Hi there

I've just started working with DW CS5.5 (where have I been??) and I am getting exactly the same error whenever I try and retrieve data from the database either through selecting "View Data" in the database window, or by trying to run a Recordset.

I can connect fine, I can view the tables - but whenever I try and view data WITHIN the tables, I get this error.

I've written some simple PHP which proves that I can get data out of the database in code, so its obviously some sort of DW setup problem..

I am not quite sure where I should be looking for .htaccess or _MMSCRIPTS on my server...

Any help would be appreciated.

JMB

edbr
03-04-2012, 12:55 AM
this is sometimes because of htaccess, try renaming and check

JMB
03-05-2012, 11:33 PM
I can't find a .htaccess file in the root of my site.

I've written code which allows me to read data from the database, and I can quite happily connect and read data from within visual studio 2010.

It does seem to be a dreamweaver problem, but I don't know how to progress. This sort of thing seems fundamental to DW so I am a bit surprised that I am having such problems.

What should I put in my .htaccess file?

Thank you.

J,B

edbr
03-06-2012, 12:02 AM
no i was just suggesting a .htaccess file wasnt trowing a spanner in the works.