Author Topic: Warning: fopen() [function.fopen]: Filename cannot be empty in  (Read 26812 times)

minime

  • Beginner
  • *
  • Posts: 1
I'm getting this error message after I updated my web site to VM1.13.


Warning: fopen() [function.fopen]: Filename cannot be empty in /home/picman/public_html/administrator/components/com_virtuemart/classes/Log/file.php on line 249

Does anyone have any idea what's happening?

Tikkiro

  • Jr. Member
  • **
  • Posts: 91
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #1 on: March 15, 2009, 00:50:16 am »
Probably need some additional info - what stage did this happen after your upgrade?  Is it a reproducible problem and if so, what causes it?  What platform are you using VM on and what version of PHP are you running?  Is your shop working around this, or is this a fatal error and preventing you working in it??

Might help you get some better responses as it's not a problem I've had personally.

philraymond

  • Beginner
  • *
  • Posts: 31
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #2 on: March 21, 2009, 04:34:35 am »
Same problem. Joomla 1.5.9. Virtuemart 1.12. php 5.2.9 and linux.

Warning: fopen() [function.fopen]: Filename cannot be empty in /home/username/public_html/administrator/components/com_virtuemart/classes/Log/file.php on line 249.

Line 248 and 249:
            /* Obtain a handle to the log file. */
            $this->_fp = fopen($this->_filename, ($this->_append) ? 'a' : 'w');

It didn't happen after an upgrade so I'm not sure. I had installed an extension yesterday, but the site still worked after that and I have since uninstalled that extension.

Shop still seems to be working, but I'd obviously still like to fix this. Hope someone can help. I'll post if I find a solution.

Thanks very much,
Phil

Tikkiro

  • Jr. Member
  • **
  • Posts: 91
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #3 on: March 21, 2009, 15:10:55 pm »
I'm seriously just talking off the top of my head here as I'm a virtual VM newbie too, but I wonder if the fact that it's referencing a log somewhere, that you might not be able to stop it logging errorsd (Admin/Configuration/Logfile config)??  Maybe nothing remotely to do with it, but that's what I'd check out for if it was me.

skulpturalasmycken

  • Beginner
  • *
  • Posts: 1
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #4 on: March 22, 2009, 18:19:56 pm »
I had the same after moving my Joomla and virtuemart installation also.

I turned OF Activate logging? in the settings/global and then the error disappered.

/Göran

philraymond

  • Beginner
  • *
  • Posts: 31
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #5 on: March 24, 2009, 07:15:26 am »
Thanks, yes, disabling logging will stop the error from showing up, but obviously doesn't fix the root of the problem that is causing the error in the first place. Also, if you turn off logging, you don't have a log.

That is a good thing to point out, though. That's the first thing I did, but I still haven't solved the actual problem.

Thanks,
Phil

billthecat

  • Beginner
  • *
  • Posts: 6
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #6 on: May 05, 2009, 19:02:12 pm »
I'm betting you did what I did...enabled logging, but didn't specify the path of the file.  Or maybe you have a name, but not with a path...
for instance my Logfile Name: /home/host/joomlavm.log

As long as the 'host' directory is writable, you don't even need the real file there - the php class will autocreate it for you...but it has to know where you want it first ;)

viruswitch

  • Beginner
  • *
  • Posts: 1
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #7 on: June 18, 2009, 11:34:44 am »
I gave a path and it removed the warning. However it now does not show the dialogue after putting a product in the cart. Although the product is added, there is no message to show it.

salobon

  • Jr. Member
  • **
  • Posts: 317
    • Herbolution
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #8 on: June 25, 2009, 18:39:33 pm »
could you mark this topic as SOLVED so that it's easier to find it when searching this problem
Thank you

syco

  • Beginner
  • *
  • Posts: 22
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #9 on: August 06, 2009, 05:37:54 am »
Hi Guys,

I've just moved (migrated using joomlapack) my site from my PC (localhost).. to a live staging server (http://www.test-swishimage.au.com/entire) and I got this error: Warning: fopen() [function.fopen]: Filename cannot be empty in /clientdata/clients/t/e/test-swishimage.au.com/www/entire/administrator/components/com_virtuemart/classes/Log/file.php on line 249

I was hoping someone could give me a clearer picture on the explanation in this thread in regards to the LOGfile name:
Quote
for instance my Logfile Name: /home/host/joomlavm.log

When referring to 'home' and 'host'... I don't see these directories on my localhost or the live site... so I'm presuming your saying I need point it to the 'root' directory. I have 'LOGS' folder in the root... but no .log  file. Do I need to create one and put it somewhere?

The other question is, it was all working with FINE with no errors on my localhost.. and there 'nothing' at all in the Logfile Name:_________ plus Enable logging was turned on... so why is it now required.. as I can't find a joomlavm.log on my localhost site... (Where is this file located in the sites directory?)

Look forward to anyone who can help?

Syco.

PS> I have no CODE training.. but I did try turning off the log which deleted the 'pathinfo'from the message.. but not the Error message itself, plus I did try put /home/host/joomlavm.log (exactly as it's written) into logfile area.. but this didnt fix it  :(
Please Help :)

sps2i

  • Beginner
  • *
  • Posts: 1
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #10 on: August 12, 2009, 17:09:37 pm »
I've used this solution :
Edit file.php at public_html/administrator/components/com_virtuemart/classes/Log/file.php.

Than remplace code at line 249 ($this->_fp = fopen($this->_filename, ($this->_append) ? 'a' : 'w');) by this one :
/*$this->_fp = fopen($this->_filename, ($this->_append) ? 'a' : 'w');*/

That's all

salobon

  • Jr. Member
  • **
  • Posts: 317
    • Herbolution
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #11 on: January 31, 2010, 15:04:29 pm »
sps2i, If you comment out the code, logging might not work.

syco, I think in your case the path would be:
/clientdata/clients/t/e/test-swishimage.au.com/www/entire/logs
Make sure to create this directory before you set it in configuration.

nickthegeek

  • Beginner
  • *
  • Posts: 1
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #12 on: May 13, 2010, 13:54:44 pm »
Hi

I had this problem when restoring a site. In the virtuemart configuration I entered the full path ie /home/username/public_html/site/administrator/components/com_virtuemart/classes/Log/file.php (our path may be different but thats how Cpanel handles it).

This sorted the problem.

Nick

aynamohol

  • Beginner
  • *
  • Posts: 4
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #13 on: August 17, 2010, 17:46:36 pm »
Just go to virtuemart configuration and

Enable Logging : Unchecked.

I think problem will be solve....

wardslaus

  • Beginner
  • *
  • Posts: 2
  • Super Focused
Re: Warning: fopen() [function.fopen]: Filename cannot be empty in
« Reply #14 on: May 28, 2012, 12:13:15 pm »
Upgrade your version from lets say 1.3 to 1.9 or 2.0 to 2.5 it will solve your problem