Help me upgrade to Basic Hosting

Web hosting discussion, programming, and shared and dedicated servers.
6 posts Page 1 of 1
by bobino » Thu Jul 07, 2011 9:34 am
Hello,

I'm having trouble upgrading my website to Basic Hosting. It is currently working just fine with Value Hosting. When I attempted to upgrade to Basic using the member tools, the site crashes on a particular php file.

The site is a Drupal 7 based site. The error is "Unexpected '{' on line 677 of the file 'includes/bootstrap.inc'

This line is the opening of a try block. Inside the try block is an if statement attempting to verify connection to the database.

Code: Select all

 
if (!empty($filename) && file_exists($filename)) {
    $files[$type][$name] = $filename;
  }
  elseif (isset($files[$type][$name])) {
    // nothing
  }
  // Verify that we have an active database connection, before querying
  // the database. This is required because this function is called both
  // before we have a database connection (i.e. during installation) and
  // when a database connection fails.
else {
    try {                                     <=== this is the line that fails
      if (function_exists('db_query')) {
        $file = db_query("SELECT filename FROM {system} WHERE name = :name AND type = :type", array(':name' => $name, ':type' => $type))->fetchField();
        if (file_exists(DRUPAL_ROOT . '/' . $file)) {
          $files[$type][$name] = $file;
        }
      }
    }
It seems to me that it is something about how the server is configured or permission to access my database. This is not something I can troubleshoot or fix. Customer service suggests I come here for help.

Are there any suggestions?

-Bob
http://www.astronomylog.com
by nullgoo » Thu Jul 07, 2011 11:16 am
PHP version maybe? try...catch appears to be PHP v5. You can sometimes pick which PHP version to use, but I don't have a hosting account here, so I don't know exactly how to do that.
by bobino » Thu Jul 07, 2011 11:38 am
nullgoo wrote:PHP version maybe? try...catch appears to be PHP v5. You can sometimes pick which PHP version to use, but I don't have a hosting account here, so I don't know exactly how to do that.
I suggested this to the customer rep but he insisted it is not different.

I'm frankly at a loss as to how I could troubleshoot this. There's nothing wrong with the file when run from Value Hosting but it crashes when run while the site is configured for Basic Hosting. The syntax is perfect, thousands of websites use this very file.

As far as I can tell, it is nothing I am doing that makes this fail. Please point out where I am mistaken.

-Bob
http://www.AstronomyLog.com
by nullgoo » Thu Jul 07, 2011 11:51 am
What version is in use right now? If you're not sure, create a .php file with:

<?php phpinfo() ?>


I don't know if this is unique to my host, but this is what I had to add to my .htaccess to get PHP5 by default:

AddHandler application/x-httpd-php5 .php


http://drupal.org/requirements
"Required: PHP version 4.4.0 or higher for Drupal 5 and Drupal 6, PHP 5.2.5 or
higher for Drupal 7"

Worst case, I guess you could try Drupal 6.
by bobino » Thu Jul 07, 2011 1:25 pm
nullgoo wrote:What version is in use right now? If you're not sure, create a .php file with:

<?php phpinfo() ?>

I don't know if this is unique to my host, but this is what I had to add to my .htaccess to get PHP5 by default:

AddHandler application/x-httpd-php5 .php


http://drupal.org/requirements
"Required: PHP version 4.4.0 or higher for Drupal 5 and Drupal 6, PHP 5.2.5 or
higher for Drupal 7"

Worst case, I guess you could try Drupal 6.
Well, I at this time I only have access to the website configured for Value Hosting. This is the config that works.

The phpinfo shows PHP Version 5.2.11

I don't want to change it to Basic Hosting as that is broken. I have no way to test it. I suspect that config is not PHP v5.x but the customer service rep insisted it was the same.

-Bob
by williamt » Thu Aug 11, 2011 1:42 pm
Add this to your .htaccess file in the root of your domain

Code: Select all

Action php-cgi /cgi-bin/php5
AddHandler php-cgi .php
You have this in an .htaccess file in one directory above but with basic hosting apache doesn't pick it up.

Let me know if you need anything else.
Sr. Systems Administrator @ sonic.net
6 posts Page 1 of 1

Who is online

In total there are 48 users online :: 0 registered, 0 hidden and 48 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 48 guests