Jump to content

Charset error (MySQL)?


JoshoB
 Share

Recommended Posts

This has been slowly driving me insane since yesterday evening. Have a look here, please:

http://rhosonics.nl/index2.php

The error message is this: Error: Exception: SQLSTATE[42000] [1115] Unknown character set: '' (in /sites/rhosonics.nl/www/wire/core/ProcessWire.php line 186)

I don't know how to fix this. It worked fine on XAMPP (offline) and it worked fine on my own server. On the client's server, however (same host!), the error above pops up. I have tried everything I could think of, but cannot get it fixed.

Does anyone know what the issue might be? Thanks very much!

Link to comment
Share on other sites

Which version of ProcessWire are we talking about? Also make sure that at least in wire/config.php there's a sessionName variable existing, which should be default, but somehow your site is throwing an error about this. 

About the sql error: Are the mysql instances the same? If not are the same charsets supported and the same versions installed? The error quite clearly states that something with the encoding doesn't work, so did you check that you used the same charset on the clients host as on the local installation. 

Link to comment
Share on other sites

Thanks for the reply.

It's the latest version of ProcessWire. The charset must be the same.

When I add $config->sessionName = session_name(); at the end of config.php, the error stays the same (unknown charset ''). Note that it says the charset is blank. This did not happen offline nor on my own server. The database was changed to various kinds of UTF8, all to no avail. The hosting company says it's our problem. I am, frankly, at my wit's end.

Link to comment
Share on other sites

When I add $config->sessionName = session_name(); at the end of config.php, the error stays the same (unknown charset ''). 

I'm talking about this error I'm getting under your provided link: "Warning: session_name(): session.name cannot be a numeric or empty '' in /sites/rhosonics.nl/www/index2.php on line 176"

It's the latest version of ProcessWire. The charset must be the same.

We're talking about database charsets, so there isn't a "same charset". If uft-8 is available there shouldn't be any errors. I'm not sure, but processwire should only try to set the encoding at the installation process if the database is not already existing. Did you use this or did you import the database otherwise? Seems like there are more queries using the configured charset.

Link to comment
Share on other sites

We solved it eventually by reinstalling ProcessWire, then copying the new stuff under /site (and importing the database). It worked, except that we have a different problem now. I'll start a new thread.

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...