Question

I downloaded a php project from sourceforge.net named Employee Scheduler. The thing is, index.php is supposed to be the homepage but nothing is displaying when I access it via localhost. Other php projects that I have in my computer are working when I access them, with an exception to this employee scheduler. I am pretty sure I am accessing the right folder too, accessing it in

localhost/scheduler/index.php

and even creating a test php file in the same directory and accessing it. The test php file works and the index.php still doesn't show anything. What could be the problem here?

I am using WAMP on my Windows 7 computer.

EDIT:

I have included error_reporting(E_ALL); on the first line of the php file, but it still doesn't output anything. What gives?

I'll post the contents of index.php here:

<?php
/*********************************************************
    File: index.php
    Project: Employee Scheduler
    Author: John Finlay
    Comments:
        The home page for the site.  Asks a user to login
        and then redirects them to the appropriate section
        for employees or supervisors

    For site documentation and setup see the README.txt file
    included with the distrobution package.  If you did not
    receive this file, it can be found at 
    http://empscheduler.sourceforge.net

    Copyright (C) 2003  Brigham Young University

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
**********************************************************/

error_reporting(E_ALL);
require "es_functions.php";

//-- authenticate the user
$user = auth_user();
$url = "";
//-- if they are a supervisor then forward them to the supervisor home page
if (preg_match("/(Supervisor)|(Admin)/", $user["u_type"])) $url= "es_sup_index.php?".session_name()."=".session_id();
//-- forward to employee homepage
else $url = "es_emp_index.php?".session_name()."=".session_id();
header("Location: $url");

print_header("Welcome");
print_r($user);
print "<br /><br />If you are seeing this, your browser did not forward you to the correct page.  Click <a href=\"$url\">here</a> to continue.<br />\n";
print_footer();
exit;
?>
Was it helpful?

Solution

Try adding the following line after error_reporting(E_ALL);

ini_set("display_errors", 1);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top