PHP MySql connection to GoDaddy
I use DWCS4, PHP, MySQL. I have created a MySql database on my GoDaddy-hosted account and can FTP to it and have transferred tables and data to it. However, when I try to create a database connection in DW, I get the following error message; "Your PHP server does not have the MySQL module loaded or you can’t use the mysql_(p)connect functions."
I searched for solutions on the web (no answers in this forum), and got several results that said to manually create the connection file such as the following
<?php//Sample Database Connection Syntax for PHP and MySQL.
//Connect To Database
$hostname="your_mysqlserver.secureserver.net";
$username="your_dbusername";
$password="your_dbpassword";
$dbname="your_dbusername";
$usertable="your_tablename";
$yourfield = "your_field";
mysql_connect($hostname,$username, $password) OR DIE ("<html><script language='JavaScript'>
alert('Unable to connect to database! Please try again later.');
history.go(-1);</script></html>");
mysql_select_db($dbname);
?>
Just fill in your password etc, save it as connectdb.php (or whatever), and include it at the top of the files that need to access the database. You could use an if statement to determine whether you were working locally or on GoDaddy.
I tried that, but it still won't connect. (My regular connection for just transferring files works fine).
Has anyone out there solved the GoDaddy database connection problem?
Frank
Check php_info()to see which connector is enabled.
It should be either mysql or mysqli.
Since you are having problems with mysql, try to connect with mysqli connector.
If that won't solve your problem, email GD about your problem, and ask if any mysql connectors are enabled in your hosting plan.
Similar Messages
-
New PHP/MySQL Connection extension doesn't show tables. What's the next step?
I'm creating Dreamweaver extensions to work with my CMS.
Since it is already connecting to the MySQL database I'd like
Dreamweaver to access the same connection without asking the
developer for the MySQL credentials again. I have created the HTML
form, the EDML for the connection script, and the JavaScript to
stitch it together, and I can successfully create connections. The
connection script looks good but when I try to expand the tables in
the database window it doesn't post a request to the server and it
just shows "None". I have a regular PHP MySQL connection on the
same site which works fine.
I feel like I'm missing a required next step which would tell
it how to enumerate tables. It would be ideal if I could plug into
the existing PHP MySQL code for this.
I would really appreciate any help and/or pointers!"zymsys" <[email protected]> wrote in
message
news:fiuho4$ao8$[email protected]..
> I'm creating Dreamweaver extensions to work with my CMS.
Since it is
> already
> connecting to the MySQL database I'd like Dreamweaver to
access the same
> connection without asking the developer for the MySQL
credentials again.
> I
> have created the HTML form, the EDML for the connection
script, and the
> JavaScript to stitch it together, and I can successfully
create
> connections.
> The connection script looks good but when I try to
expand the tables in
> the
> database window it doesn't post a request to the server
and it just shows
> "None". I have a regular PHP MySQL connection on the
same site which
> works
> fine.
> I feel like I'm missing a required next step which would
tell it how to
> enumerate tables. It would be ideal if I could plug into
the existing PHP
> MySQL code for this.
>
> I would really appreciate any help and/or pointers!
Are you using the Database access functions?
http://livedocs.adobe.com/dreamweaver/8/apiref/07_mmd31.htm
MMDB.getTables()
http://livedocs.adobe.com/dreamweaver/8/apiref/07_mmd42.htm
MMDB.getColumns()
http://livedocs.adobe.com/dreamweaver/8/apiref/07_mmd34.htm
Or are your trying to create a new Connection Type for the
PHP_MySQL_ServerModel or a whole new servermodel alltogether? -
PHP/MySQL connection / testing server maybe?
Problem - I'm unable to connect to a PHP database. I'm
working right now with tutorials from the DW CS3 Bible by Lowery,
but haven't been able to connect at all. And I wasted weeks trying
the same thing with an ASP connection.
The error message I'm getting now is '405 Method not Allowed'
when working through the connection dialog. I thought PHP/MySQL was
supposed to be easier & better than ASP/Access?
In going through the site setup, instructions for setting up
the site's testing server say 'click test to verify the connection'
but there's no button to click. What am I missing?
Is there some kind of easy test script I can attempt, as with
asp? Problem there was that I could do the 'timetest' sample, but
nothing else.
I have gone through setting permissions and creating IUSR_my
computer name as a user - they seemd to work fine, but I still
can't connect.
Thanks anyone, and everyone - my first post regarding
connection problems was on 8/22 and I feel like I have gotten
nowhere.Have you looked at this tutorial?
http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html
Ken Ford
Adobe Community Expert Dreamweaver/ColdFusion
Adobe Certified Expert - Dreamweaver CS3
Adobe Certified Expert - ColdFusion 8
Fordwebs, LLC
http://www.fordwebs.com
"LReber" <[email protected]> wrote in
message
news:gcegd6$qmu$[email protected]..
> Problem - I'm unable to connect to a PHP database. I'm
working right now
> with
> tutorials from the DW CS3 Bible by Lowery, but haven't
been able to
> connect at
> all. And I wasted weeks trying the same thing with an
ASP connection.
> The error message I'm getting now is '405 Method not
Allowed' when working
> through the connection dialog. I thought PHP/MySQL was
supposed to be
> easier &
> better than ASP/Access?
> In going through the site setup, instructions for
setting up the site's
> testing server say 'click test to verify the connection'
but there's no
> button
> to click. What am I missing?
> Is there some kind of easy test script I can attempt, as
with asp? Problem
> there was that I could do the 'timetest' sample, but
nothing else.
> I have gone through setting permissions and creating
IUSR_my computer name
> as
> a user - they seemd to work fine, but I still can't
connect.
> Thanks anyone, and everyone - my first post regarding
connection problems
> was
> on 8/22 and I feel like I have gotten nowhere.
> -
Help with php mysql connect script
Ok guys im new to php mysql and i'm trying to insert some
form information in my database. Im using a script from sitepoint
in which i went through the tutorial did some experiments of my own
and it worked....
but now i'm getting this error which i cant figure out....
Error placing order: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for
the right syntax to use near 'order SET product ='1',
size='medium', color='', quantity = '1' at line 1
here is the page
http://vaughntucker.com/imagecon/hats.php
and this is the script
<?php
//default page display
//connect to database
$dbcnx = @mysql_connect('p3nl41mysql7.secureserver.net',
'imagecon', 'Dub*boss_1');
if (!$dbcnx) {
echo '<p> Unable to connect to the '. 'database server
at this time.</p>';
exit();
//select database
if (!@mysql_select_db('imagecon')) {
exit('<p>Unable to locate the ' .
'database at this time.</p>');
//Mysql query add joke
if (isset($_POST['submit'])) {
$product = 1;
$size = $_POST['size'];
$color = $_POST['color'];
$quan = $_POST['quantity'];
$sql = "INSERT INTO order SET
product ='$product',
size='$size',
color='$color',
quantity = '$quan',
date = CURDATE()";
}else{
echo 'No data submited';
if (@mysql_query($sql)) {
echo '<p>Your order has been submited.</p>';
} else {
echo '<p>Error placing order: ' .
mysql_error() . '</p>';
?>
thanks in advance$sql = "INSERT INTO order SET
product ='" . $product . "',
size='" . $size . "',
color='" . $color . "',
quantity = '" . $quan . "',
I believe there are other more elegant ways to do this, as
well.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"beatzMalone" <[email protected]> wrote in
message
news:[email protected]...
> Ok guys im new to php mysql and i'm trying to insert
some form information
> in
> my database. Im using a script from sitepoint in which i
went through the
> tutorial did some experiments of my own and it
worked....
>
> but now i'm getting this error which i cant figure
out....
>
> Error placing order: You have an error in your SQL
syntax; check the
> manual
> that corresponds to your MySQL server version for the
right syntax to use
> near
> 'order SET product ='1', size='medium', color='',
quantity = '1' at line 1
>
> here is the page
>
http://vaughntucker.com/imagecon/hats.php
>
> and this is the script
> <?php
> //default page display
> //connect to database
> $dbcnx = @mysql_connect('p3nl41mysql7.secureserver.net',
'imagecon',
> 'Dub*boss_1');
> if (!$dbcnx) {
> echo '<p> Unable to connect to the '. 'database
server at this
> time.</p>';
> exit();
>
> }
>
> //select database
> if (!@mysql_select_db('imagecon')) {
> exit('<p>Unable to locate the ' .
> 'database at this time.</p>');
> }
>
> //Mysql query add joke
> if (isset($_POST['submit'])) {
> $product = 1;
> $size = $_POST['size'];
> $color = $_POST['color'];
> $quan = $_POST['quantity'];
> $sql = "INSERT INTO order SET
> product ='$product',
> size='$size',
> color='$color',
> quantity = '$quan',
> date = CURDATE()";
> }else{
> echo 'No data submited';
>
> }
> if (@mysql_query($sql)) {
> echo '<p>Your order has been submited.</p>';
> } else {
> echo '<p>Error placing order: ' .
> mysql_error() . '</p>';
> }
>
>
>
> ?>
>
> thanks in advance
> -
Updating to 10.4.11 killed my PHP/MYSQL connections
Hi all - I use Dreamweaver CS3 for web development, and have been using some very simple PHP/MYSQL Select and Inserts. Everything was working fabulously up until this morning, when I updated to 10.4.11 (Macbook Pro, CoreDuo). As soon as I updated, I get a 'No Database Selected' message in Safari, Firefox and IE. I can see the database and work with it in DWeaver, just can't get it to go live in browsers.
I'm running PHP 5.2.4, MYSQL 5.1.8 and whatever version of Apache is bundled in OS X (I think it's 1.x - but can't find how to get that number!)
Just for record, I have stopped/restarted Personal Web Sharing, Personal File Sharing, OS X, MYSQL to just check whether something wasn't working there.
I'm about to close out, zap the PRAM and then come back in.
Any ideas?
VinceThanks - A couple of additional points. This is OS X 10.4.11, not OS X Server, so I had installed MYSQL and PHP as fresh installations. MYSQL has not changed since I installed and is running fine through direct client (Navicat).
For PHP I was running 4 and it had been running fine. When the update to OSX came through, PHP 4 didn't work - no change had been made to any configuration file that was working already. These are the httpd.conf instructions I had followed to set-up PHP 4:
+1 Launch Terminal from /Applications/Utilities.+
+2 Open the Apache configuration file and edit the UNIX shell prompt:+
+sudo pico /etc/httpd/httpd.conf+
+3 When prompted for a password, enter the Mac OS X administrator account password.+
+4 Uncomment the following lines:+
+LoadModule php4_module libexec/httpd/libphp4.so+
+AddModule mod_php4.c+
+5 Add the following lines (add these lines above: AddType application/x-tar .tgz):+
+AddType application/x-httpd-php .php+
+AddType application/x-httpd-php-source .phps+
+Note: All the commands for the pico editor display on the screen and you can start any commands with the Control key. Use the arrow keys to move around. Pico is a text editor, mostly for UNIX users to use at the UNIX command line. The pico text editor resides in /usr/bin/ directory.+
+6 Add a new index page for PHP (index.php) so that the web server will recognize it as the first page to load:+
+<IfModule mod_dir.c>+
+DirectoryIndex index.html index.php index.htm+
</IfModule>
+7 Save the httpd.conf file by pressing ^X (control & x keys). When the screen asks "Save Modified buffer?", press "Y". When prompted for "File Name to write : httpd.conf", press Return once to accept it. This will return you to the UNIX shell prompt.+
When PHP 4 stopped working, I took the decision to upgrade to 5 and then fix the breakdown (by now, I was convinced it was an Apache change (nothing in config had changed at all). So, upgraded to PHP 5 and, to do so, had to reverse the directions above. Since then, I've tried reenabling the above, replacing with PHP5 wherever PHP4 appears, all to no avail (in fact, it just froze the Personal Web Sharing that turns Apache on/off).
Right now, running the phpinfo check detailed above tells me the PHP 5 is successfully installed and running. The text from the test copied here:
+System Darwin Vincet-MacBook-Pro.local 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386+
+_Build Date_ Aug 31 2007 23:38:11+
+_Configure Command_ './configure' '--prefix=/usr/local/php5' '--with-apxs' '--with-config-file-scan-dir=/usr/local/php5/php.d' '--with-iconv' '--with-openssl=/usr' '--with-zlib=/usr' '--with-gd' '--with-zlib-dir=/usr' '--with-ldap' '--with-xmlrpc' '--with-iconv-dir=/usr' '--with-snmp=/usr' '--enable-exif' '--enable-wddx' '--enable-soap' '--enable-sqlite-utf8' '--enable-ftp' '--enable-sockets' '--enable-dbx' '--enable-dbase' '--enable-mbstring' '--enable-calendar' '--enable-bcmath' '--with-bz2=/usr' '--enable-fastcgi' '--enable-cgi' '--enable-memory-limit' '--enable-zip' '--enable-pcntl' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-curl=shared,/usr/local/php5' '--with-mysql=shared,/usr/local/php5' '--with-mysqli=shared,/usr/local/php5/bin/mysql_config' '--with-pdo-mysql=shared,/usr/local/php5' '--with-libxml-dir=shared,/usr/local/php5' '--with-xsl=shared,/usr/local/php5' '--with-pdflib=shared,/usr/local/php5' '--with-imap=../imap-2004g' '--with-kerberos=/usr' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr/local/php5' '--with-png-dir=/usr/local/php5' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local/php5' '--with-iodbc=shared,/usr' '--with-pgsql=shared,/usr/local/php5' '--with-pdo-pgsql=shared,/usr/local/php5' '--with-t1lib=/usr/local/php5' '--with-gettext=shared,/usr/local/php5' '--with-ming=shared,/usr/local/php5' '--with-mcrypt=shared,/usr/local/php5' '--with-mhash=shared,/usr/local/php5' '--with-mssql=shared,/usr/local/php5' '--with-fbsql=shared,/Users/liyanage/svn/entropy/universalbuild/src/FBDeveloper Libraries/Library/FrontBase' '--with-json=shared' '--enable-memcache' '--enable-openbase_module'+
+_Server AP_I Apache+
+_Virtual Directory Suppor_t disabled+
+_Configuration File (php.ini) Path_ /usr/local/php5/lib+
+_Loaded Configuration File_ /usr/local/php5/lib/php.ini+
+_Scan this dir for additional .ini files_ /usr/local/php5/php.d+
+_additional .ini files parsed_ /usr/local/php5/php.d/10-extension_dir.ini, /usr/local/php5/php.d/50-extension-curl.ini, /usr/local/php5/php.d/50-extension-fbsql.ini, /usr/local/php5/php.d/50-extension-gettext.ini, /usr/local/php5/php.d/50-extension-json.ini, /usr/local/php5/php.d/50-extension-mcrypt.ini, /usr/local/php5/php.d/50-extension-mhash.ini, /usr/local/php5/php.d/50-extension-ming.ini, /usr/local/php5/php.d/50-extension-mssql.ini, /usr/local/php5/php.d/50-extension-mysql.ini, /usr/local/php5/php.d/50-extension-mysqli.ini, /usr/local/php5/php.d/50-extension-odbc.ini, /usr/local/php5/php.d/50-extension-pdf.ini, /usr/local/php5/php.d/50-extension-pdo_mysql.ini, /usr/local/php5/php.d/50-extension-pdo_pgsql.ini, /usr/local/php5/php.d/50-extension-pgsql.ini, /usr/local/php5/php.d/50-extension-xsl.ini+
+_PHP API_ 20041225+
+P_HP Extension_ 20060613+
+_Zend Extension_ 220060519+
+_Debug Build_ no+
+_Thread Safety_ disabled+
+Zend Memory Manager enabled+
+_IPv6 Support_ enabled+
+_Registered PHP Streams_ zip, php, file, data, http, ftp, compress.bzip2, compress.zlib, https, ftps+
+_Registered Stream Socket Transports_ tcp, udp, unix, udg, ssl, sslv3, sslv2, tls+
+_Registered Stream Filters_ string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.*+
I don't know if any of this helps, but it's what I find. From my online troubleshooting and reading, I believe all of the above looks right and that things should work. So, I'm still left with an informed gut decision that something in the set-up of Apache changed (location in file structure, configuration file, etc.) Could it be looking at a second copy of httpd.conf somewhere else? That would seem to make sense - however I haven't managed to turn up how to assess which version of Apache is loaded (I think 1.3) or where it's located.
If anyone can confirm what PHP5 code should be included in httpd.conf given the above, that would be a great next step.
Thanks for all your assistance!
Vince -
OK
I get the following error when running my php pages on our
new web server (Windows Server 2003):
Fatal error: Call to undefined function mysql_pconnect() in
c:\Inetpub\wwwroot\jionas_website\Connections\jonas_website.php
on line 9
When I open the file jonas_website.php it indicates the
filename Connection_php_mysql.htm. It is on my local machine in the
programs folder but not on the web server. Should it be?
If I run a phpinfo page it runs fine...actually any php
commands seems to work.
I also get that "unidentified error" when I try to connect to
MYSQL through Dreamweaver MX 2004. I have followed all the
suggestions in the technote for this error. I still get it.
I can connect to the MYSQL server through MYSQLadministrator
so I am not sure what is going on.
Please help.
DarrenHung Kuen Kung Fu wrote:
> MYSQL is not listed under the phpinfo page. MMM. Not
sure how to enable this in the php.ini so i will have to look.
Remove the semicolon from the beginning of these lines in the
Windows
extensions section:
;extension=php_mbstring.dll
;extension=php_mysql.dll
Also add this line after them:
extension=php_mysqli.dll
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/ -
I HAVE HOST ON YAHOO AND THIS SCRIPT DOSN'T WORK WITH YAHOO
can u help me ....
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_midcommerce = "localhost";
$database_midcommerce = "DATABASE";
$username_midcommerce = "USER";
$password_midcommerce = "PASSWORD";
$midcommerce = mysql_pconnect($hostname_DATABASE,
$username_DATABASE, $password_DATABASE) or
trigger_error(mysql_error(),E_USER_ERROR);
?>Hung Kuen Kung Fu wrote:
> MYSQL is not listed under the phpinfo page. MMM. Not
sure how to enable this in the php.ini so i will have to look.
Remove the semicolon from the beginning of these lines in the
Windows
extensions section:
;extension=php_mbstring.dll
;extension=php_mysql.dll
Also add this line after them:
extension=php_mysqli.dll
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/ -
PHP and MySQL Connection problem
I am trying to make a PHP MySQL on a remote server connection in Dreamwesaver CS3.
When I enter the information (host, user, password, etc.) and hit TEST, I get the following error message.
"Access Denied. The file may not exist, or there could be a permission problem. Make sure you have proper authorization on the server and the server is properly configured."
I know the user, password, etc. work, as I can access the MySQL database with other software.
I checked with my host and they say there are no permission problems on their end.
I have checked the settings on the Test Server page in Site Setup and everything looks correct and works there.
I have not seen this particular problem described in other forum postings (although there are a LOT of postings on this topic!).
Any help would be appreciated.I thought my testing server was the remote server and is always on as far as I know. I don't know how to turn it on or off.
Is there some other testing server that I should be aware of?
Frank
Date: Wed, 3 Jun 2009 15:43:02 -0600
From: [email protected]
To: [email protected]
Subject: PHP and MySQL Connection problem
I know you are using remote, but is your testing server on? if not turn that on and see if that does it. it just happened to me working on remote server and could not get mysql conn to work, until I turn on my testing (developer server), then I was able to connect to mysql and the tables that I created in phpmyadmin remotly was downloaded.
> -
Can't connect PHP/MySQL 404 error
Wow, the learning curve is killing me. Yet another challenge. I'm using Dreamweaver CC and this tutorial http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html
I'm at this step:
Open comments.php. You must have a PHP page open in the Document window to create a MySQL connection.
In the Databases panel (choose Window > Databases), click the Plus button on the panel and select MySQL Connection.The MySQL Connection dialog box appears.
Type connTest as the connection name.
For the MySQL Server, type localhost.If you are using the MAMP default ports on a Mac, use localhost:8889.
For the User Name, type phptestuser.
Type the password you chose for the phptestuser account in the Password field.
For the Database, type php_test.Note: You don't need to precede the underscore with a backslash here. It was inserted by phpMyAdmin in the previous section (see Figure 20) only because phpMyAdmin uses a query that permits wildcard characters.
Click Test.Dreamweaver attempts to connect to the database. If the connection fails, do the following:
Double-check the server name, user name, and password.
Check the settings for the folder Dreamweaver uses to process dynamic pages (see Specifying a Testing Server for Dreamweaver).
Verify that the web and MySQL servers are both running.
Temporarily disable any firewall or security program. If the connection works, you need to configure the security program to permit communication between Dreamweaver and MySQL.
Click OK. The new connection appears in the Databases panel.
Expand the connTest connection, and then expand the Tables branch. You'll see the comments table in the database, which you can expand to reveal the details of the table columns (see Figure 23).
As far as I can tell I have followed this tutorial to the letter.
As far as I can tell, XAMPP/php mySQL are all running fine, the files are in the correct place and everything should be working. However when I hit test I get a 404 error. (Same error when I hit the select button.)
The suggested problems on the 404 message are:
1. There is no testing server running on the server machine.
Pretty sure the testing server is running. Is there any way to test this, other than to note that xampp is definitely running right now and that I can log into phpMYadmin no problem?
2. The testing server specified for this site does not map to the http://localhost/php_test/_MMServerScripts/MMHTTPDB.php URL Verify that the URL Prefix maps to the root of the site.
Ummm...I'm pretty sure I put things where I was told to put them in the tutorial, but I'm lost at this point where I should verify what. A clue here? The files are where they are supposed to be, but maybe I entered something wrong? Except...I'm not sure what that could be or where to find it. Whatever IT is.
Everything in local files is looking good.
Thanks for your help!
PS: Extra points to anyone who figures out how to make copy/pasteable error messages! These buggers are the bane of my life!Bgupta, you rock!
I hope you have copied the "mysql.php" and "MMHTTPDB.php" files from "C:\Users\username\AppData\Roaming\Adobe\Dreamweaver CC\locale\Configuration\Connections\Scripts\PHP_MySQL\_mmDBScripts" to "C:\xampp\htdocs\phptest\_mmServerScripts"
This was EXACTLY the problem. I checked the tutorial and I couldn't even find where the tutorial said to do this. (If I missed it, let me know where in the tutorial it was, please.)
Fixed! -
Hi,
I've used DW CS3 to create a database connection to a mySQL
database that I created in phpMyAdmin. When I do the setup and test
all the connections, everything works - my table comes up, I'm able
to select it. I created a recordset to display what's in the
database. When I test the page, I'm getting this error:
Warning: mysql_connect() [function.mysql-connect]: Access
denied for user 'identity_teach'@'localhost' (using password: NO)
in /home/identity/public_html/Connections/facultyDB.php on line 7
Cannot connect to the database because: Access denied for
user 'identity_teach'@'localhost' (using password: NO)
The password info is in there - and I know it's right,
because DW tests the connection and gives me a success message. Any
ideas why I would be getting this error?
Thanks!
Carrie>in /home/identity/public_html/Connections/facultyDB.php
on line 7
Check your path in your code on line 7
I had this same problem and it showed something like this
(assuming you are using PHP)
<?php virtual (/Connections/connbay.php'); ?>
i changed to
<?php require_once('../Connections/connbay.php'); ?>
and it worked fine -
Running MySQL Connection for PHP on Dreamweaver8
Good Day:
I installed the MySQL 5.0 and PHP 5.0 to run on my Dreamweaver 8.
On the Application Panel -> Database tabs -> MySQL Connection: after i entered the connection name, user name and everything, it returns HTTP ERROR CODE 502 BAD GATEWAY.
btw, I'm running on localhost
May someone pls tell me what's wrong with it?
many thanks!Hi,
maybe your issue is related to what´s already been posted to the Dreamweaver Application Development forums:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=263&threadid =1293443&enterthread=y
Günter Schenk
Adobe Community Expert, Dreamweaver -
Database Connection using PHP/MySQL on OS X
I created a database connection originally on my XP machine
using Dreamweaver CS2 and everything worked as it should. I
recently switched to a Mac and CS3 and while I can see the
connection file in the Connections folder, it appears grayed out in
Dreamweaver. I tried to create a new data connection to see if that
would solve this problem, but it won't let me. I typed in all the
information and when I clicked "Test" or to browse for the
appropriate database it pops up an error message saying "An
unidentifiable error has occurred". I'm sure I could work around
this by manually coding everything, but I'm a novice in programming
and need to be able to use this feature. The worst thing about it,
is that anytime I have to make a change to the web page, even if
it's not regarding this section of code, it gets messed up. I have
made backups, but once they are opened on the Mac they are messed
up.
I'm using Dreamweaver CS3, PHP/MySQL on a remote server as I
still can't get my local web server functioning properly under
Leopard. Any help would be appreciated because I haven't been able
to find anything regarding this error online.bouldersp wrote:
> I typed in all the
> information and when I clicked "Test" or to browse for
the appropriate database
> it pops up an error message saying "An unidentifiable
error has occurred".
That usually means that something is preventing communication
between
Dreamweaver and the testing server. It could be a firewall or
anti-virus
software. In the Testing Server section of the Advanced tab
in Site
definition, Host directory and URL prefix should both point
to the same
place. The first is the physical path to the top level of
your site, the
second is the URL you enter into a browser address bar to get
to the
same location.
> I'm using Dreamweaver CS3, PHP/MySQL on a remote server
as I still can't get
> my local web server functioning properly under Leopard.
You might find this tutorial on my website helps:
http://foundationphp.com/tutorials/php_leopard.php
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
I use Dreamweaver CS3 to create my sites on a Windows/Apache
Server with PHP5 and Mysql 5. The site works perfectly on my
testing server at home. On the Web server I'm getting the following
error which causes the page to not load:
PHP Warning: mysql_query(): supplied argument is not a valid
MySQL-Link resource in
/hermes/bosweb/web248/b2488/ipw.horsehelp/public_html/residents/residents.php
on line 63
PHP Warning: mysql_select_db(): supplied argument is not a
valid MySQL-Link resource in
/hermes/bosweb/web248/b2488/ipw.horsehelp/public_html/residents/residents.php
on line 61
The lines in question are:
Line 61 - mysql_select_db($database_conn_phh, $conn_phh);
$query_getSuccess = "SELECT * FROM horses WHERE status =
'Success Story' ORDER BY horse_barn ASC";
$getSuccess = mysql_query($query_getSuccess, $conn_phh) or
die(mysql_error());
$row_getSuccess = mysql_fetch_assoc($getSuccess);
$totalRows_getSuccess = mysql_num_rows($getSuccess);
All of the code is supplied by Dreamweaver. I did not tweak
the code. I'm not a web developer and what I have found out there
is still reading greek to me. My connection file is working and
connecting the database that I have tested.
Since the above code is throughout the site in one form or
another it's causing me major headaches. Any help would be
appreciated.This is the first time I've used Adobe products so if the
following is in the wrong forum (It's the closest one I found so
far) or the format is incorrect please forgive me.
I'm new to Dreamweaver CS3 and as I was reading the "first
steps" it mentions to set up a Dreamweaver site right away. I got
as far as completing "Site Definition" page under the basic side of
the setup screen.
The next screen is "Do you want to work with server
Technology?"
There are 2 options - Yes or No. If you select yes a
drop-down menu appears with several options (but you can only
select one)...
Asp Javascript
Asp VbScript
Asp.net#
Asp.net Vb
Cold Fusion
JSP
Php MySql.
I know nothing about these format and brand new to web design
so I thought it best to contact GoDaddy (my hosting account) to
find out what their servers would support. I spoke to a tech rep
but she wasn't sure.
She did mention that I have a windows hosting account and Php
MySql would not work unless I changed to their Linux platform at no
additional charge.
The site I have in mind will design with CSS, Liquid layout,
have some flash, widgets, an inquiry form that clients complete and
results e-mailed to me, auto-responder, Paypal link and whatever
else I can discover from Dreamweaver.
My question being:
I haven't even begun designing my site because I do not know
what weather I should select the Yes option and select one of the
formats mentioned above (if so which one) - or select the No
option. If I do select the No option at the very beginning, will I
have problems with my site uploading and working correctly?
Thank you
Travis -
PHP/MySQL issue after security update 2010-005
Hello,
I run Apache/PHP/MySQL on my MBP for testing Web sites.
After the 2010-005 security update I can't connect to my databases anymore.
I don't know how to fix this, I even don't know where to start looking.
Ideas, anyone?coloma wrote:
etresoft, thanks for sharing this ... I decided to go with the TriangleJuice suggestion instead for two reasons ... first is that I wasn't sure where to find this launchd file.
There is nothing wrong with TriangleJuice's suggestion. My only issue with creating a php.ini file is that now I have to worry about all those other settings in the ini file. If something else in PHP breaks, I have to figure out if I am the one who broke it.
Apple ships MySQL with MacOS X Server. They probably adjusted the PHP settings to match how they have MySQL setup in MacOS X Server.
For MySQL's, no, Sun's - drat! no, Oracle's part, they still haven't acknowledged the fact that Apple has shipped MacOS X 10.4. MySQL still ships with a Startup Item. If you don't know where the launchd file is, it is because you don't have one. You probably have a MySQL entry in /Library/StartupItems or maybe /System/Library/StartupItems. Startup Items were deprecated in 10.4. Oracle should be creating a file named com.mysql.mysqld.plist in /Library/LaunchDaemons.
Here is what mine looks like now:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.mysql.mysqld</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/mysql/bin/mysqld</string>
<string>--socket=/var/mysql/mysql.sock</string>
<string>--basedir=/usr/local/mysql</string>
<string>--datadir=/usr/local/mysql/data</string>
<string>--user=mysql</string>
<string>--log-error=/usr/local/mysql/data/Pele.local.err</string>
<string>--pid-file=/usr/local/mysql/data/Pele.local.pid</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
I also don't have a /var/mysql directory and wasn't sure whether I should just create one or if this meant my configuration was different. If you feel like explaining any of this, I'd be curious to know.
You have to create one. Such a directory probably already exists on MacOS X Server. Just make sure it is owned by mysql.
sudo mkdir /var/mysql
sudo chown _mysql:staff /var/mysql
sudo chmod 0755 /var/mysql
[jdaniel@Pele:516] /var $ ls -al /private/var | grep mysql
drwxr-xr-x 3 _mysql staff 102 Aug 26 20:03 mysql
Of course, /var is a symbolic link to /private/var. Long story there. -
NEED HELP! can't create mysql connection in DW MX 2004
I re-format my computer last week and after reformatting i
install my PHP Triad and Dreamweaver MX 2004, but i can't create
mysql connection using DW wizard, i already follow the step:
1. create / manage site
2. choose document type
3. set up testing server ( i use php mysql @ localhost)
and when i create new connection (fill the hostname,
username, password, and select databases) it failed and show
message "unidentified error occur".
it never happen before (before i re format my computer).
can anyone help me how to solve this problem.
sorry for my bad english i came from Indonesia,
thx before
rgrds
zhastroI re-format my computer last week and after reformatting i
install my PHP Triad and Dreamweaver MX 2004, but i can't create
mysql connection using DW wizard, i already follow the step:
1. create / manage site
2. choose document type
3. set up testing server ( i use php mysql @ localhost)
and when i create new connection (fill the hostname,
username, password, and select databases) it failed and show
message "unidentified error occur".
it never happen before (before i re format my computer).
can anyone help me how to solve this problem.
sorry for my bad english i came from Indonesia,
thx before
rgrds
zhastro
Maybe you are looking for
-
Why does the album artwork on my iPod Classic get all mixed up wheres it is correct in the library. Please help
-
"exp" with Oracle 11.1 client and 10.2 instance gives "MAXSIZE" error
My company has a lot of customers running lots of versions (and combinations of versions) of Oracle, so I like to come up with commands that will usually work for all of them. I recently installed Oracle 11.1.0.6 client on my PC, and this happened wh
-
I have some applications that are windows only. I want to install windows 7 on my external hard drive and boot to it when I need to use my windows applications. Is this possible with a mac and, if so, how can I do that? I have a 64-bit Macbook Pro ru
-
Having trouble connecting my new Wii to the internet via FIOS
any one have same issue? I put in the key but it won't connect
-
Inspection Plan - Change order date Combination issue
We are facing 1 issue in our system. The Inspection plan assignments with new change orders is not assigning the correct inspection plan. Example: Plan Change Number Valid from Date 1 C