Installation Problems

Having trouble installing serendipity?
Post Reply
Aric

Installation Problems

Post by Aric »

Hi, just trying to get this going and I run into the following installation problems:
Serendipity installation


Attemping to setup database...
Checking to see if the database is already in place. If you see a database query error here, ignore it... Done
Creating default database setup... Done
Table 'ritp_blog.blogconfig' doesn't exist Done creating database
Attemping to write /usr/home/aric/public_html/rightinthepink.com/serendipity/.htaccess file...Done

Warning: Invalid argument supplied for foreach() in /usr/home/aric/public_html/rightinthepink.com/serendipity/serendipity_sidebar_items.php on line 688

Serendipity was successfully installed on your system.
Please remember your password: "*****", your username is "Admin".

You can find your new PHP blog right here
Table 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't existTable 'ritp_blog.blogconfig' doesn't exist
Configuration written & saved
And just for curiosity afterwards, I checked the blog homepage and it just says:
Query failed: Table 'ritp_blog.blogentries' doesn't exist
Only 2 tables are actually being created: 'blogentrycat' and 'blogsuppress'.
I noticed on an unrelated script earlier tonight, that there was also a foreach() php error with an invalid argument supplied. Is this a PHP 5 thing?

Here's the output from phpinfo():
http://www.wyldnet.com/phpinfo.php

Any help would be appreciated :)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Installation Problems

Post by garvinhicking »

Which version of Serendipity did you try to install?

It's very weird that two tables are created, but none of the others -- which Database and database version are you using? And which dbType did you select within Serendipity?

Regards,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Aric

Post by Aric »

Serendipity v0.7.1

MySQL 4.0.20

MySQL was selected in the setup as dbType.

Very odd indeed...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hm, could you please edit the file 'serendipity_functions_installer.inc.php'. Go to the function serendipity_installDatabase() at about line 522. There you will find this block:

Code: Select all

    // Create tables
    $queries = serendipity_parse_sql_tables($serendipity['serendipityPath'] . 'sql/db.sql');
    $queries = str_replace('{PREFIX}', $_POST['dbPrefix'], $queries);

    foreach ($queries as $query) {
        serendipity_db_schema_import($query);
    }
please modify this to:

Code: Select all

    // Create tables
    $queries = serendipity_parse_sql_tables($serendipity['serendipityPath'] . 'sql/db.sql');
    $queries = str_replace('{PREFIX}', $_POST['dbPrefix'], $queries);
    
    echo '<pre>';
    print_r($queries);
    echo '</pre><hr />';
    foreach ($queries as $query) {
        echo 'Using Query <pre>' . $query . '</pre><br />';
        serendipity_db_schema_import($query);
        echo 'Error: ' . mysql_error() . '<br />';
    }
Then run the installer again, it should output more verbose error messages. Please report back witht hose error message so we can fix it together :)
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

Attemping to setup database...
Checking to see if the database is already in place. If you see a database query error here, ignore it... Done
Creating default database setup...

Array
(
[0] => create table blog_authors (username varchar(20) default null,password varchar(32) default null,authorid {AUTOINCREMENT} {PRIMARY},mail_comments int(1) default \'1\',mail_trackbacks int(1) default \'1\',email varchar(128) not null default \'\',userlevel int(4) {UNSIGNED} not null default \'0\',right_publish int(1) default \'1\');
[1] => create table blog_comments (id {AUTOINCREMENT} {PRIMARY},entry_id int(10) {UNSIGNED} not null default \'0\',parent_id int(10) {UNSIGNED} not null default \'0\',timestamp int(10) {UNSIGNED} default null,title varchar(150) default null,author varchar(80) default null,email varchar(200) default null,url varchar(200) default null,ip varchar(15) default null,body text,type varchar(100) default \'regular\',subscribed {BOOLEAN},status varchar(50) not null);
[2] => CREATE {FULLTEXT} INDEX body_idx on blog_comments (body);
[3] => create table blog_entries (id {AUTOINCREMENT} {PRIMARY},title varchar(200) default null,timestamp int(10) {UNSIGNED} default null,body text,comments int(4) {UNSIGNED} default \'0\',trackbacks int(4) {UNSIGNED} default \'0\',extended text,exflag int(1) default null,author varchar(20) default null,authorid int(11) default null,isdraft {BOOLEAN},allow_comments {BOOLEAN},last_modified int(10) {UNSIGNED} default null,moderate_comments {BOOLEAN});
[4] => create table blog_references (id {AUTOINCREMENT} {PRIMARY},entry_id int(10) {UNSIGNED} not null default \'0\',link text,name text);
[5] => CREATE TABLE blog_exits (entry_id int(11) NOT NULL default \'0\',day date NOT NULL,count int(11) NOT NULL default \'0\',scheme varchar(5),host varchar(128) NOT NULL,port varchar(5),path varchar(255),query varchar(255),PRIMARY KEY (host,day,entry_id));
[6] => CREATE TABLE blog_referrers (entry_id int(11) NOT NULL default \'0\',day date NOT NULL,count int(11) NOT NULL default \'0\',scheme varchar(5),host varchar(128) NOT NULL,port varchar(5),path varchar(255),query varchar(255),PRIMARY KEY (host,day,entry_id));
[7] => create table blog_config (name varchar(255) not null,value text not null,authorid int(11) default \'0\');
[8] => CREATE TABLE blog_suppress (ip varchar(15) default NULL,scheme varchar(5),host varchar(128),port varchar(5),path varchar(255),query varchar(255),last timestamp NOT NULL);
[9] => CREATE unique INDEX url_idx on blog_suppress (host, ip);
[10] => CREATE TABLE blog_plugins (name varchar(128) not null,placement varchar(6) not null default \'right\',sort_order int(4) not null default \'0\',authorid int(11) default \'0\',PRIMARY KEY(name));
[11] => CREATE TABLE blog_category (categoryid {AUTOINCREMENT} {PRIMARY},category_name varchar(255) default NULL,category_icon varchar(255) default NULL,category_description text,authorid int(11) default NULL,category_left int(11) default \'0\',category_right int(11) default \'0\',parentid int(11) DEFAULT \'0\' NOT NULL);
[12] => CREATE TABLE blog_images (id {AUTOINCREMENT} {PRIMARY},name varchar(255) not null default \'\',extension varchar(5) not null default \'\',mime varchar(255) not null default \'\',size int(11) not null default \'0\',dimensions_width int(11) not null default \'0\',dimensions_height int(11) not null default \'0\',date int(11) not null default \'0\',thumbnail_name varchar(255) not null default \'\',authorid int(11) default \'0\',path text);
[13] => CREATE {FULLTEXT} INDEX pathkey_idx on blog_images (path);
[14] => CREATE TABLE blog_entrycat (entryid int(11) not null,categoryid int(11) not null);
[15] => CREATE UNIQUE INDEX entryid_idx ON blog_entrycat (entryid, categoryid);
)

Using Query

create table blog_authors (username varchar(20) default null,password varchar(32) default null,authorid {AUTOINCREMENT} {PRIMARY},mail_comments int(1) default \'1\',mail_trackbacks int(1) default \'1\',email varchar(128) not null default \'\',userlevel int(4) {UNSIGNED} not null default \'0\',right_publish int(1) default \'1\');

Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '\'1\',mail_trackbacks int(1) default \'1\',email varchar(128) n
Using Query
Same basic \errors\ for each table.

I noticed too in the config before installing, for the blog title it says
John Doe\'s Blog
in the textbox... should the slash really be there when it displays?

Sidenote, while checking out another script earlier, I noticed it would escape all single quotes in the display too even though the script detected magic_quotes etc...
Aric

Post by Aric »

Ok I got it to install by adding

Code: Select all

set_magic_quotes_runtime(0);
to the top of the file... my question is, will there be lots of other instances where I'd need this? I would turn off magic_quotes_runtime but I'm affraid it will screw up any other scripts I have.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Okay, you are right with setting this value. Usually this setting is switched to Off by default in 99% of all PHP installations, and I don't know a single script which requires those quotes - I guess about 60-70% of all PHP scripts will fail having magic_quotes_runtime enabled...so you'll probably be much better of to globally change it.

However, I don't know which scripts you're using, so you need to investigate if the change breaks something obvious...

Another way would be to edit the .htaccess file within the Serendipity directory and put a 'php_flag magic_quotes_runtime Off' (or was it 'php_admin_flag magic_quotes_runtime Off' -- can't remember) into the file, so that you only "fix" it for Serendipity and not the other scripts.

Regards,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply