Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I include my modules with symlinks into my many drupal installations. Sadly I get an openbaseddir restriction if I try to run gz compression as the modules tries to use the path /js/js_24bb...7a.jsmin.js.gz which would be a root path.
If you add the absolute path the module runs fine again. This means to use $jsmin_file_path instead of $jsmin_file_name in line 120 and 121.
Please add this small patch to the module :)
Best regards,
Kars-T
Comment | File | Size | Author |
---|---|---|---|
javascript_aggregator.module.patch | 1002 bytes | Kars-T |
Comments
Comment #1
derjochenmeyer CreditAttribution: derjochenmeyer commentedWhile rearranging the code for the last release i tried this among other changes, but i ran into problems with some of my installations.
I will try out the patch.
But I would like to have some more positive feedback from the community before including it for the next release.
Comment #2
derjochenmeyer CreditAttribution: derjochenmeyer commented@all: Please report if anyone has similar problems.
As i wrote in #1 I tried this modification months ago and ran into problems. If nobody else has this problem I will mark this as "won't fix".
Comment #3
Kars-T CreditAttribution: Kars-T commentedHi
I tested this again and let it run through a debugger.
$jsmin_file_name is "/js/js_94ebc1fc21b0054d6f7845aafe10634d.jsmin.js"
Line 98
This sets $jsmin_file_path to "sites/default/files/js/js_94ebc1fc21b0054d6f7845aafe10634d.jsmin.js"
Don't know how you ran into problems. What went wrong?
Maybe we need the full path "/var/www/drupal/sites/default/files/js/js_94ebc1fc21b0054d6f7845aafe10634d.jsmin.js" ?
Or maybe "./sites/default/files/js/js_94ebc1fc21b0054d6f7845aafe10634d.jsmin.js"
I still can only say that with openbasedir I need the full path or it won't work. Hopefully someone else will assist in this. :)
Comment #4
EugenMayer CreditAttribution: EugenMayer commentedWhile http://api.drupal.org/api/function/file_destination/6 should be used to determine the existance (eventhough it reuses file_exists but that could change..depends on bugs in php version) the path relative to htdoc should be used with file_exists and not the filename.
Using the filename with file_exists in that case makes no sense and is def. doomed to fail. Because that depends on the location of the file which included that file which actuall calls that method..which you dont want to know where :).
User realpath or relative paths to htdoc
Comment #5
derjochenmeyer CreditAttribution: derjochenmeyer commentedHow is it "doomed to fail"? At least it seems to work :)
Happy for any suggestions. Could you provide a patch?
Comment #6
Kars-T CreditAttribution: Kars-T commentedSadly I don't have enough time to do a new patch in the near future. You are not by any chance german and in the german IRC? irc.freenode.net #drupal.de? Maybe we can chat about this.
Comment #7
derjochenmeyer CreditAttribution: derjochenmeyer commented@#6 I'am german but I never ever used IRC. I'll try to set up ChatZilla.
If not a patch, maybe a snippet how to approach this with http://api.drupal.org/api/function/file_destination/6 >> I'll turn it into a patch, but at the moment I dont have time to look deeper into this issue.
Comment #8
derjochenmeyer CreditAttribution: derjochenmeyer commentedThis has been fixed in another issue:
#936588: open_basedir restriction in effect
Pleas test and report.