From: Cameron B. <ga...@in...> - 2003-03-02 00:01:13
|
> > >>i am using the latest phpwiki from cvs as of about 2hours ago (thats ho= w >> >>long its taken me to get this far) >> >> >>lib/WikiDB/backend/PearDB.php:681: Fatal[256]: wikidb_backend_pgsql:=20 >>fatal database error >> >> * DB Error: unknown error >> * (UPDATE page SET hits=3D0, >> pagedata=3D'a:1:{s:12:"_cached_html";s:875:"x=DA=95UMo=DBF=10=BD=EB= W=0Cx=08Z@=90L)v=E2=95k >> hQ=B4@=D2=A4=A9=8A=1E=83=159=127Z=EE=B2=DC=A1=14=D5=F0?=EF=9B=A5=E5= =F6=D0=BA=EEMZ=0Eg=DE=BE=8F=E1{S^=9ABz=1B=D26=F6-=D7=C2_=A40Ks=97 >> =1E|=92S=C7=C5=EA=BD)_=99=A2=B3;=D6=FF=9F=8En=EF=C6=BA=0Bsw=9F=CC= 5 >> * 76=B1=16=14=ABd=CA=D2=14o=EA=DA=85=DD=07=9C$=3Dz=8D=92*=06=E1 >> =C5=CA=EA=D0;g.=B4=F6=EA=C2=147=B5;P=E5mJ=DF=14=8F=CDoo=BA=F3=99=B8= ]=83W=ED=C63I=EC=8A=DBu$[=D7d)=F0=91t,=8E=E97=BC9%=EB=3D=9D=E2@=8D=3D=E4=D3= : >> =92KT=C5=96i=E8=E8=E8=A4!;i=D9=06=C0=DB=0E=9E=C4=89=E7)U=B6sb=BD=FB= =83s=07i=98=8E=B1=AF=13=D9PO=8A=953=A5=B2 >> >> >>i get that when it does "Loading up virgin wiki" >> =20 >> > >Thanks for the report. Sorry for the trouble. > =20 > fact of life with free software >It may be a quote problem as you suggest or may be character encoding >problem. (Pagedata is currently a TEXT, so postgres might be trying >to interpret it as UTF-8? (I'm not a postgres expert)) > =20 > I'm not certain on this but i THINK pgsql requires to be sent a query=20 that tells it to use 'sql standard' quoting rather than addslashes so i=20 think this is where the issue comes in. TEXT column's have no issue=20 storing binary data. (I dont normally use PEAR so I dont know exactly=20 whats causing the problems) >I'll look into the problem further, but probably not until monday. > > >As a quick hack, if you want to get something up, you can try disabling >compression of the cached data. If you look near the top of >lib/CachedMarkup.php, there are two tests for >function_exists('gzcompress'). >If you replace those by false's, that should defeat the compression. > >(Then wipe your SQL database, and try again...) > =20 > I highly suggest making that a install time configuration value, its=20 good for disk space but not brilliant for speeds in most cases and also=20 bad for stuff like this. PHP obviously also supports bzip2 as well as=20 gzip, might be worth adding for those with limited space. Next issue on the list, i now goto index.php after loading the virgin=20 wiki as it so put it and i get nothing (blank document, no html at all).=20 I added an echo into simpleQuery() into pear's pgsql.php and got this SELECT * FROM page WHERE pagename=3D'global_data' BEGIN WORK LOCK TABLE page LOCK TABLE version LOCK TABLE link LOCK TABLE recent LOCK TABLE nonempty SELECT latestversion FROM page, recent WHERE page.id=3Drecent.id AND pag= ename=3D'HomePage' SELECT * FROM page, version WHERE page.id=3Dversion.id AND pagename=3D'H= omePage' AND version=3D1 COMMIT WORK its obviously doing something, just not sure what *grin* adding=20 ob_implicit_flush() gives me nothing useful. also nothing is found in=20 error_log. Just a suggestion on above, you can probably SELECT * FROM page, version WHERE page.id=3Dversion.id AND=20 pagename=3D'HomePage' ORDER BY version DESC LIMIT 1 to get latest version of a document and save a query. Also just a note, for optimize() in pgsql.php it would be better to do=20 VACUUM FULL $table then ANALYZE $table, vacuum full will lock the table=20 completely tho and is slower,=20 http://www.postgresql.org/docs/view.php?version=3D7.3&idoc=3D1&file=3Dsql= -vacuum.html=20 for more info. Also I am curious why the LOCK TABLE's in the code? I would have thought=20 a transaction would have been sufficient? (by all means correct me if im=20 wrong) And last but not least, the file storage format wont work for me :(=20 figured it might be an easy replacement for pgsql and be lightweight in=20 comparison but obviously not yet. If anyone wants help with the file=20 class I might have some time to work on them and help get it working. Cameron Brunner inetsalestech.com |