CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • sql Error?
Pages: [1]

Author Topic: sql Error?  (Read 9106 times)

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
sql Error?
May 08, 2007, 11:03:55 am
What does the following success/error message mean?

Quote
Install Successful

CiviCRM has been successfully installed.
Installation: Succesful
Cannot open /path/to/adminsection/administrator/components/com_civicrm/civicrm/sql/civicrm_41.mysql: DB Error: extension not found

System:
Joomla 1.0.12
mySQL 5.0.27
php 5.2.1

php is running with mysqli rather than mysql extension - is that the problem?
« Last Edit: May 11, 2007, 06:17:26 am by FatherShawn »
Lead Developer, C3 Design.
Twitter: @FatherShawn

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: sql Error?
May 08, 2007, 11:29:30 am

most likely that is the issue.

Can u ensure that your DSN all start with mysqli rather than mysql. You might want to take a look at configure.php and hack that to make it work with mysqli (and let us know what u hacked)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: sql Error?
May 08, 2007, 03:05:01 pm
First of all, this is our server, so if something needs to be adjusted, that can be done.

I don't know what DSN stands for. 

Both Joomla and phpMyAdmin are interfacing just fine with mySQL on this server.
Lead Developer, C3 Design.
Twitter: @FatherShawn

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: sql Error?
May 08, 2007, 04:28:25 pm

DSN == database string that allows us to access your db

I'm not sure why u r getting that error so cant be too helpful. If you know a php developer, they might be able to help out.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: sql Error?
May 10, 2007, 11:37:25 am
Well, I have to admit I'm more than a little frustrated :(
I did a grep of com_civicrm for mysqli and got a bunch of hits - which leads me to think that the scripts are supposed to pull which mysql extension

In another thread, before installation, another member wrote
Quote from: Michał Mach on April 25, 2007, 07:13:22 am
4. CiviCRM has a great community of users and developers and excellent support on the forum.  :o  ;)  ;D

Now I don't expect you, Don, to supply answers that you don't have so I sent my question to the listserv and was told the question belonged here. 


This is a big project with a lot of code.  I'd rather not have to learn what someone in the community already knows just to get it installed.

Does anyone know:
- Can I increase the verbosity of error messages from civiCRM to find the error?
- Can anyone suggest a place to start to debug?
Lead Developer, C3 Design.
Twitter: @FatherShawn

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: sql Error?
May 10, 2007, 03:57:20 pm
Sorry about your frustration. The problem is that we do not use, and don't have experience with the PHP mysqli extension which I believe you are running. The error you're getting indicates that our database connection library (PEAR) is not able to connect to your instance of MySQL to load civicrm_41.mysql. This is the script which actually creates all the CiviCRM tables in our Joomla DB.

A few things you might try...

