php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76327 long path support not available for Windows Server 2008 r2 sp1-Apache restarted
Submitted: 2018-05-11 12:27 UTC Modified: 2018-05-23 10:59 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: tumul dot kumar at veneratech dot com Assigned:
Status: Not a bug Package: Apache related
PHP Version: 7.1.17 OS: Windows Server 2008 R2 SP1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tumul dot kumar at veneratech dot com
New email:
PHP Version: OS:

 

 [2018-05-11 12:27 UTC] tumul dot kumar at veneratech dot com
Description:
------------
I'm using Apache 2.4.29 (Win 64), Php 7.1.12. I'm unable to use php functions such as file_exists() for long file path (having length more than 259) Whereas it is feature of Php 7.1 which works fine with Windows 10.

Support must be in windows server 2008 r2 sp1 as it is not written anywhere that php 7.1 or Apache 2.4.29 (Win 64) don't support long file path feature for this window version.

Test script:
---------------
<?php

//You may give any long path having length of more than 259 characters

echo file_put_contents("C:\ProgramData\Pulsar\Jobs_Report\Pul0510_112_third - Copddddddddddddddddddddddddddddyssssssssssssssslllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllxyz\abc.txt"); 




?>

Expected result:
----------------
If path is accessible it must return 1, otherwise 0

Actual result:
--------------
Apache is being restarted.
In apache error log, following Error message is being printed - ([Wed May 09 19:21:03.822918 2018] [mpm_winnt:notice] [pid 3776:tid 328] AH00428: Parent: child process 5360 exited with status 255 -- Restarting)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-11 12:35 UTC] spam2 at rhsoft dot net
when you say it works in never windows versions it's obvisouly a limitation of the underlying OS and PHP hardly can do anything about it - why do you not upgrade the OS (which is already out of support  and has only extended support until 2020) or just don't use that long filenames?
 [2018-05-11 14:08 UTC] tumul dot kumar at veneratech dot com
#spam2 at rhsoft dot net-    Well this is the new feature of php 7.1  (long path window support), hence it must work on windows 2008 server r2 as well. In C++, with some windows API it is possible to access and create new files on long path in the same window version.( NO Limitation Of OS). Therefore php must have  access as well. It is not documented anywhere that this feature is not available for this window version(Server 2008 R2 SP1). Our product provide support on this window version, hence updating window won't work for us.
 [2018-05-12 17:00 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2018-05-12 17:00 UTC] ab@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2018-05-14 10:53 UTC] tumul dot kumar at veneratech dot com
-Status: Feedback +Status: Open
 [2018-05-14 10:53 UTC] tumul dot kumar at veneratech dot com
Following is the generated backtrace -> 


Thread 0 - System ID 5016



Entry point   php!sapi_cli_single_write+a270 
Create time   5/14/2018 3:52:28 PM 
Time spent in user mode   0 Days 00:00:00.031 
Time spent in kernel mode   0 Days 00:00:00.046 


This thread is not fully resolved and may or may not be a problem. Further analysis of these threads may be required.








VCRUNTIME140!MoveSmall+325 
php7ts!libiconv_set_relocation_prefix+23d58 
php7ts!virtual_file_ex+241 
php7ts!virtual_access+a8 
php7ts!php_stat+c9 
php7ts!php_fputcsv+1f05 
php7ts!array_init+b93 
php7ts!execute_ex+bf 
php7ts!zend_execute+1c9 
php7ts!zend_execute_scripts+b7 
php7ts!php_execute_script+287 
php!sapi_cli_single_write+133d 
php!sapi_cli_single_write+22bf 
php!sapi_cli_single_write+a209 
kernel32!BaseThreadInitThunk+d 
ntdll!RtlUserThreadStart+1d 




Thread 1 - System ID 896



Entry point   ntdll!TppWaiterpThread 
Create time   5/14/2018 3:52:29 PM 
Time spent in user mode   0 Days 00:00:00.000 
Time spent in kernel mode   0 Days 00:00:00.000 









ntdll!ZwWaitForMultipleObjects+a 
ntdll!TppWaiterpThread+14d 
kernel32!BaseThreadInitThunk+d 
ntdll!RtlUserThreadStart+1d 



Exception Information


VCRUNTIME140!MOVESMALL+325In php__PID__4152__Date__05_14_2018__Time_03_52_39PM__46__Second_Chance_Exception_C0000005.dmp the assembly instruction at VCRUNTIME140!MoveSmall+325 in C:\Windows\System32\VCRUNTIME140.dll from Microsoft Corporation has caused an access violation exception (0xC0000005) when trying to read from memory location 0x0b23fff8 on thread 0




Module Information 

Image Name: C:\Windows\System32\VCRUNTIME140.dll   Symbol Type:  PDB 
Base address: 0x00000003`00905a4d   Time Stamp:  Wed Dec 20 11:40:43 2017  
Checksum: 0x00000000`00000000   Comments:   
COM DLL: False   Company Name:  Microsoft Corporation 
ISAPIExtension: False   File Description:  Microsoft® C Runtime Library 
ISAPIFilter: False   File Version:  14.13.26020.0 built by: VCTOOLSREL 
Managed DLL: False   Internal Name:  vcruntime140.dll 
VB DLL: False   Legal Copyright:  © Microsoft Corporation. All rights reserved. 
Loaded Image Name:  VCRUNTIME140.dll   Legal Trademarks:   
Mapped Image Name:     Original filename:  vcruntime140.dll 
Module name:  VCRUNTIME140   Private Build:   
Single Threaded:  False   Product Name:  Microsoft® Visual Studio® 2017 
Module Size:  88 KBytes   Product Version:  14.13.26020.0 
Symbol File Name:  c:\symbols\vcruntime140.amd64.pdb\E0AF49B371FD45C2801AFE6F5B029BF31\vcruntime140.amd64.pdb   Special Build:  &
 [2018-05-15 09:07 UTC] ab@php.net
I made VM, however the test suite passes there. From the backtrace, seems it fails somewhere in fputcsv(). Could you perhaps post an exact code snippet in PHP?

Thanks.
 [2018-05-23 08:07 UTC] tumul dot kumar at veneratech dot com
The issue was in php 7.1.12, It is fixed in php 7.1.17. Mistakenly, I provided wrong PHP Version.
 [2018-05-23 10:59 UTC] ab@php.net
-Status: Open +Status: Not a bug
 [2018-05-23 10:59 UTC] ab@php.net
Thanks for the update. Closing the issue then.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 09:01:26 2024 UTC