Bug 55838 - PHP files are being executed instead of downloaded
Summary: PHP files are being executed instead of downloaded
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_ftp (show other bugs)
Version: 2.2.15
Hardware: Other Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Keywords: MassUpdate
Depends on:
Reported: 2013-12-03 09:37 UTC by classG2002
Modified: 2018-11-07 21:08 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description classG2002 2013-12-03 09:37:09 UTC
We have noticed that when trying to download PHP files from the server running mod_ftp via FTP the PHP files are being incorrectly transferred. It appears as though the PHP script is being executed by the server, and the result of the script is being outputted into the downloaded file.

For example, if we were trying to transfer a PHP file which contained the following:

echo "Hello world";

The file that we downloaded from the server would contain the following:

Hello world
Comment 1 Anthony 2015-03-20 20:58:30 UTC
You do have the php engine turned off, correct? When I first installed mod_ftp I had this problem overlapping vHosts on a particular directory. Setting the php engine to off in the config fixed it.

For Example with a VHost setup:

<IfModule mod_ftp.c>
  <VirtualHost *:990>
    <Directory /XXX/XXX>

      <IfModule mod_php5.c>
        php_admin_flag engine off

Comment 2 William A. Rowe Jr. 2018-11-07 21:08:33 UTC
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd.

As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd.

If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question.

If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with.

Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.