Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I'm still new with Drupal and I upgraded drom Drupal 6 to Drupal 7 yesterday; the upgrading process went well without any error report, but I got a WSOD in every page, so I enabled the error display and I got this error in the index.php.

Parse error: syntax error, unexpected T_STRING in C:\wamp\www\raqaba.co.uk\index.php on line 21

Can you tell me please what is the cause of this error, and how to fix it?

This is the code in the index.php.

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE)

/**
 * @file
 * The PHP page that serves all page requests on a Drupal installation.
 *
 * The routines here dispatch control to the appropriate handler, which then
 * prints the appropriate page.
 *
 * All Drupal code is released under the GNU General Public License.
 * See COPYRIGHT.txt and LICENSE.txt.
 */

/**
 * Root directory of Drupal installation.
 */


define('DRUPAL_ROOT', getcwd());

require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
menu_execute_active_handler();

This is the error log I got from Apache.

[Sat Nov 02 09:41:02 2013] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function phptemplate_get_ie_styles() in C:\wamp\www\raqaba.co.uk\sites\all\themes\garland\page.tpl.php on line 11 [Sat Nov 02 09:41:02 2013] [error] [client 127.0.0.1] PHP Stack trace: [Sat Nov 02 09:41:02 2013] [error] [client 127.0.0.1] PHP 1. {main}() C:\wamp\www\raqaba.co.uk\index.php:0 [Sat Nov 02 09:41:02 2013] [error] [client 127.0.0.1] PHP 2. menu_execute_active_handler() C:\wamp\www\raqaba.co.uk\index.php:25 [Sat Nov 02 09:41:02 2013] [error] [client 127.0.0.1] PHP 3. drupal_deliver_page() C:\wamp\www\raqaba.co.uk\includes\menu.inc:532 [Sat Nov 02 09:41:02 2013] [error] [client 127.0.0.1] PHP 4. drupal_deliver_html_page() C:\wamp\www\raqaba.co.uk\includes\common.inc:2563 [Sat Nov 02 09:41:02 2013] [error] [client 127.0.0.1] PHP 5. drupal_render_page() C:\wamp\www\raqaba.co.uk\includes\common.inc:2675 [Sat Nov 02 09:41:02 2013] [error] [client 127.0.0.1] PHP 6. drupal_render() C:\wamp\www\raqaba.co.uk\includes\common.inc:5726 [Sat Nov 02 09:41:02 2013] [error] [client 127.0.0.1] PHP 7. theme() C:\wamp\www\raqaba.co.uk\includes\common.inc:5864 [Sat Nov 02 09:41:02 2013] [error] [client 127.0.0.1] PHP 8. theme_render_template() C:\wamp\www\raqaba.co.uk\includes\theme.inc:1201 [Sat Nov 02 09:41:02 2013] [error] [client 127.0.0.1] PHP 9. include() C:\wamp\www\raqaba.co.uk\includes\theme.inc:1517

share|improve this question
 
can u show ur code of index.php –  harshal Nov 1 '13 at 18:15
 
pls check the updated answer –  harshal Nov 1 '13 at 18:25
add comment

1 Answer

You should close parenthesis properly, check for semicolon placed improperly..

 <?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);// THE ERROR WAS SEMICOLON NOT PLACED HERE
/**
 * @file
 * The PHP page that serves all page requests on a Drupal installation.
 *
 * The routines here dispatch control to the appropriate handler, which then
 * prints the appropriate page.
 *
 * All Drupal code is released under the GNU General Public License.
 * See COPYRIGHT.txt and LICENSE.txt.
 */

/**
 * Root directory of Drupal installation.
 */


define('DRUPAL_ROOT', getcwd());

require_once(DRUPAL_ROOT . '/includes/bootstrap.inc');// THE OPENNG AND CLOSING BRACKET NOT //PLACED HERE in require_once
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
menu_execute_active_handler();

////try adding function below in template.php file in themes folder

function phptemplate_get_ie_styles() {
  global $language;

  $iecss = '<link type="text/css" rel="stylesheet" media="all" href="' . base_path() . path_to_theme() . '/fix-ie.css" />';
  if ($language->direction == LANGUAGE_RTL) {
    $iecss .= '<style type="text/css" media="all">@import "' . base_path() . path_to_theme() . '/fix-ie-rtl.css";</style>';
  }

  return $iecss;
}

//// try adding the following function

function phptemplate_body_class($left, $right) {
  if ($left != '' && $right != '') {
    $class = 'sidebars';
  }
  else {
    if ($left != '') {
      $class = 'sidebar-left';
    }
    if ($right != '') {
      $class = 'sidebar-right';
    }
  }

  if (isset($class)) {
    print ' class="' . $class . '"';
  }
}

Check the link given below :
https://drupal.org/node/254940

share|improve this answer
 
I Think the modification you did work but, unfortunately i'm back to the white screen of death again, even that i used the error reporting !!! –  ALBIHANY Nov 1 '13 at 18:32
 
can u show me the error log in any way? –  harshal Nov 1 '13 at 18:33
 
have u seen the error log ? –  harshal Nov 1 '13 at 18:40
 
try adding function above given in template.php file in themes folder and let me know –  harshal Nov 1 '13 at 18:48
 
is the error gone..? –  harshal Nov 1 '13 at 18:54
show 10 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.