Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Dreamweaver won't connect to database

Explorer ,
Mar 22, 2007 Mar 22, 2007
Hi all, I really need help with this, I've contacted my hosting companies support and they think that there isn't a problem server-side.
By the way I've done the same thing in the past with no problems whatsoever.

I keep getting this error when trying to create a new connection to my database: : "Your php server doesn't have the MySQL module loaded or you can't use the mysql_(p)connect functions."

The hosting compant has disabled mysql_pconnect(). I know about this, because a different app stopped working when the hosting company disabled this without telling anyone. Dreamweaver automatically uses pconnect, but all i've done before is removed the 'p' and everything has worked.

Now if I do this, I try to create a new recordset, and choose the connection, then I get '***No table found' in the table dropdown. This happens with allmy old connections that did work.

Because of this, I can't do anything now at all with my database! I just wondered if anyone had this problem before, or if anyone had any suggestions at all! cheers

dave

PS sorry about the stupid screen name, anyone know how i can change that?
TOPICS
Server side applications
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 01, 2007 Apr 01, 2007
Powderskier9@gmail wrote:
> - This is a long and winded explanation, but I believe that each of the steps
> are necessary to confirm that you have the prerequisite functionality and files
> for this setup(Apache 2.24, PHP 5.21, MySQL 5.0.37) to work on a Windows PC.

Yes, it is a long-winded explanation, and you deserve credit for you
perseverance. However, it's quite clear that you missed out a vital step
when using the PHP 5.2.1 Windows installer, when you are prompted to
choose which ex...
Translate
LEGEND ,
Mar 22, 2007 Mar 22, 2007
jnkjnkjnkjnkjn wrote:

> Hi all, I really need help with this, I've contacted my hosting companies
> support and they think that there isn't a problem server-side.
> By the way I've done the same thing in the past with no problems whatsoever.
>
> I keep getting this error when trying to create a new connection to my
> database: : "Your php server doesn't have the MySQL module loaded or you can't
> use the mysql_(p)connect functions."
>
> The hosting compant has disabled mysql_pconnect(). I know about this, because
> a different app stopped working when the hosting company disabled this without
> telling anyone. Dreamweaver automatically uses pconnect, but all i've done
> before is removed the 'p' and everything has worked.
>
> Now if I do this, I try to create a new recordset, and choose the connection,
> then I get '***No table found' in the table dropdown. This happens with allmy
> old connections that did work.
>
> Because of this, I can't do anything now at all with my database! I just
> wondered if anyone had this problem before, or if anyone had any suggestions at
> all! cheers
>
Try deleting your connection script(s):
Site >> Advanced >> Remove Connection Scripts

Then recreating them(it)
http://livedocs.adobe.com/dreamweaver/8/using/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs...

Mick
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 23, 2007 Mar 23, 2007
thanks for the reply,

tried that though and there's still no change: after ive created the connection (manually type in the database name, because if i 'choose' database i'll get the pconnect error) and changed the pconnect to connect, I then try and create a recordset. I choose the connection, which doesn't give me any connection errors, but theres still '***No Table Found'
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 23, 2007 Mar 23, 2007
jnkjnkjnkjnkjn wrote:

