[PHP-DEV] Bug #12990 Updated: Problems with system/exec after upgrade
ID: 12990 Updated by: lyric Reported By: [EMAIL PROTECTED] Status: Open Old Bug Type: Website problem Bug Type: *Directory/Filesystem functions Operating System: Redhat 7.1 PHP Version: 4.0.6 New Comment: What does $cmd actually return? system() returns the last line of output from the command, which will evaluate to false for things like 0 or . Try using exec() and printing the output from there if you are unsure. Previous Comments: [2001-08-28 02:42:30] [EMAIL PROTECTED] Hello Then we made a upgrade från Redhat 7.0 and PHP 404 this syntax stopped to work. It keep tellning me that the command failed. if(system($cmd)) $Msg.=The command was successful.; else $Msg.=Nope it didnt worked.; Edit this bug report at http://bugs.php.net/?id=12990edit=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 #12990 Updated: Problems with system/exec after upgrade
ID: 12990 Updated by: lyric Reported By: [EMAIL PROTECTED] Old Status: Open Status: Feedback Bug Type: *Directory/Filesystem functions Operating System: Redhat 7.1 PHP Version: 4.0.6 Previous Comments: [2001-08-28 02:42:30] [EMAIL PROTECTED] Hello Then we made a upgrade från Redhat 7.0 and PHP 404 this syntax stopped to work. It keep tellning me that the command failed. if(system($cmd)) $Msg.=The command was successful.; else $Msg.=Nope it didnt worked.; Edit this bug report at http://bugs.php.net/?id=12990edit=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 #12990 Updated: Problems with system/exec after upgrade
ID: 12990 Updated by: lyric Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: Program Execution Operating System: Redhat 7.1 PHP Version: 4.0.6 New Comment: User replied: --- The problem is that I used exec() before the update and it worked fine. I have another script that does the same thing that script doesnt work anymore either. No other employee at my work have changed the file so the update is the only thing I can think of to blame. --- Plenty of things changed, including a lot of stuff with Redhat 7.0 - 7.1. Did you recompile PHP after the upgrade? Again, what does $cmd actually return? Also, try : $line = system($cmd,$retvar); $msg = system($cmd) -- $retvar, $line; and tell me what it says Previous Comments: [2001-08-28 04:51:04] [EMAIL PROTECTED] What does $cmd actually return? system() returns the last line of output from the command, which will evaluate to false for things like 0 or . Try using exec() and printing the output from there if you are unsure. [2001-08-28 02:42:30] [EMAIL PROTECTED] Hello Then we made a upgrade från Redhat 7.0 and PHP 404 this syntax stopped to work. It keep tellning me that the command failed. if(system($cmd)) $Msg.=The command was successful.; else $Msg.=Nope it didnt worked.; Edit this bug report at http://bugs.php.net/?id=12990edit=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 #12997 Updated: readfile() does not work fine with 'if' and case clauses
ID: 12997 Updated by: lyric Reported By: [EMAIL PROTECTED]§ Old Status: Open Status: Bogus Bug Type: Filesystem function related Operating System: apache PHP Version: 4.0.4pl1 New Comment: You need to put quotes around a literal string like example.txt, otherwise PHP thinks it's the concatenation of two strings example and txt. Previous Comments: [2001-08-28 07:11:45] [EMAIL PROTECTED]§ I have rather complicated architechture in my php-program (including a kind of programhandler...) In one php-file I tried to send an pdf-formatted file to the browser by using readfile -function. For my huge appointment it did not work well with if and case clauses. And the most imazing was that exactly same script worked in an other php-file (where the architecture was simplier). I give you a simple example how the bug behaves * $i=1; if ($i==1) readfile(example.txt); //and nothing happens * $i=1; if ($i==1) readfile(example.txt); //this worked well else readfile(example.txt); //this was just for debugging * As you see, it seems to be no sence at all!!! You propably think that I had somethin wrong with my code, but no, I and my work mate debugged this problem a half day and I am sure that this bug was just like I said. I thought that I could have somethin wrong with the libraries but no error occurs... The libraries are self made and working well in other programs. Edit this bug report at http://bugs.php.net/?id=12997edit=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 #12592 Updated: Warning message when connect to Sybase Database
ID: 12592 Updated by: lyric Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Sybase (dblib) related Operating System: Windows 2000 PHP Version: 4.0.6 New Comment: Normal - Sybase generates the warning whenever you change databases. Suppress the message by prefixing sybase_connect with an @ sign (still check the result!) thusly : $dbh = @sybase_connect(...); Previous Comments: [2001-08-06 23:43:32] [EMAIL PROTECTED] Warning message comes in HTML Pages when connect to Sybase Database or Change Database context like - Warning: Sybase: Server message: Changed database context to 'rdhiman'. (severity 10, procedure N/A) in c:\inetpub\webpub\guestfatch.php on line 10 [2001-08-06 07:54:04] [EMAIL PROTECTED] When I connect to Sybase Database in PHP script, the following Warning message comes in my Page generated through PHP i.e. Warning: Sybase: Server message: Changed database context to 'rdhiman'. (severity 10, procedure N/A) in c:\inetpub\webpub\guestfatch.php on line 8 After printing this warning message, everything is going fine. Edit this bug report at http://bugs.php.net/?id=12592edit=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 #12449 Updated: I've tried inserting my php.ini file in five locations and it won't load it
ID: 12449 Updated by: lyric Reported By: [EMAIL PROTECTED] Old Status: Analyzed Status: Bogus Bug Type: GD related Operating System: Windows 98 SE PHP Version: 4.0.6 New Comment: Closed as bogus. Previous Comments: [2001-07-28 11:40:40] [EMAIL PROTECTED] Look in the first section of the output from phpinfo(), and there's a line like: Configuration File (php.ini) Path : /usr/local/lib/php.ini Obviously yours will say something else, but that's where it's getting the .ini file from. [2001-07-28 11:26:46] [EMAIL PROTECTED] I've put then extention modules in a directory on my C Partition named php_mod, I've saved the php.ini file into the C:\, C:\PHP4, C:\WINBLOWS, C:\WINBLOWS\SYSTEM, C:\WINNT It still will not load my configuration over the default built into the php4ts.dll, here is a copy of my php.ini file [PHP] ; $Id: php.ini-dist,v 1.78.2.2 2001/06/01 03:20:49 sniper Exp $ ;;; ; About this file ; ;;; ; This file controls many aspects of PHP's behavior. In order for PHP to ; read it, it must be named 'php.ini'. PHP looks for it in the current ; working directory, in the path designated by the environment variable ; PHPRC, and in the path that was defined in compile time (in that order). ; Under Windows, the compile-time path is the Windows directory. The ; path in which the php.ini file is looked for can be overriden using ; the -c argument in command line mode. ; ; The syntax of the file is extremely simple. Whitespace and Lines ; beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e.g. [Foo]) are also silently ignored, even though ; they might mean something in the future. ; ; Directives are specified using the following syntax: ; directive = value ; Directive names are *case sensitive* - foo=bar is different from FOO=bar. ; ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression ; (e.g. E_ALL ~E_NOTICE), or a quoted string (foo). ; ; Expressions in the INI file are limited to bitwise operators and parentheses: ; |bitwise OR ; bitwise AND ; ~bitwise NOT ; !boolean NOT ; ; Boolean flags can be turned on using the values 1, On, True or Yes. ; They can be turned off using the values 0, Off, False or No. ; ; An empty string can be denoted by simply not writing anything after the equal ; sign, or by using the None keyword: ; ; foo = ; sets foo to an empty string ; foo = none; sets foo to an empty string ; foo = none ; sets foo to the string 'none' ; ; If you use constants in your value, and these constants belong to a ; dynamically loaded extension (either a PHP extension or a Zend extension), ; you may only use these constants *after* the line that loads the extension. ; ; All the values in the php.ini-dist file correspond to the builtin ; defaults (that is, if no php.ini is used, or if you delete these lines, ; the builtin defaults will be identical). ; Language Options ; ; Enable the PHP scripting language engine under Apache. engine = On ; Allow the ? tag. Otherwise, only ?php and script tags are recognized. short_open_tag = On ; Allow ASP-style % % tags. asp_tags = Off ; The number of significant digits displayed in floating point numbers. precision= 14 ; Enforce year 2000 compliance (will cause problems with non-compliant browsers) y2k_compliance = Off ; Output buffering allows you to send header lines (including cookies) even ; after you send body content, at the price of slowing PHP's output layer a ; bit. You can enable output buffering during runtime by calling the output ; buffering functions. You can also enable output buffering for all files by ; setting this directive to On. output_buffering = Off ; You can redirect all of the output of your scripts to a function. For ; example, if you set output_handler to ob_gzhandler, output will be ; transparently compressed for browsers that support gzip or deflate encoding. ; Setting an output handler automatically turns on output buffering. output_handler = ; Transparent output compression using the zlib library ; Valid values for this option are 'off', 'on', or a specific buffer size ; to be used for compression (default is 4KB) zlib.output_compression = Off ; Implicit flush tells PHP to tell the output layer to flush itself ; automatically after every output block. This is equivalent to calling the ; PHP function flush() after each and every call to print() or echo() and each ; and every HTML block. Turning this option on has serious performance ; implications and is generally recommended for debugging
[PHP-DEV] Bug #12449 Updated: I've tried inserting my php.ini file in five locations and it won't load it
ID: 12449 Updated by: lyric Reported By: [EMAIL PROTECTED] Old Status: Open Status: Analyzed Bug Type: GD related Operating System: Windows 98 SE PHP Version: 4.0.6 New Comment: Look in the first section of the output from phpinfo(), and there's a line like: Configuration File (php.ini) Path : /usr/local/lib/php.ini Obviously yours will say something else, but that's where it's getting the .ini file from. Previous Comments: [2001-07-28 11:26:46] [EMAIL PROTECTED] I've put then extention modules in a directory on my C Partition named php_mod, I've saved the php.ini file into the C:\, C:\PHP4, C:\WINBLOWS, C:\WINBLOWS\SYSTEM, C:\WINNT It still will not load my configuration over the default built into the php4ts.dll, here is a copy of my php.ini file [PHP] ; $Id: php.ini-dist,v 1.78.2.2 2001/06/01 03:20:49 sniper Exp $ ;;; ; About this file ; ;;; ; This file controls many aspects of PHP's behavior. In order for PHP to ; read it, it must be named 'php.ini'. PHP looks for it in the current ; working directory, in the path designated by the environment variable ; PHPRC, and in the path that was defined in compile time (in that order). ; Under Windows, the compile-time path is the Windows directory. The ; path in which the php.ini file is looked for can be overriden using ; the -c argument in command line mode. ; ; The syntax of the file is extremely simple. Whitespace and Lines ; beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e.g. [Foo]) are also silently ignored, even though ; they might mean something in the future. ; ; Directives are specified using the following syntax: ; directive = value ; Directive names are *case sensitive* - foo=bar is different from FOO=bar. ; ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression ; (e.g. E_ALL ~E_NOTICE), or a quoted string (foo). ; ; Expressions in the INI file are limited to bitwise operators and parentheses: ; |bitwise OR ; bitwise AND ; ~bitwise NOT ; !boolean NOT ; ; Boolean flags can be turned on using the values 1, On, True or Yes. ; They can be turned off using the values 0, Off, False or No. ; ; An empty string can be denoted by simply not writing anything after the equal ; sign, or by using the None keyword: ; ; foo = ; sets foo to an empty string ; foo = none; sets foo to an empty string ; foo = none ; sets foo to the string 'none' ; ; If you use constants in your value, and these constants belong to a ; dynamically loaded extension (either a PHP extension or a Zend extension), ; you may only use these constants *after* the line that loads the extension. ; ; All the values in the php.ini-dist file correspond to the builtin ; defaults (that is, if no php.ini is used, or if you delete these lines, ; the builtin defaults will be identical). ; Language Options ; ; Enable the PHP scripting language engine under Apache. engine = On ; Allow the ? tag. Otherwise, only ?php and script tags are recognized. short_open_tag = On ; Allow ASP-style % % tags. asp_tags = Off ; The number of significant digits displayed in floating point numbers. precision= 14 ; Enforce year 2000 compliance (will cause problems with non-compliant browsers) y2k_compliance = Off ; Output buffering allows you to send header lines (including cookies) even ; after you send body content, at the price of slowing PHP's output layer a ; bit. You can enable output buffering during runtime by calling the output ; buffering functions. You can also enable output buffering for all files by ; setting this directive to On. output_buffering = Off ; You can redirect all of the output of your scripts to a function. For ; example, if you set output_handler to ob_gzhandler, output will be ; transparently compressed for browsers that support gzip or deflate encoding. ; Setting an output handler automatically turns on output buffering. output_handler = ; Transparent output compression using the zlib library ; Valid values for this option are 'off', 'on', or a specific buffer size ; to be used for compression (default is 4KB) zlib.output_compression = Off ; Implicit flush tells PHP to tell the output layer to flush itself ; automatically after every output block. This is equivalent to calling the ; PHP function flush() after each and every call to print() or echo() and each ; and every HTML block. Turning this option on has serious performance ; implications and is generally recommended for debugging purposes only. implicit_flush = Off ; Whether to enable the ability to force arguments to be passed by reference ; at function call
[PHP-DEV] Bug #10936 Updated: DOMXML crash with CDATA
ID: 10936 Updated by: lyric Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: Reproducible crash Operating system: PHP Version: 4.0.5 Assigned To: Comments: domxml has changed from children being a method to being a member. Try $children = $root-children Previous Comments: --- [2001-05-17 13:21:56] [EMAIL PROTECTED] I am running the latest Win32 binaries from the php.net download page. I am using the ISAPI module on IIS5. In php.ini I enabled DOMXML by uncommenting the appropriate line. Calling the children function on a node that has a CDATA node as a child results in an access violation. Here's a script that reproduces the problem: $doc = xmldocfile('http://tbhbuilding.blogspot.com'); $root = $doc-root(); $children = $root-children(); $children = $children[1]-children(); print_r($children[1]-children()); I would have generated a gdb backtrace if the instructions for doing so explained how to do it with the ISAPI module. --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10936edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #10908 Updated: Undeclared variables/URL declared variables
ID: 10908 Updated by: lyric Reported By: [EMAIL PROTECTED] Old-Status: Bogus Status: Open Bug Type: Scripting Engine problem Operating system: PHP Version: 4.0.5 Assigned To: Comments: Submitter added: Oops! in the code in the above bug report, i made a mistake: Change if($id=view) to if($id==view) Thats how the original code I ran looked like. Sorry for the error, I was typing fast. Your problem is simply that the error_level (as described by derick) is set higher than you are used to. Still, the code should probably read something like if (isset($id) ($id==view)) Previous Comments: --- [2001-05-16 17:07:02] [EMAIL PROTECTED] This is not a bug. 1. Use: if ($id == view) = : assignment == : comparison 2. You can change your errorlevel, which is causing these messages, see www.php.net/error_reporting --- [2001-05-16 16:56:04] [EMAIL PROTECTED] Ok, I ran this script on my Apache server with the new PHP 4.0.5 installed and it did not work... ? if($id=view){ echo You are in view mode; } else{ echo You are not in view mode; ? br form action=?id=view method=post input type=submit value=Change to View Mode /form ? } ? When you first view the page, it says You are not in view mode and has a submit button that says Change to View Mode. If you click to button it will give $id the value of view, so when it reloads the page, it will display You are in view mode. This script works fine on my server with the earlier version of PHP, but not with 4.0.5. The new version 4.0.5 returns an error the first time it loads an says that $id hasnt been defined. I dont know if they changed it on the new version because they thought it was a bug of the old versions(that didnt return errors for undeclared variables), but if thats the case, they certainly disabled simple scripts like this one that made things a hell of a lot easier for us programmers. Thats why I'm using the old version of PHP, and not PHP 4.0.5 on my Apache server. --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10908edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9971 Updated: Crash
ID: 9971 Updated by: lyric Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Scripting Engine problem Assigned To: Comments: Two things. 1) You should use "$i == 10" for a comparison. By using a single equals, you're assigning 10 to $i, which is always "true". 2) What do you expect it to do? If you want to loop to iterate 10 times, you should use "$i10" (the loop continues while the second term is TRUE) Previous Comments: --- [2001-03-24 12:39:35] [EMAIL PROTECTED] I use PHP4.0.5dev on NT4.0 the code is simple table border=0 ? for ($i = 0; $i = $newvalue; $i++) { ? tr td ? echo $i; ? /td /tr ? } ? /table --- [2001-03-24 12:07:35] [EMAIL PROTECTED] Can you post the whole source of a script that crashes on the web somewhere? (Or if it's small, put it into this bug report). Can you also tell which version of PHP4 you are using? --- [2001-03-24 12:04:20] [EMAIL PROTECTED] I get a crash, my whole system stops and I have to restart usually. --- [2001-03-24 11:57:10] [EMAIL PROTECTED] I get a crash, my whole system stops and I have to restart usually. --- [2001-03-24 11:31:00] [EMAIL PROTECTED] Do you get a crash or a parse error? --- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9971edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9971 Updated: Crash
ID: 9971 Updated by: lyric Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Bogus Bug Type: Scripting Engine problem Assigned To: Comments: Closing Previous Comments: --- [2001-03-26 16:38:21] [EMAIL PROTECTED] Two things. 1) You should use "$i == 10" for a comparison. By using a single equals, you're assigning 10 to $i, which is always "true". 2) What do you expect it to do? If you want to loop to iterate 10 times, you should use "$i10" (the loop continues while the second term is TRUE) --- [2001-03-24 12:39:35] [EMAIL PROTECTED] I use PHP4.0.5dev on NT4.0 the code is simple table border=0 ? for ($i = 0; $i = $newvalue; $i++) { ? tr td ? echo $i; ? /td /tr ? } ? /table --- [2001-03-24 12:07:35] [EMAIL PROTECTED] Can you post the whole source of a script that crashes on the web somewhere? (Or if it's small, put it into this bug report). Can you also tell which version of PHP4 you are using? --- [2001-03-24 12:04:20] [EMAIL PROTECTED] I get a crash, my whole system stops and I have to restart usually. --- [2001-03-24 11:57:10] [EMAIL PROTECTED] I get a crash, my whole system stops and I have to restart usually. --- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9971edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9519 Updated: Incorrect output from date function
ID: 9519 Updated by: lyric Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: Date/time related Assigned To: Comments: PHP is performing as documented. You want 'j' not 'n'. See the date manual page : d - day of the month, 2 digits with leading zeros; i.e. "01" to "31" j - day of the month without leading zeros; i.e. "1" to "31" n - month without leading zeros; i.e. "1" to "12" Previous Comments: --- [2001-03-02 11:16:50] [EMAIL PROTECTED] My bad disregard...month...oops. --- [2001-03-02 11:16:16] [EMAIL PROTECTED] Jani, I believe he is refering to the fact the dates are wrong numerically not typographically. I get this same result too on PHP 4.0.4pl1 and 4.0.5-dev. -Chris --- [2001-03-02 09:28:58] [EMAIL PROTECTED] It's not wrong, it's exactly what it should be outputting. Please read the manual page for date: http://www.php.net/date where it says: n - month without leading zeros; i.e. "1" to "12" --Jani --- [2001-03-02 02:44:32] [EMAIL PROTECTED] the n option for date gives wrong value date ("l, F d, Y") outputs Friday, March 02, 2001 date ("l, F n, Y") outputs Friday, March 3, 2001 --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9519edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #8995 Updated: Linebreakes is added to form input
ID: 8995 Updated by: lyric Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: Filesystem function related Assigned To: Comments: I had the same problem, and it's fixed in CVS. It seems like the one bug was causing all the file-upload problems See http://bugs.php.net/bugs.php?id=9298 Previous Comments: --- [2001-01-30 06:26:05] [EMAIL PROTECTED] In PHP 4.0.4pl1 form input started to behave strange. The problem is simular to Bug 8940 but also includes other problems. It seems that it affects every form with encryptiontype set to "multipart/form-data". Besides that the mimetype is bundled with the uploaded file (as explained in bug report 8940) every other field is affected. Data from every other field in the form starts with a linebreak char, except for formobjects of type textarea. Textarea form fields starts with double linebreak chars. Forms where a encryptiontype is unset are not affected. It also looks like some kind of files (like tgz-compressed files) are affected otherwise, but I still don't know what the difference is or if there are any other file types that are affected simular to tgz-compressed files. --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=8995edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #8966 Updated: Newline before variables in forms with ENCTYPE=multipart/form-data
ID: 8966 Updated by: lyric Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Duplicate Bug Type: Unknown/Other Function Assigned To: Comments: Fixed in CVS Previous Comments: --- [2001-01-28 07:19:36] [EMAIL PROTECTED] Hi, I upgraded to php-4.0.4pl1-3 and found that most of my fileupload forms didn't work properly. As it turns out all variables passed from a form with ENCTYPE="multipart/form-data" seem to have a newline character prepended to their value. This wasn't the case in previous versions. I hope this gets fixed soon. Sincerely Brecht Sanders (http://brecht.sanders.org/) --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=8966edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9418 Updated: Upload image file is broken
ID: 9418 Updated by: lyric Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: *General Issues Assigned To: Comments: Reopening. jmoore : what's the hurry to close something just one day after the issue is reported? nekto replied "What info yuo need?" nekto: well does the uploaded file exist? does the file 0 filesize? what are the differences between the files - is the uploaded file prepended with a content-type header? what code are you using to reference the uploaded file? Previous Comments: --- [2001-02-24 13:23:34] [EMAIL PROTECTED] Not enough information supplied closing. --- [2001-02-23 05:04:14] [EMAIL PROTECTED] I have a problem with upload gif image (original differ from upload image). With yours recommendation, i install last cvs version of php4. But this not solved my problem. What i must doing for solving my problem? --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9418edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9425 Updated: file upload appends content-type header to beginning of binary file
ID: 9425 Updated by: lyric Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Duplicate Bug Type: Unknown/Other Function Assigned To: Comments: Duplicate of http://bugs.php.net/bugs.php?id=9298 which is fixed in CVS. Previous Comments: --- [2001-02-23 12:35:17] [EMAIL PROTECTED] I've been having difficulty with the file upload feature, specifically used with JPEG files. I'm using the 4.04p|1 RPM for RH off of rpmfind, I've listed the compile flags at the end of this message. The content-type header has been appended to the beginning of the file, making the file unreadable. Opening the file in vi and deleting the first two lines fixes the problem. I've seen ~3 other messages posted relating to this problem on the mailing lists, specific to this version, but no solutions, so I'm guessing it's a bug. Here's the code on the receiving end: if ($HTTP_POST_FILES): $file1_nym = $HTTP_POST_FILES['file1_upload']['name']; move_uploaded_file($file1_upload, "/usr/local/www/html/assets/$file1_nym"); $file2_nym = $HTTP_POST_FILES['file2_upload']['name']; move_uploaded_file($file2_upload, "/usr/local/www/html/assets/$file2_nym"); } compile options: './configure' '--prefix=/usr' '--with-config-file-path=/etc' '--disable-debug' '--enable-pic' '--enable-shared' '--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs' '--with-exec-dir=/usr/bin' '--with-regex=system' '--with-gettext' '--with-gd' '--with-jpeg-dir=/usr' '--with-png' '--with-zlib' '--with-db2' '--with-db3' '--with-gdbm' '--enable-debugger' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp' '--enable-wddx' '--without-mysql' '--without-oracle' '--without-oci8' '--with-xml' --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9425edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #8580 Updated: Fileupload and Database mysql access
ID: 8580 Updated by: lyric Reported By: [EMAIL PROTECTED] Old-Status: Feedback Status: Duplicate Bug Type: *Directory/Filesystem functions Assigned To: Comments: Probably related the the v4.04 file-upload bug http://bugs.php.net/bugs.php?id=9298 Marking as duplicate, pending any use feedback. Previous Comments: --- [2001-01-08 10:10:25] [EMAIL PROTECTED] i'm sorry but we can do nothing with such a vaguely worded bug report. Please, provide a shortest possible script depicting the experienced problem(s), as well as a description of what the problem is. --- [2001-01-07 17:02:25] [EMAIL PROTECTED] I have problems with the new php 4.04 version ... with the php.ini something has changed ; ; Data Handling ; ; ; Note - track_vars is ALWAYS enabled as of PHP 4.0.3 variables_order = "EGPCS" ; This directive describes the order in which PHP registers ; GET, POST, Cookie, Environment and Built-in variables (G, P, ; C, E S respectively, often referred to as EGPCS or GPC). ; Registration is done from left to right, newer values override ; older values. register_globals= On ; Whether or not to register the EGPCS variables as global ; variables. You may want to turn this off if you don't want ; to clutter your scripts' global scope with user data. This makes ; most sense when coupled with track_vars - in which case you can ; access all of the GPC variables through the $HTTP_*_VARS[], ; variables. ; You should do your best to write your scripts so that they do ; not require register_globals to be on; Using form variables ; as globals can easily lead to possible security problems, if ; the code is not very well thought of. register_argc_argv = On ; This directive tells PHP whether to declare the argvargc ; variables (that would contain the GET information). If you ; don't use these variables, you should turn it off for ; increased performance post_max_size = 8M ; Maximum size of POST data that PHP will accept. gpc_order = "GPC" ; This directive is deprecated. Use variables_order instead. Some problems with sending mail attachements and connecting to databases... Back to php-4.0.1pl2-Win32.zip no problems. What has been changed in this version that some of my sources do not run anymore. And what should I change in my php sources to get it working fine again or is this realy a bug in php404. Greetz Chris --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=8580edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9411 Updated: Arithmetic error
ID: 9411 Updated by: lyric Reported By: [EMAIL PROTECTED] Old-Status: Closed Status: Bogus Old-Bug Type: *Regular Expressions Bug Type: Math related Assigned To: Comments: This is nothing to do with PHP, its just part of the way computers store floating-point numbers. It stores an aproximation of 0.32, as close as it can get, but when you start multiplying it, the little difference between 0.32 and what it stored starts to get magnified. BTW, 5.5511151231258E-17 is 0.55511151231258 which is *really* closed to 0. If you want to output formatted numbers, you should either round it, or use printf() http://www.php.net/manual/en/function.printf.php Previous Comments: --- [2001-02-22 16:05:47] [EMAIL PROTECTED] This is normal floating point math behavior --- [2001-02-22 15:45:55] [EMAIL PROTECTED] Hi I am not sure if I have found a bug - what do you think...? Consider this: $var1 = -0.32 + (0.1*3.2) This should give var1 the value 0, instead it gives 5.5511151231258E-17 Interestingly if you increase -0.33 and 3.3 respectively it gives the correct answer. Werid! Rob Burne [EMAIL PROTECTED] --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9411edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #8958 Updated: File uploads append Content-Type string
ID: 8958 Updated by: lyric Reported By: [EMAIL PROTECTED] Old-Status: Feedback Status: Duplicate Bug Type: Unknown/Other Function Assigned To: Comments: Duplicate of http://bugs.php.net/bugs.php?id=9298 which is fixed in CVS. Previous Comments: --- [2001-02-04 12:40:04] [EMAIL PROTECTED] I can not reproduce this with latest CVS. Please try latest CVS snapshot from http://snaps.php.net/ --Jani --- [2001-01-28 15:29:53] [EMAIL PROTECTED] Being that it happens to every file uploaded, I don't know how helpful this will be but.. $file = $HTTP_POST_FILES['file']['tmp_name']; $file_name = $HTTP_POST_FILES['file']['name']; @mkdir("../Images/new/$owner",0775); copy($file,"../Images/new/$owner/$file_name"); Now, the file created has the Content-type: xxx/x plus an additional blank line at the top of the file. --- [2001-01-27 20:50:26] [EMAIL PROTECTED] Please provide a short snippet of code that reproduces this effect. --- [2001-01-27 18:20:35] [EMAIL PROTECTED] Doing file uploads with php 4.0.4pl1 on RH7 (RedHat RPMs) appends the Content-Type: /x line to the top of the files. -- Medvitz --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=8958edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #8940 Updated: File uploads stopped withing in 4.0.4pl1
ID: 8940 Updated by: lyric Reported By: [EMAIL PROTECTED] Old-Status: Feedback Status: Duplicate Old-Bug Type: Filesystem function related Bug Type: Unknown/Other Function Assigned To: Comments: Duplicate of http://bugs.php.net/bugs.php?id=9298 which is fixed in CVS. Previous Comments: --- [2001-02-04 12:41:07] [EMAIL PROTECTED] I can not reproduce this with latest CVS. Please try the latest CVS snapshot from http://snaps.php.net/ --Jani --- [2001-01-26 16:07:33] [EMAIL PROTECTED] If you view the uploaded file (using "od" in my case), you'll see that the first few bytes of it are: "Content-Type: image/jpeg" followed by the binary data that makes up the JPEG file. Since the uploaded file is exactly the same size as the original, I presume that the last few bytes are dropped out. --- [2001-01-26 12:50:56] [EMAIL PROTECTED] Further testing reveals that the upload is working properly, but the file 'type' variable is not set, and PHP is not treating it as an image file. Image processing utilities state that the file is corrupt after uploading, even though it remains the exact same size as the original. I suspect that PHP is doing something to the file. --- [2001-01-26 12:01:45] [EMAIL PROTECTED] Ok, I've done some further testing. With a simple script that does nothing except upload the file and move it, it works: the file is there. However, the "type" variable has no value! No matter what type of file I upload, the $HTTP_POST_FILES['userfile']['type'] value is an empty string. --- [2001-01-26 11:21:21] [EMAIL PROTECTED] I've been using 4.0.3 for a couple of weeks now. Last night I ran the Redhat Update agent and installed 4.0.4pl1. Everything works fine except for file uploads. The upload is recorded as successful, everything SEEMS to work fine, but there is no file in /tmp, and the variable $HTTP_POST_FILES['userfile']['type'] is undefined. Apache 1.3.14 reports no problems, and returns a 200 return code. I've tried working with php.ini; I can turn file uploads off, and that works, then when I turn it back on again, it has the same problem. I'm pretty sure it's something in 4.0.4pl1 because nothing else on my system has changed since the upgrade last night. Here's some of my code: $file_type = $HTTP_POST_FILES['userfile']['type']; if (substr($file_type,-4,4) != 'jpeg') { die( "Files of type '" . $file_type . "' are not recognized.br" . "Only JPEG images are currently supported." ); } $path_for_file = 'gallery/' . $user_id . '/' . $photo_id . '.jpg'; if (!is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) die( "File is not uploaded." ); move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], $path_for_file); ...but I really don't think the problem is in the code. Here's some output from my Apache log file: 192.168.1.2 - - [26/Jan/2001:08:13:04 -0800] "POST /upload.php HTTP/1.1" 200 51 "http://mysite/upload.php" "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC) " No errors are reported any where. --- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=8940edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #9011 Updated: Only one var allowed in a class
ID: 9011 Updated by: lyric Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: *General Issues Assigned To: Comments: Closing Previous Comments: --- [2001-01-30 20:17:45] [EMAIL PROTECTED] You should use $this-balance, not $this-$balance. The latter is equivalent to $this-'', where all your values are being stored. If possible, you might consider raising the error_reporting level in your php.ini --- [2001-01-30 16:09:25] [EMAIL PROTECTED] The following class definition lists three vars, yet they are all treated as one, as the call to report() shows. I'd love to be able to define more vars in a class. ? class bankaccount { var $balance; var $transactions; var $history; function bankaccount () { $this-$balance = 0.00; $this-$transactions = 0; $this-$history[$transactions] = $this-$balance; } function report () { echo $this-$balance . "br"; echo $this-$transactions . "br"; echo $this-$history[$transactions] . "br"; } function credit ($amount) { $amount = abs($amount); $this-$balance += $amount; } function debit ($amount) { $amount = abs($amount); $this-$balance -= $amount; } } $USDaccount = new bankaccount; $USDaccount-credit(1); $USDaccount-debit(1000); $USDaccount-debit(.78); $USDaccount-report(); ? the result is: 8999.22 8999.22 8999.22 Why? --- Full Bug description available at: http://bugs.php.net/?id=9011 -- 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]