[PHP-BUG] Bug #53204 [NEW]: IF Statement Long String

2010-10-29 Thread diemuzi at gmail dot com
From: 
Operating system: Archlinux
PHP version:  5.3.3
Package:  Unknown/Other Function
Bug Type: Bug
Bug description:IF Statement Long String

Description:

I was testing long strings of numbers against an IF statement (see test)
script and it was outputting information which was not true.

Test script:
---
This works:



$o = 33;

if ($o >= 29 && $o <= 32)

{

echo "true";

} else {

echo "false";

}



This does not work:



$o = 336571324099282374385465584513479344133;

if ($o >= 336571324099282374385465584513479344129 && $o <=
336571324099282374385465584513479344132)

{

echo "true";

} else {

echo "false";

}

Expected result:

In the working example, the output should be false. This is working as
expected.



In the non-working example, the output should be false. However, it is
returning true.


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



Bug #52710 [Fbk->Csd]: Session Disappears

2010-09-07 Thread diemuzi at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=52710&edit=1

 ID: 52710
 User updated by:diemuzi at gmail dot com
 Reported by:diemuzi at gmail dot com
 Summary:Session Disappears
-Status: Feedback
+Status: Closed
 Type:   Bug
 Package:FPM related
 Operating System:   Archlinux
 PHP Version:5.3.3
 Assigned To:fat
 Block user comment: N

 New Comment:

Closing, not related with FPM. This was bad timing the issue presented
itself once FPM was compiled and used.


Previous Comments:

[2010-08-26 22:38:44] f...@php.net

HUm well I'm using a quite similar configuration and it works without
any 

problems.



Can you strace the child process when the problem occurs and report the
returned 

result please ?



strace -p PID -s 1024 -o /tmp/strace.fpm.log


[2010-08-26 22:31:28] diemuzi at gmail dot com

#

# php-fpm.conf

#



; FPM Configuration ;

;



; All relative paths in this configuration file are relative to PHP's
install

; prefix.



; Include one or more files. If glob(3) exists, it is used to include a
bunch of

; files from a glob(3) pattern. This directive can be used everywhere in
the

; file.

