OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Instalation problem - Database connection failed

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Instalation problem - Database connection failed

Postby rcorrear » Mon Nov 05, 2007 6:27 pm

Hello everyone!

First of all let me say this looks like an amazing piece of software, thanks for making it available.

Now on to my problem... I've been trying to install

Code: Select all
OJS 2.1.1, CVS tag: ojs-2_1_1-0, Release date: July 17, 2006


without success. First I couldn't reach the installation form, so I set disable_path_info to On. That allowed me to get to the installation form. But now I'm getting an error with the database access. I'm absolutely sure I can create tables, and insert into them (I cannot however create databases, so I created the database and unchecked "Crear nueva base de datos" - "Create new database") with the user supplied (Yes, I made sure I'm entering the right user/password, I copied it from a working script). With all the other information entered (and seemingly correct access to the needed files as evidenced by the "Sí" - "Yes" - next to them) clicking on the "instalar Sistema Open Journal" - "Install Open Journal System" ("instalar" should be capitalized btw!) takes me back to the installation form with an error message of

Code: Select all
 Se han producido errores durante la instalación:

    * Se ha producido un error en la conexión a la base de datos: Se ha producido un error desconocido en la conexión a la base de datos.



which roughly translates to unknown database error.

Not happy with the results I tried to install it manually, and after executing the SQL statements on the database changing config.inc.php I get

Code: Select all
(mysql): SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = 'TinyMCEPlugin' AND journal_id = '0' 
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/foo/bar/ojs/lib/adodb/drivers/adodb-mysql.inc.php on line 488
:

                                 ADOConnection._Execute(SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = 'TinyMCEPlugin' AND journal_id = '0') % line  839, file: adodb.inc.php
                              ADOConnection.Execute(SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = ? AND journal_id = ?, Array[2]) % line   62, file: DAO.inc.php
                           DAO.retrieve(SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = ? AND journal_id = ?, Array[2]) % line   79, file: PluginSettingsDAO.inc.php
                        PluginSettingsDAO.getPluginSettings(0, TinyMCEPlugin) % line   59, file: PluginSettingsDAO.inc.php
                     PluginSettingsDAO._cacheMiss(Object:FileCache, enabled) % line    0, file:


Fatal error: Call to a member function RecordCount() on a non-object in /home/foo/bar/ojs/classes/plugins/PluginSettingsDAO.inc.php on line 81


I've also tried commenting out

Code: Select all
PluginRegistry::loadCategory('generic');


as well as moving everything inside the plugins directory to another location (just to try something).

Now I don't have any more ideas and the traceback doesn't help me much without understanding the system.

My software stack is:

php: 5.2.0 running as a CGI,
MySQL: 4.0.25-standard,
Apache: 1.3.37 (no access to httpd.conf)

Is there any more info I can provide you so you can help me?

Any help is GREATLY (your software seems to be the only one to fulfill all our needs) appreciated.

Ricardo Correa.
rcorrear
 
Posts: 2
Joined: Mon Nov 05, 2007 5:37 pm

Re: Instalation problem - Database connection failed

Postby asmecher » Tue Nov 06, 2007 10:36 am

Hi Ricardo,

Are you sharing a database with another application? If so, be warned that any table name conflicts could result in your existing data getting clobbered.

Try making sure that database connection character set support is disabled; that version of MySQL is too old to support it. Then I'd suggest checking your MySQL and Apache error logs to see if anything shows up there to explain the installation problem.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9207
Joined: Wed Aug 10, 2005 12:56 pm

Re: Instalation problem - Database connection failed

Postby rcorrear » Wed Nov 07, 2007 1:46 pm

Hello Alec,

asmecher wrote:Are you sharing a database with another application? If so, be warned that any table name conflicts could result in your existing data getting clobbered.


No, this database is dedicated to OJS exclusively.

asmecher wrote:Try making sure that database connection character set support is disabled; that version of MySQL is too old to support it.


It already is, connection_charset = Off.

asmecher wrote: Then I'd suggest checking your MySQL and Apache error logs to see if anything shows up there to explain the installation problem.


These are not made available by my hosting service provider.

Is there anything else to be done? I'm thinking about changing my provider since they restrict too many things already and software versions are too old.
rcorrear
 
Posts: 2
Joined: Mon Nov 05, 2007 5:37 pm

Re: Instalation problem - Database connection failed

Postby asmecher » Wed Nov 07, 2007 2:22 pm

Hi rcorrear,

I'm not sure what else to recommend -- I've only encountered this message when dealing with an incorrect username, password, or hostname, i.e. the grants in the database don't correspond to the access information that OJS is using. You might try temporarily adding some debugging output to the mysql_connect function call so that you're doubly sure that the connect attempt is using the correct database login information.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9207
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest