Newsgroup: it.comp.www.php
Titolo: dbm

Non ho installato mysql o altro database, ho solo php4.
Cerco di creare e aprire un semplice database DBM (che dovrebbe poter essere
creato e gestito solo da php4) con questo script:
<?php
$dbh= dbmopen("./caio/toni","c");
?>
Non si crea niente e apache mi si visualizza il messaggio :   Fatal error:
Call to undefined function: dbmopen() in c:\apache\apache\htdocs\new\db.php
on line 5
Dove sbaglio??
Grazie mille

 ha scritto nel messaggio
news:9se4nt$5to$1...@pegasus.tiscalinet.it...

Forse le funzioni DBM non sono supportate da PHP su quel server... ci vuole
la libreria...
bisogna ricompilare php con il supporto dbm
Alex

Cerca il file php.ini.
Edita il file.
Se hai Windows, trova la riga in cui c'è scritto "extension_dir" e
sostituisci "./extensions" con:
c:/TuaDirectoryPhp/extensions
Ovviamente TuaDirectoryPhp è il nome della directory in cui è installato il
php, nel mio caso php4.
Con sistemi Unix non servono modifiche a questa riga.
Dopo cerca la riga in cui c'è scritto per ";extension=php_db.dll" nei
sistemi Windows, oppure ";extension=db.so" o ";extension=db.so" nei sistemi
Unix, e togli il ";" iniziale.
Salva il tutto è fai ripartire il server.
Ciao, Luca

Ho fatto come hai detto ma il messaggio d'errore è sempre lo stesso!
Qui di seguito ti mando la parte di php.ini interessata ai cambiamenti
effettuati.
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
; The root of the PHP pages, used only if nonempty.
doc_root =
; The directory under which PHP opens the script using /~usernamem used only
; if nonempty.
user_dir =
; Directory in which the loadable extensions (modules) reside.
extension_dir = c:/php4/extensions
; Whether or not to enable the dl() function.  The dl() function does NOT
work
; properly in multithreaded servers, such as IIS or Zeus, and is
automatically
; disabled on them.
enable_dl = On
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if
not
; specified).
;upload_tmp_dir =
; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On
; Define the anonymous ftp password (your email address)
;from="
jo...@doe.com
"
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automaticly, use the following
; syntax:
;
;   extension=modulename.extension
;
; For example, on Windows:
;
;   extension=msql.dll
;
; ... or under UNIX:
;
;   extension=msql.so
;
; Note that it should be the name of the module only; no directory
information
; needs to go here.  Specify the location of the extension with the
; extension_dir directive above.
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for
it.
;
;extension=php_bz2.dll
;extension=php_ctype.dll
;extension=php_cpdf.dll
;extension=php_curl.dll
;extension=php_cybercash.dll
 extension=php_db.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_domxml.dll
;extension=php_dotnet.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
;extension=php_gd.dll
;extension=php_gettext.dll
;extension=php_hyperwave.dll
;extension=php_iconv.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_imap.dll
;extension=php_ingres.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_printer.dll
;extension=php_sablot.dll
;extension=php_snmp.dll
;extension=php_sybase_ct.dll
;extension=php_yaz.dll
;extension=php_zlib.dll
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[Syslog]
; Whether or not to define the various syslog variables (e.g. $LOG_PID,
; $LOG_CRON, etc.).  Turning it off is a good idea performance-wise.  In
; runtime, you can define these variables by calling
define_syslog_variables().
define_syslog_variables  = Off
[mail function]
; For Win32 only.
SMTP = localhost
; For Win32 only.
sendmail_from = 
m...@localhost.com
; For Unix only.  You may supply arguments as well (default:
'sendmail -t -i').
;sendmail_path =
[Logging]
; These configuration directives are used by the example logging mechanism.
; See examples/README.logging for more explanation.
;logging.method = db
;logging.directory = /path/to/log/directory
[Java]
;java.class.path = .\php_java.jar
;java.home = c:\jdk
;java.library = c:\jdk\jre\bin\hotspot\jvm.dll
;java.library.path = .\
[SQL]
sql.safe_mode = Off
[ODBC]
;odbc.default_db    =  Not yet implemented
;odbc.default_user  =  Not yet implemented
;odbc.default_pw    =  Not yet implemented
; Allow or prevent persistent links.
odbc.allow_persistent = On
; Check that a connection is still valid before reuse.
odbc.check_persistent = On
; Maximum number of persistent links.  -1 means no limit.
odbc.max_persistent = -1
; Maximum number of links (persistent + non-persistent).  -1 means no limit.
odbc.max_links = -1