> thanks for the reply,
>
> tried that though and there's still no change: after ive created the
> connection (manually type in the database name, because if i 'choose' database
> i'll get the pconnect error) and changed the pconnect to connect, I then try
> and create a recordset. I choose the connection, which doesn't give me any
> connection errors, but theres still '***No Table Found'
>
Are you sure you deleted the connection script on the host server?
Mick
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 23, 2007 Mar 23, 2007
yea I'm certain. I checked on the remote server.

Good thing is though after lots of support tickets my hosting company seem to have sorted it, as it works now and I've not changed anything. Annoyingly, they don't seem to want to tell me what the problem was, and how they fixed it. I'll post on here if I do find the solution. Cheers for your help anyway
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 01, 2007 Apr 01, 2007
This is an alternate resolution to the above error message if you are trying to connect to a MySQL database locally on a Windows XPSP2 PC through Dreamweaver 8(8.0.2). Hopefully this can help someone.

BACKGROUND:
Installed Apache 2.24 first, then PHP 5.21 through the php-5.2.1-win32-installer.msi file & finally MySQL 5.0.37 for local site testing for web development onto a Windows XP SP2 PC. The key here was that PHP 5.21 was installed using the .msi file versus downloading then extracting the contents of the php-5.2.1-Win32.zip file into a folder on my PC. Since I installed from the .msi file, I noticed 2 things after some research. First, the ext folder, where PHP extensions are referenced was not installed, secondly the libmysql.dll file was not installed with the msi file. The libmysql.dll file is also included in the php-5.2.1-Win32.zip file. This file seems to come into play later, as you will see. I confirmed Apache worked with localhost test(go to http://localhost make sure you see It works! on the webpage), confirmed php worked with phpinfo test(create a file named file.php with the following contents in the code <?php phpinfo(); ?> this file will show you php configuration information then I confirmed that MySQL was starting the MySQL service as needed and I could login without issue as the root user.

- Next, I proceeded to try to connect to a MySQL database through Dreamweaver 8(8.0.2) on my PC. I received the “Your PHP server doesn’t have the MySQL module loaded or you can’t use the mysql_(p)connect functions.” error message.

- Next, I checked my php.ini file(located in your PHP installation folder) to see if the extension_dir value was set to reference the folder where my PHP extensions would reside and if the extension=php_mysql.dll was enabled and accessible to PHP so that it could interface to MySQL. The extension_dir value was pointing to ‘./ ’ . Next, I proceeded to search my local hard drive where PHP was installed for the ext folder, where PHP extensions reside. To my surprise, this folder was not found. After some searching online, I discovered that the ext folder was in the php-5.2.1-Win32.zip file that can be downloaded from the PHP site. So I proceeded to download this file to my PC, extract the contents of the file into a folder then copy the ext folder into my PHP installation folder. In my instance, PHP was installed to E:\Program Files\PHP\ and I copied the ext folder here. So it was located here; E:\Program Files\PHP\ext. Now I had to go back to my php.ini file and specify the location of the ext folder, I did that, checked the phpinfo page for the location where extension_dir was pointing, it was still referencing ‘ ./ ’ . I proceeded to restart my PC, then I checked this value once again after a reboot and it was pointing to the correct location(E:\Program Files\PHP\ext).

- Next, I needed to confirm that the extension=php_mysql.dll was enabled in the php.ini file, it was commented out( ;extension=php_mysql.dll ), I removed the comment( extension=php_mysql.dll ) and tried to connect to the MySQL database again through Dreamweaver and it still gave the same error message as above.

- I went online again and searched the PHP site in relation to setting it up with MySQL 5 and PHP 5. The site stated that the PHP installation location should be the first value specified in the PATH variables on your Windows system. I checked this by going to Control Panel->System->Advanced->Environment Variables then in the System Variables section I confirmed that the Path Variable had the E:\Program Files\PHP\; value listed first, this is needed according to the PHP site and I confirmed this. Secondly, I confirmed that there was a variable named PHPRC pointing to my PHP installation location
(E:\Program Files\PHP\ ). This was also listed as something that should be specified.

- The PHP site also stated that the libmysql.dll file is needed in your C:\Windows\System32 folder. Next step was to search my PC for this file, it was not in C:\Windows\System32 or in my PHP installation folder. However, this file was located in the folder that contained the extracted files from the php-5.2.1-Win32.zip file. I proceeded to copy the libmysql.dll file into C:\Windows\System32, tried to connect to MySQL in Dreamweaver 8 again, still the same error message as above. Then, I thought I should try to Stop my Apache server, then Start it. After this was done, I tried to connect to the MySQL in Dreamweaver 8 and this time it worked.

- This is a long and winded explanation, but I believe that each of the steps are necessary to confirm that you have the prerequisite functionality and files for this setup(Apache 2.24, PHP 5.21, MySQL 5.0.37) to work on a Windows PC. I wanted to post this online to save people frustration if they encountered the specific error as I did. I had read that other people downgraded to PHP 4 and this resolved the problem, but that didn’t cut it for me. I have used XAMPP, a free local development environment and found this much simpler to install and start to use than the above configuration. But for those who have the problem I had, I hope my steps helped. If you find a fix, post it online to help others.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 01, 2007 Apr 01, 2007
Powderskier9@gmail wrote:
> - This is a long and winded explanation, but I believe that each of the steps
> are necessary to confirm that you have the prerequisite functionality and files
> for this setup(Apache 2.24, PHP 5.21, MySQL 5.0.37) to work on a Windows PC.

Yes, it is a long-winded explanation, and you deserve credit for you
perseverance. However, it's quite clear that you missed out a vital step
when using the PHP 5.2.1 Windows installer, when you are prompted to
choose which extensions to install. If you had selected the correct
extensions at that stage, everything should have been up and running in
about five minutes.

I have detailed instructions on my website for using the Windows installer:

http://foundationphp.com/tutorials/php_installer.php

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 02, 2007 Apr 02, 2007
Thanks for the instruction above.

However, my problem is different in that I am using Dreamweaver on my local windows machine, and trying to connect to my MySQL database on a remote linux server.

I posted above that it was working, but it now isn't working.

When I asked the hosting company what the problem was and how they fixed it, they said 'pconnect was disabled for securoty reasons, we enabled it for some users' ie me.

However, I wasn't using pconnect anyway, but I left it becasue everything seemed to be working. It now isn't working again, and when I raise the support ticket again all I get from them is: 'its working from our end, try again.' and they close the ticket. It ISNT working from my end!

Getting a bit annoyed with this now.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 02, 2007 Apr 02, 2007
jnkjnkjnkjnkjn wrote:
> However, my problem is different in that I am using Dreamweaver on my local
> windows machine, and trying to connect to my MySQL database on a remote linux
> server.

Although Dreamweaver allows you to do that, it's not a very good way of
testing. Using a local testing environment is faster, more secure, and
more efficient.

Having said that, things that can cause remote testing to choke are
illegal characters in the database or table names. They shouldn't
contain any spaces or hyphens. A lot of hosting companies seem to be
oblivious of the restriction on hyphens. There is a way around this,
which is to surround the names with backticks. Dreamweaver does this
automatically, but one version of Dreamweaver (I forget which) didn't
have this feature. However, the feature was restored in an updater.

Dreamweaver connects to MySQL by using scripts in a hidden folder called
_mmServerScripts. This must be in the site root. Because it's a hidden
folder, you can't see it in the Dreamweaver Files panel, so need to
check for its existence with your site control panel or an FTP program.

Make sure you have applied any updaters to your version of Dreamweaver.
Delete the files in _mmServerScripts, and try to connect again. DW will
upload fresh versions of the files.

The other thing to check is that the host directory and URL prefix in
your testing server definition both point to the site root.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 02, 2007 Apr 02, 2007
I'm using Dreamweaver 8.0.2 and my databases and tables have underscores but no hyphens or spaces.

I'm no expert on all this, but is it a good idea then to create all my databases and tables locally, and the application, and then upload all the files to the server when finished, and then create / import the database on the remote server?

Does Dreamweaver use the 'testing server' settings when creating a recordset? I'm assuming it does. I should probably go and get MySql installed locally and set up my app that way.

Thanks for all the advice
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 02, 2007 Apr 02, 2007
jnkjnkjnkjnkjn wrote:
> I'm using Dreamweaver 8.0.2 and my databases and tables have underscores but no
> hyphens or spaces.

Then there should be no problem.

> I'm no expert on all this, but is it a good idea then to create all my
> databases and tables locally, and the application, and then upload all the
> files to the server when finished, and then create / import the database on the
> remote server?

That's the way that most people do it, and the way that I recommend.

> Does Dreamweaver use the 'testing server' settings when creating a recordset?
> I'm assuming it does. I should probably go and get MySql installed locally and
> set up my app that way.

Yes it does. The simple way is to create a database on your local
machine with the same name as your remote one. Also set up a user
account in your local version of MySQL with the same username and
password as your remote server. Then, when it comes to deploying the
application, everything should work seamlessly after exporting the
database or re-creating it on the remote server.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 02, 2007 Apr 02, 2007
thanks for all that. I've set up my new local testing server and it all seems to work fine. I've also uploaded a test page and everything seems to be working remotely too now. Thanks very much for the help, I might even buy your book!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 02, 2007 Apr 02, 2007
LATEST
jnkjnkjnkjnkjn wrote:
> thanks for all that. I've set up my new local testing server and it all seems
> to work fine. I've also uploaded a test page and everything seems to be working
> remotely too now. Thanks very much for the help

Glad you managed to get it sorted so quickly.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines