Community & Support

Please Help, My Drupal Site Behaves Strangley

I have setup a Drupal 6 site on my local machine and have been working on it for about two weeks now, it's my second Drupal 6 site, the first been http://wharc-online.org. I uploaded the site (ttlnigeria.org) in a preliminary stage and it worked well, now we are done with development (built my first custom theme) and moved it up to the host (ixwebhosting.com) but for very strange reasons I get log in as user 1. In firefox 3.5 (which I use mostly) I get a blank white screen after logging in, but in the chrome browser I get redirected to the home page (from where I made the login attempt) and that's all.
I don't see my admin menu, though I am using the admin_menu module, I also don't see it. Though I get no login error messages, I can't login, and after the login attempt mysitedomain.org/?q=admin still tells me access denied.

Please what could be wrong, my local site site works well, just the one online has this strange behaviour, any suggestions.
Please, it's urgent and I am stuck, I even tried re-installation (fresh database, fresh settings.php, then installed, then imported my local database) but I got no result.

Comments

And a logging into a totally

And a logging into a totally fresh & clean install on your server works okay?

With my files (theme, modules

With my files (theme, modules e.t.c) already uploaded, I re-uploaded the settings.php file and did a fresh installation. Everything is as it should be with a fresh install, I can log in and out. I "uploaded" my database as I have always done before, I use toad (toad for MySQL) to get a remote connection to my online database and then execute the sql export (created from my local phpMyAdmin), on the remote database so that I can replicate the tables and data (usually don't use the online phpMyAdmin because of the 2.048M sql file size limit) and this usually completes successfully (at least the last 2 times I tried) but afterwards I can't login. Strange. My site is still http://ttlnigeria.org/ in the fresh installation state, please what more can I try. Cheers.

Kind Regards
Odili Charles Opute (http://ajaxpoet.wordpress.com/)
Proudly Nigerian

I use the backup and migrate

I use the backup and migrate module for these situations. It works flawlessly. Try it out and see if that helps.

Full-time freelancer, always looking for work.
jaypan.com (my portfolio)

On your request, I have

On your request, I have installed the backup_migrate module and used it to export my database, at first all was well then I switched to my custom theme and the blank screen surfaced again. Thought it was a problem with my theme so I exported the database again (I had no interface to switch back the theme nor administer anything - just blank white screen in firefox) and this time set the theme to pushbutton (one of the defaults) and I still get the blank screen. Now I am going cracy, just can't figure out what the problem is, spent the whole night on this already. The funny thing is that even now (with pushbutton set as default theme) firefox shows a blank screen, chrome and IE shows the offline page (I turned the site offline), now I can't even get into the site to put it back online. Please any other suggestions.

Kind Regards
Odili Charles Opute (http://ajaxpoet.wordpress.com/)
Proudly Nigerian

=-=

if you can get to the site offline page in other browsers you can get to the login screen @ yoursite.com/?q=user and use the brower to navigate to the administration area.

have you cleared firefoxs cache ?

Yeah I know, I did that in

Yeah I know, I did that in chrome and after login in I was redirected to mysite.com/?q=users/superuser but the site was still in offline mode mysite.com/?q=admin still tells my access denied. I just cleared my firefox cache and I got no change. All very strange. this site has been up for two weeks now, even with the new theme, I just needed to fix some IE rendering bugs, purely CSS, and now all is messed up. Thanks for your time, still trying my hands though. I have decided to delete everything from the host, re-upload and start afresh.

Kind Regards
Odili Charles Opute (http://ajaxpoet.wordpress.com/)
Proudly Nigerian

Ok now I know something is

Ok now I know something is seriously wrong. I deleted everything and re-uploaded my drupal files and did a fresh installation and everything worked, I switched between Garland and pushbutton, logged in and out and all was well then I selected my theme as the default and then I got the blank screen again (in firefox). After 2 or more refreshes the site rendered well but now my login can't get me into the admin pages, it shows a blank page in forefox, but a normal page (as if it was been accessed by an anonymous user) in chrome, in IE 6 (which is in my XP machine) it shows a blank page with a HTTP 500 Internal Server Error title on the browser. Don't know how else to debug this, my theme has no custom user code here is the template.php file

<?php

function phptemplate_breadcrumb($breadcrumb) {
  if (!empty($breadcrumb)) {
    return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .'</div>';
  }
}

function takethelead_theme(){
return array(
'user_login_block' => array(
'arguments' =>  array('form' => NULL),
),
);
}

function takethelead_user_login_block($form){
$form['submit']['#value'] = t('Sign In');

$items = array();
    if (variable_get('user_register', 1)) {
  $items[] = l(t('Sign Up'), 'user/register', array('attributes' => array('title' => t('Create a new account.'))));
    }
    $items[] = l(t('Forgot Password'), 'user/password', array('attributes' => array('title' => t('Request new password via e-mail.'))));
    $form['links'] = array('#value' => theme('item_list', $items));
   
$output .= drupal_render($form);
return $output;
}



/*function takethelead_node_submitted($node) {
  return t('By !username on @datetime',
    array(
      '!username' => theme('username', $node),
      '@datetime' => format_date($node->created),
    ));
}*/

and then the page.tpl.php file :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
<head>
    <title><?php print $head_title; ?></title>
<!-- compliance patch for microsoft browsers -->
        <!--[if lt IE 7]>
             <script type="text/javascript" src="<?php print base_path() . path_to_theme() . '/lib/ie7/IE7.js'; ?>"></script>
        <![endif]-->

        <?php print $head; ?>
        <?php print $styles; ?>
        <?php print $scripts; ?>
        <script type="text/javascript"></script>
    </head>
    <body class="<?php print $body_classes; ?>">   
    <div id="page">
        <div id="hd">
            <!-- Logo -->
            <div id="logo">
                <?php if($logo): ?>
                    <a href="<?php print $base_path; ?>" title="<?php print t('Take The Lead Economic Development Nigeria'); ?>">
                        <img src="<?php print $logo; ?>" alt="<?php print t('Take The Lead Economic Development Nigeria'); ?>" />
                        </a>
                    <?php endif; ?>               
                </div>
                <!-- Google Custom Search Element -->
                <div id="search">                   
                    <div id="cse" style="width:100%;"><img src="<?php print base_path() . path_to_theme() . '/images/loading.gif'; ?>" align="top" /> Busy, Please Wait ...</div>           
                </div>
                <div id="topnav">
                <?php if($primary_links): ?>
                    <div id="menu" class="rounded">
                            <?php print theme('links', $primary_links); ?>
                        </div>
                    <?php endif; ?>
                    <div id="feature-hilite">
                    <img src="<?php print base_path() . path_to_theme() . '/images/banners/highlight-trans.png'; ?>" align="right" alt="Take The Lead Economic Development Nigeria" title="Take The Lead Economic Development Nigeria" />
                        <img src="<?php print base_path() . path_to_theme() . '/images/banners/highlight_0-trans.png'; ?>" align="right" alt="Take The Lead Economic Development Nigeria" title="Take The Lead Economic Development Nigeria" />
                        <img src="<?php print base_path() . path_to_theme() . '/images/banners/highlight_1-trans.png'; ?>" align="right" alt="Take The Lead Economic Development Nigeria" title="Take The Lead Economic Development Nigeria" />
                    </div>
                </div>
            </div>
           
            <div id="bd">
            <div id="cnt" class="left">
                <?php if($breadcrumb): ?>
                    <div id="breadcrumb"><?php print $breadcrumb; ?></div>
                    <?php endif; ?>
                    <?php if($title): ?>
                    <h2 class="title"><span><?php print $title; ?></span></h2>
                    <?php endif; ?>
                    <?php if($tabs): ?>
                    <div class="tabs"><?php print $tabs; ?></div>
                    <?php endif; ?>
                    <?php print $help; ?>
                    <?php print $messages; ?>
                    <?php print $content; ?>                                                   
                </div>
                <?php if($right): ?>
                    <div id="cnt-more">
                        <?php print $right; ?>
                    </div>
                <?php endif; ?>
            </div>
           
            <div id="ft-bridge"></div>       
            <div id="ft">
            <div>
                <?php if($bottomleft): ?>
                     <div class="ft-left"><?php print $bottomleft; ?></div>
                     <?php endif; ?>
                     <?php if($bottommid): ?>
                     <div class="ft-mid"><?php print $bottommid; ?></div>
                     <?php endif; ?>
                     <?php if($bottomright): ?>
                     <div class="ft-right"><?php print $bottomright; ?></div>
                     <?php endif; ?>               
                </div>
                <div id="links">               
                    <?php if($primary_links): ?>
                    <?php print theme('links', $primary_links); ?>
                    <?php endif; ?>
                    <?php if($footer): ?>
                    <div id="cpright">
                        <?php print $footer; ?>                           
                        </div>                   
                    <?php endif; ?>                       
                </div>                                 
            </div>
           
        </div>
        <script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
          if(google){
             google.load('search', '1');
              google.setOnLoadCallback(function(){
                new google.search.CustomSearchControl('011085097886057598815:e6pr2k15igk').draw('cse');
              }, true);
          }  
        </script>
        <?php print $closure; ?>
    </body> 
</html>

Don't know why the theme gives a 500 Server Error. Any hints ??

Kind Regards
Odili Charles Opute (http://ajaxpoet.wordpress.com/)
Proudly Nigerian

Please, Any Luck With This Theme Bug ??

Please, has anyone been able to look at this with me, I am going crazy, really need your help.

Kind Regards
Odili Charles Opute (http://ajaxpoet.wordpress.com/)
Proudly Nigerian

=-=

comment out the each function in template.php and refresh the theme registry.

If necessary step through the page.tpl.php file as well. Removing pieces until the site renders properly.

Even With Garland

I deleted my custom theme's template.php and did a fresh install on the server then exported my database to it using the backup_migrate module, but the problem persisted. So I started comment out the page.tpl.php file until all I had left was the right sidebar that shows the login and navigation blocks and still I can't login as the user 1. Next I switched the page.tpl.php with that of Garland, I just made a few changes :

<head>
    <?php print $head ?>
    <title><?php print $head_title ?></title>
    <?php print $styles ?>
    <?php print $scripts ?>
    <!--[if lt IE 7]>
      <?php //print phptemplate_get_ie_styles(); ?>
    <![endif]-->
  </head>
  <body<?php print $body_classes; //phptemplate_body_class($left, $right); ?>>

so that I don't get fatal PHP errors because of the phptemplate_body_class and phptemplate_get_ie_styles functions, I knew the site would not be properly styled (I did not include the Garland stlyes, just wanted to debug the page.tpl.php file). Even with these changes the login still does not give me access and mysite.com?q=admin says Access denied after the login.

With this finding and since IE gives a 500 Internal server error (though there is no trace of such an error from the server logs) I think the problem may not be with the theme. What can possibly make a login as user 1 not just do anything.

Kind Regards
Odili Charles Opute (http://ajaxpoet.wordpress.com/)
Proudly Nigerian

Another Revelation

On my local machine, I switched from my theme to the Garland theme (i.e from admin/build/themes/select, I set the site's theme to Garland), every thing still works locally (as it has been), next I export the DB again with backup_migrate and import it to the remote DB, and again I can't login as user 1 (i.e even with the site theme set to Garland).

If you recall, after a fresh installation, the default Garland theme works well (I have my admin access as I should), but after overwriting the remote DB with my local one, this is when both my theme and the default Garland begins to malfunction and my user 1 login gets me nowhere. Any hints on this please.

Kind Regards
Odili Charles Opute (http://ajaxpoet.wordpress.com/)
Proudly Nigerian

The Theme Is Not The Issue

I have been able to establish that the custom theme is not the culprit. I did a fresh Drupal install on my web host and then switched to the custom theme, I can login and logout and every other thing works, but the site is bare, I have not imported my DB to the live site, I think this is what messes up everything.

Kind Regards
Odili Charles Opute (http://ajaxpoet.wordpress.com/)
Proudly Nigerian

DB export crashes live site ??

I can't access the admin pages / sections after exporting my local DB the live site, it's not with the theme, I am doing my export and import with the backup_migrate module, even the standard mysqldump has not helped neither has the export with my local phpMyAdmin.
After loading the DB to the live site firefox shows a blank white page (no matter how many refreshes), chrome shows the site in full but I can no longer login as user 1 (though without any errors), IE 6 shows a 500 Internal Server Error after a login attempt and remains like that no matter how many times I refresh. Strange and frustrating, still on it though, and need all the help I can get. Thanks.

Kind Regards
Odili Charles Opute (http://ajaxpoet.wordpress.com/)
Proudly Nigerian

nobody click here