CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • White screen
Pages: [1]

Author Topic: White screen  (Read 3611 times)

chrisdaems

  • Guest
White screen
March 08, 2008, 08:46:09 am
Whatever I do, I can't get around the white screen.

Civicrm and drupal runs perfect on my local installation. Four days ago I tried to upload everything to a shared web-hosting.
Drupal runs fine but as soon I enable civicrm everything turn out to be a white screen. I went into the system table to disable civicrm.

Maybe important to mention is:
  • I don't have access to the apache log files
  • I increased the PHP memory (128M)
  • I also added php_value error_reporting E_ALL into the (dot)htaccess file

If it's not a memory problem then it must be a configuration error, but I don't see any error or warning messages on my screen.

this are the settings in civicrm.settings.php
Code: [Select]

define( 'CIVICRM_UF'               , 'Drupal'        );
define( 'CIVICRM_UF_VERSION'       , '5.1' );
define( 'CIVICRM_UF_URLVAR'        , 'q'  );

define( 'CIVICRM_UF_DSN'           , 'mysql://user:user@localhost/drupal?new_link=true' );

define( 'CIVICRM_UF_USERSTABLENAME', 'users' );

 
define( 'CIVICRM_MYSQL_VERSION', 4.1 );
define( 'CIVICRM_DSN'          , 'mysql://user:user@localhost/drupal?new_link=true' );
/*define( 'CIVICRM_MYSQL_PATH', '/usr/bin/' );*/

global $civicrm_root;

$civicrm_root = '/var/www/vhosts/HOSTNAME/subdomains/drupal/httpdocs/sites/all/modules/civicrm/';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '' );
 
define( 'CIVICRM_UF_BASEURL'      , 'http://HOSTNAME/' );

define( 'CIVICRM_SMTP_PASSWORD', ''    );

define('CIVICRM_DOMAIN_ID' , 1 );

define( 'CIVICRM_UF_FRONTEND', 0 );

$include_path = '.'        . PATH_SEPARATOR .
                $civicrm_root . PATH_SEPARATOR .
                $civicrm_root . DIRECTORY_SEPARATOR . 'packages' . PATH_SEPARATOR .
                get_include_path( );
set_include_path( $include_path );

define( 'CIVICRM_SMARTYDIR'  , $civicrm_root . DIRECTORY_SEPARATOR . 'packages' . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR );
define( 'CIVICRM_TEST_DIR'   , $civicrm_root . DIRECTORY_SEPARATOR . 'test-new'   . DIRECTORY_SEPARATOR );
define( 'CIVICRM_DAO_DEBUG'  , 0 );
define( 'CIVICRM_TEMPLATEDIR', $civicrm_root . DIRECTORY_SEPARATOR . 'templates'   );
define( 'CIVICRM_PLUGINSDIR' , $civicrm_root . DIRECTORY_SEPARATOR . 'CRM' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR . 'plugins' );

define( 'CIVICRM_GETTEXT_CODESET'    , 'utf-8'   );
define( 'CIVICRM_GETTEXT_DOMAIN'     , 'civicrm' );
define( 'CIVICRM_GETTEXT_RESOURCEDIR', $civicrm_root . DIRECTORY_SEPARATOR . 'l10n' );

if ( function_exists( 'variable_get' ) && variable_get('clean_url', '0') != '0' ) {
    define( 'CIVICRM_CLEANURL', 1 );
} else {
    define( 'CIVICRM_CLEANURL', 0 );
}

// force PHP to auto-detect Mac line endings
ini_set('auto_detect_line_endings', '1');

// make sure the memory_limit is at least 32 MiB
$memLimitString = trim(ini_get('memory_limit'));
$memLimitUnit   = strtolower(substr($memLimitString, -1));
$memLimit       = (int) $memLimitString;
switch ($memLimitUnit) {
    case 'g': $memLimit *= 1024;
    case 'm': $memLimit *= 1024;
    case 'k': $memLimit *= 1024;
}
if ($memLimit >= 0 and $memLimit < 33554432) {
    ini_set('memory_limit', '128M');
}

Is there a way to troubleshoot a white screen (without log files). I tried everything mentioned in the previous posts.
Many Thanks,
Chris

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: White screen
March 08, 2008, 09:49:43 am

1. check if drupal watchdog has the errors logged in its table

2. see if u can enable display_errors temporarily

(from the php.ini file)

; Print out errors (as a part of the output).  For production web sites,                                                     
; you're strongly encouraged to turn this feature off, and use error logging                                                 
; instead (see below).  Keeping display_errors enabled on a production web site                                             
; may reveal security information to end users, such as file paths on your Web                                               
; server, your database schema or other information.                                                                         
display_errors = On
 
lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

chrisdaems

  • Guest
Re: White screen
March 08, 2008, 03:21:11 pm
I enabled display_errors. It showed a warning that wasn't related to civicrm. The warning was to set the php_value allow_call_time_pass_reference on True.

I added the value in (dot)htacess. The warning disappeared.

