If I add a php.ini file to my CMS it produces 'White Screen of Death'. No errors, no clues - just a blank, empty screen.
It's not the content of php.ini because the problem still occurs when it is empty. I suspect it's something to do with presence of BOM or UTF8 encoding, but I've not tracked down my problem.
I've saved my blank php.ini as UTF8 without BOM but that's not fixed it. I've edited several core files (incl. obvious ones like .htaccess and config.php), but they appear to be UTF8 without BOM. I've tried other combinations of UTF8 and ANSI - but I'm kinda stabbing in the dark, so maybe I've missed some combination. :/
Here's my shared hosting spec: Apache version 2.2.14, MySQL version 5.0.90-community, PHP version 5.2.11. The host tech support have been no help.
Any suggestions, please? This one is killing me!
php.ini causes 'White Screen of Death' - BOM / UTF8 problem?
Moderator: General Moderators
Re: php.ini causes 'White Screen of Death' - BOM / UTF8 prob
Look at the logs - does your web server receive the request, weren't there any segfaults, etc.
What does 'php -m' and 'php -i' says if ran from command line?
Where are you putting the php.ini? Why do you think it should work? (user defined php.ini files are only supported starting from PHP 5.3.0 and only if PHP is running as CGI/FastCGI).
What does 'php -m' and 'php -i' says if ran from command line?
Where are you putting the php.ini? Why do you think it should work? (user defined php.ini files are only supported starting from PHP 5.3.0 and only if PHP is running as CGI/FastCGI).
Re: php.ini causes 'White Screen of Death' - BOM / UTF8 prob
Hi.
I only have access to shared hosting cpanel error log - which is empty - and 'Raw access Log' which shows this when I have an empty php.ini in root which causes the blank / empty screen:
If I put the php.ini in root, the home page is blank. If I put the php.ini in /admin/ the admin page is blank.
The hosting company told me that I must use php.ini to do the following - and it was working until I upgraded my CMS:
I only have access to shared hosting cpanel error log - which is empty - and 'Raw access Log' which shows this when I have an empty php.ini in root which causes the blank / empty screen:
Code: Select all
109.170.137.195 - - [30/Apr/2010:17:14:00 -0400] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.3a5pre) Gecko/20100429 Minefield/3.7a5pre"The hosting company told me that I must use php.ini to do the following - and it was working until I upgraded my CMS:
Code: Select all
post_max_size = 10M
upload_max_filesize = 10M
magic_quotes_gpc = offRe: php.ini causes 'White Screen of Death' - BOM / UTF8 prob
I do not know why it is causing blank pages. The post above me says it won't work unless the PHP version is 5.3 or above, you say you're running 5.2.1 so that may be it?
Those values can also be set in a .htaccess file if your cannot get the php.ini file to work.
Those values can also be set in a .htaccess file if your cannot get the php.ini file to work.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Re: php.ini causes 'White Screen of Death' - BOM / UTF8 prob
Hi. That cannot be true about PHP5.3 - php.ini was working OK until I recently upgraded the CMS to a new version - and the hosting company does not allow use of .htaccess to set those variables.
The CMS works OK on my XAMPP localhost with php.ini and on another hosting company I use. Unfortunately, the hosting company that the problem site is with have not offered any help other than "It must be something wrong with your code." :/
My best guess is that it's related to http://www.interspire.com/support/kb/qu … 174/__rate (see 'UTF8 Byte Order Mark issue') - but I've not been able to work out which file(s) is the problem.
The CMS works OK on my XAMPP localhost with php.ini and on another hosting company I use. Unfortunately, the hosting company that the problem site is with have not offered any help other than "It must be something wrong with your code." :/
My best guess is that it's related to http://www.interspire.com/support/kb/qu … 174/__rate (see 'UTF8 Byte Order Mark issue') - but I've not been able to work out which file(s) is the problem.
Re: php.ini causes 'White Screen of Death' - BOM / UTF8 prob
Solution found. My hosting tech support's brief description:
For anyone who wants an excellent host with very fast, rock solid servers in UK and US: http://www.clook.net/
Here's what he added to the php.ini:...basically when you have a custom php.ini it doesn't load the extra modules that are in the main php.ini so we are working around this by adding them to the custom php.ini or other methods.
Code: Select all
zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.2.so"
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so
zend_extension="/usr/local/Zend/lib/Optimizer-3.3.9/php-5.2.x/ZendOptimizer.so"
post_max_size = 10M
upload_max_filesize = 10M
magic_quotes_gpc = off