browser displays the source php on macports site ?

Bill Hernandez bh at mac-specialist.com
Thu Nov 8 13:46:34 PST 2007


When I clicked on :

http://svn.macosforge.org/repository/macports/trunk/www/.htaccess

I got :

<Files ~ "\.inc$">
     Order allow,deny
     Deny from all
</Files>



As you travel down the hierarchy to the link below :

http://svn.macosforge.org/repository/macports/trunk/www/ports.php

All the php content is displayed. Is that something you guys want to  
do ?

This is part of the page shown on link above.

<?php
     /* -*- coding: utf-8; mode: php; tab-width: 4; indent-tabs-mode:  
nil; c-basic-offset: 4 -*-  
vim:fenc=utf-8:filetype=php:et:sw=4:ts=4:sts=4 */
     /* $Id$ */
     /* Copyright (c) 2004, OpenDarwin. */
     /* Copyright (c) 2004-2007, The MacPorts Project. */
     $MPWEB = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER 
['SCRIPT_NAME']);
     include_once("$MPWEB/includes/common.inc");
     include_once("$MPWEB/includes/email.inc");
     print_header('The MacPorts Project -- Available Ports', 'utf-8');
     $by = isset($_GET['by']) ? $_GET['by'] : '';
     $substr = isset($_GET['substr']) ? $_GET['substr'] : '';
?>


<div id="content">

     <h2 class="hdr">MacPorts Portfiles</h2>

     <p>
         This form allows you to search the current index of MacPorts  
software. <br />
         <i>Index last updated: </i>
<?php
         $sql = "SELECT UNIX_TIMESTAMP(activity_time) FROM  
$portsdb.log ORDER BY UNIX_TIMESTAMP(activity_time) DESC";
         $result = mysql_query($sql);
         if ($result && $row = mysql_fetch_row($result)) {
             echo date("d-M-Y H:i:s", $row[0]);
         }
?>



More information about the macports-users mailing list