php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13594 Symbolic Link
Submitted: 2001-10-07 23:52 UTC Modified: 2001-10-08 00:09 UTC
From: Ashwin dot Kutty at Dal dot Ca Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 4.0.6 OS: Linux 2.4.7-2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Ashwin dot Kutty at Dal dot Ca
New email:
PHP Version: OS:

 

 [2001-10-07 23:52 UTC] Ashwin dot Kutty at Dal dot Ca
(Posted on PHP General User List)

On a default install of Redhat 8 I tried the following:-

I have a directory with an index.php script so that the url is something along the lines of http://www.mydomain.com/search/ .. Now following the
same logic I wanted to write another script but not bother creating another directory so I wrote my script called test.php and then created a symbolic link to it by pointing 'test' (without the quotes, of course) to test.php and upon going to http://www.mydomain.com/search/test I got my script's source displayed in plain text on the browser ..

Now maybe this is something I shouldnt be doing or the way I have the webserver configured but, just thought Id find out, by checking to see if anyone else knows anything about this..

BTW, I am on a Redhat 8 Linux (kernel version 2.4.7-2) server running php version 4.0.6 and I have checked in the conf of Apache (1.3.20) to see for the source its set to phps ..

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-08 00:09 UTC] cardinal@php.net
Your logic is based on the faulty assumption that http://www.mydomain.com/search/test is handled like a directory.  It's not, it's handled as a file with no associated mimetype.  So, it's treated with the default behavior by the webserver, which is typically to display its contents.  Basically, there's no reason for the web server to assume http://www.mydomain.com/search/test is a PHP script.  You can change that by using a ForceType directive in Apache.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC