CodeIgniter Forums

Full Version: WSOD Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

I'm developing with CI 1.6.1 under windows/apache/mysql and have a noddy app reading & writing to mysql fine.

When I move the app across to a linux box (ubuntu6.06LTS) I get the WSOD, nothing is logged to the log files or anything; the application completely dies.

I initially thought it was a problem communicating with mysql so I wrote a simple php page to open a connection outside of the CI framework, and this works fine.

If I remove database connections from the CI application the it works again, so I suspect there's something within the CI project that is barfing giving me the WSOD.

Has anyone got any suggestions please?

Thanks a lot.

El Forum

let's start by see what is into your config/databases.php file and remove your password indeed.

El Forum

Thanks for your reply. Ok the CI stuff is below

config.php first - comments removed
$config['base_url']    = "";
$config['index_page'] = "index.php";
$config['uri_protocol']    = "AUTO";
$config['url_suffix'] = "";
$config['language']    = "english";
$config['charset'] = "UTF-8";
$config['enable_hooks'] = FALSE;
$config['subclass_prefix'] = 'MY_';
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_-';
$config['enable_query_strings'] = FALSE;
$config['directory_trigger'] = 'd';
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['log_threshold'] = 4;
$config['log_path'] = '';
$config['log_date_format'] = 'Y-m-d H:i:s';
$config['cache_path'] = '';
$config['encryption_key'] = "";
$config['sess_cookie_name']        = 'ci_session';
$config['sess_expiration']        = 7200;
$config['sess_encrypt_cookie']    = FALSE;
$config['sess_use_database']    = TRUE;
$config['sess_table_name']        = 'ci_sessions';
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent']    = TRUE;
$config['sess_time_to_update']         = 300;
$config['cookie_prefix']    = "";
$config['cookie_domain']    = "";
$config['cookie_path']        = "/";
$config['global_xss_filtering'] = FALSE;
$config['compress_output'] = FALSE;
$config['time_reference'] = 'local';
$config['rewrite_short_tags'] = FALSE;

$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "mgb";
$db['default']['password'] = "mgb";
$db['default']['database'] = "mine";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

The following in a standalone page connects ok:

$link = mysql_connect("localhost","mgb","mgb");
if( !$link ) {
echo 'No';
echo 'Connected';

I do find it surprising that CI doesn't log anything at all....

Cheers for any suggestions / tips

El Forum

Does the default CI install work? Can you see the welcome page just fine?

El Forum

Yes, the default CI install works fine and my noddy application works as expected if I don't attempt to access a database.

It's when I try to reference a database that I get the WSOD, no html is rendered to the browser at all, and I don't get anything logged to log files either.

It's very weird. I get this problem on two different boxes running ubuntu6.06LTS - one's a vmware box and the other is a dedicated server.

I think I'm more 'concerned' that the CI framework doesn't write to the error logs as I'd expect...

I may try to reimage a server with a different distro and see what it's working hunky dory for me on my windows development platform.

El Forum

My development server is an ubuntu fiesty vmware server also. The only time I got the WSOD on it was when the log directory wasn't writeable by apache. And it happened as soon as I turned logging on in the config. Check your logging and cache system folders and make sure they are writeable.

El Forum

bcdennis you're a star - you solved the problem!

My /var/www directory was writeable by apache initially, but when I uploaded the application with changes to write to the database, WinSCP changed the permissions back to non-writeable for apache, and I hadn't noticed....doh!!

I'll slink-off and hide somewhere Sad

Thank you to everyone who helped.

El Forum

[eluser]Derek Allard[/eluser]
Hey, no need to slink off anywhere! We want you here Wink

Funny, as we were developing for EE 2 last week, there was one point (I was pretty sleep deprived in my defense) where I lost probably 3 hours over typos, and glaring omissions. Derek Jones (the other Tech Architect at EllisLab) and I would frequently have late night conversations that followed this pattern.

"Blarg, why isn't $this_thing working?"
"paste your code"
"sure, here it is, but you won't find it, I've been...."
"typo line 58"
"but I... ugh..."

I don't care if you've got 1 month or 1 decade under your belt, those types of things just happen sometimes Wink

El Forum

Ha thanks Derek - I'll be hanging around as I love using CI and I'm really impressed by the helpful community too.

Like you say, somtimes it's the little things that are so easily missed which a fresh pair of eyes can pick-up immediately Smile

Again thanks for everyone's help