Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-08-14 06:52:15

Skubidu
Archived Plugin Author
Registered: 2004-10-23
Posts: 611
Website

Parse error on clean install

I tried a clean install of the latest revision an get this error when trying to start the setup:

Parse error: syntax error, unexpected ')', expecting ',' or ';' in /www/my/path/txptest/textpattern/setup/index.php on line 232

Offline

#2 2006-08-14 07:03:35

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Parse error on clean install

Try r1694.

Offline

#3 2006-08-14 07:13:54

Skubidu
Archived Plugin Author
Registered: 2004-10-23
Posts: 611
Website

Re: Parse error on clean install

now the setup works fine, but I get these warnings after the first login (they are gone after a page refresh):


Warning: Duplicate entry '1-override_emailcharset' for key 1 insert into txptest_txp_prefs set name='override_emailcharset', val='0', prefs_id='1', type='1', event='admin', position='211', html='yesnoradio' in /www/htdocs/my/path/txptest/textpattern/lib/txplib_db.php on line 84

Warning: Table 'myname.txptest_txp_priv' doesn't exist DESCRIBE `txptest_txp_priv` in /www/htdocs/my/path/txptest/textpattern/lib/txplib_db.php on line 84

Warning: 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 ' name='plugin_cache_dir'' at line 1 select name from txptest_txp_prefs as txp_prefs where prefs_id=1, name='plugin_cache_dir' in /www/htdocs/my/path/txptest/textpattern/lib/txplib_db.php on line 84

Last edited by Skubidu (2006-08-14 07:17:43)

Offline

#4 2006-08-14 07:48:21

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Parse error on clean install

I get them too. Not sure when they crept in…

Offline

#5 2006-08-17 19:04:21

baby
Plugin Author
From: Buenos Aires, Argentina
Registered: 2005-10-16
Posts: 95
Website

Re: Parse error on clean install

sorry for the AOL -ness but… I have to say… errr… ME TOO!
:-)

I’m using r1728 on fedora…

A tiny pointer… I still don’t understand what might be producing this… I’ve been grep ing around for the INSERT that produces this and found that within setup/txpsql.php I have a line like this:
<pre>
$create_sql[] = “INSERT INTO `”.PFX.“txp_prefs` VALUES (1, ‘override_emailcharset’, ‘0’, 1, ‘admin’, ‘yesnoradio’, 21)”;
</pre>

The entry in my database is:
<pre>
1 override_emailcharset 0 1 admin yesnoradio 21
</pre>

which might very well have been inserted by this… BUT, the error message says:

Warning: Duplicate entry ’1-override_emailcharset’ for key 1 insert into sawk_txp_prefs set name=‘override_emailcharset’, val=‘0’, prefs_id=‘1’, type=‘1’, event=‘admin’, position=‘211’, html=‘yesnoradio’ in /var/www/html/txp-pruebas/textpattern/lib/txplib_db.php on line 84

Notice that it’s trying to insert an almost identical record, safe for the position attribute which is 211 instead of the 21 already inserted…

However… I even grep ed for the 211 string and didn’t find a match…

Now, when I grep for override_emailcharset I find another INSERT for this in update/_to_1.0.0.php that says:
<pre> // 1.0: add option to override charset for emails (ISO-8559-1 instead of UTF-8) if (!safe_field(‘val’,‘txp_prefs’,“name=‘override_emailcharset’”)) { safe_insert(‘txp_prefs’,“name=‘override_emailcharset’, val=‘0’, prefs_id=‘1’, type=‘1’, event=‘admin’, position=’”.doSlash($maxpos).”’, html=‘yesnoradio’”); }

</pre>

This is really consistent with the error message, but I understand that update/_to_1.0.0.php should not be called during a clean install… or is it?

Anyone who really knows might add some light in here…

HTH

Last edited by baby (2006-08-17 19:06:07)


Mariano AbsatzEl Baby

I don’t suffer from insanity. I enjoy every minute of it.

Offline

#6 2006-08-17 19:26:08

baby
Plugin Author
From: Buenos Aires, Argentina
Registered: 2005-10-16
Posts: 95
Website

Re: Parse error on clean install

Now that I grep a little further… the other two errors are also consistent with the contents in update/_to_1.0.0.php (I’m adding excerpts with line numbers)…

The duplicate key in insert already noted:
<pre> 640 // 1.0: add option to override charset for emails (ISO-8559-1 instead of UTF-8) 641 if (!safe_field(‘val’,‘txp_prefs’,“name=‘override_emailcharset’”)) 642 { 643 safe_insert(‘txp_prefs’,“name=‘override_emailcharset’, val=‘0’, prefs_id=‘1’, type=‘1’, event=‘admin’, position=’”.doSlash($maxpos).”’, html=‘yes noradio’”); 644 }
</pre>

The failed DESCRIBE (hint: it’s the only /describe/ spelled upcase in the whole package):
<pre> 675 // RC4: adding privs table 676 677 if (!safe_query(“DESCRIBE `”.PFX.“txp_priv`”)) { 678 safe_query(“CREATE TABLE `”.PFX.“txp_priv` ( 679 `id` INT NOT NULL AUTO_INCREMENT , 680 `priv` VARCHAR NOT NULL , 681 `1` TINYINT NOT NULL , 682 `2` TINYINT NOT NULL , 683 `3` TINYINT NOT NULL , 684 `4` TINYINT NOT NULL , 685 `5` TINYINT NOT NULL , 686 `6` TINYINT NOT NULL , 687 PRIMARY KEY ( `id` ) 688 ) $tabletype”);
</pre>

The MySQL syntax error (the quoting in line 715 seems to be wrong):
<pre> 715 if (!safe_field(‘name’, ‘txp_prefs’, “prefs_id=1, name=‘plugin_cache_dir’”)) { 716 $maxpos = safe_field(‘max(position)’, ‘txp_prefs’, ‘1’); 717 safe_insert(‘txp_prefs’,“name=‘plugin_cache_dir’, val=’‘, prefs_id=‘1’, type=‘1’, event=‘admin’, position=’”.doSlash($maxpos).”’, html=‘text_inpu t’”); 718 }
</pre>

I’m using r1728update/_to_1.0.0.php is at r984.

The newest file in update is
update/_to_4.0.4.php
at r1693 (by zem)
and the newest file in setup is
setup/txpsql.php
at r1696 (by mary).


Mariano AbsatzEl Baby

I don’t suffer from insanity. I enjoy every minute of it.

Offline

#7 2006-08-18 00:59:04

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Parse error on clean install

Yes. What’s happened is, these bugs have actually be around for a while, but certain changes in svn have made them declare themselves properly. Don’t worry, it’ll be fixed. :)

Offline

Board footer

Powered by FluxBB