[PHP] PHP4 and Apache DBM authentication
I'm running apache 1.3.14+Ben-SSL/1.42 and php-4.0.4pl1 on a RedHat 6.1 linux box. I'm in trouble trying to authenticate users via mod_auth_dbm. Which DBA format should I use to generate user databases? I've tried with: 1) dba and gdbm format 2) dba and ndbm format 3) dba and db2 format I always read: ... [error] [client 192.168.0.11] (22)Invalid argument: could not open dbm auth file: /www/auth/passwd_db in apache logs. I've also tried with older deprecated dbm functions but the result is still the same. I guess the problem is that apache uses the "dbm" format. I've tried to build php whith the option: --with-dbm but I always get this error: configure: error: cannot find necessary header file(s) What shoul'd I do to compile this "dmb" support into php4 ? I've always thought that "dbm" was provided by "gdbm" but ... --- Gabriele Carioli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] does preg_replace_callback with class methods?
I was using preg_replace with the '/F' parameter, and it was working perfectly till v4.0.4pl1. Now it has been substituted by preg_replace_callback. Does it work with a class method as a callback function? If it does, how should it be written? I'm asking this because in each of these cases: - preg_replace_callback(/{([A-Z_][A-Z0-9_]*)}/i', $this->callmeback, $text); - preg_replace_callback(/{([A-Z_][A-Z0-9_]*)}/i', "\$this->callmeback", $text); - preg_replace_callback(/{([A-Z_][A-Z0-9_]*)}/i', '$this->callmeback', $text); I get a warning: preg_replace_callback() requires argument 2, [...], to be a valid callback More: there is another drawback. With preg_replace + '/F' parameter I could also specify additional parameters in the command line. Now I can't. Was it really necessary to change it this way? --- Gabriele Carioli Management Innovative Tools S.p.A. Piazza Falcone Borsellino n. 23 47100 Forlì (FC) - ITALY (EU) tel. 0039.0543.412941 fax. 0039.0543.412929 http://www.mit.it/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] dbm support broken? Please help!
I'm trying to build php 4.0.4pl1 with dbm support on my RedHat Linux 6.2 box. I need it to be able to work with apache 1.3.14 mod_auth_dbm. Each time I run: ./configure \ --with-zlib=shared \ --with-xml=shared \ --with-gd=shared \ --with-interbase=shared \ --with-db \ --enable-dba=shared \ --with-dbm \ --with-gdbm \ --with-ndbm \ --with-db2 \ --with-imap=shared \ --with-openssl=/usr \ --with-config-file-path=/etc/httpd/conf \ --enable-versioning \ --with-apxs=/usr/sbin/apxs \ --enable-memory-limit \ --enable-trans-sid \ --enable-sysvsem \ --enable-sysvshm \ --enable-gd-imgstrttf \ --enable-track-vars I get the following error: configure: error: cannot find necessary header file(s) If I remove the line "--with-dbm" everything works fine. What should I do or what should I need to build dbm support into php? I need "dbm", since looks like other formats are not compatible with mod_auth_dbm (and ... Yes, dbmmanage works fine). Thanks P.S. I've also tried with php-4.0.5RC1 but the result was still the same. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]