#48908 [Com]: Cannot query smalldatetime type columns

2009-12-21 Thread php at mike2k dot com
 ID:   48908
 Comment by:   php at mike2k dot com
 Reported By:  aaron at aarondm dot com
 Status:   Open
 Bug Type: MSSQL related
 Operating System: ArchLinux
 PHP Version:  5.2.10
 New Comment:

Always repeatable.

This is an issue for us as well. The previous comment is from a Windows
user so they're probably able to leverage more native Windows MSSQL
libraries...

PHP 5.2.11, on Linux, using FreeTDS on CentOS 5.3 (or 5.4, not sure)
x86_64

The workaround is having to cast the column inside of the query. I will
try to post an example workaround query when I grab one from the dev
team.

Related Packages/versions of the driver, just in case:
freetds-devel-0.64-11.el5.centos
freetds-devel-0.64-6.el5
freetds-0.64-11.el5.centos
freetds-0.64-6.el5
unixODBC-2.2.11-7.1 (32 bit)
unixODBC-2.2.11-7.1 (64 bit)
unixODBC-devel-2.2.11-7.1 (32 bit)
unixODBC-devel-2.2.11-7.1 (64 bit)


Previous Comments:


[2009-07-16 16:14:14] aaron at aarondm dot com

I have run the same query on Windows Server 2003 (Enterprise Edition)
and this does not seem to be an issue. On windows it is able to fetch
the column data with no problems.



[2009-07-13 19:54:44] aaron at aarondm dot com

Description:

When trying to query a table, with a column whos type is
'smalldatetime', the code will result in a 500 Internal Error

Reproduce code:
---
Create table with the following columns


MY_TABLE

|(int) ID | (smalldatetime) MY_EXAMPLE |


Run:
$result = mssql_query("SELECT MY_EXAMPLE FROM MY_TABLE");

When you run that, you will get a:
500 Internal Server Error

On ArchLinux/Windows



Expected result:

No 500 Internal Server Error.

Should be able to query the database with no problems

Actual result:
--
500 Internal Server Error





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



#48908 [Com]: Cannot query smalldatetime type columns

2009-12-21 Thread php at mike2k dot com
 ID:   48908
 Comment by:   php at mike2k dot com
 Reported By:  aaron at aarondm dot com
 Status:   Open
 Bug Type: MSSQL related
 Operating System: ArchLinux
 PHP Version:  5.2.10
 New Comment:

Sample query/workaround:

old: SELECT acct_itm.cre_dtm AS cre_dtm
new: SELECT CONVERT(varchar(10),acct_itm.cre_dtm,120) AS cre_dtm

Not the most ideal. Might be a bug in the FreeTDS driver and not
something PHP can handle but has to pass upstream.


Previous Comments:


[2009-12-21 10:13:22] php at mike2k dot com

Always repeatable.

This is an issue for us as well. The previous comment is from a Windows
user so they're probably able to leverage more native Windows MSSQL
libraries...

PHP 5.2.11, on Linux, using FreeTDS on CentOS 5.3 (or 5.4, not sure)
x86_64

The workaround is having to cast the column inside of the query. I will
try to post an example workaround query when I grab one from the dev
team.

Related Packages/versions of the driver, just in case:
freetds-devel-0.64-11.el5.centos
freetds-devel-0.64-6.el5
freetds-0.64-11.el5.centos
freetds-0.64-6.el5
unixODBC-2.2.11-7.1 (32 bit)
unixODBC-2.2.11-7.1 (64 bit)
unixODBC-devel-2.2.11-7.1 (32 bit)
unixODBC-devel-2.2.11-7.1 (64 bit)



[2009-07-16 16:14:14] aaron at aarondm dot com

I have run the same query on Windows Server 2003 (Enterprise Edition)
and this does not seem to be an issue. On windows it is able to fetch
the column data with no problems.



[2009-07-13 19:54:44] aaron at aarondm dot com

Description:

When trying to query a table, with a column whos type is
'smalldatetime', the code will result in a 500 Internal Error

Reproduce code:
---
Create table with the following columns


MY_TABLE

|(int) ID | (smalldatetime) MY_EXAMPLE |


Run:
$result = mssql_query("SELECT MY_EXAMPLE FROM MY_TABLE");

