Koozali.org formerly Contribs.org

Migrating web applications from SME 6.x to SME 7.x

Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #15 on: May 21, 2008, 07:46:18 AM »
I can confirm that gdbm IS installed, but it doesn't work.

I read the manual page, but I don't know what to look for. One part is interesting though: "you must compile PHP with dbm support by using the --with-db option". Hmm, I wouldn't want to do that in an SME system...

Is there any workaround for this? I feel I'm getting close...

/Salmoneus

Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #16 on: May 23, 2008, 09:47:37 AM »
Anyone? I'm sure there is a solution to this.

Offline warren

  • *
  • 272
Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #17 on: May 23, 2008, 10:27:42 AM »
I think your problem is that on 7.3,  phpinfo shows :

'--without-gdbm'


where as on sme6.0.1 :

'--with-gdbm'

Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #18 on: May 23, 2008, 10:52:00 AM »
That would explain it!

Is it possible to change it? Compile PHP with the --with-gdbm option? Would that break something else in the system?


Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #19 on: May 23, 2008, 11:09:50 AM »
Another thing: The restore of the SQL databases seem to work well, but the mysql root password is changed when I restore the databases with 'mysql < mysql.dump'.

No problem with that, except that the /root/.my.cnf file content is NOT updated, not even after 'expand-template /root/.my.cnf'. I'm not sure how this works, but isn't that file supposed to contain the mysql root password?

Another thing is that database applications that already exists stops working when the root password is changed.

Am I doing something wrong here?


Offline Jáder

  • *
  • 1,059
    • LinuxFacil
Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #20 on: May 23, 2008, 08:44:26 PM »
After some digging I have found out that one of the applications does NOT use mysql as I thought. Apparently it uses something called dba, and the dba handler is "gdbm" (according to the config file). When I move the application to an SME 7 box I get this error:

lib/DbaDatabase.php:42: Fatal[256]: dba_open(/home/e-smith/files/ibays/phpwiki/html/pages/wiki_pagedb.gdbm,c): No such handler: gdbm

Is gdbm not a part of SME 7? Can it be installed? Can the database be converted somehow?

/Salmoneus


From memory... so search to confirm: phpWiki uses PostgreSQL as database!

...

Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #21 on: May 26, 2008, 09:05:22 AM »
You CAN use mysql or postgresql, but in this case gdbm is used. Don't ask me why...

The following is a snip from the index.php file:


$DBParams = array(
   // Select the database type:
   //
   // Choose ADODB or SQL to use an SQL database with ADODB or PEAR
   // respectively (both ADODB and PEAR libraries are already included
   // with PhpWiki).
   // Choose dba to use one of the standard UNIX dbm libraries.
   // Choose file to use a flat file database.
   //'dbtype' => 'ADODB',
   //'dbtype' => 'SQL',
   'dbtype'   => 'dba',
   //'dbtype' => 'file',
   //'dbtype' => 'cvs',



   // Used by either 'dba' or 'file' and must be writable by the web
   // server If you leave this as '/tmp' you will probably lose all
   // your files eventually
   'directory'     => "/home/e-smith/files/ibays/phpwiki/html/pages",

   // choose the type of DB database file to use; most GNU systems have gdbm
   'dba_handler'   => 'gdbm',    // Either of 'gdbm' or 'db2' work great for me.
   //'dba_handler' => 'db2',
   //'dba_handler' => 'db3',    // Works fine on Windows, but not on every linux.
   //'dba_handler' => 'dbm',    // On sf.net redhat there's dbm and gdbm.
                                // dbm suffers from limits on size of data items?

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #22 on: May 26, 2008, 07:26:37 PM »
Another thing: The restore of the SQL databases seem to work well, but the mysql root password is changed when I restore the databases with 'mysql < mysql.dump'.
Have a look at the FAQ in the wiki, there is a MySQL section that shows you how to reset the MySQL root password.

BTW One remark, you should only use the root account for administration and never configure applications to use it, you should configur a new user with the proper privileges for it, which should also be in the mentioned section of the FAQ.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #23 on: May 26, 2008, 07:46:23 PM »
That would explain it!

Is it possible to change it? Compile PHP with the --with-gdbm option? Would that break something else in the system?
It is deprecated AFAIK now, see my earlier supplied link. Since php is taken fom the upstream CentOS repos I do not think there is a easy way of recompiling it.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)