Recent Changes - Search:

PmWiki

pmwiki.org

00645

Summary: Uploads broken if ScriptUrl has no /
Created: 2006-01-19 10:35
Status: Closed - likely fixed for 2.1.beta23
Category: Bug
Assigned:
Priority: 3
Version: 2.1 beta 14
OS: Linux/Apache/PHP4.3.2

Description: If the $ScriptURL variable does not contain a slash, then the uploads functionality is broken.

We originally had our $ScriptURL set to "http://my-project.my-company.com/wiki(approve links)". I had a new DNS entry added for our server and was able to setup a VirtualHost to generalize the $ScriptURL to not be project centric, but to be more inclusive to our whole department. The new $ScriptURL is "http://my-department-wiki.my-company.com(approve links)". Please note, the "/wiki" at the end of the URL is now resolved by the VirtualHost.

Everything appeared to work fine, except uploads. The links for any uploaded files now appeared as "http:/uploads/Group/file.ext(approve links)", without any base URL.

I tried several things to get this to work, but settled on setting $UploadUrlFmt to be "http://my-department-wiki.my-company.com/uploads(approve links)". This is not a standard variable that is set in the config.php or mentioned in the documentation for uploads, so I feel a little tentative about using this solution. I'm concerned that future enhancements to uploads will change or break this functionality.


CORRECTION: I guess $UploadUrlFmt is mentioned in the PmWiki documentation as a variable, but this issue in general is not mentioned. Is this a bug or does the documentation just need to be updated to point out this issue? -Kurt Devlin January 19, 2006, at 10:38 AM


AS PER Pm, Jan 23, 2006 11:30 AM via email: The documentation might need to be updated -- setting $UploadUrlFmt is indeed the correct and preferred solution for this. See http://www.pmwiki.org/wiki/PmWiki/UploadsAdmin, under "Basic Installation".

Also, $UploadUrlFmt will be mentioned in the sample-config.php file; I thought it was there already but it's not. :-|


Edit - History - Print - Recent Changes - Search
Page last modified on January 12, 2008, at 07:10 AM