Re: [PHP-DEV] Should I fix this?
At 01:43 07.01.2003, Rickard Andersson wrote: getimagesize() blindly trusts the width and height specified in the header of gifs. You can just hexedit the file and set the width and height to any value and getimagesize() will believe that is the true size of the image. Even worse - Internet Explorer ignores the width and height in the header and thus it is possible to, for instance, upload a much larger image in an upload form that uses getimagesize() than what is allowed. I believe getimagesize() should just skip the header and read the size from the beginning of the Image Block. The advantage is that this would retrieve the correct size even for gifs with multiple images. On the other hand the disadvantage is speed loss. I'd be glad to write a patch for image.c (function php_handle_gif()), but I though I should ask you guys first. I wouldn't want to do it in vain. As it is now I've got PHP code that checks this for me to prevent malicious users from uploading huge avatars in my forum software. Your scenario described above seems like a reason to accept the the speed loss. So send an unified patch and we will have a look on it. regards marcus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZE2 dev snaps
On Mon, 6 Jan 2003, Stephan Seidt wrote: At least ./buildconf with --ZendEngine2 did never work for me. ;) I also did cvs co ZendEngine2 in php4 cvstree root. Did you rename ZendEngine2 to Zend? (Or make a symbolic link, after renaming the old Zend directory to something else) chregu Mark J. Hershenson wrote: Hi all, I know there are Win32+ZE2 Package snapshots on snaps.php.net, but I don't believe I've read why there isn't a ZE2 source code snapshot for everyone else. Checking out the source with CVS may not be the world's most difficult practice, but automating that process likely isn't either. ;) Is there a timeline for this, or is this being intentionally kept off the radar? -- mjh -- nam...christian stockeradr...pflanzschulstr. 31, ch-8004 zurich pho...+41 43 317 9984 www...http://phant.ch/chregu mob...+41 76 561 8860 [EMAIL PROTECTED] wor...+41 1 240 5670 gpg...0x5CE1DECB -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...
To be more precise - passed by handle. Andrey - Original Message - From: Leon Atkinson [EMAIL PROTECTED] To: John Wells [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 6:31 AM Subject: Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind... Any good links you could throw my way describing proposed changes? There are archives of the Zend Engine 2 list at zend.com: http://www.zend.com/lists.php There is one big change with objects that will break BC. Objects pass by reference instead of value, both for function calls and assignments. For example: ? class a {} function c($c) { $c-name = 'C'; } $a = new a; $b = $a; $a-name = A; print($a-name); $b-name = B; print($a-name); c($a); print($a-name); ? In ZE1 you get AAA. In ZE2 you get ABC. Leon --- Leon Atkinson http://www.leonatkinson.com/ -- 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] Should I fix this?
Marcus Börger schrieb: At 01:43 07.01.2003, Rickard Andersson wrote: getimagesize() blindly trusts the width and height specified in the header of gifs. You can just hexedit the file and set the width and height to any value and getimagesize() will believe that is the true size of the image. Even worse - Internet Explorer ignores the width and height in the header I'd be glad to write a patch for image.c (function php_handle_gif()), but I though I should ask you guys first. I wouldn't want to do it in vain. As it is now I've got PHP code that checks this for me to prevent malicious users from uploading huge avatars in my forum software. Your scenario described above seems like a reason to accept the the speed loss. So send an unified patch and we will have a look on it. Marcus: could you specify the speed loss? If it's noticeable I would rather suggest to either introduce a new function or another parameter to getimagesize(), no matter what the default is (e.g. let getimagesize() get the real size and introduce something like getimagesize_fast()) or the other way around. Regards, Sebastian Nohn -- [EMAIL PROTECTED] - http://nohn.net/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZE2 dev snaps
If you checkout php4-ze2 all this will be done automagically for you by the CVS server. Edin - Original Message - From: Christian Stocker [EMAIL PROTECTED] To: Stephan Seidt [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 10:00 AM Subject: Re: [PHP-DEV] ZE2 dev snaps On Mon, 6 Jan 2003, Stephan Seidt wrote: At least ./buildconf with --ZendEngine2 did never work for me. ;) I also did cvs co ZendEngine2 in php4 cvstree root. Did you rename ZendEngine2 to Zend? (Or make a symbolic link, after renaming the old Zend directory to something else) chregu Mark J. Hershenson wrote: Hi all, I know there are Win32+ZE2 Package snapshots on snaps.php.net, but I don't believe I've read why there isn't a ZE2 source code snapshot for everyone else. Checking out the source with CVS may not be the world's most difficult practice, but automating that process likely isn't either. ;) Is there a timeline for this, or is this being intentionally kept off the radar? -- mjh -- nam...christian stockeradr...pflanzschulstr. 31, ch-8004 zurich pho...+41 43 317 9984 www...http://phant.ch/chregu mob...+41 76 561 8860 [EMAIL PROTECTED] wor...+41 1 240 5670 gpg...0x5CE1DECB -- 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] Designing for PHP4 with PHP5 in mind...
On Mon, 6 Jan 2003, George Schlossnagle wrote: On Monday, January 6, 2003, at 09:48 PM, Brian Moon wrote: From what I understand, all OO code will have to be modified for PHP5. Constructors for example and no longer named the same as the class name. That alone means every class must be changed. I don't recall anyone saying it would be BC either, but I could be wrong. You're wrong. Yeah, he is :-) ZE2 will still call the Class() function if the __construct() is not avaialble. Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Should I fix this?
Marcus: could you specify the speed loss? If it's noticeable I would rather suggest to either introduce a new function or another parameter to getimagesize(), no matter what the default is (e.g. let getimagesize() get the real size and introduce something like getimagesize_fast()) or the other way around. Not before seeing the solution... I once thought about it, too. But i skipped the idea because i guessed i had to decompress the first block. At the time i was thinking about it we had the philosophy to exclude all patend related code... marcus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] string functions
On Sun, 5 Jan 2003, Leon Atkinson wrote: Because this behavior is not documented For the record, it is documented: http://www.php.net/manual/en/function.strstr.php If needle is not a string, it is converted to an integer and applied as the ordinal value of a character. Okay, a -1 on breaking this then. Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php 4.3.0 ext/oci8 -- OCI_SHARED patch
On Mon, Jan 06, 2003 at 01:42:15PM -0500, Levi Dixon wrote: For review: I've modified the following files to allow for use of OCI_SHARED in ext/oci8 module if OCI8_VERSION = 8.1, which will provide memory savings by sharing connection and statement data (refer to http://www.csee.umbc.edu/help/oracle8/server.815/a67846/basics.htm; search for Shared Data Mode) between connections and statments respectively. I only have access to ext/oci8, so I can't check this in: configure main/php_config.h.in ext/oci8/config.m4 ext/oci8/oci8.ca there should be no nned to change anything outside ext/oci8/ to make this work. configure is auto-generated. just go ahead and commit the stuff to ext/oci8 Note: I'm not familiar enough with the windows distribution to add the mod there. neither am i. re, tc -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP-DEV] Designing for PHP4 with PHP5 in mind...
Hello Dan, DH Just to prevent any misconception, the code executed through the ZE1 will DH actually be AAC rather than AAA. Please run this code and check it output! It will print AAA, because in function c() you have COPY of object `$a`, NOT reference (with ZE1). Best regards, Andrew Sitnikov e-mail : [EMAIL PROTECTED] GSM: (+372) 56491109 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZE2 dev snaps
I tried that but buildconf wasnt happy about some .mk files then. Ill try php4-ze2, thanks Edin. Edin Kadribasic wrote: If you checkout php4-ze2 all this will be done automagically for you by the CVS server. Edin - Original Message - From: Christian Stocker [EMAIL PROTECTED] To: Stephan Seidt [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 10:00 AM Subject: Re: [PHP-DEV] ZE2 dev snaps On Mon, 6 Jan 2003, Stephan Seidt wrote: At least ./buildconf with --ZendEngine2 did never work for me. ;) I also did cvs co ZendEngine2 in php4 cvstree root. Did you rename ZendEngine2 to Zend? (Or make a symbolic link, after renaming the old Zend directory to something else) chregu Mark J. Hershenson wrote: Hi all, I know there are Win32+ZE2 Package snapshots on snaps.php.net, but I don't believe I've read why there isn't a ZE2 source code snapshot for everyone else. Checking out the source with CVS may not be the world's most difficult practice, but automating that process likely isn't either. ;) Is there a timeline for this, or is this being intentionally kept off the radar? -- mjh -- nam...christian stockeradr...pflanzschulstr. 31, ch-8004 zurich pho...+41 43 317 9984 www...http://phant.ch/chregu mob...+41 76 561 8860 [EMAIL PROTECTED] wor...+41 1 240 5670 gpg...0x5CE1DECB -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- When ipv6 and tcpa are there.. When this Palladium server wrecks.. I won't be able to drink my coffe then! -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard filters.c
On Tue, 07 Jan 2003, Moriyoshi Koizumi wrote: moriyoshi Mon Jan 6 19:03:26 2003 EDT Modified files: /php4/ext/standardfilters.c Log: Implemented string.base64 stream filter @- Implemented string.base64 stream filter. (Moriyoshi) Couldn't you have used parts of ext/standard/base64.c here instead of duplicating code? -Andrei http://www.gravitonic.com/ The church is near but the road is icy; the bar is far away but I will walk carefully. -- Russian proverb -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: ZE2 , static variables and friends
Sorry for the example, man should read: echo How ? .test::$foo-$how; The problem still exists however. -- NetClub'ment votre Mickael BAILLY -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Include a file from inside an extension...
Hello, does someone understand if this is the right procedure to include a filename from inside a C extension? MAKE_STD_ZVAL(filename_z); ZVAL_STRING(filename_z, myfile.inc, 1); op = compile_filename(ZEND_INCLUDE, filename_z); zend_execute(op TSRMLS_CC); Thanks, Stefano -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php 4.3.0 ext/oci8 -- OCI_SHARED patch
Thies C. Arntzen [EMAIL PROTECTED] wrote... : I've modified the following files to allow for use of OCI_SHARED in ext/oci8 module if OCI8_VERSION = 8.1, which will provide memory savings by sharing connection and statement data (refer to http://www.csee.umbc.edu/help/oracle8/server.815/a67846/basics.htm; search for Shared Data Mode) between connections and statments respectively. I only have access to ext/oci8, so I can't check this in: Haven't really played with it, but the possiblity of some thread issues come into my mind. How have you tested it? configure main/php_config.h.in ext/oci8/config.m4 ext/oci8/oci8.ca there should be no nned to change anything outside ext/oci8/ to make this work. configure is auto-generated. just go ahead and commit the stuff to ext/oci8 It should only be within the ext/oci8/oci8.c thing, I presume. We are talking about a flag for OCI(?)Logon function, right? Note: I'm not familiar enough with the windows distribution to add the mod there. neither am i. Unless it requires loading something particular during the compilation, windows distribution shouldn't differ in any way. What I still keep wondering is the thread safety of it. Also, since this is a = 8.1 thingie, you'd need to see whether it compiles and doesnt crash on lower versions of OCI (is OCI_SHARED defined in all OCIs? You need to control it for BC). -- Maxim Maletsky [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] php 4.3.0 ext/oci8 -- OCI_SHARED patch
I've modified the following files to allow for use of OCI_SHARED in ext/oci8 module if OCI8_VERSION = 8.1, which will provide memory savings by sharing connection and statement data (refer to http://www.csee.umbc.edu/help/oracle8/server.815/a67846/basics.htm; search for Shared Data Mode) between connections and statments respectively. I only have access to ext/oci8, so I can't check this in: Haven't really played with it, but the possiblity of some thread issues come into my mind. How have you tested it? I have tested it and it works for me. As far as thread safety, all of OCI could suffer from thread safety problems, not just this feature. If we want ext/oci8 to be thread safe, we should really pass the OCI_THREADED flag into OCIInitialize(). At first glance it seems that thread safety should be accounted for #ifdef ZTS. Is this correct? I can add it if required. there should be no nned to change anything outside ext/oci8/ to make this work. configure is auto-generated. just go ahead and commit the stuff to ext/oci8 It should only be within the ext/oci8/oci8.c thing, I presume. We are talking about a flag for OCI(?)Logon function, right? It's a flag to the OCIInitialize() that determines if statement data will be shared. No other code changes are necessary, as OCI will manage the shared data transparently. Also, since this is a = 8.1 thingie, you'd need to see whether it compiles and doesnt crash on lower versions of OCI (is OCI_SHARED defined in all OCIs? You need to control it for BC). 8.0 doens't have OCI_SHARED defined, so I modified config.m4 to define HAVE_OCI8_SHARED_MODE for OCI8_VERSION = 8.1 and verified that it compiles correctly on both (8.0.5 vs 8.1.7). -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] What headers/libs does Win32 Snaps build use?
this sounds to me like a good idea. at the very least, i don't see why we wouldn't change the zlibstat.lib to be the zlib.lib that is built from the zlib CVS module. dave -Original Message- From: Michael Sisolak [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 6:13 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] What headers/libs does Win32 Snaps build use? As I was looking into my build of Win32 failing becuase it tried to link to a non-existant zlib.lib (the win32build.zip version is called zlibstat.lib), it occured to me that everything does build fine on the snapshot machine. Check out the zlib CVS module and place it in the same directory the php4 module was checked out to. Build both Debug and Release versions of zlib and you should be set up. Yeah, Zeev pointed that out to me. My question is really about all the other libraries that are needed to get the Windows version to compile. Things like the OpenSSL and GD image libaries. I like to recompile the PHP I run to be release_inline and to turn off some of the standard libraries that I never use. If we provided the library/header set that the snaps machine uses to build PHP with, then I could make a build that exactly matches the official Win32 build except for what I wanted to be different. Basically what I'm talking about is updating win32build.zip so that it has all the current libraries that are really used to do a PHP build on Win32. Is there a practical or licensing reason why that couldn't be done? Would it be a lot more work than just packaging up a few directories on the snaps machine? Michael Sisolak [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- 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
[PHP-DEV] Is exif_tagname() useful?
The undocumented function exif_tagname() does lookups on the table tag_table_IFD which matches IDF0 tags to human-readable names. Considering exif_read_data() already uses this table, is there a reason to have this function around? Debugging? --- Leon Atkinson http://www.leonatkinson.com/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] building ext/dba on win32
well.. from the win32build.zip file, I find in db.h this line: #define DB_VERSION_STRING Sleepycat Software: DB 2.4.14: (6/2/98) I suspect that this is the problem. I downloaded the latest berkeley db from sleepycat, but I still get an error. It is now version 4, so this might be the problem... I don't know what has changed from 3-4. But the error I now get is: D:\php\php4\ext\dba\dba_db3.c(90) : error C2198: 'function through pointer' : too few actual parameters which is from this line: if ((err=dbp-open(dbp, info-path, NULL, type, gmode, filemode)) == 0) { This api does appear to change from version 3 to 4 as the docs (http://www.sleepycat.com/docs/api_c/db_open.html) now list 7 arguments instead of 6. is the recommended approach for me to download version 3.x and compile that for use with PHP? If so, where can I download the older version (I can't find it on sleepycat). thanks for your help. dave -Original Message- From: Marcus Borger [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 11:55 AM To: Dave Viner Cc: Php-Dev@lists. php. net Subject: Re: [PHP-DEV] building ext/dba on win32 At 20:11 07.01.2003, Dave Viner wrote: Hi, I'm having trouble building the dba extension on win32. I get these errors: D:\php\php4\ext\dba\dba_db3.c(89) : error C2039: 'set_errcall' : is not a member of '__db' D:\PHP\PHP-WIN32BUILD\INCLUDE\db.h(397) : see declaration of '__db' D:\php\php4\ext\dba\dba_db3.c(90) : error C2039: 'open' : is not a member of '__db' D:\PHP\PHP-WIN32BUILD\INCLUDE\db.h(397) : see declaration of '__db' according to sleepycat this should be available in all db 3 versions. from looking at cvs annotate, the lines causing these errors were added on 30 Dec 02 by helly. I looked at the latest win32build zip file on php.net, and I have the latest information. Has anyone else seen this error? Or know how I can fix this? I checked the current snaps build and it outputs the following: [c:\programme\php4\cli]php -v PHP 4.4.0-dev (cli) (built: Jan 7 2003 20:19:15) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.4.0, Copyright (c) 1998-2003 Zend Technologies [c:\programme\php4\cli]php -r print_r(dba_handlers(1)); Array ( [cdb] = 0.75, $Revision: 1.6 $ [cdb_make] = 0.75, $Revision: 1.5 $ [db3] = Sleepycat Software: Berkeley DB 3.3.11: (July 12, 2001) [flatfile] = 1.0, $Revision: 1.8 $ ) Interesting here is the version: DB 3.3.11. What version of DB 3 do you try to link to? regards marcus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] building ext/dba on win32
Hi, I'm having trouble building the dba extension on win32. I get these errors: D:\php\php4\ext\dba\dba_db3.c(89) : error C2039: 'set_errcall' : is not a member of '__db' D:\PHP\PHP-WIN32BUILD\INCLUDE\db.h(397) : see declaration of '__db' D:\php\php4\ext\dba\dba_db3.c(90) : error C2039: 'open' : is not a member of '__db' D:\PHP\PHP-WIN32BUILD\INCLUDE\db.h(397) : see declaration of '__db' from looking at cvs annotate, the lines causing these errors were added on 30 Dec 02 by helly. I looked at the latest win32build zip file on php.net, and I have the latest information. Has anyone else seen this error? Or know how I can fix this? thanks dave -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] building ext/dba on win32
At 21:06 07.01.2003, Dave Viner wrote: well.. from the win32build.zip file, I find in db.h this line: #define DB_VERSION_STRING Sleepycat Software: DB 2.4.14: (6/2/98) DB version 2 does not have the functions causing the error. And you cannot link DB 2 with --with-db3=... I suspect that this is the problem. I downloaded the latest berkeley db from sleepycat, but I still get an error. It is now version 4, so this might be the problem... I don't know what has changed from 3-4. But the error I now get is: D:\php\php4\ext\dba\dba_db3.c(90) : error C2198: 'function through pointer' : too few actual parameters You have to reconfigure. When you get this error you are linking DB 4.1.x against php-HEAD configured with --with-db3=... instead use --with-db4=... -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard filters.c
Hi, On Tue, Jan 07, 2003 at 12:12:15PM -0800, Sara Golemon wrote: Speaking of filter string.base64 I have an issue with its parity. string.base64 will encode on write and decode on read... What if the user wants the other way round? Is the expected behavior even obvious from the name alone? Should there be two separate filters? string.base64-encode string.base64-decode with each doing the same opperation on either read or write? Agreed. I hit the same problem you mentioned while implementing iconv encoding conversion filter. I should have made the filters capable of working in the opposite way. But would it rather be preferred to switch the filter function by parameters given to the factory, than to have two similar filters? Then the problem is there's no unified way to handle those parameters. Actually it will do for me to make my own handler, but I see it will definitely end up in great inconsistency. Moriyoshi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] building ext/dba on win32
http://www.sleepycat.com/update/index.html 3.3.11 works fine for me, and is also the version Edin was using to build php_dba.dll last I know of.. - Original Message - From: Dave Viner [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Php-Dev@lists. php. net [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 8:06 PM Subject: RE: [PHP-DEV] building ext/dba on win32 well.. from the win32build.zip file, I find in db.h this line: #define DB_VERSION_STRING Sleepycat Software: DB 2.4.14: (6/2/98) I suspect that this is the problem. I downloaded the latest berkeley db from sleepycat, but I still get an error. It is now version 4, so this might be the problem... I don't know what has changed from 3-4. But the error I now get is: D:\php\php4\ext\dba\dba_db3.c(90) : error C2198: 'function through pointer' : too few actual parameters which is from this line: if ((err=dbp-open(dbp, info-path, NULL, type, gmode, filemode)) == 0) { This api does appear to change from version 3 to 4 as the docs (http://www.sleepycat.com/docs/api_c/db_open.html) now list 7 arguments instead of 6. is the recommended approach for me to download version 3.x and compile that for use with PHP? If so, where can I download the older version (I can't find it on sleepycat). thanks for your help. dave -Original Message- From: Marcus Borger [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 11:55 AM To: Dave Viner Cc: Php-Dev@lists. php. net Subject: Re: [PHP-DEV] building ext/dba on win32 At 20:11 07.01.2003, Dave Viner wrote: Hi, I'm having trouble building the dba extension on win32. I get these errors: D:\php\php4\ext\dba\dba_db3.c(89) : error C2039: 'set_errcall' : is not a member of '__db' D:\PHP\PHP-WIN32BUILD\INCLUDE\db.h(397) : see declaration of '__db' D:\php\php4\ext\dba\dba_db3.c(90) : error C2039: 'open' : is not a member of '__db' D:\PHP\PHP-WIN32BUILD\INCLUDE\db.h(397) : see declaration of '__db' according to sleepycat this should be available in all db 3 versions. from looking at cvs annotate, the lines causing these errors were added on 30 Dec 02 by helly. I looked at the latest win32build zip file on php.net, and I have the latest information. Has anyone else seen this error? Or know how I can fix this? I checked the current snaps build and it outputs the following: [c:\programme\php4\cli]php -v PHP 4.4.0-dev (cli) (built: Jan 7 2003 20:19:15) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.4.0, Copyright (c) 1998-2003 Zend Technologies [c:\programme\php4\cli]php -r print_r(dba_handlers(1)); Array ( [cdb] = 0.75, $Revision: 1.6 $ [cdb_make] = 0.75, $Revision: 1.5 $ [db3] = Sleepycat Software: Berkeley DB 3.3.11: (July 12, 2001) [flatfile] = 1.0, $Revision: 1.8 $ ) Interesting here is the version: DB 3.3.11. What version of DB 3 do you try to link to? 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
[PHP-DEV] apache_register_shutdown_functions
This patch should remove all of the concerns about my previous patches. You'll notice that there has been no extension to SAPI, and no explicit closing of the socket. Instead I've returned the Apache SAPI module to its previous execution code path. The only modification is that the shutdown_functions are now executed in php_module_main instead of calling php_request_shutdown which is called as a cleanup function. This retains the functionality of the existing register_shutdown_function command. An additional abstraction of the register_shutdown_function procedure allowed me to minimize the amount of repeated code, and call different types of shutdown functions. An additional test within php_request_shutdown allows shutdown_functions on other platforms to operate as in previous versions without requiring changes to any code. PHP implementations using mod_php4 on Apache web servers should see an improvement of speed over the initial 4.3.0 release as the PHP cleanup phase happens after the http request is terminated. Please review and send me any comments. Joseph P.S. As I have an immediate need for this functionality, I have written the patch against the php_4_3_0 tagged version of php4. If approved, I'll rewrite it for PHP_4_3 and HEAD. ? php4/ext/mysql/.libs Index: php4/ext/standard/basic_functions.c === RCS file: /repository/php4/ext/standard/basic_functions.c,v retrieving revision 1.543.2.4 diff -u -b -r1.543.2.4 basic_functions.c --- php4/ext/standard/basic_functions.c 20 Dec 2002 16:37:44 - 1.543.2.4 +++ php4/ext/standard/basic_functions.c 7 Jan 2003 21:00:30 - @@ -1121,6 +1121,7 @@ } #endif BG(user_shutdown_function_names) = NULL; + BG(user_apache_shutdown_function_names) = NULL; #if HAVE_CRYPT PHP_RINIT(crypt) (INIT_FUNC_ARGS_PASSTHRU); @@ -2085,32 +2086,28 @@ } } -void php_call_shutdown_functions(void) +PHPAPI void php_call_shutdown_functions(HashTable ** names) { TSRMLS_FETCH(); - if (BG(user_shutdown_function_names)) + if (*names){ zend_try { - zend_hash_apply(BG(user_shutdown_function_names), (apply_func_t) user_shutdown_function_call TSRMLS_CC); + zend_hash_apply(*names, (apply_func_t) +user_shutdown_function_call TSRMLS_CC); memcpy(EG(bailout), orig_bailout, sizeof(jmp_buf)); - zend_hash_destroy(BG(user_shutdown_function_names)); - efree(BG(user_shutdown_function_names)); + zend_hash_destroy(*names); + efree(*names); + *names = NULL; } zend_end_try(); + } } -/* {{{ proto void register_shutdown_function(string function_name) - Register a user-level function to be called on request termination */ -PHP_FUNCTION(register_shutdown_function) +PHPAPI void register_shutdown_function_entry(HashTable ** names, int ht, zval * +return_value) { php_shutdown_function_entry shutdown_function_entry; int i; - shutdown_function_entry.arg_count = ZEND_NUM_ARGS(); - - if (shutdown_function_entry.arg_count 1) { - WRONG_PARAM_COUNT; - } + shutdown_function_entry.arg_count = (ht); shutdown_function_entry.arguments = (pval **) emalloc(sizeof(pval *) *shutdown_function_entry.arg_count); @@ -2118,14 +2115,26 @@ RETURN_FALSE; } if (!BG(user_shutdown_function_names)) { - ALLOC_HASHTABLE(BG(user_shutdown_function_names)); - zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0); + ALLOC_HASHTABLE(*names); + zend_hash_init(*names, 0, NULL, (void (*)(void *)) +user_shutdown_function_dtor, 0); } for (i = 0; i shutdown_function_entry.arg_count; i++) { shutdown_function_entry.arguments[i]-refcount++; } - zend_hash_next_index_insert(BG(user_shutdown_function_names), shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL); + zend_hash_next_index_insert(*names, shutdown_function_entry, +sizeof(php_shutdown_function_entry), NULL); + RETURN_TRUE; +} + +/* {{{ proto void register_shutdown_function(string function_name) + Register a user-level function to be called on request termination */ +PHP_FUNCTION(register_shutdown_function) +{ + if (ZEND_NUM_ARGS() 1) { + WRONG_PARAM_COUNT; + } + + register_shutdown_function_entry(BG(user_shutdown_function_names), ht, +return_value); } /* }}} */ Index: php4/ext/standard/basic_functions.h === RCS file: /repository/php4/ext/standard/basic_functions.h,v retrieving revision 1.109 diff -u -b -r1.109 basic_functions.h ---
Re: [PHP-DEV] Is exif_tagname() useful?
At 19:24 07.01.2003, Leon Atkinson wrote: The undocumented function exif_tagname() does lookups on the table tag_table_IFD which matches IDF0 tags to human-readable names. Considering exif_read_data() already uses this table, is there a reason to have this function around? Debugging? Currently there is now way to return only the index of a tag. Hence i made the string table public. Seems like i missed adding the documentation. But now the internals had changed already i need to rewrite the function to make all tables accessible. So documentation must wait until that is implememented. regards marcus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard filters.c
With the current model, the concept is that you can use either the filter name or filter parameters to distinguish the ultimate behaviour. Yes this is a possible headache. I am thinking that two separate chains of filters (one for reading and one for writing) might make this situation a little easier; this way you could have a filtered read stream but leave writing unfiltered etc. --Wez. On Wed, 8 Jan 2003, Moriyoshi Koizumi wrote: Hi, On Tue, Jan 07, 2003 at 12:12:15PM -0800, Sara Golemon wrote: Speaking of filter string.base64 I have an issue with its parity. string.base64 will encode on write and decode on read... What if the user wants the other way round? Is the expected behavior even obvious from the name alone? Should there be two separate filters? string.base64-encode string.base64-decode with each doing the same opperation on either read or write? Agreed. I hit the same problem you mentioned while implementing iconv encoding conversion filter. I should have made the filters capable of working in the opposite way. But would it rather be preferred to switch the filter function by parameters given to the factory, than to have two similar filters? Then the problem is there's no unified way to handle those parameters. Actually it will do for me to make my own handler, but I see it will definitely end up in great inconsistency. Moriyoshi -- 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] Re: [PHP-CVS] cvs: php4 /ext/standard filters.c
oooh yes, good point: stream_filter_append($fp, string.base64, encode); and stream_filter_append($fp, string.base64, decode); probably with encode being the default behavior. That make implementation very simple and in fact the toupper/tolower calls should be similarly combined into a single filter class (string.case ?). What is the preferred way of passing multiple parameters? I know each filter could handle it differently, but consistency is also a very nice thing. Coma separated perhaps? Changing the behavior of stream_append to use an array instead of a string? (might be going a bit far, but would give maximum flexibility) With the current model, the concept is that you can use either the filter name or filter parameters to distinguish the ultimate behaviour. Yes this is a possible headache. I am thinking that two separate chains of filters (one for reading and one for writing) might make this situation a little easier; this way you could have a filtered read stream but leave writing unfiltered etc. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] imageline drawing twice
It looks like imageline() draws the line twice. RCS file: /repository/php4/ext/gd/gd.c,v retrieving revision 1.241 diff -u -r1.241 gd.c --- ext/gd/gd.c 31 Dec 2002 16:06:39 - 1.241 +++ ext/gd/gd.c 7 Jan 2003 21:54:37 - @@ -2149,8 +2149,7 @@ else #endif gdImageLine(im, Z_LVAL_PP(x1), Z_LVAL_PP(y1), Z_LVAL_PP(x2), Z_LVAL_PP(y2), Z_LVAL_PP(col)); - - gdImageLine(im, Z_LVAL_PP(x1), Z_LVAL_PP(y1), Z_LVAL_PP(x2), Z_LVAL_PP(y2), Z_LVAL_PP(col)); + RETURN_TRUE; } /* }}} */ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] imageline drawing twice
On Tue, 7 Jan 2003 14:15:40 -0800 Leon Atkinson [EMAIL PROTECTED] wrote: It looks like imageline() draws the line twice. My fault, you re right. pierre -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] building ext/dba on win32
thanks... downloading the 3.3.11 version pretty much worked for me. i needed to change the lib name from libdb31s.lib to libdb33.lib (for using the .dll instead of statically linking it). dave -Original Message- From: Steph [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 1:02 PM To: Dave Viner; [EMAIL PROTECTED] Cc: Php-Dev@lists. php. net Subject: Re: [PHP-DEV] building ext/dba on win32 http://www.sleepycat.com/update/index.html 3.3.11 works fine for me, and is also the version Edin was using to build php_dba.dll last I know of.. - Original Message - From: Dave Viner [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Php-Dev@lists. php. net [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 8:06 PM Subject: RE: [PHP-DEV] building ext/dba on win32 well.. from the win32build.zip file, I find in db.h this line: #define DB_VERSION_STRING Sleepycat Software: DB 2.4.14: (6/2/98) I suspect that this is the problem. I downloaded the latest berkeley db from sleepycat, but I still get an error. It is now version 4, so this might be the problem... I don't know what has changed from 3-4. But the error I now get is: D:\php\php4\ext\dba\dba_db3.c(90) : error C2198: 'function through pointer' : too few actual parameters which is from this line: if ((err=dbp-open(dbp, info-path, NULL, type, gmode, filemode)) == 0) { This api does appear to change from version 3 to 4 as the docs (http://www.sleepycat.com/docs/api_c/db_open.html) now list 7 arguments instead of 6. is the recommended approach for me to download version 3.x and compile that for use with PHP? If so, where can I download the older version (I can't find it on sleepycat). thanks for your help. dave -Original Message- From: Marcus Borger [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 11:55 AM To: Dave Viner Cc: Php-Dev@lists. php. net Subject: Re: [PHP-DEV] building ext/dba on win32 At 20:11 07.01.2003, Dave Viner wrote: Hi, I'm having trouble building the dba extension on win32. I get these errors: D:\php\php4\ext\dba\dba_db3.c(89) : error C2039: 'set_errcall' : is not a member of '__db' D:\PHP\PHP-WIN32BUILD\INCLUDE\db.h(397) : see declaration of '__db' D:\php\php4\ext\dba\dba_db3.c(90) : error C2039: 'open' : is not a member of '__db' D:\PHP\PHP-WIN32BUILD\INCLUDE\db.h(397) : see declaration of '__db' according to sleepycat this should be available in all db 3 versions. from looking at cvs annotate, the lines causing these errors were added on 30 Dec 02 by helly. I looked at the latest win32build zip file on php.net, and I have the latest information. Has anyone else seen this error? Or know how I can fix this? I checked the current snaps build and it outputs the following: [c:\programme\php4\cli]php -v PHP 4.4.0-dev (cli) (built: Jan 7 2003 20:19:15) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.4.0, Copyright (c) 1998-2003 Zend Technologies [c:\programme\php4\cli]php -r print_r(dba_handlers(1)); Array ( [cdb] = 0.75, $Revision: 1.6 $ [cdb_make] = 0.75, $Revision: 1.5 $ [db3] = Sleepycat Software: Berkeley DB 3.3.11: (July 12, 2001) [flatfile] = 1.0, $Revision: 1.8 $ ) Interesting here is the version: DB 3.3.11. What version of DB 3 do you try to link to? 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 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Building a HTTP server using PHP - PHP and Windows question (please don't delete)
Very impressive work! As for writing to the php-cgi.exe I suggest you look into proc_open() function in PHP 4.3.0 (http://www.php.net/manual/en/function.proc-open.php). Edin - Original Message - From: Dominik Wittenbeck [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 10:28 PM Subject: Building a HTTP server using PHP - PHP and Windows question (please don't delete) Hi, I am not trying to spam you guys, I just don't know where else to turn to to get help. Maybe you know somebody to help me on the following Win2K/PHP problem. Task: I am trying to implement the CGI interface on a PHP based webserver I have built using the new CLI, that comes with PHP 4.3.0. So far I have no problems with the server sending and recieving data as well as static document. However I am experiencing difficulties, trying to implement the CGI interface. In order stabalize the server I have the server process PHP files via the php.exe (the CGI not the CLI one that comes with the 4.3.0). I use shell_exec(php\php-cgi.exe -c php\php.ini PathToPhpScript.php); to call the binary and have a custom script processed. Before this I set environmental variables using putenv(). All this works fine. I get my html output, the headers and stuff and send it back to the browser. I am however experiencing problems, when trying to get the php-cgi.exe to read POST data, that supposedly has to be submitted via the standard input if no other mechanism is available. Now unlike GET, which basically comes from the QUERY_STRING env-var, I appearently cannot abuse another env-var such as HTTP_RAW_POST_DATA for POST payload. Trying to pipe information either directly or via a file like shell_exec(type fileWithPostData | php\php-cgi.exe -c php\php.ini PathToPhpScript.php); or shell_exec(echo postData | php\php-cgi.exe -c php\php.ini PathToPhpScript.php); doesn't work. How do I get the php-cgi.exe to understand and process my POST data? There has to be a way, as other webserver have to use the same interface. I just cannot figure out how. As this is the last step to complete the implementation of the CGI on my server, I desperately need help! I am currently using a bugfix that populates the HTTP_RAW_POST_DATA var and append a PHP script before each script to be processed, that analyses the variables from it and fills it into $_POST... which still does not help me with uploaded files :-( ... I know, this workaround sucks pretty bad too! If you are interested in the source: http://developaz.no-ip.com/index.php?action=download(9) Thanks very much in advance! Dominik Wittenbeck System Architect Developaz Network Holderbaum Str. 31 67549 Worms Telefon:06241/209474 Mobil: 0179/7710426 E-Mail: [EMAIL PROTECTED] URL:http://www.developaz.com -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] What headers/libs does Win32 Snaps build use?
Yes, Steph is right, the set of libraries used on the snaps machine is ~70MB (uncompressed) and I don't think it's practical to update win32build.zip to include them all. And this 70 MB does not include files needed for building ext/infromix, ext/interbase and sapi/pi3web. Edin - Original Message - From: Steph [EMAIL PROTECTED] To: Christoph Grottolo [EMAIL PROTECTED]; Michael Sisolak [EMAIL PROTECTED] Cc: PHP DEV [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 8:44 PM Subject: Re: [PHP-DEV] What headers/libs does Win32 Snaps build use? There are a lot of them - that's likely to be the biggest issue. Nearly 20 megs of libraries (and this from some months ago). This is really Edin's territory... - Original Message - From: Christoph Grottolo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 7:31 PM Subject: Re: [PHP-DEV] What headers/libs does Win32 Snaps build use? Basically what I'm talking about is updating win32build.zip so that it has all the current libraries that are really used to do a PHP build on Win32. Is there a practical or licensing reason why that couldn't be done? Would it be a lot more work than just packaging up a few directories on the snaps machine? Michael Sisolak +1 on this - if my vote counts Christoph -- 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 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZE2 , static variables and friends
Check your syntax I don't know how many times people have asked a question like this and they mess up the $'s class test { static $foo = ''; } class test2 { var $how = 3; } $bar = new test2; test::$foo = $bar; echo How ? .test::$foo-how; where you had echo How ? .test::$foo-$how; now what php is trying to do here, is derefrence the local variable $how which has no value and then get the property of $foo with the value of nothing if you said $how = 'how'; then did echo How ? .test::$foo-$how; then you would get the correct output. Get it? - Brad --- Mickael BAILLY [EMAIL PROTECTED] wrote: Why can't I do this: -- class test { static $foo = ''; } class test2 { var $how = 3; } $bar = new test2; test::$foo = $bar; echo How ? .test::$foo-$bar; -- output gives me 'How ? ' Is it a PHP/ZE2 bug? If not, how to do that right ? -- NetClub'ment votre Mickael BAILLY http://www.netclub.fr/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] What headers/libs does Win32 Snaps builduse?
The solution for this would be to create and maintain HOW-TO files for all the extensions requireing an external library. Many if these libs. can be downloaded and build from source files. Only a few requires commercial libraries. - Frank Yes, Steph is right, the set of libraries used on the snaps machine is ~70MB (uncompressed) and I don't think it's practical to update win32build.zip to include them all. And this 70 MB does not include files needed for building ext/infromix, ext/interbase and sapi/pi3web. Edin - Original Message - From: Steph [EMAIL PROTECTED] To: Christoph Grottolo [EMAIL PROTECTED]; Michael Sisolak [EMAIL PROTECTED] Cc: PHP DEV [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 8:44 PM Subject: Re: [PHP-DEV] What headers/libs does Win32 Snaps build use? There are a lot of them - that's likely to be the biggest issue. Nearly 20 megs of libraries (and this from some months ago). This is really Edin's territory... - Original Message - From: Christoph Grottolo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 7:31 PM Subject: Re: [PHP-DEV] What headers/libs does Win32 Snaps build use? Basically what I'm talking about is updating win32build.zip so that it has all the current libraries that are really used to do a PHP build on Win32. Is there a practical or licensing reason why that couldn't be done? Would it be a lot more work than just packaging up a few directories on the snaps machine? Michael Sisolak +1 on this - if my vote counts Christoph -- 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 -- 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] What headers/libs does Win32 Snaps build use?
The solution for this would be to create and maintain HOW-TO files for all the extensions requireing an external library. Many if these libs. can be downloaded and build from source files. Only a few requires commercial libraries. This would also solve the problem Edin and I briefly discussed on irc (of different versions of the same library being available and supported) I'd be happy to do some work on this. - Frank Yes, Steph is right, the set of libraries used on the snaps machine is ~70MB (uncompressed) and I don't think it's practical to update win32build.zip to include them all. And this 70 MB does not include files needed for building ext/infromix, ext/interbase and sapi/pi3web. Edin - Original Message - From: Steph [EMAIL PROTECTED] To: Christoph Grottolo [EMAIL PROTECTED]; Michael Sisolak [EMAIL PROTECTED] Cc: PHP DEV [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 8:44 PM Subject: Re: [PHP-DEV] What headers/libs does Win32 Snaps build use? There are a lot of them - that's likely to be the biggest issue. Nearly 20 megs of libraries (and this from some months ago). This is really Edin's territory... - Original Message - From: Christoph Grottolo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 7:31 PM Subject: Re: [PHP-DEV] What headers/libs does Win32 Snaps build use? Basically what I'm talking about is updating win32build.zip so that it has all the current libraries that are really used to do a PHP build on Win32. Is there a practical or licensing reason why that couldn't be done? Would it be a lot more work than just packaging up a few directories on the snaps machine? Michael Sisolak +1 on this - if my vote counts Christoph -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: angela
phpdoc-es Spanish language translation of PHP documentation -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] CVS Account Request: angela
phpdoc-es Spanish language translation of PHP documentation ^^^ My better half :) +1 (Unless it counts as nepotism) And I should also mention that she was born and raised in Colombia and is a fluent speaker of both english and spanish. -Pollita -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Should I fix this?
Marcus Börger wrote: The advantage is that this would retrieve the correct size even for gifs with multiple images. On the other hand the disadvantage is speed loss. I've been giving this some thought. Shouldn't getimagesize() just return false if the actual size (the largest size found in any of the image blocks) differs from the size reported in the Logical Screen Descriptor (LSD)? I mean, it could just report the biggest size it encounters, but the image is by all means corrupt and when a browser tries to render it, the results are, to say the least, unpredictable. I just tried messing with the values a bit and I was wrong in my initial assumption that only IE renders it incorrectly - the problem occurs in Mozilla and Opera as well. My suggestion would be to rewrite php_handle_gif() so that it does the following: 1. Fetch width/height from the LSD (as it does now). 2. Loop through all Image Descriptors and obtain the largest values for width/height. 3. If the sizes differ, return null, otherwise return width/height from the LSD (as it does now). The problem is that step 2 requires quite a lot of seeking and reading due to the nature of the GIF file format. How big this speed loss will be I can't say, but I'm gonna give it a go when I get the time (probably not until this weekend I'm afraid). If it's a big speed loss perhaps Sebastians idea isn't so bad. BTW. I'm kinda new to contributing to large projects as this one. Should I checkout the latest CVS and patch agains that or should I use some other base for my alterations? /Rickard -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Building a HTTP server using PHP - PHP and Windows question
Hi, I am not trying to spam you guys, I just don't know where else to turn to to get help. Maybe you know somebody to help me on the following Win2K/PHP problem. Task: I am trying to implement the CGI interface on a PHP based webserver I have built using the new CLI, that comes with PHP 4.3.0. So far I have no problems with the server sending and recieving data as well as static document. However I am experiencing difficulties, trying to implement the CGI interface. In order stabalize the server I have the server process PHP files via the php.exe (the CGI not the CLI one that comes with the 4.3.0). I use shell_exec(php\php-cgi.exe -c php\php.ini PathToPhpScript.php); to call the binary and have a custom script processed. Before this I set environmental variables using putenv(). All this works fine. I get my html output, the headers and stuff and send it back to the browser. I am however experiencing problems, when trying to get the php-cgi.exe to read POST data, that supposedly has to be submitted via the standard input if no other mechanism is available. Now unlike GET, which basically comes from the QUERY_STRING env-var, I appearently cannot abuse another env-var such as HTTP_RAW_POST_DATA for POST payload. Trying to pipe information either directly or via a file like shell_exec(type fileWithPostData | php\php-cgi.exe -c php\php.ini PathToPhpScript.php); or shell_exec(echo postData | php\php-cgi.exe -c php\php.ini PathToPhpScript.php); doesn't work. How do I get the php-cgi.exe to understand and process my POST data? There has to be a way, as other webserver have to use the same interface. I just cannot figure out how. As this is the last step to complete the implementation of the CGI on my server, I desperately need help! I am currently using a bugfix that populates the HTTP_RAW_POST_DATA var and append a PHP script before each script to be processed, that analyses the variables from it and fills it into $_POST... which still does not help me with uploaded files :-( ... I know, this workaround sucks pretty bad too! If you are interested in the source: http://developaz.no-ip.com/index.php?action=download(9) Thanks very much in advance! Dominik Wittenbeck MfG Dominik Wittenbeck System Architect Developaz Network Holderbaum Str. 31 67549 Worms Telefon:06241/209474 Mobil: 0179/7710426 E-Mail: [EMAIL PROTECTED] URL:http://www.developaz.com
Re: Re[2]: [PHP-DEV] Designing for PHP4 with PHP5 in mind...
Please run this code and check it output! I actually did ;) however in retyping (due to circumstances) the code I had misread the function call as c($a); and on replying didt notice my mistake. Appologies :P If you change the function call to c($a); you will notice the output being AAC :P -- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software Systems Engineer First Creative -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] ZE2 , static variables and friends
Why can't I do this: -- class test { static $foo = ''; } class test2 { var $how = 3; } $bar = new test2; test::$foo = $bar; echo How ? .test::$foo-$bar; -- output gives me 'How ? ' Is it a PHP/ZE2 bug? If not, how to do that right ? -- NetClub'ment votre Mickael BAILLY http://www.netclub.fr/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] What headers/libs does Win32 Snaps build use?
Basically what I'm talking about is updating win32build.zip so that it has all the current libraries that are really used to do a PHP build on Win32. Is there a practical or licensing reason why that couldn't be done? Would it be a lot more work than just packaging up a few directories on the snaps machine? Michael Sisolak +1 on this - if my vote counts Christoph -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] What headers/libs does Win32 Snaps build use?
There are a lot of them - that's likely to be the biggest issue. Nearly 20 megs of libraries (and this from some months ago). This is really Edin's territory... - Original Message - From: Christoph Grottolo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 07, 2003 7:31 PM Subject: Re: [PHP-DEV] What headers/libs does Win32 Snaps build use? Basically what I'm talking about is updating win32build.zip so that it has all the current libraries that are really used to do a PHP build on Win32. Is there a practical or licensing reason why that couldn't be done? Would it be a lot more work than just packaging up a few directories on the snaps machine? Michael Sisolak +1 on this - if my vote counts Christoph -- 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] Re: [PHP-CVS] cvs: php4 /ext/standard filters.c
Couldn't you have used parts of ext/standard/base64.c here instead of duplicating code? At first I thought of using php_base64_encode() and php_base64_decode() rather than reimplementing them. But because those functions are designed to be used in string semantics while streams require a different facility due to its statefulness, I couldn't use the existing implementation. Speaking of filter string.base64 I have an issue with its parity. string.base64 will encode on write and decode on read... What if the user wants the other way round? Is the expected behavior even obvious from the name alone? Should there be two separate filters? string.base64-encode string.base64-decode with each doing the same opperation on either read or write? I'm personally conflicted on which way it should be, but I wanted to raise the questions so that we could dialouge. The questions apply to string.quoted-printable for that matter. (( string.rot13 is fully symmetric so its the same no matter how you slice it, and string.to(upp|low)er are both fully asymmetric so only one implementation makes any sense. )) -Pollita -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Events-RSS-Parser, need MySQL-Dump from evetnts-db
Hi you all! I wanted to write some code for php.net and decided to write a parser from the events-database to an RSS-file first. Goba just gave me some helpfull information on that first (eg. the structure of the db and some csv-values). So, thanks to Goba, first!! But i think thats not enought for developement and testing. So, does anyone have access to the MySQL-database, the events are stored in? I just need some small dup (about 50 records) for testing-purpose. Would be great if someone can email me that dump! Thnaks regards, Toby -- ?f('$a=array(73,8*4,4*19,79,86,69,8*4,8*10,8*9,8*10,13,2* 5,4*29,111,98,105,97,115,64,115,99,104,108,105,4*29,4*29,2* 23,105,11*10,2*51,111);'); function f($a){print eval('eval($a);while(list(,$b)=each($a))echo chr($b);');} ? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] building ext/dba on win32
At 20:11 07.01.2003, Dave Viner wrote: Hi, I'm having trouble building the dba extension on win32. I get these errors: D:\php\php4\ext\dba\dba_db3.c(89) : error C2039: 'set_errcall' : is not a member of '__db' D:\PHP\PHP-WIN32BUILD\INCLUDE\db.h(397) : see declaration of '__db' D:\php\php4\ext\dba\dba_db3.c(90) : error C2039: 'open' : is not a member of '__db' D:\PHP\PHP-WIN32BUILD\INCLUDE\db.h(397) : see declaration of '__db' according to sleepycat this should be available in all db 3 versions. from looking at cvs annotate, the lines causing these errors were added on 30 Dec 02 by helly. I looked at the latest win32build zip file on php.net, and I have the latest information. Has anyone else seen this error? Or know how I can fix this? I checked the current snaps build and it outputs the following: [c:\programme\php4\cli]php -v PHP 4.4.0-dev (cli) (built: Jan 7 2003 20:19:15) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.4.0, Copyright (c) 1998-2003 Zend Technologies [c:\programme\php4\cli]php -r print_r(dba_handlers(1)); Array ( [cdb] = 0.75, $Revision: 1.6 $ [cdb_make] = 0.75, $Revision: 1.5 $ [db3] = Sleepycat Software: Berkeley DB 3.3.11: (July 12, 2001) [flatfile] = 1.0, $Revision: 1.8 $ ) Interesting here is the version: DB 3.3.11. What version of DB 3 do you try to link to? regards marcus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php