I'm getting the following response when adding a record and including a file for upload:
Warning: preg_replace() [function.preg-replace]: Unknown modifier '\' in /user0/htdocs/eurorem/refbase-0.9.0/includes/include.inc.php on line 3631
Warning: preg_replace() [function.preg-replace]: Unknown modifier '\' in /user0/htdocs/eurorem/refbase-0.9.0/includes/include.inc.php on line 3634
Warning: Cannot modify header information - headers already sent by (output started at /user0/htdocs/eurorem/refbase-0.9.0/includes/include.inc.php:3631) in /user0/htdocs/eurorem/refbase-0.9.0/modify.php on line 1046
The file and the record do get created and are fully accessible in RefBase afterwards..
Another problem connected to this is that I had to set the directory where files end-up to be world-writable otherwise the php failed (Permission denied), this is obvious since the uploaded file results in having owner: nobody group: nobody, how should I set Refbase to work correctly into the server permissions system ?!
Please open file 'modify.php' in your refbase root directory, goto line 1100 and replace this code:
$dirNamingScheme = trimTextPattern($dirNamingScheme, "[/\\]+", true, true);
$dirNamingScheme = trimTextPattern($dirNamingScheme, "[\/\\\\]+", true, true);
Now try again to add a new record with an attached PDF file. Do you still get the "Unknown modifier" warning messages?
Regarding the permissions of uploaded files, I'm not exactly sure how this is generally handled by Apache (or other) servers. On my local system (Apache 1.3.33 on OSX with PHP 5.1.4) uploaded PDF files have owner:www, group:wheel and permissions of 600. Subdirectories created by refbase on my local server have owner:www, group:admin and permissions of 750. So I guess that this issue is specific to particular server setups? Others may know more about this...
On Unix-like systems, Apache is run by a particular user with a particular primary group. These determine both the default owner of new files created by apache and also determine which files/directories they may access (as with all other user accounts on *nix). The actual name of the owner and the primary group does differ between implementations.
It should be fairly trivial to find which account apache is running under (using ps, for example) & to then change ownership accordingly.
Ok it worked!
no warning message and pdf file correctly linked to the search results -thanks!
no clue about the server/permissions over here neither, no time to look into this right now, and sysadmin on vacation!
the subdir created by refbase are '750' but with user:'nobody' group:'nobody'
I'm glad to hear that your warning message is gone!
A future version of refbase will contain this fix (it has been fixed already in the SVN repository).
Best regards, Matthias
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.