php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18841 Mozilla web browser is prompted to download index.php
Submitted: 2002-08-09 18:56 UTC Modified: 2002-08-10 13:51 UTC
From: cjs at math dot utah dot edu Assigned:
Status: Not a bug Package: *Web Server problem
PHP Version: 4.2.2 OS: FreeBSD
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cjs at math dot utah dot edu
New email:
PHP Version: OS:

 

 [2002-08-09 18:56 UTC] cjs at math dot utah dot edu
I upgraded PHP to 4.2.2 via the FreeBSD ports and now when people make requests, they are prompted to download the index.php source which has database info!  This only happens for some directories, otherwise, PHP / Apache does what it is supposed to for other directories.  I noticed that if directories have other files beginning with "index", then the problem occurred.  For example, index.dev.php or index.test.php, etc...

I don't think Apache needs to be recompiled after a PHP upgrade.

Thanks.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-10 08:04 UTC] tal@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.


 [2002-08-10 13:51 UTC] cjs at math dot utah dot edu
Perhaps it's not a bug, BUT... Apache was sending out index.php as a plain text file with all visible PHP code including database hosts and passwords.  (it was sending out ANY .php file as text)

I noticed that the FreeBSD ports did not uninstall the 4.2.1 version of PHP prior to installing 4.2.2, which I concluded to be the problem; I removed 4.2.1 and 4.2.2 and then reinstalled 4.2.2.  Everything seems to be working properly now.  I also had to clear the Cache in my web browser.

If it's not a bug, then at least there are some set-up issues here that might need some documenting.

Thank you,

Chris.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu May 13 03:01:24 2021 UTC