Subject Re: [firebird-php] How make a back up from php?
Author Lester Caine
Oscar Darío Perdiguero wrote:
> Lester Caine escribió:
>> Oscar Darío Perdiguero wrote:
>>> Hi. My name is Darío and I'm needing some help to put to work the
>>> following code
>>> Please help me and forgive me my english.
>>> function BackUp()
>>> {
>>> $host = "whitegandalf";
>>> $username = "SYSDBA";
>>> $password = "masterkey";
>>> $charset = "NONE";
>>> $base = "C:\SysAdmin\Sistemas\Repositorio SA\Herramientas
>>> SA\InfoTester\Datos\DBClientServer\DBINFOTESTER.GDB";
>>> $resource_service_handle = ibase_service_attach ($host,
>>> $username, $password);
>>> if ($resource_service_handle)
>>> {
>>> ibase_backup($resource_service_handle, $base,
>>> 'C:\SysAdmin\Sistemas\Repositorio SA\Herramientas
>>> SA\InfoTester\Datos\DBClientServer\Respaldo\DBINFOTESTER.GDB');
>>> ibase_service_detach ($resource_service_handle);
>>> }
>>> }
>>> but I'm having this error.
>>> Warning: ibase_backup() [function.ibase-backup]: unassigned code in
>>> C:\Documents and Settings\SysAdmin\Mis documentos\Delphi for PHP
>>> Projects\firebirdbackup.php on line 23
>> I have to admit to not using the ibase_service interface from PHP.
>> Backup is normally run automatically in the background.
>> It would be useful to know which line is '23' but a number of things
>> spring to mind.
>> On windows it's preferred to use .FDB as the file extension because M$
>> identifies .GDB as one of the file types it likes to automatically back
>> up - which can be switched off, but may actually be worth leaving alone
>> since it does help with other windows problems. Not going to affect your
>> problem here though.
>> I presume that the 'destination' in ibase_backup is a missprint? You
>> need the destination to be a different file such as .FBK extension ...
>> Which versions of PHP, Firebird ( and CS or SS ) and since you would
>> seem to be using Delphi for PHP - what is actually creating the message?
>> I've only had a short play with that, but I seem to remember it does
>> code checking so the 'warning' may be about '$charset = "NONE";' not
>> actually being used in the code ... It IS only a warning, so have you
>> run the code?

> Hi Lester.
> Thanks you by your answer and sorry by delay in my reply. I was trying
> to write in english.
> Reading your reply I have three things to say
> 1) How can I enable the automatic backups in a firebird server?
On windows I use a package called FIBS
but later versions of Firebird include NBackup intenally

> 2) there isn't a missprinting in the name of the back up. If you see at
> that line, you'll see that the path for the source is diferent than the
> one for the back up.
Use a different extension for the backup !
All to easy to pick up the wrong file .

> 3) Yes I'm using D4PHP but I'm coding, not using the VCL components and
> 4) Line 23 is the line where I try to execute a backup
I'm still not sure that the error is actually from PHP - how are you 'running'
the php stuff.
I did not find D4PHP particularly helpful as an editor, and if that is all you
are using it for, then there are other options

> 5) Can I write in spanish in this forum? and to you?
Sorry ... I have enough trouble just with English ;)

> 6) I'm using PHP 5.2.3 and FB 1.5
5.2.3 has a few problems with the php_interbase driver, you really need 5.2.6
or later. 5.2.10 is available from

> Any other idea?
> thank you and sorry by my english again.

Helen - Is there a Spanish Firebird list?

From google - so I don't know the accuracy
De Google - así que no sé la precisión
> 1) ¿Cómo puedo permitir que la copias de seguridad automáticas en un
servidor firebird?
En las ventanas utilizar un paquete llamado FIBS
pero las versiones posteriores de Firebird incluyen NBackup intenally

> 2) no existe una missprinting en nombre de la copia de seguridad. Si usted
ve en
> Esa línea, verás que el camino de la fuente es distinta a la
> Una para la copia de seguridad.
Utilice una extensión diferente para la copia de seguridad!
Fácil a todos a recoger el archivo equivocado.

> 3) Si estoy usando D4PHP pero estoy de codificación, no utilice los
componentes y la VCL
> 4) La línea 23 es la línea donde intenta ejecutar una copia de seguridad
Todavía no estoy seguro de que el error es de PHP - ¿cómo está usted "ejecuta"
las cosas php.
No encontré D4PHP particularmente útiles como un editor, y si eso es todo lo
que la están utilizando para, a continuación, existen otras opciones

> 5) ¿Puedo escribir en español en este foro? y para usted?
Lo siento ... Tengo suficientes problemas con sólo Inglés;)

> 6) estoy usando PHP 5.2.3 y FB 1,5
5.2.3 tiene algunos problemas con el php_interbase conductor, que realmente
necesita 5.2.6 o posterior. 5.2.10 está disponible desde
> swap

Lester Caine - G8HFL
Contact -
L.S.Caine Electronic Services -
EnquirySolve -
Model Engineers Digital Workshop -
Firebird -