|
From: Joe Z. <jz...@co...> - 2004-04-28 06:36:28
|
SourceForge.net wrote: >hi there.....i am trying to use the new version of bobs, primarilly with nfs, >and i have this messages in the browse current link: > >Could not create a database of type db3 or db4 (tried both) >Warning: no such handler: in /var/www/html/bobs/inc/class_db.php on line 79 > >Warning: Unable to find DBA identifier 0 in /var/www/html/bobs/inc/class_db.php >on line 308 >No files were found in > >the backup process appears to be ok, i tried it with a few files, but in the >checking i have some messages about problems in write files, and i changed permission >and nothing happens... >can you help? thanks! > >Rodrigo >ro...@po... > > The problem is in /var/www/html/bobs/inc/class_db.php: 43 // check what dba type we should use 44 $tmpfile = tempnam("/tmp", "BOBS"); 45 $dbcheck = @dba_open($tmpfile, "c", "db3"); 46 if ( $dbcheck === FALSE ) { 47 $dbcheck = @dba_open($tmpfile, "c", "db4"); 48 if ( $dbcheck === FALSE ) { On my redhat 9 system, for some strange reason when this is run as user apache it fails to open the database. The temp file is created with 0 bytes. If I run it as myself or root it works fine. If I remove the '@' from @dba_open I see these errors when I "Browse Current": ------ Warning: driver initialization failed in /var/www/html/bobs/inc/class_db.php on line 45 Warning: no such handler: db4 in /var/www/html/bobs/inc/class_db.php on line 47 Could not create a database of type db3 or db4 (tried both) Warning: no such handler: in /var/www/html/bobs/inc/class_db.php on line 79 Warning: Unable to find DBA identifier 0 in /var/www/html/bobs/inc/class_db.php on line 308 No files were found in ------ Database creation during backups work because they are run by root from /etc/cron.daily/backup.php. I'll bet this only occurs on some systems/configurations. I even created a directory /var/www/tmp and made apache the owner/group and it still failed, do I don't think it's a permissions problem. Aha! I found the answer here: http://us4.php.net/manual/en/function.dba-open.php Note: Up to PHP 4.3.5 open mode 'c' is broken for several internal handlers and truncates the database instead of appending data to an existant database. Also dbm and ndbm fail on mode 'c' in typical configurations (this cannot be fixed). I have php-4.2.2-17.2 so mode "c" is broken. If I change the mode to "n" it work fine! I'll commit these changes later. Joe |
|
From: Arnaud C. <arn...@ar...> - 2004-04-28 08:39:17
|
you're right.... everything works fine now there's still the problem of the incremental backups.... although i have set up my backups with 1 incremental file to keep, the system keeps on backuping a new file everyday... ( i backup a server that stores about 60 .PST Outlook files, with an average size of 200 MB....) Hope a nice solution will be chosen soon ! Keep up the good work Au revoir. Arnaud. Joe Zacky a écrit : > SourceForge.net wrote: > >> hi there.....i am trying to use the new version of bobs, primarilly >> with nfs, >> and i have this messages in the browse current link: >> >> Could not create a database of type db3 or db4 (tried both) >> Warning: no such handler: in /var/www/html/bobs/inc/class_db.php on >> line 79 >> >> Warning: Unable to find DBA identifier 0 in >> /var/www/html/bobs/inc/class_db.php >> on line 308 >> No files were found in >> >> the backup process appears to be ok, i tried it with a few files, but >> in the >> checking i have some messages about problems in write files, and i >> changed permission >> and nothing happens... >> can you help? thanks! >> >> Rodrigo ro...@po... >> >> > The problem is in /var/www/html/bobs/inc/class_db.php: > > 43 // check what dba type we should use > 44 $tmpfile = tempnam("/tmp", "BOBS"); > 45 $dbcheck = @dba_open($tmpfile, "c", "db3"); > 46 if ( $dbcheck === FALSE ) { > 47 $dbcheck = @dba_open($tmpfile, "c", "db4"); > 48 if ( $dbcheck === FALSE ) { > > On my redhat 9 system, for some strange reason when this is run as > user apache it fails to open the database. The temp file is created > with 0 bytes. If I run it as myself or root it works fine. > > If I remove the '@' from @dba_open I see these errors when I "Browse > Current": > ------ > Warning: driver initialization failed in > /var/www/html/bobs/inc/class_db.php on line 45 > > Warning: no such handler: db4 in /var/www/html/bobs/inc/class_db.php > on line 47 > Could not create a database of type db3 or db4 (tried both) > Warning: no such handler: in /var/www/html/bobs/inc/class_db.php on > line 79 > > Warning: Unable to find DBA identifier 0 in > /var/www/html/bobs/inc/class_db.php on line 308 > No files were found in > ------ > > Database creation during backups work because they are run by root > from /etc/cron.daily/backup.php. > > I'll bet this only occurs on some systems/configurations. > > I even created a directory /var/www/tmp and made apache the > owner/group and it still failed, do I don't think it's a permissions > problem. > > Aha! I found the answer here: > http://us4.php.net/manual/en/function.dba-open.php > > Note: Up to PHP 4.3.5 open mode 'c' is broken for several internal > handlers and truncates the database instead of appending data to an > existant database. Also dbm and ndbm fail on mode 'c' in typical > configurations (this cannot be fixed). > > I have php-4.2.2-17.2 so mode "c" is broken. If I change the mode to > "n" it work fine! I'll commit these changes later. > > Joe > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle > 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Bobs-devel mailing list > Bob...@li... > https://lists.sourceforge.net/lists/listinfo/bobs-devel |
|
From: Joe Z. <joe...@za...> - 2004-04-28 20:32:12
|
Arnaud CONCHON wrote:
> there's still the problem of the incremental backups....
> although i have set up my backups with 1 incremental file to keep, the
> system keeps on backuping a new file everyday... ( i backup a server
> that stores about 60 .PST Outlook files, with an average size of 200
> MB....)
>
> Hope a nice solution will be chosen soon !
> Keep up the good work
>
> Au revoir.
> Arnaud.
The incremental backup cleanup is not yet implemented. I'm working on
that now. In the meantime you can use 'find' to manually remove the old
files. This command will remove incremental files over 30 days old:
find /var/bobsdata/incremental/your_server/your_share/ -ctime +30 -ctime
-999 -exec rm -v {} ';'
Joe
|