Bug #65796 [Com]: mkdir creates folders with wrong permissions

2013-10-02 Thread leight+bugs dot php at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=65796edit=1

 ID: 65796
 Comment by: leight+bugs dot php at gmail dot com
 Reported by:cmfcmf dot flach at gmail dot com
 Summary:mkdir creates folders with wrong permissions
 Status: Not a bug
 Type:   Bug
 Package:Directory function related
 Operating System:   Linux/Ubuntu 13.4
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

I suspect your umask is 022. The manual states that the mode is modified by 
your current umask. Try a umask(0) and see if it is still an issue.


Previous Comments:

[2013-10-01 09:53:40] m...@php.net

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

Check your umask.


[2013-10-01 09:48:19] d...@php.net

I get the same on PHP 5.5.3. chmod('test', 0777) then transforms the directory 
to 
the right chmod.


[2013-10-01 09:44:10] cmfcmf dot flach at gmail dot com

Description:

Creating a directory using mkdir() does not respect the permissions given.

Test script:
---
?php

// Create a folder with 0777 permissions.
mkdir('test', 0777);

// Should be 0777, but is 0755.
echo substr(sprintf('%o', fileperms('test')), -4);

Expected result:

I expect the folder to be created with 0777 permission.

Actual result:
--
The folder is created with 0755 permission.






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


Bug #65647 [Com]: @list call behaves incorrectly and may cause Segmentation fault (11)

2013-09-10 Thread leight+bugs dot php at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=65647edit=1

 ID: 65647
 Comment by: leight+bugs dot php at gmail dot com
 Reported by:piotr dot m at shwrm dot com
 Summary:@list call behaves incorrectly and may cause
 Segmentation fault (11)
 Status: Open
 Type:   Bug
 Package:*General Issues
 Operating System:   Linux / Ubuntu 13.04
 PHP Version:5.5.3
 Block user comment: N
 Private report: N

 New Comment:

Unable to reproduce with 5.5.3 or 5.6.0-dev on Debian 7 or OSX using PHP CLI 
(unable to test with Apache at present).

Piotr do you get the same results using the CLI? What other modules do you have 
loaded?

A backtrace of the coredump might also be useful.


Previous Comments:

[2013-09-10 09:21:08] piotr dot m at shwrm dot com

Description:

Call to @list on an array returned by function_get_args() will incorrectly fill 
variables (only last one is filled) 80% of the time and will cause a 
Segmentation fault (11) on the other 20%.

PHP 5.5.3 run on Apache 2.2.22

Test script:
---
function a() {
$opts = func_get_args();
@list($a, $b, $c) = $opts;
var_dump($a, $b, $c);
}

a('1','22', '333');

Expected result:

string '1' (length=1)

string '22' (length=2)

string '333' (length=3)


Actual result:
--
null

null

string '333' (length=3)

Or segfault:
[Tue Sep 10 10:57:46 2013] [notice] child pid 32315 exit signal Segmentation 
fault (11), possible coredump in /etc/apache2







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