Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Howto debug the ole blank page issue?


Go to End


2 Posts   5031 Views

Avatar
SirSpammenot

Community Member, 9 Posts

29 January 2008 at 9:20pm

Been through the doc, the forums and the web. I am stumped.
Problem is after installation I get blank pages no matter what I do. One exception is /db/build?flush=1 which used to give me a list of tables and fields. not any more.

SS v2.2.1, Apache 2, php5, MySQL5 on SuSE linux 10.1.

The install script seems to work great (except I cannot get it to recognize writability on the 3 directories and .htaccess, even when I set them to 0777).
I fill it out, it reports OK, and installs.
Tables are created in mySQL.
Changes are made on disk to _config.php.
Set to dev mode in _config.php.
Nothing in the apache logs except a 200, zero bytes in View Source.

Headers:

Date: Tue, 29 Jan 2008 08:15:25 GMT
Server: Apache/2.2.3 (Linux/SUSE)
X-Powered-By: PHP/5.1.2
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PastVisitor=1; expires=Mon, 28-Apr-2008 08:15:26 GMT; path=/
Content-Length: 0
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset="utf-8"

200 OK

Any suggestions on how to debug this php app with no error reporting?
Thx! (go all blacks!)
JF

Avatar
SirSpammenot

Community Member, 9 Posts

5 February 2008 at 8:08pm

May I suggest a sticky topic with debug suggestions (for blank pages)?

My contribution:
If your PHP is running in CGI mode (non-windows), then you can actually put a php.ini in the root of the webserver and affect PHP on a per-virtualhost basis. If you are running a default config from a distribution you probably are using mod_php and only loads php.ini once, at startup.

So using a debug command like display_errors = On requires a restart AND it affects all websites running on that instance of apache (ie; very high chance all websites on that machine). Since the recommendation is to have this off in public facing servers, surely you MUST not be having the problem on the production server (like me).

When I set it and restarted two things happened:
1) my joomla based sites stopped working
2) I finally got an error from SilverStripe!
C) I switched back really quickly and googled on the error

Fatal error: Call to undefined function ctype_digit() in /home/vhosts/mayarowlett.com/v2.2.1/sapphire/misc/Browscap.php on line 522

Verify! make a foobar.php file containing

<?php phpinfo(); ?>
and view it in your browser. Look at configure command, like the 3rd box down. if you see
--disable-ctype
then you actually don't have the functions compiled into PHP! Ctype became a standard feature in version 4.2.0 though.

My version: openSuSE v10.1 comes with PHP v5.1.2 did not have the disable flag. Yet I still don't have the functions?

So it appears that my compiled version of PHP is lacking the functions anyway. Augh!

But for SuSE is too simple. Run Yast, search (Alt+s) for php. Pick both ctype AND posix to add (not installed by default as security best practice). Yast recompiles php, you (yes you human) restarts apache (rcapache2 config-test, if OK do rcapache restart) and ouila! verify it works then go run an update in yast since you just added new packages. restart apache again if there are updates.

SuSE v10.2 had ctype, but not posix. weird. but all working now!

>---
Silverstripe guys are doing a great job pushing new features out. Have a burger fuel for me.
JF