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 

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:


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

<?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);

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

if (IS_installed === false) {
    require_once(S9Y_INCLUDE_PATH . 'include/');
    require_once(S9Y_INCLUDE_PATH . 'include/');
    require_once S9Y_INCLUDE_PATH . 'include/';
= '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') {
} else {
    if (IS_installed === true && !serendipity_userLoggedIn()) {
        // Try again to log in, this time with enabled external authentication 
event hook

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

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

            if (self.Spawnbody) {

            if (self.Spawnnugget) {

        function SetCookie(name, value) {


Casey Bralla
Chief Nerd in Residence
The NerdWorld Organisation
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --