[PHP-DEV] posting xml
I am sending an xml request as part of the url using urlencode to encode my xml. It doesnt work like that so the server that is receiving it doesnt seem to like the data in the query string. However, if I send it from a form using the method post then it works fine. Is there a way to send it by method post but without having to use a form? Thank you -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] posting xml
Diana, You may ask user-related questions on the [EMAIL PROTECTED] list. This list issueing the development OF (not IN) PHP isn't the right place to ask. -Ali On Thu, 27 Feb 2003 13:20:38 +0100 Diana Castillo [EMAIL PROTECTED] wrote: | I am sending an xml request as part of the url using urlencode to | encode my xml. It doesnt work like that so the server that is | receiving it doesnt seem to like the data in the query string. | However, if I send it from a form using the method post then it works | fine. Is there a way to send it by method post but without having to | use a form? Thank you | | | | -- | 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] File upload problem
Hello everybody, I am relatively new to PHP and for quite some days I am trying to get a file upload system going through a standard html form. To test it I use an html page called Test2.php with a form in it with enctype=\multipart/form-data\. Here is the source code: ?php $AppImageDir = Web/Images; if (isset($_FILES[ImageFile])) { move_uploaded_file($_FILES['ImageFile']['tmp_name'], $AppImageDir./.$_FILES['ImageFile']['name']); } ? html head titleWeb site - pages form/title /head body ?php echo form action=\Test2.php\ enctype=\multipart/form-data\ method=\post\ input type=\hidden\ name=\MAX_FILE_SIZE\ value=\8\ input type=\file\ name=\ImageFile\ input type=\submit\ name=\btnSubmit\ value=\Upload\ /form ; ? /body /html It is a standard straight forward image upload situation. You see that the form directs to itself (action=\Test2.php\) and on top of the page a simple instruction to see if the file uploads correctly. As far as I can see, this is correct code. Note that the any \\ are to escape and further \\ (necesary in echo statements). However, when I execute the page, I get the following error messages: Warning: Unable to create '/Web/Images/cartel_feria1.jpg': Permission denied in /Web/Test2.php on line 6 Warning: Unable to move '/tmp/php0jHeNE' to '/Web/Images/cartel_feria1.jpg' in /Web/Test2.php on line 6 It seems to say that I don't have permission to execute a file upload on that page. As you can see by the directory specifications this script runs on a Linux. However, I also tried the same script on a Windows machine, with the corresponding directory specifications of course, and with the same result: permission denied. What is wrong here, where do I set what type of permissions in order to get the file upload to work? By the way, in the php.ini FileUpload is set at yes. Kind regards, FRANS BAKKER -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] File upload problem
Hello, please forward user questions to the [EMAIL PROTECTED] mailinglist, this list is for development _OF_ PHP, not development _with_ PHP. Derick On Thu, 27 Feb 2003, Frans Bakker wrote: Hello everybody, I am relatively new to PHP and for quite some days I am trying to get a file upload system going through a standard html form. To test it I use an html page called Test2.php with a form in it with enctype=\multipart/form-data\. Here is the source code: ?php $AppImageDir = Web/Images; if (isset($_FILES[ImageFile])) { move_uploaded_file($_FILES['ImageFile']['tmp_name'], $AppImageDir./.$_FILES['ImageFile']['name']); } ? html head titleWeb site - pages form/title /head body ?php echo form action=\Test2.php\ enctype=\multipart/form-data\ method=\post\ input type=\hidden\ name=\MAX_FILE_SIZE\ value=\8\ input type=\file\ name=\ImageFile\ input type=\submit\ name=\btnSubmit\ value=\Upload\ /form ; ? /body /html It is a standard straight forward image upload situation. You see that the form directs to itself (action=\Test2.php\) and on top of the page a simple instruction to see if the file uploads correctly. As far as I can see, this is correct code. Note that the any \\ are to escape and further \\ (necesary in echo statements). However, when I execute the page, I get the following error messages: Warning: Unable to create '/Web/Images/cartel_feria1.jpg': Permission denied in /Web/Test2.php on line 6 Warning: Unable to move '/tmp/php0jHeNE' to '/Web/Images/cartel_feria1.jpg' in /Web/Test2.php on line 6 It seems to say that I don't have permission to execute a file upload on that page. As you can see by the directory specifications this script runs on a Linux. However, I also tried the same script on a Windows machine, with the corresponding directory specifications of course, and with the same result: permission denied. What is wrong here, where do I set what type of permissions in order to get the file upload to work? By the way, in the php.ini FileUpload is set at yes. Kind regards, FRANS BAKKER -- Stop mad cowboy disease! - 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
[PHP-DEV] Problems debugging on win32
Hi! I have made some changes to a extension and now it does not work on win32. I am trying to debug it to see where the problem is, but I get a Warning like this: isis: Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=1 PHPcompiled with module API=20020429, debug=1, thread-safety=1 These options need to match However I have compiled isis with configuration Win32 Debug_TS. What am I doing wrong? Best regards, Braulio -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Getting an external param into a userspace streams filter...
Hi Wez, everyone: Is there (or will there ever be) a good way to transmit an extra parameter into a php_user_filter around the time that oncreate() is called? I've run into a couple cases where it'd be incredibly useful (e.g. for filters that don't modify the stream, but do have side-effects). Is there a known technical reason why this would be difficult or impossible? If not, can I go ahead and submit a patch at some point? :) Thanks, - Dave [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Getting an external param into a userspace streams filter...
On Thu, Feb 27, 2003 at 09:40:15AM -0500, David Brown wrote: | Hi Wez, everyone: | | Is there (or will there ever be) a good way to transmit an extra | parameter into a php_user_filter around the time that oncreate() is | called? I've run into a couple cases where it'd be incredibly useful | (e.g. for filters that don't modify the stream, but do have | side-effects). bool stream_filter_append ( resource stream, string filtername [, string params]) ^^^ Nevermind. Seems I can't read this morning. Sorry about that. - Dave [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Problems debugging on win32
On Thu, 27 Feb 2003, Braulio José Solano Rojas wrote: I have made some changes to a extension and now it does not work on win32. I am trying to debug it to see where the problem is, but I get a Warning like this: isis: Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=1 PHPcompiled with module API=20020429, debug=1, thread-safety=1 These options need to match However I have compiled isis with configuration Win32 Debug_TS. What am I doing wrong? You PHP version is not a debug build, and thus the module refuses to load. The best thing is to build PHP yourself in debug mode. Derick -- Stop mad cowboy disease! - 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] Problems debugging on win32
Hi! Derick Rethans [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] On Thu, 27 Feb 2003, Braulio José Solano Rojas wrote: What am I doing wrong? You PHP version is not a debug build, and thus the module refuses to load. The best thing is to build PHP yourself in debug mode. I think I did, since PHP is using php4ts_debug.dll, and if I delete this file I get a message of php-cli.exe saying that it does not find it. I used to compile php-cli the configuration Win32 Debug_TS. I also noticed that there is a Win32 Release_TSDbg but I did not use it. If you notice in the warning I received for PHP I have debug=1. Does this means that PHP is compiled for debugging? That would mean debug for me. Best regards, Braulio -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] How do I display the script file name?
How can I display the script file name? Presumably something like-: ?php echo $ScriptFileName; ? While I'm learning php and developing various Web page versions, I want to be sure the that the display is from the appropriate script. Regards Stephen Ford, Surrey, UK -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Problems debugging on win32
On Thu, 27 Feb 2003, Braulio José Solano Rojas wrote: I think I did, since PHP is using php4ts_debug.dll, and if I delete this file I get a message of php-cli.exe saying that it does not find it. I used to compile php-cli the configuration Win32 Debug_TS. I also noticed that there is a Win32 Release_TSDbg but I did not use it. If you notice in the warning I received for PHP I have debug=1. Does this means that PHP is compiled for debugging? That would mean debug for me. Yes, sorry, then you just didn't compile your module in this debug mode... Derick -- Stop mad cowboy disease! - 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] How do I display the script file name?
Hello, please forward user questions to the [EMAIL PROTECTED] mailinglist, this list is for development _OF_ PHP, not development _with_ PHP. Derick On Thu, 27 Feb 2003, Stephen Ford wrote: How can I display the script file name? Presumably something like-: ?php echo $ScriptFileName; ? While I'm learning php and developing various Web page versions, I want to be sure the that the display is from the appropriate script. Regards Stephen Ford, Surrey, UK -- Stop mad cowboy disease! - 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] date() extension
Didn't have time, but here's a new patch. Regards, Dirkjan Wez Furlong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Please read the README.SUBMITTING_PATCH file in the root of the php source and re-submit your patch. --Wez. On Mon, 17 Feb 2003, Dirkjan Ochtman wrote: begin 666 datetime.c begin 666 iso8601diff.txt [EMAIL PROTECTED](1A=5T:6UE+F,-CT]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T-E)# M4R!F:6QE.B OF5P;W-I=]R2]P:' T+V5X=]S=%N9%R9]D871E=EM M92YC+'8-G)E=')I979I;F@F5V:7-I;VX@,2XQ,#8-[EMAIL PROTECTED]@+7(Q M+C$P-B!D871E=[EMAIL PROTECTED]%T971I;64N8PDQ-R!96(@,C P,R P M-CHR.#HP-B M,# P, [EMAIL PROTECTED](1A=5T:6UE+F,),C@1F5B(#(P M,#,@,34Z,#Z,3@+3 P,# -D! (TS.#L-B K,[EMAIL PROTECTED]@0$ -B )0EC M87-E(=,)SH)2\J()O;[EMAIL PROTECTED](QE87 @65AB J+PT*( D)6-A MV4@)W[EMAIL PROTECTED])[EMAIL PROTECTED]%Y(]F('1H92!W965K+!N=6UEFEC(HO#0H@0D) M8V%S92 G22Z0DO*B!$4U0_(HO#0HK0D)8V%S92 G8RZ0DO*B!$=6)L M:[EMAIL PROTECTED](HO#0HK0D)7-I[EMAIL PROTECTED]@,C4[#0HK0D)6)R96%K M.PT*( D)61E9F%U;'0Z#0H@0D)7-IF4K*SL-B )0D)8G)E86L[#0I M0 M-3[EMAIL PROTECTED]! 0 T*( D)0D)=$M/G1M7VUD87DL#0H@0D) M0EM;VY?VAOG1?;F%M97-;=$M/G1M7VUO;ETL#0H@0D)0ET82T^=U? M65AB K(%E%05)?0D%312P-BL)0D)71A+3YT;5]H;W5R+ T**PD)0D) M=$M/G1M7VUI;BP-BL)0D)71A+3YT;5]S96,L#0HK0D)0DH*'1A+3YT M;5]IV1S= _('1Z;VYE(T@,S8P, Z('1Z;VYE*2 ^(# I(#\@)RTG(#H@ M)RLG+ T**PD)0D)86)S*AT82T^=U?:7-DW0@/R!TF]N92 M(#,V,# @ M.B!T[EMAIL PROTECTED] S-C P*2P-BL)0D)6%BR@@*AT82T^=U?:7-DW0@ M/R!TF]N92 M(#,V,# @.B!TF]N92D@)2 S-C P*2 O(#8P(D-BL)0D) M*3L-BLC96YD:68-BL)0D)W1R8V%T*%I?4U125D%,7U HF5T=7)N7W9A M;'[EMAIL PROTECTED]UP7V)U9F8I.PT**PD)0EBF5A:SL-BL)0EC87-E(=C)SH- MBLC:[EMAIL PROTECTED]'351/1D8)0D)#0HK0D)7-PFEN=8H=UP7V)U M9F8L((E,#1D+24P,F0M)3 R9%0E,#)D.B4P,F0Z)3 R95C)3 R9#HE,#)D M([EMAIL PROTECTED]0D)0ET82T^=U?65AB K(%E%05)?0D%312P-BL)0D)71A M+3YT;5]M;VXL#0HK0D)0ET82T^=U?;61A2P-BL)0D)71A+3YT;5]H M;W5R+ T**PD)0D)=$M/G1M7VUI;BP-BL)0D)71A+3YT;5]S96,L#0HK M0D)0DH=$M/G1M7V=M=]F9B \(# I(#\@)RTG(#H@)RLG+ T**PD)0D) M86)S*'1A+3YT;5]G;[EMAIL PROTECTED] S-C P*2P-BL)0D)6%BR@@*'1A+3YT M;5]G;71O9F8@)2 S-C P*2 O(#8P(D-BL)0D)*3L-BLC96QS90T**PD) M0ES')I;G1F*'1M%]B=69F+ B)3 T9TE,#)D+24P,F14)3 R9#HE,#)D M.B4P,F0E8R4P,F0Z)3 R9(L( T**PD)0D)=$M/G1M7WEE87(@*R!914%2 M7T)!4T4L#0HK0D)0ET82T^=U?;6]N+ T**PD)0D)=$M/G1M7VUD87DL M#0H@0D)0ET82T^=U?:]UBP-B )0D)71A+3YT;5]M:6XL#0H@0D) /0ET82T^=U?V5C+ T* ` end -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] date() extension
On Thu, 27 Feb 2003 16:09:40 +0100 Dirkjan Ochtman [EMAIL PROTECTED] wrote: Didn't have time, but here's a new patch. It seems Outlook create weird and useless attachment, can you make it available online ? thank's pierre -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Problems debugging on win32
Hi! Derick Rethans [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] On Thu, 27 Feb 2003, Braulio José Solano Rojas wrote: I think I did, since PHP is using php4ts_debug.dll, and if I delete this file I get a message of php-cli.exe saying that it does not find it. I used to compile php-cli the configuration Win32 Debug_TS. I also noticed that there is a Win32 Release_TSDbg but I did not use it. If you notice in the warning I received for PHP I have debug=1. Does this means that PHP is compiled for debugging? That would mean debug for me. Yes, sorry, then you just didn't compile your module in this debug mode... I also think I did, but maybe I missed something in my Win32 Debug_TS configuration. Can you point on how do I create it. Basically I have disabled Optimizations, I have added the following preprocessor definitions DEBUG,_DEBUG,ZEND_DEBUG=1,WIN32,_WINDOWS,_MBCS,_USRDLL,ISIS_EXPORTS,ZEND_DE BUG=0,COMPILE_DL_ISIS,ZTS=1,ZEND_WIN32,PHP_WIN32, and I added debug info Program Database for Edit and Continue. The file created is bigger than the one created using Win32 Release_TS configuration. Where am I missing something? Regards, Braulio -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Getting an external param into a userspace streams filter...
On Thu, Feb 27, 2003 at 09:42:24AM -0500, David Brown wrote: | On Thu, Feb 27, 2003 at 09:40:15AM -0500, David Brown wrote: | | Hi Wez, everyone: | | | | Is there (or will there ever be) a good way to transmit an extra | | parameter into a php_user_filter around the time that oncreate() is | | called? I've run into a couple cases where it'd be incredibly useful | | Nevermind. Seems I can't read this morning. Sorry about that. Well, perhaps I jumped to self-chastisement a bit too quick. There's a single string parameter that can be passed to stream_filter_append / stream_filter_prepend, but how would one retrieve this information once inside of the filter? Moreover, for passing arbitrary zvals in, would I have to resort some hackery using array keys from a global, or is there an easier way? Thanks in advance, - Dave 'Replies to self way too many times' [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] date() extension
http://temp.xavamedia.nl/iso8601diff.txt Regards, Dirkjan Pierre-Alain Joye [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Thu, 27 Feb 2003 16:09:40 +0100 Dirkjan Ochtman [EMAIL PROTECTED] wrote: Didn't have time, but here's a new patch. It seems Outlook create weird and useless attachment, can you make it available online ? thank's pierre -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Problems debugging on win32
Hi! Braulio José Solano Rojas [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] I also think I did, but maybe I missed something in my Win32 Debug_TS configuration. Can you point on how do I create it. Basically I have disabled Optimizations, I have added the following preprocessor definitions DEBUG,_DEBUG,ZEND_DEBUG=1,WIN32,_WINDOWS,_MBCS,_USRDLL,ISIS_EXPORTS,ZEND_DE BUG=0,COMPILE_DL_ISIS,ZTS=1,ZEND_WIN32,PHP_WIN32, and I added debug info Program Database for Edit and Continue. The file created is bigger than the one created using Win32 Release_TS configuration. Sorry! I realised myself reading my own email that I had inserted a ZEND_DEBUG=0. I do not know why, because I also had ZEND_DEBUG=1. Just those mistakes that gives you headache. Nice to recognize your own mistakes. :-) Anyway, thanks for the help provided. Best regards, Braulio -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Getting an external param into a userspace streamsfilter...
Hi David, user filters are in a little bit of flux atm. However, the idea is that the param argument will be altered to be a zval (rather than just a string). In the oncreate() method, the following member variables are available to the filter: string $this-filtername; // name of the filter mixed $this-params; // params passed from prepend/append func Hope this helps; please only use current CVS for PHP 5 for playing around with this stuff; if you run into problems let me (and Sara [EMAIL PROTECTED]) know and we can sort them out. --Wez. On Thu, 27 Feb 2003, David Brown wrote: On Thu, Feb 27, 2003 at 09:42:24AM -0500, David Brown wrote: | On Thu, Feb 27, 2003 at 09:40:15AM -0500, David Brown wrote: | | Hi Wez, everyone: | | | | Is there (or will there ever be) a good way to transmit an extra | | parameter into a php_user_filter around the time that oncreate() is | | called? I've run into a couple cases where it'd be incredibly useful | | Nevermind. Seems I can't read this morning. Sorry about that. Well, perhaps I jumped to self-chastisement a bit too quick. There's a single string parameter that can be passed to stream_filter_append / stream_filter_prepend, but how would one retrieve this information once inside of the filter? Moreover, for passing arbitrary zvals in, would I have to resort some hackery using array keys from a global, or is there an easier way? Thanks in advance, - Dave 'Replies to self way too many times' [EMAIL PROTECTED] -- 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] date() extension
If you don't have time to support your own patch, why should we commit it to CVS!?? There is a reason for that doc being there; please read it. --Wez. On Thu, 27 Feb 2003, Dirkjan Ochtman wrote: Didn't have time, but here's a new patch. Regards, Dirkjan Wez Furlong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Please read the README.SUBMITTING_PATCH file in the root of the php source and re-submit your patch. On Mon, 17 Feb 2003, Dirkjan Ochtman wrote: begin 666 datetime.c begin 666 iso8601diff.txt [EMAIL PROTECTED](1A=5T:6UE+F,-CT]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T-E)# Trimmed crapola uuencoded attachment. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Getting an external param into a userspace streams filter...
Hi Wez: On Thu, Feb 27, 2003 at 04:26:40PM +, Wez Furlong wrote: | Hi David, | | user filters are in a little bit of flux atm. | | However, the idea is that the param argument will be altered to be a | zval (rather than just a string). | | In the oncreate() method, the following member variables are available | to the filter: | | string $this-filtername; // name of the filter | mixed $this-params; // params passed from prepend/append func Excellent. :) I did finally find where $this-params gets set (in ext/standard/user_filters.c:242), but I figured a third reply to myself would probably just be embarassing. ;-) | Hope this helps; please only use current CVS for PHP 5 for playing | around with this stuff; if you run into problems let me (and Sara | [EMAIL PROTECTED]) know and we can sort them out. Will do. I'm currently wrapping the experimental streams stuff in a class, falling back to a user-space streams/filter implementation when the PHP 5 one isn't available. I'm currently using the oncreate() method (of my wrapper class) to transmit the parameters to the filter; I just wanted to make sure that this wouldn't bite me when I tried to slide the PHP filter implementation underneath it. Anyway, much thanks. - Dave [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Re: [PHP] Threading
would semaphores provide the mutual exclusion zone you need? dave -Original Message- From: Braulio José Solano Rojas [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 8:01 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Re: [PHP] Threading Hi! Rasmus Lerdorf [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] On Tue, 18 Feb 2003, Greg Donald wrote: On Tue, 18 Feb 2003, Bruce Miller wrote: Will PHP allow multiple-thread execution? PHP4 does not have thread support. Well, except for pear/PECL/threads, of course. Is this going to be standard in the future in PHP. I need a mutual exclusion zone in the extension I am writing. Is this possible other way? Best regards, Braulio -- 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] Threading
Hi! Dave Viner [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] would semaphores provide the mutual exclusion zone you need? I do not know yet, I should studie it, but it is likely so. Are there semaphores in PHP? Regards, Braulio -Original Message- From: Braulio José Solano Rojas [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 8:01 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Re: [PHP] Threading Hi! Rasmus Lerdorf [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] On Tue, 18 Feb 2003, Greg Donald wrote: On Tue, 18 Feb 2003, Bruce Miller wrote: Will PHP allow multiple-thread execution? PHP4 does not have thread support. Well, except for pear/PECL/threads, of course. Is this going to be standard in the future in PHP. I need a mutual exclusion zone in the extension I am writing. Is this possible other way? Best regards, Braulio -- 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] Threading
On Thursday, February 27, 2003, at 01:50 PM, Braulio JosX Solano Rojas wrote: Hi! Dave Viner [EMAIL PROTECTED] escribiÛ en el mensaje news:[EMAIL PROTECTED] would semaphores provide the mutual exclusion zone you need? I do not know yet, I should studie it, but it is likely so. Are there semaphores in PHP? Yes. I'd recommend a reading of the fine manual. Of course if you're actually writing an extension it doesn't matter much if the semaphores are implemented in PHP or not, since you'll probably just want to use the sysv ipc support of the os yourself, without taking it through php userland functions. george -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP] Threading
Hi! George Schlossnagle [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] On Thursday, February 27, 2003, at 01:50 PM, Braulio JosX Solano Rojas wrote: Are there semaphores in PHP? Yes. I'd recommend a reading of the fine manual. I did of course. Of course if you're actually writing an extension it doesn't matter much if the semaphores are implemented in PHP or not, since you'll probably just want to use the sysv ipc support of the os yourself, without taking it through php userland functions. I already know about this functionality, but as you know this is only for Unix. And yes it matters if the semaphores are implemented in PHP since I need portability between different OSes. (I like Inter-Process Comunication, I am sorry not to have it on win32). I am working in an extension that provides functionality to read CDS/ISIS databases on PHP. Those databases are files (there is not a server, but a server is planned by the OpenIsis project [1]), so when there is concurrency we should provide consistent data. There is a paper on different solutions on how to solve this on PHP [2]. I was thinking of assume the worst case: PHP as a CGI. But, I am really interested in multi-threading inside PHP. CDS/ISIS is wide used in latin-america by librarians. If I could have a multi-platform solution, that would be great. Regards, Braulio [1] http://sourceforge.net/projects/isis [2] http://openisis.org/openisis/doc/Concurrency -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP] Threading
At 20:12 27-2-2003, Braulio José Solano Rojas wrote: I already know about this functionality, but as you know this is only for Unix. And yes it matters if the semaphores are implemented in PHP since I need portability between different OSes. (I like Inter-Process Comunication, I am sorry not to have it on win32). You are? Well, then install it: http://www.neuro.gatech.edu/users/cwilson/cygutils/cygipc/index.html With kind regards, Melvyn Sopacua ?php include(not_reflecting_employers_views.txt); ? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Re: [PHP] Threading
i believe that win32 actually does support semaphores. see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/bas e/using_synchronization.asp for details on synchronization issues inside win32 (including mutex which is what i think you're looking for). or if you don't want a lot of #ifdef WIN32 in your code, you could look at using Apache Portable Runtime (http://apr.apache.org) to enable mutex (http://apr.apache.org/docs/apr/group__APR__ThreadMutex.html) dave -Original Message- From: Braulio José Solano Rojas [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 11:12 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Re: [PHP] Threading Hi! George Schlossnagle [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] On Thursday, February 27, 2003, at 01:50 PM, Braulio JosX Solano Rojas wrote: Are there semaphores in PHP? Yes. I'd recommend a reading of the fine manual. I did of course. Of course if you're actually writing an extension it doesn't matter much if the semaphores are implemented in PHP or not, since you'll probably just want to use the sysv ipc support of the os yourself, without taking it through php userland functions. I already know about this functionality, but as you know this is only for Unix. And yes it matters if the semaphores are implemented in PHP since I need portability between different OSes. (I like Inter-Process Comunication, I am sorry not to have it on win32). I am working in an extension that provides functionality to read CDS/ISIS databases on PHP. Those databases are files (there is not a server, but a server is planned by the OpenIsis project [1]), so when there is concurrency we should provide consistent data. There is a paper on different solutions on how to solve this on PHP [2]. I was thinking of assume the worst case: PHP as a CGI. But, I am really interested in multi-threading inside PHP. CDS/ISIS is wide used in latin-america by librarians. If I could have a multi-platform solution, that would be great. Regards, Braulio [1] http://sourceforge.net/projects/isis [2] http://openisis.org/openisis/doc/Concurrency -- 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] [PATCH] - fix for 64 bit issues with OnUpdateInt
Proposed Patch to address 64 bit issues in PHP v4.3.1 Diff -u against php4-STABLE-200302241430 Also needed in 4.5.x and 5.x Addresses bugs 20994, 21002, 21822, 20268 Platforms affected, Tru64, Solaris 9, HP-UX, NetBSD/Alpha and any other 64 bit platform I forgot to mention A little education first on some platforms, sizeof(int) != sizeof(long) This is particularly true on 64 bit platforms. Mixed int* and long* in these cases can be deadly, and can cause hard to find problems. This is because if the machine writes to a long* that is really pointing at an int, then extra data gets written past the end of the int corrupting whatever is after that int. Also on 64 bit platforms, only a long is going to be big enough to hold a pointer, so assigning a pointer value to an int, and then assigning it back will result in truncation of data. Lastly, sizeof(size_t) == sizeof(long) which means if you plan to mix things, don't mix size_t and int. The particular problem that sparked this patch is a particular problem with OnUpdateInt called from zlib, as this function assumes a long is passed in, despite the name. In the source code - this function was passed a long in about 70% of the cases, an int in rest. What was passed was not always consitant in a particular source module. I chose to address this problem by creating OnUpdateLong (in addition to to existing OnUpdateInt) and sweep though the code changing the call where needed to match the stucture item. An equally valid fix would be to change all of those longs to ints. After performing that sweep, I found there was a small number of other errors of the int/long type that my compiler found that I corrected and are included here. There might be more mix and match problems, I only addressed the ones in the modules I have enabled. Files affected: Zend/zend_ini.c Zend/zend_ini.h ext/fbsql/php_fbsql.c ext/hyperwave/hw.c ext/ingres_ii/ii.c ext/interbase/interbase.c ext/ldap/ldap.c ext/mbstring/mbstring.c ext/mssql/php_mssql.c ext/mysql/php_mysql.c ext/odbc/php_odbc.c ext/pgsql/pgsql.c ext/session/session.c ext/standard/assert.c ext/standard/file.c ext/standard/info.c ext/standard/url_scanner_ex.c ext/sybase_ct/php_sybase_ct.c main/main.c sapi/apache/php_apache.c --- php4-STABLE-200302241430/Zend/zend_ini.c2002-12-31 12:15:18.0 -0500 +++ php4-STABLE-200302241430.mod/Zend/zend_ini.c2003-02-27 14:25:11.0 -0500 @@ -427,9 +427,35 @@ return SUCCESS; } - +/* + * Note: on 64 bit platforms, sizeof(long) != sizeof(int) and + * long* and int* cannot be used interchangably without disaster ! + * OnUpdateInt or OnUpdateLong must match the resource type ! + */ ZEND_API ZEND_INI_MH(OnUpdateInt) { + int *p; +#ifndef ZTS + char *base = (char *) mh_arg2; +#else + char *base; + + base = (char *) ts_resource(*((int *) mh_arg2)); +#endif + + p = (int *) (base+(size_t) mh_arg1); + + *p = zend_atoi(new_value, new_value_length); + return SUCCESS; +} + +/* + * Note: on 64 bit platforms, sizeof(long) != sizeof(int) and + * long* and int* cannot be used interchangably without disaster ! + * OnUpdateInt or OnUpdateLong must match the resource type ! + */ +ZEND_API ZEND_INI_MH(OnUpdateLong) +{ long *p; #ifndef ZTS char *base = (char *) mh_arg2; @@ -445,7 +471,6 @@ return SUCCESS; } - ZEND_API ZEND_INI_MH(OnUpdateReal) { double *p; --- php4-STABLE-200302241430/Zend/zend_ini.h2002-12-31 12:15:18.0 -0500 +++ php4-STABLE-200302241430.mod/Zend/zend_ini.h2003-02-27 14:25:11.0 -0500 @@ -171,6 +171,7 @@ /* Standard message handlers */ ZEND_API ZEND_INI_MH(OnUpdateBool); ZEND_API ZEND_INI_MH(OnUpdateInt); +ZEND_API ZEND_INI_MH(OnUpdateLong); ZEND_API ZEND_INI_MH(OnUpdateReal); ZEND_API ZEND_INI_MH(OnUpdateString); ZEND_API ZEND_INI_MH(OnUpdateStringUnempty); --- php4-STABLE-200302241430/ext/fbsql/php_fbsql.c 2003-02-12 16:13:08.0 -0500 +++ php4-STABLE-200302241430.mod/ext/fbsql/php_fbsql.c 2003-02-27 14:25:11.0 -0500 @@ -358,14 +358,14 @@ /* {{{ PHP_INI */ PHP_INI_BEGIN() - STD_PHP_INI_BOOLEAN (fbsql.allow_persistent, 1, PHP_INI_SYSTEM, OnUpdateInt,allowPersistent, zend_fbsql_globals, fbsql_globals) - STD_PHP_INI_BOOLEAN (fbsql.generate_warnings,0, PHP_INI_SYSTEM, OnUpdateInt,generateWarnings, zend_fbsql_globals, fbsql_globals) - STD_PHP_INI_BOOLEAN (fbsql.autocommit, 1,PHP_INI_SYSTEM, OnUpdateInt,autoCommit, zend_fbsql_globals, fbsql_globals) - STD_PHP_INI_ENTRY_EX (fbsql.max_persistent, -1, PHP_INI_SYSTEM, OnUpdateInt,maxPersistent,zend_fbsql_globals, fbsql_globals, display_link_numbers) - STD_PHP_INI_ENTRY_EX (fbsql.max_links, 128,
[PHP-DEV] CVS Account Request: jay
A few weeks ago, I kind of volunteered to maintain testing scripts for ZE2 on the ZE2 mailing list. (See the thread beginning at http://www.zend.com/lists/engine2/200302/msg3.html ) Just to make good on my volunteering, I guess I'll be needing a CVS account. I suppose I'd need access to php(4|5)/tests. I have a bunch of tests ready to go, and will be adding more as features get added, tweaked, etc. within ZE2. As for experience, I've submitted various patches to the project over the past year or so and written a few extensions that will eventually make it to PECL. I've also offered the use of a Solaris server to the group for debugging Solaris SPARC issues and can do some debugging on it myself if there's a need for it. J, aka darkpanda -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] using VC++ to compile PHP extensions
Hi, I've just completed some local php extensions using VC++. Here are some notes that might help others when creating php extensions using VC++. By default, Visual C++ will add classes with a .cpp extension. To make this work properly, you must either wrap the C specific sections, or force C linkage. The sections that must be wrapped are: extern C { #include php.h #include php_ini.h #include ext/standard/info.h } and extern C { #ifdef COMPILE_DL_MYMODULE ZEND_GET_MODULE(MyModule) #endif } To force C-linkage, you can change the extension to .c, or add /Tc to your settings (Project Setting C/C++ General - then add /Tc to the Project Options at the bottom). Second, you should add this to the very top of your cpp file: #ifdef WIN32 #include math.h #endif Otherwise, the math header will be included inside the extern C section, and will cause an error. (STL template definitions can't be included under the C linkage.) Third, be sure to declare all function prototypes first. If you don't use a php_MyModule.h file, you _must_ declare all function prototypes before the first zend function struct. So, put them after your header includes, and before the section that looks like: function_entry MyModule_functions[] = { PHP_FE(confirm_MyModule_compiled, NULL) /* For testing, remove later. */ {NULL, NULL, NULL} /* Must be the last line in Cache_functions[] */ }; These were just a few small notes that really helped me in using Visual C++ to build some PHP extensions. Also, the article http://www.devnewz.com/2002/0909.html was very helpful to start from. dave -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: using VC++ to compile PHP extensions
To add to that, I wrote up a short article yesterday that pretty much said the same thing, although it had a more UNIX-y focus. See http://www.tutorbuddy.com/software/phpcpp/phpcpp/ J Dave Viner wrote: Hi, I've just completed some local php extensions using VC++. Here are some notes that might help others when creating php extensions using VC++. snip dave -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: nvivo
I'd like to help translating PHP Documentation to Portuguese (Brazilian) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] date() extension
Please! It's just a date() parameter, about 20 lines of code, mostly taken from another date() parameter. I'm a Windows user, I don't have all your cool auto* and gcc stuff. It doesn't seem worthwhile for me to go through installing Cygwin for something this simple... Just reject the patch, if you don't want it. Wez Furlong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you don't have time to support your own patch, why should we commit it to CVS!?? There is a reason for that doc being there; please read it. --Wez. On Thu, 27 Feb 2003, Dirkjan Ochtman wrote: Didn't have time, but here's a new patch. Regards, Dirkjan Wez Furlong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Please read the README.SUBMITTING_PATCH file in the root of the php source and re-submit your patch. On Mon, 17 Feb 2003, Dirkjan Ochtman wrote: begin 666 datetime.c begin 666 iso8601diff.txt [EMAIL PROTECTED](1A=5T:6UE+F,-CT]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T-E)# Trimmed crapola uuencoded attachment. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] date() extension
You don't need any of that stuff to read the guidelines for submitting a patch - why don't you just read it and save everybody some time... --Wez. On Fri, 28 Feb 2003, Dirkjan Ochtman wrote: Please! It's just a date() parameter, about 20 lines of code, mostly taken from another date() parameter. I'm a Windows user, I don't have all your cool auto* and gcc stuff. It doesn't seem worthwhile for me to go through installing Cygwin for something this simple... Just reject the patch, if you don't want it. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] JP Graph
Hello, please forward user questions to the [EMAIL PROTECTED] mailinglist, this list is for development _OF_ PHP, not development _with_ PHP. Derick On Thu, 27 Feb 2003, K wrote: Hi all, I'm using JPGraph on a localhost for a website opened via a host redirect. My problem is that nobody can see the graphs but me ('cause I'm on localhost). Any clues? Thx. -- Stop mad cowboy disease! - 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
[PHP-DEV] New extension: netfilter
Can i code a netfilter extension for PHP or don't you guys see the need for it ? It could result in some great firewall frontends in PHP Corne' !Exclude Disclaimer! -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] New extension: netfilter
On Fri, 28 Feb 2003, Corne' Cornelius wrote: Can i code a netfilter extension for PHP or don't you guys see the need for it ? It could result in some great firewall frontends in PHP Go for it. Assuming the netfilter library is not under the GPL. LGPL is fine. -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] New extension: netfilter/iptables
Can i code a netfilter extension for PHP or don't you guys see the need for it ? It could result in some great firewall frontends in PHP Go for it. Assuming the netfilter library is not under the GPL. LGPL is fine. -Rasmus It's under GPL, i'll email their core team and ask if they'll consider LGPL !Exclude Disclaimer!
[PHP-DEV] JP Graph
Hi all, I'm using JPGraph on a localhost for a website opened via a host redirect. My problem is that nobody can see the graphs but me ('cause I'm on localhost). Any clues? Thx. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP] Threading
Hi! Rasmus Lerdorf [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] On Tue, 18 Feb 2003, Greg Donald wrote: On Tue, 18 Feb 2003, Bruce Miller wrote: Will PHP allow multiple-thread execution? PHP4 does not have thread support. Well, except for pear/PECL/threads, of course. Is this going to be standard in the future in PHP. I need a mutual exclusion zone in the extension I am writing. Is this possible other way? Best regards, Braulio -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php