Link to home
Start Free TrialLog in
Avatar of ShootFromtheHip
ShootFromtheHipFlag for Afghanistan

asked on

How do I resolve the HTTP Error Code 405 in Dreamweaver CS5?

It feels like I've tried everything to get this solved yet the problem remains.

I am trying to establish a connection between Dreamweaver CS5 and my remote database. I have IIS installed and it is running fine. When I go to select "Recordset" under the Database menu in Dreamweaver and hit "Test" to test the connection, it gives me:

HTTP Error Code 405 Method Not Allowed

I have searched high and low for a solution to this and implemented nearly everything I've found, including:

1) Adding my IP address to the allowable IPs in my remote mysql admin panel
2) Changing permissions of the folders on my local machine (IUSR and other groups)
3) Trying to connect to my database in Dreamweaver CS3 - no success.
4) Disabled "Friendly Error Messages" in Internet Explorer to get a better idea of what this error means (to no avail, same error keeps popping up)
5) Made sure I could connect to my database using alternate means - I can through a shell and other programs.
6) Installed a "workaround" given by Adobe on their website. It hasn't worked.
7) Made sure I entered my database information into the appropriate fields correctly. Check.

I don't know what choices or solutions may be left to me.

My specs:

Windows Vista 64-bit Home Premium, Service Pack 2
Dreamweaver CS5
Internet Explorer 8.0.6
Losing hair follicles by the minute.

Can anyone give a helpful, detailed answer as to what may be wrong?

If I've left any details out, I'll be sure to supply them in my next response.

Thanks!
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

"HTTP Error Code 405 Method Not Allowed" normally refers to the methods used to retrieve a web page.  http://www.adobe.com/support/dreamweaver/database.html The article about the 405 error says Adobe engineers are working on it...

Is this a PHP page connecting to MySQL?  I can give you the prototype that works but test it outside of Dreamweaver.  Put in your database details and run it on the server but not thru Dreamweaver.
<?php 
// DB configuration
$dbsystem = "mysql";    // Your database system
//$dbhost = "localhost";    // Your database server
$dbhost = "yourserver";    // Your database server
$dbuser = "yourusername";      // Your db username
$dbpass = "yourpassword";      // Your db password
$dbname = "yourdbname";      // Your database name
$dbtable = "yourtable";  //"websitelist";

//mysql_connect('localhost', 'mysql_user', 'mysql_password');
$dbh = mysql_pconnect($dbhost, $dbuser, $dbpass);
mysql_select_db($dbname);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Generic dbCheck</title>
<meta name="GENERATOR" content="HTMLKit">
<meta name="author" content="Dave Baldwin" />
</head>
<body>
<?php 
echo "$dbhost <br>";
?>
<table border="1" cellpadding="1" cellspacing="1" width="100%">
<caption><font style="font-weight: bold; font-size: 18pt; line-height: 24pt;">Generic dbCheck</font></caption>
<tbody>
<tr bgcolor="#ffffff">
<?php 
// Formulate Query
// For more examples, see mysql_real_escape_string()
$result = mysql_query("SELECT * FROM $dbtable LIMIT 10");
if (!$result) {
   echo 'Could not run query: ' . mysql_error();
   exit;
}

while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
echo '<tr class="locmus">';
echo '<td>'.$row[0].'</td>';
echo '<td>'.$row[1].'</td>';
echo '<td>'.$row[2].'</td>';
//echo '<td>'.$row[3].'</td>';
//echo '<td>'.$row[4].'</td>';
//echo '<td>'.$row[5].'</td>';
//echo '<td>'.$row[6].'</td>';
echo '</td></tr>';
}
?>
</tbody> 
</table>

</body>
</html>

Open in new window

Avatar of ShootFromtheHip

ASKER

Thanks for that.

Yes, it's a PHP connecting to MySQL.

I tested it successfully on my live (remote) server. What can I conclude from this? What should I do next?
From other questions here on EE, it seems that some things just don't work right when they are run inside of Dreamweaver.  I would save the files on your server, run them directly from your server with your browser and leave Dreamweaver out of it.  I use a simpler program called HTML-Kit and I never use the viewer/browser inside it because I know it doesn't do it right.
Thanks for the feedback. It would be really sweet to somehow get this resolved, even if it means getting other programs that enable me to edit webpages AND have localhost or remote server database capabilities (mySQL). I'm surprised this error has persisted through several major versions of Dreamweaver.

Is there anything else I can try that I haven't done in my original post?
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok, thanks. I think I'll just have to deal and do what you have said for now.
Sounds like it's just a persistent quirk in Dreamweaver that the developers have yet to address.
Avatar of jpjcode
jpjcode

Sorry, but this makes no sense.  I have seen demos of using this functionality online and it worked perfectly for them.  (And no, I don't believe that Adobe would have this as an error across several major releases of their product.)  Somewhere there is a disconnect between how DW is configured and how the MySQL server is configured.  Be nice if someone could actually post a solution to the real problem instead of punting and saying "don't do that."
If you read thru the questions here, you'll see that there are problems like this with every design tool.  Web hosting often has different configurations than the design tools were designed for or that the designers were expecting.  One that has come up a number of times is server permissions.  People have designed sites in Microsoft's Visual Studio that work perfectly on their development machine only to find out that the web host won't allow them permissions that were needed to make it work.

Dreamweaver is often used to start a design that requires hand coding to finish it.  I'm sure the Dreamweaver-MySQL connection works perfectly under a number of circumstances but no design tool is a 100% solution.  Sometimes you have to figure out to make something work in spite of the tools.