Skip to main content
Welcome guest. | Register | Login | Post

Problems with my Drupal install

7 replies [Last post]
dylunio's picture
Offline
Joined: 2005-12-20

I host my own small personnal site on my server using Drupal. It was working fine until about a month ago when I had a powercut and the server went down (no UPS for you). Since then it hasn't worked properly.

On any page I go I get a number of errors pertaining to the $SERVER_ROOT/drupal/includes/menu.inc file. One that comes up most often is:
warning: array_keys() [function.array-keys]: The first argument should be an array in /var/www/localhost/htdocs/drupal/includes/menu.inc on line 919.

The line reads:

Quote:

$temp_mid = min(array_keys($_menu['items'])) - 1;

and the comment above it is: // Menu items not in the DB get temporary negative IDs

Also I no longer get any formatting, or content, when I load a page I'll get something like this:

Quote:

{head} {styles}
{_BLOCK_.header.logo} {_BLOCK_.header.site_name}
{secondary_links}
{primary_links}
{_BLOCK_.header.search_box}
{_BLOCK_.footer.blocks}
{_BLOCK_.node.title} {submitted}
{content}
{_BLOCK_.node.links}
{_BLOCK_.node.title} {submitted}
{content}
{_BLOCK_.node.links}
{_BLOCK_.node.title} {submitted}
{content}
{_BLOCK_.node.links}
{_BLOCK_.node.title} {submitted}
{content}
{_BLOCK_.node.links}
{_BLOCK_.node.title} {submitted}
{content}
{_BLOCK_.node.links}
{_BLOCK_.node.title} {submitted}
{content}
{_BLOCK_.node.links}
{_BLOCK_.node.title} {submitted}
{content}
{_BLOCK_.node.links}
{_BLOCK_.node.title} {submitted}
{content}
{_BLOCK_.node.links}
{_BLOCK_.node.title} {submitted}
{content}
{_BLOCK_.node.links}
{_BLOCK_.node.title} {submitted}
{content}
{_BLOCK_.node.links}
1
2
3
4
5
6
7
next page
last page
{_BLOCK_.footer.message}

Which isn't what I expect at all.

I'm not sure if this is a MySql problem, a PHP problem or a Drupal one - I've been to the Drupal site and tried to fix a few errors and have been successful with a few, but not with others. It suggests to get rid of the {head} etc to go to ?q=admin/themes and change the theme - but I only get more of the {head} etc. stuff.

Drupal version is 4.6.8.
PHP version is PHP 5.1.4-pl0-gentoo
MySql: Ver 14.7 Distrib 4.1.20
Site if you want to have a look at any errors in action: http://dylunio.homelinux.com/drupal

Any help would be grand.

Regards

dylunio

libervisco's picture
Offline
Joined: 2006-05-04
I'm not sure, but

I'm not sure, but considering that it started happening after a power outage it might be that some drupal files have been corrupted causing these errors.

Have you tried replacing your drupal files with original 4.6.8 files?

a thing's picture
Offline
Joined: 2005-12-20
fsck

fsck the partition from a live CD.

kanenas.net's picture
Offline
Joined: 2006-03-27
I think your problem has to

I think your problem has to do with php.

Check this out...

http://drupal.org/node/270

Quote:

Also, xTemplate (the default theme engine for Drupal 4.6.x and previous) is reported to have issues with PHP 5.0.5 and 5.1. Converting your themes to the phpTemplate engine (default in 4.7) will work around this issue.

I really can't think of something else, because as you said your site was working fine until about a month ago !!!

So... give it a try ! Convert to phpTemplate engine !!!

dylunio's picture
Offline
Joined: 2005-12-20
Fixes so far

Okay I've managed to get a few fixes done:

I've updated to Drupal 4.7.2 and run the $base_url/update.php file
This has given me a site which views correctly.

I still have an error which means I can't login.

The error reads:

Quote:

* user warning: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' query: SELECT * FROM users WHERE status = 1 AND name = LOWER('dylunio') in /var/www/localhost/htdocs/drupal/includes/database.mysql.inc on line 120.
* user warning: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' query: SELECT * FROM users WHERE status = 0 AND name = LOWER('dylunio') in /var/www/localhost/htdocs/drupal/includes/database.mysql.inc on line 120.
* user warning: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' query: SELECT * FROM users u WHERE LOWER(name) = LOWER('dylunio') AND pass = '**************' AND status = 1 in /var/www/localhost/htdocs/drupal/includes/database.mysql.inc on line 120.
* Sorry. Unrecognized username or password. Have you forgotten your password?

No I havn't forgotten my password.

I've tried searching the drupal website for this error - and have found people with the same error, but many either don't have an answer, the solution given doesn't work, or the fix seems to be linked to useng phpMyAdmin (example).

Any more ideas would be great.

dylunio

libervisco's picture
Offline
Joined: 2006-05-04
Well from what I can gather

Well from what I can gather from the drupal.org thread you linked it seems it might be a problem with your version of MySQL which gets something wrong.

Have you tried doing the steps Rosamunda there suggested?

If you don't have phpmyadmin you can either install it (it should be available in any distro), install and use webmin with mysql module which allows you to also issue SQL queries or manually issue those queries to mysql in command line.

People there are reporting that this works so it may work for you if you try it one of these ways.

I am not sure exactly what the error means though, as I never had it, but if you haven't tried it yet, the linked solution may work.

Good luck!

dylunio's picture
Offline
Joined: 2005-12-20
Fixed!

I fixed the problem by upgrading MySQL up to version 5.0.22 Smiling

libervisco's picture
Offline
Joined: 2006-05-04
Congratulations!

Congratulations! Smiling

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.