close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Connection error non-www versus www

Thread began 1/06/2015 5:59 pm by JBWebWorks | Last modified 1/13/2015 6:19 pm by JBWebWorks | 691 views | 8 replies |

JBWebWorks

Connection error non-www versus www

domain is 62ndcacrc.com
my connection code is<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_connadmin = "localhost";
$database_connadmin = "database_name";
$username_connadmin = "myusername";
$password_connadmin = "mypassword";
$connadmin = mysql_pconnect($hostname_connadmin, $username_connadmin, $password_connadmin) or trigger_error(mysql_error(),E_USER_ERROR);
?>

when i go to url www.62ndcacrc.com, i have no problem
when i go to url 62ndcacrc.com i get an error
Warning: mysql_pconnect(): Access denied for user 'hostjb_rollieh'@'localhost' (using password: YES) in C:\vhosts\62ndcacrc.com\Connections\connadmin.php on line 9

Sign in to reply to this post

Jason ByrnesWebAssist

you should contact your host to determine why the connection works with the www domain but not without. this isn't a code problem but a server setup problem, the host will be able to help with that.

the only suggestion I would be able to makes to use mod rewrite to force the www address:
http://www.htaccessbasics.com/force-www-nonwww-domain/

Sign in to reply to this post

JBWebWorks

Thanks Jason, it was actually on my pc where i had placed duplicate entries for www and non-www in my local apache bin and also in my system32 drivers.

Please see private message

Sign in to reply to this post

Jason ByrnesWebAssist

Instead of Creating a standard DW Connection, use Dynamic Connections.

the Dynamic Connection tool allows you to create one connection, and specify the local information and the remote information and it will connect to the correct server based on the address.

Sign in to reply to this post

JBWebWorks

see private message

Sign in to reply to this post

Jason ByrnesWebAssist

Do you have Data bridge installed?

if so when you go to the Database tab to create a new Database connection, choose the option to use the Dynamic MySQL connection.

in the Dynamic MySQL connection, you will be able to specify the local server details on the initial tab, then on the Additional Servers tab, you can specify the remote server details.


If you don't have Data Bridge / Dynamic Connections, then the next best thing is to upload the connection with the remote details to the server, then use file villa or another FTP program to access the server and set the Connection file on the server to be read only.

now you can set the connection in DW up for the local server, and the next time it tries to upload the local details, it won't be able to because it is read only on the server.

Sign in to reply to this post

JBWebWorks

Great, Jason!
I had not used the dynamic connection that way, duhh!
I had used a work around with a connection for local and another connection for remote.
This will save me a tremendous amount of time.

see private message

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome

Sign in to reply to this post

JBWebWorks

Thanks, Jason.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...