Jump to content

Error 500 after error in modules.php


Marco Ro
 Share

Recommended Posts

Hi,

This morning something strange happened, I not was working on the website but the console log show me this

Error: Exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /home/stef4341/public_html/wire/core/Modules.php line 3035)

 

immediately after stat to show me 1000 time this other error: and the site goes on error 500

Error: Uncaught Error: Class '\CustomHooksForVariations' not found in /home/stef4341/public_html/wire/core/Modules.php:535 Stack trace: #0 /home/stef4341/public_html/wire/core/Modules.php(1000): ProcessWire\Modules->newModule('\\CustomHooksFor...') 
#1 /home/stef4341/public_html/wire/core/Modules.php(820): ProcessWire\Modules->loadModule('/home/stef4341/...', '/home/stef4341/...', Array, Array) 
#2 /home/stef4341/public_html/wire/core/Modules.php(352): ProcessWire\Modules->load('/home/stef4341/...') 
#3 /home/stef4341/public_html/wire/core/ProcessWire.php(390): ProcessWire\Modules->init() 
#4 /home/stef4341/public_html/wire/core/ProcessWire.php(209): ProcessWire\ProcessWire->load(Object(ProcessWire\Config)) 
#5 /home/stef4341/public_html/index.php(52): ProcessWire\ProcessWire->__construct(Object(ProcessWire\Config)) 
#6 {main} thrown (line 535 of /home/stef4341/public_html/wire/core/Modules.php)

 

Only if I delate the module the error disappears and the site becomes visible again. 
After I have delate also the module in the FileCompiler and reinsert the module in the right palace refresh the Modules in the backend and now all work. but:

Some one can tell me what happen? and how can I prevent these errors?

Thank you

Link to comment
Share on other sites

This could be the problem?

Before The module was write in this way:

<?php

class CustomHooksForVariations extends WireData implements Module {

after I change in

<?php class CustomHooksForVariations extends WireData implements Module {

Cloud be this?

I just make this change reinstall the module and now work. Anyway it was a month that the module was online and always worked well.

Thank you for your help.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...