Author Topic: Remove (comment) the code in VM that writes the error  (Read 570 times)

goudmahendra

  • Jr. Member
  • **
  • Posts: 55
  • A beginner
Remove (comment) the code in VM that writes the error
« 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

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10027
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Remove (comment) the code in VM that writes the error
« Reply #1 on: December 23, 2020, 13:10:11 pm »
possibly  administrator\components\com_virtuemart\helpers\img2thumb.php

NewImgCreate()
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

goudmahendra

  • Jr. Member
  • **
  • Posts: 55
  • A beginner
Re: Remove (comment) the code in VM that writes the error
« Reply #2 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

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3225
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Remove (comment) the code in VM that writes the error
« Reply #3 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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

goudmahendra

  • Jr. Member
  • **
  • Posts: 55
  • A beginner
Re: Remove (comment) the code in VM that writes the error
« Reply #4 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

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3225
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Remove (comment) the code in VM that writes the error
« Reply #5 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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

goudmahendra

  • Jr. Member
  • **
  • Posts: 55
  • A beginner
Re: Remove (comment) the code in VM that writes the error
« Reply #6 on: December 28, 2020, 10:49:15 am »
Hello Jörgen,

Enable VirtueMart 404 error handling is uncheckd allready.

Thanks

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4405
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Remove (comment) the code in VM that writes the error
« Reply #7 on: December 28, 2020, 11:54:30 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)

goudmahendra

  • Jr. Member
  • **
  • Posts: 55
  • A beginner
Re: Remove (comment) the code in VM that writes the error
« Reply #8 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

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3225
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Remove (comment) the code in VM that writes the error
« Reply #9 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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 901
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Remove (comment) the code in VM that writes the error
« Reply #10 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.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

goudmahendra

  • Jr. Member
  • **
  • Posts: 55
  • A beginner
Re: Remove (comment) the code in VM that writes the error
« Reply #11 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

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3225
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Remove (comment) the code in VM that writes the error
« Reply #12 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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10087
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Remove (comment) the code in VM that writes the error
« Reply #13 on: January 13, 2021, 14:49:37 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 //
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/