[PHP-DEV] bcpowmod() and bigIntegers
is there a possibility to implement bcpowmod() in a version prior than PHP5? bcpowmod() ist the only way to calculate a blind signature as described by David CHAUM 1982 - digicash (openssl does not work here). now I use the shell_exec command and an external java applet. (btw. java has a great implemetation of the BigInteger.class) -- /dev/robert -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] domxml close document routine
Overview: domxml does not include a close document routing to release memory after an xml document has been processed. I have added one. Purpose: I am using PHP's domxml functionality to parse thousands (17,000+) xml documents in a single request. The current implementation of domxml in PHP does not allow for xml documents to be closed, so memory is lost at more than 7KB/document during processing. I have been able to reduce this to 1KB/document by adding a close document routine to the PHP domxml extension and calling that close routine in my PHP scripts. Diff: Please see the patch files for my changes at the following URLs. http://robertoldham.com/php_domxml.h.php4.diff http://robertoldham.com/php_domxml.c.php4.diff http://robertoldham.com/php_domxml.h.php5.diff http://robertoldham.com/php_domxml.c.php5.diff Caveats: Lacking familiarity with PHP development, I am not sure that my implementation of the close routine is optimal. However, I have been using this code change in php-4.2.3, php-4.3.0 and php-4.3.1 for approximately 6 weeks without any problems. I am also unfamiliar with the process of getting a change reviewed and applied. If I have done anything wrong, or need to do additional things to follow this through, please let me know. Thank you, Robert Oldham -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: #22292 [Opn-Fbk]: PHP.EXE never ends
I've the same problem with NT4 sp6a IIS. When i used 4.2.3, i've no problem, but in 4.3.1, i've the problem ! But when i setup IIS to use ISAPI instead CGI, all work fine. [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] ID: 22292 Updated by: [EMAIL PROTECTED] Reported By: francois dot kaufmann at swisscom dot com -Status: Open +Status: Feedback Bug Type: CGI related Operating System: WIN NT 4 SP6 PHP Version: 4.3.1 New Comment: What web server? Previous Comments: [2003-02-19 03:52:14] francois dot kaufmann at swisscom dot com While executing a simple script: ? echo Hello wolrd!; ? The IE browser (http://MyWeb/foo.php) displays the content of the script and remains working. The Task Manager of the Web server shows one instance of PHP.EXE. Trying to call the page on a second IE, the will be a second PHP.EXE running and so on until no more memory... My understanding was that ? start an PHP.EXE instance and ? kills it. [2003-02-19 03:45:47] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to Open. Thank you for your interest in PHP. [2003-02-19 03:34:43] francois dot kaufmann at swisscom dot com Hi, I just installed PHP 4.3.1 (old used version was 4.0.6) and every time I call a sript, the PHP.EXE does'nt end! After a few calls, there are a lots of PHP.EXE running... kaf -- Edit this bug report at http://bugs.php.net/?id=22292edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: #22291 [Opn-Bgs]: CGI do not function !
It's a bug I'm not the only one, look #22292 [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] ID: 22291 Updated by: [EMAIL PROTECTED] Reported By: v dot robert at ouestfrance-multimedia dot com -Status: Open +Status: Bogus Bug Type: CGI related Operating System: NT4 SP6a XP Pro SP1 PHP Version: 4.3.1 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. Ask support questions elsewhere. Previous Comments: [2003-02-19 03:45:44] v dot robert at ouestfrance-multimedia dot com My config for extensions is: extension=php_iisfunc.dll extension=php_mssql.dll extension=php_sockets.dll others are off. When I put in comment extension=php_iisfunc.dll, all work fine in CGI. NB: We use php in order to use phpbb forum. [2003-02-19 03:01:58] v dot robert at ouestfrance-multimedia dot com I've installed yesterday the 4.3.1 on two system: first: NT4 SP6a IIS second: Win XP Pro SP1 IIS In both cases the PHP functions normally in ISAPI but not in CGI. In the first case, i've have multiple instances of php.exe in my task manager and my browser (IE6) don't have result before I kill the php.exe. In the second case, i've an error with php interpretor, so i've nothing in the browser. I read that ISAPI is not as stable as cgi, so what can I do in order to use CGI ??? -- Edit this bug report at http://bugs.php.net/?id=22291edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: novotnyr
I would like to participate on the Slovak translation of the PHP documentation. Therefore I would like to be granted access to phpdoc part of CVS. I've already got in touch with Slovak translation team leader, [EMAIL PROTECTED] I come from Kosice, Slovakia and currently I study Computer Science at the Pavol Jozef Safarik University in the same city. Thanks -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] PHP urlencode() - JAVA
Hi I nedd to know, what command matches best with urlencode() from PHP. Is it encodeURL() or encodeRedirectURL() or something else. thx for your help mfg Robert -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: ODBTP, a possible solution for MS-SQL and otherdatabases
In some ways it is similar to an ODBC to ODBC bridge. Typically bridges are used for UNIX to Win32 connectivity. In your case it appears that the client and server are both Win32 platforms. Is there a reason why you cannot install the required ODBC drivers on the machine running IIS? We are using ODBTP on an Apache / PHP / Solaris server to access databases via ODBC drivers on a Win2K server. However, I am certain that the PHP extension should work on the Win32 platform. Unfortunately I do not possess the knowledge on how to compile and install extensions for Win32-based PHP. The ODBTP software is not quite ready for prime time (primarily due to a lack of documentation). If you like I can give you the URL to what's available now. -- bob On Wed, 13 Nov 2002, Daniel Swarbrick wrote: Could this provide the functionality of an ODBC to ODBC bridge, if one used the Win32 client library? We have a requirement for an IIS webserver in a DMZ to talk to an ODBC database on a Windows 2000 server in the trusted network. I know there is already an ODBC-ODBC bridge commercial package, but it's a tad expensive. Robert Twitty [EMAIL PROTECTED] wrote in message news:00aa01c28296$aeb10fe0$9b00a8c0;bobawa... Hello ODBTP consists of a Windows NT / 2000 service application, an ODBTP client library that can be used to create Win32 or UNIX clients, and a PHP extension module that was created with the library. ODBTP has the following features: -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ODBTP, a possible solution for MS-SQL and other databases
ODBTP can be used for the purpose you described. Although I have not used it with file-based databases, it should not be a problem. The only requirement is that the ODBC drivers must be thread safe if it will be accessed by multiple clients. This, of course, will be the case it it is used on the web. As I stated in my previous reply, I have not dealt with Win32 based PHP, which is what I assume you are using with IIS. However, the ODBTP client library, which was written in C, can be compiled on a Win32 platform with VC++. You can then use this library to build CGI programs or COM objects (that should be fun). It probably would be less painful to determine what is needed to compile the ODBTP extension on a Win32 platform. What is your level of expertise in regards to the above? -- bob The reason for not installing the ODBC drivers on the webserver is that the database referenced by the drivers are simply on-disk files (ie, no socket communication involved). We would need to allow SMB traffic through our firewall if we were to use the ODBC drivers on the webserver, which is something I'm not prepared to do. I don't mind allowing a single, non-MS TCP port through the firewall tho. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Compiling PHP as Apache 2 static module?
Is it possible to compile PHP as an Apache 2.0 static module. None of PHP 's configure indicate that this is possible. -- bob -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ODBTP, a possible solution for MS-SQL and other databases
The name of the service is called ODBTP (Open Database Transport Protocol), and no there is not a RFC for this protocol. Thus far, I have successfully accessed MS-SQL, Oracle and Sybase databases via ODBTP. Have Oracle ran well through it? Yes. * Supports all data types, including nvarchar, ntext, varchar(255), char(255), datetime, and bigint. What about RECORD type for Oracle? Objects? XMLType(s)? Have you had a chance to play with them yet? I have not tried those types (I primarilly use it for MS-SQL), however, ODBTP can be easily modified to accomadate any type. The key however is how to map those types in PHP. If they are complex then maybe the would have to be sent as resources or objects. I am new to this mailing list, and it appears that PHP is predominantly used for MySQL and PostgreSQL, and thus I am not sure if ODBTP is of any interest to most people on this list. My original intent was not to release ODBTP to the public (I really don't have the time to maintain freeware), but if there is a substantial interest I will release it to the public. I am curious to see how well it performs in other environments. -- bob It does, indeed, sounds interesting. If I understood it right this extension will only run on Win32, right? It will work on Win32 and UNIX. -- Maxim Maletsky [EMAIL PROTECTED] www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home // my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ODBTP, a possible solution for MS-SQL and other databases
I'd be interested in seeing more about this extension. It sounds like it could be useful. What kind of license would this stuff be released under? If it proves to be a viable DB solution, then my goal is to have it become a part of PHP. Thus, it would be under the same license as PHP. Best Regards Mike Robinson -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ODBTP, a possible solution for MS-SQL and other databases
gt; * Designed to be as easy as possible to use with PHP How committed is your organization to supporting your selection of PHP? Have you been involved in any open source coding efforts? My organization's committment to PHP is primarily determined by me. I am the software development team leader, and introduced PHP about 9 months ago. The decision to use PHP for non MySQL / PostgreSQL database applications is linked to the success of ODBTP. This is probably the most important reason why I decided to introduce it to this list. That fact that it is working for me is not good enough. I need to see how well it performs within other environments. No, I have never been involved in any open source efforts. Everything I have done has been for in-house purposes only. However, since I do use a lot of open source software, I do feel obligated to contribute something. I primarily write code for the Windows platform, and the only code that I have written for UNIX is on Solaris. I t would be nice for someone to create a configure script, since I have never had a reason to do this. I would be interested and likely to assist at some level in helping you release this code. I believe you are correct to consider the maintenance issue and think it is worth investigating how best to support ODBTP. So far 3 people have shown interest in ODBTP, however, it is the weekend. I am currently working on packaging it in a tar.gz file. If the response is low I will only release it to those who have shown an interest, and if it becomes higher than I will release it to the list. It is very important to me that the people who acquire it actually will use it and provide feedback within a reasonable time period. I do not want to feel like I put it in a black hole. And, yes you are one of the three. -- bob -- I have been working with PHP on and off for about 3 years now. I have been working with Sybase (using the ext/sybase_ct) for the most part but would be interested in supporting MS SQL and Oracle as much as possible. I will continue to follow the discussion on php-dev but thought I would let you know there was another interested developer in the meantime. Regards, Sam Cooley __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] ODBTP, a possible solution for MS-SQL and other databases
; odbtp_set_attr( ODB_ATTR_TRANSACTIONS, ODB_TXN_READCOMMITTED ) or die; $qry1 = odbtp_query( TRUNCATE TABLE Employees ) or die; odbtp_prepare( {? = call AddEmployee( ?, ?, ?, ?, ?, ? )}, $qry1 ) or die; odbtp_out( $qry1, 1 ); $qry2 = odbtp_allocate_query() or die; odbtp_prepare( {call SetEmployeeNotes( ?, ? )}, $qry2 ) or die; function AddEmployee( $qry, $ExtId, $LastName, $FirstName, $Title, $Salary, $JobDesc ) { odbtp_in( $qry, 2, $ExtId ); odbtp_in( $qry, 3, $LastName ); odbtp_in( $qry, 4, $FirstName ); odbtp_in( $qry, 5, $Title ); odbtp_in( $qry, 6, $Salary ); if( $JobDesc != ODB_DEFAULT ) odbtp_in( $qry, 7, $JobDesc ); else odbtp_in( $qry, 7 ); odbtp_execute( $qry ) or die; $out = odbtp_fetch_output( $qry ) or die; return $out[1]; } function SetEmployeeNotes( $qry, $Id, $Notes ) { odbtp_in( $qry, 1, $Id ); odbtp_in( $qry, 2, $Notes ); odbtp_execute( $qry ) or die; } $Id = AddEmployee( $qry1, 111222333444555, Twitty, Robert, ODBTP Creator, .2, ODB_DEFAULT ); SetEmployeeNotes( $qry2, $Id, I've added my 2 cents worth to PHP. ); $Id = AddEmployee( $qry1, 311322343454685, Johnson, Mary, Supervisor, 10, Supervises folks ); SetEmployeeNotes( $qry2, $Id, She can read greek: - ? Dr. ??? ? ); $Id = AddEmployee( $qry1, 568899902133452, Smith, John, CEO, 38020979.46, NULL ); SetEmployeeNotes( $qry2, $Id, He's the guy that makes all the money. ); $Id = AddEmployee( $qry1, 109, Gordon, Susan, Computer Programmer, 73144.57, Makes web-based applications ); SetEmployeeNotes( $qry2, $Id, Single quotes (') and double quotes (\) are not a problem when you do data binding. ); odbtp_commit(); ? html head titleODBTP Test - Initialization/title meta http-equiv=Content-Type content=text/html; charset=utf-8 /head body ?php odbtp_query( SELECT * FROM Employees ) or die; $cols = odbtp_num_fields( $qry1 ); echo table cellpadding=2 cellspacing=0 border=1\n; echo tr; for( $col = 0; $col $cols; $col++ ) echo thnbsp; . odbtp_field_name( $qry1, $col ) . nbsp;/th; echo /tr\n; odbtp_bind_field( $qry1, DateEntered, ODB_CHAR ) or die; while( ($rec = odbtp_fetch_array($qry1)) ) { echo tr; for( $col = 0; $col $cols; $col++ ) echo tdnobrnbsp;$rec[$col]nbsp;/nobr/td; echo /tr\n; } echo /table\n; odbtp_close(); ? /body /html -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ODBTP, a possible solution for MS-SQL and other databases
Hi Dan Below, I have addressed each of your comments. Keep in mind that ODBTP is not a replacement for ODBC. The motivation for ODBTP was to devise a scheme that would make it easy to keep up with Microsoft's perpetual changes in the TDS protocol. Which from my research appears to be the biggest headache for FreeTDS and ODBC driver developers. ODBTP is less susceptible to this because it is an interface to ODBC drivers installed on a Windows NT / 2000 server. And, so far, Microsoft is still providing full support for its ODBC drivers on Windows Platforms. Also, if they stop supporting ODBC in the future, the ODBTP service can be changed to interface with the new methodology without changing the ODBTP protocol. On Saturday, November 2, 2002, at 12:38 PM, Robert Twitty wrote: its capabilities and useless in certain situations. Another alternative was to use a commercial ODBC driver management system on UNIX. Sadly, it was not in the budget for this endeavor, and the PHP odbc extensions could use some work in terms of ease of use. I tend to disagree with this bit. The ODBC system is no more complicated than any of the other database interfaces you find on PHP. There is the needed introduction of a odbc.ini file, but thats no more confusing than the need for a TNS Names with Oracle. If you have a problem with the way ODBC is implemented, please feel free to request new features via the bug system, submit patches, or emailing me directly. I have in the past asked numerous times for input on the extension only to receive silence. Upon further review, you are probably correct. However, working directly with ODBC can be a daunting task for some people. More importantly, what commercial ODBC system are you looking at? unixODBC, and iODBC work wonderfully for UNIX, and both are free and integrated completely with PHP. The problem with the free versions was that they did not appear to provide support SQL Server 7.0 / 2000 new features. In fact, Microsoft's DB-Library and early ODBC driver versions do not support all of them either. Because I was determined to use PHP (I really dislike using JSP / JDBC on UNIX, and IIS / ASP is out of the question), I decided to create my own solution. Since I have a substantial amount of experience in programming directly with the Win32 ODBC API and TCP/IP, I decided to create a service that runs on a Win32 platform that can communicate with any platform via TCP/IP. The service uses a home grown protocol that allows a client to access any database that the service can see via the ODBC drivers that are installed on the computer which it resides. In other words, it allows a PHP client on UNIX to access a database using the ODBC drivers installed on a Windows NT / 2000 server. It is nothing more than a middle man service for Win32 ODBC. The name of the service is called ODBTP (Open Database Transport Protocol), and no there is not a RFC for this protocol. Thus far, I have successfully accessed MS-SQL, Oracle and Sybase databases via ODBTP. This sounds like a lot of work to re-implement the ODBC system. On the contrary, ODBC was not re-implemented. ODBTP requires it, but on a Windows NT / 2000 Server platform. ODBTP is a client / server wrapper around the Win32 ODBC API. * Supports all data types, including nvarchar, ntext, varchar(255), char(255), datetime, and bigint. I'd like to know how you got around this. It's proven to be a bigger headache in supporting for ODBC than I would have imagined. The ODBTP protocol was designed to handle these new data types. It retrieves data from Microsoft ODBC drivers that fully support these data types, and then sends it to the client via the ODBTP protocol which was designed to accomadate them. The problem you are probably faced with is that the UNIX ODBC drivers do not use or have not fully implemented the new (and supposedly not publically documented) TDS protocol used by SQL Server 7.0 / 2000. * Stored procedure execution, parameter passing (including NULL's) and output retrieval. Nice.I haven't worked on this yet at all for PHP ODBC. Again, the ODBTP protocol has facilities that make this possible. * UNICODE data is processed using UTF-8 encoding (important since PHP strings are not UNICODE) This is being worked upon. Hopefully I'll have free time again soon. No problem, UTF-8 works quite well in PHP. * No discovered memory leaks or buffer overflow possibilities. If you know of any in the current PHP ODBC, let us know. This was not meant to be a point of contention with PHP, but rather with Win32 based services that tend to suffer more from these problems. -- bob --- Dan KalowskyI'll walk a thousand miles just http://www.deadmime.org/~dankto slip this skin. [EMAIL PROTECTED]- Streets
Re: [PHP-DEV] ODBTP, a possible solution for MS-SQL and other databases
I do not like MySQL due to its simplicity and lack of relations. But i must disagree to PHP/Postgres. Postgres IS very stable and fast. Another very important thing is that any security problem found in postgres is fixed very soon. On the otherhand there is Microsoft and we have seen in the past that there are a lot of problems and that it takes some time to get them fixed by MS. Last but not least i d not like MS products for large server applications for several reasons. Unfortunately, the place where I work is not comfortable with using open source databases, and SQL Server as been in place for many years and the GUI makes it easier for many people to administer. While it may be unfounded, the majority of the commercial and government world do not appear to be receptive to the use of MySQL and PostgreSQL for serious applications. And M$ is applying enough political pressure to keep it that way. Microsoft is a very big gorilla, and has a reputation for beating superior products with it's sometimes inferior equivalents. * UNICODE data is processed using UTF-8 encoding (important since PHP strings are not UNICODE) did you use mbstring and internal encoding set to utf-8 or ucs-whatever? No, unicode data is coverted to and from UTF-8 on the server-side. The ODBTP protocol sends and receives all unicode data in the UTF-8 format. Sounds interesting to me :-) There is no problem with adding this as a new extension in pecl since all new extensions should be created there. Maybe it is even worth to discuss this belonging to /ext but i doubt. Just ask for approriate CVS account. However, where can one download ODBTP or will be part of the extension build? I have to generate some documentation on how to install and use it. I was only willing to take the time to do this if there was a need for something like ODBTP by other people. -- bob regards marcus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] long long data type in libmysql.
On Wed, 4 Sep 2002, Ananth Kesari wrote: Hi, We are working on porting PHP onto NetWare. PHP-4.2.2 sources for libmysql seem to be using the data type long long and we are facing some problems handling this data type. We see extensive use of _WIN32 and _MSC_VER in these files and so we are sure that it was compiled with MSVC. But we got to understand from a reliable source that Microsoft C compiler doesn't understand this data type. Correct us if we are wrong. Can someone let us know how MSVC managed to handle the data type long long? MSVC uses __int64. -Robert. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] simple question :)
hi i write an article about changes in php that will come to us with zend 2.0. therefore i`m wondering when can we expect official release of php5 (zend2 alphas are not what i`m looking for :)). can someone clear this up for me? i don`t want exact date of course - just month or even part of the year. thanks in advance rashid -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Garbage Collection!
Let's say I do: zval *newVar; MAKE_STD_ZVAL( newVar ); ZEND_SET_SYMBOL( EG(symbol_table), varKey, newVar ); and then I do: MAKE_STD_ZVAL( newVar ); ZEND_SET_SYMBOL( EG(symbol_table), varKey, newVar ); This will overwrite my orignal newVar, however, will the original newVar be garbaged collected or is this my responsibility now that I'm out of PHP land? Also if it is auto garbage collected, is there a way I can force garbage collection to run while I'm in a deep recursion? Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Garbage Collection!
Zeev Suraski wrote: At 08:53 PM 5/17/2002, Robert Cummings wrote: Let's say I do: zval *newVar; MAKE_STD_ZVAL( newVar ); ZEND_SET_SYMBOL( EG(symbol_table), varKey, newVar ); and then I do: MAKE_STD_ZVAL( newVar ); ZEND_SET_SYMBOL( EG(symbol_table), varKey, newVar ); This will overwrite my orignal newVar, however, will the original newVar be garbaged collected or is this my responsibility now that I'm out of PHP land? Also if it is auto garbage collected, is there a way I can force garbage collection to run while I'm in a deep recursion? Whatever you register into the standard data structures, EG(symbol_table) included, is taken care of by the engine. In that case, the old value will be destroyed as soon as you replace it in the 2nd SET_SYMBOL call. To be honest I'm passing the return_value into my recursion - is the same true of it? I ask because I watched my memory consumption climb to over 500MB and all I use is MAKE_STD_ZVAL( newVar ) and insert into some depth of the recursion initially stored into return_value for the calling function. My initial assumption was that indeed this stuff is garbage collected... but maybe I'm doing something wrong if this is collected at the moment of overwrite and I'm seeing such massive allocations using top. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Garbage Collection!
Zeev Suraski wrote: At 09:04 PM 5/17/2002, Robert Cummings wrote: To be honest I'm passing the return_value into my recursion Not sure what you mean by that - return_value is handled by the engine as soon as you return from your function implementation, if that's what you're asking. If you're using it internally, then you're responsible for it until you return from your code. Well I'm creating a nested hash that I want to return ultimately, so at my first recursive step I pass return_value as the hash to be filled. However at various steps in the recursion I add elements to the hash that overwrite default values. So my question is whether during this recursive process does the garbage collector run when I overwrite a hash entry? Hope that clears things up. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Garbage Collection!
Zeev Suraski wrote: If you're adding elements to a hash you created using array_init(), and you're using the standard macros (which apparently you are) - then yes, the engine will take care of garbage collection for you. Thanks a lot, this is what I needed to know, I guess somehow I have allocation going on somewhere else. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Help please.
Is there someplace other than: http://www.php.net/manual/en/zend.php Where I can get more advanced information about how the engine itself works. While I've made some extensions I was recently wondering if perhaps I've done some things wrong (no doubt I have). For instance... Let's say I do: zval *newVar; MAKE_STD_ZVAL( newVar ); ZEND_SET_SYMBOL( EG(symbol_table), varKey, newVar ); and then for some unknown reason not particularly important for this discussion I do the following: MAKE_STD_ZVAL( newVar ); ZEND_SET_SYMBOL( EG(symbol_table), varKey, newVar ); This will overwrite my orignal newVar, however, will the original newVar be garbaged collected or is this my responsibility now that I'm out of PHP land? Also if it is auto garbage collected, is there a way I can force garbage collection to run while I'm in a deep recursion? Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Information request.
Is there someplace other than: http://www.php.net/manual/en/zend.php Where I can get more advanced information about how the engine itself work. While I've made some extensions I was recently wondering if perhaps I've done some things wrong (no doubt I have). For instance... Let's say I do: zval *newVar; MAKE_STD_ZVAL( newVar ); ZEND_SET_SYMBOL( EG(symbol_table), varKey, newVar ); and then for some unknown reason not particularly important for this discussion I do the following: MAKE_STD_ZVAL( newVar ); ZEND_SET_SYMBOL( EG(symbol_table), varKey, newVar ); This will overwrite my orignal newVar, however, will the original newVar be garbaged collected or is this my responsibility now that I'm out of PHP land? Also if it is auto garbage collected, is there a way I can force garbage collection to run while I'm in a deep recursion? Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Information request.
I apologize for double posting this, until today I didn't realize replying-to and clearing the subject line caused me to thread into the previous message, in other words I didn't know that a reference was sent via the headers. -- Is there someplace other than: http://www.php.net/manual/en/zend.php Where I can get more advanced information about how the engine itself work. While I've made some extensions I was recently wondering if perhaps I've done some things wrong (no doubt I have). For instance... Let's say I do: zval *newVar; MAKE_STD_ZVAL( newVar ); ZEND_SET_SYMBOL( EG(symbol_table), varKey, newVar ); and then for some unknown reason not particularly important for this discussion I do the following: MAKE_STD_ZVAL( newVar ); ZEND_SET_SYMBOL( EG(symbol_table), varKey, newVar ); This will overwrite my orignal newVar, however, will the original newVar be garbaged collected or is this my responsibility now that I'm out of PHP land? Also if it is auto garbage collected, is there a way I can force garbage collection to run while I'm in a deep recursion? Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Probably a simple answer...
zval containers that are of string type don't seem to hold a null terminating character, but rather directly store the length of the string - I note this because of how the ZVAL_STRING macro works... My question then is what is the best way to compare two strings in a zval? I would imagine a macro or function would already exist, and I'm quite sure that the following simple invocation is asking for trouble: strcmp( Z_STRVAL_P( target1 ), Z_STRVAL_P( target2 ) ) == 0 Thanks for any information. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Probably a simple answer...
brad lafountain wrote: Well i do believe that the zval string SHOULD be null termiated and have the length stored. You would think so, but on further thought, if that were the case you wouldn't be able to store compressed data from gzip in a string because the null bytes everywhere would interfere. Also, as I said, ZVAL_STRING suggests that this is so... since when you use it to set a zval container to a string it saves the length as strlen( passedString ), rather than strlen( passedString ) + 1, also the memcpy then uses this length to copy the string if you set the copy flag to true. Cheers, Rob. But zend does provied this api function zend_binary_zval_strcmp(zval *, zval*); - Brad --- Robert Cummings [EMAIL PROTECTED] wrote: zval containers that are of string type don't seem to hold a null terminating character, but rather directly store the length of the string - I note this because of how the ZVAL_STRING macro works... My question then is what is the best way to compare two strings in a zval? I would imagine a macro or function would already exist, and I'm quite sure that the following simple invocation is asking for trouble: strcmp( Z_STRVAL_P( target1 ), Z_STRVAL_P( target2 ) ) == 0 Thanks for any information. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Probably a simple answer...
brad lafountain wrote: Well i do believe that the zval string SHOULD be null termiated and have the length stored. But zend does provied this api function zend_binary_zval_strcmp(zval *, zval*); Oh and I almost forgot... THANKS... this appears to be exactly what I was looking for :) Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Probably a simple answer...
Robert Cummings wrote: brad lafountain wrote: Well i do believe that the zval string SHOULD be null termiated and have the length stored. You would think so, but on further thought, if that were the case you wouldn't be able to store compressed data from gzip in a string because the null bytes everywhere would interfere. Also, as I said, ZVAL_STRING suggests that this is so... since when you use it to set a zval container to a string it saves the length as strlen( passedString ), rather than strlen( passedString ) + 1, also the memcpy then uses this length ^^ I just took another look at ZVAL_STRING and it uses estrndup and not memcpy... maybe I'm losing my mind :) Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Probably a simple answer...
Simon Fogg wrote: I believe you hijacked my thread - The original subject was: 'Creating extension module for PHP'! I was asking about specific information about specific functionality, your thread asks about how to write an extension... I already know how and have done so, I'd just like to know more about what I'm doing and since there isn't much in the way of docs for doing so, then sometimes I need to clear things up here. I apologize if it appears I hijacked your thread.. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Probably a simple answer...
Simon Fogg wrote: That's o.k.- I'm just grouchy. There seems to be so much information to wade through to find out what you need to know. Since we are on the subject though, and you have already done this sort of thing before, can you tell me whether extensions are supported on MacOSX. My Mac colleague is off sick today and since I am looking at finding a fairly X-Plaform solution to our problem, I thought it would be beneficial if I could find out whether the same solution could be used on a Mac. I don't see why not provided you are able to compile PHP. As long as you can compile PHP your extension should compile into a Mac native binary. All you should need to do is create wrapper functions around your current library to make them accessible via PHP in your extension. If you're like me you will compile this directly into the PHP binary itself, and then I don't think you will need any other binaries. Alternatively, since you are comparing this to window's DLLs I think you can compile as a shared library, but I don't know much about that route and wouldn't advise it since as far as I know it runs like CGI. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] mime help!
ok i have that a script that is supposed to decode base64, the thing that it's decoding is a email, html encoded. For some od reason it just puts the message into funny characters. Does anyone know where I could get a tutorial maybe on this subject if nobody wanted to help me. All help is appreciated -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: rashid
contributing to pear. Stig S. Bakken [EMAIL PROTECTED] suggested me applying for cvs account -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] feature request for __LINE__, __FILE__ and trigger_error
I wrote this extension a while back, but I never released it since I didn't follow coding style and it was my first forage into extension coding for PHP. It should be what your looking for though for the most part... the function of usefulness is: get_function_call_stack() which will return an array with the call stack for the current function which includes the calling file, funcion and line number. Use a print_r() on the results to get a better idea. Please don't flame me for not releasing or following coding style. Cheers, Rob. - [EMAIL PROTECTED] wrote: Addressed to: [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from [EMAIL PROTECTED] Wed, 24 Apr 2002 21:06:41 +0200 (CEST) Hello Michael, I'm working (80% done) on an extension for this. It should be finished in a few days. It doesn't feature the __C*__ things yet, but I can add a function for that too. I'll keep you posted, Loud cheer!!! Thanks, I've wished for this for a long time! -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' ftrace.tar.gz Description: GNU Zip compressed data -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] The PHP Platform
I keep hearing a lot of my company this in microsoft and my company that and blah blah blah. I'm sorry, but if the fullfillment of all your dreams are in your company then you live a sad, sad life. The future is what you make of it, and each and every person has the power to contribute to change what may be. Cheers, Rob. Dave Mertens wrote: On Tue, Apr 16, 2002 at 07:57:26AM -0700, brad lafountain wrote: --- Dave Mertens [EMAIL PROTECTED] wrote: But the fact the PHP don't have a proper XML parser, only a scripting SOAP parser Well i currently am working on a soap c extension for php (ext/soap). Its pretty fast. And with other technologies like ext/session and ext/msession I have created a way to create a cluster of soap object with each soap request not needing to got the same machine. My extension is in a 'alpha' stage right now. I am working on a website and docuementation right now. After that im going to clean up the code and release an alpha release. I'll definly email this list when i get something i want to release. I didn't know there was an native SOAP parses in PHP. I hope it will become production soon, so i can start using it. But than on the other hand XML is still very poor in PHP. And the relation between SOAP and XML is very tight. But i'm not trying to trap someone into the floor, i'm only saying what i'm facing as a PHP developer in a company that is a Microsoft partner. See it as a coca-cola agent who likes Pepsi. It's hard to sell Coca-cola when you like Pepsi. But i'm a Pepsi agent that is trying to sell Pepsi to the Coca-cola factory! Dave Mertens -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] The PHP Platform
Hey all, I'm just doing a general followup to say how much I love the PHP engine. I find it extremely fast for development and I love that I can integrate C extension modules when time is a huge factor. While PHP seems to be moving into the shadows here where I work I find that I love it more and more personally and is my favourite engine for doing just about everything. I use it for the web and for shell scripting. Most of all I love that something like this can be free, since in my spare time I like to code for a MUD, which doesn't make me any money, but which I find very satisfying. Kudos to all the PHP contributors. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Finding key in a hash...
I am trying to determine if a key exists in a hash that has been passed to my function. I couldn't find much information on finding how to do it, but from greping the source I managed to come up with the following. Problem is it doesn't work *heh*. All I want to do is check whether the key exists or not and act appropriately. My code compiles fine, but the zend_hash_exists() test always returns false. The A facsimile of my code follows: --- ZEND_FUNCTION( foofunction ){ zval **paramHash = NULL; zval *aHash = NULL; if( ZEND_NUM_ARGS() != 1 ||zend_get_parameters_ex( ZEND_NUM_ARGS(), paramHash ) == FAILURE ){ WRONG_PARAM_COUNT; } aHash = *paramHash; if( zend_hash_exists( aHash-value.ht, foo, sizeof( foo ) ) ){ // // Do something here. // } else{ // // Do something else here. // } } --- In my PHP code I have the following: --- $aHash = array(); $aHash['foo'] = 'fee'; foofunction( $aHash ); --- Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] object refrences (POSSIBLE MAJOR BUG)
Andrey Hristov wrote: But dereferncing like this $foo-bar()-fubar is feature of Z2 or not? Till today I didn't know that my 4.1.1(or 2) not sure can do this kind of dereferencing. The above quote dereference involves an intermediate method, the one described in the example below uses an object which is currently supported. $foo = new foo(); $foo-bar-set_tmp(outside foo); $foo-variable = foo; As far as references go... I believe when you copy an object it is a shallow copy, in otherwords, the object is copied, but not its members. This behaviour is preferrable as far as I'm concerned. If you want a deep copy try doing the following: $foo = new foo(); $fee = unserialize( serialize( $foo ) ); That should provide a nice quick, clean solution for what you want while not incurring the overhead most programmers would rather skip on every object copy. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] object refrences (POSSIBLE MAJOR BUG)
My apologies... this examples better clarifies your point and I must admit that it is rather strange behaviour :) And I think I forgot that PHP does do deep copies, probably because I'm so used to writing wrapper objects with references to my real objects so I automate shallow copies. Cheers, Rob. brad lafountain wrote: I do understand the difference... but it also doesn't say it does a shallow copy. because it DOES do a deep copy run the following code.. ? class foo { function foo() { $this-bar = new bar(); } } class bar { function bar() { $this-tmp = bar; } function do_nothing() { } } // As you see no shallow copy!! $foo = new foo(); $foo-bar-tmp = test; $foo2 = $foo; $foo2-bar-tmp = foo; var_dump($foo); var_dump($foo2); // now $foo-bar-do_nothing(); $foo3 = $foo; $foo3-bar-tmp = bug; var_dump($foo); var_dump($foo3); ? as soon as a function is called from a objects member.. this is where the refrence is created! - Brad -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re-entrant PHP
I mostly don't keep up with the bulk of the PHP threads; however, I did a pretty thorough scan of them to find information about re-entrancy and didn't find anything to answer my question. So here goes... I was wondering if there were any plans to make php_mod re-entrant in any way or if there were any comments on how difficult this task would be. I see the advantages of re-entrancy being that my source code wouldn't need to be reloaded every single time a page is loaded; much of the data would already be in memory with respect to properties and caching; I could have a global persistent cache for some of my data versus saving to a database or shared memory location for subsequent page hit retrieval. Mostly I just don't want my source code re-parsed and loaded on every hit since that is a large overhead once you get into several layers of abstraction. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Dev question / bugfix for 8449
Ive fixed a bug in PHP (#8449) and would like to submit it, but I havent got a clue what diff command to use. Can someone send me some info/links..? Ive got loads of information on *reporting* bugs but very little on *fixing* them. Thanks
[PHP-DEV] Re: Bug #15630: imap_utf7_decode appears to be broken
At 22:31 02-02-19 +0100, Markus Fischer wrote: On Tue, Feb 19, 2002 at 08:56:24PM -, [EMAIL PROTECTED] wrote : From: [EMAIL PROTECTED] Operating system: SGI Irix 6.5 PHP version: 4.1.1 PHP Bug Type: IMAP related Bug description: imap_utf7_decode appears to be broken Hi, when trying to use the IMP Webmail client with an Exchange 2000 Server, folders with accents in the name are mangled. It appears that the Exchange Imapd server sends modified utf-7 names as explained in rfc 2060. IMP use a call to the imap_utf7_decode function. It should work but it does'nt. Just curious, but isn't the data returned from the ldap server meant to be utf8 (utf8_encode(), ut8_decode()) ? -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc I'm talking about imap here. It is indeed utf8 in case of an ldap server. Bye. --- Robert Marchand tél: 343-6111 poste 5210 DGTIC-SIT e-mail: [EMAIL PROTECTED] Université de Montréal Montréal, Canada -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Bug #15279 Updated: RETURNTRANSFER and CUSTOMREQUST do not play well together
ID: 15279 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: cURL related Operating System: Linux PHP Version: 4.1.1 New Comment: Sure. Here are some very simple runs and results. I do not think that any request will ever work. - START - SRC ? $curl = curl_init(); $request = 'GET' . \r\n; curl_setopt($curl, CURLOPT_URL, 'http://localhost:8080/'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request); $data = curl_exec ($curl); echo $data . \r\n; ? - RESULT [BLANK] - END - START - SRC ? $curl = curl_init(); $request = 'GET' . \r\n; curl_setopt($curl, CURLOPT_URL, 'http://localhost:8080/'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec ($curl); echo $data . \r\n; ? - RESULT !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN HTMLHEAD TITLE403 Forbidden/TITLE /HEADBODY H1Forbidden/H1 You don't have permission to access / on this server.P HR ADDRESSApache/1.3.22 Server at 127.0.0.1 Port 8080/ADDRESS /BODY/HTML - END - START - SRC ? $curl = curl_init(); $request = 'GET' . \r\n; curl_setopt($curl, CURLOPT_URL, 'http://localhost:8080/'); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request); $data = curl_exec ($curl); ? - RESULT HTMLHEAD TITLE403 Forbidden/TITLE /HEADBODY H1Forbidden/H1 You don't have permission to access / on this server.P HR ADDRESSApache/1.3.22 Server at 127.0.0.1 Port 8080/ADDRESS /BODY/HTML - END Previous Comments: [2002-02-08 16:26:29] [EMAIL PROTECTED] What happens if you try with a valid HTTP request, or just 'GET', as the custom response? The script you gave below didn't work for me either, but did if I did either of: $request = GET /index.html HTTP/1.0\r\n\r\n; ...or... $request = GET; Can you try that and report back? Torben [2002-01-29 11:53:52] [EMAIL PROTECTED] When using curl to request a page, if I just set RETURNTRANSFER curlopt, things work as expected (output is dumped into a variable). If I just set CUSTOMREQUEST, thinks work as expected (output is dumped to stdout). However, if I set RETURNTRANSFER and CUSTOMREQUEST at the same time, I get no output. The request is made, according to my apache logs, but I get nothing. Here is some demo code: ? $c = curl_init(); $request = ''; $request .= 'GET /testfiles/phptest.php' . \r\n; curl_setopt($c, CURLOPT_URL, 'http://localhost:8080/testfiles/phptest.php'); curl_setopt($c, CURLOPT_CUSTOMREQUEST, $request); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); echo trim( curl_exec($c) ); curl_close($c); ? That is an example of a request that will not work. Comment either one of the curl_setopt lines out and it will. Thanks, robert -- Edit this bug report at http://bugs.php.net/?id=15279edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Bug #15279 Updated: RETURNTRANSFER and CUSTOMREQUST do not play well together
ID: 15279 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: Documentation problem Operating System: Linux PHP Version: 4.1.1 Assigned To: torben New Comment: Yes, actually, that is what I would have expected it to return, since my machine doesn't have any index file in the root director. Only, I would have expected it in all three cases, but I guess you caught that :) Anyhow, it appears you are right, and that I am misusing the CUSTOMREQUEST option. Your example executed as expected. I looked at the curl_easy_setopt manpage and confirmed this (why I had not caught this before from the man page is a good question). The strange thing is that I have been using CUSTOMREQUEST on a machine running 4.0.6 to post XML in a fashion such as this: $xml = ''; $xml .= POST /somepath HTTP/1.1\r\n; $xml .= Host: somehost\r\n; $xml .= Content-Type: text/xml\r\n; $xml .= \r\n $xml .= $xmldoc; ... curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request); ... Anyhow, I feel really silly now; I should have seen this answer long before now. But at least I know why I haven't been able to duplicate the behavior of the one machine that is working, though why it is working is an interesting question. Thanks, robert Previous Comments: [2002-02-08 17:08:05] [EMAIL PROTECTED] Scratch the first paragraph of my last post. :) Torben [2002-02-08 17:01:43] [EMAIL PROTECTED] Well, in the first place, the results below show that it did in fact work for you, but that your server isn't set up to provide a directory listing of the root dir and also doesn't have an index file there. A bit more research shows that valid values for CURLOPT_CUSTOMREQUEST are things like 'GET', 'HEAD', 'DELETE', and so on. You should not enter the whole request line, and you should not enter any newlines/carriage returns. If the following script works for you, I will reclassify this as a documentation problem. ?php error_reporting(E_ALL); $c = curl_init(); $request = GET; curl_setopt($c, CURLOPT_URL, 'http://localhost:8080/testfiles/phptest.php'); curl_setopt($c, CURLOPT_CUSTOMREQUEST, $request); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); echo trim(curl_exec($c)); curl_close($c); ? Torben [2002-02-08 16:42:03] [EMAIL PROTECTED] Sure. Here are some very simple runs and results. I do not think that any request will ever work. - START - SRC ? $curl = curl_init(); $request = 'GET' . \r\n; curl_setopt($curl, CURLOPT_URL, 'http://localhost:8080/'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request); $data = curl_exec ($curl); echo $data . \r\n; ? - RESULT [BLANK] - END - START - SRC ? $curl = curl_init(); $request = 'GET' . \r\n; curl_setopt($curl, CURLOPT_URL, 'http://localhost:8080/'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec ($curl); echo $data . \r\n; ? - RESULT !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN HTMLHEAD TITLE403 Forbidden/TITLE /HEADBODY H1Forbidden/H1 You don't have permission to access / on this server.P HR ADDRESSApache/1.3.22 Server at 127.0.0.1 Port 8080/ADDRESS /BODY/HTML - END - START - SRC ? $curl = curl_init(); $request = 'GET' . \r\n; curl_setopt($curl, CURLOPT_URL, 'http://localhost:8080/'); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request); $data = curl_exec ($curl); ? - RESULT HTMLHEAD TITLE403 Forbidden/TITLE /HEADBODY H1Forbidden/H1 You don't have permission to access / on this server.P HR ADDRESSApache/1.3.22 Server at 127.0.0.1 Port 8080/ADDRESS /BODY/HTML - END [2002-02-08 16:26:29] [EMAIL PROTECTED] What happens if you try with a valid HTTP request, or just 'GET', as the custom response? The script you gave below didn't work for me either, but did if I did either of: $request = GET /index.html HTTP/1.0\r\n\r\n; ...or... $request = GET; Can you try that and report back? Torben [2002-01-29 11:53:52] [EMAIL PROTECTED] When using curl to request a page, if I just set RETURNTRANSFER curlopt, things work as expected (output is dumped into a variable). If I just set CUSTOMREQUEST, thinks work as expected (output
[PHP-DEV] Bug #15279: RETURNTRANSFER and CUSTOMREQUST do not play well together
From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.1.1 PHP Bug Type: cURL related Bug description: RETURNTRANSFER and CUSTOMREQUST do not play well together When using curl to request a page, if I just set RETURNTRANSFER curlopt, things work as expected (output is dumped into a variable). If I just set CUSTOMREQUEST, thinks work as expected (output is dumped to stdout). However, if I set RETURNTRANSFER and CUSTOMREQUEST at the same time, I get no output. The request is made, according to my apache logs, but I get nothing. Here is some demo code: ? $c = curl_init(); $request = ''; $request .= 'GET /testfiles/phptest.php' . \r\n; curl_setopt($c, CURLOPT_URL, 'http://localhost:8080/testfiles/phptest.php'); curl_setopt($c, CURLOPT_CUSTOMREQUEST, $request); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); echo trim( curl_exec($c) ); curl_close($c); ? That is an example of a request that will not work. Comment either one of the curl_setopt lines out and it will. Thanks, robert -- Edit bug report at: http://bugs.php.net/?id=15279edit=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] Re: [PHP] RFE: $HTTP_POST_VARS = $_POST;
I agree about needing to clean up some of the other PHP ini options first. I started creating an uber-clean project not long ago, with my first goal being to get PHP into a 'known-good' state no matter what the end-user has set up as a configuration option. E_ALL E_NOTICE track_vars ON register_globals OFF magic_quotes OFF I tried some of the options listed in... http://www.php.net/manual/en/configuration.php ...but was disappointed that not all options can be set by a script. It appears as though register_globals must be set using a configuration directive, and all of the .htaccess files I tried to create caused apache to give back 500's Internal Server Errors. (Probably because I'm really bad at configuring apache ;^) As it stands right now, I'm thinking of: ?php $exemptions = array( 'GLOBALS', '_GET', '_POST', '_REQUEST', ... ); foreach( array_keys( $GLOBALS ) as $to_clear ) { if( !in_array( $exemptions, $to_clear ) ) unset($$to_clear); } ? To 'fake' unregistering all globals at the script level. Personally, I'm in favor of removing the HTTP_*_VARS (or at least having the option to remove them) because they are scheduled for depracation. Right now, it's a mess to have to deal with both types of variables, especially in new projects, and if people are not supposed to be using them, might as well let them be turned off. :^) The other exciting thing I've heard about is the ability to su for scripts, especially for PHP scripts which I write, hoping that they can place data into the user's home directory (ie: a photo album thumbnailer and manager). I haven't downloaded and played with that extension yet, but it fills an important gap to be able to su $owner within a PHP script. --Robert On Fri, 25 Jan 2002 03:29:11 -0600, Yasuo Ohgaki wrote: Derick Rethans wrote: Are we going to depreciate long track vars? Does anyone mind if I add ini option long_track_vars to turn on and off long track vars? Why do we need it? Since I use Japanese for my web sites. I usually convert all user inputs to different format. For example, multi-byte(full width) number to single-byte(half width) number. If there are $HTTP_*_VARS, I could end up with having 2 different values even if I don't need old values. If $HTTP_*_VARS does not exist, I can save memory CPU time a bit. (sometimes a lot) However, I also think it may *not* be a good idea. If there is a ini option for disabling long track vars, PHP application developers may have headache with this... It may be ok for PHP5, though. Anyway, I'll wait for a while. We need to fix variables_order and register_globals issue first. -- 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: RFE: $HTTP_POST_VARS = $_POST;
Does PHP also perform shallow copy-on-write for values passed as parameters to functions? ?php $text = ...shakespeare...; function blah( $copy ) { echo $copy; } blah( $text ); ? Some of the guys I work with like to use: function( $copy ) in order to save the hypothetical storage space required to duplicate $text into $copy, but from earlier discussion, blah() might not get a full copy of $text unless the function body was: $copy .= '!';, thus making two copies of $text. It's almost time for me to start downloading the source tarballs and answering these questions myself. ;^) Thanks again for all your patience. --Robert On Fri, 25 Jan 2002 15:48:54 -0600, Christian Dickmann wrote: Andi Gutmans [EMAIL PROTECTED] wrote PHP 5 per-class constants can already except static arrays such as array(1, 2, 3) as their value. I'll put the issue of global constants on my TODO and believe PHP 5 will also support these for global constants. However, you won't be able to create a constant with a non-constant value such as $_GET as this goes against the whole idea of constant :) This is not true to my mind. define (INC_DIR,$foo); this Constant is not predefined by the developer, BUT it is a constant-value for the rest of the script. To my mind such constants make sense, because - they are global - they can't change their value while execution - it doesn't matter if the constant-value is set dynamically when defining it So I would be glad to see this feature in PHP5. -- 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] RFE: $HTTP_POST_VARS = $_POST;
This is the second time in as many weeks that we have been bitten by the fact that $_POST != $HTTP_POST_VARS; Attached is a real-world example of why it is currently bad practice to use the _POST variables. I cannot recommend that anyone use $_POST[..] in their scripts. $GLOBALS['HTTP_POST_VARS'][..] is a much safer, portable, and sane solution, unless $HTTP_POST_VARS is marked as depracated, scheduled to be phased out. For those new to the problem, $_GET and $HTTP_GET_VARS are two totally separate arrays which happen to hold the same data at the beginning of script execution. After script execution has begun, it is VERY DANGEROUS to modify the data contained in either of these arrays, because changes in one are not propagated to the other. The simplest example script is: ?php echo $_GET['test']; echo $HTTP_GET_VARS['test']; $_GET['test'] = 'changed.'; echo $_GET['test']; echo $HTTP_GET_VARS['test']; ? ...The second set of echo statements will print two different values. The situation is worse when you are trying to integrate the usage of $_GET/$_POST into scripts which already make use of $HTTP_*_VARS. The following script is my real-world example of a difficult to trace logic bug caused by $_POST != $HTTP_POST_VARS. The situation is that we have a form with a radio button toggling between two input elements as follows. PRICING: ( ) Fixed: $[__] ( ) Negot: $[__] The radio field is named option, and the two input fields are named asking1 and asking2 respectively. On the back end, we store whether the user selected fixed or negotiable, and then 'push' asking1 or asking2 into a variable called asking_price. We don't care which field they type the price into, but asking1 and asking2 must be named differently so that the browser will not stomp asking prices over each other when posting the information. Our function gpc stands for Get/Post/Cookie, and is very similar to the new $_REQUEST array, except that it returns FALSE if nothing was posted, preventing us from having to do: if( isset($_REQUEST['blah']) ) $result = $_REQUEST['blah']; (because we run with E_NOTICE E_ALL, and have register_globals turned off) ...instead, we can say: $result = gpc('blah'); ...anyway, we've been using PHP for a while now (since well before 4.1 ;^), and already have many many scripts and libraries which use the HTTP_*_VARS method of accessing things. It is unsafe to use $_GET and $HTTP_GET_VARS in the same environment. My proposed solutions again: 1) Temporary workaround: $HTTP_GET_VARS = $_GET; 2) Throw an E_NOTICE if $HTTP_*_VARS or $_* is used as the left-hand side of an assignment. (ie: officially discourage changing $HTTP_*_VARS) 3) Propagate any changes made to $_GET over to $HTTP_GET_VARS and $_REQUEST. #1 works for the most part, but changes is $_GET are not propagated into $_REQUEST, which opens the door for more data inconsistency issues. #2 could possibly be implemented by making $HTTP_*_VARS and $_* into constants... forcing them to be read only. #3 sounds like it would be annoying to implement, but would make it easiest for end-users to use PHP, and have some nice things happen 'magically'. --Robert (crossposting to php.general because I'm sure other people might be running into this problem as well). ?PHP ## example script /* return the user-submitted value of $varname, or false if not found */ function gpc( $varname ) { if( isset( $GLOBALS['HTTP_GET_VARS'][$varname] ) ) return( $GLOBALS['HTTP_GET_VARS'][$varname]; elseif( isset( $GLOBALS['HTTP_POST_VARS'][$varname] ) ) return( $GLOBALS['HTTP_POST_VARS'][$varname]; elseif( isset( $GLOBALS['HTTP_COOKIE_VARS'][$varname] ) ) return( $GLOBALS['HTTP_COOKIE_VARS'][$varname]; else return( FALSE ); } $option = gpc('price_option'); if ( $option == 'fixed' ) { $_POST['asking_price'] = isset($_POST['asking1']) ? $_POST['asking1'] : ''; } elseif ( $option == 'negotiable' ) { $_POST['asking_price'] = isset($_POST['asking2']) ? $_POST['asking2'] : ''; } $price = gpc('asking_price'); echo User chose $option, with a price of $price; echo (but we really only changed ${_POST['asking_price']}, so gpc() doesn't know that!) ? -- 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: RFE: $HTTP_POST_VARS = $_POST;
Thanks for your responses (again), it is an unfortunate situation that $HTTP_*_VARS must be retained for backwards compatibility until at least the hypothetical PHPv5.0 mark. Having also read in this group that define() does not support complicated constants, I'm guessing that it's not currently possible to force all predefined variables to be read only (although that seems like the best solution in the long run). Regarding the documenation- it is not clear, and is not emphasized that the arrays are disjoint. Note: Some of these arrays had old names, e.g. $HTTP_GET_VARS. These names still work, but we encourage users to switch to the new shorter, and auto-global versions. $HTTP_GET_VARS An associative array of variables passed to the current script via the HTTP GET method. $_GET An associative array of variables passed to the current script via the HTTP GET method. Automatically global in any scope. Introduced in PHP 4.1.0. ...this will be the last message I'll bother the lists with about this behaviour. I just wanted to make sure that you guys who are developing this stuff receive feedback about how this new behaviour is working out for people using the new versions of PHP. :^) I'm 100% in favor of treating these arrays as read-only, but it would be very nice if E_NOTICE's were thrown when builtin arrays are modified, or simply to treat them as unchangeable constants. Something to keep in mind if we ever get the ability to say: define( '_GET', $_GET ); ...which is interesting in itself... imagine: echo _GET['blah']; ...instead of: echo $_GET['blah']; ...since _GET/etc... are already auto-globals, and you don't want them to be used as left-hand-side values, it seems like they're very close to acting like constants already. Just a thought. ;^) Thanks a bunch! --Robert On Thu, 24 Jan 2002 16:01:24 -0600, Lars Torben Wilson wrote: On Thu, 2002-01-24 at 13:42, Rasmus Lerdorf wrote: I think the real answer here is to treat these as read-only arrays. ie. never use them on the left side of the '=' and you will never run into problems. Or if you do, be consistent and use the same array all the time. You are writing your code with the assumption that these two arrays are the same. Where does this assumption come from? Hopefully not the documentation. -Rasmus No, they are properly--if lightly--documented on the following pages: http://www.php.net/manual/en/language.variables.predefined.php http://www.php.net/release_4_1_0.php Robert, the $HTTP_*_VARS have, indeed, been deprecated, and this is noted in the manual. -- 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: RFE: $HTTP_POST_VARS = $_POST;
Mike- If you're a LAMP user, then this vi mapping might help you out ;^) :imap ~P $GLOBALS['HTTP_POST_VARS']['']Eschi ...and I believe I have addressed most of your points in my previous posting on the subject. Forgive me if you've already read it, or if it doesn't explain my position fully. http://marc.theaimsgroup.com/?l=php-devm=101061406505517w=2 To address your points: a) Yes, please. Add and E_NOTICE or E_WARNING if any predefined array is assigned to. A more radical approach would be to do away with $_GET, and use _GET instead (a global constant. see my post earlier today). b) There is a very good reason to mix the two. We have a site/project with at least 2000 scripts/files/directories. Some parts are old and stable. They use HTTP_*_VARS. In our newer code, we'd like to use $_GET and friends, but there's no guarantee that we aren't depending on changing $_GET or $HTTP_GET_VARS (for certain library functions, paging functions, sorting functions, etc). c) Therein lies the problem. I gave some thought to it and responded in my previous message (at the URL above), but my current opinion is that the best way to handle it is to treat all predefined variable arrays as constants, since changing all of them is officially frowned upon. :^) d) Vi is you friend. ;^) Thanks for your response, it's interesting to hear other people's opinions on the matter. --Robert On Thu, 24 Jan 2002 17:45:34 -0600, Mike Eheler wrote: I disagree based simply on two points: a) Ideally, the $HTTP_POST/GET and $_POST/$_GET vars should be treated as read only. b) There is no good reason to mix the two. Consistancy is the ideal. If you are working on an existing project, and you have the implied need to assign values to keys to request variables, then continue to use $HTTP_GET_VARS. There is no reason to *not* use $_GET/POST if you're working on a new project, and even less of a reason to MIX $HTTP_POST/GET and $_POST/GET. c) What would you expect to happen if you altered a request variable that was stuffed in $_REQUEST? d) $GLOBALS['HTTP_POST_VARS']['my_form_var'] is waaay too long. When I code, I want to complete it as quickly as I can, while maintaining quality. Things get too complex when I have to use 40 characters just to access a single variable. -- 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] Feature Suggestion
I think this feature already exists. Check out: http://www.php.net/manual/en/function.range.php Robert Zwink http://www.zwink.net/daid.php -Original Message- From: Mike Eheler [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 7:59 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Feature Suggestion If this is the wrong place for it, please point me to the right place. This is real small, though.. I'd like to see a shorthand for defining arrays.. for example $ucase_alphabet = array(['A'..'Z']); (creates an array of all alphabet characters, uppercase) $numeric = array([1..100]); Or something of that sort. Just something that popped into my mind. PHP feels like a language that has been built on little suggestions like this, so I thought I'd post it. :) Mike -- 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 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] Bug #15106: import_request_variables segfault...
From: [EMAIL PROTECTED] Operating system: Linux 2.4.10 PHP version: 4.1.1 PHP Bug Type: Reproducible crash Bug description: import_request_variables segfault... Usage of the import_request_variables function more than once with the same value for the method type and prefix string will produce a segfault. The example: html body ? @import_request_variables(g, ); foreach($_GET as $b=$c) print Key: $b | Value: $cbr\n; flush(); @import_request_variables(g, ); foreach($_GET as $b=$c) print Key: $b | Value: $cbr\n; ? /body /html The second foreach loop will never be reached and the flush() call will be ineffectual since the module segfaults and doesn't care about the buffer. The segfault only affects the php module and will NOT bring down the apache server. Although not shown here for space conservation, if by chance this is done via an include, the results are mixed. I have some that will cause a segfault ans some that don't and I haven't figured out the difference between them. Specifics: Apache 1.3.22 Linux 2.4.10 kernel PHP running as a DSO with apache using the php.ini-recommended with very few modifications (available on request if necessary) Thanks, --Robert -- Edit bug report at: http://bugs.php.net/?id=15106edit=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] Bogus/Bug #14952 ($_GET != $HTTP_GET_VARS)
I spoke briefly with Jan about the following (imho) mis-feature, who recommended bringing it up on the dev-list. http://bugs.php.net/?id=14952 I ran into the problem (as an end-user) while trying to muck with what the user had passed in (ie: spoof GET data from session-ized defaults if the user did not select anything). Why isn't it: $_GET = $HTTP_GET_VARS? Attached is my understanding of the problem. As it stands right now, I do not want to use $_GET constructs in my code because $_GET is not a drop-in replacement for: $GLOBALS['HTTP_GET_VARS'][...] ...which I assumed it was. No matter where I set a value for $GLOBALS['HTTP_GET_VARS'], it will be the same throughout script execution. With the addition of the $_GET class of variables, there are suddenly two copies of data, two areas to manage in your code. IMHO, it is a bad move for the data to be separated in the long run, especially when there is not a good reason for it. If the world were a perfect place (which it isn't, and I know it ;^) ... I would say that: $_GET = $GLOBALS['HTTP_GET_VARS']; $_POST = $GLOBALS['HTTP_POST_VARS']; $_COOKIE = $GLOBALS['HTTP_COOKIE_VARS']; $_REQUEST = array_merge( $_GET, $_POST, $_COOKIE ); I know that the last request (reference request to the results of a function) isn't really possible or feasible, but the first three definitely are. Another possible solution would be to throw an E_WARNING if $_GET or $GLOBALS['HTTP_GET_VARS'] is used as the left- hand side of an expression. This would make changing information within $_GET or $GLOBALS['HTTP_GET_VARS'] officially frowned upon, which would have alerted me to the fact that now in 4.1.1 there are two places where a GET/POST variable can be named and changed. Or, if $_GET/$HTTP_GET_VARS is detected as a left-hand side expression, call _internal_UPDATE_REQUEST( $key, $value ), to keep all arrays in sync. I wrote up some documentation about the $_* variables, which I would appreciate it if someone more knowledgeable about the inner workings of the $_GET stuff could look over it and let me know if there are any mistakes. I release that documentation to the PHP group under the same terms of license as the rest of PHP's documentation, so please feel free to integrate it if it is a welcome addition. I am not subscribed to this list (am using it through the news gateway now), so I might not receive any responses. I would appreciate being CC'd any relevant discussion. Thanks for everything so far, PHP rocks! :^) --Robert ([EMAIL PROTECTED] / [EMAIL PROTECTED]) Thank you for your response. I understand what the $_* arrays are for, but I still disagree. :^) echo $_GET['blah']; echo $HTTP_GET_VARS['blah']; $HTTP_GET_VARS['blah'] = 'test'; function test() { echo $_GET['blah']; } test(); Why is the array data separate? There is no good reason, and several bad reasons. Good reasons to be separate: 1) You might want $_GET and $H_G_V to be different 2) [some random reason about internal PHP code] 3) does $_REQUEST get updated if $_GET/$_POST is updated too? Bad reasons to be separate: 1) takes twice as much memory 2) $_GET != $HTTP_GET_VARS after script execution begins 3) does $_REQUEST get updated if $_GET/$_POST is updated too? At the very least, this is a documentation bug because $_GET != $HTTP_GET_VARS should be mentioned at http://www.php.net/manual/en/language.variables.predefined.php Here is my stab at documentation for $_* vars. With the introduction of PHP 4.1.1 there are several variables introduced which are guaranteed to be available in every function, no matter what the ini settings are. These variables are: $_GET, $_POST, and $_COOKIE, and contain the same information as their corresponding $HTTP_*_VARS arrays. The other variable introduced is $_REQUEST, which is a merged array of all GET/POST/COOKIE data. SPECIAL NOTE: Although the information contained in $_GET, $_POST, $_COOKIE, and $_REQUEST is initially the same as that found in $HTTP_GET_VARS, $HTTP_POST_VARS, and $HTTP_COOKIE_VARS, changes in one array do not impact changes in any other array. It is considered a bug, hack, or workaround to *set* any value in any of these arrays. (do not use them as a left-hand-side in any expression). This will make your code more readable, more maintainable, and more useful to other script authors. Converting from older styles... === Assume that you have a script which takes a single parameter, 'blah'. In global scope: echo $blah; = echo $_REQUEST['blah']; echo $GLOBALS['blah']; = echo $_REQUEST['blah']; echo $HTTP_GET_VARS['blah'] = echo $_GET['blah']; echo $GLOBALS['HTTP_GET_VARS']['blah'] = echo $_GET['blah']; In function scope: function demonstration() { global $blah, $HTTP_GET_VARS; // 1: using global operator from above echo $blah; // 2: using array HTTP_GET_VARS from global scope echo $HTTP_GET_VARS['blah']; // 3: using no special functions
[PHP-DEV] Bug #14674: $HTTP_POST_VARS not finding all posted variables
From: [EMAIL PROTECTED] Operating system: Windows 2000 Pro PHP version: 4.1.0 PHP Bug Type: Variables related Bug description: $HTTP_POST_VARS not finding all posted variables - Win2K Pro, running Apache 1.3.22 (standard Win32 setup) - PHP 4.1.0, Win32 Binaries -- no changes to ini file (except include_path = and SMTP = - WHAT I DID: I created a simple html form with the POST method: html body form action=test1.php method=post input type=radio name=radiobutton value=TrueTrue input type=radio name=radiobutton value=FalseFalse input type=submit name=submitbutton value=Submit /form /body /html Next I created test1.php to receive those posted variables (as you can see I tried several methods of checking them): ? foreach ($HTTP_POST_VARS as $var = $value) { echo $var = $valuebr\n; } echo PValues submitted via POST method:br; reset ($HTTP_POST_VARS); while (list ($key, $val) = each ($HTTP_POST_VARS)) { echo $key = $valbr; } ? - WHAT I WANTED TO HAPPEN: I wanted to use the $HTTP_POST_VARS array to validate the form. If the end user forgets to select one of the radio button options, that should show up in $HTTP_POST_VARS as a variable with a value, which would allow me to post a validation error message to the user. - WHAT ACTUALLY HAPPENED: If the end user forgets to select one of the radio options, the posted variable doesn't show up in $HTTP_POST_VARS !! The output of the php script is: // begin test1.php output (with no radio button selected): submitbutton = Submit Values submitted via POST method: submitbutton = Submit // end test1.php output If one of the buttons is pre-selected, it will show up as a variable in the $HTTP_POST_VARS. Here is the output: //begin test1.php output (with radio button selected): radiobutton = False submitbutton = Submit Values submitted via POST method: radiobutton = False submitbutton = Submit // end test1.php output (with radio button pre-selected) -WHY THIS IS A SERIOUS PROBLEM: As I'm sure you can imagine, this makes it impossible to create a generic validation script that is capable of validating radio buttons. If I create a simple $radiobutton variable (the same name as the form input), It will work to validate the form if the user has not remembered to select a radio button. But this will require me to manually validate radio buttons in my script, rather than being able to create and use a generic validation script. I've created a generic script in ASP that uses the request.form method to validate all form fields and it works properly with radio buttons. Also, I've tested the $HTTP_POST_VARS array with all other input types, and it finds all other posted variables, even if they are blank. What can I do? -- Edit bug report at: http://bugs.php.net/?id=14674edit=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] Bug #14674 Updated: $HTTP_POST_VARS not finding all posted variables
ID: 14674 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: Variables related Operating System: Windows 2000 Pro PHP Version: 4.1.0 New Comment: Hi Derick: Thanks for responding so quickly. I'm a little confused. If I create an ASP script, it is able to see the variable of a blank, unselected radio button without difficulty. And that is using the same browser -- so it is definitely sending all of the form variables. I'm probably missing something, but why would it work in ASP and not in PHP? Is there anything I can do to help? Previous Comments: [2001-12-23 12:23:13] [EMAIL PROTECTED] This is not a bug in PHP, but a browser issue. You can either set one radio button as a default value, or you can use: if (isset ($HTTP_POST_VARS['radiobutton'])) { } to see if it is set at all. But as the browser does not send the parameter (I tested this), there is little PHP can do if it doesn't see it. Derick [2001-12-23 12:18:31] [EMAIL PROTECTED] - Win2K Pro, running Apache 1.3.22 (standard Win32 setup) - PHP 4.1.0, Win32 Binaries -- no changes to ini file (except include_path = and SMTP = - WHAT I DID: I created a simple html form with the POST method: html body form action=test1.php method=post input type=radio name=radiobutton value=TrueTrue input type=radio name=radiobutton value=FalseFalse input type=submit name=submitbutton value=Submit /form /body /html Next I created test1.php to receive those posted variables (as you can see I tried several methods of checking them): ? foreach ($HTTP_POST_VARS as $var = $value) { echo $var = $valuebr\n; } echo PValues submitted via POST method:br; reset ($HTTP_POST_VARS); while (list ($key, $val) = each ($HTTP_POST_VARS)) { echo $key = $valbr; } ? - WHAT I WANTED TO HAPPEN: I wanted to use the $HTTP_POST_VARS array to validate the form. If the end user forgets to select one of the radio button options, that should show up in $HTTP_POST_VARS as a variable with a value, which would allow me to post a validation error message to the user. - WHAT ACTUALLY HAPPENED: If the end user forgets to select one of the radio options, the posted variable doesn't show up in $HTTP_POST_VARS !! The output of the php script is: // begin test1.php output (with no radio button selected): submitbutton = Submit Values submitted via POST method: submitbutton = Submit // end test1.php output If one of the buttons is pre-selected, it will show up as a variable in the $HTTP_POST_VARS. Here is the output: //begin test1.php output (with radio button selected): radiobutton = False submitbutton = Submit Values submitted via POST method: radiobutton = False submitbutton = Submit // end test1.php output (with radio button pre-selected) -WHY THIS IS A SERIOUS PROBLEM: As I'm sure you can imagine, this makes it impossible to create a generic validation script that is capable of validating radio buttons. If I create a simple $radiobutton variable (the same name as the form input), It will work to validate the form if the user has not remembered to select a radio button. But this will require me to manually validate radio buttons in my script, rather than being able to create and use a generic validation script. I've created a generic script in ASP that uses the request.form method to validate all form fields and it works properly with radio buttons. Also, I've tested the $HTTP_POST_VARS array with all other input types, and it finds all other posted variables, even if they are blank. What can I do? Edit this bug report at http://bugs.php.net/?id=14674edit=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] Bug #14234: E mail sent date is incorrect
From: [EMAIL PROTECTED] Operating system: Window 2000 PHP version: 4.0.6 PHP Bug Type: Date/time related Bug description: E mail sent date is incorrect I am trying to develop an application to send email. We have it on a machine with Window 2000 OS and Apache ver. 1.3.19. The email sends fine except the physical email's sent date and time are incorrect. Any help would be greatly appreciated. -- Edit bug report at: http://bugs.php.net/?id=14234edit=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] Bug #14234 Updated: the make des not compile
ID: 14234 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Duplicate Bug Type: Date/time related Operating System: SuSE 7.2 PHP Version: 4.0.6 New Comment: The server time is correct Previous Comments: [2001-11-26 10:57:27] [EMAIL PROTECTED] most likely a duplicate of #8909 http://bugs.php.net/bug.php?id=8909 [2001-11-26 10:37:48] [EMAIL PROTECTED] Dump question: Is your system time set correctly? [2001-11-26 10:36:15] [EMAIL PROTECTED] I am trying to develop an application to send email. We have it on a machine with Window 2000 OS and Apache ver. 1.3.19. The email sends fine except the physical email's sent date and time are incorrect. Any help would be greatly appreciated. Edit this bug report at http://bugs.php.net/?id=14234edit=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] Bug #14234 Updated: the make des not compile
ID: 14234 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Duplicate Bug Type: Date/time related Operating System: SuSE 7.2 PHP Version: 4.0.6 New Comment: I couldn't locate the parameter to change the mail() commands date sent. Please advise.. Thanks, Previous Comments: [2001-11-26 11:07:45] [EMAIL PROTECTED] The server time is correct [2001-11-26 10:57:27] [EMAIL PROTECTED] most likely a duplicate of #8909 http://bugs.php.net/bug.php?id=8909 [2001-11-26 10:37:48] [EMAIL PROTECTED] Dump question: Is your system time set correctly? [2001-11-26 10:36:15] [EMAIL PROTECTED] I am trying to develop an application to send email. We have it on a machine with Window 2000 OS and Apache ver. 1.3.19. The email sends fine except the physical email's sent date and time are incorrect. Any help would be greatly appreciated. Edit this bug report at http://bugs.php.net/?id=14234edit=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] Bug #14234 Updated: the make des not compile
ID: 14234 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Duplicate Bug Type: Date/time related Operating System: SuSE 7.2 PHP Version: 4.0.6 New Comment: The time appearing is 16 hours behind I don't know if this helps. Previous Comments: [2001-11-26 14:23:38] [EMAIL PROTECTED] I couldn't locate the parameter to change the mail() commands date sent. Please advise.. Thanks, [2001-11-26 11:07:45] [EMAIL PROTECTED] The server time is correct [2001-11-26 10:57:27] [EMAIL PROTECTED] most likely a duplicate of #8909 http://bugs.php.net/bug.php?id=8909 [2001-11-26 10:37:48] [EMAIL PROTECTED] Dump question: Is your system time set correctly? [2001-11-26 10:36:15] [EMAIL PROTECTED] I am trying to develop an application to send email. We have it on a machine with Window 2000 OS and Apache ver. 1.3.19. The email sends fine except the physical email's sent date and time are incorrect. Any help would be greatly appreciated. Edit this bug report at http://bugs.php.net/?id=14234edit=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] Bug #14005: missing possibility to store mails on imap-server
From: [EMAIL PROTECTED] Operating system: linux PHP version: 4.0.4 PHP Bug Type: Feature/Change Request Bug description: missing possibility to store mails on imap-server I found it impossible to store mails on an imap server (to e.g. implement some kind of sent objects-folder) with php's imap functions. -- Edit bug report at: http://bugs.php.net/?id=14005edit=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: Bug #12868 Updated: Appendix G Descrepancies..
That's nice -- but.. since the manual states that it is not a good idea to use the alias.. I would think the manual should at the very least, indicate which is which.. In addition, there is a lot of duplicates in the alias list.. To say that it doesn't matter which is which, and then to say not a good idea is sorta silly... After all the whole reason in listing what aliases to what, is to let developers no which functions are now obsolete, while still allowing the older functions in older scripts to operate.. So, in short, It does matter how it's documented.. if function x was removed (all together) and this was documented backward or unclearly you have a lot scripts that just quit functioning.. and this then falls back on those who maintain the documentation. As a developer, good clear and more importantly correct documentation is important. Now as for chop and rtrim.. the function definition for chop() indicates the exact opposite --- according the chop function information it is the alias.. while the appendix states it's the master --- For those who have been authoring PHP for sometime, this is no big deal.. but for the new user it becomes important that they know the difference.. At 05:28 AM 8/21/01 +, you wrote: ID: 12868 Updated by: joey Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Documentation problem Operating System: win32 PHP Version: 4.0.6 New Comment: I don't understand why it matters which is the 'master' and which is the alias? I would guess that the reason for the inconsistency in the documentation is that it really doesn't matter which is which, so the doc team is not all that careful about it. But that's just a guess...this wouldn't be all that hard to clear up. FWIW, rtrim() is an alias to chop() and fputs() is an alias to fwrite(). Previous Comments: [2001-08-21 00:12:18] [EMAIL PROTECTED] This is truly a followup to my previous post - message about what appears to be descrepancies in Appendix G.. which has further some confusion as to which functions are truly an alias and which is the master function.. I guess I need to understand what the master function is supposed to be, and what an alias is supposed to be. Perhaps I have these backwards, and thus the confusion, but some of this doesn't quite set right.. The first function in the list (chop) is labeled as the master function, and it's alias as (rtrim).. but when you go to the master function, (chop) it's documentation indicates it's the alias. and to see rtrim for details. There are some functions in this list like - fwrite() and fputs() - where fwrite is labled as the master and fputs the alias.. while the documentaion for both functions do not indicate either as an alias.. This goes on.. naturally some of these make perfect sense, if you looke at is_double() marked as a master - having aliases of is_float() and is_real().. the documentation corresponds perfectly.. i.e. if you call up is_float() or is_real() it directs you to is_double().. which brings some understanding back. and jives with what I would preceive as the relationship between a master function and an alias. Input on this matter would greatly be appreciated.. thanks a bunch. ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=12868edit=2 Kind Regards Robert J Sherman DBA SnR Graphics 827 W 13th St Joplin, MO 64804 417.626.7759 ph 877.626.9876 toll free (US and Canada) [EMAIL PROTECTED] SnR Graphics Low Cost Solutions to Web Development http://www.snr-graphics.com/ -- 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] Bug #7280 Updated: global iniline not supported in SGI Compiler
ID: 7280 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: Compile Failure Operating System: SGI IRIX 6.5.8 PHP Version: 4.0.4 New Comment: Hi, I've tested it with PHP-4.0.7-cvs (snapshot of 2001/08/06) and it appears to be fixed. Thanks! Note: PHP-4.0.6 still had the bug. Robert Marchand Université de Montréal Previous Comments: [2001-08-04 00:04:02] [EMAIL PROTECTED] Fixed in CVS. [2001-04-16 06:09:36] [EMAIL PROTECTED] same as 5882. There is a fix included Stas or andi you responded to 5882 perhaps you can look at the fix. - James [2001-01-03 11:59:14] [EMAIL PROTECTED] Hi, I didn't have time to check it before. The bug is still there with php 4.0.4 (exactly the same as already described) and the line #define inline __inline is still in main/php_config.h. Changing it for #define inline work as before. Do I have to add some flag to the configure line? Thanks. [2000-12-30 20:20:09] [EMAIL PROTECTED] No feedback. If this happens with PHP 4.0.4 reopen this bug report. --Jani [2000-11-21 06:12:07] [EMAIL PROTECTED] Please try the latest snapshot from http://snaps.php.net/ as this should be fixed now. --Jani The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=7280 Edit this bug report at http://bugs.php.net/?id=7280edit=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] Bug #12576: php_pdf.dll is expired
From: [EMAIL PROTECTED] Operating system: Windows 98 PHP version: 4.0.6 PHP Bug Type: *PDF functions Bug description: php_pdf.dll is expired I have PHP 4.0.6 installed on a Windows 98 System with gd,pdf and zlib extensions. When I try to call a function from the pdflib it says: Fatal error: PDFlib error: Beta expired - retrieve new version from www.pdflib.com in .php on line 4 On that website I found the following information: 2001-05-18: PDFlib 4.0.0 accidentally contains a time-bomb feature from the beta test which makes PDFlib 4.0.0 expire in July 2001. The php_pdf.dll you can download from www.pdflib.com is not free and displays a message across all pdf-pages. They offer a patch on that website, but that does not work with windows dll's. Please add a working php_pdf.dll to your PHP-distribution for win32. Thanks, Robert Grellmann -- Edit bug report at: http://bugs.php.net/?id=12576edit=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] Bug #12577: cpdf_import_jpeg() not working at all
From: [EMAIL PROTECTED] Operating system: Windows 98 PHP version: 4.0.6 PHP Bug Type: ClibPDF related Bug description: cpdf_import_jpeg() not working at all I wrote a script using the cpdf_* functions and everything is working fine. Only the cpdf_import_jpeg() function does not produce any output at all. There is no error message. I called the function like this: $pdf = cpdf_open(0); cpdf_page_init($pdf,1,0,842,595,1); cpdf_import_jpeg($pdf,image.jpg,10,10,0,300,109,0,0,1); cpdf_finalize($pdf); Header(Content-type: application/pdf); cpdf_output_buffer($pdf); cpdf_close($pdf); The pdf-file does not show anything. Thanks, Robert Grellmann -- Edit bug report at: http://bugs.php.net/?id=12577edit=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] Bug #11995 Updated: Conflict with MySQL - missing DLL?
ID: 11995 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: OCI8 related Operating System: Windows 2000 PHP Version: 4.0.6 New Comment: I was able to solve this problem by copying all of the DLLs in the DLL folder into C:\win-nt\system32\, and then rebooting. I still do not know which DLL was missing, but at least it now works. Previous Comments: [2001-07-09 21:14:52] [EMAIL PROTECTED] We're using a Windows 2000 server with IIS. We successfully installed the Oracle client software and PHP 4.0.6, and it was working for about two weeks, using both the OCI8 driver and the generic Oracle driver to access a remote database. Problems started when we installed MySQL 3.23.39. Now PHP can no longer locate the OCI8 extension or the Oracle extension, or at least that's the error message. I suspect that it actually is missing some other DLL, but I can't find any place where dependencies are documented. PHP successfully finds other extensions in the same extension directory, such as the pdf extension, so the path to the extension directory in php.ini must be ok. Oracle client software such as sqlplus still functions normally. PHP does not crash, and if the extensions are commented out in php.ini it operates normally. Edit this bug report at http://bugs.php.net/?id=11995edit=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] Bug #11995 Updated: Conflict with MySQL - missing DLL?
ID: 11995 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Status: Closed Bug Type: OCI8 related Operating System: Windows 2000 PHP Version: 4.0.6 Previous Comments: [2001-07-09 21:14:52] [EMAIL PROTECTED] We're using a Windows 2000 server with IIS. We successfully installed the Oracle client software and PHP 4.0.6, and it was working for about two weeks, using both the OCI8 driver and the generic Oracle driver to access a remote database. Problems started when we installed MySQL 3.23.39. Now PHP can no longer locate the OCI8 extension or the Oracle extension, or at least that's the error message. I suspect that it actually is missing some other DLL, but I can't find any place where dependencies are documented. PHP successfully finds other extensions in the same extension directory, such as the pdf extension, so the path to the extension directory in php.ini must be ok. Oracle client software such as sqlplus still functions normally. PHP does not crash, and if the extensions are commented out in php.ini it operates normally. Edit this bug report at http://bugs.php.net/?id=11995edit=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] Bug #11995: Conflict with MySQL - missing DLL?
From: [EMAIL PROTECTED] Operating system: Windows 2000 PHP version: 4.0.6 PHP Bug Type: OCI8 related Bug description: Conflict with MySQL - missing DLL? We're using a Windows 2000 server with IIS. We successfully installed the Oracle client software and PHP 4.0.6, and it was working for about two weeks, using both the OCI8 driver and the generic Oracle driver to access a remote database. Problems started when we installed MySQL 3.23.39. Now PHP can no longer locate the OCI8 extension or the Oracle extension, or at least that's the error message. I suspect that it actually is missing some other DLL, but I can't find any place where dependencies are documented. PHP successfully finds other extensions in the same extension directory, such as the pdf extension, so the path to the extension directory in php.ini must be ok. Oracle client software such as sqlplus still functions normally. PHP does not crash, and if the extensions are commented out in php.ini it operates normally. -- Edit bug report at: http://bugs.php.net/?id=11995edit=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] Bug #10530: shmop.c: shmop_open() with mode a is miscoded
From: [EMAIL PROTECTED] Operating system: Linux 2.4.4-pre5 PHP version: 4.0.4pl1 PHP Bug Type: Unknown/Other Function Bug description: shmop.c: shmop_open() with mode a is miscoded file: php4/ext/shmop/shmop.c The documentation states two modes for shmop_open(). a and c. While c is usefull for creation (and access), a is programmed incorrect and misdocumented (for access and other uses). Currently a is inserting the IPC_EXCL flag for (system) shmget(). This is completly useless, as IPC_EXCL is only operative when IPC_CREAT is set (which isn't). Further a inserts SHM_RDONLY for (system) shmat(). This makes an read-only attach instead of a read-write, which does not need any flags. Proposal: To let the a do what it is intended for remove line 117 and 118 from shmop.c. Furthermore the documentation could be more precise: a does never create a shm segment, while c maybe creates one. Other usefull changes to the code in this respect would brake the interface (as it is _used_ now...). Bye, Robert -- Edit Bug report at: http://bugs.php.net/?id=10530edit=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] dynamic pulldowns from DB
A little help from anyone please. I know this was discussed before but I can't find it now that I need it. I want to dynamically populate a pulldown list from a mysql query based on what is selected from another pulldown list populated by a query from mysql. If the first choice is changed a different list of option is populated in the second. Please help! Robert -- 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] Dynamic Pulldown lists
A little help from anyone please. I know this was discussed before but I can't find it now that I need it. I want to dynamically populate a pulldown list from a mysql query based on what is selected from another pulldown list populated by a query from mysql. If the first choice is changed a different list of option is populated in the second. Please help! Robert -- 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] Bug #10287: php parser error
From: [EMAIL PROTECTED] Operating system: win nt + linux (debian) PHP version: 4.0.4pl1 PHP Bug Type: Scripting Engine problem Bug description: php parser error hi, i'm afraid i found (by chance :-) ) a parser error. look at this code: ? $ar1=array (1,2,3); $ar2=array (4,5,6); if(list($ar1_val)=each($ar1)list($ar2_val)=each($ar2)) echo "Ok"; else echo "Error"; ? php simply hangs by parsing that (i tried it on both win and linux - last release, 4.0.4pl1). the cure is to add more parenthesis, like this: if((list($ar1_val)=each($ar1))(list($ar2_val)=each($ar2))) but anyway, php should not hang in the first case... bye -- Edit Bug report at: http://bugs.php.net/?id=10287edit=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] Misc Functions
Hi all, Just a quick note to see if anyone has already written a function to calculate a 'standard deviation' or a 'weighted mean' function? I have created these functions as I could not find any references so if anybody wants/needs a copy simply say. Kind Regards Rob -- 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 4.0 Bug #9636 Updated: error message
Before doing that I tried making the directory cgi executable and adding "#!/usr/local/bin/php" to the scripts. That seemed to do the trick athough I didn't think this was the GCI version. Here is the output: http://www.lib.ecu.edu/st/php/test.php As far as I can tell, I'm set up for mySQL support Thanks for your help. -Original Message- From: Bug Database [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 21, 2001 2:41 PM To: [EMAIL PROTECTED] Subject: PHP 4.0 Bug #9636 Updated: error message ID: 9636 Updated by: sniper Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: Compile Failure Assigned To: Comments: Get the latest CVS snapshot (from today) add --enable-debug into your configure line and configure, 'make clean ; make ; make install' And then generate a GDB backtrace of the crash. (as it most likely is crashing) And if it happens with specific script, add the (shortest) possible script into this bug report that can be used to reproduce the crash. --Jani Previous Comments: --- [2001-03-08 19:09:37] [EMAIL PROTECTED] Please try the latest CVS snapshot from http://snaps.php.net/ --Jani --- [2001-03-08 15:03:06] [EMAIL PROTECTED] For Netscape Enterprise Server configuration: After installing all the necessary packages and running "./configure --with-mysql=/usr/local/mysql --with-nsapi= /opt/netscape/suitespot --enable-track-vars --enable-libgcc" When attempting to run "make" I get the following: # make Making all in Zend Making all in Zend /bin/sh ../libtool --silent --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I../main -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DXML_BYTE _ORDER=21 -I../TSRM -g -O2 -pthreads -c zend_language_scanner_cc.cc In file included from zend_language_scanner_cc.cc:2571: zend_operators.h: In function `int is_numeric_string(char *, int, long int *, do uble *)': zend_operators.h:84: implicit declaration of function `int finite(...)' make[1]: *** [zend_language_scanner_cc.lo] Error 1 make[1]: Leaving directory `/usr/local/php-4.0.4pl1/Zend' make: *** [all-recursive] Error 1 # Running gcc-2.95_2 Thanks, Bob Smith Computer Systems Administrator East Carolina University [EMAIL PROTECTED] (252) 328-0421 --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9636edit=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] RE: PHP 4.0 Bug #9636 Updated: error message
Thanks. I was able to configure and install, however I get the message from Netscape browser, "Document contains no data," and from IE, "The page cannot be displayed" when trying test.php. I followed the directions for editing mime.types and obj.conf. Is there any more documentation referencing Netscape Enterprise servers? -Original Message- From: Bug Database [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 7:10 PM To: [EMAIL PROTECTED] Subject: PHP 4.0 Bug #9636 Updated: error message ID: 9636 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Feedback Bug Type: Compile Failure Assigned To: Comments: Please try the latest CVS snapshot from http://snaps.php.net/ --Jani Previous Comments: --- [2001-03-08 15:03:06] [EMAIL PROTECTED] For Netscape Enterprise Server configuration: After installing all the necessary packages and running "./configure --with-mysql=/usr/local/mysql --with-nsapi= /opt/netscape/suitespot --enable-track-vars --enable-libgcc" When attempting to run "make" I get the following: # make Making all in Zend Making all in Zend /bin/sh ../libtool --silent --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I../main -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DXML_BYTE _ORDER=21 -I../TSRM -g -O2 -pthreads -c zend_language_scanner_cc.cc In file included from zend_language_scanner_cc.cc:2571: zend_operators.h: In function `int is_numeric_string(char *, int, long int *, do uble *)': zend_operators.h:84: implicit declaration of function `int finite(...)' make[1]: *** [zend_language_scanner_cc.lo] Error 1 make[1]: Leaving directory `/usr/local/php-4.0.4pl1/Zend' make: *** [all-recursive] Error 1 # Running gcc-2.95_2 Thanks, Bob Smith Computer Systems Administrator East Carolina University [EMAIL PROTECTED] (252) 328-0421 --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9636edit=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]
RE: [PHP-DEV] The new design
Title: RE: [PHP-DEV] The new design I like the new design, but it is critically flawed. In Netscape 4.75 linux and windows, Cut and Paste ability is no longer available for code samples. I've learned to rely heavily on cut and pasting PHP sample code when working with functionality I am new to. I realize you probably want people to type it out, but for more seasoned developers, it's a PITA we dont Needa. -B -Bob Kelly [EMAIL PROTECTED]