#44813 [Bgs]: PHP crashes with 'threads' extension

2008-04-25 Thread ganswijk at xs4all dot nl
 ID:   44813
 User updated by:  ganswijk at xs4all dot nl
 Reported By:  ganswijk at xs4all dot nl
 Status:   Bogus
 Bug Type: Reproducible crash
 Operating System: Windows XP
 PHP Version:  5.2.5
 New Comment:

Why offer it as an extension for the regular windows version then? How
can people know which extensions are stable and which ones are not?
Please explain it in the comment before people try to include it. I had
a valid reason to want to try to include threads although I know that
threads are hard to implement but I didn't expect this to be so unstable
that it makes PHP crash each time it's started. Am I the first person to
encounter this?

By the way wouldn't it be possible to let PHP tell in which module it
crashes? I had to use binary elimination to find the module that crashed
PHP. Each time I had to remove another 50% of the modules that I
included until the set wasn't crashing anymore and then I had to add
packages again. Each cycle involved changing the install (and why does
the httpd.conf directory has to be filled in again each time, can't that
be remembered?) And then I had to restart windows, so each cycle took
about 15 minutes. with 2log16=4 cycles and some control cycles that is
about 1.5 hours. And before I realized that the problem lay within one
of the modules I already spent a couple of hours searching the WWW for
possible causes and I fully deinstalled and reinstalled Apache and PHP.
Please also consider that one has to look for all kinds of debris that
earlier PHP and Apache installs may have left in all kinds of
directories, like a php.ini in the windows directory etc.

BTW. Installing/upgrading Apache and PHP under Linux isn't a picknick
either. It usually takes me most of a working day or even two days. I
usually install a new Mandriva version every several years (a fully
clean new install, not an upgrade, I learned that the hard way) and then
try to upgrade Apache and PHP but that isn't easy as I stated before.
First of all you have to install by recompiling both or the Apache
include files are missing (and some of the library files). And then the
fun begins, so was my installation for example missing a 'lex' or
'bison'. Luckily I still have my old PC standing by and could copy it's
'lex' but then the problem with all the libraries starts. Many libraries
are interdependent of other libraries (of certain versions). Luckily I
installed from DVD-ROM this time. In earlier times when installing from
several CD-ROM's it was really very, very hard. Sometimes I even had to
use a set of older CD-ROM's to find the correct libraries. Trying to
find the correct libraries on the WWW also is a lot of work!

I think we should make PHP much more user friendly! Why not explain for
every extension what it's good for: What does 'curl' or 'tiny' actually
do, who should install it and how stable is it?

Please consider that the current default windows install doesn't even
install the GD-interface which is already described in Rasmus Lerdorf's,
PHP pocket guide of about 2000 (published by O'Reilly). A lot of other
modules that you would expect are also not included in the standard
install...


Previous Comments:


[2008-04-23 21:54:15] [EMAIL PROTECTED]

threads has never had a stable release, not sure why you would install
it.

Feel free to report bugs with it at http://pecl.php.net/package/threads



[2008-04-23 21:28:21] ganswijk at xs4all dot nl

Description:

It took me a long time of deducing but my configuration only crashes
when I include the extension 'threads'.

This may be a PECL problem but I think there should be a single unified
bug reporting system...


Reproduce code:
---
It crashes with a standard phpinfo.php script but also with a simple
'Hello world' script.

Expected result:

The usual. BTW. The phpinfo page is shown or at least the top of the
page but soon after (0.5 s?) it crashes.

Actual result:
--
szAppName: httpd.exe
szAppVer: 2.2.8.0
szModName: php5ts.dll
szModVer: 5.2.5.5
offset: 0009a0fd






-- 
Edit this bug report at http://bugs.php.net/?id=44813&edit=1



#44826 [Opn->Ctl]: echo (float)1200000;

2008-04-25 Thread derick
 ID:   44826
 Updated by:   [EMAIL PROTECTED]
 Reported By:  marfinal at gmail dot com
-Status:   Open
+Status:   Critical
 Bug Type: Math related
 Operating System: Windows XP
 PHP Version:  5.2.5


Previous Comments:


[2008-04-25 05:28:50] marfinal at gmail dot com

Description:

windows xp(jp)

the output float variable is different in PHP4 and PHP5. 



Reproduce code:
---
echo (float)120;

Expected result:

PHP4:
120

Actual result:
--
PHP5.2.5:
1.2E+6






-- 
Edit this bug report at http://bugs.php.net/?id=44826&edit=1



#44818 [Opn]: php://memory writeable when opened read only

2008-04-25 Thread davemastergeneral at gmail dot com
 ID:   44818
 User updated by:  davemastergeneral at gmail dot com
 Reported By:  davemastergeneral at gmail dot com
 Status:   Open
 Bug Type: Streams related
 Operating System: Linux csl1226 2.6.22-14-generic
 PHP Version:  5.2CVS-2008-04-24 (snap)
 New Comment:

Actually, expected result should be

bool(false)

For an error?


Previous Comments:


[2008-04-24 12:45:24] davemastergeneral at gmail dot com

Description:

I use php://memory to save resources when unit testing, I found it
possible to write to the stream despite opening it read only. Not sure
if this is the desired behaviour.



Reproduce code:
---



Expected result:

int(0)

Actual result:
--
int(4)





-- 
Edit this bug report at http://bugs.php.net/?id=44818&edit=1



#44807 [Opn]: Calling parent::__set when __set is overloaded = parent->child->parent calls

2008-04-25 Thread agostone at freemail dot hu
 ID:   44807
 User updated by:  agostone at freemail dot hu
 Reported By:  agostone at freemail dot hu
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows Xp
 PHP Version:  5.2.5
 New Comment:

I happen to experience this problem with magic functions only, i
understand what You wrote, still, the question is there... May i hope
that You guys will put this "expected" behavior into the bug fix chain
or should i accept the fact that it won't get fixed ever?


Previous Comments:


[2008-04-24 22:18:02] [EMAIL PROTECTED]

This is "expected", the recursion protection that allows you to
dynamically create properties inside __set is not enabled before the
first __set called via overloading.

Example:

class A {
public function __set($n, $v) {
echo "Setting $n = $v\n";
$this->$n = $v;
}
}

$a = new A;
$a->k1 = "v1";

$a->__set("k2", "v2");

Will end up outputting:
Setting k1 = v1
Setting k2 = v2
Setting k2 = v2

because the recursion protection isn't there when you do a manual call
to __set().



[2008-04-24 21:57:56] agostone at freemail dot hu

I've deleted my php installation, kept only php.ini.

downloaded and installed php from this location it:

http://snaps.php.net/win32/php5.2-win32-latest.zip

Executed the code, here are the results:
Calling: setRaw()
Class: A| Passed Value:shouldn't be prefixed
Class: B| Passed Value:shouldn't be prefixed
Class: A| Passed Value:(prefixed) shouldn't be prefixed

Calling: __set()
Class: B| Passed Value:should be prefixed
Class: A| Passed Value:(prefixed) should be prefixed

Variable after setraw: (prefixed) shouldn't be prefixed
Variable after set: (prefixed) should be prefixed

Seems it still exists.



[2008-04-24 11:09:48] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2008-04-23 14:09:33] agostone at freemail dot hu

Description:

If i have an overloaded __set function in a class and call
parent::__set from another function, the parent calls the child's __set
back and a loop gets created like this:

parent::__set (initial call)
child::_set
parent::_set

I need __set function to do some prefixing by default when assigning
new string properties by default, i need a custom function to assign
un-prefixed properties too, if there is a need (will happen very
rarely)... I need this to auto prefix string variables passed to my view
object (they gotta be passed as object properties), the MVC framework is
a 3rd party framework, i'm extending it's view object and i don't want
to modify the original source...

Reproduce code:
---
");
$this->$pKey = $pValue;
return true;
}
}

class B extends A
{
function setRaw($pKey, $pValue)
{
parent::__set($pKey, $pValue);
}

function __set($pKey, $pValue)
{
echo("Class: ".get_class()."| Passed Value:".$pValue."");
$pValue = $this->prefix($pValue);
parent::__set($pKey, $pValue);
}

function prefix($pValue)
{
if(is_string($pValue))
{
return "(prefixed) ".$pValue;
}
return $pValue;
}
}

$b = new B();

echo("Calling: setRaw()");
$b->setRaw("raw", "shouldn't be prefixed");
echo("");

echo("Calling: __set()");
$b->prefixed = "should be prefixed";

echo("Variable after setraw: ".$b->raw);
echo("Variable after set: ".$b->prefixed);
echo("");

?>

Expected result:

Calling: setRaw()
Class: A| Passed Value:shouldn't be prefixed

Calling: __set()
Class: B| Passed Value:should be prefixed
Class: A| Passed Value:(prefixed) should be prefixed

Variable after setRaw: shouldn't be prefixed
Variable after set: (prefixed) should be prefixed


Actual result:
--
Calling: setRaw()
Class: A| Passed Value:shouldn't be prefixed
Class: B| Passed Value:shouldn't be prefixed
Class: A| Passed Value:(prefixed) shouldn't be prefixed

Calling: __set()
Class: B| Passed Value:should be prefixed
Class: A| Passed Value:(prefixed) should be prefixed

Variable after setraw: (prefixed) shouldn't be prefixed
Variable after set: (prefixed) should be prefixed






-- 
Edit this bug report at http://bugs.php.net/?id=44807&edit=1



#44827 [Opn]: define('::') can be defined

2008-04-25 Thread kalle
 ID:   44827
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows Vista
 PHP Version:  5.2.5
 New Comment:

As a note to this while we're at define().

define() also seems to ignore if you declare a class constant like:
define('test::c', 'test');

Both with and without having a class called 'test' passes this, testing
without the class 'test' like:
var_dump(test::c);

Will result in a fatal error: class 'test' not found. Testing it with a
class called 'test' will issue a fatal error: undefined class constant
'c'.

If the class 'test' already have a constant called 'c' define() will
still ignore it and var_dump() will return the real value of test::c.


Previous Comments:


[2008-04-25 10:01:38] [EMAIL PROTECTED]

Description:

PHP (5.2.5) allows you to define '::' as a constant without issuing an
E_WARNING, below examples will demonstrate it.

The constant() function will issue an fatal error when recieving '::'
as constant name:
Fatal error: Class '' not found in C:\webserver\www\gd\gd.php on line
91

Which might also be wrong or confusing to the programmer

Reproduce code:
---


Expected result:

A fatal error for each of the calls:

Fatal error: Invalid constant name in test.php on line 2

Fatal error: Invalid constant name in test.php on line 3

Actual result:
--
Fatal error: Class '' not found in C:\webserver\www\gd\gd.php on line
91

None warning or fatal error for define()...





-- 
Edit this bug report at http://bugs.php.net/?id=44827&edit=1



#44827 [NEW]: define('::') can be defined

2008-04-25 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: Windows Vista
PHP version:  5.2.5
PHP Bug Type: Scripting Engine problem
Bug description:  define('::') can be defined

Description:

PHP (5.2.5) allows you to define '::' as a constant without issuing an
E_WARNING, below examples will demonstrate it.

The constant() function will issue an fatal error when recieving '::' as
constant name:
Fatal error: Class '' not found in C:\webserver\www\gd\gd.php on line 91

Which might also be wrong or confusing to the programmer

Reproduce code:
---


Expected result:

A fatal error for each of the calls:

Fatal error: Invalid constant name in test.php on line 2

Fatal error: Invalid constant name in test.php on line 3

Actual result:
--
Fatal error: Class '' not found in C:\webserver\www\gd\gd.php on line 91

None warning or fatal error for define()...

-- 
Edit bug report at http://bugs.php.net/?id=44827&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44827&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44827&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44827&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44827&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44827&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44827&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44827&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44827&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44827&r=support
Expected behavior:http://bugs.php.net/fix.php?id=44827&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44827&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44827&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44827&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44827&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44827&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44827&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44827&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44827&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44827&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44827&r=mysqlcfg



#44830 [NEW]: Very minor issue with backslash in heredoc

2008-04-25 Thread slattery at uk dot ibm dot com
From: slattery at uk dot ibm dot com
Operating system: windows
PHP version:  5.2.5
PHP Bug Type: Scripting Engine problem
Bug description:  Very minor issue with backslash in heredoc

Description:

There is a very minor issue when a heredoc contains only a single
backslash.

The doc says heredoc behaves exactly as double quoted string - so in this
one particular case of the single backslash - we have a case which cannot
be produced in a double quoted string - so the behaviour is undefined.

The engine appears to treat is as a 'record separator', but I think
it would be better treated as a backslash.

Im quite happy for this to be closed as bogus - Its just that the code
below is from a php test case - I dont suppose anyone will actually do
this.

Reproduce code:
---




Expected result:

On running the code  I get: 

string(2) "00"
string(4) "5c30"
string(2) "00"

which looks a little strange, I would have expected: 

string(2) "5c"
string(4) "5c5c"
string(2) "5c"



-- 
Edit bug report at http://bugs.php.net/?id=44830&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44830&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44830&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44830&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44830&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44830&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44830&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44830&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44830&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44830&r=support
Expected behavior:http://bugs.php.net/fix.php?id=44830&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44830&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44830&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44830&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44830&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44830&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44830&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44830&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44830&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44830&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44830&r=mysqlcfg



#44828 [NEW]: mssql_connect returns NULL

2008-04-25 Thread gerd at php-tools dot net
From: gerd at php-tools dot net
Operating system: Linux
PHP version:  5.2.5
PHP Bug Type: MSSQL related
Bug description:  mssql_connect returns NULL

Description:

Well, I do have the same problem as stated in Bug #29993 - still it is not
possible to add a comment to "bogus" bugs. 

Using a proper servername, username password, mssql_connect() returns
NULL. Hence I cannot connect.

In case anything is wrong e.g. the password, mssql_connect() returns FALSE
- as expected. 

OS: Linux 2.6.21
PHP-Version: 5.2.5

I installed the following Debian packages:
php55.2.5-3 server-side, HTML-embedded scripting language
php5-cli5.2.5-3 cli for the php5 scripting language
php5-common 5.2.5-3 Common files for packages built from the php5
php5-mcrypt 5.2.5-3 MCrypt module for php5
php5-mhash  5.2.5-3 MHASH module for php5
php5-mysql  5.2.5-3 MySQL module for php5
php5-sybase 5.2.5-3 Sybase / MS SQL Server module for php5

regards, gERD


Reproduce code:
---
$dbc = mssql_connect('server', 'user', 'secret');
echo '' . var_export($dbc, true) . '';


Expected result:

$dbc!==null

Actual result:
--
$dbc===null

-- 
Edit bug report at http://bugs.php.net/?id=44828&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44828&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44828&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44828&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44828&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44828&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44828&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44828&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44828&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44828&r=support
Expected behavior:http://bugs.php.net/fix.php?id=44828&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44828&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44828&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44828&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44828&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44828&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44828&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44828&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44828&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44828&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44828&r=mysqlcfg



#44831 [NEW]: Injection By Executing of External Scripts

2008-04-25 Thread yasenpetrov at gmail dot com
From: yasenpetrov at gmail dot com
Operating system: Linux
PHP version:  4.4.8
PHP Bug Type: *General Issues
Bug description:  Injection By Executing of External Scripts

Description:

Hello,

I'm having a similar problem like the one this guy is describing. My
website gets infected somehow. I've tried to delete .htaccess file that
causes the redirection, the directory with the malicious files, change the
FTP password. It is ok for a day or two but then these files get recreated
somehow.

I'm going to try the steps described in this article and the link within.


Just thought you may want to know (if you do not know already) this case.
I am sure a lot of websites are affected by this "virus" or whatever is
called. 

The main point is that when a user clicks on a link from Google (or other
search engine) results on a certain infected website they see some blog
page and get redirected to AdultFriendFinder in a few seconds instead of
visiting the real website.

It is quite hard to get rid of this virus and also hard to find info in
internet about this issue. I've been trying to solve this problem for over
a month now. The hosting provider just told me: "Examine the log files". It
is a real pain in the but for nub cakes like me ^^

Thank you.

Yasen

PS. I know my English sucks but hope you understood me.

Reproduce code:
---
http://groups.google.com/group/Google_Web_Search_Help-UsingWS/browse_thread/thread/7ac29a38008c4d81


-- 
Edit bug report at http://bugs.php.net/?id=44831&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44831&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44831&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44831&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44831&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44831&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44831&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44831&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44831&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44831&r=support
Expected behavior:http://bugs.php.net/fix.php?id=44831&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44831&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44831&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44831&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44831&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44831&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44831&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44831&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44831&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44831&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44831&r=mysqlcfg



#44831 [Opn->Bgs]: Injection By Executing of External Scripts

2008-04-25 Thread scottmac
 ID:   44831
 Updated by:   [EMAIL PROTECTED]
 Reported By:  yasenpetrov at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: Linux
 PHP Version:  4.4.8
 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.




Previous Comments:


[2008-04-25 11:32:30] yasenpetrov at gmail dot com

Description:

Hello,

I'm having a similar problem like the one this guy is describing. My
website gets infected somehow. I've tried to delete .htaccess file that
causes the redirection, the directory with the malicious files, change
the FTP password. It is ok for a day or two but then these files get
recreated somehow.

I'm going to try the steps described in this article and the link
within. 

Just thought you may want to know (if you do not know already) this
case. I am sure a lot of websites are affected by this "virus" or
whatever is called. 

The main point is that when a user clicks on a link from Google (or
other search engine) results on a certain infected website they see some
blog page and get redirected to AdultFriendFinder in a few seconds
instead of visiting the real website.

It is quite hard to get rid of this virus and also hard to find info in
internet about this issue. I've been trying to solve this problem for
over a month now. The hosting provider just told me: "Examine the log
files". It is a real pain in the but for nub cakes like me ^^

Thank you.

Yasen

PS. I know my English sucks but hope you understood me.

Reproduce code:
---
http://groups.google.com/group/Google_Web_Search_Help-UsingWS/browse_thread/thread/7ac29a38008c4d81






-- 
Edit this bug report at http://bugs.php.net/?id=44831&edit=1



#44462 [Com]: Can't compile embed sapi on OSX

2008-04-25 Thread cthompson at nexopia dot com
 ID:   44462
 Comment by:   cthompson at nexopia dot com
 Reported By:  graham+php at nexopia dot com
 Status:   Open
 Bug Type: Compile Failure
 Operating System: OSX
 PHP Version:  5.2CVS-2008-03-18
 New Comment:

Problem still exists with latest snapshot on OS X.  Any pointers on
where I can look to resolve this problem would be appreciated.


Previous Comments:


[2008-03-19 00:19:06] graham+php at nexopia dot com

Yes, we have been using the embed sapi with great success on linux for
a while now. As far as I know, the bug is isolated to OSX.



[2008-03-19 00:11:51] [EMAIL PROTECTED]

Compile with success on Linux.



[2008-03-18 22:06:55] graham+php at nexopia dot com

Tried that out, still fails in the same way.



[2008-03-18 21:49:38] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2008-03-17 22:06:38] graham+php at nexopia dot com

Description:

If you try to compile php with the embed sapi on OSX, you get an error
about duplicate symbols for yytext.

Reproduce code:
---
./configure --enable-embed
make




Expected result:

Finish compiling

Actual result:
--
make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs
ld: warning, duplicate dylib /usr/lib/libm.dylib
ld: duplicate symbol _yytext in Zend/.libs/zend_ini_scanner.o and
Zend/.libs/zend_language_scanner.o

collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1





-- 
Edit this bug report at http://bugs.php.net/?id=44462&edit=1



#43024 [Asn]: Update PHP OpenSSL Files

2008-04-25 Thread pajoye
 ID:   43024
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dj02 dot net at nbl dot fi
 Status:   Assigned
 Bug Type: OpenSSL related
 Operating System: Windows Vista 6.0.6000
 PHP Version:  5.2CVS-2008-02-01 (snap)
 Assigned To:  pajoye
 New Comment:

Update to 0.9.8g in progress. The next 5.2.x release (5.2.6RC2 binaries
will have it) will hopefully use this version.




Previous Comments:


[2008-02-01 11:12:00] [EMAIL PROTECTED]

Hi Edin,

What is preventing us to update our windows binaries to the last
openssl version? Only wondering if there is any possible issues :)





[2008-02-01 09:44:46] dj02 dot net at nbl dot fi

Still not updated. Could you update them.



[2007-11-14 21:27:31] dj02 dot net at nbl dot fi

Still not updated.



[2007-10-25 13:29:23] dj02 dot net at nbl dot fi

-



[2007-10-20 07:26:03] dj02 dot net at nbl dot fi

OpenSSL team released v0.9.8g so update to that version please.



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/43024

-- 
Edit this bug report at http://bugs.php.net/?id=43024&edit=1



#44832 [NEW]: Binding to unset placeholders.

2008-04-25 Thread atrauzzi at gmail dot com
From: atrauzzi at gmail dot com
Operating system: Ubuntu
PHP version:  5.2.5
PHP Bug Type: PDO related
Bug description:  Binding to unset placeholders.

Description:

PHP doesn't support automatic-skipping of placeholders that aren't in a
prepared statement.

It would be nice if this rather simple scenario could be handled as it's
forcing me to double up on my checks when generating a query.

It's hard to determine whether this is truly an error condition or not.  I
hope the issue doesn't bounce without due consideration.

My suggestion is to have the Statement object ignore requests to bind to
fields not present in the query.  It might be sloppy, so to that end, I'm
happy to see any suggestions for alternatives.

Hopefully I'm not missing a best practice here either ;)

Reproduce code:
---
The generalized steps are:

o Go through steps to generate query.  At some point during this, the
string being built has placeholders (Example: ":userID" and ":isActive")
that need to be added.  More often that not these will be surrounded by
conditions like "if($lookingForUser)".
o Take the completed query string and generate a prepared statement.
o Bind all requested parameters.

The problem here is at the "Bind all requested parameters" step.  It is
there that we'll see an almost identical set of condition checking as
encountered during the "Go through steps to generate query" phase.
If I don't want ":isActive" in my query, I have to not only dodge it when
generating my query, but also when binding parameters with an identical set
of checks.

There must be a cleaner way to do this?!

Expected result:

bindParam should not throw any errors when the parameter isn't present in
the query.

Actual result:
--
bindParam throws an error when you try to bind a parameter that isn't
present in the query.

-- 
Edit bug report at http://bugs.php.net/?id=44832&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44832&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44832&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44832&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44832&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44832&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44832&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44832&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44832&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44832&r=support
Expected behavior:http://bugs.php.net/fix.php?id=44832&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44832&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44832&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44832&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44832&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44832&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44832&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44832&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44832&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44832&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44832&r=mysqlcfg



#44801 [Opn->Fbk]: Invalid escaping for passthru() in CLI

2008-04-25 Thread jani
 ID:   44801
 Updated by:   [EMAIL PROTECTED]
 Reported By:  twm at twmacinta dot com
-Status:   Open
+Status:   Feedback
 Bug Type: CGI related
 Operating System: Red Hat Enterprise Linux ES 3
 PHP Version:  5.2.5
 Assigned To:  fb-req-jani
 New Comment:

Using --enable-safe-mode makes the default be "on". (without this
configure option it defaults to "off").

And in the manual it is mentioned that: "Warning:
With safe mode enabled, the command string is escaped with
escapeshellcmd(). Thus, echo y | echo x becomes echo y \| echo x."

The question remains: Did you really turn off safe-mode in php.ini and
was it really turned off? (check with phpinfo())



Previous Comments:


[2008-04-24 19:48:19] twm at twmacinta dot com

Aha, that set off a spark.  I think I found something useful...

The test script actually worked when I tried this:

  ./configure --disable-all --disable-cgi

Then, I tried no flags at all, and it still worked:

  ./configure

So I went through all of the flags I used originally and discovered
that the problem appears when all I add is the safe-mode flag:

  ./configure --enable-safe-mode

Here's the output:


Before: 'Tim'\''s Test'
After: sh: line 1: /usr/local/php/bin/echo: No such file or directory


Note that it was looking for "echo" at a different path.  When I
created the directory that it was looking for and copied "echo" there,
then I got the same incorrect output as before:


Before: 'Tim'\''s Test'
After: Tim\s Test'


So the problem occurs when safe-mode is compiled into the executable
even though I am not using safe mode when running the script.  I'm using
"php -n" which should avoid safe mode (right?) and my "php.ini" also
turns safe mode off.  I checked the other versions of PHP which I
reported on earlier, and the versions which behaved incorrectly had safe
mode compiled in but turned off, and those that behaved correctly did
not have safe mode compiled in at all.



[2008-04-24 18:01:39] [EMAIL PROTECTED]

Can you try with this instead:

# rm -f config.cache
# ./configure --disable-all --disable-cgi

ie. Eliminate everything but the core. :)



[2008-04-24 17:52:47] twm at twmacinta dot com

I was actually using the "-n" flag from the start, so that moving part
was already eliminated.

Here are my "./configure" and "make install" commands:



CONF_OLD_PREFIX=/usr
CONF_PREFIX=/var/tmp2/php5_take2/targ
CONF_SYSCONFDIR=${CONF_PREFIX}/etc
CONF_BINDIR=${CONF_PREFIX}/bin
./configure \
--prefix=${CONF_PREFIX} \
--with-config-file-path=${CONF_SYSCONFDIR} \
--enable-force-cgi-redirect \
--enable-fastcgi \
--disable-debug \
--enable-pic \
--disable-rpath \
--enable-inline-optimization \
--with-bz2 \
--with-curl \
--with-dom=${CONF_PREFIX} \
--with-exec-dir=${CONF_BINDIR} \
--with-freetype-dir=${CONF_PREFIX} \
--with-png-dir=${CONF_PREFIX} \
--with-gd \
--enable-gd-native-ttf \
--with-ttf \
--with-gdbm \
--with-gettext \
--with-db4 \
--with-ncurses \
--with-gmp \
--with-iconv \
--with-jpeg-dir=${CONF_PREFIX} \
--with-mm \
--with-openssl \
--with-png \
--with-pspell \
--with-regex=system \
--with-xml \
--with-domxml \
--with-expat-dir=${CONF_PREFIX} \
--with-zlib \
--with-layout=GNU \
--enable-mcal \
--enable-bcmath \
--enable-debugger \
--enable-exif \
--enable-ftp \
--enable-magic-quotes \
--enable-safe-mode \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-discard-path \
--enable-track-vars \
--enable-trans-sid \
--enable-yp \
--enable-wddx \
--without-oci8 \
--with-imap=shared \
--with-mcrypt \
--with-imap-ssl \
--with-kerberos=/usr/kerberos \
--with-ldap=shared \
--with-mysql=shared,${CONF_PREFIX} \
--with-pgsql=shared \
--with-snmp=shared,${CONF_PREFIX} \
--with-snmp=shared \
--enable-net-snmp-hack \
--with-unixODBC=shared,${CONF_OLD_PREFIX} \
--enable-memory-limit \
--enable-bcmath \
--enable-shmop \
--enable-versioning \
--enable-calendar \
--enable-dbx \
--enable-dio \
--enable-mbstring \
--enable-mbstr-enc-trans
make install INSTALL_ROOT=/var/tmp2/php5_take2/targ



[2008-04-24 17:44:49] [EMAIL PROTECTED]

Next obvious question is: How did you build P

#44826 [Ctl->Bgs]: echo (float)1200000;

2008-04-25 Thread jani
 ID:   44826
 Updated by:   [EMAIL PROTECTED]
 Reported By:  marfinal at gmail dot com
-Status:   Critical
+Status:   Bogus
 Bug Type: Math related
 Operating System: Windows XP
 PHP Version:  5.2.5
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Please don't report this same issue for the nth time..


Previous Comments:


[2008-04-25 05:28:50] marfinal at gmail dot com

Description:

windows xp(jp)

the output float variable is different in PHP4 and PHP5. 



Reproduce code:
---
echo (float)120;

Expected result:

PHP4:
120

Actual result:
--
PHP5.2.5:
1.2E+6






-- 
Edit this bug report at http://bugs.php.net/?id=44826&edit=1



#44833 [NEW]: inconsistent operator 'or'

2008-04-25 Thread vmarsik at suse dot cz
From: vmarsik at suse dot cz
Operating system: SuSE Linux
PHP version:  5.2.5
PHP Bug Type: Unknown/Other Function
Bug description:  inconsistent operator 'or'

Description:

$result = mysql_query($sql) or die( mysql_error() );
- works OK

$result = mysql_query($sql) or return( null );
- Parse error: syntax error, unexpected T_RETURN in xx.php on line 24

$result = mysql_query($sql) or $ret = null;
- works OK

$result = mysql_query($sql) or { $ret = null; return $ret; };
- Parse error: syntax error, unexpected '{' in xx.php on line 24

The second version should behave exactly as the first one.
The fourth probably as well.
Also applies to '||', which behaves exactly as 'or'.


-- 
Edit bug report at http://bugs.php.net/?id=44833&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44833&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44833&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44833&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44833&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44833&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44833&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44833&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44833&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44833&r=support
Expected behavior:http://bugs.php.net/fix.php?id=44833&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44833&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44833&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44833&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44833&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44833&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44833&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44833&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44833&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44833&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44833&r=mysqlcfg



#44462 [Com]: Can't compile embed sapi on OSX

2008-04-25 Thread cthompson at nexopia dot com
 ID:   44462
 Comment by:   cthompson at nexopia dot com
 Reported By:  graham+php at nexopia dot com
 Status:   Open
 Bug Type: Compile Failure
 Operating System: OSX
 PHP Version:  5.2CVS-2008-03-18
 New Comment:

I just sent the following to the php-install mailing list for
feedback.

Modify php-5.2.5/Zend/zend_ini_scanner.c:

--- /Users/cthompson/php-5.2.5.clean/Zend/zend_ini_scanner.c   
2007-11-08 09:36:37.0 -0600
+++ ./zend_ini_scanner.c2008-04-25 10:16:27.0 -0600
@@ -478,7 +478,7 @@
 #define yymore() yymore_used_but_not_detected
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
+//char *yytext;
 #define INITIAL 0
 /*

+--+


Modify php-5.2.5/Zend/zend_language_scanner.c:
--- /Users/cthompson/php-5.2.5.clean/Zend/zend_language_scanner.c
2007-11-08 09:36:37.0 -0600
+++ ./zend_language_scanner.c2008-04-25 10:17:15.0 -0600
@@ -3009,7 +3009,7 @@
 #define yymore() (yy_more_flag = 1)
 #define YY_MORE_ADJ yy_more_len
 #define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
+//char *yytext;
 #define INITIAL 0

 /*


This REMOVES the definition of yytext.  I think this is okay because
the various defines in those files actually end up using the yy_text in
zend_global.h, at least as far as I can see.

Certainly, this allows PHP to compile but I am not at all sure if this
is going to cause other problems.  Could someone please give me some
feedback?


Additionally, I believe php-5.2.5/sapi/cli/config.m4 should be modified
to compile using libtool on OS X:
--- /Users/cthompson/php-5.2.5.clean/sapi/cli/config.m42007-07-11
17:20:36.0 -0600
+++ ./config.m42008-04-25 11:51:57.0 -0600
@@ -17,7 +17,7 @@
 BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg
\`echo \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) | sed
's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") ||
(\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) {
print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC)
-export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS)
\$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym
\$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS)
\$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
 ;;
   *darwin*)
-BUILD_CLI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS)
\$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS)
\$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS)
\$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
+BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) \$(CFLAGS_CLEAN)
\$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS)
\$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS)
\$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
 ;;
   *netware*)
 BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic
\$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS)
\$(PHP_RPATHS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS)
-Lnetware -lphp5lib -o \$(SAPI_CLI_PATH)"


Of course, the shipping version of PHP 5.2.5 would then also need the
php-5.2.5/configure file changing, though presumably this is
autogenerated from the fragments:
--- /Users/cthompson/php-5.2.5.clean/configure2007-11-08
09:36:28.0 -0600
+++ ./configure2008-04-25 11:27:46.0 -0600
@@ -9180,7 +9180,7 @@
 BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg
\`echo \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) | sed
's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") ||
(\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) {
print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC)
-export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS)
\$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym
\$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS)
\$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
 ;;
   *darwin*)
-BUILD_CLI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS)
\$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS)
\$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS)
\$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
+BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) \$(CFLAGS_CLEAN)
\$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS)
\$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS)
\$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
 ;;
   *netware*)
 BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic
\$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS)
\$(PHP_RPATHS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS)
-Lnetware -lphp5lib -o \$(SAPI_CLI_PATH)"



Again, I really welcome feedback on this.


Previous Comments:


[2008-04-25 15:00:36] cthompson at nexopia dot 

#44824 [Fbk->Opn]: parse error from comment string

2008-04-25 Thread pfenderd at bellsouth dot net
 ID:   44824
 User updated by:  pfenderd at bellsouth dot net
 Reported By:  pfenderd at bellsouth dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: windows XP Pro
 PHP Version:  5.2.5
 New Comment:

I tried the latest CVS snapshot (4/24) and did not see the problem.


Previous Comments:


[2008-04-24 21:48:27] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2008-04-24 20:46:30] pfenderd at bellsouth dot net

Description:

The PHP parser produced output to the web page starting in the middle
of a multi-line comment.  The trigger was a '>' at the end of a line of
comment text.  All text after that character became output, even though
it was within the  tags.

There were two email addresses, but the problem began at the end of the
second email address string.  (see example below)

I previously used this code in PHP 5.1.6 with no problem.
The code was included from a file with a require_once statement.
(The names in the example are fictitious.)

Reproduce code:
---
http://www.abcdefgh.se/)
 * for letting this code out in the free where it belongs!
 *
 * Contributions made by:
 * Jorge Lopez <[EMAIL PROTECTED]>
 *
 * @author Robert "Littleguy" Shubert <[EMAIL PROTECTED]>
 * @version 0.1
 * @package AB-XYZ
 */
?>


Expected result:

No output.

The parser should not have stopped parsing PHP code until the ?> string
was reached.

Actual result:
--
 * @version 0.1
 * @package AB-XYZ
 */
?>
Error undefined class 





-- 
Edit this bug report at http://bugs.php.net/?id=44824&edit=1



#44833 [Opn->Bgs]: inconsistent operator 'or'

2008-04-25 Thread colder
 ID:   44833
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vmarsik at suse dot cz
-Status:   Open
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: SuSE Linux
 PHP Version:  5.2.5
 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.

return( null ) is not a value, it can't be used as one in a logical
expression.


Previous Comments:


[2008-04-25 16:42:00] vmarsik at suse dot cz

Description:

$result = mysql_query($sql) or die( mysql_error() );
- works OK

$result = mysql_query($sql) or return( null );
- Parse error: syntax error, unexpected T_RETURN in xx.php on line 24

$result = mysql_query($sql) or $ret = null;
- works OK

$result = mysql_query($sql) or { $ret = null; return $ret; };
- Parse error: syntax error, unexpected '{' in xx.php on line 24

The second version should behave exactly as the first one.
The fourth probably as well.
Also applies to '||', which behaves exactly as 'or'.






-- 
Edit this bug report at http://bugs.php.net/?id=44833&edit=1



#44835 [NEW]: DBLIB driver - Weird NULL behavior

2008-04-25 Thread alexandre at gaigalas dot net
From: alexandre at gaigalas dot net
Operating system: SuSE Enterprise
PHP version:  5.2.5
PHP Bug Type: PDO related
Bug description:  DBLIB driver - Weird NULL behavior

Description:

Fetching data on BIT columns with NULL values return 0 (zero) instead of
NULL.

Reproduce code:
---
query("SELECT CONVERT(BIT,NULL) AS
THIS_MUST_BE_BLANK")->fetch(PDO::FETCH_ASSOC));

Expected result:

Array ( [THIS_MUST_BE_BLANK] =>  )

Actual result:
--
Array ( [THIS_MUST_BE_BLANK] => 0 )

-- 
Edit bug report at http://bugs.php.net/?id=44835&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44835&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44835&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44835&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44835&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44835&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44835&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44835&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44835&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44835&r=support
Expected behavior:http://bugs.php.net/fix.php?id=44835&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44835&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44835&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44835&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44835&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44835&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44835&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44835&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44835&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44835&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44835&r=mysqlcfg



#44824 [Opn->Csd]: parse error from comment string

2008-04-25 Thread jani
 ID:   44824
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pfenderd at bellsouth dot net
-Status:   Open
+Status:   Closed
 Bug Type: Compile Failure
 Operating System: windows XP Pro
 PHP Version:  5.2.5


Previous Comments:


[2008-04-25 18:10:52] pfenderd at bellsouth dot net

I tried the latest CVS snapshot (4/24) and did not see the problem.



[2008-04-24 21:48:27] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2008-04-24 20:46:30] pfenderd at bellsouth dot net

Description:

The PHP parser produced output to the web page starting in the middle
of a multi-line comment.  The trigger was a '>' at the end of a line of
comment text.  All text after that character became output, even though
it was within the  tags.

There were two email addresses, but the problem began at the end of the
second email address string.  (see example below)

I previously used this code in PHP 5.1.6 with no problem.
The code was included from a file with a require_once statement.
(The names in the example are fictitious.)

Reproduce code:
---
http://www.abcdefgh.se/)
 * for letting this code out in the free where it belongs!
 *
 * Contributions made by:
 * Jorge Lopez <[EMAIL PROTECTED]>
 *
 * @author Robert "Littleguy" Shubert <[EMAIL PROTECTED]>
 * @version 0.1
 * @package AB-XYZ
 */
?>


Expected result:

No output.

The parser should not have stopped parsing PHP code until the ?> string
was reached.

Actual result:
--
 * @version 0.1
 * @package AB-XYZ
 */
?>
Error undefined class 





-- 
Edit this bug report at http://bugs.php.net/?id=44824&edit=1



#44283 [Opn->Asn]: After mysql_close () "Invalid pointer" and "Segmentation fault"

2008-04-25 Thread jani
 ID:   44283
 Updated by:   [EMAIL PROTECTED]
 Reported By:  izh1979 at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: MySQL related
 Operating System: Linux 2.6.23.15-137.fc8
 PHP Version:  5.2CVS-2008-02-28
-Assigned To:  
+Assigned To:  andrey
 New Comment:

Assigned to Andrey (so he won't forget..:)


Previous Comments:


[2008-03-25 19:58:25] izh1979 at gmail dot com

==30123== Memcheck, a memory error detector.
==30123== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et
al.
==30123== Using LibVEX rev 1732, a library for dynamic binary
translation.
==30123== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==30123== Using valgrind-3.2.3, a dynamic binary instrumentation
framework.
==30123== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==30123==
--30123-- Command line
--30123--sapi/cli/php
--30123---n
--30123--/home/user/www/t.php
--30123-- Startup, with flags:
--30123---v
--30123----leak-check=full
--30123-- Contents of /proc/version:
--30123--   Linux version 2.6.23.15-137.fc8
([EMAIL PROTECTED]) (gcc version 4.1.2 20070925
(Red Hat 4.1.2-33)) #1 SMP Sun Feb 10 17:48:34 EST 2008
--30123-- Arch and hwcaps: X86, x86-sse1-sse2
--30123-- Page sizes: currently 4096, max supported 4096
--30123-- Valgrind library directory: /usr/lib/valgrind
--30123-- Reading syms from /lib/ld-2.7.so (0x911000)
--30123-- Reading syms from /home/bsg/php5.2-200802281530/sapi/cli/php
(0x8048000)
--30123-- Reading syms from /usr/lib/valgrind/x86-linux/memcheck
(0x3800)
--30123--object doesn't have a dynamic symbol table
--30123-- Reading suppressions file: /usr/lib/valgrind/default.supp
--30123-- REDIR: 0x926BB0 (index) redirected to 0x38027F5F
(vgPlain_x86_linux_REDIR_FOR_index)
--30123-- Reading syms from
/usr/lib/valgrind/x86-linux/vgpreload_core.so (0x4001000)
--30123-- Reading syms from
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so (0x4003000)
==30123== WARNING: new redirection conflicts with existing -- ignoring
it
--30123-- new: 0x00926BB0 (index ) R-> 0x04006230 index
--30123-- REDIR: 0x926D50 (strlen) redirected to 0x40062E0 (strlen)
--30123-- Reading syms from /lib/libcrypt-2.7.so (0x3ED)
--30123-- Reading syms from
/usr/local/mysql/lib/mysql/libmysqlclient.so.15.0.0 (0x4024000)
--30123-- Reading syms from /lib/libz.so.1.2.3 (0xAD8000)
--30123--object doesn't have a symbol table
--30123-- Reading syms from /lib/libresolv-2.7.so (0x4088000)
--30123-- Reading syms from /lib/libm-2.7.so (0xA92000)
--30123-- Reading syms from /lib/libdl-2.7.so (0xA8B000)
--30123-- Reading syms from /lib/libnsl-2.7.so (0x734000)
--30123-- Reading syms from /lib/libc-2.7.so (0x93)
--30123-- REDIR: 0x9A04C0 (rindex) redirected to 0x4006110 (rindex)
--30123-- REDIR: 0x9A13A0 (memset) redirected to 0x4006640 (memset)
--30123-- REDIR: 0x9A1890 (memcpy) redirected to 0x4007090 (memcpy)
--30123-- REDIR: 0x99B810 (calloc) redirected to 0x40047CD (calloc)
--30123-- REDIR: 0x99BB00 (malloc) redirected to 0x40054A0 (malloc)
--30123-- REDIR: 0x9A0120 (strlen) redirected to 0x40062C0 (strlen)
--30123-- REDIR: 0x9A0310 (strncmp) redirected to 0x4006320 (strncmp)
--30123-- REDIR: 0x99D060 (free) redirected to 0x40050BA (free)
--30123-- REDIR: 0x99FBC0 (strcmp) redirected to 0x4006390 (strcmp)
--30123-- REDIR: 0x99FA50 (index) redirected to 0x4006200 (index)
--30123-- REDIR: 0x9A2220 (strchrnul) redirected to 0x40066F0
(strchrnul)
--30123-- REDIR: 0x9A1400 (mempcpy) redirected to 0x4006B70 (mempcpy)
--30123-- REDIR: 0x9A1590 (stpcpy) redirected to 0x4006850 (stpcpy)
--30123-- REDIR: 0x99FC30 (strcpy) redirected to 0x40072F0 (strcpy)
--30123-- REDIR: 0x9A0EA0 (memchr) redirected to 0x40064B0 (memchr)
--30123-- REDIR: 0x99D250 (realloc) redirected to 0x400554F (realloc)
--30123-- REDIR: 0x99F8A0 (strcat) redirected to 0x40073E0 (strcat)
--30123-- Reading syms from /lib/libnss_files-2.7.so (0x43DB000)
--30123-- REDIR: 0x9A2150 (rawmemchr) redirected to 0x4006720
(rawmemchr)
==30123== Invalid write of size 1
==30123==at 0x400665C: memset (mc_replace_strmem.c:490)
==30123==by 0x4055499: mysql_init (in
/usr/local/mysql/lib/mysql/libmysqlclient.so.15.0.0)
==30123==by 0x8093614: php_mysql_do_connect (php_mysql.c:748)
==30123==by 0x80939A9: zif_mysql_connect (php_mysql.c:805)
==30123==by 0x81C0F1B: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:200)
==30123==by 0x81C67C6: ZEND_DO_FCALL_SPEC_CONST_HANDLER
(zend_vm_execute.h:1682)
==30123==by 0x81C0A7C: execute (zend_vm_execute.h:92)
==30123==by 0x819B94E: zend_execute_scripts (zend.c:1134)
==30123==by 0x814A21A: php_execute_script (main.c:2006)
==30123==by 0x8218788: main (php_cli.c:1140)
==30123==  Address 0x43FA54C is 0 bytes after a block of size 548
alloc'd
==30123==at 0x4005525: malloc (vg_replace_malloc.c:149)
==30123==by 0x817E2

#32133 [Com]: Failed create COM object

2008-04-25 Thread webmaster at zeninmotion dot com
 ID:   32133
 Comment by:   webmaster at zeninmotion dot com
 Reported By:  fLAre_Dra_X at yahoo dot com
 Status:   No Feedback
 Bug Type: COM related
 Operating System: Windows XP SP 2
 PHP Version:  5.0.1
 New Comment:

I had the same issue, solved it using this guide:

http://figured-it-out.com/figured-out.php?sid=24


Previous Comments:


[2007-11-06 12:32:05] taylor dot ren at gmail dot com

Acknowledged that the above solution works fine in Vista. 

But there is a new error message when I tried: 

$doc=$word->Documents->Add();

it says: 

Word is unable to trigger event. 

I have Office 2003 installed. I guess it is due to the Add method is
not the corrrect method name. Any hints?



[2006-01-03 13:31:17] ozovadia at hotmail dot com

Here is a possible solution:
Verify that the user has the appropriate permissions to start the DCOM
server. 
1. In the Control Panel, double-click Administrative Tools, and then
double-click Component Services. 
2. In the Component Services snap-in, expand Computers, expand My
Computer, and double-click DCOM Config. 
3. In the right pane, locate the program you are trying to create. 
4. Right-click the program name, and then select Properties. On the
Security tab, in the Launch and Activation Permissions group box, select
Customize, and then click Edit.
5. Add the user (e.g. running the IIS server) to the permissions list,
and give the user the appropriate permissions.

That should do it.



[2006-01-03 12:06:55] ozovadia at hotmail dot com

Installed the latest version (5.1.1.1) and still experiencing the same
problem.



[2005-03-20 18:10:26] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2005-02-28 19:58:40] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip





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/32133

-- 
Edit this bug report at http://bugs.php.net/?id=32133&edit=1



#44836 [NEW]: [PATCH] Avoid direct reference of environ in POSIX systems

2008-04-25 Thread delphij at FreeBSD dot org
From: delphij at FreeBSD dot org
Operating system: FreeBSD 7.0
PHP version:  5.2.5
PHP Bug Type: Reproducible crash
Bug description:  [PATCH] Avoid direct reference of environ in POSIX systems

Description:

PHP would crash in certain cases where putenv() is being called, in POSIX
systems which calls free() in putenv().

The following patch always duplicate the environment from the environment
instead of relying on that they are invariant.

--- ext/standard/basic_functions.c.orig 2008-04-25 16:26:14.885468614
-0700
+++ ext/standard/basic_functions.c  2008-04-25 16:32:46.215744075 -0700
@@ -3861,9 +3862,7 @@
SetEnvironmentVariable(pe->key, "bugbug");
 #endif
putenv(pe->previous_value);
-# if defined(PHP_WIN32)
efree(pe->previous_value);
-# endif
} else {
 # if HAVE_UNSETENV
unsetenv(pe->key);
@@ -4463,12 +4462,8 @@
pe.previous_value = NULL;
for (env = environ; env != NULL && *env != NULL; env++) {
if (!strncmp(*env, pe.key, pe.key_len) && 
(*env)[pe.key_len] == '=')
{   /* found it */
-#if defined(PHP_WIN32)
/* must copy previous value because MSVCRT's 
putenv can free the
string without notice */
pe.previous_value = estrdup(*env);
-#else
-   pe.previous_value = *env;
-#endif
break;
}
}



-- 
Edit bug report at http://bugs.php.net/?id=44836&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44836&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44836&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44836&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44836&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44836&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44836&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44836&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44836&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44836&r=support
Expected behavior:http://bugs.php.net/fix.php?id=44836&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44836&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44836&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44836&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44836&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44836&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44836&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44836&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44836&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44836&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44836&r=mysqlcfg



#44837 [NEW]: memory leaks

2008-04-25 Thread liviu dot macoviciuc at gmail dot com
From: liviu dot macoviciuc at gmail dot com
Operating system: windows 2000 sp 4
PHP version:  5.2.5
PHP Bug Type: Performance problem
Bug description:  memory leaks

Description:

I am using Php 5.2.1 on Windows 2000 SP 4 with all updates,Apache 2.2.4
and Mysql 5.0.45
I experience a memory leak of 1 giga per week-in fact 5 days -I am using
this configuration in a call center
I thought that APC is to blame .I disabled it but the problem persist
I know there was a similar bug report but that is now closed
I am wondering if , the fact that I don't call the function
mysql_free_result(), has any relevance


-- 
Edit bug report at http://bugs.php.net/?id=44837&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44837&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44837&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44837&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44837&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44837&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44837&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44837&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44837&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44837&r=support
Expected behavior:http://bugs.php.net/fix.php?id=44837&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44837&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44837&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44837&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44837&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44837&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44837&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44837&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44837&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44837&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44837&r=mysqlcfg