[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Webalizer problem



On 11/3/2001 at 11:52 AM flash22@xxxxxxx wrote:

|On Sat, 3 Nov 2001, MikeM wrote:
|> 
|> The Webalizer 2.01 package from cobalt-aid.sourceforge.net odoes not
|overwrite the .htaccess file.  
|here's the code from the /usr/bin/webalizer2.pl script that runs webalizer:
|> 
|>  # Create a .htaccess if it isn't there yet
|>     if (!-e '$thepath/.htaccess')
|>     {        
|
|And here you found the EXACT bug, '' is NOT a string, thus
|'$thepath/.htaccess' is always an invalid filename, in addition,
|variable's aren't expanded in ''s
|
|if (!-e "$thepath/.htaccess")
|
|Would possibly do something, tho it's not totally sane either...
=============


It is a string.  The script is written in Perl.  The excerpt that I posted in the message works fine, i.e., if the file exists the script does not recreate it.