1
SuperGeek
mainfile.php dies not long after starting
  • 2006/4/11 20:32

  • SuperGeek

  • Just popping in

  • Posts: 16

  • Since: 2005/1/12


In order to add more disk space to my web hosting account my host (CEDANT.COM) forced me to move to a different server. This is a gigantic pain as you can imagine. I first installed a clean version of XOOPS 2.0.13.2 and all was fine. Then I brought over all my files and the database and I got the dreaded "blank screen of death". After several hours of debugging I determined that the problem is that mainfile.php dies at the following line:

<code> if ( XOOPS_CHECK_PATH && !@ini_get('safe_mode') ) { </code>

Can anyone provide some explanation as to why this particular piece of code might cause a problem?

I cannot get any sort of debugging or anything else to work. I know that it "dies" at that point because I put debugging messages throughout mainfile.php, so I am certain that the line I included is the problem.

Please help!

Thanks!

SuperGeek

2
FusionKid
Re: mainfile.php dies not long after starting
  • 2006/4/11 21:02

  • FusionKid

  • Just popping in

  • Posts: 21

  • Since: 2005/9/27


You might want to check the following post detailing a similar issue/resolution. Sounds like your path is no longer correct now that you have moved physical servers.

See this.

A quick fix that can (probably) get you back up and running while you research more, can be found here.

3
SuperGeek
Re: mainfile.php dies not long after starting
  • 2006/4/12 2:28

  • SuperGeek

  • Just popping in

  • Posts: 16

  • Since: 2005/1/12


These were excellent suggestions but they didn't help. I cleared out the cache and templates_c directories but that didn't help. The path specified in mainfile.php is correct as it was generated from a clean install of XOOPS prior to me copying over the database from my old server and (I think - not sure) copying over the files. If I copied over the files I had enough sense to overwrite the mainfile.php with the clean-install version as the paths are correct for the new server. I know this is true because the clean install of XOOPS worked fine - it wasn't until I copied over the database/files that the bottom line of the following portion of mainfile.php stopped working:

<code>

if ( !defined("XOOPS_MAINFILE_INCLUDED") ) {
define("XOOPS_MAINFILE_INCLUDED",1);
echo ("mainfile.php-1 ");
// XOOPS Physical Path
// Physical path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_ROOT_PATH', '/home/u2/xxxxx/html');
define('XOOPS_ROOT_PATH', '/home/u2/xxxxx/html');

// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_URL', 'http://xxxxx.web.cedant.com');
define('XOOPS_URL', 'http://xxxxx.web.cedant.com');
echo ("mainfile.php-2 ");
define('XOOPS_CHECK_PATH', 0);
die ("2");
// Protect against external scripts execution if safe mode is not enabled
if ( XOOPS_CHECK_PATH && !ini_get('safe_mode') ) {
echo ("mainfile.php-3 ");
die ("3");

</code>

I know the problem is in the bottom line because if I take out the die ("2") debugging statement I no longer see the debugging messages. If I leave it in the see debugging messages up to and including the die ("2").

As you can see I even took out the @ in front of the ini_get in the hopes that I would get an error message but all I get is the blank screen.

Does anyone have any suggestions?

Thanks!

SuperGeek

4
SuperGeek
Problem with session_start in common.php WAS: mainfile.php dies not long after starting
  • 2006/4/26 18:48

  • SuperGeek

  • Just popping in

  • Posts: 16

  • Since: 2005/1/12


I've done more debugging and research. I'm still getting a blank screen but I've made progress. I have found that my code is now hanging in common.php at "session_start();", just following the call to "session_set_save_handler(...)". I've read in the "user contributed notes" for session_start() athttp://us2.php.net/manual/en/function.session-start.php#61347 that "the session_start() function needs a directory to write to". I don't understand how this works. Can someone please explain how this would apply to a XOOPS installation? Thanks! --SG

Login

Who's Online

182 user(s) are online (130 user(s) are browsing Support Forums)


Members: 0


Guests: 182


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits