Page 2 of 2

Re: Can't get past SUPERUSER SETTING in installation

Posted: Wed 12. Aug 2009, 17:10
by yorkshire_boy1
Hi, I had this problem again (it happens every year or so when I install a new version of phpwcms on a new clients server).

For the benefit of others, Oliver is right when he says the MySQL has probably been set up in strict mode. This is my problem every time, because I use shared servers via a hosting company, and they set up all their MySQL databases with Strict Mode ON.

Strict mode causes problems when phpwcms tries to connect to the database, because the database in strict mode expects certain rules to be followed, and not all phpwcms scripts follow these rules.

Earlier versions of phpwcms seemed to get past this Superuser setup stage even with Strict mode set to ON. But then failed when you try to add articles or content (structure inside admin would work fine).

Now with these recent releases, I am getting stuck on the install stage. If like me you cannot make changes to the strict mode setting, you can use a work around, that sets a compatibility mode, each and every time phpwcms makes a connection to the database.

Oliver: there is probably a good reason why you don't promote this work around, or why you do not include it as standard, but my technical knowledge is such that I do not know what that reason is!Could you add a note on the install process, that says something like "If you are unable to move past the Superuser creation, please follow this link for a work around"!

The work around, which i have been using the last 4 years is as follows:

In include/inc_lib/dbcon.inc.php, at around line 50, you should see:

Code: Select all

// set DB to compatible mode
after this, add:

Code: Select all

@mysql_query("SET SQL_MODE='MYSQL40'", $db);
Close all your browsers, and run the setup again - should work fine. If you managed to get past the install in the first place, you should now be able to create articles and content parts properly.