Ubercart Install Causes Blank Pages

Posts: 4
Joined: 09/18/2007

Hi,

Have experience of building sites but noth with CMS, setting up a new sete for motor factors and after testing out Drupal\Ubercart it seems ideal.

Installed Drupal with no problems but as soon as I enable the Ubercart module it blanks out the entire site.

Dont really know what information to provide you with but here is the Plesk report.

Hosting By: Blue River Stsyem (Purchased by Cantono)
Hosting type Physical hosting
IP Address 213.190.160.9
FTP Login eddiewalker
FTP Password ************
Shell access to server with FTP user's credentials /bin/false
Hard disk quota Unlimited
Disk space used by httpdocs 5.05 MB
Disk space used by Log files and statistical reports 1.38 MB
Disk space used by Config files 0 B
Disk space used by Chrooted environment 0 B
Traffic 33.3 MB/Month
SSL support Off
Common SSL/Non-SSL content Off
FrontPage support Off
FrontPage over SSL support Off
Apache ASP support Off
SSI support Off
PHP support On
CGI support Off
Perl support Off
Python support Off
FastCGI support Off
Miva support Off
ColdFusion support Off
Custom Error Documents Off
Disk space used by httpsdocs 292 KB
Web statistics None
Anonymous FTP Off
Disk space used by Anonymous FTP 12.0 KB

Help!!

Posts: 129
Joined: 08/14/2007
Uber DonorBug FinderEarly adopter... addicted to alphas.Cool profile pic award.Internationalizationizer

This sounded strangely familiar Sticking out tongue Do you get any information in your apache/php logs?

If it outputs absolutely nothing (View source = blank), then php probably "crashed" and should report something to those logs.

______________
Best regards,
Thomas Kulvik
Ny Media AS
www.nymedia.no

Posts: 4
Joined: 09/18/2007

Yes the error log comes up with the following

PHP Fatal error: main() [function.require]: Failed opening required 'uc_order_order_pane.inc' (include_path='.:') in /var/www/vhosts/eddiewalker.co.uk/httpdocs/modules/ubercart/uc_order/uc_order.module on line 16

Posts: 331
Joined: 08/07/2007
Administrator

I guess the first question is, does uc_order_order_pane.inc exist? Stupid question, I know but I just wanted to make sure. Second, what do you know what the value of memory_limit in PHP and how many modules you have enabled. PHP's white screen of death is often associated with running out of memory. If the value of PHP's memory_limit is low enough, you might have hit that limit with all the code that is running.

--

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

Posts: 88
Joined: 08/07/2007
Bug FinderGetting busy with the Ubercode.

I've experienced the same issue, and I've resolved it by adjusting the memory limit in php.ini

You can check your memory limit with phpinfo()

create a node and enter

<?php
echo phpinfo();
?>

Then adjust the input format all php code, and save it

It should give you a bunch of info, just do a search for memory_limit
and it will tell you how much memory your allowed.

fyi, make sure you delete the node that outputs the phpinfo...you don't want mischievous eyes viewing it.

Posts: 4
Joined: 09/18/2007

Thanks for reply's,

I have contacted the host and let him them know as it seems I have no access to the php.ini.

Will update the forum once I know the outcome.

Posts: 160
Joined: 08/07/2007
Uber DonorBug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Not Kulvik

I have messed with ini_set('memory_limit','(a range of valuesM');

the default at my host is 8M and I took it up to 13M while suffering the same error: Allowed memory size of xxxxxx bytes exhausted... etc.

as soon as I raize the memory limit to 16M I stop getting this error and get the white screen of death instead.

Anyone know why it goes from managing the error to just wandering away, never to return?

Additionally, no additional increase in memory_limit over 16M has any effect... I took it up to 256M and it was consistant about the white screen
Steve

Posts: 140
Joined: 08/07/2007
AdministratorNot Kulvik

