ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Site not working

July 12, 2010 11:18pm

Subscribe [6]
  • #1 / Jul 12, 2010 11:18pm

    pbcweb

    36 posts

    Have a site for a non-profit client that I helped design and setup: caringpc.com. The client was uploading some content last week and then they claim the site stopped working. Not sure what they were doing, or i really is something they did. Getting a blank page if trying to run the site from index.php. I put up an index.html page for the time being as a placeholder.

    We can log into the EE control panel OK, and I can access the site files via FTP. I can also access the database via phpmyadmin. I tried running dbtest.php but getting a db connection error. Also I noticed last week before it went down that there are 3638 comments awiting validation. I’m sure most of these are spam, and I had forgotten about keeping these cleaned out as we went along. When I try to go in to delete these, I get a “Error 500 - Internal server error.” Wondering if these are part of the problem, or maybe it’s a PHP script error of some type? Not sure where do go from here. Thanks.

  • #2 / Jul 13, 2010 2:30am

    John Henry Donovan

    12339 posts

    Brian,

    First thing to do is to try and get some error reporting going so we can see if that blank page is a suppressed error.

    EE Wiki : HowTo Turn on Error Reporting

    I tried running dbtest.php but getting a db connection error.

    Can you check with your host to see if any details have changed?

    Also take a look inside your index.php. Does anything look out of place or if it shouldn’t be there.

  • #3 / Jul 15, 2010 5:25pm

    Ingmar

    29245 posts

    Any news, pbcwebmaster? Where are you with this?

  • #4 / Jul 16, 2010 11:51am

    pbcweb

    36 posts

    I tried adding the commands to the index.php file listed in the help document on turning on PHP error reporting manually and it didn’t work. Then I contacted tech support for the web hosting provider for this site at 1and1.com to ask them to turn on error reporting. They took a look and then said they would send me a php.ini file to add at the root level of the site, but they never did. In the meantime I was able to delete the 3000+ spam comments that had built up, and now I was able to make a backup of the database. So worst case now I can start fresh with a new database and load of EE and import the data back in. but the fact that everything else seems to be OK except the site coming up in the browser makes me think it is something simple. Does adding the php.ini file sound like a viable option? Doesn’t EE already have something equivalent in the index.php file? I looked at the code for index.php and it looked like nothing was in there that looked out of place. Thanks.

  • #5 / Jul 16, 2010 7:01pm

    Brandon Jones

    5500 posts

    Brian, 1and1 should be able to get error reporting enabled for you quite easily; it’s important that we see what the error actually is. Also take a look at How to Determine Memory Limits and let us know what your account is configured for.

  • #6 / Jul 17, 2010 1:21pm

    pbcweb

    36 posts

    Got back in touch with 1and1 support and they resent what they had sent before, just that it went to the wrong email address the first time:

    ====================================================

    Dear Brian Sullan,

    Thank you for contacting us.

    If you are running into a white page or some other PHP error, but you have no clue what is wrong, you should consider turning on PHP error reporting. This will give you some indication of where or what the problem is. This is a good first step to solving your problem. Here is how to turn on PHP errors:

    To display error messages caused by your PHP script you can include these lines of code:

    ini_set('display_errors',1); 
     error_reporting(E_ALL);

    Another way to do it is to edit your php.ini file and include this option:

    error_reporting = E_ALL

    To turn error reporting off for a single document, include this line:

    error_reporting(0);

    You can paste the codes above through notepad, and save the file as php.ini, it should be set as all files(no specific file format).
    ====================================================================

    So this is really no different than what you guys already had in your help document. They’re just telling me how to turn it on manually. However, when I first tried to add code to my index.php file, I ended up with this:

    ini_set('display_errors', 1);
    error_reporting(0);

    So I think I was turning it on, but then turning it back off, so now I have this:

    ini_set('display_errors',1);
    error_reporting(E_ALL);

    These two lines are in the index.php file after the lines that say:

    $qtype = 0; 
    
    // DO NOT EDIT BELOW THIS!!!

    I think error reporting is working because it displayed a syntax error after I first added the error reporting lines, since I had mistakenly added “error_reporting = E_ALL” at first. But after correcting that, when I refreshed the page, nothing shows up again, just a blank page.

    I tried moving the error reporting code above the directly after the “$qtype = 0;” line, but no difference.

    I checked the PHP memory limit through the control panel and it is set at 40M for both local and master value.

    The error reporting local value is shown as 2047, master value is 2037. Shouldn’t these be showing as “On” ?

    Then, this is what the index.php file inside the system folder looks like:

    <?php
    
    error_reporting(E_ALL);
    
    $pathinfo = pathinfo(__FILE__);
    $ext = '.'.$pathinfo['extension'];
    
    require './core/core.system'.$ext;
    
    ?>
  • #7 / Jul 18, 2010 2:46pm

    Greg Salt

    3988 posts

    Hi Brian,

    Just so we can see exactly what is in your file can you please post everything in your site index.php file up until this line:

    if (isset[$_GET['URL']))

    Additionally, do you have an .htaccess file active for this site? Your site does seem to be working because I can access an EE page at http://caringpc.com/index.php/home/ and clicking through menu items works correctly. Please confirm that this is the site home page.

    Cheers

    Greg

  • #8 / Jul 18, 2010 11:38pm

    pbcweb

    36 posts

    Here is what was requested from the index.php file:

    <?php
    /*
    =====================================================
     ExpressionEngine - by EllisLab
    -----------------------------------------------------
     <a href="http://expressionengine.com/">http://expressionengine.com/</a>
    -----------------------------------------------------
     Copyright (c) 2003 - 2007 EllisLab, Inc.
    =====================================================
     THIS IS COPYRIGHTED SOFTWARE
     PLEASE READ THE LICENSE AGREEMENT
     <a href="http://expressionengine.com/docs/license.html">http://expressionengine.com/docs/license.html</a>
    =====================================================
     File: index.php
    -----------------------------------------------------
     Purpose: Triggers the main engine
    =====================================================
    */
    
    // URI Type
    // This variable allows you to hard-code the URI type.
    // For most servers, 0 works fine.
    // 0 = auto  
    // 1 = path_info  
    // 2 = query_string
    
    
    $qtype = 0; 
    
    // DO NOT EDIT BELOW THIS!!! 
    
    ini_set('display_errors',1);
    error_reporting(E_ALL);

    I do not see an .htaccess file at the root level of the site. The URL you pulled up is the correct home page, so hopefully we aren’t too far off from getting this working.

  • #9 / Jul 19, 2010 3:53am

    John Henry Donovan

    12339 posts

    pbcwebmaster,

    For your template group ‘home’ do you have Make the index template in this group your site’s home page? ticked?

    CP Home ›  Templates ›  Edit Template Group

  • #10 / Jul 19, 2010 7:46am

    pbcweb

    36 posts

    Well, embarrassing to say that was the problem. The client must have clicked that off my mistake. Thanks for help and patience through this thread. I knew it had to be something simple.

  • #11 / Jul 19, 2010 8:09am

    Sue Crocker

    26054 posts

    Glad things are working again. Don’t hesitate to post again.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases