Casey Bralla on 14 Mar 2009 11:47:51 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Trouble with php file


Here's a weird one which will probably be simple to the guy who knows the 
secret.

I'm trying to setup Serendipty blogging software on my Debian etch box running 
apache 1.3 and several virtual domains.

Serendipity's main administration page is called by this 
file "serendipity_admin.php".  The weird thing, is when I type this into my 
browser (with the correct path), it tries to download the file instead of 
executing the php commands and creating a administratin page in html.   I 
have loaded a couple of test php files into the same directory and they 
execute  properly.


My logs are not listing any errors.


Anybody got any ideas to check?


Here's the test file which executes properly on the server:

<?
phpinfo();
?> 





Here's the top few lines of the offending file which does not run on the 
server:

<?php # $Id: serendipity_admin.php 898 2006-02-02 08:45:43Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity 
Developer Team)
# All rights reserved.  See LICENSE file for licensing details

define('IN_installer', true);
define('IN_upgrader', true);
define('IN_serendipity', true);
define('IN_serendipity_admin', true);
include('serendipity_config.inc.php');

header('Content-Type: text/html; charset=' . LANG_CHARSET);

if (IS_installed === false) {
    require_once(S9Y_INCLUDE_PATH . 'include/functions_permalinks.inc.php');
    require_once(S9Y_INCLUDE_PATH . 'include/functions_installer.inc.php');
    require_once S9Y_INCLUDE_PATH . 'include/functions_config.inc.php';
    $css_file 
= 'serendipity.css.php?serendipity[css_mode]=serendipity_admin.css';
} else {
    $css_file = serendipity_rewriteURL('serendipity_admin.css');
    if (defined('IS_up2date') && IS_up2date === true) {
        serendipity_plugin_api::hook_event('backend_configure', $serendipity);
    }
}

if (isset($serendipity['GET']['adminModule']) && $serendipity['GET']
['adminModule'] == 'logout') {
    serendipity_logout();
} else {
    if (IS_installed === true && !serendipity_userLoggedIn()) {
        // Try again to log in, this time with enabled external authentication 
event hook
        serendipity_login(true);
    }
}

// If we are inside an iframe, halt the script
if (serendipity_is_iframe()) {
    return true;
}

?>
<html>
    <head>
        <title><?php echo SERENDIPITY_ADMIN_SUITE; ?></title>
        <meta http-equiv="Content-Type" content="text/html; charset=<?php echo 
LANG_CHARSET; ?>" />
        <link rel="stylesheet" type="text/css" href="<?php echo 
$css_file; ?>" />
        <script type="text/javascript">
        function spawn() {
            if (self.Spawnextended) {
                Spawnextended();
            }

            if (self.Spawnbody) {
                Spawnbody();
            }

            if (self.Spawnnugget) {
                Spawnnugget();
            }
        }

        function SetCookie(name, value) {

-- 


Casey Bralla
Chief Nerd in Residence
The NerdWorld Organisation
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug