#50641 [Opn->Bgs]: Extension directory
ID: 50641 Updated by: bj...@php.net Reported By: twallis at mts dot net -Status: Open +Status: Bogus Bug Type: Performance problem Operating System: Windows PHP Version: 5.2.12 New Comment: http://www.php.net/manual/en/install.windows.extensions.php Previous Comments: [2010-01-03 03:20:28] twallis at mts dot net Description: In the php.ini files included in the download the extensions directly is set as: extension_dir = "./" This prevents php from working. It took me four hours of searching until I tripped over documentation about extension_dir. Once I chenged the line to read: extension_dir = "c:/php/ext" the problem was fixed. Nowhere was it stated as part of the installation procedure to change this line. Reproduce code: --- extension_dir = "./" Expected result: php preprocessing does not occur Actual result: -- php preprocessing does not occur -- Edit this bug report at http://bugs.php.net/?id=50641&edit=1
#49267 [Com]: Linking fails for iconv: "Undefined symbols: _libiconv"
ID: 49267 Comment by: iongion at yahoo dot com Reported By: s dot rost at ewerk dot com Status: No Feedback Bug Type: Compile Failure Operating System: Mac OSX 10.6 Snow Leopard PHP Version: 5.3, 6 (2009-08-18) Assigned To: scottmac New Comment: My system is a SNOW LEOPARD 10.6.2 I think we have a final solution. All these problems are generated because the Makefile is confused by the existence of multiple iconv library installations, but not only this. Fixing iconv (please note that these are pretty subjective, but they are a good start) Needed elements: 1) gettext - http://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz 2) iconv - http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz Unpack both libraries, before running configure, prepare your environment as follows: (i assume you have latest xcode) export MACOSX_DEPLOYMENT_TARGET=10.6; export CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"; export CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"; export CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch i386 -arch x86_64 -bind_at_load" and then run configure in gettext, leave prefix as it is, make & make install; NOW, building iconv will replace existing iconv from apple(it shouldn't break anything) ./configure --prefix=/usr --enable-shared --enable-static then: make sudo make install This did it, what i managed to achieve: 1) Replace php 5.3.0 that comes with Snow Leopard, with php 5.3.1 2) Replace php 5.3.0 that comes with Snow Leopard, with php 5.2.12 Managed to install pecl extensions, apc, xdebug, uploadprogress, ming I am now on php 5.2.12 as i do drupal development and there are some module issues with php 5.3, but you could easily replace Snow Leo's php 5.3.0 with 5.3.1 and have your own pecl extensions/features enables Bellow are build scripts that i use to compile php 5.3.1 and php 5.2.12 1) 5.2.12 -> http://dpaste.com/hold/140511/ 2) 5.3.1 -> http://dpaste.com/hold/140512/ Good luck and hopefully php will get some better less confused build scripts. This the link that made me think and search more http://blog.yimingliu.com/2009/02/24/missing-library-symbols-while-compiling-php-528/ I have a little more than 0 knowledge of unix build tools, make, conf, gcc ... i am a php developer, excuse the non-initiated terms. Previous Comments: [2010-01-02 13:41:56] iongion at yahoo dot com This is the output of make at its last step before throwing the hell http://dpaste.com/hold/140147/ [2010-01-02 13:36:06] iongion at yahoo dot com It does not work for me, same Snow Leopard I've added all possible combination of fixes Using the latest php snapshot php5.3-201001012330 http://www.opensource.apple.com/source/apache_mod_php/apache_mod_php- 53/patches/iconv.patch Here is the build script ./configure \ '--with-iconv-dir=/usr' \ '--prefix=/usr' \ '--mandir=/usr/share/man' \ '--infodir=/usr/share/info' \ '--sysconfdir=/private/etc' \ '--with-apxs2=/usr/sbin/apxs' \ '--enable-cli' \ '--with-config-file-path=/etc' \ '--with-libxml-dir=/usr' \ '--with-openssl=/usr' \ '--with-kerberos=/usr' \ '--with-zlib=/usr' \ '--enable-bcmath' \ '--with-bz2=/usr' \ '--enable-calendar' \ '--with-curl=/usr' \ '--enable-exif' \ '--enable-ftp' \ '--with-gd' \ '--with-jpeg-dir=/usr/local' \ '--with-png-dir=/usr/local' \ '--enable-gd-native-ttf' \ '--with-ldap=/usr' \ '--with-ldap-sasl=/usr' \ '--enable-mbstring' \ '--enable-mbregex' \ '--with-mysql=mysqlnd' \ '--with-mysqli=mysqlnd' \ '--with-pdo-mysql=mysqlnd' \ '--with-iodbc=/usr' \ '--enable-shmop' \ '--with-snmp=/usr' \ '--enable-soap' \ '--enable-sockets' \ '--enable-sysvmsg' \ '--enable-sysvsem' \ '--enable-sysvshm' \ '--with-xmlrpc' \ '--with-xsl=/usr' \ '--with-pcre-regex' \ '--with-mcrypt' \ '--with-mhash' \ '--enable-zip' \ '--with-curl' \ '--with-pear' With iconv dir set to /usr/local, still not working, arghhh [2010-01-02 00:57:29] conrad dot tim at gmail dot com Solved for me by applying the patch provided by Apple mentioned in bug #48195. http://www.opensource.apple.com/source/apache_mod_php/apache_mod_php- 53/patches/iconv.patch [2010-01-02 00:37:35] conrad dot tim at gmail dot com This bug remains for me. On Snow Leapoard (10.6.2 Build 10C540) using php5.3-201001012330 snapshot). Output ending the make process: Undefined symbols: "_libiconv", referenced from: __php_iconv_strlen in iconv.o _php_iconv_string in iconv.o _php_iconv_string in iconv.o __php_iconv_strpos in iconv.o __php_iconv_appendl in iconv.o __php_iconv_appendl in iconv.o _zif_iconv_substr in iconv.o _zif_iconv_mime_encode in ico
#50642 [NEW]: 'if(!$result)'
From: nakulgoud at gmail dot com Operating system: Windows XP SP2 PHP version: 5.3.1 PHP Bug Type: *Database Functions Bug description: 'if(!$result)' Description: After exection of query where mysql returns an empty set then 'if($result)' returns true.It should return false.How to handle this situation. Reproduce code: --- --- >From manual page: function.mysql-fetch-row#Examples --- $query="select name from user where id=42'"; $result=mysql_query($query); if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; } $data = MYSQL_RESULT($result,0,"id"); Expected result: Could not run query : No such row in database. Actual result: -- Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 4 in C:\wamp\www\all is well\signin.php on line 6 -- Edit bug report at http://bugs.php.net/?id=50642&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50642&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50642&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50642&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50642&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50642&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50642&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50642&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50642&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50642&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50642&r=support Expected behavior: http://bugs.php.net/fix.php?id=50642&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50642&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50642&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50642&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50642&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50642&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50642&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50642&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50642&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50642&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50642&r=mysqlcfg
#50643 [NEW]: Translation attributes for strings
From: daniel at dseichter dot de Operating system: Linux, Windows PHP version: 5.3.1 PHP Bug Type: Feature/Change Request Bug description: Translation attributes for strings Description: I developed for many years in progress 4GL (OpenEdge from progress software) and in case of international projects, progress has the nice feature of translation attributes like for example: 'text':U, 'text':T10, 'text':L10 and 'text':R10 The :U,:T10,... after the string is relevant for the translation within the compiler of progress. :U: untranslateable :T10: Text with 10 characters, translateable (the same like L10 or R10, but L is left align and right is right align of the text). After developing some months in PHP I have to translate my application but it is hard to find out now every translateable strings. It will be great, if on the next conference, this feature will be discussed, if it can be included in a future release of PHP, so there will be a standard way of know, what types of strings are translateable and which are keywords f.e. to output html code with 'echo'. Maybe there is already some of this feature, then I will be happy to know about this, but I can't found anything about this. Also I want to thank the PHP-team for the great work in the past and for the future. Daniel -- Edit bug report at http://bugs.php.net/?id=50643&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50643&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50643&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50643&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50643&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50643&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50643&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50643&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50643&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50643&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50643&r=support Expected behavior: http://bugs.php.net/fix.php?id=50643&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50643&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50643&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50643&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50643&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50643&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50643&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50643&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50643&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50643&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50643&r=mysqlcfg
#50642 [Opn->Bgs]: 'if(!$result)'
ID: 50642 Updated by: johan...@php.net Reported By: nakulgoud at gmail dot com -Status: Open +Status: Bogus Bug Type: *Database Functions Operating System: Windows XP SP2 PHP Version: 5.3.1 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. our check for if (!$result) checks whether the query was successfulwhichit was, as it returned a reslt set of 0 elements. You might use mysql_num_rows() to see how many rows there are, while in general it's better to use mysql_fetch() instead of mysql_result(). Please also note that the mysqli extension offers support for MySQL features and is the suggested way to talk to MySQL. Previous Comments: [2010-01-03 12:54:08] nakulgoud at gmail dot com Description: After exection of query where mysql returns an empty set then 'if($result)' returns true.It should return false.How to handle this situation. Reproduce code: --- --- >From manual page: function.mysql-fetch-row#Examples --- $query="select name from user where id=42'"; $result=mysql_query($query); if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; } $data = MYSQL_RESULT($result,0,"id"); Expected result: Could not run query : No such row in database. Actual result: -- Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 4 in C:\wamp\www\all is well\signin.php on line 6 -- Edit this bug report at http://bugs.php.net/?id=50642&edit=1
#50636 [Opn->Csd]: MySQLi_Result sets values before calling constructor
ID: 50636 Updated by: pierr...@php.net Reported By: stein at rhrk dot uni-kl dot de -Status: Open +Status: Closed Bug Type: MySQLi related Operating System: * PHP Version: 5.2.12 New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2010-01-03 16:59:34] s...@php.net Automatic comment from SVN on behalf of pierrick Revision: http://svn.php.net/viewvc/?view=revision&revision=293039 Log: Fixed bug #50636 (MySQLi_Result sets values before calling constructor) [2010-01-02 15:03:49] stein at rhrk dot uni-kl dot de Description: MySQLi_Result::fetch_object sets properties before calling the constructor, see BUG #49521 The behavior is similar to the one in BUG #49521 which has been fixed as of PHP 5.2.12. Note: It should be considered that this behavior may be not bug at all. Calling the constructor BEFORE setting the properties (as done in BUG #49521) leaves no possibility to work with the data at "construction time" of the object. Setting default properties could be done by assigning them in the class-definition, but setting other properties depending on the loaded data is hard to do, when this data is not yet available when the constructor is called. This problem is even harder to solve, as no setters for the properties are called, even if they are declared as private. Reproduce code: --- class Test { private $myprivate = 0; function __construct() { echo 'constructor called, $myprivate is ', $this->myprivate; } function __set ( $name, $value ) { echo 'setting ', $name, ' to ', $value; $this->{$name} = (int) $value; } } $mysqli->query('SELECT 1 AS myprivate, 2 AS mypublic')->fetch_object('Test'); Expected result: If the same way to handle this bug as in BUG #49521 is considered: constructor called, $myprivate is 0 setting mypublic to 2 object(Test)#6 (2) { ["myprivate:private"]=> string(1) "1" ["mypublic"]=> int(2) } But maybe the following behavior would make more sense if it should be changed: constructor called, $myprivate is 0 setting myprivate to 1 setting mypublic to 2 object(Test)#6 (2) { ["myprivate:private"]=> int(1) ["mypublic"]=> int(2) } Actual result: -- setting mypublic to 2 constructor called, $myprivate is 1 object(Test)#6 (2) { ["myprivate:private"]=> string(1) "1" ["mypublic"]=> int(2) } -- Edit this bug report at http://bugs.php.net/?id=50636&edit=1
#47948 [Com]: call_user_func_array() with autoload causes crash
ID: 47948 Comment by: muqker at muqker dot com Reported By: ehassler at synapsestudios dot com Status: No Feedback Bug Type: Reproducible crash Operating System: * PHP Version: 5.2.9 New Comment: I see the status has changed to "No Feedback". Is the script I provided to reproduce not ok? I am sorry but I do not have a test environment where I can try your snapshot. Previous Comments: [2009-12-22 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2009-12-15 04:26:30] muqker at muqker dot com Hi. Here is an example script that reproduces the problem. http://dell.nba.ro/clienti/muqker/muqker.tar.gz Sorry, the code is a bit messy cos it is stripped down from a larger project, plus, it seems that the size of the callstack is somehow a factor to reproduce, so I could not cut more. Anyway, it's 3 files, 120 lines total, so should be manageable. [2009-12-15 00:47:49] fel...@php.net Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2009-04-20 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2009-04-16 19:38:27] ehassler at synapsestudios dot com I tried throwing together a chain of call_user_func_array and autoloads to cause the problem (3 deep), but it didn't. Thusfar the only way I can reproduce the error is through the whole codebase we're working on... Perhaps I can revisit this at project completion to try and pare down to a usable example script. 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/47948 -- Edit this bug report at http://bugs.php.net/?id=47948&edit=1
#47948 [NoF->Fbk]: call_user_func_array() with autoload causes crash
ID: 47948 Updated by: johan...@php.net Reported By: ehassler at synapsestudios dot com -Status: No Feedback +Status: Feedback Bug Type: Reproducible crash Operating System: * PHP Version: 5.2.9 New Comment: When editing you have to use the "Edit Submission" tab to re-open it. Are you sure the script you provided is correct - it works for me, as far as I can tell, on 5.2 and 5.3 while there is a warning for a missing parameter: $ php -n index.php array(7) { [0]=> array(7) { ["file"]=> string(47) "/tmp/test47948/muqker/index.php" ["line"]=> int(41) ["function"]=> string(1) "f" ["class"]=> string(1) "A" ["object"]=> object(A)#2 (0) { } ["type"]=> string(2) "->" ["args"]=> array(0) { } } [1]=> array(7) { ["file"]=> string(47) "/tmp/test47948/muqker/index.php" ["line"]=> int(45) ["function"]=> string(1) "g" ["class"]=> string(1) "A" ["object"]=> object(A)#2 (0) { } ["type"]=> string(2) "->" ["args"]=> array(0) { } } [2]=> array(7) { ["file"]=> string(47) "/tmp/test47948/muqker/index.php" ["line"]=> int(15) ["function"]=> string(1) "h" ["class"]=> string(1) "A" ["object"]=> object(A)#2 (0) { } ["type"]=> string(2) "->" ["args"]=> array(0) { } } [3]=> array(7) { ["file"]=> string(47) "/tmp/test47948/muqker/index.php" ["line"]=> int(19) ["function"]=> string(2) "zz" ["class"]=> string(10) "Controller" ["object"]=> object(Controller)#1 (0) { } ["type"]=> string(2) "->" ["args"]=> array(0) { } } [4]=> array(7) { ["file"]=> string(47) "/tmp/test47948/muqker/index.php" ["line"]=> int(23) ["function"]=> string(10) "executeNew" ["class"]=> string(10) "Controller" ["object"]=> object(Controller)#1 (0) { } ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> &NULL } } [5]=> array(7) { ["file"]=> string(47) "/tmp/test47948/muqker/index.php" ["line"]=> int(59) ["function"]=> string(13) "executeClient" ["class"]=> string(10) "Controller" ["object"]=> object(Controller)#1 (0) { } ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> &NULL } } [6]=> array(4) { ["file"]=> string(47) "/tmp/test47948/muqker/index.php" ["line"]=> int(62) ["function"]=> string(4) "main" ["args"]=> array(0) { } } } Warning: Missing argument 2 for CheckedFacilityPeer::getCheckedFacilities() in /tmp/test47948/muqker/CheckedFacilityPeer.php on line 42 ff Previous Comments: [2010-01-03 17:09:52] muqker at muqker dot com I see the status has changed to "No Feedback". Is the script I provided to reproduce not ok? I am sorry but I do not have a test environment where I can try your snapshot. [2009-12-22 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2009-12-15 04:26:30] muqker at muqker dot com Hi. Here is an example script that reproduces the problem. http://dell.nba.ro/clienti/muqker/muqker.tar.gz Sorry, the code is a bit messy cos it is stripped down from a larger project, plus, it seems that the size of the callstack is somehow a factor to reproduce, so I could not cut more. Anyway, it's 3 files, 120 lines total, so should be manageable. [2009-12-15 00:47:49] fel...@php.net Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2009-04-20 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". 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/47948 -- Edit this bug report at http://bugs.php.net/?id=47948&edit=1
#50632 [Opn->Csd]: Return default value if var is undefined
ID: 50632 Updated by: il...@php.net Reported By: gmblar+php at gmail dot com -Status: Open +Status: Closed Bug Type: Filter related Operating System: * PHP Version: 5.3.1 New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2010-01-03 22:58:38] s...@php.net Automatic comment from SVN on behalf of iliaa Revision: http://svn.php.net/viewvc/?view=revision&revision=293051 Log: Fixed bug #50632 (filter_input() does not return default value if the variable does not exist) [2010-01-02 09:38:41] gmblar+php at gmail dot com Description: if $_GET['foo'] is undefined, filter functions return NULL instead of the default value defined in options. Reproduce code: --- FILTER_REQUIRE_SCALAR, 'options' => array( 'default' => 23, 'min_range' => 5, 'max_range' => 42 ) )); var_dump($foo); ?> Expected result: int(23) Actual result: -- NULL -- Edit this bug report at http://bugs.php.net/?id=50632&edit=1
#50616 [Bgs]: Invalid version number with phpinfo()
ID: 50616 User updated by: se...@php.net Reported By: se...@php.net Status: Bogus Bug Type: PHP options/info functions Operating System: Windows 2003 R2 PHP Version: 5.2.12 New Comment: This server does have multiple installations which I cannot control. I just want to use PHP with zip package and already configured for Apache using a local folder with local php.ini There is no rule that only one PHP installation work on a system on Linux, unless its invented for Windows version. Previous Comments: [2009-12-31 17:49:47] j...@php.net Remove _EVERYTHING_ even remotely related to PHP in your system and reinstall. There's no bug here other than your bad installation and unclean system. [2009-12-31 04:14:13] se...@php.net Description: I got Windows zip package (not MSI) from website. This is version 5.2.12 I have Apache 2.2.13 configured with PHP. When I do phpinfo(), I see: PHP Version 5.2.9-1 System Windows NT XXX 5.2 build 3790 Build Date Mar 5 2009 20:01:54 So both version and build date does not match 5.2.12 release date. I do not have multiple php5ts.dll file and I did not do system level install. -- Edit this bug report at http://bugs.php.net/?id=50616&edit=1