local testing server for dreamweaver cs4

5 posts by 4 authors in: Forums > CMS Builder
Last Post: May 29, 2009   (RSS)

By willydoit - May 29, 2009

[font "Verdana"]Hi all,

we are using dreamweaver cs4 to create our sites but are completely new to it so finding our feet slowly but surely, I have managed to set up a local testing server using xampp on our 2003 server and all seems fine except I am unable to live view any php pages relating to cms or instant website due to the scripts trying to access the database using the published path.

Is there any way to be able to view such pages in live view? I have backed up the database and imported it into an sql server proivided with xampp but obviously the scripts are looking to the live path not any locally hosted, I do not want to have to continually recode pages and paths for testing for obvious reasons so any advice on exactly what is and isnt possible with getting pages to work on a local testing station would be appreciated.


[font "Verdana"]Do I need to install cms onto the local testing station in the same way that it has been installed onto the remote server?

Thanks in advance

Re: [willydoit] local testing server for dreamweaver cs4

By ross - May 29, 2009

Hi there.

Thanks for the cross post. You'll get much more traffic here. One thing I just thought of though, perhaps you could give WAMP a try. It's really easy to use. Just an installer and you are ready to go.

I don't know what Dreamweaver will think of it though. I am thinking it would be fairly easy to setup and try out even if it doesn't end up working.

Keep us up to date with how you are making out :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [willydoit] local testing server for dreamweaver cs4

By Dave - May 29, 2009

Hi willydoit.

We use absolute filepaths on the generated code to make sure it works whatever directory you put it in on the server, but you can actually use relative paths.

So for example, on my local PC if I generate a viewer I get a require_once line like this:
require_once "C:/wamp/www/cmsAdmin/lib/viewer_functions.php";

But if I know my viewer page is in the root of the website (eg: http://localhost/test_list.php) and /cmsAdmin/ is off the root as well (typical setup) then I can shorten it to this:
require_once "cmsAdmin/lib/viewer_functions.php";

As long as your path doesn't start with / or C:/ it will look _under_ the directory the viewer is in. If you have the viewer in a subdirectory you can go up one directory like with "..", like this:
require_once "../cmsAdmin/lib/viewer_functions.php";

Let me know if that makes sense and give it a try.
Dave Edis - Senior Developer
interactivetools.com

Re: [willydoit] local testing server for dreamweaver cs4

By Damon - May 29, 2009

Hi,


I use WAMP for my local server, but it is basically the same as XAMPP.

Yes, you need to install CMS Builder onto your local server.

This way I make it quick and easy to make changes in the templates in my code editor program and then open the browser and refresh to see the changes.

Couple of things to keep in mind:
The path to the viewer_functions.php file that you include on all your site pages will most likely be different on your host than your own internal test server.

require_once "C:/wamp/www/example.com/cmsAdmin/lib/viewer_functions.php";

Also, depending how you setup your internal server, the URLs may be different too.

Home server: http://localhost/site/cmsAdmin/admin.php
Hosted site: http://www.mysite.com/cmsAdmin/admin.php

Most of the time when I'm setting up a site, I work directly on the site so I don't have to worry about file paths or URLs changing later.

Hope this helps.
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/