Closed (fixed)
Project:
Project Issue File Review
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
3 Nov 2009 at 19:19 UTC
Updated:
9 Dec 2009 at 20:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
boombatower commentedCan you print out file_directory_path() to hard coded log file and see if it is right?
That and print the whole generated url.
Comment #2
deekayen commented/me aims blame at realpath()
Comment #3
boombatower commentedPerhaps it has an issue if the file does not exist first, although if you hard coded...not really sure.
If this doesn't work perhaps, try adding './' in front.
Comment #4
deekayen commentedI think that patch is going to do exactly the same thing - all you did was break it up over two lines.
Comment #5
deekayen commentedI tried
$this->log_file = realpath('./'. file_directory_path() . '/review.log');and still no log_file value.I'm interested to see how you'll derive a full path - I have a custom module at Classic Graphics where I ended up coding a configuration variable for it cause I didn't get it figured out quick enough.
Comment #6
boombatower commentedI would really like to know why this doesn't work. Makes absolutely no sense.
http://us3.php.net/manual/en/function.realpath.php
If it can't handle the fact the file is not there then #3 should do fine, but otherwise I am lost. Works like a charm locally.
Comment #7
Felicitus commentedI stumbled over exactly this issue, and have an explanation:
realpath() returns an empty string if the file doesn't exist. In my case, a realpath("sites/default/files") did work, but a realpath("sites/default/files/review.log") did not unless the file was manually created. This is either a bug or a documentation issue; I believe it is a little bit of both. As a temporary fix, it is possible to simply create the file.
Comment #8
deekayen commentedI did this on #34 - let's see how it goes after a couple tests:
Comment #9
deekayen commentedThe log contents are reported at http://qa.drupal.org/pifr/test/16620 as they should be (I think). Now I guess the question is whether or not the creation of review.log should be done through PIFR's installer or as part of the client configuration and setup. Personally, I think touching the file is very workaround-ish, so I'm leaving this open rather than changing my PIFR setup instructions.
Comment #10
deekayen commentedI'm trying this patch on #34:
Comment #11
deekayen commentedComment #12
deekayen commentedSeems to work. http://qa.drupal.org/pifr/test/20292
Re: my email, after this is committed, please comment on which branch or tag to update our clients from CVS.
Comment #13
boombatower commentedThat is exactly what I did in #3...?
Comment #14
deekayen commentedmm... i guess.
I like mine better :) I already added review.log to all three live testing clients and added it to the install instructions anyway.
Perhaps adding a comment to the usage of realpath there would be helpful about needing the file to exist first since the only docs on that fact are a comment on the doc page.
There's a resolution somewhere in this thread, whichever one you pick. I'll be ignoring it now.
Comment #15
boombatower commentedCommitted your solution.