Page 1 of 1

error log admin../common/home.php line 99,101,103,106

Posted: Mon Feb 04, 2013 6:25 pm
by Yixuan_lee
Hallo,

I get error log as following:
2013-02-04 10:46:36 - PHP Warning: fopen(..../public_html/download/test) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in admin/controller/common/home.php on line 99
2013-02-04 10:46:36 - PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in /admin/controller/common/home.php on line 101
2013-02-04 10:46:36 - PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /admin/controller/common/home.php on line 103
2013-02-04 10:46:36 - PHP Warning: sprintf() [<a href='function.sprintf'>function.sprintf</a>]: Too few arguments in /admin/controller/common/home.php on line 106

---------------------------here is home.php------------------
// Check download directory is writable
$file = DIR_DOWNLOAD . 'test';

line99 $handle = fopen($file, 'a+');

fwrite($handle, '');

line101 fclose($handle);

if (!file_exists($file)) {
line103 $this->data['error_download'] = sprintf($this->language->get('error_download'). DIR_DOWNLOAD);

I checked forum, it seems related with setting of permission. How can I exactly fix the problem? By the way, I am using OC1.5.4 and I do not have downloadable products.

Thanks.

Re: error log admin../common/home.php line 99,101,103,106

Posted: Mon Feb 04, 2013 7:47 pm
by i2Paq
Windows or *nix install?

Re: error log admin../common/home.php line 99,101,103,106

Posted: Mon Feb 04, 2013 8:59 pm
by Yixuan_lee
local computer is Window. but my webhosting is Hostpapa, I do not know their system.

Re: error log admin../common/home.php line 99,101,103,106

Posted: Mon Feb 04, 2013 9:34 pm
by Yixuan_lee
It happens only when I login the admin panel, afterwards everything is normal. Does it matter so much? So far, I do not see any functional mistakes. What kinds of problems would it cause?

Many thanks.

Re: error log admin../common/home.php line 99,101,103,106

Posted: Tue Feb 05, 2013 1:10 am
by i2Paq
So you are running Wamp or Xammp?

Re: error log admin../common/home.php line 99,101,103,106

Posted: Wed Feb 13, 2013 4:27 am
by Yixuan_lee
I do not understand what you mean. What is Wamp or Xammp?

I use Win7 in my local computer, but opencart is installed on Hostpapa server. It should have nothing connected with my local computer.

It still appears everytime when I login the admin panel, but afterwards, it does not appear anymore.