I have a problem installing drupal. At the "Installation" part I have errors:

* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near ")" at character 42 in /var/hst/ural-stone.ru/htdocs/includes/database.pgsql.inc on line 138.
* user warning: ERROR: syntax error at or near ")" at character 42 query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 1 OFFSET 0 in /var/hst/ural-stone.ru/htdocs/includes/menu.inc on line 315.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near ")" at character 42 in /var/hst/ural-stone.ru/htdocs/includes/database.pgsql.inc on line 138.
* user warning: ERROR: syntax error at or near ")" at character 42 query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 1 OFFSET 0 in /var/hst/ural-stone.ru/htdocs/includes/menu.inc on line 315.

As I understand searching google, it's common problem, but I didn't find the fix for it anywhere

Comments

ambientdrup’s picture

Can you give some more details - what platform and OS are you installing on? What version of Drupal? What versions of PHP and MySQL? Or are you trying to install this with postgreSQL?

rushan’s picture

Debian Etch linux
PHP 5.2.0-8+etch10 (cgi+fcgi)
As web server I have nginx 0.4.13 as frontend and lighttpd 1.4.13 as backend
Yes, I'm trying to install drupal with Postgresql 8.1.11

bluebee-1’s picture

Exactly the same problem but with MySQL 5.0.45 and we are stuck. No matter how we fiddled with everything this problem occurs.

Gave all the files/directories 0777, put under another directory/root, send files and unzip, unzip and send files, send auto, send binary, htaccess, new MySQL users, etc. you name it we did it, perhaps couple of dozen times. After the 43 tables created successfully, crash occurs.

Anyway when we have remotely accessed (over ADSL) the very same MySQL (on host) and installed Drupal 6.2 locally at home (not host), then we have a sudden success, flawless installation. I think the problem is not the database, but php and/or php-mysql library, may be the misinterpretation of string operation in the menu.inc line 315 somehow. May the bubling of the SELECT somehow fail in the IF's criteria section?

Database collation and all the tables: utf8_general_ci, MyISAM
Site: Static IP, no virtual host

and other PHP info...

http://03396.ve.carpathiahost.net/phpinfo.php

Edit: typo

atgebweb’s picture

When Installing (localhost) Version 6.2

# user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY fit DESC LIMIT 0, 1' at line 1 query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mydrupal\includes\menu.inc on line 315.

Using:

  • Windows XP SP2.
  • MySQL Server version: 5.0.51a-community-nt
  • MySQL charset: UTF-8 Unicode (utf8)
  • Used PHP extensions: mysqli
  • Apache 2.2

in the httpd.conf the Drupal virtual host is configured:

<VirtualHost *:80>
    ServerName mydrupal
    DocumentRoot htdocs/mydrupal
    ServerAlias mydrupal
    <Directory htdocs/mydrupal>
	Allow from all
	Options +Includes +Indexes +FollowSymLinks
	AllowOverride all
    </Directory>
</VirtualHost>

in the .htacces

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /
  # Rewrite URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

settings.php:

 $base_url = 'http://mydrupal';  // NO trailing slash!

I have (without any success) tryed to apply 'patch' as described in :
http://drupal.org/node/239443

Can't get past this problem.

I may try to bypass the query in line 315 testing if $placeholders is empty.... However I have the feeling this is not a sustainable solution ;)

Too bad Drupal do not seem to have 'installation log' or 'debug' options.

Cheers.

rushan’s picture

I've got sucsess with this patch. Thanx

shunting’s picture

Simply a blank page.

Since my install locally worked fine, and I'm installing into a subdirectory of the Apache documentroot, I'm going to try fiddling with htaccess next.

http://www.universalpantograph.com

jcross’s picture

Regarding the "menu.inc on line 315" error while installing Drupal 6.3
Drupal seems to create database tables which are somehow incompatible with itself.

I was able to complete the installation by deleting (aka "dropping") all of the tables (ie "emptying the database").
This is done through PHPMyAdmin.

I then hit refresh in the Drupal installation browser window and my installation completed successfully!

(This is a Dreamhost install for those who are interested.)

Good luck!

- Jonathan Cross

Duplicate error:
http://drupal.org/node/247360

shunting’s picture

I had a partial install after a settings.php kerfuffle, so I dropped and recreated the database, and the install worked just fine.

http://www.universalpantograph.com

mattcarl’s picture

I too just spent hours searching the web for a "cure".

Background:
Windows XP (sp3)
Apache 2.2
PHP 5.2.6
mySQL 5.0
Drupal 6.4 Fresh Install

Here's what I believe did it in my case:

Drupal has quite an extensive ".htaccess" file that resides in your "drupal root" folder (e.g. the chosen base directory for drupal ~ ex http://yourdomain.com/drupal-6.4/ )

For the uninformed, this file (.htaccess) is designed to override Apache httpd.conf settings.
WELL.... the Apache 2.2 install I have, by default DOES NOT ALLOW overrides.
You need to change the setting: "AllowOverride None" to "AllowOverride All"

Look in your Apache httpd.conf file for the following section:

   #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
   AllowOverride All  

NOTE...
It did not work right away.... (closing browser, restarting Apache, didn't work)

For good measure....
1- I deleted my database completely (Since this is a new install, that was no big deal)
2- I restarted my computer (full reboot)
3- Tried the install again and it worked.

Hope that helps someone else out!