Skip navigation
Currently Being Moderated

PHP Include causes FTP/PUT error in Dreamweaver CS6

Aug 19, 2012 9:04 PM

Tags: #php #failure #ftp #put #include

If I add a PHP "Include" to my code, I receive the following error when I do a "PUT" (but NOT when I PUT directly from the "Files" listing):

 

- error occurred - Access denied.  The file may not exist locally,  may be open in another program, or there could be a local permission problem.

 

All the rest of the file and it's dependencies work normally.  However, the one "included" file does not upload.

 

Now, when I select the specific file in the local "Files" listing, and click the up arrow to put it to the server, it works without error.

 

The include line is as follows:

 

<?php include('inc/header_includes.php'); ?>

 

I have deleted the file remotely - and re-uploaded.  I've wiped the entire site, and re-uploaded.  Nothing seems to work.

 

Anyone have a solution for this.  It apparently is happening to many people.              

 
Replies
  • Currently Being Moderated
    Aug 20, 2012 5:00 PM   in reply to Lee_Fuller

    Hi Lee,

     

    Sorry I don't have a solution, but hopefully my post can add focus to your problem as I'm experiencing a similar issue.

     

    When I open my index.html file and 'preview in a browser' within Dreamweaver CS6, clicking the login button allows my login.php file to be displayed and function correctly. However, 

     

    1. When I upload the files to my Hosting server I recieve a 404 error when I link into the php login page
    2. When I try opening the index.html file offline and hit the link to the login page, the web page displays only my code

     

    Can someone explain why php is functioning differently when called outside of the Dreamweaver environment? My Database connections and Server behaviours were created in Dreamweaver CS6 so I'm wondering if this is where the problem lies? Perhaps if I attempt adding the connecting php code manually, then perhaps I can avoid these complications.

     

    Thanks,

    Kim

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 21, 2012 5:14 AM   in reply to Lee_Fuller

    I want to make sure I understand your workflow:

     

    1. You have a PHP file that contains an include directive - <?php include('inc/header_includes.php'); ?>
    2. You PUT this file to the server and elect to also upload all dependent files
    3. While you are doing this PUT, you get the error message you list?

     

    If that is a correct summary, then please confirm that the path shown in the include directive is the correct document relative path to header_includes.php.

     

    Can we see the contents of the header_includes.php file?  Are you sure the error message refers to that include file?  Are there other includes within that include file?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 21, 2012 5:15 AM   in reply to KMK_Kimbo

    Please start a new thread describing your symptoms and questions.  It will only complicate this thread to keep your post here.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points