When you run that, you will get a:
500 Internal Server Error

On ArchLinux/Windows



Expected result:

No 500 Internal Server Error.

Should be able to query the database with no problems

Actual result:
--
500 Internal Server Error





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



#42784 [NEW]: readdir() does not show single integer filenames

2007-09-27 Thread php at mike2k dot com
From: php at mike2k dot com
Operating system: Debian
PHP version:  5.2.4
PHP Bug Type: Directory function related
Bug description:  readdir() does not show single integer filenames

Description:

readdir() is working properly on other dirs, but on the dir with files "0"
"1" "2" etc, it doesn't seem to find the files.

the files have read permissions, as does the directory, there's no issues
there.


Reproduce code:
---
$dir = "somedirectory/foo/bar";
if(is_dir($dir)) {
$objdir = opendir($dir);
while($file = readdir($objdir)) {
var_dump($file);
...


Expected result:

produces this:

string(1) "."
string(2) ".."


Actual result:
--
however there are 6 files in the directory with single integer values:

linux01:~/data$ ls somedirectory/foo/bar
0  1  2  3  4  5

those are completely ignored it appears.


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


#42784 [Opn->Csd]: readdir() does not show single integer filenames

2007-09-27 Thread php at mike2k dot com
 ID:   42784
 User updated by:  php at mike2k dot com
 Reported By:  php at mike2k dot com
-Status:   Open
+Status:   Closed
 Bug Type: Directory function related
 Operating System: Debian
 PHP Version:  5.2.4
 New Comment:

it appears to be localized to my setup, but still can't figure out why
this is happening. it won't list any files in any of the subdirs, but
is_dir() passes and the directory is legit. weird.


Previous Comments:


[2007-09-27 22:23:04] php at mike2k dot com

Description:

readdir() is working properly on other dirs, but on the dir with files
"0" "1" "2" etc, it doesn't seem to find the files.

the files have read permissions, as does the directory, there's no
issues there.


Reproduce code:
---
$dir = "somedirectory/foo/bar";
if(is_dir($dir)) {
$objdir = opendir($dir);
while($file = readdir($objdir)) {
var_dump($file);
...


Expected result:

produces this:

string(1) "."
string(2) ".."


Actual result:
--
however there are 6 files in the directory with single integer values:

linux01:~/data$ ls somedirectory/foo/bar
0  1  2  3  4  5

those are completely ignored it appears.






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


#41621 [NEW]: Simple snippet of code consistently crashes FastCGI engines

2007-06-07 Thread php at mike2k dot com
From: php at mike2k dot com
Operating system: Ubuntu Edgy and CentOS Linux 2.6
PHP version:  5.2.3
PHP Bug Type: Scripting Engine problem
Bug description:  Simple snippet of code consistently crashes FastCGI engines

Description:

The simple code below somehow magically triggers a segfault.

PHP is compiled with

'./configure' '--enable-fastcgi' '--enable-discard-path'
'--enable-force-cgi-redirect' '--enable-cli'
 '--with-mysql' '--with-mysqli=/usr/bin/mysql_config' '--with-curl'
'--enable-mbstring' '--with-zlib' '--with-gd' '--enable
-track-vars' '--enable-inline-optimization' '--disable-rpath'
'--disable-ipv6' '--disable-debug' '--with-jpeg-dir=/usr' '--
with-png-dir=/usr' '--with-freetype-dir' '--enable-gd-native-ttf'
'--enable-shmop' '--with-xsl' '--enable-sockets' '--enabl
e-pcntl' '--with-mcrypt' '--with-bz2' '--enable-sqlite-utf8' '--with-tidy'
'--with-pcre-dir' '--enable-exif'

NO bytecode caches or optimizers currently running either.

Reproduce code:
---


Expected result:

Webserver returns a bad gateway 502 error.

This shows up in dmesg/system logs, one per request:

php-cgi[10541]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10546]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10548]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10535]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10596]: segfault at 007fbf3fff98 rip 006d7055 rsp
007fbf3fffa0 error 6


Actual result:
--
it's a pretty simple recursive function. no classes, nothing. putting that
code by itself in a file without any other code (includes, anything)
consistently crashes. hopefully it does for someone else who is more
skilled with the debugging process.


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


