Jump to content

Recommended Posts

Hi, my server or processwire or me cancelled database, that don't exist and my server haven't backup.

The error log is:

 

 http://www.permaculturaorganica.info/?/ Error:  Exception: SQLSTATE[HY000] [1044] Access denied for user 'casbo_RdS'@'%' to database 'casbooko1_po' (in /data/vhosts/permaculturaorganica.info/httpdocs/wire/core/ProcessWire.php line 308)

 

Is this log a log for database not found, it's correct? 

 

I was write any articles, but NOT PUBLISH, because the site haven't any grafic.

Now I go in  /site/assets/cache/ by ftp, but I don't see any file.

The address is correct for find the files cache?

Share this post


Link to post
Share on other sites

I don't know if you have this installation on a web host or local.  If on a web host, most (not all) companies will be able to restore a MySQL database for you.

Share this post


Link to post
Share on other sites

Sorry to hear that.  For the future, you may want to look at the following modules for backup:

To get a backup that will save a copy of your MySQL database:

https://modules.processwire.com/modules/process-database-backups/

To automate that process, the following module is recommended:

https://modules.processwire.com/modules/cronjob-database-backup/

Note:  There are many other useful backup modules for ProcessWire that will provide some relief in case you have a problem.

 

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, franciccio-ITALIANO said:

Hi, my server or processwire or me cancelled database, that don't exist and my server haven't backup.

The error log is:

 


 http://www.permaculturaorganica.info/?/ Error:  Exception: SQLSTATE[HY000] [1044] Access denied for user 'casbo_RdS'@'%' to database 'casbooko1_po' (in /data/vhosts/permaculturaorganica.info/httpdocs/wire/core/ProcessWire.php line 308)

 

Is this log a log for database not found, it's correct? 

 

I was write any articles, but NOT PUBLISH, because the site haven't any grafic.

Now I go in  /site/assets/cache/ by ftp, but I don't see any file.

The address is correct for find the files cache?

I see you have added additional information.  Please check that the database listed has the correct permissions/privileges:

https://dev.mysql.com/doc/refman/5.7/en/privileges-provided.html

Your web host provider can assist you to tell whether this database still exists and provide guidance on getting things working again.  Good Luck.

  • Like 2

Share this post


Link to post
Share on other sites
8 hours ago, franciccio-ITALIANO said:

Hi, my server or processwire or me cancelled database

More likely than this, you just have one or more of...

  • wrong database name
  • wrong database username
  • wrong password for that username

...in /site/config.php

Your host should have some control panel (cPanel, Plesk, etc) where you can...

  • check the database name
  • check the database username
  • reset the password for that username

...and then update /site/config.php accordingly.

Edit: sorry, I spoke too soon. The error message for wrong db user/pass is slightly different. So it must be either wrong database name (hopefully) or no database at all (oh dear :().

P.S. I know it's not much help now but as @cstevensjr mentioned these two modules are essentials for every PW installation IMO:

  • Like 5

Share this post


Link to post
Share on other sites

Beh, in my server don't exist any DB :/ Brrrr :wacko:

Now, someone say anything about memory CACHE?

It'is a valid method for recover articles NOT PUBLISH but written?

I must install both this module or only 1, that I must to choose?

:wacko::wacko::wacko:

Share this post


Link to post
Share on other sites

Hi @franciccio-ITALIANO

You can look for cache files in 

site/assets/cache/Page

But there will be files only if your template cache is on.

About modules: 

First is to manually create DB backup, but the second one is to trigger backup creation periodically.

You can install and use only the first one. But if you want to use second, you have to install also the first, because it depends on it. 

Share this post


Link to post
Share on other sites

You can do it in template settings -> cache tab

Share this post


Link to post
Share on other sites
2 hours ago, franciccio-ITALIANO said:

You would install both.  The first module backs up your MySQL database.  The second module listed has many options  to make the backups you created with the first module automated.  That way you don't have to manually make a backup.

Share this post


Link to post
Share on other sites

Go to templates -> yourtemplate -> cache tab

Share this post


Link to post
Share on other sites
On 2017-5-6 at 3:57 PM, franciccio-ITALIANO said:

Hi, my server or processwire or me cancelled database, that don't exist and my server haven't backup.

The error log is:

 


 http://www.permaculturaorganica.info/?/ Error:  Exception: SQLSTATE[HY000] [1044] Access denied for user 'casbo_RdS'@'%' to database 'casbooko1_po' (in /data/vhosts/permaculturaorganica.info/httpdocs/wire/core/ProcessWire.php line 308)

 

Is this log a log for database not found, it's correct? 

Not necessarily. I had a similar error last week. What happens in my setup is that I run my site locally, but connect to a database on a real live server, so I use an IP address rather than 'localhost'. In order to connect from my local account to a real server, I have to whitelist my home IP address in my hosting account to allow remote access to the database.

So what happened was that my ISP had changed my home IP address, the whitelist didn't match, therefore every one of my local sites gave me an error like the above. The answer was to login to my hosting control panel, add my IP address (literally looked up 'whatsmyip' in Google) to the whitelist and sites all worked straight away.

Long shot but I thought it was worth mentioning that it's not always the credentials in config.php that are the problem.

  • Like 1

Share this post


Link to post
Share on other sites

What do you mean your hosters does not has your database?

What kind of provider are you using that is not doing data backup of their servers or customers data? Any decent hosting provider, even those cheap budget ones are doing daily backups. I would run away and fast from anyone company that doesn't protect its user's data. I also don't think ProcessWire deletes your database. I never heard of a software that deletes its own database. Either you deleted it by mistake from your control panel or your host did. I saw your other post where you mentioned the database is not in cPanel visible anymore. Is the MySQL user still there? If nothing is there, then indeed it would mean someone deleted your database.

Share this post


Link to post
Share on other sites

Hi Thor, thanks for your replace!
My hosting provider make backup for 1 week. Then, it remove backup from memory.
I discovered the bug late. :/
I think I remove all DB from list, because I thinked was subdomain :/ :/
Patience. 

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Juergen
      Hello @ all,
      I am creating a new inputfield/fieldtype to store opening hours, but I am struggeling to save values from multiple dynamic created inputfields in 1 column of the database.
      Scenario:
      The user can enter one or more opening times per day in a UI.
      Fe:
      Monday open from 08:00 to 12:00 and from 14:00 to 17:00 Tuesday open from 08:00 to 12:00 and from 14:00 to 19:00 and so on
      Via a little JavaScript you can add as much opening times as you need per day - the additional inputfield will be created dynamically.
      After form submission all the values are in the POST array -> this works (see example below):
      ProcessWire\WireInputData Object ( [openinghours_mo-0-start] => 09:00 [openinghours_mo-0-finish] => 13:00 [openinghours_mo-1-start] => 14:00 [openinghours_mo-1-finish] => 18:00 [openinghours_mo-2-start] => 21:00 [openinghours_mo-2-finish] => 23:00 [openinghours_tu-0-start] => 09:00 [openinghours_tu-0-finish] => 13:00 [openinghours_tu-1-start] => 14:00 [openinghours_tu-1-finish] => 18:00 [openinghours_we-0-start] => 09:00 [openinghours_we-0-finish] => 13:00 [openinghours_we-1-start] => 14:00 [openinghours_we-1-finish] => 18:00 [openinghours_th-0-start] => 09:00 [openinghours_th-0-finish] => 13:00 [openinghours_th-1-start] => 14:00 [openinghours_th-1-finish] => 18:00 [openinghours_fr-0-start] => 09:00 [openinghours_fr-0-finish] => 13:00 [openinghours_fr-1-start] => 14:00 [openinghours_fr-1-finish] => 18:00 [openinghours_sa-0-start] => [openinghours_sa-0-finish] => [openinghours_so-0-start] => [openinghours_so-0-finish] => ) The property name is always the name attribute of the field 😉 . If the property is empty means closed on that day.
      Now I need to combine all those values into 1 array (or json array) and store it in the database in 1 column called 'hours' in my case (see screenshot below):

      In my ___processInput(WireInputData $input) method I have tried to make it work like this:
      public function ___processInput(WireInputData $input): self { $name = $this->attr('name'); $value = $this->attr('value'); //input object includes always every input on the page, so lets filter out only inputs from this field //we need to do this, because the number of values is variable - so extract only values that starts with $name.'_' $nameAttributes = []; foreach($input as $key=>$value){ if(substr($key, 0, strlen($name.'_')) === $name.'_'){ $nameAttributes[$key] = $value; } } // loop through all inputfields of this fieldtype $time_values = []; foreach($nameAttributes as $nameAttr => $value) { $time_values[$nameAttr] = $value; } } //save it in the database $input->set('hours', serialize($time_values)); return $this; } The only important part of this code is the last part with the serialize function.
      After saving it will create a record in the database, but the value is always NULL (default value) (see below).

      Checking $time_values returns all the values, but printing out "$this" shows me that the property "hours" inside the Openinghours object is empty (see below) - so the mistake must be there, but I dont know where?!?!?!?
      [title] => Home [openinghours] => ProcessWire\OpeningHours Object ( [data] => Array ( [hours] => ) ) If I check the sleepValue() method or the sanitizeValue() - they are also empty. So it seems that the values will not reach these methods. I havent found a clear documentation of whats going on behind the saving process of an inputfield.
      As far as I know the saving process starts with the form submission. The values are in the POST array and will be processed by the processInput() method. Before they will be saved in the database they will be sanitized by the sanitizeValue() mehtod and afterwards they will be prepared for storage in the sleepValue() method.  The last step is the storage itself.
      Has someone an idea what is missing by storing values from multiple fields into 1 database column or has someone a working example of such a scenario on github to help me out.
      A clear explanation of the storage process will be also helpful.
      Thanks and best regards
    • By Pip
      Hi Everyone 
      I've been working on Processwire for two months now. Structuring the website as needed. Unsure why but I'm getting this one now. Seems my fields has crashed. 
      I've tried googling some answers but can't seem to find a step by step guide on how to rectify this. Any advise? Practically new on this. 
      TIA. 

    • By Rodd
      Hi everyone!
      I have a website in a production environment and I want to duplicate it in a local environment. I exported the content of the website (with the 'Site Profile Exporter' module) but I cannot use it actually. I've got an issue with the database. I imported this one in MAMP then.

      I also exported the pages (with the 'ProcessPagesExportImport' module), but I cannot import it to my local website because the fields don't exist. So I created this fields, but I have this error :
      How can I use the elements that already exist and are presents in my database? How can I duplicate correctly the templates, fields and pages?
      Thanks by advance
      PS: Sorry if my english is bad
       
    • By MoritzLost
      Cacheable Placeholders
      This module allows you to have pieces of dynamic content inside cached output. This aims to solve the common problem of having a mostly cacheable site, but with pieces of dynamic output here and there.  Consider this simple example, where you want to output a custom greeting to the current user:
      <h1>Good morning, <?= ucfirst($user->name) ?></h1> This snippet means you can't use the template cache (at least for logged-in users), because each user has a different name. Even if 99% of your output is static, you can only cache the pieces that you know won't include this personal greeting. A more common example would be CSRF tokens for HTML forms - those need to be unique by definition, so you can't cache the form wholesale.
      This module solves this problem by introducing cacheable placeholders - small placeholder tokens that get replaced during every request. The replacement is done inside a Page::render hook so it runs during every request, even if the response is served from the template cache. So you can use something like this:
      <h1>Good morning, {{{greeting}}}</h1> Replacement tokens are defined with a callback function that produces the appropriate output and added to the module through a simple hook:
      // site/ready.php wire()->addHookAfter('CachePlaceholders::getTokens', function (HookEvent $e) { $tokens = $e->return; $tokens['greeting'] = [ 'callback' => function (array $tokenData) { return ucfirst(wire('user')->name); } ]; $e->return = $tokens; }); Tokens can also include parameters that are parsed and passed to the callback function. There are more fully annotated examples and step-by-step instructions in the README on Github!
      Features
      A simple and fast token parser that calls the appropriate callback and runs automatically. Tokens may include multiple named or positional parameters, as well as multi-value parameters. A manual mode that allows you to replace tokens in custom pieces of cached content (useful if you're using the $cache API). Some built-in tokens for common use-cases: CSRF-Tokens, replacing values from superglobals and producing random hexadecimal strings. The token format is completely customizable, all delimiters can be changed to avoid collisions with existing tag parsers or template languages. Links
      Github Repository & documentation Module directory If you are interested in learning more, the README is very extensive, with more usage examples, code samples and usage instructions!
    • By MoritzLost
      Process Cache Control
      This module provides a simple solution to clearing all your cache layers at once, and an extensible interface to perform various cache-related actions.
      The simple motivation behind this module was that I was tired of manually clearing caches in several places after deploying a change on a live site. The basic purpose of this module is a simple Clear all caches link in the Setup menu which clears out all caches, no matter where they hide. You can customize what exactly the module does through it's configuration menu:
      Expire or delete all cache entries in the database, or selectively clear caches by namespace ($cache API) Clear the the template render cache. Clear out specific folders inside your site's cache directory (/site/assets/cache) Clear the ProCache page render cache (if your site is using ProCache) Refresh version strings for static assets to bust client-side browser caches (this requires some setup, see the full documentation for details). This is the basic function of the module. However, you can also add different cache management action through the API and execute them through the module's interface. For this advanced usage, the module provides:
      An interface to see all available cache actions and execute them. A system log and logging output on the module page to see verify what the module is doing. A CacheControlTools class with utility functions to clear out different caches. An API to add cache actions, execute them programmatically and even modify the default action. Permission management, allowing you granular control over which user roles can execute which actions. The complete documentation can be found in the module's README.
      Plans for improvements
      If there is some interest in this, I plan to expand this to a more general cache management solution. I particular, I would like to add additional cache actions. Some ideas that came to mind:
      Warming up the template render cache for publicly accessible pages. Removing all active user sessions. Let me know if you have more suggestions!
      Links
      https://github.com/MoritzLost/ProcessCacheControl ProcessCacheControl in the Module directory CHANGELOG in the repository Screenshots


×
×
  • Create New...