close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Using the extension

Thread began 11/07/2010 3:35 am by J7HNW | Last modified 5/30/2013 1:06 pm by Zulian | 4993 views | 18 replies |

J7HNW

Using the extension

Having a problem - bought this to use because of reason below

I am using Xxamp locally. My user name is ROOT and my Password is authorise - no problems and I use the same login for all sites locally.

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_chesterbeer = "localhost";
$database_chesterbeer = "chesterbeer";
$username_chesterbeer = "root";
$password_chesterbeer = "auth0r1se";
$chesterbeer = mysql_pconnect($hostname_chesterbeer, $username_chesterbeer, $password_chesterbeer) or trigger_error(mysql_error(),E_USER_ERROR);
?>


However on my Web Server I AM NOT ALLOWED TO USE ROOT

So my connections file for the server has to be


<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_chesterbeer = "localhost";
$database_chesterbeer = "chesterbeer";
$username_chesterbeer = "chesterbeer";
$password_chesterbeer = "auth0r1se";
$chesterbeer = mysql_pconnect($hostname_chesterbeer, $username_chesterbeer, $password_chesterbeer) or trigger_error(mysql_error(),E_USER_ERROR);
?>

Please can you tell me how to enter this in Dynamic Connections. When I entered as above I got problems . I set up the Local data in the main connection and the Live Server date on the additional connections - but it doesnt work

At the moment - I have to go into my connections file and change the user name to ROOT to do my local testing - and then I am having to change it back to chesterbeer and having to re ftpo the file for it to work on the LIVE server. I had hoped this was the solution.

Please advise where i am going wrong

Thank you

Sign in to reply to this post

Ray BorduinWebAssist

That first screen looks correct. What did you enter on the additional connections tab?

Sign in to reply to this post
Did this help? Tips are appreciated...

J7HNW

Hi Ray

On the second connnections tab I entered

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_chesterbeer = "localhost";
$database_chesterbeer = "chesterbeer";
$username_chesterbeer = "chesterbeer"; ** Instead of ROOT on my local server**
$password_chesterbeer = "auth0r1se";
$chesterbeer = mysql_pconnect($hostname_chesterbeer, $username_chesterbeer, $password_chesterbeer) or trigger_error(mysql_error(),E_USER_ERROR);
?>

Sign in to reply to this post

Willi Schneider

Hi

Try to use the IP for the remote host. I don't own the script, but seeing that both local and remote host names are set to "localhost" seems to be a possible reason for your problem.

HTH

Willi

Sign in to reply to this post

Ray BorduinWebAssist

I think you may be overlooking the additional connections tab in the UI? Do you have a screen shot of what you have entered in that tab of the UI?

Sign in to reply to this post
Did this help? Tips are appreciated...

J7HNW

Connections screen grab

This post has been deleted.

J7HNW

Grab

Hi Ray

Please find attached new screen grab showing both screens
of the GUI

Regards

John

Sign in to reply to this post

Ray BorduinWebAssist

It looks like it is a problem with the value you have in the "For Domains" field on the second page. This value should be the domain that appears in the url of the site where you want to use this dynamic connection.

Sign in to reply to this post
Did this help? Tips are appreciated...

J7HNW

Stil not working

Please see below Ray
. I have entered the full URLK but srill this will not connect. Here is the code from the Connections file

<?php
# FileName="WADYN_CONN.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_Cumberland = "localhost";
$database_Cumberland = "cumberland";
$username_Cumberland = "root";
$password_Cumberland = "author";
@session_start();
$foundConnection = false;
if ($foundConnection == false) {
$domains = explode(",","http://www.cumberlandpackaging.co.uk");
for ($domindex = 0; $domindex<sizeof($domains) && !$foundConnection; $domindex++) {
$domainCheck = trim($domains[$domindex]);
if (strpos(strtolower($_SERVER["SERVER_NAME"]),strtolower($domainCheck)) !== false && ($domainCheck == "" || strpos(strtolower($_SERVER["SERVER_NAME"]),strtolower($domainCheck)) == strlen($_SERVER["SERVER_NAME"])-strlen($domainCheck))) {
$hostname_Cumberland = "localhost";
$database_Cumberland = "cumberland";
$username_Cumberland = "cumberland";
$password_Cumberland = "author";
$foundConnection = true;
}
}
}

$Cumberland = mysql_pconnect($hostname_Cumberland, $username_Cumberland, $password_Cumberland) or trigger_error(mysql_error(),E_USER_ERROR);

?>

Please can you tell me why this doesnt work. I only want to be able to connect with

user name: root locally

user name : cumberland on the live server

Thanks

Sign in to reply to this post

neilo

Can you confirm that you have visited your remote site's control panel, and in the database/mySql section of the control panel, that you have created a database called 'cumberland', a username 'cumberland' and set up that username with a password 'author' ?

Very often the database prefix is set by the account itself.

Sign in to reply to this post
loading

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...