Jump to content

HELP!!!!! Blank Page


indz

Recommended Posts

Hi All,

 

I am looking for suggestions to help debug this problem ASAP. I am fairly new to PHP, this is my first database attempt. I am using a Computerized Maintenance Management System obtained for free from http://www.maintenance-software.org/. I think I have the database information entered in properly, it is shown below:

 

<database type="mysql">

<server>localhost</server>

<login>root</login>

<password></password>

<default>cmms</default>

</database>

 

I'm running the system using windows XP Pro, PHP 5.3.1.

 

The attachment contains the original open source files.

 

Thanks in Advance

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

A) Blank php pages are usually caused by fatal parse or fatal runtime errors. Are you developing and debugging this on a system with error_reporting set to E_ALL and  display_errors set to ON in your master php.ini so that php will both report and display all the errors it detects? You will also want to go through the code and remove/comment out any lines that are setting error_reporting/display_errors.

 

B) This is the second major script I have seen lately that puts sensitive information into a .xml file (i.e. your database connection details.) However, anyone that recognizes the script will know that they can simply browse to the site.xml file and get your database connection information. You must take steps to insure that the site.xml file is not web accessible. You either need to prevent http access to the file or move it to a folder that is not web accessible.

Link to comment
Share on other sites

Hi There,

 

Thanks for the reply.

 

I added the code to the PHP page....index.php

<?php

ini_set('display_errors',1);

error_reporting(E_ALL);

 

require "config.php";

 

$site = new CSite("./site.xml",true);

$site->Run();

 

?>

 

I am still getting a blank page.

 

I've also tested in a live server (Windows platform), still getting a blank page over there.

 

Thanks again for the quick reply.

Link to comment
Share on other sites

A) I did not state to put the settings into your code (because doing so won't cause fatal parse errors, the most common reason for a blank page, to be displayed.)

 

B) The site.php file sets error_reporting to 0 and will hide any runtime errors, unless you commented out the line to prevent it from doing so.

Link to comment
Share on other sites

That would be question for the Author of the code.

 

Until you debug what is causing the blank page, you won't know. You could be missing a php extension the code relies on or the code could be using some depreciated feature that is tuned off in the php.ini on the systems that you have tried it on.

Link to comment
Share on other sites

Hi there,

 

i've commented out error_reporting to 0 in the site.php and I do get this error:

 

Fatal error: Cannot redeclare CSQLAdmin::$functions in C:\xampp\htdocs\cmms\lib\sqladmin.php on line 30

 

I really don't have idea what the problem is about.

 

Please do advise.

 

Thanks.

Link to comment
Share on other sites

There are two lines in that file that define the same variable. You could comment one out and see if it works.

 

However, since that error would have always prevented the code from working, I seriously doubt that you will be successful in getting the overall script to work. Who would have posted a script that fails to run due to a simple error in the source code?

Link to comment
Share on other sites

Thanks for the quick reply.

 

When i commented out the one of repeated (similar) variable declared, I'm getting this error:

 

Notice: Undefined index: NAME in C:\xampp\htdocs\cmms\lib\config.php on line 107

 

I know I must replace one of the repeated variable with another variable in order to resolve the error but I don't know exactly which variable to declare.

 

 

Please do advise on that. Anyway have you tried to run the code?

I need to complete this asap. Need your urgent help.

 

Thanks.

Link to comment
Share on other sites

You can safely ignore that error.

 

The code on that line should have been properly written as -

 

if (isset($this->attr["NAME"]) && $this->attr["NAME"] != "")

 

Frankly, you are going to see a few dozen similar problems. You should contact the author of the script for his help.

Link to comment
Share on other sites

Thanks again.

 

As you said I got a new problem:

 

Fatal error: Cannot use string offset as an array in C:\xampp\htdocs\cmms\lib\config.php(128) : eval()'d code on line 1

 

The author of the project is missing as this code was last updated in 2006.

 

Can you please advise me on this problem.

 

Thanks again.

Link to comment
Share on other sites

My recommendation would be to find a different, up to date, supported, script.

 

In the time you will waste getting to the point where the current script will even run without any errors, then you will still need to determine if it meets your needs, you could search for, find, and evaluate 10 other scripts to find one that does what you want it to.

Link to comment
Share on other sites

Thanks for the help and your time.

 

But my supervisor wants me debug this code for my internship purpose.

 

Can you please advise me on the above problem.

 

Thanks a lot. Will try not to bug you anymore. 

 

FYI, please do checkout http://www.maintenance-software.org/cmms-screens.php for the screen shots of the system. It looks like it is working but when i try to run it....a lot of bugs are popping out.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.