include=/usr/local/etc/fpm.d/*.conf



;;

; Global Options ;

;;



[global]

; Pid file

; Default Value: none

pid = /var/run/php-fpm.pid



; Error log file

; Default Value: /usr/local/var/log/php-fpm.log

error_log = /var/log/php-fpm.log



; Log level

; Possible Values: alert, error, warning, notice, debug

; Default Value: notice

log_level = notice



; If this number of child processes exit with SIGSEGV or SIGBUS within
the time

; interval set by emergency_restart_interval then FPM will restart. A
value

; of '0' means 'Off'.

; Default Value: 0

;emergency_restart_threshold = 1



; Interval of time used by emergency_restart_interval to determine when

; a graceful restart will be initiated.  This can be useful to work
around

; accidental corruptions in an accelerator's shared memory.

; Available Units: s(econds), m(inutes), h(ours), or d(ays)

; Default Unit: seconds

; Default Value: 0

;emergency_restart_interval = 1



; Time limit for child processes to wait for a reaction on signals from
master.

; Available units: s(econds), m(inutes), h(ours), or d(ays)

; Default Unit: seconds

; Default Value: 0

;process_control_timeout = 1



; Send FPM to background. Set to 'no' to keep FPM in foreground for
debugging.

; Default Value: yes

daemonize = no





#

# admin.conf (included by php-fpm.conf)

#



[admin]

listen = /tmp/fcgi_ipc/php-fpm.sock

listen.backlog = -1

listen.owner = apache

listen.group = apache

listen.mode = 0777

user = admin

group = admin

pm = dynamic

pm.max_children = 1

pm.start_servers = 1

pm.min_spare_servers = 1

pm.max_spare_servers = 1

pm.max_requests = 500

catch_workers_output = no



#

# Notes

#



I attempted to change the values of the servers thinking perhaps it had
something to do with that but no luck. As for php.ini they are default
values which comes packaged with PHP 5.3.3 just for sanity tests.



As an additional test a moment ago I switched back to FastCGI/CGI mode
without FPM support and as expected I did not encounter this situation.
If this is a configuration issue, I appologize for the bug report.


[2010-08-26 22:23:59] f...@php.net

Can you please provide you complete php-fpm.conf ?

--------------------
[2010-08-26 22:11:52] diemuzi at gmail dot com

Description:

It appears when running PHP 5.3.3 with FPM support sessions disappear on
almost every-other request. The session name stays the same, but any
application using a session returns a blank page until the page has been
refreshed again.



Currently I have the session.save_path to /tmp, I tested other locations
but the same issue. (This did not occur with FastCGI/CGI). As another
test I changed the location of the save_path and loaded a phpinfo()
script. It showed the corrected changed location, however upon refresh
it was changed back to /tmp. Another refresh and the location was again
changed to the path I specified. When the path changes, it does not
write a new session file in either location.



The error in the error log is always:

FastCGI: server stdeer: PHP Fatal error

session_start(); open(/tmp/session_name_here, O_RDWR) failed: Permission
denied(13) Array



Testing with random permissions ranging from 0644, 0666, 0755, 0777
return the same results. I also attempted to change the permissions to
the actual session file and the same results.




Bug #52710 [Fbk->Asn]: Session Disappears

2010-08-26 Thread diemuzi at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=52710&edit=1

 ID: 52710
 User updated by:diemuzi at gmail dot com
 Reported by:diemuzi at gmail dot com
 Summary:Session Disappears
-Status: Feedback
+Status: Assigned
 Type:   Bug
 Package:FPM related
 Operating System:   Archlinux
 PHP Version:5.3.3
 Assigned To:fat
 Block user comment: N

 New Comment:

#

# php-fpm.conf

#



; FPM Configuration ;

;



; All relative paths in this configuration file are relative to PHP's
install

; prefix.



; Include one or more files. If glob(3) exists, it is used to include a
bunch of

; files from a glob(3) pattern. This directive can be used everywhere in
the

; file.

include=/usr/local/etc/fpm.d/*.conf



;;

; Global Options ;

;;



[global]

; Pid file

; Default Value: none

pid = /var/run/php-fpm.pid



; Error log file

; Default Value: /usr/local/var/log/php-fpm.log

error_log = /var/log/php-fpm.log



; Log level

; Possible Values: alert, error, warning, notice, debug

; Default Value: notice

log_level = notice



; If this number of child processes exit with SIGSEGV or SIGBUS within
the time

; interval set by emergency_restart_interval then FPM will restart. A
value

; of '0' means 'Off'.

; Default Value: 0

;emergency_restart_threshold = 1



; Interval of time used by emergency_restart_interval to determine when

; a graceful restart will be initiated.  This can be useful to work
around

; accidental corruptions in an accelerator's shared memory.

; Available Units: s(econds), m(inutes), h(ours), or d(ays)

; Default Unit: seconds

; Default Value: 0

;emergency_restart_interval = 1



; Time limit for child processes to wait for a reaction on signals from
master.

; Available units: s(econds), m(inutes), h(ours), or d(ays)

; Default Unit: seconds

; Default Value: 0

;process_control_timeout = 1



; Send FPM to background. Set to 'no' to keep FPM in foreground for
debugging.

; Default Value: yes

daemonize = no





#

# admin.conf (included by php-fpm.conf)

#



[admin]

listen = /tmp/fcgi_ipc/php-fpm.sock

listen.backlog = -1

listen.owner = apache

listen.group = apache

listen.mode = 0777

user = admin

group = admin

pm = dynamic

pm.max_children = 1

pm.start_servers = 1

pm.min_spare_servers = 1

pm.max_spare_servers = 1

pm.max_requests = 500

catch_workers_output = no



#

# Notes

#



I attempted to change the values of the servers thinking perhaps it had
something to do with that but no luck. As for php.ini they are default
values which comes packaged with PHP 5.3.3 just for sanity tests.



As an additional test a moment ago I switched back to FastCGI/CGI mode
without FPM support and as expected I did not encounter this situation.
If this is a configuration issue, I appologize for the bug report.


Previous Comments:

[2010-08-26 22:23:59] f...@php.net

Can you please provide you complete php-fpm.conf ?

----------------
[2010-08-26 22:11:52] diemuzi at gmail dot com

Description:

It appears when running PHP 5.3.3 with FPM support sessions disappear on
almost every-other request. The session name stays the same, but any
application using a session returns a blank page until the page has been
refreshed again.



Currently I have the session.save_path to /tmp, I tested other locations
but the same issue. (This did not occur with FastCGI/CGI). As another
test I changed the location of the save_path and loaded a phpinfo()
script. It showed the corrected changed location, however upon refresh
it was changed back to /tmp. Another refresh and the location was again
changed to the path I specified. When the path changes, it does not
write a new session file in either location.



The error in the error log is always:

FastCGI: server stdeer: PHP Fatal error

session_start(); open(/tmp/session_name_here, O_RDWR) failed: Permission
denied(13) Array



Testing with random permissions ranging from 0644, 0666, 0755, 0777
return the same results. I also attempted to change the permissions to
the actual session file and the same results.







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


[PHP-BUG] Bug #52710 [NEW]: Session Disappears

2010-08-26 Thread diemuzi at gmail dot com
From: 
Operating system: Archlinux
PHP version:  5.3.3
Package:  FPM related
Bug Type: Bug
Bug description:Session Disappears

Description:

It appears when running PHP 5.3.3 with FPM support sessions disappear on
almost every-other request. The session name stays the same, but any
application using a session returns a blank page until the page has been
refreshed again.



Currently I have the session.save_path to /tmp, I tested other locations
but the same issue. (This did not occur with FastCGI/CGI). As another test
I changed the location of the save_path and loaded a phpinfo() script. It
showed the corrected changed location, however upon refresh it was changed
back to /tmp. Another refresh and the location was again changed to the
path I specified. When the path changes, it does not write a new session
file in either location.



The error in the error log is always:

FastCGI: server stdeer: PHP Fatal error

session_start(); open(/tmp/session_name_here, O_RDWR) failed: Permission
denied(13) Array



Testing with random permissions ranging from 0644, 0666, 0755, 0777 return
the same results. I also attempted to change the permissions to the actual
session file and the same results.


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



#44010 [NEW]: Function: strstr() and stristr()

2008-01-31 Thread diemuzi at gmail dot com
From: diemuzi at gmail dot com
Operating system: Archlinux
PHP version:  5.2.5
PHP Bug Type: Strings related
Bug description:  Function: strstr() and stristr()

Description:

Using these two functions strstr() and stristr().

The bug occurs only while using "true" when cutting characters from a
string to return the value before the cut.

Reproduce code:
---
$email  = '[EMAIL PROTECTED]';
$domain = strstr($email, '@', true);
echo $domain;

Expected result:

name

Actual result:
--
Warning: Wrong parameter count for strstr()

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