#7

seanfisk's picture
Offline
Joined: 08/19/2010
Juice: 4
#7

I think I've found a solution to the white screen and header problems. At the beginning of each file, there are three invalid bytes which cannot be seen by using a text editor (or at least vim ignored them).

$ head -n 1 * # outputs the first line of every file in the current directory
==> uc_cano.admin.inc <==
<?php

==> uc_cano.css <==
.uc-cano-dependent-attr {

==> uc_cano.info <==
; $Id: uc_cano.info, Exp $

==> uc_cano.install <==
<?php

==> uc_cano.js <==
$(document).ready(function() {

==> uc_cano.module <==
<?php

These are the characters which I believe are causing the white screens and header problems. So I ran the following bash to remove these characters (make sure you are in the uc_cano directory):

#!/bin/sh
tmp=`mktemp`
for file in uc_cano.*; do
        tail -c +4 "$file" > "$tmp"
        mv "$tmp" "$file"
done

I put it into a script, but you can also run it straight from the interactive shell. Make sure to run it only once though, or you'll be stripping actual code out of the files. You can also use a hex editor to remove the first three bytes from each file manually.

After running this script, I haven't got a white screen or header error. I was also able to run update.php successfully. Seems like PHP was thinking they were output and Drupal was choking on them. Hopefully this will be fixed in the next release. I think this module is very useful and has a lot of promise.

uc_cano 1.1
Drupal 6.19
Ubercart 2.4

white screens after enabling By: scot.self (12 replies) Tue, 07/13/2010 - 11:01