Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Dreamweaver runs PHP code while downloading file

Community Beginner ,
Jun 24, 2011 Jun 24, 2011

When I want to download a PHP file from my testing server to my local directory, Dreamweaver CS5 runs the PHP code and delivers a file with the data from the database rather than the PHP code. How do I get Dreamweaver to just give me the code? (I'm trying to revert from the uploaded file to what I have locally.)

Thanks,

Gary

TOPICS
Server side applications
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 24, 2011 Jun 24, 2011

If I understand you, use dreamweaver and go to the testing server and "Get" the file.  It should be copied to your local folder.  You can also use your operating file system of going to your testing server, usually in the htdocs folder and copy the file and paste it into your local folder.

Gary

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 24, 2011 Jun 24, 2011

Thanks, but that's not my issue. Those are normal ways to get the file from testing server to local machine. (And, by the way, my testing server is separate  from development machine.)

This issue is that when I do the download, the file I get has the database data, rather than the code that generates that data. It's like the PHP script is being executed before the download occurs. I don't get the original file. I get it's result.

Regards,

Gary

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 24, 2011 Jun 24, 2011

Please list the exact steps you take to download the file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 24, 2011 Jun 24, 2011

Show the Files pane. Connect to testing server. Click on the file on the testing server. Click the download button.

GS

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 24, 2011 Jun 24, 2011

>Click the download button

Download button? Do you mean the 'Get' button?  The Get button executes an FTP get. Since it's an FTP command and not http, it can not execute PHP. Is it possible that someone inadvertently uploaded the rendered php page source code?

Try getting the file with a different ftp application, but I can't believe anything in DW could cause this behavior.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 26, 2011 Jun 26, 2011

The button says "Get files(s)..."

I'm using WebDAV, not FTP, to access that server.

This must be some sort of permissions or firewall issue. When I use the Compare tool (right click on local file and choose "Compare with testing server"), the BBEdit comparison shows the PHP code on the right, local file, but none of the code on the left testing server, with the left showing data instead. Yet I had just uploaded the file to the testing server. The local and testing dates and times match. I know they are the same file.

Gary

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 26, 2011 Jun 26, 2011

Gary Sprung wrote:

I'm using WebDAV, not FTP, to access that server.

That's where your problem lies. See the following Help page: http://help.adobe.com/en_US/dreamweaver/cs/using/WSc78c5058ca073340dcda9110b1f693f21-7ebca.html.

The note at the bottom of the page has this to say: "WebDAV may be unable to properly check out any files with dynamic content like PHP tags or SSIs because the HTTP GET renders these as they are checked out."

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 26, 2011 Jun 26, 2011

Thank you, David. This does sound much closer to the right diagnosis. Yet this is brand-new behavior for my setup. This WebDAV process in Dreamweaver has worked well with my PHP servers until recently -- not rendering the code during download. I have fiddled with numerous server and Dreamweaver settings recently so I must have changed something that caused the new behavior.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jun 26, 2011 Jun 26, 2011
LATEST

If you're trying to revert to the local file, couldn't you just upload that one? Or has it already been replaced with the renderednversion that you downloaded?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines