b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. User's Guide
  3. FAQ (Using b2evolution)
  4. When I do X I get a blank page or only a half page

When I do X I get a blank page or only a half page

Short answer:

  • your PHP is out of memory
  • or your PHP is out of allowed execution time
  • or your .php file cannot be read by Apache

Giving PHP more memory

There are several possible ways to fix this (hopefully one of them will work for you):

  • Uninstall some plugins to free up memory. If you cannot uninstall plugins because you get a blank page on uninstall, delete some plugins from the /plugins folder.
  • Change this setting in blogs/conf/_advanced.php:
  •   
    // If you get blank pages or missing thumbnail images, PHP may be crashing because it doesn't have enough memory.
    // The default is 8 MB (in PHP < 5.2) and 128 MB (in PHP > 5.2)
    // Try uncommmenting the following line:
    ini_set( 'memory_limit', '128M' );
    
  • Edit your php.ini file (ask your hosting provider if you don’t know what this is) and increase the value of memory_limit, for example:
  •   memory_limit = 128M
  • Sometimes, the server setup allows you to override the original php.ini setting by adding a new php.ini in the root or somewhere on the server.
  • Add this to .htaccess:
  • 
    # Increase memory limit
    php_value memory_limit 128M
    

Giving PHP more execution time

The execution time is limited in php.ini by the following directive:

max_execution_time = 30     ; Maximum execution time of each script, in seconds

In this example, it means that any PHP script that runs past the 30 seconds limit will die, typically with no warning and no message on screen. This gives you half a page on the browser and the browser seems to be waiting for more, but more will never come.

You can try to change the value above, but most of the time, when b2evolution knows it needs to perform a long operation (like upgrade, DB maintenance or creating test/sample data for example), it will ask PHP to give it more time (by using PHP’s set_time_limit() function call). Sometimes up to 3000 seconds instead of 30.

So your real problem is probably not the default max_execution_time but rather the fact that your PHP refuses to give more when asked for.

On b2evolution v5+, you can check this on your System Status page.

Solutions:

  • One reason why b2evolution may not be able to request more time may be if your PHP is running in safe mode. Check that PHP is not running in safe mode.
  • Another reason may be that the set_time_limit() function was disabled via the Suhosin Hardened PHP patch. Check if you’re using that patch and if you can change the configuration.
  • Another reason may be that you have a php_admin directive in any of your Apache webserver configuration files which looks like this:
  • php_admin_value max_execution_time "30"
    This means b2evolution won’t be able to request more than 30 seconds. If you have this line, comment it out or remove it.
  • As a last resort, you can manually change the default max_execution_time in php.ini as explained above but this is suboptimal since it will apply to all pages, including those that should execute in less than 5 seconds unless something goes wrong, and if something goes that wrong, it’s a good thing that PHP will stop after 30 seconds.

Making sure your .php file can be read by Apache

In some occasions, if the webserver cannot read the php script it tries to read, it will just output a blank page without logging any error.

A good test is to create a file named test.html next to your php file, give it the exact same File Permissions and try to access it through the web. If it doesn’t work, you know you have a file permissions problem.

Created by fplanque • Last edit by fplanque on 2020-06-09 00:25 • •

No feedback yet

On this page

  • Giving PHP more memory
  • Giving PHP more execution time
  • Making sure your .php file can be read by Apache

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
    • Overview of the Software
    • Guided Tour
    • Features
    • FAQ (General)
    • What's New?
    • Important Concepts
    • Getting Help
    • How To...
    • FAQ (Using b2evolution)
      • I need further assistance...
      • Logging In
      • Lost Password
      • Sample / Example Blogs
      • My blog is slow because it's hammered with comment SPAM! How do I recover?
      • How to authorize new users to post
      • Move a Category
      • Setup a New Blog
      • I made a change but my blog is not updated
      • Troubleshooting Cookie Issues
      • I get file permission errors. How do I fix them?
      • When I do X I get a blank page or only a half page
      • How do I locate the ID of any collection?
      • How do I know the ID of a post
      • How do I find the URL of an image hosted in my site?
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
Photo albums software

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque