Failed to install: Call to undefined function db_result() in ... path.inc on line 55

Bug #261587 reported by thamas
4
Affects Status Importance Assigned to Milestone
ProsePoint
Fix Released
Critical
bengtan

Bug Description

I've tried to install it (to localhost which works with other drupal installations well), but was not able:

Fatal error: Call to undefined function db_result() in (...)\xamplittle\htdocs\pp\includes\path.inc on line 55

(I've also tried an other localhost in an USB stick, but it timed out in turn time limit was raised.)

Revision history for this message
bengtan (bengtan) wrote :

Hi,

Could you please tell me a bit about your setup? I've heard of xampp, but not xamplittle. What are you using?

During which stage of the installation process did you encounter this?

Did the message appear in the apache logs, or on the browser?

Also, the line referenced is from Drupal core, not ProsePoint code, so I'm a bit perplexed by it.

Revision history for this message
thamas (hajastamas) wrote :

Hi,

there is a typo in the name of the folder: it's xampplite not xampplittle: XAMPP Lite is a very reduced version of XAMPP with Apache 2.2.9 + PHP 5.2.6 + MySQL 5.0.51b + phpMyAdmin 2.11.7 + OpenSSL 0.9.8h + SQLite 2.8.15. For lovers! For the lite versions exist no upgrades or addons. - http://www.apachefriends.org/en/xampp-windows.html#646

The installation fails right after the first step. Select installation profile: ProsePoint, save and continue and the next screen is the error message. (So the message appear on the browser.)

I'm not a coder but I think the error must be somewhere else, not in the path.inc 'cause when I've chosen the Drupal installation profile instead of ProsePoint, it installed successfully without any harm.

Revision history for this message
bengtan (bengtan) wrote :

I agree with your observations. The problem probably exists in the PP profile code, and path.inc is merely the file that triggers it.

I know that during the early installation stages, code mustn't attempt to access the database because the database hasn't been setup yet. The referenced line in path.inc is doing just that - accessing the database in an attempt to see if any path aliases have been set. Unfortunately, I can't quite see why PP would indirectly cause a path lookup - not at such an early install stage.

Let me investigate and see what I can find.

Revision history for this message
bengtan (bengtan) wrote :

I've run through the installation a couple of times on my system. Nothing calls into the offending function when I install. Weird. I can't reproduce the problem.

Can you tell me ... when you see this error message, whether you had already reached the page asking for database details (ie. database name, user, password)?

And this is probably obvious, but I presume you've tried this more than once and it happens every time?

I don't suppose you have a database lying around on your system with the following details:

User Name: username
Password: password
DB name: databasename

by any chance? These are the settings in the settings.php file before installation, which normally aren't supposed to be valid.

Revision history for this message
thamas (hajastamas) wrote :

Of course I've tried this more times and it happens every time.

But I had an other idea: I've installed the latest version of XAMPP (not XAMPPlite) and On it I was able to install ProsePoint. So it could be some problem with xampplite (It was the version 1.5.1 with PHP5.1 - maybe this??)

I had some trouble with the demo content, but it is an other bug report: https://bugs.launchpad.net/prosepoint/+bug/261830

Is it still worth to mention that there was no pro problem to install Drupal 6 to that 'old' xampplittle...

Changed in prosepoint:
status: New → Fix Released
Revision history for this message
bengtan (bengtan) wrote :

If you're happy with the resolution of this issue, I won't chase this one up (but will chase up your other ones). According to the specs you gave me for XAMPPlite, it should have worked, but ... *shrugs*. I'll just take the easy way out and say ProsePoint is not compatible with XAMPPlite :)

Revision history for this message
thamas (hajastamas) wrote :

OK :o)

Revision history for this message
Living (lr-abcgov) wrote :

I've got the same error at the same spot in the installation. It is online on a godaddy.com shared hosting server.

Note that the installation is in a subfolder of the site. This setup here works fine with regular drupal 5.9 and 6.4 site setups, it should be noted.

Check it out at: http://www.abcgov.com/prosepoint/

Also, not clear to the user at this stage is: why have the choice for installing Drupal? (I noticed that clicking a Drupal install does not result in the error message.)

Is this a permissions/write problem?

Thanks...

Revision history for this message
bengtan (bengtan) wrote :

I've already tried it on your test site, and I've observed it for myself.

At the moment, I don't know what it is, though it seems related to hosting configuration somehow? I am investigating it, but it may take a while before I have a diagnosis.

The default Drupal profile is currently in there because I didn't dare to take it out yet as I didn't want to make any changes to Drupal core itself. As it turns out, it's been useful for pointing the cause of the issue at ProsePoint.

AFAIK, I don't think it's a write permissions problem. The offending line in path.inc is executed before anything in ProsePoint is even run, which makes it even weirder.

Unfortunately, I haven't been able to duplicate this problem. If I could reproduce it, it would make solving it much easier.

Changed in prosepoint:
assignee: nobody → bengtan
importance: Undecided → Critical
status: Fix Released → Confirmed
Revision history for this message
bengtan (bengtan) wrote :

BTW, I have just tested installing PP on a subdomain, and it worked like it should. So the subdomain's not it.

Revision history for this message
bengtan (bengtan) wrote :

I think I have a workaround. It will involve some editing of PHP code though, so if that sounds too onerous, you might have to find someone to try it for you.

The idea is to not enable path.module until later in the Installation process.

In the file .../profiles/prosepoint/prosepoint.profile,

1.
In the function prosepoint_profile_modules(), at approximately line 597, comment out the line 'path' so it looks like:

    // other drupal core
    'contact',
    // 'path',
    'tracker',
    'search',

2.
In the function prosepoint_profile_install(), add a single line: module_enable(array('path')); to the beginning of that function (approx line 707), so it looks like:

function prosepoint_profile_install($variant) {
  module_enable(array('path'));
  global $node_table;
  variable_set('prosepoint_state', 'install');

3.
Completely clear out your database and restart from anew.

Let me know how you go.

Thank you.

Revision history for this message
Living (lr-abcgov) wrote :

Thanks for all the info. I can do as you suggest, but for purposes of testing, would you like to have full FTP access to this folder and tinker with it to your heart's content? I can always add an additional install folder at any time.

If so, let me know how I can get you user/pw securely...

Revision history for this message
bengtan (bengtan) wrote :

That would be really helpful, because I really want to look at this in detail. I'll email you offline on how about the username/password.

Revision history for this message
bengtan (bengtan) wrote :

Hi,

Thanks for letting me test on your system. I have completed my diagnosis, and inserted a workaround.

The diagnosis ...

You're running a PHP version lower than 5.2. ProsePoint uses a module that, unfortunately, during installation, indirectly makes a database access if the PHP version is lower than 5.2. This occurs before the database is set up, hence the fatal error message.

I have inserted a workaround on your server. It is not the official fix (that will require some thought), but it should work for now. If you want to take a copy of the source code to put onto another server, these are the files I had to modify to insert the workaround:

./profiles/prosepoint/prosepoint.profile
./sites/all/modules/date/date_api.install

Please don't spread this hotfix around. It's merely a workaround, not a true fix. The true fix will be released in 0.02 in a few days time (if all goes to plan).

For others who might be also reading this issue ...

This issue only occurs with PHP version 5.1 and lower. You can work around it by moving to a server with PHP 5.2 or higher.

If you absolutely need the hotfix, please contact me offline and I'll send instructions to you. Otherwise, I'd like to keep the hotfix as restricted as possible.

You can contact me either through here or http://www.prosepoint.org/contact

bengtan (bengtan)
Changed in prosepoint:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.