PDA

View Full Version : mySQL - PHP - DWMX Error 502 Bad Gateway


Socal
05-08-2003, 10:52 AM
Setup:
- W2K Server, IIS5
- mySQL
- PHP, phpMyAdmin
- DreamWeaver MX

DWMX is located off-server on a networked (LAN'd) workstation connected via ethernet/Linksys router. Network is operational and am able to access shares, tx files, etc.

mySQL is online and operational and I am able to create tables, insert data, etc., without error via phpMyAdmin.

Trying to do this tutorial: Building a Persistent Shopping Cart with PHP and mySQL (http://www.macromedia.com/devnet/mx/dreamweaver/articles/php_cart.html).

Problem:
Using DWMX on the workstation, I have tried every conceivable UN/PW/Hostname every combination I can think of to connection to the db, without success. Keep getting the "Error 502 Bad Gateway" prompt and cannot connect to the mySQL db.

Here are screenshots:

With the tute file "db.php" open in DWMX accessed from the remote server, I enter info into DWMX 'mySQL connection' box. I also have tried entering identical info into the 'db.php' (partial file code shown below), and also leaving that info default.

http://socalgal.digitalmntsnow.com/pub/sql_0.gif

And here is the result every time:

http://socalgal.digitalmntsnow.com/pub/sql_1.gif

I've tried in various combinations:

localhost; locahost: port; 127.0.0.1; 127.0.0.1: port; node IP; node IP: port; IP; IP: port; hostname; hostname: port
server admin login; mysql admin login; root
server admin pw; mysql admin pw; blank (no pw entered)

Have allowed in/out mySQL port (TCP/UDP) on ZAP; have turned off ZAP.

About the only thing I haven't tried yet is setting up a port forward on the router, but I shouldn't have to do that, right?

*Forgot to mention: Also installed (after a day) the mySQL ODBC driver on both machines (server, workstation) and reinstalled the MDAC2.7 on Server (re the MDAC, I was groping). No help.

Help, suggestions, questions are very appreciated. Thanx :cool:

Socal
05-08-2003, 2:15 PM
hmmm... just found this

Connecting to a MySQL database in Dreamweaver (http://www.macromedia.com/support/dreamweaver/ts/documents/mysql_config.htm).

I'll post back with results.

Mntsnow
05-08-2003, 9:34 PM
What did you come up with? did the URL above help?

Socal
05-08-2003, 9:43 PM
Nothing yet... ;/ I didn't spend alot of time with it this afternoon, but it seems to be just a rehash of what info to enter..

I'm thinking that it might be more involved than just a path problem... or it could be a UN/PW problem for that db.

But "bad gateway" would lend me to think it's more than a path problem, sounds like a hard db connection failure [?]

I'm involved with something right now and can't test ;/

ludovic
07-13-2005, 5:39 PM
Hi

I had the same problem '502'. What I did to solve that, is that I went into IIS's extension manager, changer PHP.exe path to PHP-win.exe. It solved the whole thing! BDW, if you want a very nice and easy installation of PHP-Mysql on Apache, go and see www.apachefriends.org -> it's wonderfully easy. Just a click.