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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Develop on Windows ... then Deploy on Linux

Thread began 3/18/2010 10:36 pm by yogastudents362523 | Last modified 3/19/2010 12:24 am by yogastudents362523 | 1132 views | 4 replies |

yogastudents362523

Develop on Windows ... then Deploy on Linux

Hi,

I can just FEEL that this is a stupid question before I ask it, but I can't quite figure out why. Please don't laugh. I am completely new at this stuff.

I hire a Linux web server located thousands of miles away. I do my development at home. Mine's a PC, theirs is a Linux. Little things like include files don't work properly because of the difference in referencing.

I notice that when I run phpinfo(), one of the things it does is tell you the OS. So ... what I would really like to do is be able to develop on my home Windows-based laptop and get everything working just fine on Windows, include files and all, and then just upload and deploy straight to web, knowing that it will work just fine there as well, because the difference in OS will be detected, and the relevant path used.

I started trying to do this, but it just seemed too simple an idea, so I am suspicious. Is it in fact possible to put some kind of an 'if-else' clause at the beginning of a file so that it can then use one set of path references for includes and so forth if it is in one environment, but use another if it is in another? Would getenv() or $_ENV do this for me?

I don't mind doing the work to learn and get it right if it is doable ... but I also don't want to waste my time if it isn't, and am wondering if one of you gurus out here could give me a heads-up on these possibilities before I go any further.

Thanks.

Bye now.

Sign in to reply to this post

Office Guy-172461

Not a stupid question at all.

The OS doesn't really matter as long as you have the things installed that you need installed. Your using Apache, PHP, and MySQL and all of those deal with whatever OS they're installed on, so it's not your problem.

Have a look here:
How to set up a local testing server for Dreamweaver
144/

If you setup Dreamweaver to use relative paths instead of absolute paths you won't have to change a thing. I develop on Windows, test locally, and upload to a Linux server without changing anything. You might need a different connection file for the remote MySQL but that's about it.

Sign in to reply to this post

yogastudents362523

Hi Office Guy,

Thanks for fast response.

[QUOTE=Office Guy-172461;49975]Not a stupid question at all.[\QUOTE]
Maybe not, but then I must be doing something silly.
My include files are not working, so I guess I must have something misconfigured.

[QUOTE=Office Guy-172461;49975]The OS doesn't really matter as long as you have the things installed that you need installed.[\QUOTE]
That was what I hoped and believed ... until ... !!!!!!

[QUOTE=Office Guy-172461;49975]Have a look here[\QUOTE]
I have WAMP rather than XAMPP, but as far as I can see from that, it should not be making a difference.

[QUOTE=Office Guy-172461;49975]If you setup Dreamweaver to use relative paths[\QUOTE]
Done.

[QUOTE=Office Guy-172461;49975]I develop on Windows, test locally, and upload to a Linux server without changing anything.[\QUOTE]
Sigh.
I need to look in some configuration files, then. My include files are not working. That's my problem right now. I think maybe I should check some Apache config files locally, and see what they say. Maybe put in some directives. Not done that before. It should be fun!!
I'll let you know how it goes. Secret handshake and all that!!!
Bye now.

Sign in to reply to this post

Office Guy-172461

  I have WAMP rather than XAMPP  

I wasn't just suggesting that you setup a testing server, there are a lot of other links there that cover the whole process. The configuration options aren't that different either.

  My include files are not working  

If you are using a full path then the server defaults won't matter.

Sign in to reply to this post

yogastudents362523

OKAY!!!
YAY!!!!!!!

Fixed it.

What is all that stuff and nonsense, I said to myself?? Why is it here on this build, but not on my production server?? Same exact code.
Office Guy says it should work fine.

Then it suddenly hit me.

phpinfo() function on the production server shows ...
display_errors = Off

phpinfo() in the default WAMP set up shows ...
display_errors = On

Edit php.ini. Restart PHP.
Boom.
Everything works.
No more silly notices about undefined variables.
Guess I should just learn to code better so the errors don't occur in the first place!!! But a variable is defined a main file prior to calling a function in an included file. ??!!!!

Anyway. I am now a happy man. No need to learn about environment variables and "if-else" depending on if it is Linux or Windows.

I KNEW that was crazy. Didn't smell right.
On to my next idiot inexperience problem.
Bye now. You all stay well.

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