The "white screen of death" is not specific to Ubercart. It is a Drupal issue resulting from exceeding the php memory limit. There are two main solutions to this problem. One, increase your php memory limit as posted here: http://www.ubercart.org/comment/2493/Re-memory-limit , or two remove unused modules from Drupal.

Every Drupal module you have installed uses some memory for every apache process generating a Drupal page. Many Drupal administrators forget to uninstall modules they are not using or were testing and decided not to use. These old, unused modules just take up precious memory space which could be used by something you need, like Ubercart!

If you are still having trouble, then the problem is not a memory limit issue, but something else causing php not to dump anything to the screen. In order to figure out what the problem is, set the memory limit really high (to insure this is not a contributing factor) and then check your error logs for php and apache for hints.
Good Luck,
Andy

--

Long live Drupal, Ubercart and my mother! (brained by elephantiX)

Posts: 4
Joined: 09/18/2007

Contacted my the host and the web development support came back with this

The blank page is because PHP is set up not to output any warnings or
errors, you can get around this by either looking in the error log for
the problem or putting error_reporting(E_ALL); at the beginning of the
page.

The first error "PHP Fatal error: main() [function.require]: Failed opening required
uc_order_order_pane.inc' (include_path='.:') in
var/www/vhosts/*******.co.uk/httpdocs/modules/ubercart/uc_order/uc_o
rder.module on line 16"

This simply means the code cannot find the page its trying to include,
which is usually down to the code not being entered correctly i.e.
require('uc_order.module') should be
require('/var/www/vhosts/********.co.uk/httpdocs/
modules/ubercart/uc_order/uc_order.module');
or even require('./uc_order.module');

I haven't seen the code so this is an assumption and should be the first
thing to look at.

Mod_rewrite has been disabled on this server for security reasons and
cannot be enable - you maybe able to get around this problem by putting
the following code within the .htaccess file in the root of your
environment

SecFilterEngine Off
SecFilterScanPOST Off

Please note that if the website causes any security risk to the server
of any other websites I it will be disabled.

The php info file lists memory at 32Mb, I will try the aboove suggestions and update post when done,
thanks for the help so far.

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

I've got to wonder why their include path is ".:". The : is a separator, so it looks like there should be two different paths there. But there's just '.'. And if it starts looking in the current directory, you shouldn't have to specify './filename'.

According to php.net, PHP should look for the included file relative to the current working directory (Drupal root) and then the location of the current script (modules/ubercart/uc_order).

If it turns out that the include path isn't really a problem, you can go through your module files and change the require() statements so that they are relative to the Drupal root. The basic format looks like this:

<?php
 
require_once(drupal_get_path('module', 'uc_order') .'/uc_order_order_pane.inc');
?>

I know that uc_cart and uc_payment need a similar treatment. Check the other module folders for .inc files and see if those modules need it as well.

Posts: 5
Joined: 10/26/2007

I tryed many times to get past the "white screen of death" on install and wasn't having any luck. I got desperate because ecommerce was being unbelievably problematic for me so I kept trying.

Eventually all I did was reinstall everything and carefully enable modules slowly making sure to always enable the required modules first. And that's all, it installed with no problems.

I'm glad I did because so far it's been really easy to use.

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Awesome. Cool Glad you toughed it out and are finding Ubercart easy to use. I think I might include in the install instructions what you said... I always try to enable the required modules, then the core Ubercart modules, and then any extra Ubercart modules I'll need on the site. It shouldn't be necessary, but it seems to make things go smoother when I do it that way. Sticking out tongue

Posts: 13
Joined: 11/19/2007
Bug Finder

I had a similar problem, Ubercart was working fine in my local development environment, but when I uploaded it to a web server I got a white screen of death. The error log had entries similar to those mentioned above, so I changed the include statements to be similar to the structure mentioned here, and now all is well.

From what I can tell, this is how most Drupal modules structure their include statements, so I would suggest that ubercart core be changed to follow best practices of typical Drupal development. Plus, it seems to address a critical point of failure that has been a problem for a number of users. Also, I would think it could only improve performance, since the server interprets the current script to be at the base of the Drupal directory, and the include statements without the path force the server to do a bit of searching to find the script.

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

The problem we're running into now, though, is that with caching turned on using drupal_get_path() doesn't work. This leads me to want to keep the default install w/ the paths relative to the module script itself and instruct users through the FAQ or something to an alternate solution if it fails for them.

Posts: 13
Joined: 11/19/2007
Bug Finder

Just upgraded to Beta 3, and had to apply this fix in several places, which was time consuming, and will presumably need to be done with every version, until a true fix is found.

Plus, the fact that even this workaround doesn't work if caching is needed seems alarming.

Could someone who is NOT experiencing this issue share what values they have for include_path and openbasedir? Are there any users out there using Plesk hosted sites that are NOT experiencing this issue?

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Try PMing torgosPizza. I'm pretty sure he's on Plesk and his site works great.

Posts: 1139
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Yeah. Plesk 8.1.1 to be exact, our host recommends only updating to 8.2 after doing a clean install, which I'm not even considering right now. Other specs: Apache2, PHP 5.2.5, MySQL 4.2. Memory limit right now is set to 48mb (going higher soon) but I've never encountered a memory limit problem, even at 32M, and that includes enabling dozens of modules.

I'm still using Beta2 on the test site, same box, and haven't had to implement any fix of this kind. The one thing I keep recommending to people in the case of a blank page, is to add this bit of code to the very top of your Drupal site's index.php:

<?php
error_reporting
(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
?>

Since Drupal chokes on Fatal errors, you will only see why once you've added this code in (or set E_REPORTING options in php.ini).

There is another similar discussion here: http://www.ubercart.org/forum/support/2808/installation_blank_screen_ube... but it hasn't been resolved yet.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 30
Joined: 01/30/2008

Hey all,
I just wanted to let everyone know that I got Ubercart installed successfully by first changing the following files and code before uploading and activating the modules. I am using Beta 4.

This relates to this thread as I was getting white screens with errors on them before. The trick is to edit these files BEFORE trying to activate the modules, as they won't be fully activated, and you'll need to remove a bunch of tables in the database to fully uninstall it and try again. I really hope this is fixed in the next Beta.

--------------------------
1: /uc_cart/uc_cart.module
--------------------------
From: (Lines 16-17)
-----
require_once('uc_cart_checkout_pane.inc');
require_once('uc_cart_workflow.inc');

To:
---
require_once(drupal_get_path('module', 'uc_cart') .'/uc_cart_checkout_pane.inc');
require_once(drupal_get_path('module', 'uc_cart') .'/uc_cart_workflow.inc');

----------------------------
2: /uc_order/uc_order.module
----------------------------
From: (Lines 16-18)
-----
require_once('uc_order_order_pane.inc');
require_once('uc_order_line_item.inc');
require_once('uc_order_workflow.inc');

To:
---
require_once(drupal_get_path('module', 'uc_order') .'/uc_order_order_pane.inc');
require_once(drupal_get_path('module', 'uc_order') .'/uc_order_line_item.inc');
require_once(drupal_get_path('module', 'uc_order') .'/uc_order_workflow.inc');

----------------------------------------
3: /payment/uc_payment/uc_payment.module
----------------------------------------
From: (Lines 16-18)
-----
require_once('uc_payment_checkout_pane.inc');
require_once('uc_payment_order_pane.inc');
require_once('uc_payment_workflow.inc');

To:
---
require_once(drupal_get_path('module', 'uc_payment') .'/uc_payment_checkout_pane.inc');
require_once(drupal_get_path('module', 'uc_payment') .'/uc_payment_order_pane.inc');
require_once(drupal_get_path('module', 'uc_payment') .'/uc_payment_workflow.inc');

Lastly, this is a bit offtopic, but it's not present anywhere (and maybe this should be present somewhere): "What version would you recommend for a public site?" aka "What would be a stable release?"

Thank You!

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Welcome aboard, BlindWolf. Regarding changing the includes, I had done that in core a while back. However, if you turn on caching, Drupal chokes because of the differences in core inclusions for cached pages. The file that has the function drupal_get_path() doesn't get loaded before the module files are loaded, so it breaks any page request. I'm open to any alternatives, but right now I have to keep them as is in core. Perhaps the answer in the future is to just get rid of the .inc files, but they make keeping track of the code so much easier. Sticking out tongue

Regarding your second question, I'd always recommend the latest release. People have been using Ubercart on live sites since the early alphas, but it definitely behooves you to stay up to date since so much has been changing. The pace has slowed a bit, but now most of the new release material is bug fixes which you'll want on your site anyways. Eye-wink

Posts: 30
Joined: 01/30/2008

Ryan,
Thanks for the quick reply and the friendly welcome! The odd thing is, I'm not using ANY sort of caching system on my Drupal install at all! It's not anything dealing with the e-Commerce module either, as I made sure to clear out any files and entries in the database prior to messing with Ubercart. As soon as I changed the code above, everything went smoothly. To reiterate, I did need to make these changes when installing Beta 4. I downloaded Beta 4 from the Drupal.org Ubercart project page.

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Yeah, I'm with you. I was referring to the problem making your changes in core makes with caching. For some folks, Plesk isn't resolving the paths relative to the module directory, which is the source of the problem. But if you were to turn caching on on your site, my hunch is it would no longer work.

Posts: 1139
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

BlindWolf,

Can you find out what versions of each package you have?
Plesk -
Apache -
Linux (if that's what you're using)
PHP -

I really don't think it's a Plesk issue, but I could be wrong. I'm not quite sure what Plesk has to do with resolving paths... to me it sounds more like a php.ini / vhost.conf issue. The thing about Plesk is, it's really just a user interface. I've used Plesk and cPanel, as well as media temple's admin area, and they all pretty much do the same thing - you can administer domains, DNS, files, databases, etc. But when it comes down to the functionality of your scripts, they all behave the same way no matter what your control panel environment (at least, in my experience). The key factors are your Apache/PHP/MySQL versions and how they have been configured/installed.

If you're using PHP 4, I'd recommend upgrading to 5. Usually upgrading to the latest stable version of anything will solve a lot of issues that are harder to figure out, such as this one. Like I said, I've installed Drupal - on Plesk installs as well as GoDaddy's "one-click" setup) and never had an issue where something didn't install because it couldn't resolve a path. The problem in my eyes is most likely deeper than what control panel you're using.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 30
Joined: 01/30/2008

Here's Drupal's Info:

Drupal                  5.7
MySQL database          4.1.14
PHP                     5.0.4
PHP register globals    Disabled
Unicode library         PHP Mbstring Extension
Web server              Apache/2.0.54 (Fedora)

It's not my server, so I dunno if we can upgrade to PHP 5 or not. I'll have to talk to the guy I'm working for to see if we can, based on other stuff that's running on it.

Just as a note, I believe the error I was getting was about the include path, and I think it said either .:/crm or .:crm

Posts: 1139
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Well it looks like you're on PHP5 already - 5.0.4. Granted, I'd prefer it if you could upgrade to the latest, or 5.2.5 if possible. (I think that's still the most recent stable build).

You might also look in your /etc/log/error_log files to see if there is anything causing the issue showing up in the logs. I would also considering asking the guy who is the Admin of the server if there is another server you can test on, whether it has a similar architecture or not. Anything you can use to compare results, especially since so many of us can have an install without any issue. If this issue happened the majority of the time then I'd say it's a bug in Ubercart, but since it doesn't, I'd say it's not Smiling

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 30
Joined: 01/30/2008

I can test it on my shared hosting account shortly.