I am pretty new to PHP, but I have installed DRUPAL successfully. However, Anything I try to do results in a parsing error in the 'update.compare.inc' file. First it was an error on line 695, and after a patch I found (I copied the portion that was changed), I have now an error on line 685.

Is it possible to get the correct file, or how can I make this work? I am new to PHP, so I need baby steps, but I try to learn this thing.

Thanks,
Michael

Comments

VM’s picture

you shoudln't have to patch core on a new install. Ultimately, the correct file is in every download without the need to patch it. What patch did you use?

please reinstall and post the exact error message you run into.

Parse errors are usuing a programmatic typo. However, core shouldn't produce these at all when installing or this would be a wide spread issue. I suppose one of the files could be corrupted and causing an issue.

Alwaysdutch’s picture

I have copied the original file back in the directory of version 6.16, and below is the error I receive:

Fatal error: Call to undefined function: array_intersect_key() in /home/content/t/u/l/**********/html/drupal/modules/update/update.compare.inc on line 695

(I removed the domain name, and replaced it with *, just in case.... :)

Thanks for checking on this,
Michael

karako’s picture

I am getting the exact same error: Fatal error: Call to undefined function: array_intersect_key() in /nfs/c01/h11/mnt/10567/domains/site2.claimscon.org/html/modules/update/update.compare.inc on line 695

The install went fine, but when I try to access my admin page this is the error I get. I tried uploading the files in the update directory again, but continue to get this error.

b4ball’s picture

I have the same exact error as above. I updated from 6.15 to 6.16 and then couldn't access the admin page. But, I had admin_menu mod installed and I could access the admin pages through those links. I hadn't done much to my site so I cleared my database, did a fresh install and still cannot access the admin page through navigation.

I'm just going to go back to 6.15 for now.

My site is running on:
Apache/1.3.37
PHP 4.4.6
MySQL database 5.0.32

VM’s picture

I can't produce the error on any new installs. Which could point to the environment Drupal is being run in.

version of apache?
version of PHP?

so on so forth, are you sure you fall into drupal's requirements? http://drupal.org/requirements

pascalin’s picture

Hello, I found the same error when accessing to /admin on fresh install of Drupal 6.16:

Fatal error: Call to undefined function: array_intersect_key() in /home/user/htdocs/modules/update/update.compare.inc on line 695

My version of Apache is: 1.3.34 (Unix) mod_jk/1.2.18
My version of PHP is: 4.4.2

I have no option to switch to PHP 5 now.

Any help? Thanks!

VM’s picture

Set the status of the update.module to 0 in the system table and test.

pascalin’s picture

I have updated the status to 0 and the error is gone.

I really appreciate your help.

Thanks!

kaicyee’s picture

Works like a dog gone champ! Thank you so much! For those who are real noobs like me, this is in PhpAdmin under the systems in a module called this:

modules/update/update.module

jimit’s picture

Hey there! First of all try to find out which version of PhP you are using. I am using 1and1.com and I figured it out that by adding following lines into the htaccess file I can run PhP version 5.x.

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

- This fix resolved my problem.

pushkar’s picture

If you are on mediatemple, check the PHP settings for your domain. Update from PHP4 to PHP5...

That did the trick. Thanks jimit.

Alwaysdutch’s picture

I am running the site on Godaddy.com. I believe they are running PHP 4.4, but will be converted to 5 in the coming weeks. As for Apache, I am not sure, but I will find out.

VM’s picture

go daddy uses php 4 and php 5. it is likely that PHP 4 is the default and to use php5 you have to add to .htaccess per their documentation

Alwaysdutch’s picture

How would that solve my problem??

VM’s picture

no idea really. Others on godaddy are using drupal fine based on other forum threads and using PHP5. why strap yourself with PHP4 which is outdated and dead?

test and report back.

itnet7’s picture

Hey there! First of all try to find out which version of PhP you are using. I am using 1and1.com and I figured it out that by adding following lines into the htaccess file I can run PhP version 5.x.

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

- This fix resolved my problem.

This too helped me with my 1 and 1 install!

-Chris

mmatzen’s picture

I ran into this for the first time today. Essentially switching to PHP 5 fixes it, but here is what I ran into.

Before Creating the DB and Before Copying the Drupal Install Files over to the server I made sure the domain was set to PHP5. After Setting up DB and installing Drupal 6.16, as soon as I tried to go to admin page I got ..../modules/update/update.compare.inc on line 695. This messed with me for a bit. I actually re-installed again and the same result. I went back into the admin on Media Temple and Sure enough the domain was reset to php4. Long story short I had to Make the domain PHP5, set up DB, install drupal, then go back to media temple and make it php5 again and from there everything worked fine.

Weird huh?? Hope this helps someone.

Alwaysdutch’s picture

Yes, it is fixed. All what was needed was the PHP5 switch at the Godaddy account. All works fine now, but I need to learn a lot about themes, and how I actually can build pages.

Thanks to all that have been helpful in explaining the problem.
Mike

jolev’s picture

It works for me too. You have to be sure about PHP versión. At first everything worked very good, but I reinstalled drupal just for fun and this error appears. Hostings usually works with PHP4 and PHP5, most of the time you are able to change between those. I reset PHP version to v5, and everything works ok now, I didn't reinstall or reconfigure anything (at least not yet).

Thanks!

so4’s picture

it did help someone. thanks @mmatzen. ;)

jahmes8’s picture

The answer (for me) is here:

http://drupal.org/node/758340