[PHP-DEV] PHP 4.0 Bug #8545 Updated: Session variables not carried forward in Netscape Client
ID: 8545 User Update by: [EMAIL PROTECTED] Old-Status: Feedback Status: Open Bug Type: *Session related Description: Session variables not carried forward in Netscape Client hi, observation is same even with the latest one. rgds Bhaskar Previous Comments: --- [2001-02-27 18:17:25] [EMAIL PROTECTED] Does this happen with latest CVS snapshot from http://snaps.php.net/ ?? --Jani --- [2001-01-16 08:03:21] [EMAIL PROTECTED] Hi, an update on this. This problem is observed if the server type in apache web server is INETD. If we run apache as standalone it works fine. can u check this and revert why sessions are not working in netscape if apache runs as inetd. rgds Bhaskar --- [2001-01-10 06:59:28] [EMAIL PROTECTED] can i have the design team views asap. thanks in advance Bhaskar --- [2001-01-08 04:42:01] [EMAIL PROTECTED] I am attaching the script of two files first.php and second.php which can be used to reproduce this. beginning of first.php- ? session_start(); session_register(test); $test="firstpage"; ? html head titlePhp Bug reporting page/title/head body a href="second.php"Click here to goto next page/a/table /body /html -end of first.php--- ---beginning of second.php--- ? session_start(); echo $test; session_unset();? htmlhead titlePhp Bug reporting page/title/head body a href="first.php"Click here to goto first page/a/table /body /html --end of second.php- On clicking the hyperlink of the first page, i should see the value of variable test and an hyperlink. this comes in Ie and not in netscape. hope this will help u in finding the problem i am having. rgds Bhaskar --- [2001-01-08 03:37:44] [EMAIL PROTECTED] I am attaching the script of two files first.php and second.php which can be used to reproduce this. beginning of first.php- ? session_start(); session_register(test); $test="firstpage"; ? html head titlePhp Bug reporting page/title/head body a href="second.php"Click here to goto next page/a/table /body /html -end of first.php--- ---beginning of second.php--- ? session_start(); echo $test; session_unset();? htmlhead titlePhp Bug reporting page/title/head body a href="first.php"Click here to goto first page/a/table /body /html --end of second.php- On clicking the hyperlink of the first page, i should see the value of variable test and an hyperlink. this comes in Ie and not in netscape. hope this will help u in finding the problem i am having. rgds Bhaskar --- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. Full Bug description available at: http://bugs.php.net/?id=8545 -- PHP Development 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]
RE: [PHP-DEV] SLEEP and MAXEXECUTIONTIME and NAUGHTY modules
-Original Message- From: Andi Gutmans [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 08:03 To: Sam Liddicott; [EMAIL PROTECTED] Subject: Re: [PHP-DEV] SLEEP and MAXEXECUTIONTIME and NAUGHTY modules At 12:11 PM 2/26/2001 +, Sam Liddicott wrote: I notice that usleep and sleep both clash on solaris with Max-execution-time. 1) I notice various modules using sleep: db, hyperwave, mysql, oci8, satellite which seems to break max execution time. Any idea why and where they are using sleep()? Further investigation seems to reveal that use of alarm in OCI8 (oracle supplied libs actually) on solaris combined with lwp_alarm and oracle threading issue are breaking max execution time. However to answer the question: db: db.c in php_dbm_open() for an NFS locking loop: if (lock) { ... #if NFS_HACK ... php_sleep(1) hyperwave: hg_comm.c in hg_read()/hg_write(), php_sleep used with non-blocking socket to allow up to 5 seconds to try and read. IMHO they should either block or return what bytes are available and let the user deal with it. 5 seconds is pretty arbitrary. With mysql one use is a BSD threading broken select hack so I guess its no issue for now. The other mysql use is in my_write.c function my_write and is used to allow a full file system to empty somewhat so the write can succeed. oci8: oci8.c calls php_sleep(3) in oci_failover_callback() satellite was a read herring. standard: uniqid.c in PHPFUNCTION(uniqid) uses usleep(1) to wait for more entropy, usleep also uses sigalarm and may break other alarms on some systems. It appears that all these uses of sleep could be replaced by the #define sleep with the select function below 2) Could we not use: #include unistd.h #define sleep(n) \ { struct timeval tv; \ tv.tv_sec=n; \ tv.tv_usec=0; \ select(0,NULL,NULL,NULL,tv); \ } Where did you see that? I just made it up; left over from my perl days where select(undef,undef,undef,$msecs); was traditionally used for small sleeps. It compiles into PHP fine that way on solaris, but #include unistd.h is needed early because it (on Solaris) declares sleep and sleep being #defined first breaks the declaration. I'm not entirely happy with it, and other uses of ALARM will break max execution time anyway... Maybe the above should be PHP_SLEEP which I note some modules use, then we can persuade developers to use PHP_SLEEP instead. Not ot mention, I put it into main/php_config.h (after running configure) but I'm not sure if this is included by all units which use sleep. Hmmm... What do you think? Sam -- PHP Development 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]
RE: [PHP-DEV] Bugs #9040, #9013, #8992, #8962, #8732, #8466
It works fine for me now. [EMAIL PROTECTED] (submitter of bug #8992) reports that the problem is solved for him too. Maybe those bugs reports can be closed now. Edin - Original Message - From: "Stanislav Malyshev" [EMAIL PROTECTED] To: "Edin Kadribasic" [EMAIL PROTECTED] Cc: "php-dev mailinglist" [EMAIL PROTECTED]; "Andi Gutmans" [EMAIL PROTECTED] Sent: Thursday, February 22, 2001 11:26 AM Subject: Re: [PHP-DEV] Bugs #9040, #9013, #8992, #8962, #8732, #8466 EK All exec style functions seem to be broken somewhere in between EK versions 4.0.3pl1 and 4.0.4 when PHP is compiled as apache EK module with --enable-sigchild. EK EK The description of the bug 8992 seems to contain the solution to the EK problem. EK EK Anyone care to take a look at this. I've applied the proposed patch to CVS, please check if it is OK now. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP Development 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]
Re: [PHP-DEV] RE: [PHP-QA] Re: [PHP-DEV] ctype function (re?)naming
RC I find it annoying having to look up reference manuals for every RC function, to figure out whether or not I need to use RC underscores, and if so, where in the function name should they I repeat: if you never though of any function that detemines if the character is an alphanumeric character or not, you *HAVE* to look in the manual, since it could be is_alpha, is_alphanumeric, is_digit_or_letter, alphanumeric_charater, check_for_alphanumeric and 1001 more variants. If you *DID* hear about such function, 90% that in your previous, non-PHP life it was called isalpha. So if you make the name stay as it is, most chances are you save one manual lookup for experienced user. So, naming function "isalpha" did not make unwashed user's position worse, while made experienced user's position better. RC read (and comprehended) more easily, so the purpose of the RC function is less ambiguous. Without them, the name becomes less Please explain how presense or absense of underscore makes name more or less ambigious. I'm really lost here. RC Much of the time I already know the function names, I just don't know Huh? Tell me what function searches ldap database for a string without looking in the manual? Is it ldap_search? ldap_query? Now how do you get results? Is is ldap_get_result? ldap_fetch_result? ldap_get_row? ldap_get_value? ldap_get_values? ldap_read? More guessing? Did you already look in the manual? I bet you did. And underscores didn't help you. RC uses both mysql and postgres, and it's an ongoing hassle to not only RC switch the family name (pg/mysql), but to also switch out other names RC because of a lack of consistency, and never be quite sure what the RC right thing to do actually is. So, you propose to name GD functions image_gif instead of ImageGif and confuse all the users that were so unlucky as to have previous acquitance with GD? -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP Development 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-DEV] PHP 4.0 Bug #9494: Error in ./configure
From: [EMAIL PROTECTED] Operating system: Linux - Slackware 7.0 PHP version: 4.0.4pl1 PHP Bug Type: Apache related Bug description: Error in ./configure When doing a cross compile from php 4.0.4pl1 with apache 2.0a9 using: ./configure --with-mysql --with-apache=../apache_2.0a9 --enable-track-vars, it gives me the error: configure: error: Invalid Apache directory - unable to find httpd.h under /root/apache_2.0a9 after looking in the configure file, i saw it looks in $withval/src/include/* which is wrong since the include files are now located in $withval/include; I also noticed that source libraries changed to $withval/srclib .. or did i do something wrong? hint: i'm trying to compile an IPv6 enabled webserver with php support. (KAME patch fails since it's only *BSD realated), apache 2.x supports native IPv6 support. -- Edit Bug report at: http://bugs.php.net/?id=9494edit=1 -- PHP Development 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-DEV] PHP 4.0 Bug #7622 Updated: Servlet API. VM crashes with session_start()
ID: 7622 User Update by: [EMAIL PROTECTED] Old-Status: Feedback Status: Open Bug Type: Reproduceable crash Description: Servlet API. VM crashes with session_start() The Problem persists with 4.0.4pl1. Previous Comments: --- [2001-02-25 07:36:28] [EMAIL PROTECTED] Does the problem persist with PHP 4.0.4pl1 or the latest snapshot from http://snaps.php.net/? --- [2000-11-03 10:14:29] [EMAIL PROTECTED] Using php4.0.0 as servlet in tomcat 3.1 with SUN JDK 1.2.2 (Build 001). Whenever a session_start() is encountered, the VM crashes. html ?php session_start(); /* This kills the VM */ ? /html Win32 binaries from php.net. php.ini: [PHP] ;;; ; About this file ; ;;; ; ; This is the 'optimized', PHP 4-style version of the php.ini-dist file. ; For general information about the php.ini file, please consult the php.ini-dist ; file, included in your PHP distribution. ; ; This file is different from the php.ini-dist file in the fact that it features ; different values for several directives, in order to improve performance, while ; possibly breaking compatibility with the standard out-of-the-box behavior of ; PHP 3. Please make sure you read what's different, and modify your scripts ; accordingly, if you decide to use this file instead. ; ; - allow_call_time_pass_reference = Off ; It's not possible to decide to force a variable to be passed by reference ; when calling a function. The PHP 4 style to do this is by making the ; function require the relevant argument by reference. ; - register_globals = Off ; Global variables are no longer registered for input data (POST, GET, cookies, ; environment and other server variables). Instead of using $foo, you must use ; $HTTP_POST_VARS["foo"], $HTTP_GET_VARS["foo"], $HTTP_COOKIE_VARS["foo"], ; $HTTP_ENV_VARS["foo"] or $HTTP_SERVER_VARS["foo"], depending on which kind ; of input source you're expecting 'foo' to come from. ; - register_argc_argv = Off ; Disables registration of the somewhat redundant $argv and $argc global ; variables. ; - magic_quotes_gpc = Off ; Input data is no longer escaped with slashes so that it can be sent into ; SQL databases without further manipulation. Instead, you should use the ; function addslashes() on each input element you wish to send to a database. ; - variables_order = "GPCS" ; The environment variables are not hashed into the $HTTP_ENV_VARS[]. To access ; environment variables, you can use getenv() instead. ; Language Options ; engine = On ; Enable the PHP scripting language engine under Apache short_open_tag = On ; allow the ? tag. otherwise, only ?php and script tags are recognized. asp_tags= Off ; allow ASP-style % % tags precision = 14 ; number of significant digits displayed in floating point numbers y2k_compliance = Off ; whether to be year 2000 compliant (will cause problems with non y2k compliant browsers) output_buffering= Off ; Output buffering allows you to send header lines (including cookies) ; even after you send body content, in the price of slowing PHP's ; output layer a bit. ; You can enable output buffering by in runtime by calling the output ; buffering functions, or enable output buffering for all files ; by setting this directive to On. implicit_flush = Off ; Implicit flush tells PHP to tell the output layer to flush itself ; automatically after every output block. This is equivalent to ; calling the PHP function flush() after each and every call to print() ; or echo() and each and every HTML block. ; Turning this option on has serious performance implications, and ; is generally recommended for debugging purposes only. allow_call_time_pass_reference = Off ; whether to enable the ability to force arguments to be ; passed by reference at function-call time. This method ; is deprecated, and is likely to be
Re: [PHP-DEV] ctype function (re?)naming
RFC: what should their names be in 4.0.5? ( ) stay with ctype_alpha() ... (X) switch to ctype_isalpha() ... ( ) switch to ctype_isalpha() ... and have ctype_alpha() aliases ( ) switch to ctype_is_alpha() ... ( ) switch to ctype_is_alpha() ... and have ctype_alpha() aliases (X) have an alias if isalpha() A heated argument seems to be developing, which IMHO makes no sense when we are discussing a tiny corner of the language. Yes, function names should be consistent, however because the current namespace is such a mess it is impossibly to argue the toss on this issue because all we can do is make the function name compatible with one (or more) of a range of inconsistent 'standards' throughout the language. It HAS to be time for a big tidy up, as it is clearly impossible to 'do the right thing' under current circumstances. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP Development 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]
Re: [PHP-DEV] ctype function (re?)naming
Oops (X) have an alias if isalpha() should have read (X) have an alias of isalpha() and it is impossibly to argue should have read it is impossible to argue I appear to have lost my grip on the English language this morning, so who am I to comment on the PHP language :) -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP Development 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-DEV] PHP 4.0 Bug #9496: Mixing non persistant and persistant connection makes all connexions persistant
From: [EMAIL PROTECTED] Operating system: linux red hat 6.2 PHP version: 4.0.4pl1 PHP Bug Type: OCI8 related Bug description: Mixing non persistant and persistant connection makes all connexions persistant With the following test (test_oci8.php) both connexions (USER_1 and USER_2) are persistant. Notes : 1. We can see that connexions are persistant with the following SQL command : select username, status, logon_time from v$session where username='USER_1' or username='USER_2'; 2. We can use the following workaround : use a different database name for USER_1 and USER_2 (who acces the same real database). 3. If we invert the order of connexions (USER_2 before USER_1) and use OCInlogon for USER_1, only USER_2 has persistant connexions but the number of connexions of USER_2 increase until to reach the maximum limit (ORA-00604 error). --- test_oci8.php --- html titleOCI8 bug test/title /head body % $user = "USER_1"; $password = "pwd1"; $database = "TEST"; { // should be non persistent $connexion = OCIlogon ( $user, $password, $database); if (!$connexion) { trigger_error ( "Erreur OCIlogon $user / $database", E_USER_ERROR); } else { echo "pConnexion 1 OK"; } OCIlogoff ($connexion); } { $user = "USER_2"; $password = "pwd2"; $database = "TEST"; // If we use a different databasename (for the same real database) we don't have the problem // $database = "TEST2"; $connexion = OCIplogon ( $user, $password, $database); if (!$connexion) { trigger_error ( "Erreur OCIplogon $user / $database", E_USER_ERROR); } else { echo "pConnexion 2 OK"; } OCIlogoff ($connexion); } % /body /html --- -- Edit Bug report at: http://bugs.php.net/?id=9496edit=1 -- PHP Development 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-DEV] PHP 4.0 Bug #9497: closed mysql connection after calling a function that uses another mysql conn.
From: [EMAIL PROTECTED] Operating system: SuSE Linux 7.0 PHP version: 4.0.4 PHP Bug Type: MySQL related Bug description: closed mysql connection after calling a function that uses another mysql conn. in file functions.inc: function func1($blabla) { $conn = mysql_connect ("host","user","pass"); mysql_select_db("db",$conn); $resset=mysql_query("SELECT a,b,c FROM ATable",$conn); mysql_close($conn); } --- file index.php: include ("functions.inc"); $conn_main = mysql_connect ("host","user","pass"); mysql_select_db("db",$conn_main); $resset=mysql_query("SELECT a,b,c FROM ATable",$conn_main); -- this statement works and returns a result func1($abc); -- call defined function $resset=mysql_query("SELECT a,b,c FROM ATable",$conn_main); -- after calling the above defined function i get an error: warning: 1 is not a valid mysql link resource mysql_close($conn_main); so thats the problem: i have a script that makes a mysql connection. i can select, update, insert aso. from the db. then i call a function that itself makes a connection to the same db, does something with it (works fine) closes the connection and returns. i dont use global or give the main connection as an argument, its just a plain standalone function. after calling the function the main script has lost its mysql connection (its no timeout since the function doesnt take long to execute). the same scripts work with PHP version 4.0.1pl2. both pcs have the same setup (apache 1.3.12, mysql 3.22.32, the rest as rpms from the distibution cds). its all the same except the php-version (both compiled with the standard options --with-apxs --with-mysql - make - make install) -- Edit Bug report at: http://bugs.php.net/?id=9497edit=1 -- PHP Development 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-DEV] PHP 4.0 Bug #9498: quoted_printable_decode - Incorrect function result
From: [EMAIL PROTECTED] Operating system: Win NT 4.0 PHP version: 4.0.2 PHP Bug Type: Mail related Bug description: quoted_printable_decode - Incorrect function result if I have a RTF file encoded with "quoted-printable" (eg. mime mail generated by MS Outlook), the quoted_printable_decode() function do not decode it. if I use imap_qprint(), is correctly decoded !!! -- Edit Bug report at: http://bugs.php.net/?id=9498edit=1 -- PHP Development 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-DEV] Solid 3.5 and PHP 4.0.4pl1
Hi to all! Is anyone able to compile PHP 4.0.4pl1 with Solid 3.5 libraries? I have tried but it gives very very very many errors when the php module is linked during apache compilation. I know that a similar problem has been solved with PHP 4.0.3 and infact I'm able to compile Solid 3.5 with this version of PHP. But the 4.0.4pl1 version seems to ignore (or hasn't) the 4.0.3 patch. I report the errors from the compilation process at the end of the email. I compile PHP with apache 1.3.17 (but also i have tried with 1.3.14) in a red hat 7 enviroment. Thanks to all! Denis - START ERRORS gcc -DLINUX=22 -I/u/development/test/php-4.0.4pl1 -I/u/development/test/php-4.0.4pl1/main -I/u/development/test/php-4.0.4pl1/main -I/u/development/test/php-4.0.4pl1/Zend -I/u/development/test/php-4.0.4pl1/Zend -I/u/development/test/php-4.0.4pl1/TSRM -I/u/development/test/php-4.0.4pl1/TSRM -I/u/development/test/php-4.0.4pl1 -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci`\ -o httpd buildmark.o modules.o modules/standard/libstandard.a modules/php4/libphp4.a main/libmain.a ./os/unix/libos.a ap/libap.a lib/expat-lite/libexpat.a -Wl,-rpath,/usr/local/lib -rdynamic -L/usr/local/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4-lpam -lc-client -ldl -lz -ljpeg -lpng -ltiff -lpdf -lmhash -lz -lpng -lgd -ljpeg -lresolv -lm -ldl -lcrypt -lnsl -lresolv -L/usr/local/lib -ljpeg -lm -lcrypt modules/php4/libphp4.a(php_odbc.o): In function `_free_odbc_result': php_odbc.o(.text+0x79): undefined reference to `SQLTransact' php_odbc.o(.text+0x84): undefined reference to `SQLFreeStmt' modules/php4/libphp4.a(php_odbc.o): In function `_close_odbc_conn': php_odbc.o(.text+0xb4): undefined reference to `SQLDisconnect' php_odbc.o(.text+0xbd): undefined reference to `SQLFreeConnect' php_odbc.o(.text+0xc5): undefined reference to `SQLFreeEnv' modules/php4/libphp4.a(php_odbc.o): In function `_close_odbc_pconn': php_odbc.o(.text+0xec): undefined reference to `SQLDisconnect' php_odbc.o(.text+0xf5): undefined reference to `SQLFreeConnect' php_odbc.o(.text+0xfd): undefined reference to `SQLFreeEnv' modules/php4/libphp4.a(php_odbc.o): In function `odbc_sql_error': php_odbc.o(.text+0x787): undefined reference to `SQLError' modules/php4/libphp4.a(php_odbc.o): In function `odbc_bindcols': php_odbc.o(.text+0x94b): undefined reference to `SQLFreeStmt' php_odbc.o(.text+0x99f): undefined reference to `SQLColAttributes' php_odbc.o(.text+0x9bb): undefined reference to `SQLColAttributes' php_odbc.o(.text+0x9f8): undefined reference to `SQLColAttributes' php_odbc.o(.text+0xa2b): undefined reference to `SQLBindCol' modules/php4/libphp4.a(php_odbc.o): In function `odbc_transact': php_odbc.o(.text+0xabe): undefined reference to `SQLTransact' modules/php4/libphp4.a(php_odbc.o): In function `odbc_column_lengths': php_odbc.o(.text+0xc76): undefined reference to `SQLColAttributes' modules/php4/libphp4.a(php_odbc.o): In function `php_if_odbc_prepare': php_odbc.o(.text+0xede): undefined reference to `SQLAllocStmt' php_odbc.o(.text+0xf27): undefined reference to `SQLPrepare' php_odbc.o(.text+0xf4b): undefined reference to `SQLFreeStmt' php_odbc.o(.text+0xf6e): undefined reference to `SQLNumParams' php_odbc.o(.text+0xf7b): undefined reference to `SQLNumResultCols' modules/php4/libphp4.a(php_odbc.o): In function `php_if_odbc_execute': php_odbc.o(.text+0x11d9): undefined reference to `SQLDescribeParam' php_odbc.o(.text+0x1282): undefined reference to `SQLFreeStmt' php_odbc.o(.text+0x1311): undefined reference to `SQLBindParameter' php_odbc.o(.text+0x1344): undefined reference to `SQLFreeStmt' php_odbc.o(.text+0x1373): undefined reference to `SQLExecute' php_odbc.o(.text+0x13a4): undefined reference to `SQLParamData' php_odbc.o(.text+0x13c2): undefined reference to `SQLPutData' php_odbc.o(.text+0x1429): undefined reference to `SQLFreeStmt' php_odbc.o(.text+0x1494): undefined reference to `SQLNumResultCols' php_odbc.o(.text+0x14ee): undefined reference to `SQLFreeStmt' php_odbc.o(.text+0x1526): undefined reference to `SQLFreeStmt' modules/php4/libphp4.a(php_odbc.o): In function `php_if_odbc_cursor': php_odbc.o(.text+0x15d4): undefined reference to `SQLGetInfo' php_odbc.o(.text+0x163d): undefined reference to `SQLGetCursorName' php_odbc.o(.text+0x167f): undefined reference to `SQLError' php_odbc.o(.text+0x16b1): undefined reference to `SQLSetCursorName' modules/php4/libphp4.a(php_odbc.o): In function `php_if_odbc_exec': php_odbc.o(.text+0x1934): undefined reference to `SQLAllocStmt' php_odbc.o(.text+0x1977): undefined reference to `SQLExecDirect' php_odbc.o(.text+0x199c): undefined reference to `SQLFreeStmt' php_odbc.o(.text+0x19c2): undefined reference to `SQLNumResultCols' modules/php4/libphp4.a(php_odbc.o): In function `php_if_odbc_fetch_into': php_odbc.o(.text+0x1b1e): undefined reference to `SQLFetch'
Re: [PHP-DEV] CVS Account Request
We still are getting these? - Original Message - From: "CVS Account Request" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 27, 2001 8:22 AM Subject: [PHP-DEV] CVS Account Request Full name: Ivan Ivanov Email: [EMAIL PROTECTED] ID: johnt Purpose: web programming -- PHP Development 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 Development 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-DEV] PHP 4.0 Bug #9499: move() function needed.
From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.0.4pl1 PHP Bug Type: Filesystem function related Bug description: move() function needed. We need a move() function that works across filesystems. I don't care if it's thread-safe. Rename() on my system used to do this until version 4.04pl1. Now my scipts are broken. (I'm sure I'm not the only one.) This should work for the simplest case (where both $src and $dest are regular files): function move($src, $dest) { $srcstat = stat($src); $deststat = stat(dirname($dest)); if($srcstat[1] == $deststat[1]) { $rc = rename($src, $dest); } else { $rc = copy($src, $dest); if($rc) { $rc = (unlink($src) == 0); if( !$rc) unlink( $dest); } } return $rc; } -- Edit Bug report at: http://bugs.php.net/?id=9499edit=1 -- PHP Development 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-DEV] PHP 4.0 Bug #9498 Updated: quoted_printable_decode - Incorrect function result
ID: 9498 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: Mail related Description: quoted_printable_decode - Incorrect function result note: in PHP4.0.3pl1 it work's correctly, is really a bug Previous Comments: --- [2001-02-28 10:41:10] [EMAIL PROTECTED] if I have a RTF file encoded with "quoted-printable" (eg. mime mail generated by MS Outlook), the quoted_printable_decode() function do not decode it. if I use imap_qprint(), is correctly decoded !!! --- Full Bug description available at: http://bugs.php.net/?id=9498 -- PHP Development 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-DEV] PHP 4.0 Bug #9498 Updated: quoted_printable_decode - Incorrect function result
ID: 9498 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: Mail related Description: quoted_printable_decode - Incorrect function result Hey, in the last version (PHP 4.0.4pl1), the bug has returned Previous Comments: --- [2001-02-28 11:57:17] [EMAIL PROTECTED] note: in PHP4.0.3pl1 it work's correctly, is really a bug --- [2001-02-28 10:41:10] [EMAIL PROTECTED] if I have a RTF file encoded with "quoted-printable" (eg. mime mail generated by MS Outlook), the quoted_printable_decode() function do not decode it. if I use imap_qprint(), is correctly decoded !!! --- Full Bug description available at: http://bugs.php.net/?id=9498 -- PHP Development 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]
Re: [PHP-DEV] Solid 3.5 and PHP 4.0.4pl1
Denis Gasparin wrote: Hi to all! Is anyone able to compile PHP 4.0.4pl1 with Solid 3.5 libraries? I have tried but it gives very very very many errors when the php module is linked during apache compilation. Yes, I am able to compile with 3.5, and 3.51 which requires build libraries #122 (I believe) from SolidTech. I know that a similar problem has been solved with PHP 4.0.3 and infact I'm able to compile Solid 3.5 with this version of PHP. But the 4.0.4pl1 version seems to ignore (or hasn't) the 4.0.3 patch. I report the errors from the compilation process at the end of the email. I compile PHP with apache 1.3.17 (but also i have tried with 1.3.14) in a red hat 7 enviroment. Are you using Solid 3.5 or are you using Solid 3.51 (which is the downloadable demo version from the website). If 3.51 please make sure you have the latest libraries from SolidTech (yes, you have to ask for them). There has been a bug in their build/test process, which was corrected on September 21, 2000, but they haven't officially told anyone (you can find mention of it on the mailing list). If this isn't the case, can you send me a copy of the configure output, and hopefully we can work from there. -- Dan Kalowsky "Tonight I think I'll walk alone, Worldgate Communications I'll find my soul as I go home." Software Engineer - TICS Group - Temptation -- PHP Development 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-DEV] phpMyAdmin and arg_separator = amp;
Hi there, I just came across something very odd: After setting arg_separator = "amp;" in my php.ini Tobias Ratschiller's phpMyAdmin no longer works correctly. The start page loads correctly, every page thereafter dies with an SQL error. Yours, Sebastian -- sebastian bergmann e-mail : [EMAIL PROTECTED] homepage : http://www.sebastian-bergmann.de make a gift : http://wishlist.sebastian-bergmann.de measure the usability of your web application - http://phpOpenTracker.de -- PHP Development 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-DEV] SSL - joining sockets and files (resent)
Sorry - I've been having problems with my mail client; I have resent the message with sensible line breaks. On 2001-02-27 06:53:05, Stig Venaas wrote: But with for instance IPv6, you won't know what socket you need until you're done with the resolving. That's why hostconnect() is like it is. It even needs to connect before it knows what socket to use. That I must have missed hostconnect(). I Don't know how - I certainly remember you talking about a long time ago. I'm not convinced we should put socket(), resolve() etc. into the structure. I agree that we need those, and others, but I don't see the value of putting them in a structure. I was just thinking in terms of modularity; it would mean that someone could provide support for their own weird and wonderful network transport without having to touch the core code in fsock.c. For SSL it should be possible to connect() as usual using hostconnect() and then do the SSL negotiation, right? Yes. close, read and write is fine, we need that abstraction. I think perhaps we should have destruct() rather than close() where close() first calls destruct to let for instance SSL clean up whatever is needed, and then do the normal socket close and free the php_sockbuf structure. ... By abstracting read and write, it could be possible to put fopen_wrappers in extensions (completely modularized), seems sensible to me to put the SSL wrapper in the openssl extension. Yes, I was thinking along those lines too. I think what we need depends on how far we are willing to go to make the codebase nicer. Andi Gutmans suggested that it would be nice to nuke all the checks for sockets in the code; depending on how far we go towards that ideal, we might need to approach this in a different way. The problem we have is that file handles in php can be regular files or sockets, but we have to use either stdio FILEs or unix/posix sockets to represent them, and the php code has to take special steps whenever it needs to write to a file. This causes a conflict in the case of SSL enabled sockets because the thing that is passed back is neither a socket nor a FILE, but does have an underlying socket, hence the "cookie" and socketd parameters/ returns from the abstraction. If we expand the abstraction to cover regular files as well as sockets, would it be worth it? I'm going to look into it in more depth and come back with more info about where we are using this stuff and where we check for sockets, and think some more about the open/connect/construct part of it. --Wez. -- PHP Development 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]
Re: [PHP-DEV] SSL - joining sockets and files (resent)
On Wed, Feb 28, 2001 at 05:12:55PM +, Wez Furlong wrote: I think what we need depends on how far we are willing to go to make the codebase nicer. Andi Gutmans suggested that it would be nice to nuke all the checks for sockets in the code; depending on how far we go towards that ideal, we might need to approach this in a different way. Yes, and I think it's a good idea. The problem we have is that file handles in php can be regular files or sockets, but we have to use either stdio FILEs or unix/posix sockets to represent them, and the php code has to take special steps whenever it needs to write to a file. This causes a conflict in the case of SSL enabled sockets because the thing that is passed back is neither a socket nor a FILE, but does have an underlying socket, hence the "cookie" and socketd parameters/ returns from the abstraction. If we expand the abstraction to cover regular files as well as sockets, would it be worth it? I don't think it's that hard, but I haven't really thought it through. What you called sockbuf could contain both socket and file stuff by either put it all together in one large structure, or use union or a pointer to either a file or a socket structure. Basically you could have something like: php_iobuf { struct php_io_ops * ops; void * cookie; }; where cookie can be a pointer to file or socket structure or something else. The code can do say ops-write(cookie, data) for both files and sockets. You have different write functions for files, normal tcp, SSL etc, and the cookie points to php_filebuf, php_sockbuf or what- ever is needed for that type. The write function for files is declared like say write(struct * php_filebuf, char *data). I think it might be enough to have php_io_ops contain read(), write() and close() but I'm not sure. If you do all this you can have very different code and data for files, sockets, SSL etc. while the code that uses them simply passes around a pointer to a php_iobuf structure (that is set up when file is opened or socket is created (and possibly connected etc.), and calls the write/read/close functions with the cookie. I could try to describe it more carefully, but I think you understand my point. I'm going to look into it in more depth and come back with more info about where we are using this stuff and where we check for sockets, and think some more about the open/connect/construct part of it. Great, Stig -- PHP Development 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-DEV] RE: [PHP-QA] Re: [PHP-DEV] ctype function (re?)naming
A heated argument seems to be developing, which IMHO makes no sense when we are discussing a tiny corner of the language. Yes, function names should be consistent, however because the current namespace is such a mess it is impossibly to argue the toss on this issue because all we can do is make the function name compatible with one (or more) of a range of inconsistent 'standards' throughout the language. It HAS to be time for a big tidy up, as it is clearly impossible to 'do the right thing' under current circumstances. Cheers -- Phil Driscoll Exactly, it has to be time to make plans for a complete overhaul of EVERYTHING - we're getting nowhere and we have people saying that some sections should stay as is_somthing() and other sections should be made issomthing() which is just plain ridiculous. The whole language needs to be the same, not just sections that people feel can be changed and others that can't out of posterity etc. Personally I think that it should be is_something() as it is much more readable, for example if I typed like this: doyoureallythinkthatthisisaseasytoread? You wouldn't find it as easy to read as: do_you_really_think_that_this_is_as_easy_to_read? Would you? I know I don't. PHP is not C or Java or any other language, it is PHP - a language in it's own right, therefore it can have it's own naming scheme for functions, just because PHP and C have functions that do the same thing with similar names (OK the same but with _ etc. etc.) it doesn't mean they have to follow the naming scheme of the similar language - I hope you get what I mean here. I'm not trying to get anyone's back up over this or be a pain, just to point out that we shouldn't be blinded by tradition etc. and let it turn a great language into something akin to what BASIC was - Spaghetti code most of the time. Karl Austin -- PHP Development 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-DEV] PHP 4.0 Bug #9500: mssql_query returns false for INSERT UPDATE queries
From: [EMAIL PROTECTED] Operating system: NT 4.0 PHP version: 4.0.4pl1 PHP Bug Type: MSSQL related Bug description: mssql_query returns false for INSERT UPDATE queries ?php mssql_connect('myserver', 'user', 'password'); mssql_select_db('mydatabase'); $Result = mssql_query("UPDATE mytable SET nextval=nextval+1"); if ($Result) { echo("Result is TRUEBR"); } else { echo("Result is FALSEBR"); } echo 'BRBR'; $Result = mssql_query("INSERT mytable values(10)"); if ($Result) { echo("Result is TRUEBR"); } else { echo("Result is FALSEBR"); } ? -- Edit Bug report at: http://bugs.php.net/?id=9500edit=1 -- PHP Development 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-DEV] PHP 4.0 Bug #9501: variable sapi_module defined multiple places
From: [EMAIL PROTECTED] Operating system: OS400 PHP version: 4.0.4pl1 PHP Bug Type: Compile Problem Bug description: variable sapi_module defined multiple places I am attempting to create PHP CGI. What I cannot understand is how one is suppose to create PHP when sapi_module is defined multiple places. In my case, sapi_module is defined in main/SAPI.c and sapi/cgi/cgi_main.c. When I try to create the program, I get "Definition supplied multiple times for symbol 'sapi_module'" It would be nice of the truly global sapi_module (in SAPI.c) was renamed. Or a rule ensuring that sapi_module in othre places, in which it is truely private, should not be named sapi_module. Something to think about. -- Edit Bug report at: http://bugs.php.net/?id=9501edit=1 -- PHP Development 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-DEV] Re: [PHP-QA] Re: [PHP-DEV] ctype function (re?)naming
It HAS to be time for a big tidy up, as it is clearly impossible to 'do the right thing' under current circumstances. Problem is, what you see as "untidy" programmers with a background in other languages and software packages see as "convenient". :-) For every "newbie" it helps to have consistent every_word_gets_an_underscore, you quite simply make it equally hard for an experienced hacker to use PHP. We've been wrangling over this for months, and we *still* don't have concensus, really -- Even among the people who agree that, in theory, a consistent naming scheme (with exceptions) is Good, there isn't concensus on individual cases in reality. I don't think there's been a single proposed name change that hasn't been hotly contested. Maybe it's time to give this up, and move on to other things. -- PHP Development 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-DEV] PHP 4.0 Bug #9502: IE5.5 SP1: New browser instances displaying same session id
From: [EMAIL PROTECTED] Operating system: server: BSDI BSD/OS 4.1 Kernel #2Client: Win2000 PHP version: 4.0.4pl1 PHP Bug Type: *Session related Bug description: IE5.5 SP1: New browser instances displaying same session id My browser: IE 5.50.4522.1800 Update Version:; SP1; When running the script below on different instances of my browser I get the SAME session id appear. This does not occur in IE5.0 or Netscape 4.6/4.73 (i.e., I get the expected behaviour of different session ids appearing). Please can someone investigate this since it appears to be a very serious security issue. Many Thanks Dipen ? //Start the session. //This must be called before //sending any content. session_start(); //Register a couple of variables session_register("Name"); session_register("Count"); //Set variable based on form input if($inputName != "") { $Name = $inputName; } //Increment counter with each page load $Count++; ? HTML HEAD TITLEListing 7.6/TITLE /HEAD BODY ? //print diagnostic info print("BDiagnostic Information/BBR\n"); print("Session Name: " . session_name() . "BR\n"); print("Session ID: " . session_id() . "BR\n"); print("Session Module Name: " . session_module_name() . "BR\n"); print("Session Save Path: " . session_save_path() . "BR\n"); print("Encoded Session:" . session_encode() . "BR\n"); print("HR\n"); if($Name != "") { print("Hello, $Name!BR\n"); } print("You have viewed this page $Count times!BR\n"); //show form for getting name print("FORM ACTION=\"$SCRIPT_NAME?".SID."\" METHOD=\"POST\""); print("INPUT TYPE=\"text\" NAME=\"inputName\" VALUE=\"$Name\"BR\n"); print("INPUT TYPE=\"submit\" VALUE=\"Change Name\"BR\n"); print("/FORM"); // added by dk (n.b. $SCRIPT_NAME is apache environment variable) print("script_name: " . $SCRIPT_NAME . "BR\n"); print("SID: " . SID . "BR\n"); // -- //use a link to reload this page print("A HREF=\"$SCRIPT_NAME?".SID."\"Reload/ABR\n"); ? /BODY /HTML -- Edit Bug report at: http://bugs.php.net/?id=9502edit=1 -- PHP Development 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-DEV] Re: [PHP-QA] Re: [PHP-DEV] ctype function (re?)naming
Richard Lynch wrote: It HAS to be time for a big tidy up, as it is clearly impossible to 'do the right thing' under current circumstances. Problem is, what you see as "untidy" programmers with a background in other languages and software packages see as "convenient". :-) For every "newbie" it helps to have consistent every_word_gets_an_underscore, you quite simply make it equally hard for an experienced hacker to use PHP. Hmmm... but how many experienced hackers do we have and how many newbies do we have? I would imagine that new users outnumber experienced hackers manyfold. We've been wrangling over this for months, and we *still* don't have concensus, really -- Even among the people who agree that, in theory, a consistent naming scheme (with exceptions) is Good, there isn't concensus on individual cases in reality. I don't think there's been a single proposed name change that hasn't been hotly contested. Maybe it's time to give this up, and move on to other things. And just leave this issue to fester...:) There is a reason that it keeps coming up. We should fix it now - with the rate the language is growing, this will only get harder and more necessary at time passes. --zak -- PHP Development 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]
Re: [PHP-DEV] phpMyAdmin and arg_separator = amp;
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Hi there, I just came across something very odd: After setting arg_separator = "amp;" in my php.ini Tobias Ratschiller's phpMyAdmin no longer works correctly. The start page loads correctly, every page thereafter dies with an SQL error. things break because someone was dumb and used the "arg_separator" that used to be used to handle parsing the incoming request to also handle the parsing that the session-id adding stuff does, and then changed the documentation for arg_separator without regard to the existing behavior. so the get parsing is now expecting to use amp; to separate arguments when you set arg_separator that way. there should be two config variables for this. jim -- PHP Development 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-DEV] PHP 4.0 Bug #9503: bzcompress output is null padded to size of original string
From: [EMAIL PROTECTED] Operating system: Linux 2.2 [RH6.2] PHP version: 4.0.4pl1 PHP Bug Type: Bzip2 Related Bug description: bzcompress output is null padded to size of original string I compiled PHP 4.0.4pl1 with --bz2, using bzip 1.0.1. Running bzcompress() on a string always returns a string of the same size. The data in the returned string appears to be correctlty compressed though, as it uncompresses correctly when passed back to bzdecompress(). It appears that the first part of the returned string contains the correctly compressed result, and that the returned string is then padded with nulls out to the size of the original string. The gzcompress() function does not behave this way. ? $str = "[...some really huge string...]"; echo strlen($str) . " " . strlen(gzcompress($str,9)) . " " . strlen(bzcompress($str,9)); ? This generates the output: 14092 2348 14092 -- Edit Bug report at: http://bugs.php.net/?id=9503edit=1 -- PHP Development 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-DEV] PHP 4.0 Bug #9482 Updated: || operator gives unexpected results
ID: 9482 Updated by: torben Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: *General Issues Assigned To: Comments: This isn't a bug; it's a result of the differing precedence for || and or (which are otherwise identical, btw). Try this: $db = mysql_connect("localhost", "root") || print "error connecting"; echo $db; The output should be '1'. The reason is that || has higher precedence than =, so PHP sees the above statement as: $db = (mysql_connect("localhost", "root") || print "error connecting"); ...which means that $db is assigned the value of the expression in parens, which in this case will always evaluate to 1, which is not a valid MySQL resource. Next try this: ($db = mysql_connect("localhost", "web")) || print "error connecting "; echo $db; The output should be 'Resource id #1', since the precedence has now been forced. The other way to force precedence is to use the lower-precedence 'or', as you mentioned. The operator precedence table can be found in the manual at: http://www.php.net/manual/en/language.operators.precedence.php Hope this helps, Torben Previous Comments: --- [2001-02-27 10:52:12] [EMAIL PROTECTED] ? $db = mysql_connect("localhost", "web") || print "error connecting ".mysql_error()." ".mysql_errno(); mysql_select_db("surveys"); $result = mysql_query("select * from attract") || print "error querying ".mysql_error()." ".mysql_errno(); $i = 0; while ($row = mysql_fetch_array($result)){ // ($i++ 5)){ echo $row[0]." ".$row[1]."br"; } ? this script will repeatedly give me invalid MySQL Link Resource Warnings, but by changing the "||" to "or" it will work fine. Thanks --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9482edit=2 -- PHP Development 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-DEV] CVS Account Request
Full name: Roberto Bertó Email: [EMAIL PROTECTED] ID: darkelder Purpose: Translate the PHP Manual to Portuguese -- PHP Development 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-DEV] CVS Account Request
Full name: Roberto Bertó Email: [EMAIL PROTECTED] ID: berto Purpose: Translate the PHP Manual to Portuguese - Please, delete the account \"darkelder\" -- PHP Development 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-DEV] PHP 4.0 Bug #9504: is_file doesn't seem to work
From: [EMAIL PROTECTED] Operating system: debian PHP version: 4.0.4pl1 PHP Bug Type: Filesystem function related Bug description: is_file doesn't seem to work In the docs for is_dir, i'm not sure if it wants a file name or a path name + file name. Either way, it doesn't seem to work on my debian/PHP4 (downloaded from dselect)/Apache box Here's the script i'm attempting: //--- List all the files in a directory //--- Directory we're going after is /clients/data/ function get_files( $current_directory ) { $directory = dir( $current_directory ); $file_list = array(); while ($element = $directory-read()) { //--- The following line is never true if (is_file($element)) { $file_list[$element] = $element; } //--- if is_file else { echo "Not a file: $elementbr\n"; $path_and_name = $current_directory . $element; if (is_file($path_and_name)) { echo "Not a file: $path_and_namebr\n"; } } } //--- while $element = $directory-read() //--- Directory list doesn't seem to be sorted, //--- so let's sort it asort($file_list); $directory-close(); //--- Tell them what we've learned return $file_list; } //--- get_files -b -- Edit Bug report at: http://bugs.php.net/?id=9504edit=1 -- PHP Development 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-DEV] PHP 4.0 Bug #9505: Pointer not set exception on a realloc
From: [EMAIL PROTECTED] Operating system: OS400 PHP version: 4.0.4pl1 PHP Bug Type: Reproduceable crash Bug description: Pointer not set exception on a realloc Got the PHP to compile and build, now I am doing some simple tests. On initial invocation to PHP, I get the following exception: Message . . . . : Pointer not set for location referenced. Cause . . . . . : A pointer was used, either directly or as a basing pointer, that has not been set to an address. The exception was in c file zend_alloc.c, routine _erealloc(). The problem code is the first line: ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) { zend_mem_header *p = (zend_mem_header *) ((char *)ptr-sizeof(zend_mem_header)-PLATFORM_PADDING); zend_mem_header *orig = p; DECLARE_CACHE_VARS ALS_FETCH(); if (!ptr) { return _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); } . . . } The first line is referencing the pointer without checking if it is NULL. I moved the first 2 lines after the if-check and it cleared up the problem. -- Edit Bug report at: http://bugs.php.net/?id=9505edit=1 -- PHP Development 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-DEV] PHP 4.0 Bug #9462 Updated: NULL bute eats rest of string
ID: 9462 Updated by: bbonev Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Filesystem function related Assigned To: Comments: just error reporting functions are not binary safe. although i do not see a reason to open a file containing a null char in the name - most OSes will get the part before the first null char. lets call it bug because current behav doesn't help enough to track the problem Previous Comments: --- [2001-02-26 09:17:33] [EMAIL PROTECTED] I'm not sure if this is a bug or feature, comments are apreciated. http://bugs.horde.org/show_bug.cgi?id=621 Example: quote include($string . ".php"); /quote with "magic_quotes_gpc = On" (php.ini) calling test.php?string=test%00 result: Warning: Failed opening 'test -- PHP Development 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-DEV] PHP 4.0 Bug #9207 Updated: User session handler doesn't call write function
ID: 9207 User Update by: [EMAIL PROTECTED] Old-Status: Feedback Status: Closed Bug Type: *Session related Description: User session handler doesn't call write function Sorry for the inconvience the problem was in my code. Previous Comments: --- [2001-02-20 13:47:03] [EMAIL PROTECTED] How did you verify that the write handler is not called? Note that during the request shutdown the write/close handlers cannot send any data to the browser. --- [2001-02-10 16:01:43] [EMAIL PROTECTED] I'm trying to setup a user session module using a postgre (6.2.3) database. the script that I'm supplying defines the functions for storing session data. If I force the session data into the database the read function works and I can retrieve the session data. However, the write function never gets called so data is never stored in the database. This is simular to problems reported in #8772 and #9002. There is a difference though. Those reports indicate that register_globals was off. In my case register_globals was on. Here is the script I'm using to test the session module. ?php $sess_pg = array(); $sess_pg["open_connection"] = true; // Establish a Pg connection on session startup? $sess_pg["hostname"]= "localhost";// Pg hostname $sess_pg["port"]= "5432"; // Pg port $sess_pg["db"] = "php_sessions"; // Database where to store the sessions $sess_pg["table"] = "sessions"; // Table where to store the sessions function sess_pg_open($save_path, $sess_name) { global $sess_pg; // Establish a Pg connection, if $sess_pg["open_connection"] is true if ($sess_pg["open_connection"]) { $sess_pg["connection"] = pg_pconnect( $sess_pg["hostname"], $sess_pg["port"], $sess_pg["db"]) or die(pg_errormessage($sess_pg["connection"])); } return(true); } function sess_pg_read($sess_id) { global $sess_pg; echo "HELP MEbr"; $query = "SELECT data "; $query .= "FROM ".$sess_pg["table"]." "; $query .= "WHERE id = '$sess_id'"; echo "$queryBR"; // Select the data belonging to session $sess_id from the Pg session table $result = pg_exec($sess_pg["connection"], $query) or die(pg_errormessage($sess_pg["connection"])) or die(pg_errormessage($sess_pg["connection"])); # // Return an empty string if no data was found for this session //if(pg_numrows($result) == 0) if(!($sess_pg["present"] = pg_numrows($result))) { echo "NothingBR"; return(""); } echo "Records: ".$sess_pg["present"]."BR"; // Session data was found, so fetch and return it $row_number = 0; $row = pg_fetch_array($result,$row_number); pg_freeresult($result); echo "DATA: ".$row["data"]."BR"; return($row["data"]); } function sess_pg_write($sess_id, $val) { global $sess_pg; if(!$sess_pg["present"]){ // Write the serialized session data ($val) to the Pg ession table $query = "INSERT INTO ". $sess_pg["table"] ." (id, data, t_stamp) "; $query .= "VALUES ($sess_id, $val, now())"; $result = pg_exec($sess_pg["connection"], $query) or die(pg_errormessage($sess_pg["connection"])); }else{ // Write the serialized session data ($val) to the Pg ession table $query ="UPDATE ".$sess_pg["table"]; $query .=" SET data = '$val', t_stamp = now() "; $query .=" where id = '$sess_id'"; $result = pg_exec($sess_pg["connection"], $query) or die(pg_errormessage($sess_pg["connection"])); } return(true); } function sess_pg_destroy($sess_id) { global $sess_pg; // Delete from the Pg table all data for the session $sess_id $query ="DELETE FROM ".$sess_pg["table"]." "; $query .="WHERE id = '$sess_id' "; $result = pg_db_query($sess_pg["connection"], $query) or die(pg_errormessage($sess_pg["connection"])); return(true); } function sess_pg_gc($max_lifetime) { global $sess_pg; // Old values are values with a Unix less than now - $max_lifetime $old = time() - $max_lifetime; // Delete old values from the Pg session table $result = pg_db_query($sess_pg["connection"], "DELETE FROM ".$sess_pg["table"]." WHERE UNIX_TIMESTAMP(t_stamp) $old") or die(pg_errormessage($sess_pg["connection"])); return(true); } $foo = 10; session_set_save_handler("sess_pg_open", "", "sess_pg_read", "sess_pg_write", "sess_pg_destroy", "sess_pg_gc"); session_start(); session_register("foo"); echo "foo: $foo"; $foo++; ?
Re: [PHP-DEV] SSL - joining sockets and files
This sounds pretty good. I'll try and look at the code this weekend. Some of the code is really ugly especially the legacy code. When you say there are places which need a FILE * do you mean they just need to check the id and check that it's a FILE * or do they convert descriptors to FILE * (can't remember if that's possible or not :). Andi At 02:12 AM 3/1/2001 +, Wez Furlong wrote: I've just looked through the code. The current issock stuff is a bit of a nightmare, but not too much of a problem. Most of the codebase seems to be fairly well behaved with FP_FGETS and friends (apart from the interbase extension, where it does the same thing as FP_FREAD without using FP_FREAD). The aim is to reduce three parameters to a single parameter for the FP_ family of macros. Ideally, it would be nice to do this for php_fopen_wrapper as well, and have it return the "php_file" abstraction we are proposing. I'm not sure how well people will like this in general, but thats why I'm talking about it and not changing the code right now. Whenever an extension needs to open a file it also needs to complain if it can't open it. All over the code we have the same checks to see if it is a socket or a file, if it was opened, and if if wasn't complain, but first strip out a password from the filename/url etc. etc. A suggestion is this: typedef struct _php_file { int file_type; /* bitfield: PHP_FILE_STDIO, PHP_FILE_SOCKET */ int (*write)(php_file *this_ptr, ); int (*read)(php_file *this_ptr,); int (*open)(php_file *this_ptr,); int (*close)(php_file *this_ptr,.); int (*seek)(php_file * this_ptr, ...); /* useful */ } php_file; php_file * php_fopen_wrapper(char * filename, char * mode, int options, char ** opened_path, int report_error ); Basically the same as the current implementation except that it returns an abstraction rather than a bunch of alternatives. The report error flag will cause the fopen wrapper to display the error message using the current active function name from the scripting engine, saving a few lines of code for each call where error reporting is required, and increasing maintainability. This is going to break code in 11 files, but that is relatively easy to fix. Some code requires that we get a FILE * back (the fopen_wrapper_for_zend is one), and some requires a socket (the code in fsock.c), so we need a way to get those out of the php_file: FILE * PHP_FILE_GET_STDIO_FILE(php_file *) int PHP_FILE_GET_SOCKETD(php_file *) [the names could be PHPFILEGETSTDIOFILE, but thats a different thread... ;-)] These could be implemented as macros, provided that all stdio based abstractions "descend" from a common structure where the FILE * lives at the same structure offset, and likewise for the socketd versions. In the common case, there will only be one of each of these types anyway. I don't think that any of this will have a special impact on win32 platforms (any more than unix), because we are too high level for that. The only real problem is cleaning up the code to use the php_file abstraction instead of assuming it's getting a stdio fp back. Once all this is done, the SSL code could be written as an fopen wrapper. I'm getting tired, so I may have overlooked something glaringly obvious; please let me know if I have, or if you have any other suggestions or improvements. --Wez. -- PHP Development 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]
Re: [PHP-DEV] SSL - joining sockets and files
Too early in the morning. I just remembered fdopen() :) Andi At 07:14 AM 3/1/2001 +0200, Andi Gutmans wrote: This sounds pretty good. I'll try and look at the code this weekend. Some of the code is really ugly especially the legacy code. When you say there are places which need a FILE * do you mean they just need to check the id and check that it's a FILE * or do they convert descriptors to FILE * (can't remember if that's possible or not :). Andi At 02:12 AM 3/1/2001 +, Wez Furlong wrote: I've just looked through the code. The current issock stuff is a bit of a nightmare, but not too much of a problem. Most of the codebase seems to be fairly well behaved with FP_FGETS and friends (apart from the interbase extension, where it does the same thing as FP_FREAD without using FP_FREAD). The aim is to reduce three parameters to a single parameter for the FP_ family of macros. Ideally, it would be nice to do this for php_fopen_wrapper as well, and have it return the "php_file" abstraction we are proposing. I'm not sure how well people will like this in general, but thats why I'm talking about it and not changing the code right now. Whenever an extension needs to open a file it also needs to complain if it can't open it. All over the code we have the same checks to see if it is a socket or a file, if it was opened, and if if wasn't complain, but first strip out a password from the filename/url etc. etc. A suggestion is this: typedef struct _php_file { int file_type; /* bitfield: PHP_FILE_STDIO, PHP_FILE_SOCKET */ int (*write)(php_file *this_ptr, ); int (*read)(php_file *this_ptr,); int (*open)(php_file *this_ptr,); int (*close)(php_file *this_ptr,.); int (*seek)(php_file * this_ptr, ...); /* useful */ } php_file; php_file * php_fopen_wrapper(char * filename, char * mode, int options, char ** opened_path, int report_error ); Basically the same as the current implementation except that it returns an abstraction rather than a bunch of alternatives. The report error flag will cause the fopen wrapper to display the error message using the current active function name from the scripting engine, saving a few lines of code for each call where error reporting is required, and increasing maintainability. This is going to break code in 11 files, but that is relatively easy to fix. Some code requires that we get a FILE * back (the fopen_wrapper_for_zend is one), and some requires a socket (the code in fsock.c), so we need a way to get those out of the php_file: FILE * PHP_FILE_GET_STDIO_FILE(php_file *) int PHP_FILE_GET_SOCKETD(php_file *) [the names could be PHPFILEGETSTDIOFILE, but thats a different thread... ;-)] These could be implemented as macros, provided that all stdio based abstractions "descend" from a common structure where the FILE * lives at the same structure offset, and likewise for the socketd versions. In the common case, there will only be one of each of these types anyway. I don't think that any of this will have a special impact on win32 platforms (any more than unix), because we are too high level for that. The only real problem is cleaning up the code to use the php_file abstraction instead of assuming it's getting a stdio fp back. Once all this is done, the SSL code could be written as an fopen wrapper. I'm getting tired, so I may have overlooked something glaringly obvious; please let me know if I have, or if you have any other suggestions or improvements. --Wez. -- PHP Development 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 Development 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-DEV] PHP 4.0 Bug #9506: --enable-gd-imgstrttf should be --enable-gd-native-ttf
From: [EMAIL PROTECTED] Operating system: n/a PHP version: 4.0.4pl1 PHP Bug Type: Documentation problem Bug description: --enable-gd-imgstrttf should be --enable-gd-native-ttf configure --help shows: --enable-gd-imgstrttf Enable TrueType string function in gd ...but it appears that this option string was changed to --enable-gd-native-ttf -- Edit Bug report at: http://bugs.php.net/?id=9506edit=1 -- PHP Development 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]
Re: [PHP-DEV] SSL - joining sockets and files
On Thu, Mar 01, 2001 at 07:14:18AM +0200, Andi Gutmans wrote: This sounds pretty good. I'll try and look at the code this weekend. Some of the code is really ugly especially the legacy code. Yes, I like it too, and it is something I've been halfway thinking of myself because of IPv6. Some of this will help IPv6 since I need to know if a socket is AF_INET, AF_LOCAL or AF_INET6 when it's passed around. Currently getsockname is used in socket.c, Sascha and me were thinking of a solution a bit like this. I also like the thought of modularizing fopen-wrappers completely, in the future it could be possible to say dynamically load modules (PEAR or whatever) depending on the URL scheme. Busy with other fun programming projects at the moment, Stig -- PHP Development 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]
Re: [PHP-DEV] phpMyAdmin and arg_separator = amp;
Jim Winstead wrote: so the get parsing is now expecting to use amp; to separate arguments when you set arg_separator that way. there should be two config variables for this. I see. So, who will fix this? :-) -- sebastian bergmann e-mail : [EMAIL PROTECTED] homepage : http://www.sebastian-bergmann.de make a gift : http://wishlist.sebastian-bergmann.de measure the usability of your web application - http://phpOpenTracker.de -- PHP Development 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-DEV] Re: [PHP-QA] Re: [PHP-DEV] RE: [PHP-QA] Re: [PHP-DEV] ctype function (re?)naming
Ron - whose postings I normally agree with :-) - wrote: Ignoring case, the extension count, and the possible naming styles, is as follows: word_word_word: 65 wordwordword: 24 word_wordword: 21 Some extensions use more than one style, but the one most often used is word_word_word. Many functions fit into word_word, which is not affected one way or another by observing the most common thread in naming. The standard seems to already be in place. I'll grant that you have shown that word_word_word is the most popular format in use, which gives weight to the argument that the underscore should be how we do it, but this falls far short of a standard because those words are not obeying sensible rules. We have a random mix of ext_verb_noun and ext_noun_verb, a mixture of verbs which do the same job, and a motley assortment of other subtleties on the end of or inserted into function names. That's before we start looking at the order of the arguments. The fact is (with no blame attributed anywhere - the way the software has evolved has made this more or less inevitable) that the namespace is grossly self inconsistent. I have to look at the manual much more often than I do with other languages I use. The business of whether to use underscores or studly caps is just a matter of personal preference, and it is MUCH more important to get the language consistent than to bicker about that kind of detail (which, in extremis, could even be made configurable, or multiple options supported if a consensus could not be reached). I know that Zak has been doing some experiments along these lines, but has also been busy on other projects. Any news to report Zak? Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP Development 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]