File GetStockImage.php, at line 67.
$filepath = $_SERVER['DOCUMENT_ROOT'] . $rootpath . $pathsep .
$_SESSION['part_pics_dir'] . $pathsep;
$filepath = $_SESSION['part_pics_dir'] . $pathsep;
There are two issues here. One is that $rootpath APPEARS to be undefined,
but it's late and I may have missed where it is assigned.
The bigger issue is the $_SERVER['DOCUMENT_ROOT']; I assume this is OK if the
code for webERP is located within the directory tree used to deliver normal
web content. I don't do that - webERP lives off elsewhere, and the only
access to it is via an Apache 'Alias' command redirecting to the real place.
The consequence is that the 'Item Maintenance' page only ever shows a black
square where the image should be. The 'Show Part Picture' link works just
As an aside, there is also code to figure out whether the server is running
on Windows and thus setting the path separator to \, otherwise / That's
unnecessary - Windows, back to DOS days, has always understood either. It's
only stupid programs like cmd.exe which don't. [I worked for MS for 8 years
in the (then) Systems group; the above information came from the file system
guy's mouth.] I don't have a Windows server to test this, so perhaps
somebody who does would be kind enough to verify that. And another bit of
code can be snipped out.
On Thursday 05 July 2007 07:50, emdeex wrote:
> > It's only stupid programs like cmd.exe which don't.
> And the file system guy said "oh only cmd.exe doesn't work !" ....ha ha,
> sorry that just seemed funny to me...
I should clarify, just for the record. That comment was from me, not the
file system guy.
My last arguing with cmd.exe were in the NT 3.1 days. At that stage,
internal operations, such as 'chdir', did not set a return code, so there
was no way to test whether you had just changed directories. Bear in mind
this is from 13 years ago; memorial is fallible, without ECC or parity bits.