Blank/White pages?

Not sure exactly what happened but the only changes I've made are related to member name formatting to support non-standard characters.

But now I get blank/white pages (no HTML at all) when browsing any non-admin pages.  I reversed my changes, made sure all settings including edited names are back to normal, cleared all caches but still... blank/white pages.  Kind of retarded, what the hell is the issue?

UPDATE: This is insane, now the admin area is returning a blank/white page. How the hell to figure out what's happening?

Quote · 31 Jan 2010

Hello!

Tell us more about changes whcih u made first and how u restored system back.

Regard

Quote · 31 Jan 2010

For code, I only edited:

/inc/profiles.inc.php
/inc/classes/BxDolTemplate.php


In profiles.inc.php, I just changed one line in the getProfileLink() function from:

return (getParam('enable_modrewrite') == 'on') ? BX_DOL_URL_ROOT . getNickName($iID) . ( $sLinkAdd ? "?{$sLinkAdd}" : '' ) : BX_DOL_URL_ROOT . 'profile.php?ID='.$iID . ( $sLinkAdd ? "&{$sLinkAdd}" : '' );


To:

return (getParam('enable_modrewrite') == 'on') ? BX_DOL_URL_ROOT . str_replace("%2520", "+", urlencode(urlencode(utf8_encode(getNickName($iID))))) . ( $sLinkAdd ? "?{$sLinkAdd}" : '' ) : BX_DOL_URL_ROOT . 'profile.php?ID='.$iID . ( $sLinkAdd ? "&{$sLinkAdd}" : '' );


In BxDolTemplate.php, I changed this line:

$sRet = getMainLogo();

to:

$sRet= '';


In the database, I changed:

1. Email to be a non-unique index. I don't recall what if it was set to "unique" before but I feel that it's OK for members to sign up more than 1 account with the same email.

2. Password field from varchar(40) to varchar(64).


From Admin section, I allowed Email field to allow duplicates and changed the regex for NickName to support space & few other characters.


That's it... I don't notice a problem from Admin when logged in, not from guest browsing fro a different web browser.  But when a new account is being created, the page in that browser goes white/blank.  No recovery.  Admin keeps working.  If I try to delete that new account from within Admin, I get a similar white/blank page.  But if I back out then Admin is still fine & I can delete the profile from phpMyAdmin.  Problem is, once I log out of Admin, I get the white/blank page.

The way I've been able to restore (for a short time at least) is to replace the original PHP files, delete all the files from cache & cache_public, and upload from a backup of what was in cache & cache_public.  Not a good way to recover, since I don't know what the error is - there is no way to turn on debugging.  Not sure if it's an issue with PHP or something else, but for 1 week everything was working without any problem even with lots of template, CSS, graphics changes.  As soon as I modify something simple like a database field (for more space), a regex in Admin, or a simple line of code... pretty soon the white page problem happens.

It would be very helpful for me to know the following:

- I keep reading "clear the cache" in different discussions but deleting the contents of the cache folder manually seems to be creating a problem. Clearing from within Admin deletes some but not all those files.  It's unclear when changing code what else may need to be done to avoid problems, so what is the actual procedure for this when developing?

- What sort of PHP.INI can I place in certain folders to check for errors?  I'm not seeing any errors in my web logs.

- I can understand something going wrong if I edit code which causes an error, but if I put everything back exactly how it was before & clear the all the cache settings from Admin, I don't understand why the problem would remain.  What is the procedure for "refreshing" the system after changing code, to make sure the problem is not due to something cached which is in conflict?

- Another issue I noticed, I'm not sure if it's related, is that the new accounts being created (only by me, I'm still testing) are not having the passwords salted & encrypted - the database ends up with nothing in the Salt field and the password is not encrypted.  What would cause the encryption step to be skipped?

Quote · 31 Jan 2010

Hello!

If u:

1) Replaced changed php files.

2) Cleared cache and cache_public folders.

3) Made Ctrl+F5.

then system should be restored.

If no then restore back original settings of fields, but seems it's not the reason of problem.

Regard

Quote · 31 Jan 2010

More info: I was able to get back to "normal" (for now) after another try at copying over the edited files with known good versions & clearing the contents of the cache folders.

For now I'm going to go back to the version of things without the error but I really would need to handle what I was trying to do (longer NickName, longer Password, spaces & other non-alpha characters in NickName) or I won't be able to bring accounts from another system into Dolphin.

What seems to be OK:

- Increasing maximum NickName to 40 in Admin.
- Increasing maximum Password to 20 in Admin.
- Increasing Password field from varchar(40) to varchar(64).
- Allowing duplicate Email in Admin.
- Allowing database to support duplicates in Email field.

What seems to be a problem:

- Changing the regex for NickName to support spaces.
- Changing the regex for NickName to support other non-alpha characters.
- Changing the getProfileLink() function to output an encoded string to support the spaces/non-alpha character regex.

I double-checked all my code, I've been coding for years, and a regular expressions expert, so I'm absolutely certain my changes were valid/fine.  However, I'm not familiar with how the regex is compiled from the Admin settings and whether additional characters are creating escape issues. Nor can I discern why, with these changes, it seems new account creation was somehow skipping the salt creation & encryption steps.  That actually may be the thing triggering the white/blank pages.

Quote · 31 Jan 2010

I'll try doing one change at a time and go through all steps of clearing cache for each small change to see which step is introducing the problem.

Some feedback which may be helpful:

I've designed template systems for myself and had to go through the process of clearing cache & it was very time-consuming, so what I did was maintain tracking files for last edit time and if there was a mis-match then I would regenerate that template or cached code.  That way, I would be able to check all pieces related to a an item being loaded and, if any of those pieces had changed (time stamp mis-match or older) then I would have the system itself auto-refresh the cache.

Example:

code.php would have a cache file code.php.cache and a tracking file code.php.track.  code.php.track will have a timestamp (no need to open the file) and code.php will have a timestamp (no need to open the file).  The timestamps are compared and if the timestamp of code.php is younger than code.php.track, code.php.cache will be refreshed and code.php.track will be updated so that the timestamp is up-to-date.

Quote · 31 Jan 2010

I figured the issue out.

What happened was when I was editing profiles.inc.php, the color-coding in my editor (EditPlus) wasn't color-coding past line 225.  So, I temporarily changed this line from:

$sUser .= "\n" . '?>';

To:

$sUser .= "\n" . '?\>';

It seems I then forgot to remove that temporary backslash which, of course, caused the PHP code after it to fail.  My brain missed it because I shrugged it off as just a bracket that would be escaped (no code harm) but didn't realize the escape would remain & get written into the user cache file.  Arrrg.

Anyway, all seems to be working now, my modifications are working as expected.

Thanks for helping me get on track to debug this properly.

Quote · 31 Jan 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.