Bug 46420 - mod_ssl SSLSessionCache: Parentheses in path name not possible for shm
Summary: mod_ssl SSLSessionCache: Parentheses in path name not possible for shm
Status: RESOLVED DUPLICATE of bug 47945
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_ssl (show other bugs)
Version: 2.2.11
Hardware: PC Windows Server 2003
: P2 normal with 3 votes (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL: http://www.nabble.com/Error-when-tryi...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-19 11:36 UTC by Dominik Friedrichs
Modified: 2011-06-15 22:45 UTC (History)
1 user (show)



Attachments
Path to resolve (x86) path issue. (1.08 KB, patch)
2009-07-30 04:34 UTC, William Bailey
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Friedrichs 2008-12-19 11:36:28 UTC
On Windows 2003 64bit, Apache is mostly installed in the "Program Files (x86)" folder, and the parentheses cause the trouble here, as mod_ssl tries to read the cache size out of them. I suggest either changing the ( ) to < >, as those are not allowed in folder names in Windows, or search the string right to left, getting the correct pair of parentheses containing the size.

SSLSessionCache "shmcb:C:/Program Files (x86)/Apache2.2/logs/ssl_scache(512000)"

^ fails.

Thanks
Comment 1 Joe Orton 2009-01-02 08:56:35 UTC
In trunk/2.4 you can simply omit the part after the "shmcb:" and the code will DTRT.  Not sure what else we could do here.
Comment 2 William Bailey 2009-07-30 04:34:54 UTC
Created attachment 24064 [details]
Path to resolve (x86) path issue.

Potential patch to resolve the issue with 64bit windows and folders that contain the '(' character. The patch check to see if the last character is a ')' and will then search for a '(' starting at the right of the string.
Comment 3 Charles Gutjahr 2009-09-04 20:56:42 UTC
The same error has occured for me on 64-bit Windows 7 (RTM), using Apache/2.2.13. Presumably this occurs on all 64-bit versions of Windows.

A good solution for this would be to comply with Windows conventions and install data in "\ProgramData" instead of "\Program Files" or "\Program Files (x86)". Things like logs, configuration files, etc really should be installed there. Doing so would also avoid the problem of (x86) creeping into the folder name and triggering this bug.

Generally, you would want to setup data and logs in the Windows Known Folder '%ALLUSERSPROFILE%' or '%ProgramData%'. More information available at
http://msdn.microsoft.com/en-us/library/bb756896.aspx and http://msdn.microsoft.com/en-us/library/bb762584%28VS.85%29.aspx
Comment 4 Christian Höltje 2010-07-30 10:22:55 UTC
**Workaround**

The shmcb method doesn't actually create a file on the filesystem, so you can use an arbitrary pathname. Just make sure it's unique on the system.

Examples:
SSLSessionCache "shmcb:C:\apache\port80\instance1(512000)"
and
SSLSessionCache "shmcb:C:\apache\port443\instance2(512000)"
Comment 5 Christian Höltje 2010-07-30 10:24:32 UTC
(In reply to comment #4)
> **Workaround**
> 
> The shmcb method doesn't actually create a file on the filesystem, so you can
> use an arbitrary pathname. Just make sure it's unique on the system.

FYI: That's only on windows.  I don't think you can work around a path name with () in them on unix. :-(
Comment 6 Stefan Fritsch 2011-06-15 22:45:30 UTC

*** This bug has been marked as a duplicate of bug 47945 ***