Seriously frustrated with Drupal 5.x giving me blank pages. I've searched the web for answers and have tried the usual fixes. By that I mean:
* Adding to .htaccess
<FilesMatch "\.(php|html?)$">
php_value memory_limit 32000000
</FilesMatch>* Adding to settings.php
ini_set("memory_limit", "32M");
ini_set('display_errors', TRUE);
*Adding to the start of index.php
ini_set("memory_limit", "32M");
ini_set('display_errors', TRUE);None of them work, even if all 3 are in place. No error ever shows up (like I'm used to or expected with Perl's Carp).
I get blank pages during the following actions:
- Logging in (submit and index.php?q=node&destination=node gives blank page).
- Logging out (click logout and index.php?q=logout gives blank page)
- Several admin actions here and there (site info, changing blocks etc) but not all of them.
- Submitting content.
In all the above cases, the content or action is submitted: a back-page or refresh will show the intended result or submit the data twice. In the case of modifying admin settings, Drupal actually shows "Configuration saved" twice.
Is this a memory issue or a redirect issue? Thus far I have been unable to locate any log on Drupal that clearly indicates the problem. I do not have access to server error logs (only access logs). In addition I don't have access to php.ini and I'm on an IIS6.0 webhosting server.
Is Drupal 5.x incompatible with IIS6?
I read somewhere that it could be due to whitespaces in some php files. But I use Crimson Editor which auto-strips trailing spaces and I've also independently verified some suspect files like styles.css, etc and there were no offending trailing spaces.
Any help will be greatly appreciated! I actually moved from Joomla to Drupal, but didn't expect this much difficulty.
Comments
=-=
Doesn't make sense that you wouldn't have a php.ini file, as this has nothing to do with IIS6 and everything to do with PHP ?
There are quite a few threads about IIS6 using search. I use apache, so I can't be of any specific help.
php.ini
Hi, it's not that I don't have a php.ini file, but as a paid webhost, I don't have access to it. It's not a machine I can sit infront of and browse the filesystem using Windows Explorer or edit php.ini with notepad.
My only access to the server is FTP. The virtual filespace is limited to just "www" on the IIS server.
=-=
I dont specifically have access to my php.ini either, thus i use a small snippet of PHP to grab the php.ini file from its folder and save it to my root, then i changed it from there. You will have to alter the snippet as necessary to grab your php.ini as it may be stored in a completely different folder then mine was.
You may want to ask your host for a copy provided they allow you to use a custom php.ini file if the snippet does not work for you.
The snippet I use is below.
custom php.ini
Hi, thanks for the custom php.ini script. However, as you say, using the php function ini_set() is an alternative to this, however, it does appear that inserting ini_set() code into settings.php doesn't seem to have any beneficial effect on my problem.
Sounds like a server related
Sounds like a server related issue.
Check with your host if they recently upgraded their Zend optimizer engine or installed eAccelerator. I was struggling with white screens for a few days, until I realised that certain combinations of the Zend optimzation engine + eAccelerator (a php compiled code cache) did not work well together.
Maybe try installing on a different server. You can do a XAMPP or WAMP installation on your local machine and play around with Drupal 5 to confirm that it is indeed a server setup issue.
I'm on an Apache VPS and cannot provide much assistance with IIS6 issues. May I ask why you host on a Windows server?
IIS6
I actually setup Drupal 5 on a test machine which is W2K+IIS5, and that was ok except it gave me the known "login won't take" problem, which i fixed with the GLOBALS['tempuser'] fix. No issues with white pages. Surprisingly, on my test machine, php settings are at default, there isn't even a memory_limit variable set for php (5.1.4), yet no white pages.
Moving on, installing Drupal 5 on IIS6 on my paid webhost (1and1), strangely I didn't get the "login won't take" problem, but instead get the "white page of death". The webhost also didn't set a memory_limit variable.
As to why I host on a Windows Server, I actually originally requested a Linux one but 1and1 put me on a Windows server promising better performance on a newer server. If this keeps up I'll have to insist they move me back.
Adding ini_set lines to settings.php doesn't make the new memory_limit variable appear in admin/settings/php, suggesting that somehow IIS6 is preventing the changes. I also can't use clean URLs with IIS6.
display_errors
display_errorsshould be set to On (not "TRUE").How to create a custom php.ini file when nothing else works
It's a memory issue
I created the custom.ini, placing it everywhere but it seems the custom ini isn't loaded.
What else can be done? Could be that the redirect isn't working properly? After submitting, the data IS definitely submitted and entered into the database, it just isn't redirecting back to the page...
UPDATE: Ok I reduced the modules to a bare minimum and the white page problem cleared up. Therefore it's pretty obvious it's the memory issue. Looks like I'll have to work with my host to increase the php memory limit since it's also painfully clear that it won't use custom values at my end.
Thanks all for the help!
thanx phpninja .... from
thanx phpninja .... from your provided knowledge to fix problems of blank page i could able to fix the problem of blank pages in my website. means by adding the information:
* Adding to .htaccess
php_value memory_limit 32000000
* Adding to settings.php
ini_set("memory_limit", "32M");
ini_set('display_errors', TRUE);
*Adding to the start of index.php
ini_set("memory_limit", "32M");
ini_set('display_errors', TRUE);