Upgrade disaster!

coreyp_1 - January 6, 2008 - 20:33

Well, this has been horrible!

I recently upgraded to a new server, and now everything has exploded... body parts lying everywhere... you get the idea!

First, my website couldn't find any includes, and I was getting "failed to open stream" errors.

I remedied this by adding ini_set("include_path","."); to bootstrap.ini. I read about this somewhere in the forums, but I can't locate the specific page at the moment.

Now my site text would load, but no links worked, because Drupal was inserting "cgi-sys" into every url. I fixed this by explicitly setting $url_base in settings.php.

OK, my site is up and running... but couldn't this have been done automatically? I mean, for every site that I host (several at this point), I am having to go in and hack a core file, and set $db_url.

Next issue: I wanted to try out D6 to help with development, using a subdomain. Once again, I got "failed to open stream" errors immediately. So, I edited bootstrap.ini, and tried again. That part worked, but then it started inserting "cgi-sys" into the install url, re-directing me to "example.com/cgi-sys/install.php", which results in an infinite loop.

As it is, I don't know how to remedy this (no settings.php to edit, yet), so I can't install D6.

Any sugestions to handle these two things (1. the include path & 2. weird "cgi-sys" in path)?

This seems pretty

criznach - January 6, 2008 - 20:50

This seems pretty unnecessary. Who is your new host? Looks more to me like PHP is not configured properly.

I use Hostony (and have for

coreyp_1 - January 7, 2008 - 02:47

I use Hostony (and have for several years now). I requested an upgrade to a different server because the original one's specs couldn't pass the D6 installation checks for PHP version. I have not had any problems on the original servers, and have been with Drupal since v4.6. I was hoping for a straightforward upgrade so that I could help test D6 on my everyday-use servers, rather than my WAMP installation at home.

- Corey

Update

coreyp_1 - January 13, 2008 - 08:56

After one week of going back and forth with tech support, my sites are now working again! I'll include a brief synopsis here, just in case anyone else has these issues.

The long and the short:

  • They switched my account to default to php5 rather than php4.

    As it turns out, the "cgi-sys" was being inserted because php4 was returning the wrong information in the $_SERVER['SCRIPT_NAME'] variable. It was returning "/cgi-sys/php4" rather than "/index.php". When you don't set $base_url explicitly, Drupal uses the script_name variable to help figure out the path to index.php. Since PHP was giving the wrong information, my site didn't work.

    My Google searches indicate that this is either a bug in php, or a bad configuration on the part of my web host. Either way, I couldn't get tech support to understand this. They kept trying to get me to hack core files. In fact, they even tried to do it without telling me, but I caught it. In the end, it was easier to switch my entire account to php5, which was not suffering from this problem.

    As a side note, I still had access to the old server, and both it and my new server were running the same version of php4, but the script_name variable worked on the old server, and didn't on the new. I couldn't get tech support to understand that, either.
  • I still had a problem with the include files not being found (anytime there was a require_once()), so this was remedied by using php.ini in the root of each Drupal installation, making sure that "." was part of the include path variable.

    To me, this was an unnecessary step, reflecting the badly configured PHP. The php include path was "./usr/local/php4/lib/php". My old site had a "." as well for a path, so the include path looked something like this: ".:./usr/local/php4/lib/php". I just adapted it for my php5 php.ini, and everything worked.

I can't tell you how frustrating this has been! I have spent one week arguing with tech support about hacking core files, when it boiled down to two things: php4 was buggy, so use php5, and use a php.ini file (because the new server didn't have a complete include path).

Tech support never did understand the problem with php4, and I shudder to think of what will happen to the next person who just tries to do a Fantastico installation of Drupal...

- Corey

Thanks...

piersg - June 4, 2008 - 21:34

...for posting your report. I moved my site from one account to another (within the same hosting company) and had the same problem with the /cgi-sys added in front of all my paths . I changed the default processor to php4 and it all magically worked again. Will have to get it fixed in the longer term though.

Can you be a little more specific and give some details ?

GiorgosK - June 6, 2008 - 22:27

I am having the same exact problem

I am using

AddHandler application/x-httpd-php4 .php

in .htaccess but it inserts the cgi-sys in the URLs

------
GiorgosK
Geoland Web development / web marketing

 
 

Drupal is a registered trademark of Dries Buytaert.