VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: goudmahendra on December 23, 2020, 12:29:39 PM

Title: Remove (comment) the code in VM that writes the error
Post by: goudmahendra on December 23, 2020, 12:29:39 PM
Virtuemart is been modified to show the products images from and  external server, so system recieve a lot of errors from the thumbnails  not created or images not found, etc.... All theese errors go to the log  file. I have blocked the writing of this file with permissions to avoid  the enormus size (some Gb within few weeks), but I'm sure the the  server CPU is under stress and it slow all server.  Question : is it possibile to remove (comment) the code in VM that writes the error in /log/com_virtuemart.log.php ?

joomla 3.9.23

VirtueMart 3.6.10 10211

Please help

Thanks
Title: Re: Remove (comment) the code in VM that writes the error
Post by: GJC Web Design on December 23, 2020, 13:10:11 PM
possibly  administrator\components\com_virtuemart\helpers\img2thumb.php

NewImgCreate()
Title: Re: Remove (comment) the code in VM that writes the error
Post by: goudmahendra on December 28, 2020, 09:23:45 AM
Hi GJC Web Design,

I have commented out the line but not solve my problems
Error file /log/com_virtuemart.log.php is growing now after commented out line.

Thanks
Title: Re: Remove (comment) the code in VM that writes the error
Post by: Jörgen on December 28, 2020, 09:37:31 AM
What have You commented out ?
Any surrounding code that submits data to the log ?
What error are we taking about ?
Php errors and PHP error log ?
VM errors and VM error log ?

Jörgen @ Kreativ Fotografi
Title: Re: Remove (comment) the code in VM that writes the error
Post by: goudmahendra on December 28, 2020, 09:51:42 AM
Hello Jörgen,

What have You commented out ?

I have comment out this line: vmError(vmText::sprintf('COM_VIRTUEMART_FILE_NOT_FOUND',$filename));
File path: administrator\components\com_virtuemart\helpers\img2thumb.php

Any surrounding code that submits data to the log ?

Yes i need to comment code which is submit data in error log file because my error log file size increasing.
today I have deleted the file /log/com_virtuemart.log.php but it's growing anyway...

What error are we taking about ?
Php errors and PHP error log ?
VM errors and VM error log ?

About VM error log

Any help..

Thanks
Title: Re: Remove (comment) the code in VM that writes the error
Post by: Jörgen on December 28, 2020, 10:18:13 AM
Why do you have error reporting in VM turned on ?

Turn it off in VM configuration maybe?

Jörgen @ Kreativ Fotografi
Title: Re: Remove (comment) the code in VM that writes the error
Post by: goudmahendra on December 28, 2020, 10:49:15 AM
Hello Jörgen,

Enable VirtueMart 404 error handling is uncheckd allready.

Thanks
Title: Re: Remove (comment) the code in VM that writes the error
Post by: Studio 42 on December 28, 2020, 11:54:30 AM
Quote from: goudmahendra on December 28, 2020, 10:49:15 AM
Hello Jörgen,

Enable VirtueMart 404 error handling is uncheckd allready.

Thanks
This have nothing to do with internal errors, only bad shop links.
Go in back-end in the virtuemart > configuration and disable all messages/ debug tools (in  first tab)
Title: Re: Remove (comment) the code in VM that writes the error
Post by: goudmahendra on December 28, 2020, 12:41:06 PM
Hello,

I have been disabled all messages and debugs option allready.
You can see screenshot here: https://drive.google.com/file/d/1WhPqgzgBFnXafUzP1psKZbAt-U00JZA-/view

Thansk
Title: Re: Remove (comment) the code in VM that writes the error
Post by: Jörgen on December 28, 2020, 13:16:31 PM
If you really have messages in VM error log not PHP error log this should go away with VM debug turned off. Is joomla debug reporting turned on ?

What are the messages ?

Jörgen
Title: Re: Remove (comment) the code in VM that writes the error
Post by: pinochico on December 28, 2020, 13:29:37 PM
I think you're thinking wrong.

You are now dealing with the "consequences" of your actions - editing the code to generate thumbnails == error messages written to the log - these errors will still occur even if you turn off writing to the log == the server will be constantly overloaded.

The right solution is to eliminate the "cause" - a bad modification of the program code.

Please correct your mistake and no messages will be generated.
Title: Re: Remove (comment) the code in VM that writes the error
Post by: goudmahendra on December 28, 2020, 14:38:26 PM
Hello Jörgen,

Joomla error reporting is also none.

The messages is store in file is:
2020-12-27 09:09:04 ERROR vmError: File /var/www/vhosts/farmaciapinzerato.it/shop.farmaciapinzerato.it//var/www/vhosts/farmaciapinzerato.it/shop.farmaciapinzerato.it/immagini/013437.jpg non trovato

Thanks
Title: Re: Remove (comment) the code in VM that writes the error
Post by: Jörgen on December 28, 2020, 15:12:04 PM
I agree with Rudolf
The cause of the error is better to correct.

I checked my virtuemart.log and found some error messages conecrning not found images. But I have only a few so there was a maybe a hundred lines in  the file. Make sure you have all the images or use a tool like agent ransack to find the VMerror instance that is still sending out these messages.

Jörgen @ Kreativ Fotografi
Title: Re: Remove (comment) the code in VM that writes the error
Post by: Milbo on January 13, 2021, 14:49:37 PM
Quote from: goudmahendra on December 23, 2020, 12:29:39 PM
Virtuemart is been modified to show the products images from and  external server, so system recieve a lot of errors from the thumbnails  not created or images not found, etc....

joomla 3.9.23

VirtueMart 3.6.10 10211

What do you mean with "Virtuemart is been modified". Yes I wrote that. Or do you mean a special modification for you? And why does this function creates errors? this is what I would ask first. Btw, I wrote that before reading the last two posts.

Please update VirtueMart and use our code. VM can handle remote files itself now. Just use enter the path without protocoll, just with //