You can create users on Firebird/Interbase this way:
<?php
// attach to the server with proper privileges
if (($service = ibase_service_attach('localhost', 'sysdba', 'masterkey')) != FALSE) {
// get server version and implementation strings
$server_info = ibase_server_info($service, IBASE_SVC_SERVER_VERSION)
. ' / '
. ibase_server_info($service, IBASE_SVC_IMPLEMENTATION);
//ibase_service_detach($service);
}
else {
$ib_error = ibase_errmsg();
}
echo $server_info;
//add a new user with name 'pippo' and password 'pp'
if (($result = ibase_add_user($service, 'pippo', 'pp')) != FALSE) {
echo 'User created';
ibase_service_detach($service);
}
else {
$ib_error = ibase_errmsg();
//detach from server
ibase_service_detach($service);
}
?>
ibase_add_user
(PHP 5)
ibase_add_user — Añade un usuario a una base de datos segura
Descripción
bool ibase_add_user
( resource
$service_handle
, string $user_name
, string $password
[, string $first_name
[, string $middle_name
[, string $last_name
]]] )Advertencia
Esta función no está documentada actualmente, solamente se encuentra disponible la lista de parámetros.
Valores devueltos
Devuelve TRUE en caso de éxito o FALSE en caso de error.
Ver también
- ibase_modify_user() - Modifica un usuario en una base de datos segura
- ibase_delete_user() - Elimina un usuario de una base de datos segura
pabloj ¶
7 years ago