1. If you want to try and make things work with the PHP mysqli extension - you can post the related settings here and that my give us some ideas as to what's wrong. From the civicrm.settings.php file in administrator/components/com_civicrm - copy and paste these two settings after obscuring the passwords:
CIVICRM_UF_DSN (this tells CiviCRM how to connect to the Joomla DB)
CIVICRM_DSN (this tells CiviCRM how to connect to the DB that contains it's own tables - it should be the same as CIVICRM_UF_DSN for Joomla installs)

My settings look like this (user and pw changed):
define( 'CIVICRM_UF_DSN'     , 'mysql://dbuser:pw@localhost/joomla_1?new_link=true' );
define( 'CIVICRM_DSN'          , 'mysql://dbuser:pw@localhost/joomla_1?new_link=true' );

A wild guess is that you might need to change 'mysql://...' to 'mysqli://...' in these settings.

In any case, I would guess that the loading of the data structure failed - so you could try loading the two mysql scripts manually into (a backup copy of...) your Joomla DB via phpMyAdmin:
civicrm/sql/civicrm_41.mysql
civicrm/sql/civicrm_generated.mysql

If none of this works - hopefully others here have experience w/ mysqli and can chime in - and Googling on mysqli and your error could be useful.
Protect your investment in CiviCRM by  becoming a Member!

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: sql Error?
May 10, 2007, 06:17:58 pm
Thank you.  That is a very helpful response!

As you are probably aware, the mysql extension doesn't allow php to use the advanced features of mySQL 4.1 and above. (Reference http://us.php.net/mysqli)  When I was building php I  thought I remembered that CiviMail required php 5.x and mySQL 5.x so I configured php with mysqli instead of mysql.

Since your software won't work with the mysqli and Joomla isn't crazy about it, I rebuilt php to use mysql extension and changed the database.php driver in Joomla.  CiviCRM installed without a hitch.
« Last Edit: May 11, 2007, 06:19:12 am by FatherShawn »
Lead Developer, C3 Design.
Twitter: @FatherShawn

mini_mei

  • Guest
Re: sql Error?
May 11, 2007, 07:26:20 am
I'm posting in here since I had a similar error....but I'm having the feeling I know the answer already  :(
but just to see if it could be something else (hope dies last, as the saying goes) I'll post it here:

Install Successful

CiviCRM has been successfully installed.
Installation: Succesful
Cannot execute -- * -- * -- * -- * CREATE TABLE civicrm_country ( id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Country Id', name varchar(64) COMMENT 'Country Name', iso_code char(2) COMMENT 'ISO Code', country_code varchar(4) COMMENT 'National prefix to be used when dialing TO this country.', idd_prefix varchar(4) COMMENT 'International direct dialing prefix from within the country TO another country', ndd_prefix varchar(4) COMMENT 'Access prefix to call within a country to a different area' , PRIMARY KEY ( id ) , UNIQUE INDEX UI_name_iso_code( name , iso_code ) ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci: DB Error: syntax error

The Server where my database is on has an older version of MySQL: 3.23.58-max-nt
and since i already read in here that civicrm needs at least MySQL 4.1   I guess that's what my problem is
can I manually insert the table, would civicrm work if I did ?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: sql Error?
May 11, 2007, 09:59:23 am
I'm pretty sure that CiviCRM won't run on MySQL 3.x. Note that the 3.x version is definitely no longer supported by MySQL.
Protect your investment in CiviCRM by  becoming a Member!

mini_mei

  • Guest
Re: sql Error?
May 18, 2007, 06:15:59 am
Thank you!
I transfered the page to another server as far as I an tell (just started to play around with the settings) it works fine now.

Phleum

  • Guest
Re: sql Error?
June 05, 2007, 06:24:19 pm
I have exactly the same error occuring as FatherShawn had to begin with:

Quote
Install Successful

CiviCRM has been successfully installed.
Installation: Succesful
Cannot open /path/to/adminsection/administrator/components/com_civicrm/civicrm/sql/civicrm_41.mysql: DB Error: extension not found

I don't really understand the mysqli thing, nor know how I can see if my host uses it; however, from the little I've read, it sounds like it is used by PHP 5, and my configuration is

System:
Joomla 1.0.12
mySQL 5.0.41-log
php 4.4.7

Update: I just changed the handler in my .htaccess file to use the PHP5 intepreter (PHP 5.2.2)and tried the PHP5 version in CiviCRM. It didn't seem to make a difference.

I'm at a loss. Any help? And if I can't fix it to install the tables, can I manually enter a query to do it in the MySQL admin space?

Thanks!

« Last Edit: June 05, 2007, 07:00:21 pm by Phleum »

Phleum

  • Guest
Re: sql Error?
June 05, 2007, 07:22:15 pm
Quote from: Dave Greenberg on May 10, 2007, 03:57:20 pm
In any case, I would guess that the loading of the data structure failed - so you could try loading the two mysql scripts manually into (a backup copy of...) your Joomla DB via phpMyAdmin:
civicrm/sql/civicrm_41.mysql
civicrm/sql/civicrm_generated.mysql

Well, I tried this and it created and updated the tables. Without doing any of the other things in that post I still get the same errors when trying to use CiviCRM:

Quote
Warning: include_once(civicrm.settings.php) [function.include-once]: failed to open stream: No such file or directory in /home/*****/www/www/administrator/components/com_civicrm/admin.civicrm.php on line 7

Warning: include_once() [function.include]: Failed opening 'civicrm.settings.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/*****/www/www/administrator/components/com_civicrm/admin.civicrm.php on line 7

Warning: require_once(CRM/Core/Config.php) [function.require-once]: failed to open stream: No such file or directory in /home/*****/www/www/administrator/components/com_civicrm/admin.civicrm.php on line 11

Fatal error: require_once() [function.require]: Failed opening required 'CRM/Core/Config.php' (include_path='.:/usr/local/php5/lib/php') in /home/*****/www/www/administrator/components/com_civicrm/admin.civicrm.php on line 11

And the same message when I uninstall and reinstall it. Now I have lots of tables with no apparent way to connect them. It must be a simple link at this point. No?

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: sql Error?
August 07, 2007, 05:18:46 pm
If you are still stuck, it sounds like Don fixed mysqli in version 1.8.
Lead Developer, C3 Design.
Twitter: @FatherShawn

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • sql Error?

This forum was archived on 2017-11-26.