#41621 [Opn]: Simple snippet of code consistently crashes FastCGI engines

2007-06-07 Thread php at mike2k dot com
 ID:   41621
 User updated by:  php at mike2k dot com
 Reported By:  php at mike2k dot com
 Status:   Open
 Bug Type: Scripting Engine problem
-Operating System: Ubuntu Edgy and CentOS Linux 2.6
+Operating System: Ubuntu Edgy & CentOS / Linux 2.6
 PHP Version:  5.2.3
 New Comment:

I understand this code doesn't actually make sense, it's not finished.
But during the trial and erroring process is when I figured out it was
crashing. If anything it should execute and give me the wrong results,
show an error, or get caught in an infinite loop. Actually, the infinite
loop piece might be it.

Is there any way to trap this? Some sort of recursion limitation?

Now that I am looking at the online manual, this page
http://www.php.net/functions has the exact same concept.

However, the expected result would be that PHP kills it, at least with
a message.


Previous Comments:


[2007-06-07 09:16:51] php at mike2k dot com

Description:

The simple code below somehow magically triggers a segfault.

PHP is compiled with

'./configure' '--enable-fastcgi' '--enable-discard-path'
'--enable-force-cgi-redirect' '--enable-cli'
 '--with-mysql' '--with-mysqli=/usr/bin/mysql_config' '--with-curl'
'--enable-mbstring' '--with-zlib' '--with-gd' '--enable
-track-vars' '--enable-inline-optimization' '--disable-rpath'
'--disable-ipv6' '--disable-debug' '--with-jpeg-dir=/usr' '--
with-png-dir=/usr' '--with-freetype-dir' '--enable-gd-native-ttf'
'--enable-shmop' '--with-xsl' '--enable-sockets' '--enabl
e-pcntl' '--with-mcrypt' '--with-bz2' '--enable-sqlite-utf8'
'--with-tidy' '--with-pcre-dir' '--enable-exif'

NO bytecode caches or optimizers currently running either.

Reproduce code:
---


Expected result:

Webserver returns a bad gateway 502 error.

This shows up in dmesg/system logs, one per request:

php-cgi[10541]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10546]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10548]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10535]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10596]: segfault at 007fbf3fff98 rip 006d7055 rsp
007fbf3fffa0 error 6


Actual result:
--
it's a pretty simple recursive function. no classes, nothing. putting
that code by itself in a file without any other code (includes,
anything) consistently crashes. hopefully it does for someone else who
is more skilled with the debugging process.






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


#41621 [Fbk->Opn]: Simple snippet of code consistently crashes FastCGI engines

2007-06-07 Thread php at mike2k dot com
 ID:   41621
 User updated by:  php at mike2k dot com
 Reported By:  php at mike2k dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Ubuntu Edgy & CentOS / Linux 2.6
 PHP Version:  5.2.3
 New Comment:

this is the function again:



it is apparent that the issue is an infinite loop. i need to put the
uri_check() call inside of the file_exists() stuff.

the expected result would be a friendlier crash. something about a
maximum recursion limit reached (i thought that error already existed?)


Previous Comments:


[2007-06-07 09:28:29] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2007-06-07 09:22:05] php at mike2k dot com

I understand this code doesn't actually make sense, it's not finished.
But during the trial and erroring process is when I figured out it was
crashing. If anything it should execute and give me the wrong results,
show an error, or get caught in an infinite loop. Actually, the infinite
loop piece might be it.

Is there any way to trap this? Some sort of recursion limitation?

Now that I am looking at the online manual, this page
http://www.php.net/functions has the exact same concept.

However, the expected result would be that PHP kills it, at least with
a message.



[2007-06-07 09:16:51] php at mike2k dot com

Description:

The simple code below somehow magically triggers a segfault.

PHP is compiled with

'./configure' '--enable-fastcgi' '--enable-discard-path'
'--enable-force-cgi-redirect' '--enable-cli'
 '--with-mysql' '--with-mysqli=/usr/bin/mysql_config' '--with-curl'
'--enable-mbstring' '--with-zlib' '--with-gd' '--enable
-track-vars' '--enable-inline-optimization' '--disable-rpath'
'--disable-ipv6' '--disable-debug' '--with-jpeg-dir=/usr' '--
with-png-dir=/usr' '--with-freetype-dir' '--enable-gd-native-ttf'
'--enable-shmop' '--with-xsl' '--enable-sockets' '--enabl
e-pcntl' '--with-mcrypt' '--with-bz2' '--enable-sqlite-utf8'
'--with-tidy' '--with-pcre-dir' '--enable-exif'

NO bytecode caches or optimizers currently running either.

Reproduce code:
---


Expected result:

Webserver returns a bad gateway 502 error.

This shows up in dmesg/system logs, one per request:

php-cgi[10541]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10546]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10548]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10535]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10596]: segfault at 007fbf3fff98 rip 006d7055 rsp
007fbf3fffa0 error 6


Actual result:
--
it's a pretty simple recursive function. no classes, nothing. putting
that code by itself in a file without any other code (includes,
anything) consistently crashes. hopefully it does for someone else who
is more skilled with the debugging process.






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


#41621 [Bgs]: Simple snippet of code consistently crashes FastCGI engines

2007-06-07 Thread php at mike2k dot com
 ID:   41621
 User updated by:  php at mike2k dot com
 Reported By:  php at mike2k dot com
 Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Ubuntu Edgy & CentOS / Linux 2.6
 PHP Version:  5.2.3
 New Comment:

i am sorry, but what is not complete below?

that script right there is all you need.

i would appreciate this being filed as a feature request for graceful
handling of a recursion limit, now that i was able to determine it.


Previous Comments:


[2007-06-07 09:38:21] [EMAIL PROTECTED]

>this is the function again:
Thanks, but I asked for COMPLETE reproduce case.

>it is apparent that the issue is an infinite loop.
Then it's apparent that this is stack oveflow.




[2007-06-07 09:36:07] php at mike2k dot com

this is the function again:



it is apparent that the issue is an infinite loop. i need to put the
uri_check() call inside of the file_exists() stuff.

the expected result would be a friendlier crash. something about a
maximum recursion limit reached (i thought that error already existed?)



[2007-06-07 09:28:29] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2007-06-07 09:22:05] php at mike2k dot com

I understand this code doesn't actually make sense, it's not finished.
But during the trial and erroring process is when I figured out it was
crashing. If anything it should execute and give me the wrong results,
show an error, or get caught in an infinite loop. Actually, the infinite
loop piece might be it.

Is there any way to trap this? Some sort of recursion limitation?

Now that I am looking at the online manual, this page
http://www.php.net/functions has the exact same concept.

However, the expected result would be that PHP kills it, at least with
a message.

----

[2007-06-07 09:16:51] php at mike2k dot com

Description:

The simple code below somehow magically triggers a segfault.

PHP is compiled with

'./configure' '--enable-fastcgi' '--enable-discard-path'
'--enable-force-cgi-redirect' '--enable-cli'
 '--with-mysql' '--with-mysqli=/usr/bin/mysql_config' '--with-curl'
'--enable-mbstring' '--with-zlib' '--with-gd' '--enable
-track-vars' '--enable-inline-optimization' '--disable-rpath'
'--disable-ipv6' '--disable-debug' '--with-jpeg-dir=/usr' '--
with-png-dir=/usr' '--with-freetype-dir' '--enable-gd-native-ttf'
'--enable-shmop' '--with-xsl' '--enable-sockets' '--enabl
e-pcntl' '--with-mcrypt' '--with-bz2' '--enable-sqlite-utf8'
'--with-tidy' '--with-pcre-dir' '--enable-exif'

NO bytecode caches or optimizers currently running either.

Reproduce code:
---


Expected result:

Webserver returns a bad gateway 502 error.

This shows up in dmesg/system logs, one per request:

php-cgi[10541]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10546]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10548]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10535]: segfault at 007fbf3ffd48 rip 006d7055 rsp
007fbf3ffd50 error 6
php-cgi[10596]: segfault at 007fbf3fff98 rip 006d7055 rsp
007fbf3fffa0 error 6


Actual result:
--
it's a pretty simple recursive function. no classes, nothing. putting
that code by itself in a file without any other code (includes,
anything) consistently crashes. hopefully it does for someone else who
is more skilled with the debugging process.






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


