Jump to content
  • 0
Sign in to follow this  

[errorlog] Creating default object from empty value


connection to onApp is work but get to many error_log in table mysql tblerrorlog in line : 5

	public static function useCurrentConnection()
		if (class_exists('\Illuminate\Database\Capsule\Manager') && \Illuminate\Database\Capsule\Manager::connection()->getPdo())
			self::$_instance->connection['default'] = (\Illuminate\Database\Capsule\Manager::connection()->getPdo());
			self::$_instance = new self();
			self::$_instance->connection['default'] = false;

can someone help how to fix, i got many query in tblerrorlog


Share this post

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

It looks like you are encountering an error when attempting to establish a database connection in your PHP code. The error message mentions the tblerrorlog table, which suggests that the issue may be related to a logging system that is capturing errors and storing them in a database table.

Based on the code snippet you provided, it appears that you are using the Laravel framework and its database component, called Eloquent. The useCurrentConnection method appears to be trying to check whether a database connection has already been established using Eloquent, and if so, it attempts to use that connection. If no connection is found, it creates a new connection using the self::$_instance = new self(); line.

It is possible that the issue you are experiencing is related to an error that is occurring when trying to establish a new database connection. This could be due to a variety of factors, such as incorrect database credentials, a misconfigured database server, or a connectivity issue.

To troubleshoot this issue, you could try the following steps:

  1. Check the database credentials that you are using to ensure that they are correct. This includes the database host, username, password, and database name.

  2. Verify that your database server is running and accessible. This could involve checking the status of the database service, checking firewall rules, or ensuring that the server is reachable from the machine where your code is running.

  3. Check the tblerrorlog table to see if there are any error messages or stack traces that might provide more information about the issue you are experiencing.

  4. Try establishing a manual database connection using a tool such as MySQL Workbench or the mysql command-line client to see if the issue is specific to your code or if it is a general connectivity issue.

  5. If you are using a framework such as Laravel, check the documentation or forums for any known issues or troubleshooting tips that might be relevant to your situation.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By muhammed elbanna
      i had a problem when new client try to buy a product and after he write all his details and click to pay it takes him to blank page 
      then when he restart page , takes him to empty cart , but invoice already created as unpaid in his account
      when i showed errors and try log in to my admin panel i found error 
      i installed radis and tried to clear cache and restart whmcs and radis and everything but still i have the same issue !

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated