[PHP-DEV] Request : PHP Symbian os
Greetings all, Have someone already tryed to use/compile/code PHP on Symbian OS ? Cheers, Hatem -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: hatem
arabic php pear manual translation -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: hatem
contributions to arabic documentation translation (php pear manual). thx -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Break down RETR from telnet
Hi, I'm wondering how to parse the actual email message (body) from RETR in telnet, I am able to parse all the other information needed (using TOP in telnet) but cannot get the actual message... could anyone help please? Thanks for any help -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Interfaces in PHP
2) Interfaces as they exist in java don't really give you much in a stripting language but if you insist on having something like that you can curently do it with the zend1. class temperature { function __construct($value) {} function toCelcius() {} function toFarenheight() {} } just use that class and extend away - Brad Brad, You don't quite get the same functionality from extending a class as you would from implementing an interface. If I'm extending temperature what keeps me as a user from not overriding any of those functions? Or what if I want to extend a different class but still define my class as having those functions found in temperature? Having interfaces is a nice way to skirt the issue of not having multiple inheritance built into the language. Or as my example from before. We have more advanced constructs built into our class library. An automatic database mirror search library, or maybe we want to implement some sort of distributed class heirarchy across multiple servers? It would definetly be more reliable to require certain functions be defined for classes which implement a certain interface rather than assume it is there. And finally if we have a class heirarchy that is already defined and I am creating a new class called UserMenu and extending the class Menu. What if I want to make UserMenu searchable even though the class Menu is not? I can't extend both SearchableObject and Menu. The only way that I can see this working is if there was multiple inheratence or interfaces. You can think of it as inserting an additional branch into the class tree heirarchy. But all of this is doable without having interfaces, it's just that they are one of the easier ways to solve these problems. Ben -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Interfaces in PHP
Thanks for all of your guys' comments on this. Ultimately I see Zeev's insight of PHP not having a strong type definition totally accurate. Even if we did have a mechanism to make sure that a class defined certain functions, we could not readily see if these functions did what we wanted, bringing us to the same problem. The delegation construct looks promising for having a means of multiple inheretence. Ben Zeev Suraski wrote: At 09:30 21/08/2002, Ben Dischinger wrote: You don't quite get the same functionality from extending a class as you would from implementing an interface. If I'm extending temperature what keeps me as a user from not overriding any of those functions? Or what if I want to extend a different class but still define my class as having those functions found in temperature? Having interfaces is a nice way to skirt the issue of not having multiple inheritance built into the language. Interfaces, IMHO, simply do not fit the spirit of PHP. PHP is extremely loose about what it 'demands' from the programmer. You don't have types, you don't have to declare variables. But suddenly, we would have a construct that 'requires' you to implement certain functions? Ok fine, so you would have to implement a certain set of functions, but given the loose typing, what does that buy you anyway? You can't force him to return what you expect, or even deal with the arguments you send him according to their intended type. I don't see interfaces as something which makes too much sense in the context of PHP, and considering the added complexity of adding such a new feature, I'm against it. Typically, the argument is between single inheritance with interfaces, and multiple inheritance. We went for a multiple-inheritancish approach with delegation, and I don't think we should overcomplicate it with interfaces. Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Interfaces in PHP
What are the thoughts on implementing interfaces (as in object) within PHP? Does the work outweigh the benefits? Ben Dischinger -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Interfaces in PHP
I'll try to explain why I feel such a feature as interfaces would be useful to me in PHP. This is all under the assumption that when a class is loaded into memory a certain number of checks are performed to make sure it is a valid definition. For example, You cannot extend a class which is not defined in memory. Then we could then equally say that you cannot implement an interface without first defining its functions. We are not violating the precident of inappropriate access to private members not flagging an error because this is not an object level error, but instead a class definition error. Now let's say that I am creating a standardized class library in which the root class definition, Object, GUARANTEES a universal means of saving objects to a database. Obviously this is an easy problem to solve. Serialize the object and save it to the database. But now we add a new feature to our library. Let's create a new class called SearchableObject. We want this to be a type of language construct in which if I extend this SearchableObject a new table is created in the database in which all of the variables of the class are mirrored instead of serialized offering greater search flexibility. It's funny that you mention private variables in the Zend2 Engine because that's exactly where my problem arises. If my class, let's call it Person, in which I'm extending SearchableObject has private variables (such as name, address, password). Obviously we can't make these variables public because then anyone could change their value. How do I automagically save them to the database from within the base class definition? This is an interesting problem. We can't access these variables directly from a method call say, get_object_vars($this). One way I've found to do this is with an accessor function getVars. Here's an example of what it might look like: //$child is a double hash as defined below function getVars($child=){ return parent::getVars($child[$this-getClass()] = array(var_1=$this-var_1 ... var_n=var_n)); //Where var_1..n are the class variable names } This function provides a way of passing private variable values to the base class without compromise of security or loss of redundant variables (i.e. having the same variable name in the parent and child). Now if you extend SearchableObject we can detect it within our database save routine, but there is still no way for us to know that you have implemented the function getVars, therefore not guarantying that all objects can be saved automatically. If SearchableObject were instead an interface we could put the stub for getVars within it, and then guarantee that any class which implemented SearchableObject had the function getVars. That would bring us one step closer to our goal. I'm sorry for the long explanation but I couldn't find a better way to explain how interfaces could be useful without going a little in depth. If you have any suggestions how one would go about requiring a function be defined in a class without using interfaces please let me know. Thanks, Ben Dischinger - Original Message - From: Brad LaFountain [EMAIL PROTECTED] To: Alan Knowles [EMAIL PROTECTED]; Wez Furlong [EMAIL PROTECTED] Cc: Ben Dischinger [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, August 21, 2002 1:05 AM Subject: Re: [PHP-DEV] Interfaces in PHP --- Alan Knowles [EMAIL PROTECTED] wrote: From my reading of delegation, it's really overloading, worded slightly differently.. - but not that related to interfaces... In the example below, which is a php'ized version of a C# demo, the advantages of using interfaces (as far as I know) are primarly useful for COM or CORBA, where it would be possible to generate all the components for a CORBA/COM/.NET, or even java binding by reading the interfaces. A .NET binding would effectively define all the available interfaces and classes, with strong typing!, and then when called (from C# or .NET) invoke a C call to call_user_function, to run php exectuter (probably the best way to implement a .NET server in php, - compiling a loosely typed language into .NET bytecodes, from reading about python,perl etcs. experience is not the way to go..) Other than being nice for documentation, in pure PHP, I cant really see them being much use... Interesting subject anyway.. Regards Alan called from C# PHP_Celcius c = new PHP_Celcius(12.9); system.out(c.toFarenheight().toString()); Interface temperature { function __construct(float $value); float function toCelcius(); float function toFarenheight(); } There really are two different things here.. 1) Type Hints meaning you can define the types of variables This has been discussed before it hasn't been turned down or implemented. 2) Interfaces as they exist in java don't really give you much in a stripting language but if you insist on having something like that you can
[PHP-DEV] Data Hiding Implementation in PHP Classes
Hello, My question is if there is anyone working on an implementation of data hiding in php? IE Public, private, and protected data types within php classes. I can not find anywhere mentioning this besides very few websites that say it is on the TODO list. The research that I'm doing involves dynamically programming php from the internet collectively with many users, of which some would have restricted access rights to specific objects. All objects would have certain data that I would need to be of type private, ie owner id, permission mode, etc... in order for the object security model to be safe. Without data hiding any user using this system could simply type $Current_User-UID=0 which would then change the owner of this object, which happens to be a user to 0, or god. There may be a different way to implement this that I'm not seeing, but any model that I come up with in php I can circumvent by some simular means. I may need to implement a servlet in java that keeps track of currently logged in users and objects in memory, but this would be more overhead than wanted. If data hiding was implemented in PHP I would be very excited. If there is not already someone working on it, perhaps I will roll up my sleeves and get my elbows dirty. Thank you so much for reading. Ben Dischinger NDSU Computer Science
[PHP-DEV] Unserialize Bug #17728 and Re: [PHP-DEV] Data Hiding Implementation in PHP Classes
Thanks so much for your help Brad and Sander. I've downloaded the newest Zend2 from cvs and compiled it into Php-4.3.0-dev. All of the features of data hiding which I would need for this project look nicely implemented in this engine! But now I'm running a bit of a dilemna. I'm saving serialized objects in a database, but it seems as though the unserialize function is not liking the string that the function serialize outputs. It results in a segmentation fault. I did a gdb trace on it and looked at the zend_hash.c file for maybe a little bit of insight, but nothing jumped out at me as I'm not very familier with php's internal structure. I've attached the trace and code below. I've noticed a bug in the bug tracking system http://bugs.php.net/bug.php?id=17728, that looks related and unresolved. Any help would be appreciated! Thank you! Ben Dischinger Here is the code that produces the fault: /** * getObject - Returns the object associated with oid from the database **/ function getObject($oid){ //Get Serialization String and unserialize it if($result = $this-getSingleResult(select serialization from phpflux_lang_object where oid=$oid)){ $serial = $result['serialization']; echo $serial; return unserialize($serial); } return null; } Here is the gdb output: Starting program: /usr/local/bin/php index.php In fluxInclude(): $Class=phpflux.lang.* In include_dir(): $dirStr=/home/disching/Projects/phpflux/classes/phpflux/lang/ In putObject(): In getSingleResult: $query=select serialization from phpflux_lang_object where oid=16 O:10:testobject:9:{s:7:package;s:12:phpflux.lang;s:11:objectoid;N;s:11:objectuid;N;s:11:objectgid;N;s:11:objectmod;N;s:16:objectcomments;N;s:1:A;s:8:Object A;s:1:B;s:8:Object B;s:1:C;s:8:Object C;} Program received signal SIGSEGV, Segmentation fault. zend_hash_copy (target=0x400b9814, source=0x81d2b3c, pCopyConstructor=0x811d200 zval_add_ref, tmp=0xbfffc048, size=4) at /root/php4/Zend/zend_hash.c:777 777if (p-nKeyLength) { (gdb) bt #0 zend_hash_copy (target=0x400b9814, source=0x81d2b3c, pCopyConstructor=0x811d200 zval_add_ref, tmp=0xbfffc048, size=4) at /root/php4/Zend/zend_hash.c:777 #1 0x0811f2c9 in _object_and_properties_init (arg=0x400c75f8, class_type=0x81d2afc, properties=0x0) at /root/php4/Zend/zend_API.c:600 #2 0x0811f307 in _object_init_ex (arg=0x400c75f8, class_type=0x81d2afc) at /root/php4/Zend/zend_API.c:610 #3 0x080de205 in php_var_unserialize (rval=0xbfffc214, p=0xbfffc1f8, max=0x400b99cb , var_hash=0xbfffc1fc) at var_unserializer.re:196 #4 0x080d74e9 in zif_unserialize (ht=1, return_value=0x400c75f8, this_ptr=0x0, return_value_used=1) at /root/php4/ext/standard/var.c:667 #5 0x08130153 in execute (op_array=0x400b456c) at /root/php4/Zend/zend_execute.c:2079 #6 0x08130245 in execute (op_array=0x400aca14) at /root/php4/Zend/zend_execute.c:2103 #7 0x0811e304 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php4/Zend/zend.c:832 #8 0x080fd169 in php_execute_script (primary_file=0xba80) at /root/php4/main/main.c:1504 #9 0x08136a60 in main (argc=2, argv=0xbb24) at /root/php4/sapi/cli/php_cli.c:683 #10 0x42017499 in __libc_start_main () from /lib/i686/libc.so.6 Brad LaFountain wrote: That .txt only talks about private members. Zend2 also implements protected data members. - brad --- Sander Roobol [EMAIL PROTECTED] wrote: The Zend Engine 2 implements this. See http://www.php.net/ZEND_CHANGES.txt Sander On Fri, Aug 16, 2002 at 03:13:57AM -0500, Ben Dischinger wrote: Hello, My question is if there is anyone working on an implementation of data hiding in php? IE Public, private, and protected data types within php classes. I can not find anywhere mentioning this besides very few websites that say it is on the TODO list. The research that I'm doing involves dynamically programming php from the internet collectively with many users, of which some would have restricted access rights to specific objects. All objects would have certain data that I would need to be of type private, ie owner id, permission mode, etc... in order for the object security model to be safe. Without data hiding any user using this system could simply type $Current_User-UID=0 which would then change the owner of this object, which happens to be a user to 0, or god. There may be a different way to implement this that I'm not seeing, but any model that I come up with in php I can circumvent by some simular means. I may need to implement a servlet in java that keeps track of currently logged in users and objects in memory, but this would be more overhead than wanted. If data hiding was implemented in PHP I would be very excited. If there is not already someone working on it, perhaps I will roll up my sleeves and get my elbows dirty. Thank you so much for reading. Ben Dischinger NDSU Computer Science -- PHP Development Mailing List
[PHP-DEV] CVS Account Request: doron
Migration of PHP to Hebrew - included the manual, man files etc... -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Bug #15764 Updated: mysql_real_connect client flags: compression SSL
Attached. On 1 Mar 2002 08:55:15 - PHP Bug Database [EMAIL PROTECTED] wrote: ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=15764edit=2 ID: 15764 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: Feature/Change Request Operating System: all PHP Version: 4.0CVS-2002-02-27 New Comment: Can you mail a unified diff (diff -u) to this list? ([EMAIL PROTECTED]) regards, Derick Previous Comments: [2002-02-28 17:18:38] [EMAIL PROTECTED] Would this patch be ok? I am not sure when these constants were added to MYSQL, I could not find them in the mysql docs. I know for sure that the 4 series has them though... diff ../php4-orig/ext/mysql/php_mysql.c ext/mysql/php_mysql.c 344a345,352 REGISTER_LONG_CONSTANT(MYSQL_CLIENT_SSL, CLIENT_SSL, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(MYSQL_CLIENT_COMPRESS, CLIENT_COMPRESS, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(MYSQL_CLIENT_FOUND_ROWS, CLIENT_FOUND_ROWS, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(MYSQL_CLIENT_NO_SCHEMA, CLIENT_NO_SCHEMA, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(MYSQL_CLIENT_INTERACTIVE , CLIENT_INTERACTIVE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(MYSQL_CLIENT_ODBC, CLIENT_ODBC, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(MYSQL_CLIENT_IGNORE_SPACE, CLIENT_IGNORE_SPACE,CONST_CS | CONST_PERSISTENT); 436a445 int client_flags = 0; 439c448 zval **z_host=NULL, **z_user=NULL, **z_passwd=NULL, **z_new_link=NULL; --- zval **z_host=NULL, **z_user=NULL, **z_passwd=NULL, **z_new_link=NULL, **z_client_flags=NULL; 441a451 495a506,518 case 5: { if (zend_get_parameters_ex(5, z_host, z_user, z_passwd, z_new_link, z_client_flags) == FAILURE) { MYSQL_DO_CONNECT_RETURN_FALSE(); } convert_to_string_ex(z_user); convert_to_string_ex(z_passwd); convert_to_long_ex(z_client_flags); user = Z_STRVAL_PP(z_user); passwd = Z_STRVAL_PP(z_passwd); new_link = Z_BVAL_PP(z_new_link); client_flags = Z_LVAL_PP(z_client_flags); } break; 569c592 if (mysql_real_connect(mysql-conn, host, user, passwd, NULL, port, socket, 0)==NULL) { --- if (mysql_real_connect(mysql-conn, host, user, passwd, NULL, port, socket, client_flags)==NULL) { 609c632 if (mysql_real_connect(le-ptr, host, user, passwd, NULL, port, socket, 0)==NULL) { --- if (mysql_real_connect(le-ptr, host, user, passwd, NULL, port, socket, client_flags)==NULL) { 662c685 if (mysql_real_connect(mysql-conn, host, user, passwd, NULL, port, socket, 0)==NULL) { --- if (mysql_real_connect(mysql-conn, host, user, passwd, NULL, port, socket, client_flags)==NULL) { [2002-02-27 14:26:08] [EMAIL PROTECTED] mysql with a VERSION_ID 40001 (maybe 4) supports the following clientflags CLIENT_COMPRESS Use compression protocol. CLIENT_FOUND_ROWS Return the number of found (matched) rows, not the number of affected rows. CLIENT_IGNORE_SPACE Allow spaces after function names. Makes all functions names reserved words. CLIENT_INTERACTIVE Allow interactive_timeout seconds (instead of wait_timeout seconds) of inactivity before closing the connection. CLIENT_NO_SCHEMA Don't allow the db_name.tbl_name.col_name syntax. This is for ODBC. It causes the parser to generate an error if you use that syntax, which is useful for trapping bugs in some ODBC programs. CLIENT_ODBC The client is an ODBC client. This changes mysqld to be more ODBC-friendly. CLIENT_SSL Use SSL (encrypted protocol). It would be nice to add CLIENT_SSL and CLIENT_COMPRESS options to the php_mysql_do_connect() ... mysql.patch Description: Binary data -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Problems from php4.0.6 to 4.1.1 with sessions
Hi All In all my sessions sites when I had to move from the primary domain using session to a secondary domain (like from www.domain.com to secure.domain.com) I added the PHPSESID to the URL and the session in the new site continued from the previous Domain. in 4.1.1 when I move from the primary domain to the secondary one I still can use the session until I click/submit without PHPSESID which then make PHP loose the old session and start a new one. Until now I didn't had to submit the PHPSESID every time but only once ( in the first entrance to the secondary domain ) And Yes register_globals = On I dont make thing complex and so I use only: session_start(); session_register(some_var); a copy of the php.ini for the 4.1.1 is at: http://www.canaan.co.il/users/miki/php-ini-4.1.1.txt Thanks in Advance. -- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il -- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #14590: Can not unzip your install once downloaded
From: [EMAIL PROTECTED] Operating system: xp PHP version: 4.1.0 PHP Bug Type: *General Issues Bug description: Can not unzip your install once downloaded When we download your PHP 4.1.0 Win32 zip installer it will not unzip using several different programs? -- Edit bug report at: http://bugs.php.net/?id=14590edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] apache 2.0.28 and php 4.1rc2
Hello Everybody I am working on testing these together, I am compiled them both (DSO - apxs2). Everything seemed fine, i have an additional directory called modules in my apache root directory. My config file has LoadModule php4_modulemodules/libphp4.so AddType application/x-httpd-php .php .html AddType application/x-httpd-php-source .phps But when I connect 127.0.0.1/test.php // do you wish to download file. 127.0.0.1/test.html // do you wish to downlaod file. (Also these are both php scripts) My log file does not give me anyidea what is going on.. I don't have any messages saying that php has not been loaded. I have looked all over the docs and mailing list but i have not found anything like this.. Anybody have any ideas what wrong. Ben -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] New Extension
I wrote an extension over the weekend that will authenticate users to a m$ windows domain server. Does this functionality already exist in PHP4? If not I'd love to include it. -- Ben Menking [EMAIL PROTECTED] http://www.menking.net/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] libxml / dom functions
Hi, i'm interested in using the libxml / DOM functions, they are however marked EXPERIMENTAL. How far away are they from being included in PHP ? Is there any help needed to make them safe to use ? Regards, Benno -- Sebastian Benoit [EMAIL PROTECTED] / Software Engineer -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12405: The result of create_function should be accepable to the parser
From: [EMAIL PROTECTED] Operating system: Linux (but I think all) PHP version: 4.0.6 PHP Bug Type: Feature/Change Request Bug description: The result of create_function should be accepable to the parser While trying to build a set of higher-order search and match functions, I came across the null at the front of the lambda name refered to in bug #10721. It would ne very neat if one could write: function _not_($f) { return create_function('$x', return !$f(\$x);); } and so on for _and_ and _or_(with two function args). Once a set of primitive match functions are defined you can then define complex criteria. However, the parser rejects the names produced create_function. The following works but it clearly yucky: function f_not($f) { $f = substr($f, 1); return create_function('$x', return !call_user_func(chr(0).'$f', \$x);); } For these lambdas to be true closures, they should be callable from other created functions. -- Edit bug report at: http://bugs.php.net/?id=12405edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12064 Updated: Truetype functions can't locate fonts
ID: 12064 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: GD related Operating System: Windows 2000 SP1 PHP Version: 4.0.6 New Comment: That would take a good look at the source code to see how PHP is passing arguments to the GD library. Previous Comments: [2001-07-22 19:20:16] [EMAIL PROTECTED] Fixing null status. So, is this a GD Bug, or a PHP bug? [2001-07-12 17:34:06] [EMAIL PROTECTED] Ok, I checked out filemon. Here's what's happening: GD first tries to open files inside the Apache root (not the web root; for instance, on my box, C:\Program Files\Apache. So, if I've specified C:\\path\\to\\font.ttf in my path, I end up with: C:\Program Files\Apache\C\C:\path\to\font.ttf.ttf Next, it tries the current directory. However, it seems to be unable to process Windows drive letters, and so defaults to drive C: (my webroot's on D:, which is a problem), so I get C:\path\to\script\C:\path\to\font.ttf.ttf You get the idea. I made a directory structure on C: mimicing that of my D: webroot, but only containing the fonts; it worked fine (although the antialiasing was horrific, but that's a GD/FT2 issue). [2001-07-12 17:18:32] [EMAIL PROTECTED] Pretty sure, but it doesn't work the other way around either. [2001-07-12 16:08:57] [EMAIL PROTECTED] Are you sure that GD understands d:/path/to/font.ttf as a path? Should it be d:\\path\\to\\font.ttf ? --Wez. [2001-07-12 16:00:10] [EMAIL PROTECTED] please use filemon (www.sysinternals.com) to find out where php/gd is searching for the fonts, and report back. thanks. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=12064 Edit this bug report at http://bugs.php.net/?id=12064edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12064 Updated: Truetype functions can't locate fonts
ID: 12064 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Summary: Truetype functions can't locate fonts Status: Analyzed Bug Type: GD related Operating System: Windows 2000 SP1 PHP Version: 4.0.6 New Comment: Rasmus: I did some reading through the GD docs; it seems that GD uses an environment variable called GDFONTPATH to locate its fonts when no path is specified (this seems to imply that the proper extension would also be appended). However, setting this properly did not work. The documentation also says that a full path will be accepted (with .ttf ending) if specified as a parameter. Seems like a problem with the way PHP is passing the string, perhaps. I would play with the source, but I don't have a compiler for this environment right now; it seems that people are not having this problem on Unices, so I won't bother looking there. Any clue? Thanks, Ben Previous Comments: [2001-07-12 14:36:33] [EMAIL PROTECTED] No idea about the Windows version, but on UNIX the new GD2 library is hardcoded to look for TTF fonts in /usr/share/fonts/truetype. Also, it automatically adds the .ttf extension itself so in your code you should not put the .ttf extension on your font. [2001-07-11 15:03:28] [EMAIL PROTECTED] The GD TrueType functions can't find fonts; relative paths and absolute paths both do not work. Example (font is in the local directory, and . is part of my php.ini include_path) ? $image = ImageCreateTrueColor(200,200); ImageTTFText($image, 20, 0, 2, 15, $red, d:/path/to/font.ttf, Some text.); header(Content-type: image/jpeg); // alternatively, ImageTTFText($image, 20, 0, 2, 15, $red, font.ttf, Some text.); header(Content-type: image/jpeg); ImageJPEG($image, '', 100); ImageDestroy($image); ? (written off the top of my head, it's in a larger script, but test scripts I wrote and unfortunately deleted don't work either) PHP reports: Warning: Could not find/open font in d:\path\to\fonttest.php on line 3 This is from the binary Win32 distribution of PHP 4.0.6 on php.net. Edit this bug report at http://bugs.php.net/?id=12064edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12064 Updated: Truetype functions can't locate fonts
ID: 12064 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Summary: Truetype functions can't locate fonts Status: Feedback Bug Type: GD related Operating System: Windows 2000 SP1 PHP Version: 4.0.6 New Comment: Pretty sure, but it doesn't work the other way around either. Previous Comments: [2001-07-12 16:08:57] [EMAIL PROTECTED] Are you sure that GD understands d:/path/to/font.ttf as a path? Should it be d:\\path\\to\\font.ttf ? --Wez. [2001-07-12 16:00:10] [EMAIL PROTECTED] please use filemon (www.sysinternals.com) to find out where php/gd is searching for the fonts, and report back. thanks. [2001-07-12 15:40:36] [EMAIL PROTECTED] Rasmus: I did some reading through the GD docs; it seems that GD uses an environment variable called GDFONTPATH to locate its fonts when no path is specified (this seems to imply that the proper extension would also be appended). However, setting this properly did not work. The documentation also says that a full path will be accepted (with .ttf ending) if specified as a parameter. Seems like a problem with the way PHP is passing the string, perhaps. I would play with the source, but I don't have a compiler for this environment right now; it seems that people are not having this problem on Unices, so I won't bother looking there. Any clue? Thanks, Ben [2001-07-12 14:36:33] [EMAIL PROTECTED] No idea about the Windows version, but on UNIX the new GD2 library is hardcoded to look for TTF fonts in /usr/share/fonts/truetype. Also, it automatically adds the .ttf extension itself so in your code you should not put the .ttf extension on your font. [2001-07-11 15:03:28] [EMAIL PROTECTED] The GD TrueType functions can't find fonts; relative paths and absolute paths both do not work. Example (font is in the local directory, and . is part of my php.ini include_path) ? $image = ImageCreateTrueColor(200,200); ImageTTFText($image, 20, 0, 2, 15, $red, d:/path/to/font.ttf, Some text.); header(Content-type: image/jpeg); // alternatively, ImageTTFText($image, 20, 0, 2, 15, $red, font.ttf, Some text.); header(Content-type: image/jpeg); ImageJPEG($image, '', 100); ImageDestroy($image); ? (written off the top of my head, it's in a larger script, but test scripts I wrote and unfortunately deleted don't work either) PHP reports: Warning: Could not find/open font in d:\path\to\fonttest.php on line 3 This is from the binary Win32 distribution of PHP 4.0.6 on php.net. Edit this bug report at http://bugs.php.net/?id=12064edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12064 Updated: Truetype functions can't locate fonts
ID: 12064 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Summary: Truetype functions can't locate fonts Old Status: Status: Open Bug Type: GD related Operating System: Windows 2000 SP1 PHP Version: 4.0.6 New Comment: Ok, I checked out filemon. Here's what's happening: GD first tries to open files inside the Apache root (not the web root; for instance, on my box, C:\Program Files\Apache. So, if I've specified C:\\path\\to\\font.ttf in my path, I end up with: C:\Program Files\Apache\C\C:\path\to\font.ttf.ttf Next, it tries the current directory. However, it seems to be unable to process Windows drive letters, and so defaults to drive C: (my webroot's on D:, which is a problem), so I get C:\path\to\script\C:\path\to\font.ttf.ttf You get the idea. I made a directory structure on C: mimicing that of my D: webroot, but only containing the fonts; it worked fine (although the antialiasing was horrific, but that's a GD/FT2 issue). Previous Comments: [2001-07-12 17:18:32] [EMAIL PROTECTED] Pretty sure, but it doesn't work the other way around either. [2001-07-12 16:08:57] [EMAIL PROTECTED] Are you sure that GD understands d:/path/to/font.ttf as a path? Should it be d:\\path\\to\\font.ttf ? --Wez. [2001-07-12 16:00:10] [EMAIL PROTECTED] please use filemon (www.sysinternals.com) to find out where php/gd is searching for the fonts, and report back. thanks. [2001-07-12 15:40:36] [EMAIL PROTECTED] Rasmus: I did some reading through the GD docs; it seems that GD uses an environment variable called GDFONTPATH to locate its fonts when no path is specified (this seems to imply that the proper extension would also be appended). However, setting this properly did not work. The documentation also says that a full path will be accepted (with .ttf ending) if specified as a parameter. Seems like a problem with the way PHP is passing the string, perhaps. I would play with the source, but I don't have a compiler for this environment right now; it seems that people are not having this problem on Unices, so I won't bother looking there. Any clue? Thanks, Ben [2001-07-12 14:36:33] [EMAIL PROTECTED] No idea about the Windows version, but on UNIX the new GD2 library is hardcoded to look for TTF fonts in /usr/share/fonts/truetype. Also, it automatically adds the .ttf extension itself so in your code you should not put the .ttf extension on your font. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=12064 Edit this bug report at http://bugs.php.net/?id=12064edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12064: Truetype functions can't locate fonts
From: [EMAIL PROTECTED] Operating system: Windows 2000 SP1 PHP version: 4.0.6 PHP Bug Type: GD related Bug description: Truetype functions can't locate fonts The GD TrueType functions can't find fonts; relative paths and absolute paths both do not work. Example (font is in the local directory, and . is part of my php.ini include_path) ? $image = ImageCreateTrueColor(200,200); ImageTTFText($image, 20, 0, 2, 15, $red, d:/path/to/font.ttf, Some text.); header(Content-type: image/jpeg); // alternatively, ImageTTFText($image, 20, 0, 2, 15, $red, font.ttf, Some text.); header(Content-type: image/jpeg); ImageJPEG($image, '', 100); ImageDestroy($image); ? (written off the top of my head, it's in a larger script, but test scripts I wrote and unfortunately deleted don't work either) PHP reports: Warning: Could not find/open font in d:\path\to\fonttest.php on line 3 This is from the binary Win32 distribution of PHP 4.0.6 on php.net. -- Edit bug report at: http://bugs.php.net/?id=12064edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Multiple inserts in one sybase_query issue
OK, I understand that php won't recieve multiple result sets, but in the case of a series of inserts why is this an issue? One thing I had hoped to do was to run the first insert and then select the @@identity. The lack of the ability to get multiple result sets is obviously why I can't retrieve the @@identity using sybase_result() because it discards the @@identity result set after it gets the result from the insert. Sybase however still executes the second query I believe, the result set is just lost in the transaction. Presuming this is the case I should be able to affect as many inserts and updates as I want providing I don't need to query out the result sets, correct? Finally I'm not clear on how the multiple result sets would effect the subsequent query? Once i reassign the values $query and $result don;t I get a brand new result set? I agree that developing a method to get an array of result sets would be extremely useful, but I don;t think that its my issue here. Am I dealing with a bug here? ~Ben Jo Giraerts [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Well, what you are doing in the second query is actually getting more resultsets in one query. The current sybase modules can't handle more than 1 resultset at a time. Try running sp_help through sybase_query(), you'll notice that only the first resultset is given back, all the rest is discarded. I'm thinking already a while about changing this so you can get an array of resultsets from sybase_query() which would allow you to do the stuff you're trying to do now.. Any ideas of the group would be appreciated (as i'm not a very good c-coder anyway) On Mon, Jun 18, 2001 at 06:01:54PM -0500, Ben Gabrielson wrote: I'm running PHP 3 (and PHP 4 on another server) with Sybase 11.9.2 on the database server. I have tried in a number or variations to insert a series of updates and inserts in the same sybase_query. I build a $query consisting of around 15-20 inserts and updates and call the sybase_query function, everything works fine and it writes to the database as expected however none of the sybase_querys after this point are recorded. For example when I create this string: $query = Declare @nonuser_signup_id numeric(10,0)\n; $query .= Insert into nonuser_signup (email, firstname, lastname, gender) values ('$email', '$firstname', '$lastname', '$gender')\n; $query .= Select @nonuser_signup_id = @@identity\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Free_Stuff, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Contests, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Surveys, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Shopping, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Games, 5, getdate())\n; $query .= Insert into user_optin (user_id,optin_type_id,promotion_id) values ($user_id, 10, 5)\n; $result = sybase_query($query, $db); Everything works fine, however when its broken up like this: $query = Declare @nonuser_signup_id numeric(10,0)\n; $query .= Insert into nonuser_signup (email, firstname, lastname, gender) values ('$email', '$firstname', '$lastname', '$gender')\n; $query .= Select @nonuser_signup_id = @@identity\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Free_Stuff, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Contests, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Surveys, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Shopping, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Games, 5, getdate())\n; $result = sybase_query($query, $db); $query = ''; $query .= Insert into user_optin (user_id,optin_type_id,promotion_id) values ($user_id, 10, 5)\n; $result = sybase_query($query, $db); The last insert doesn't work. Is this a bug in PHP or am I overlooking something? Logically it seems that it should function the same in both cases. I should also note that when I break that up into a series of completely independant queries
[PHP-DEV] Multiple inserts in one sybase_query issue
I'm running PHP 3 (and PHP 4 on another server) with Sybase 11.9.2 on the database server. I have tried in a number or variations to insert a series of updates and inserts in the same sybase_query. I build a $query consisting of around 15-20 inserts and updates and call the sybase_query function, everything works fine and it writes to the database as expected however none of the sybase_querys after this point are recorded. For example when I create this string: $query = Declare @nonuser_signup_id numeric(10,0)\n; $query .= Insert into nonuser_signup (email, firstname, lastname, gender) values ('$email', '$firstname', '$lastname', '$gender')\n; $query .= Select @nonuser_signup_id = @@identity\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Free_Stuff, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Contests, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Surveys, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Shopping, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Games, 5, getdate())\n; $query .= Insert into user_optin (user_id,optin_type_id,promotion_id) values ($user_id, 10, 5)\n; $result = sybase_query($query, $db); Everything works fine, however when its broken up like this: $query = Declare @nonuser_signup_id numeric(10,0)\n; $query .= Insert into nonuser_signup (email, firstname, lastname, gender) values ('$email', '$firstname', '$lastname', '$gender')\n; $query .= Select @nonuser_signup_id = @@identity\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Free_Stuff, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Contests, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Surveys, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Shopping, 5, getdate())\n; $query .= Insert into nonuser_optin (nonuser_signup_id, optin_type_id, promotion_id, signup_date) values (@nonuser_signup_id, $Games, 5, getdate())\n; $result = sybase_query($query, $db); $query = ''; $query .= Insert into user_optin (user_id,optin_type_id,promotion_id) values ($user_id, 10, 5)\n; $result = sybase_query($query, $db); The last insert doesn't work. Is this a bug in PHP or am I overlooking something? Logically it seems that it should function the same in both cases. I should also note that when I break that up into a series of completely independant queries it works fine too, I can run a series of single inserts each with their own sybase_query and they all insert fine. However as you can see in the case above I am using a @@identity which makes splitting these up into different queries impossible. Thnaks in advance for any aid. Ben -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Re: PHP 4.0 Bug #9784 Updated: png_get_error_ptr
First, sorry for chaiging E mail, I am [EMAIL PROTECTED], you can reply every where you want Reply: I also used the PHP 4.0.4pl1 and it does the same ... so about the gd.h, it uses the brand new one, I also compiled gd again, because I was thinking that the error was frome there, but I think that mod_php4 is trying to call a reference that doesn t exists in ligd.so.1.8.4 even png.h doesnt contains the fucntion or a variable called png_get_error_ptr or something_ptr or something_ptr Bug Database a crit : ID: 9784 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: *Install and Config Assigned To: Comments: You propably have some old gd.h somewhere in your system which is found when configuring. Also, you're using quite old version of PHP. Upgrade first to PHP 4.0.4pl1. And ask support questions on [EMAIL PROTECTED] as this is NOT any bug in PHP. --Jnia Previous Comments: --- [2001-03-16 07:16:24] [EMAIL PROTECTED] I use Apache 1.3.14 and PHP3.08 succesfully, but I m trying to upgrade tou 4.0.2 enabling versionning and track vars... PHP4 compiles succesfully but there is a problem when starting apache with the new conifguration: adding mod_php4 and so on... apachectl configtest return this: Syntax error on line 203 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: /usr/lib/libgd.so.1: undefined symbol: png_get_error_ptr I installed gdlib, libpng et libjpeg and zlib with all the latest stables version jpeg 6 , gd 1.8.4 etc... I comped PHP4 again and installed it I get the same message --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9784edit=2 -- PHP Development Mailing List To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] New FastCGI sapi; build questions
Hi all, I've recently got a FastCGI implementation of PHP up and running, and I'd like to submit it to be included in PHP. However, I'm no expert on the PHP build system, and I'd like to be sure that what I'm about to submit isn't hideously wrong! Mostly, the new sapi is fine, it lives inside sapi/fastcgi. However, it needs to pull in a static library from the FastCGI development kit (downloadable from http://www.fastcgi.com, nice-looking license). To build a php executable with this library, I've had to modify Makefile.in: PROGRAM_NAME = php PROGRAM_SOURCES = stub.c -PROGRAM_LDADD= libphp4.la +PROGRAM_LDADD= libphp4.la $(EXT_PROGRAM_LDADD) PROGRAM_LDFLAGS = -export-dynamic PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD) My sapi/fastcgi/config.m4 then sets this new variable with: EXT_PROGRAM_LDADD="$EXT_PROGRAM_LDADD $FASTCGIPATH/lib/libfcgi.a" Configure.in also has to be modified, with the additional lines: if test "$PHP_SAPI" = "fastcgi"; then PHP_PROGRAM=php fi My question is: Is this the best way to do it? Is there a better way to pull in non-libtool static files into the build? It seems a simple changes, but I'm hesitant to modify Makefile.in if I don't have to. Ideally, the CGI devkit would be integrated into the PHP sourcetree. I think the license would permit this, though I'm no expert on this kind of thing. Could anyone advise? Cheers, Ben -- Ben Mansell, [EMAIL PROTECTED] Zeus Technology Ltd Download the world's fastest webserver! Universally Serving the Net T:+44(0)1223 525000 F:+44(0)1223 525100 http://www.zeus.com Zeus House, Cowley Road, Cambridge, CB4 0ZT, ENGLAND -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9608: JVM instantly crashes with ext/java
From: [EMAIL PROTECTED] Operating system: RH LInux 7.0 / i386 PHP version: 4.0 Latest CVS (07/03/2001) PHP Bug Type: Reproduceable crash Bug description: JVM instantly crashes with ext/java With the jver.php test script, I get the following output: [ben@home php-java]$ ./bin/php ~/php4-200103071745/ext/java/jver.php X-Powered-By: PHP/4.0.5-dev Content-type: text/html html # # HotSpot Virtual Machine Error, Unexpected Signal 11 # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Error ID: 4F533F4C494E55580E43505005BC # # Problematic Thread: prio=10 tid=0x81489c0 nid=0x5b82 runnable # Aborted More info [ben@home php-java]$ java -version java version "1.3.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0) Java HotSpot(TM) Client VM (build 1.3.0, mixed mode) [ben@home php-java]$ php.ini: java.class.path=/home/ben/php-java/lib/php_java.jar extension_dir=/home/ben/php-java/ext extension=libphp_java.so php-configures: ./configure --with-java --prefix=/home/ben/php-java --without-mysql -- Edit Bug report at: http://bugs.php.net/?id=9608edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9374: add an optional use_include_path to file_exists()
From: [EMAIL PROTECTED] Operating system: n/a PHP version: 4.0.4pl1 PHP Bug Type: Feature/Change Request Bug description: add an optional use_include_path to file_exists() It would be good to have the optional use_include_path parameter with file_exists, just as with fopen. To find out whether a file exists on the include_path, one will need to explode the include_path and then check for each element separately now, or attempt an fopen(,,1). -- Edit Bug report at: http://bugs.php.net/?id=9374edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9297: sprintf (%f, $foo) crashes with very large $foo.
From: [EMAIL PROTECTED] Operating system: RH Linux 7.0, i386 PHP version: 4.0.4pl1 PHP Bug Type: Strings related Bug description: sprintf ("%f", $foo) crashes with very large $foo. [ben@home ben]$ echo '? $foo = 2.2864849511949E+190; settype($foo,"double"); printf("%f\n", $foo) ?' | php X-Powered-By: PHP/4.0.4pl1 Content-type: text/html 2286484951194899000 Segmentation fault (core dumped) -- Edit Bug report at: http://bugs.php.net/?id=9297edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9229: Sockets extension does not compile -- possible problem
From: [EMAIL PROTECTED] Operating system: IRIX 6.5 PHP version: 4.0.4pl1 PHP Bug Type: Compile Failure Bug description: Sockets extension does not compile -- possible problem The sockets extension does not compile under IRIX. This is due to the IRIX sockets library not including msg_flags in the msghdr struct, contained within sockets.h. -- Edit Bug report at: http://bugs.php.net/?id=9229edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9200: strtolower handle arrays in addition to strings
From: [EMAIL PROTECTED] Operating system: linux PHP version: 4.0.4pl1 PHP Bug Type: Feature/Change Request Bug description: strtolower handle arrays in addition to strings It would be nice to have strtolower() accept arrays as arguments (or just make a function such as ArrayToLower()). For example: $OUT["SomECapital"]="Whatever This Doesn't Matter"; echo $OUT["SomECapital"]; /* Works as expected */ $newOUT=strtolower($OUT); /* Currently the above line puts "Array" into $newOUT (like expected) , instead make this convert indexes with uppercase letters into lower case, so the line below would work and output the string "Whatever This Doesn't Matter" */ echo $newOUT["somecapital"]; -- Edit Bug report at: http://bugs.php.net/?id=9200edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Re: PHP 4.0 Bug #8975 Updated: modulo (%) sets the ritht operator to the result
hmm... ok, i'll dig out what i actually did. it was in the middle of a for loop, using the counter as the first argument. something like for ( $i = 0; $i array_count_values($whatever); $i++ ) { print($whatever[$i]); if ( $i % $rowcount = 0) { print("/trtr"); } } and it kept resetting $rowcount to 0 and looping till it ran out of time. i'll dig up the actual code. Bug Database wrote: ID: 8975 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Feedback Bug Type: Unknown/Other Function Assigned To: Comments: This works for me (tm) just fine. ie. prints 2. Could you please try again (with the script below)? ?php $a = 0; $b = 2; $c = $a % $b; print($b); ? --Jani Previous Comments: --- [2001-01-29 02:29:20] [EMAIL PROTECTED] $a = 0; $b = 2; $c = $a % $b print($b) // $b will be set to 0. does nasty thing to for loops :) not really sure what was configured at compiletime, was from the FreeBSD ports collection, can dig it up if it's relevant. same with php.ini. no gdb, as there's no crash. --- Full Bug description available at: http://bugs.php.net/?id=8975 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Re: PHP 4.0 Bug #8975 Updated: modulo (%) sets the ritht operatorto the result
holy shit, i can't believe i did that. sorry to bug you, i will now retire myself shamefully back whence i came in dishonor. On 31 Jan 2001, Bug Database wrote: ID: 8975 Updated by: phanto Reported By: [EMAIL PROTECTED] Old-Status: Feedback Status: Closed Bug Type: Unknown/Other Function Assigned To: Comments: use == to compare, = is for assignments if(($i % $rowcount) == 0) { } harald. Previous Comments: --- [2001-01-29 19:08:57] [EMAIL PROTECTED] This works for me (tm) just fine. ie. prints 2. Could you please try again (with the script below)? ?php $a = 0; $b = 2; $c = $a % $b; print($b); ? --Jani --- [2001-01-29 02:29:20] [EMAIL PROTECTED] $a = 0; $b = 2; $c = $a % $b print($b) // $b will be set to 0. does nasty thing to for loops :) not really sure what was configured at compiletime, was from the FreeBSD ports collection, can dig it up if it's relevant. same with php.ini. no gdb, as there's no crash. --- Full Bug description available at: http://bugs.php.net/?id=8975 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #8983 Updated: gd tries to use gif functions
ID: 8983 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: Compile Failure Description: gd tries to use gif functions There seems to be some errors while trying to compile php (with gd). I just removed the few gif functions from ext/gd/gd.c and compiled fine. Maybe it would be a good idea to finally remove these old functions since gd no longer supports gif and its hard to find an old version that does (especially since png is fine for most things). Previous Comments: --- [2001-01-29 11:16:56] [EMAIL PROTECTED] I've installed gd 1.8.3 and of course it does not have gif support anymore. Yet, still configure defines HAVE_GD_GIF, saying that it detected the support. Compile of course fails when HAVE_GD_GIF is defined and the functions are not really available. Can anyone else reproduce? --- Full Bug description available at: http://bugs.php.net/?id=8983 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #8983 Updated: gd tries to use gif functions
ID: 8983 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: Compile Failure Description: gd tries to use gif functions OK OK, ignore all that other crap I've already posted I REALLY DONT KNOW WHAT I AM TALKING ABOUT... Anyways, got trouble compiling 4.0.4pl1 and also the latest snapshot gcc -I. -I/root/webserv/php4-200101291345/ext/gd -I/root/webserv/php4-200101291345/main -I/root/webserv/php4-200101291345 -I/root/webserv/apache_1.3.14/src/include -I/root/webserv/apache_1.3.14/src/os/unix -I/root/webserv/php4-200101291345/Zend -I/root/webserv/php4-200101291345/ext/mysql/libmysql -I/root/webserv/php4-200101291345/ext/xml/expat/xmltok -I/root/webserv/php4-200101291345/ext/xml/expat/xmlparse -I/root/webserv/php4-200101291345/TSRM -DXML_BYTE_ORDER=12 -g -O2 -c gd.c touch gd.lo gd.c: In function `php_if_imagecreatefromgif': gd.c:709: `gdImageCreateFromGif' undeclared (first use in this function) gd.c:709: (Each undeclared identifier is reported only once gd.c:709: for each function it appears in.) gd.c:709: `gdImageCreateFromGifCtx' undeclared (first use in this function) gd.c: In function `php_if_imagegif': gd.c:891: `gdImageGif' undeclared (first use in this function) make[3]: *** [gd.lo] Error 1 make[3]: Leaving directory `/root/webserv/php4-200101291345/ext/gd' Previous Comments: --- [2001-01-29 17:31:27] [EMAIL PROTECTED] There seems to be some errors while trying to compile php (with gd). I just removed the few gif functions from ext/gd/gd.c and compiled fine. Maybe it would be a good idea to finally remove these old functions since gd no longer supports gif and its hard to find an old version that does (especially since png is fine for most things). --- [2001-01-29 11:16:56] [EMAIL PROTECTED] I've installed gd 1.8.3 and of course it does not have gif support anymore. Yet, still configure defines HAVE_GD_GIF, saying that it detected the support. Compile of course fails when HAVE_GD_GIF is defined and the functions are not really available. Can anyone else reproduce? --- Full Bug description available at: http://bugs.php.net/?id=8983 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #8975: modulo (%) sets the ritht operator to the result
From: [EMAIL PROTECTED] Operating system: FreeBSD PHP version: 4.0.4pl1 PHP Bug Type: Unknown/Other Function Bug description: modulo (%) sets the ritht operator to the result $a = 0; $b = 2; $c = $a % $b print($b) // $b will be set to 0. does nasty thing to for loops :) not really sure what was configured at compiletime, was from the FreeBSD ports collection, can dig it up if it's relevant. same with php.ini. no gdb, as there's no crash. -- Edit Bug report at: http://bugs.php.net/?id=8975edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]