PDA

View Full Version : Do you need two connections to the database?


johna1964
07-13-2011, 05:35 PM
Hi!

Hopefully this will be a quick solve:

Testing Server on Local Machine: impressions_local_db

Remote Server on Hosting Service: impressions_db

Do you use the same connection to the hosting side? Or do you create the additional database connection for testing; then upload the remote connection?

The question arises because I am unable to connect to the host db when running the checout wizard, so I created an additional connection locally and the wizard ran perfectly, but when viewing through dreamweaver preview, errors incurred:

Parse error: syntax error, unexpected T_DNUMBER, expecting T_VARIABLE or '$' in C:\wamp\www\testsite_1\WA_eCart\eCart1_PHP.php on line 99

what am I doing wrong?

Thanks in advance!!

johna1964

Jason Byrnes
07-14-2011, 07:36 AM
no, do not use 2 connection files.

use 2 versions of the same connection file. To explain that better:

create the connect using the information for the remote server, then upload it.

in the Dreamweaver files panel, change the drop dowwn to connect to the remote server server, open the connections folder, and right click the connection file, select the Set Permissions option and clear the read permission to make it a write only file.


now change the drop down to connect to the local server, and go to the database tab, edit the connection to use the local connection information.

this will give you one version of the connection file with the remote information that is read only on the server, another version of the connection with the local info.

If Dreamweaver tries to upload the connection again, it will fail.


as for the error message, I would need a copy of the WA_eCart\eCart1_PHP.php file to tell what the cause of the problem is.

johna1964
07-14-2011, 09:44 PM
Jason, I understand exactly except one thing just to clarify: on the remote view I need to make this read only, not write on the server...you said "in the Dreamweaver files panel, change the drop down to connect to the remote server server, open the connections folder, and right click the connection file, select the Set Permissions option and clear the read permission to make it a write only file." But it supposed to be read only...correct?

Thanks so much!!

Johna

Jason Byrnes
07-15-2011, 07:08 AM
sorry, that is correct. I meant to say "clear the write permission".