Req #52052 [Com]: add syslog support to FPM

2011-02-15 Thread php at mike2k dot com
Edit report at http://bugs.php.net/bug.php?id=52052&edit=1

 ID: 52052
 Comment by:     php at mike2k dot com
 Reported by:ef-lists at email dot de
 Summary:add syslog support to FPM
 Status: Assigned
 Type:   Feature/Change Request
 Package:FPM related
 Operating System:   Linux/*NIX
 PHP Version:5.3SVN-2010-06-11 (SVN)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

I would log everything under a consistent ident/facility myself.



Then you have all FPM stuff coming in one stream. If you want to split
it up then 

you can use filters inside of whatever syslog tools you use.



$.02


Previous Comments:

[2011-02-15 19:42:45] kyle_leaders at mcgraw-hill dot com

As a small fix to this, I just noticed that in 5.3.5, PHP-FPM logs
correctly to 

the syslog, but the syslog tag is incorrect.



If for example you have a pool named "www" it will log to syslog like
so:

2011-02-15 13:28:09.172141-05:00 hostname w: PHP Warning:  ocierror()
expects 

parameter 1 to be resource, null given in filename.php on line 177



Similarly if you have a longer pool name (poolname) it'll show up like
so:

2011-02-15 13:28:09.172141-05:00 hostname olname: PHP Warning: 
ocierror() 

expects parameter 1 to be resource, null given in filename.php on line
177



It seems to be chopping off the first 2 characters of the pool name when
it 

reports the syslog tag/program name to syslog.


[2011-02-10 07:58:45] ef-lists at email dot de

Oh you're right. We're actually experiencing this issue here.



At least the master process should always log to the configured
ident/facility - that's configuration and process manager
warnings/errors. By far the most important log output from FPM, IMHO.



I don't think this is a critical issue for FPM, as log output is never
discarded and other sapis (milter, thttpd, mod_php with Apache ErrorLog
set to syslog) do it the same way - although it would be nice to see
this resolved. I still wonder how to properly do this... open a separate
socket and mimic syslog behaviour? How to address this on Windows?



If you have updates, I'd be really curious. If I can help, let me know.
:-)


[2011-01-29 15:46:44] f...@php.net

thx for the up to date patch. But there is still a remaining problem:



php_syslog(), openlog() and closelog() can be called from FPM code, core
code, 

user script, module, sapi, ... 



If two calls to openlog() are made from two different places. Then this
is not 

sure than php_syslog() will log the right ident and facility.



This a global reflection to make around PHP and not only in FPM.



I'm working on it.


[2011-01-28 15:53:44] ef-lists at email dot de

Hi,



added a new patch, which can be applied to a vanilla PHP 5.3.5.



compiles and runs with:

--enable-debug without relevant warnings

--enable-maintainer-zts

without other flags

with having HAVE_SYSLOG_H in main/php_config.h undefined



changes:

* modified patch to work with FPM in 5.3.5

* added new parameters to config dump (todo: translate syslog prio and
facility to nice human-readable values)

* made comparing syslog facilities case-insensitive

* replaced syslog() calls with php_syslog()



Regards,

Edgar


[2011-01-12 16:15:58] ef-lists at email dot de

Hi Jerome,



are there any updates on this issue yet? With PHP 5.3.4 and PHP 5.3.5
the latest patch doesn't work anymore.



I'd be willing to port it to the latest release, if you're interested.
I'd still like to see this integrated into trunk and 5.3.X.



Regards,

Edgar




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/bug.php?id=52052


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


Bug #45468 [Com]: Using mysqlnd defaults to using unix socket instead of localhost:port

2011-09-19 Thread php at mike2k dot com
Edit report at https://bugs.php.net/bug.php?id=45468&edit=1

 ID: 45468
 Comment by:     php at mike2k dot com
 Reported by:michael dot kofler at gmx dot com
 Summary:Using mysqlnd defaults to using unix socket instead
 of localhost:port
 Status: Closed
 Type:   Bug
 Package:MySQL related
 Operating System:   * (not win32)
 PHP Version:5.3CVS, 6CVS (2009-04-25)
 Assigned To:johannes
 Block user comment: N
 Private report: N

 New Comment:

Still an issue - even with mysqli.default_socket and mysql.default_socket set, 
it's still looking for /tmp/mysql.sock

It's not defined as that anywhere, phpinfo() shows that I am pointing to 
/var/lib/mysql/mysql.sock as well.

I don't want to do a symlink hack. I am running PHP 5.3.8 under FPM.

'./configure' '--prefix=/opt/php53' '--with-config-file-path=/opt/php53/etc' '--
with-config-file-scan-dir=/opt/php53/etc/conf.d' '--enable-fpm' '--with-
libdir=lib64' '--enable-cli' '--enable-inline-optimization' '--disable-rpath' '-
-disable-ipv6' '--with-gettext' '--with-readline' '--enable-mbstring' '--enable-
mbregex' '--enable-sqlite-utf8' '--with-gettext' '--enable-intl' '--with-
mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-curl' 
'--with-zlib' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-xpm-dir' '-
-with-freetype-dir' '--enable-gd-native-ttf' '--enable-exif=shared' '--enable-
shmop' '--with-xsl=shared' '--enable-soap=shared' '--with-mssql=shared' '--
enable-sockets' '--enable-pcntl=shared' '--with-mcrypt' '--with-bz2' '--with-
tidy=shared' '--with-pcre-dir' '--with-openssl' '--with-ldap=shared' '--with-
imap=shared' '--with-imap-ssl' '--with-kerberos' '--with-pear' '--with-gmp' '--
with-pdo-dblib' '--with-xmlrpc'


Previous Comments:

[2010-11-30 11:44:07] me dot deepa dot selvam at hotmail dot com

PHP Warning:  mysql_connect(): [2002] A connection attempt failed because the 
connected party did not  (trying to connect via tcp://localhost:3306) in 
C:\inetpub\wwwroot\test.php on line 3

I got this error on running my php file:test.php



I am working on windows 7 + IIS 7 + php 5.3.3 + MySQL 5.1.53

Someone please help me...


[2010-05-06 12:33:13] wolfgang_weber at gmx dot at

Sorry for double posting, but I'd like to add a quote:

"The default location for the Unix socket file that the server uses for 
communication with local clients is /tmp/mysql.sock. (For some distribution 
formats, the directory might be different, such as /var/lib/mysql for RPMs.)"

From: http://dev.mysql.com/doc/refman/5.1/en/problems-with-mysql-sock.html

Regards
Wolfgang


[2010-05-06 12:25:11] wolfgang_weber at gmx dot at

I don't know why this ticket has been closed as I am still affected from this 
bug.

PHP: 5.3.2 with mysqlnd and php-fpm patch from svn
MySQL: 5.1.46
OS: Centos 5.4 x86_64

Configure options:

--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-mysql-sock=/var/lib/mysql \

Tried to add a zone in ZoneAdmin, and this is a part from my error log:

[06-May-2010 12:08:39] PHP Warning:  mysql_connect(): [2002] No such file or 
directory (trying to connect via unix:///tmp/mysql.sock) in 
/var/www/tools/zoneadmin/includes/config.php on line 28

So why do you think that this is not a bug anymore?

Kind regards
Wolfgang Weber


[2009-08-27 10:35:27] and...@php.net

Closing this, as not a bug anymore


[2009-08-27 10:26:20] and...@php.net

Jani,
I think you are wrong :
andrey@winnie:/work/vanilla/php/php-src/branches/PHP_5_3$ ./php -r 
'$c=mysql_connect("localhost:3307");var_dump($c, $res=mysql_query("select 42", 
$c), mysql_fetch_assoc($res));'

Warning: mysql_connect(): Can't connect to local MySQL server through socket 
'/var/run/mysqld/mysqld.sock' (2) in Command line code on line 1

Warning: mysql_query() expects parameter 2 to be resource, boolean given in 
Command line code on line 1

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, null given in 
Command line code on line 1
bool(false)
NULL
NULL
-

Bug #45468 [Com]: Using mysqlnd defaults to using unix socket instead of localhost:port

2011-09-19 Thread php at mike2k dot com
Edit report at https://bugs.php.net/bug.php?id=45468&edit=1

 ID: 45468
 Comment by:     php at mike2k dot com
 Reported by:michael dot kofler at gmx dot com
 Summary:Using mysqlnd defaults to using unix socket instead
 of localhost:port
 Status: Closed
 Type:   Bug
 Package:MySQL related
 Operating System:   * (not win32)
 PHP Version:5.3CVS, 6CVS (2009-04-25)
 Assigned To:johannes
 Block user comment: N
 Private report: N

 New Comment:

okay - I just recompiled, and perhaps I didn't fully restart it last time. It 
*seems* to work now.

./configure \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
...

checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... 
/var/lib/mysql/mysql.sock
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
checking for MySQLi support... yes
...
checking for MySQL support for PDO... yes

it seems to work now. I think I forgot to restart FPM when I tried last. It was 
unclear in this bug report though what the fix seemed to be or when it happened 
:p


Previous Comments:

[2011-09-19 22:30:17] php at mike2k dot com

Still an issue - even with mysqli.default_socket and mysql.default_socket set, 
it's still looking for /tmp/mysql.sock

It's not defined as that anywhere, phpinfo() shows that I am pointing to 
/var/lib/mysql/mysql.sock as well.

I don't want to do a symlink hack. I am running PHP 5.3.8 under FPM.

'./configure' '--prefix=/opt/php53' '--with-config-file-path=/opt/php53/etc' '--
with-config-file-scan-dir=/opt/php53/etc/conf.d' '--enable-fpm' '--with-
libdir=lib64' '--enable-cli' '--enable-inline-optimization' '--disable-rpath' '-
-disable-ipv6' '--with-gettext' '--with-readline' '--enable-mbstring' '--enable-
mbregex' '--enable-sqlite-utf8' '--with-gettext' '--enable-intl' '--with-
mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-curl' 
'--with-zlib' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-xpm-dir' '-
-with-freetype-dir' '--enable-gd-native-ttf' '--enable-exif=shared' '--enable-
shmop' '--with-xsl=shared' '--enable-soap=shared' '--with-mssql=shared' '--
enable-sockets' '--enable-pcntl=shared' '--with-mcrypt' '--with-bz2' '--with-
tidy=shared' '--with-pcre-dir' '--with-openssl' '--with-ldap=shared' '--with-
imap=shared' '--with-imap-ssl' '--with-kerberos' '--with-pear' '--with-gmp' '--
with-pdo-dblib' '--with-xmlrpc'


[2010-11-30 11:44:07] me dot deepa dot selvam at hotmail dot com

PHP Warning:  mysql_connect(): [2002] A connection attempt failed because the 
connected party did not  (trying to connect via tcp://localhost:3306) in 
C:\inetpub\wwwroot\test.php on line 3

I got this error on running my php file:test.php



I am working on windows 7 + IIS 7 + php 5.3.3 + MySQL 5.1.53

Someone please help me...


[2010-05-06 12:33:13] wolfgang_weber at gmx dot at

Sorry for double posting, but I'd like to add a quote:

"The default location for the Unix socket file that the server uses for 
communication with local clients is /tmp/mysql.sock. (For some distribution 
formats, the directory might be different, such as /var/lib/mysql for RPMs.)"

From: http://dev.mysql.com/doc/refman/5.1/en/problems-with-mysql-sock.html

Regards
Wolfgang


[2010-05-06 12:25:11] wolfgang_weber at gmx dot at

I don't know why this ticket has been closed as I am still affected from this 
bug.

PHP: 5.3.2 with mysqlnd and php-fpm patch from svn
MySQL: 5.1.46
OS: Centos 5.4 x86_64

Configure options:

--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-mysql-sock=/var/lib/mysql \

Tried to add a zone in ZoneAdmin, and this is a part from my error log:

[06-May-2010 12:08:39] PHP Warning:  mysql_connect(): [2002] No such file or 
directory (trying to connect via unix:///tmp/mysql.sock) in 
/var/www/tools/zoneadmin/includes/config.php on line 28

So why do you think that this is not a bug anymore?

Kind regards
Wolfgang Weber


[2009-08-27 10:35:27] and...@php.net

Closing this, as not a bug anymore




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

https://bugs.php.net/bug.php?id=45468


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