Hereafter I enabled civicrm again, but it was still a blank screen. 
The watchdog table didn't show me any related errors. Is it actually possible to run civicrm on a shared hosting?

thanks,
Chris

chrisdaems

  • Guest
Re: White screen
March 08, 2008, 04:07:01 pm
At least one step further and a lot of other errors.

I added the civicm_template_compiledir and I created the following folders:
files/civirm/crm_docs
files/civirm/persist
files/civirm/templates_c
files/civirm/upload

all the folders have full permission, but the strange thing is that I got the following error:
user warning: Smarty error: problem writing temporary file '/var/www/vhosts/HOSTNAME/subdomains/demo/httpdocs/files/civicrm/templates_c/en_US/wrt47d325d3a7662' in /var/www/vhosts/hostname/subdomains/demo/httpdocs/sites/all/modules/civicrm/packages/Smarty/Smarty.class.php on line 1095.

I checked the folder files/civicrm/templates/en_US.  I noticed that the folder has not full permissions (755). Can I now conclude that a new folder created by an application doesn't inherit the permissions from the parent. So the problem is somewhere with the hosting.

It is definitely a permission error.

chris
« Last Edit: March 08, 2008, 04:55:17 pm by chrisdaems »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: White screen
March 08, 2008, 04:45:47 pm

You might want to check: http://nz.php.net/manual/en/function.mkdir.php

and then put some debug statements in: CRM/Utils/File.php (function createDir, line 108) and try to figure out what needs to be changed to convince apache/php to create a directory that it can read/write :)

You might also want to check: http://nz.php.net/manual/en/function.umask.php

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

chrisdaems

  • Guest
Re: White screen
March 08, 2008, 04:57:55 pm
Thanks,

I printed the Path on my screen and it are the directories in the compile directory.

This is another test I did:
  • I change the civicm_template_compiledir to another folder.
  • I created all folders manual and made sure that the permissions were set on 777
  • This solved the problem for a few seconds.

After a while the permissions were changed to 755. Can it be that safe_mode is on (as on most shared hostings)?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: White screen
March 08, 2008, 05:06:40 pm

we dont test with safe_mode and/or open_basedir. So not sure if its a side effect of that. You might want to do some web searches about it, which might help

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

chrisdaems

  • Guest
Re: White screen
March 08, 2008, 05:13:40 pm
Solved,

save_mode = off did it.

Many thanks for your help. Debugging the file.php helped me a lot.

Chris
« Last Edit: March 09, 2008, 12:35:55 am by chrisdaems »

bcobin

  • I post frequently
  • ***
  • Posts: 337
  • Karma: 9
    • InterCreative Media
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.9
  • PHP version: 5.3
Re: White screen
March 28, 2008, 01:49:38 am
I had the same problem and finally tracked it down:

When I design the site locally, I'll untar the archives manually, then I'll upload the files and folders via FTP to the server. Usually this works fine, but with CiviCRM it looks like there's a problem doing this with files in the Smarty folder.

Check the Smarty messages to see if the file it's looking for is actually where it's supposed to be; when I looked, I saw the filenames had gotten corrupted in the transfer - instead of having names like core.assemble_plugin_filepath.php, the names had been copied as core.assemble_plugin#6BD9B7.php. I recopied the files and renamed them as I went; you could probably just rename the files on the server using your local installation as a guide.

Hours and hours tracking this down - hopefully this will save someone else some time, as those of you in the Drupal community have saved me. Now if only someone could tell me how to import and export CiviCRM databases using phpmyadmin, that would be great - Drupal works like a charm, CiviCRM not at all for me...

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: White screen
March 28, 2008, 10:09:07 am
Quote from: bcobin on March 28, 2008, 01:49:38 am
Now if only someone could tell me how to import and export CiviCRM databases using phpmyadmin, that would be great - Drupal works like a charm, CiviCRM not at all for me...

Have you tried these steps:
* use the phpMyAdmin Export tab to dump the data only from your "source" database (you might have to play w/ some of the options - post back here what works for you - assuming you have success)
* create an empty DB on your target server
* load it with the schema (by running civicrm/sql/civicrm.mysql)
* load your dumpfile from step 1
Protect your investment in CiviCRM by  becoming a Member!

bcobin

  • I post frequently
  • ***
  • Posts: 337
  • Karma: 9
    • InterCreative Media
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.9
  • PHP version: 5.3
Re: White screen
March 30, 2008, 07:39:07 am
I was able to solve the problem - it had to do with two things: different versions of PhpMyAdmin on server and local (Drop Tables needs to be enabled), but the main problem was doing DB manipulation while I was still logged in. Once I logged out and logged back in, the "foreign key" errors went away.

Insofar as it's a new install, I wasn't concerned with the data - if I can ever get CiviCRM working (see below), the information will come in handy when I need to migrate in the future.

I have another, more serious problem that I've posted here: http://forum.civicrm.org/index.php/topic,2908.0.html - DB errors when trying to add Event Types and/or Activity Types.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • White screen

This forum was archived on 2017-11-26.