You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(21) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(136) |
Feb
(104) |
Mar
(80) |
Apr
(21) |
May
(36) |
Jun
(18) |
Jul
(22) |
Aug
(5) |
Sep
(11) |
Oct
(7) |
Nov
(3) |
Dec
(12) |
2004 |
Jan
(5) |
Feb
|
Mar
(3) |
Apr
(1) |
May
|
Jun
(1) |
Jul
(3) |
Aug
(6) |
Sep
(3) |
Oct
(4) |
Nov
(4) |
Dec
|
2005 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(7) |
May
(4) |
Jun
(7) |
Jul
(4) |
Aug
(4) |
Sep
|
Oct
(8) |
Nov
(4) |
Dec
(1) |
2006 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
(4) |
May
|
Jun
(6) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(3) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
(4) |
Mar
(7) |
Apr
(4) |
May
(4) |
Jun
(8) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Jakub A. <jak...@se...> - 2003-01-28 18:06:29
|
Mitra, your code in include/zids.php3 is nice formatted and commented. I only do not understand why you did not use the PHPdoc formatting described in this list? Are you going to use it in the future or do you have some reason against? And I didn't find a remark about the author (which I assume is just you) of the file. Jakub |
From: Marek T. <ma...@gn...> - 2003-01-27 11:38:40
|
> But ... lets not lose site of the original question - can we delete > aadb.sql from the system and remove it from the documentation! We > don't need the wizzard before we do that. I'd say "YES" YES. YES YES YES !!!!!!! Yes Yes Yes Yes Yes Yes YesYes Yes Yes Yes Yes Is there anything more I could do ? |
From: Norbert B. <br...@ch...> - 2003-01-26 22:46:58
|
Mitra,=20 I am testing current AA code and it seems that there were some changes = in view conditions introduced (perhaps related to zids?). Here is link to a view which works (it just displays _#HEADLINE field = from its slice) http://www.changenet.sk/aa/view.php3?vid=3D302&cmd[302]=3Dx-302-44786&noc= ache=3D1 This view used to display nothing when I passed no short item id to it: http://www.changenet.sk/aa/view.php3?vid=3D302&cmd[302]=3Dx-302-&nocache=3D= 1 but now (with fresh code from CVS) I am getting error message: Database error: Invalid SQL: SELECT * FROM item WHERE short_id IN () MySQL Error: 1064 (You have an error in your SQL syntax near ')' at line = 1) Please contact te...@ch... and report the exact error message. Session halted. norbert br...@ch... |
From: Mitra <mi...@mi...> - 2003-01-25 13:48:03
|
Well spotted! I get similar results (and those two "huh" should be "huhl", 've got Array ( [16] =3D> 3652 [15] =3D> 15 ) packed Array ( [32] =3D> 3652 [30] =3D> 15 ) unpacked - Mitra At 2:43 PM +0100 25/1/03, Honza Malik wrote: >Hi Mitra, > > I did some more testing on ids and now I know, where the problem is. >The new_id() is OK - it returns allways 32 character long id, but >sometimes it return id with ...20 at the end. Packed '20' is space and >this is problem, because if you insert 16 characters long packed id >ending with space into MySQL and then you get it back, the id is 15 >character long. > >MySQL REMOVES ENDING SPACES FROM INSERTED STRING! > >I will fix new_id() to not generate such ids. > > >On P=E1, 2003-01-24 at 12:28, Mitra wrote: >> Ok - stranger .... my guess was wrong, md5 returns a 32 character >> string, which cannot contain 00 or 27 so cannot end up as a shorter >> string. >> >> To test, I ran a loop through 99999 samples of new_id, which should >> have generated about 400 bad ids by your statistics. >> >> I think the bad ids in your database must be the result of some buggy >> earlier code. >> >> Lets try three things. >> 1: Please check my test - appended at the end of this message. > >I test it and all 99999 ids are 32 characters long. > >> 2: Please re-run your test, see if the number of bad ids has gone up, >> if there is something bad then as long as you have created more than >> 256 ids then statistically it should have increased by 1 or more. > >Increased: [16] =3D> 92254 [15] =3D> 367 [14] =3D> 4 > >> 3: Please send the code for your test, I'll run it on my installation >> and see how many odd length ids I have. > >require "include/config.php3"; >require $GLOBALS[AA_INC_PATH]."util.php3"; >require $GLOBALS[AA_INC_PATH]."locsessi.php3"; > >$db =3D new DB_AA; > >$db->query( "SELECT id from item" ); >while($db->next_record()) { > $fromdb[$len_p =3D strlen($db->f('id'))]++; > $unpdb[$len_u =3D strlen(unpack_id($db->f('id')))]++; >// if( $len_p<16 ) >// echo "<br>".$db->f('id'); >} > >huh($fromdb, 'packed'); >huh($unpdb, 'unpacked'); > >echo " > > Regards > Honza "; > > > > > > - Mitra > > > > > > At 11:55 PM +0100 22/1/03, Honza Malik wrote: > > > >3) Your assumption that packed ids are EXACTLY 16 characters long (= and >> > >unpacked are EXACTLY 32 characters long) is unfortunately wrong. I c= an't >> > >say you why - we generate the ids by new_id() function, but in our >> > >database are packed ids for item 16 (in 91907 items), 15 (366) and 1= 4 >> > >(4) characters long. >> > >> > Strange - because new_id uses "md5" which has to return 128 bits. >> > >> > I wonder if these were ids which generated a leading ascii zero, the >> > ratios look reasonable for this, i.e. 919007/366 =3D 251, which is >> > close to a one in 256 chance, i.e. something that occurred when 8 >> > bits (2^8=3D256) all were zero. This makes sense if we assume that >> > md5 returns a number which the ereg in new_id casts as a string, and >> > so ignores the leading zero. >> > >> > I've fixed zids.php3 to allow 12..16 character packed ids, and 24..32 >> > long, but this could break my tagged ids. I've also fixed >> > util.php3.new_id to only return a string of exactly 16 chars. >> > >> > > >5) In zids.php3 you wrote: >> >> > >> >> >function id_t2l(&$str) { >> >> >#TODO: Look online for quicker way to substr last 32 chars - mitra >> >> > if (ereg("(.*)([0-9a-f]{32})",$str,$parts)) >> >> > return $parts[2]; >> >> > >> >> >The quicker way is: substr($str, -32), but see 3) >> >> >> >> Ok - I'll make this 24..32, and I guess we can't use tags that end i= n >> >> a hex character [0-9a-f) >> > >> >Or you can use some delimeter (tag:unpacked_id). As I write before, we >> >never use tags so far, so the syntax is on your choice. >> >> >> require "../include/config.php3"; >> require $GLOBALS[AA_INC_PATH]."util.php3"; >> >> $i =3D 0; >> $j=3D 99999; >> print "<br>Testing start, loops=3D$j: sample=3D"; > > $foo =3D new_id(); >> print $foo; >> while ($i++ < $j) { >> $foo =3D new_id(); >> if (strlen($foo) !=3D 32) print "<br>FOO:$i:$foo:strlen=3D".strlen($foo)= ; >> if (strlen(pack_id($foo)) !=3D 16) print "<br>FOO:$i:$foo:packed >> strlen=3D".strlen(\ >> pack_id($foo)); >> } >> print "<br>Testing end sample =3D "; >> $foo =3D new_id(); >> print $foo; >> >> print "Done\n"; >> > > > >------------------------------------------------------- >This SF.NET email is sponsored by: >SourceForge Enterprise Edition + IBM + LinuxWorld http://www.vasoftware.com >_______________________________________________ >Apc-aa-coders mailing list >Apc...@li... >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Honza M. <hon...@ec...> - 2003-01-25 13:25:52
|
Hi Mitra, I did some more testing on ids and now I know, where the problem is. The new_id() is OK - it returns allways 32 character long id, but sometimes it return id with ...20 at the end. Packed '20' is space and this is problem, because if you insert 16 characters long packed id ending with space into MySQL and then you get it back, the id is 15 character long.=20 MySQL REMOVES ENDING SPACES FROM INSERTED STRING! I will fix new_id() to not generate such ids. On P=E1, 2003-01-24 at 12:28, Mitra wrote: > Ok - stranger .... my guess was wrong, md5 returns a 32 character=20 > string, which cannot contain 00 or 27 so cannot end up as a shorter=20 > string. >=20 > To test, I ran a loop through 99999 samples of new_id, which should=20 > have generated about 400 bad ids by your statistics. >=20 > I think the bad ids in your database must be the result of some buggy=20 > earlier code. >=20 > Lets try three things. > 1: Please check my test - appended at the end of this message. I test it and all 99999 ids are 32 characters long. > 2: Please re-run your test, see if the number of bad ids has gone up,=20 > if there is something bad then as long as you have created more than=20 > 256 ids then statistically it should have increased by 1 or more. Increased: [16] =3D> 92254 [15] =3D> 367 [14] =3D> 4=20 > 3: Please send the code for your test, I'll run it on my installation=20 > and see how many odd length ids I have. require "include/config.php3"; require $GLOBALS[AA_INC_PATH]."util.php3"; require $GLOBALS[AA_INC_PATH]."locsessi.php3";=20 $db =3D new DB_AA; $db->query( "SELECT id from item" ); while($db->next_record()) { $fromdb[$len_p =3D strlen($db->f('id'))]++; $unpdb[$len_u =3D strlen(unpack_id($db->f('id')))]++; // if( $len_p<16 ) // echo "<br>".$db->f('id'); } =20 huh($fromdb, 'packed'); huh($unpdb, 'unpacked'); echo " Regards Honza "; >=20 > - Mitra >=20 >=20 > At 11:55 PM +0100 22/1/03, Honza Malik wrote: > > >3) Your assumption that packed ids are EXACTLY 16 characters long (= and > > >unpacked are EXACTLY 32 characters long) is unfortunately wrong. I = can't > > >say you why - we generate the ids by new_id() function, but in our > > >database are packed ids for item 16 (in 91907 items), 15 (366) and = 14 > > >(4) characters long. > > > > Strange - because new_id uses "md5" which has to return 128 bits. > > > > I wonder if these were ids which generated a leading ascii zero, the > > ratios look reasonable for this, i.e. 919007/366 =3D 251, which is > > close to a one in 256 chance, i.e. something that occurred when 8 > > bits (2^8=3D256) all were zero. This makes sense if we assume tha= t > > md5 returns a number which the ereg in new_id casts as a string, and > > so ignores the leading zero. > > > > I've fixed zids.php3 to allow 12..16 character packed ids, and 24..3= 2 > > long, but this could break my tagged ids. I've also fixed > > util.php3.new_id to only return a string of exactly 16 chars. > > > > > >5) In zids.php3 you wrote: > >> > > >> >function id_t2l(&$str) { > >> >#TODO: Look online for quicker way to substr last 32 chars - mitra > >> > if (ereg("(.*)([0-9a-f]{32})",$str,$parts)) > >> > return $parts[2]; > >> > > >> >The quicker way is: substr($str, -32), but see 3) > >> > >> Ok - I'll make this 24..32, and I guess we can't use tags that end = in > >> a hex character [0-9a-f) > > > >Or you can use some delimeter (tag:unpacked_id). As I write before, we > >never use tags so far, so the syntax is on your choice. >=20 >=20 > require "../include/config.php3"; > require $GLOBALS[AA_INC_PATH]."util.php3"; >=20 > $i =3D 0; > $j=3D 99999; > print "<br>Testing start, loops=3D$j: sample=3D"; > $foo =3D new_id(); > print $foo; > while ($i++ < $j) { > $foo =3D new_id(); > if (strlen($foo) !=3D 32) print "<br>FOO:$i:$foo:strlen=3D".strlen($foo= ); > if (strlen(pack_id($foo)) !=3D 16) print "<br>FOO:$i:$foo:packed=20 > strlen=3D".strlen(\ > pack_id($foo)); > } > print "<br>Testing end sample =3D "; > $foo =3D new_id(); > print $foo; >=20 > print "Done\n"; >=20 |
From: Mitra <mi...@mi...> - 2003-01-25 07:43:16
|
it looks like the m_gettext conversion is incomplete, I keep hitting places where L_ constants aren't defined, and a quick grep finds 156 occurances Of these 76 in oldDb2Db which I presume are intentionally not converted - some are even in places like admin/itemedit.php3. What do we need to do about this? For now, I've restored the en_site_lang.php3 file, since its catching me in the site module. If other people are seeing L_ strings appearing all over the place they might want to do the same thing! I've also put en_news_lang.php3 back into the CVS distribution so that at least we have a reference to what the other strings are supposed to be, I'll probably put it back into config.php3 on my sites as well. Jakub - are you still working on fixing these, - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Mitra <mi...@mi...> - 2003-01-24 22:11:22
|
This sounds like a good idea. Since in practice the admin script probably won't be deleted / moved, I would suggest that the script generates config_new.php3, and that this has to be renamed as config.php3 manually. But ... lets not lose site of the original question - can we delete aadb.sql from the system and remove it from the documentation! We don't need the wizzard before we do that. - Mitra At 9:59 PM +0530 24/1/03, Ram Prasad wrote: >Few applications like movabletype, have a wizard to do the initial >configuration. After which the sysadmin is required to rename/delete the >wizard file. > >We could have a setup_init.php3, for example, which will create the initial >config.php3 ( it could ask for the DB parameters .. etc). After completing >( or after a test of connectivity to the DB), the script could be deleted or >moved. > >- Ram >----- Original Message ----- >From: "Jakub Adamek" <jak...@se...> >To: "'Ram Prasad'" <ra...@pa...>; "'Mitra'" <mi...@mi...>; ><apc...@so...> >Sent: Friday, January 24, 2003 9:52 PM >Subject: RE: [Apc-aa-coders] Abandoning aadb.sql > > >> Perhaps this approach may work: Let some script generate code into a >> text area, which the superadmin copies manually into config.php3. >> >> Jakub >> >> > -----Original Message----- >> > From: apc...@li... >> > [mailto:apc...@li...] On Behalf >> > Of Ram Prasad >> > Sent: Thursday, January 23, 2003 8:00 PM >> > To: 'Mitra'; apc...@so... >> > Subject: RE: [Apc-aa-coders] Abandoning aadb.sql >> > >> > >> > Also, it would be nice if we have a page to set up the initial >> > configuration. This way, the config.php3 can be set using the web >> > interface, which can then be used to configure apc-aa. >> > >> > - Ram >> > >> > -----Original Message----- >> > From: apc...@li... >> > [mailto:apc...@li...] On Behalf Of Mitra >> > Sent: Thursday, January 23, 2003 1:24 PM >> > To: apc...@so... >> > Subject: [Apc-aa-coders] Abandoning aadb.sql >> > >> > >> > I'm just installing APC-AA on a machine where I do not have any kind >> > of shell access. This is going to be the case for many potential >> > users of apc-aa. >> > >> > So of course, I could not follow the directions, which depend on shell >> > access. > > > > > > Typically all of doc/install-3.html can be skipped, since any > > > competent ISP will have a reasonably recent version of Apache, PHP > > > and MySQL installed. > > > > > > My first install attempt failed since the sysadmin hadn't given ALTER >> > or DROP permissions to MYSQL, but the second attempt worked fine - >> > using sql_update.php3 and then setup.php3 to get it all going. >> > >> > Here are some suggestions >> > 1: Create some test scripts, so that a user can tell if the system is >> > set up correctly, and if not knows what to ask for, I've started with >> > admin/test.htm and admin/test.php which test PHP installation, and >> > Server Side Includes, but it would be great to have something which >> > excercised other common functions and maybe checked PHP options etc? >> > >> > 2: Stop any dependency on aadb.sql, I think that all it does is >> > replicate what sql_update.php3 does anyway, so why have the >> > functionality in two places? Maybe just have setup.php3 run >> > sql_update if the tables don't exist? >> > >> > - Mitra >> > >> > >> > >> > -- >> > Mitra Technology Consulting - www.mitra.biz - mi...@mi... >> > 02-6684-8096 or 0414-648-0722 >> > >> > Life is a Mystery to be Lived, not a Problem to be Solved >> > >> > >> > >> > ------------------------------------------------------- >> > This SF.net email is sponsored by: Scholarships for Techies! Can't >> > afford IT training? All 2003 ictp students receive scholarships. Get >> > hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. >> > www.ictp.com/training/sourceforge.asp >> > _______________________________________________ >> > Apc-aa-coders mailing list > > > Apc...@li... >> > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders >> > >> > >> > >> > >> > ------------------------------------------------------- >> > This SF.NET email is sponsored by: >> > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! >> > http://www.vasoftware.com >> > _______________________________________________ >> > Apc-aa-coders mailing list >> > Apc...@li... >> > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders >> > >> >> >> >> ------------------------------------------------------- >> This SF.NET email is sponsored by: >> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! >> http://www.vasoftware.com >> _______________________________________________ >> Apc-aa-coders mailing list >> Apc...@li... >> https://lists.sourceforge.net/lists/listinfo/apc-aa-coders >> >> > > > >------------------------------------------------------- >This SF.NET email is sponsored by: >SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! >http://www.vasoftware.com >_______________________________________________ >Apc-aa-coders mailing list >Apc...@li... >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Mitra <mi...@mi...> - 2003-01-24 22:09:12
|
At 4:00 PM +0100 24/1/03, Norbert Brazda wrote: >Hi Mitra, > >From: "Mitra" <mi...@mi...> >> Your image upload library looks really useful, timely as I need >> something like ti for a project I'm working on for a community radio >> station. > >We plan to start internet radio (using MUSE and IceCAST) so if you >have any recommendations regarding www interface for listeners or >code to share, I will be happy to hear. > > >> The question .... are GIF's supported - your code recognizes them as >> a supported type but your email said they weren't supported? > >GD library does not support GIF due to some licencing problems. Thus >GIF images could be uploaded into AA but there is no way how to >resize them, etc. OK - that is fine, but it appeared that there was a bug that imagefunc.GetSupportedTypes was pretending it supported GIF's - I was mistaken, the code looks fine. > > Problem 1: Are there simple instructions we could give people (in the >> FAQ and installation docs) for installing GD, since it seems that it >> is not present on most PHP installations. > >It was a bit tricky to install on our server, so we do not have any >general FAQ. But, homepage of GD library is at >http://www.boutell.com/gd/ where GD lib authors wrote: > >Updated PHP Information, 12/27/02: php 4.3.0 is available, and it >includes a version of gd as "standard equipment." I have only taken >a brief preliminary look at it, but it seems to include mainstream >gd fixes up through version 2.0.2, and also includes an alternative >set of image rotation functions. If you wish to use gd with PHP, it >is probably best to get php 4.3.0 and use the included gd library. >However, if you wish to continue using php 4.2.3 but need gd support >for it, see the patching PHP for gd 2.0.8 and up page for important >information. The php maintainers included a statement saying that >their improvements would be contributed back to the "mainstream" gd, >so I look forward to doing so in the near future. I will also look >into preparing a patch for PHP that allows the use of the resulting >release of gd. > >Here is link to the "patching PHP for gd 2.0.8 and up": >http://www.boutell.com/gd/phppatch.html See earlier email ... > > Problem 2: >> .... lets take a typical example . >> >> I'll setup file upload to have parameters image/*:200:100 >> >> So lets say the user uploads an image 400*100, it will get resampled >> to 200*50 which is great. >> >> But ... how do we generate the output HTML , what I'd like to output is >> <IMG SRC="/apc-aa-uploads/12345/foo.jpg" HEIGHT=50 WIDTH=200> >> but I have no way to know that the height and width actually are 50 and 200. > >You are right. Width and height is not supported by Stano`s img >function. Do you really need them? Jakub said >The function is standard in PHP and does not even need GD. It is >getimagesize(). Yes - image support, for uploaded images, has been really hard in APC, Stano's function gets us really close to having easy to use image support. Any good HTML code should set HEIGHT and WIDTH fields so that the HTML can render while waiting for the images to download, so we need an easy way for system administrators to handle and work with images that are uploaded at runtime and so they don't know the WIDTH and HEIGHT of. Jakub has pointed me at the getimagesize() standard PHP function, I can put that into imagefunc, although I was leaving that code to Stano in case he was still working on it. > > > > I can think of several ways around this. > > 1: Have the upload function stuff the resampled height in the > > img_width..... and img_height..... fields > > this is not so clever as there might be multiple images on a form. >> >> 2: Provide an output expansion that gets what is required, I think >> the ideal might be >> {img:width:apc-aa-uploads/12345/foo.jpg} and >> {img:height:apc-aa-uploads/12345/foo.jpg} >> >> So that the output expression becomes simpyl >> <IMG SRC="{img_url.........}" HEIGHT={img:height:{img_url.........}} >> WIDTH={img:width:{img_url.........}}> > > This would give maximum flexibility to output anything extra without >> requiring lots of switches and math in each output? >> >> What do you think - could you provide a couple of functions that take >> a file name and return the width and height ? if so then I'll code >> them into the string expansion code. > >It would be much simpler to manipulate images on output size (when >generating html code for the client), but we wanted to avoid >unnecessary load on server. This is why we decided to resize images >on input (upload). I think its great you are resizing on upload. BUT to keep aspect ratio you can only know for sure ONE of the dimensions - e.g. resizing a 400*200 image into a 200*200 box ends up with a 200*100 image and you have to know this when you output the <IMG SRC=** HEIGHT=** WIDTH=**>. So we need a way INSIDE THE VIEW to find this height and width. > >Caching in AA is really good, so perhaps there is no need to >calculate image dimension on upload side. What others think about >this? Yes - I agree, that we can calculate it when we do the output - although we DO have to worry about speed in AA, if you run AA with standard 10 minute caching, and some part of your site is accessed less often than this, then the speed of AA is EXTREMELY slow, I had to set caching to 2 days, after one client complained that their site ran so slowly. - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Mitra <mi...@mi...> - 2003-01-24 21:53:23
|
Thanks It would be helpful to have instructions for upgrading earlier versions that support GD, our current install instructions say we support even PHP 3.*, we were going to change it to say it supports 4.0.6 and above (to get array_map) but I guess we have to put in the instructions that APC-AA is only fully supported on 4.3.0 and above. For example, I'm installing apc-aa for a community radio station, and their ISP is running PHP4.2.3 - http://bayfm.org/apc-aa/admin/test.php3 - Mitra At 2:20 PM +0100 24/1/03, Marek Tichy wrote: > > The question .... are GIF's supported - your code recognizes them as >> a supported type but your email said they weren't supported? >No longer, and GD authors are quite strict: > >"PLEASE DON'T ASK FOR GIF-BASED VERSIONS OF GD. HARANGUES ABOUT GIF >WILL BE DELETED UNREAD. Thank you! " >http://www.boutell.com/gd/ > >> Problem 1: Are there simple instructions we could give people (in the >> FAQ and installation docs) for installing GD, since it seems that it >> is not present on most PHP installations. > >php 4.3.0 is available, and it includes a version of gd as "standard >equipment." > >Best > Marek > > >------------------------------------------------------- >This SF.NET email is sponsored by: >SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! >http://www.vasoftware.com >_______________________________________________ >Apc-aa-coders mailing list >Apc...@li... >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Ram P. <ra...@pa...> - 2003-01-24 16:28:57
|
Few applications like movabletype, have a wizard to do the initial configuration. After which the sysadmin is required to rename/delete the wizard file. We could have a setup_init.php3, for example, which will create the initial config.php3 ( it could ask for the DB parameters .. etc). After completing ( or after a test of connectivity to the DB), the script could be deleted or moved. - Ram ----- Original Message ----- From: "Jakub Adamek" <jak...@se...> To: "'Ram Prasad'" <ra...@pa...>; "'Mitra'" <mi...@mi...>; <apc...@so...> Sent: Friday, January 24, 2003 9:52 PM Subject: RE: [Apc-aa-coders] Abandoning aadb.sql > Perhaps this approach may work: Let some script generate code into a > text area, which the superadmin copies manually into config.php3. > > Jakub > > > -----Original Message----- > > From: apc...@li... > > [mailto:apc...@li...] On Behalf > > Of Ram Prasad > > Sent: Thursday, January 23, 2003 8:00 PM > > To: 'Mitra'; apc...@so... > > Subject: RE: [Apc-aa-coders] Abandoning aadb.sql > > > > > > Also, it would be nice if we have a page to set up the initial > > configuration. This way, the config.php3 can be set using the web > > interface, which can then be used to configure apc-aa. > > > > - Ram > > > > -----Original Message----- > > From: apc...@li... > > [mailto:apc...@li...] On Behalf Of Mitra > > Sent: Thursday, January 23, 2003 1:24 PM > > To: apc...@so... > > Subject: [Apc-aa-coders] Abandoning aadb.sql > > > > > > I'm just installing APC-AA on a machine where I do not have any kind > > of shell access. This is going to be the case for many potential > > users of apc-aa. > > > > So of course, I could not follow the directions, which depend on shell > > access. > > > > Typically all of doc/install-3.html can be skipped, since any > > competent ISP will have a reasonably recent version of Apache, PHP > > and MySQL installed. > > > > My first install attempt failed since the sysadmin hadn't given ALTER > > or DROP permissions to MYSQL, but the second attempt worked fine - > > using sql_update.php3 and then setup.php3 to get it all going. > > > > Here are some suggestions > > 1: Create some test scripts, so that a user can tell if the system is > > set up correctly, and if not knows what to ask for, I've started with > > admin/test.htm and admin/test.php which test PHP installation, and > > Server Side Includes, but it would be great to have something which > > excercised other common functions and maybe checked PHP options etc? > > > > 2: Stop any dependency on aadb.sql, I think that all it does is > > replicate what sql_update.php3 does anyway, so why have the > > functionality in two places? Maybe just have setup.php3 run > > sql_update if the tables don't exist? > > > > - Mitra > > > > > > > > -- > > Mitra Technology Consulting - www.mitra.biz - mi...@mi... > > 02-6684-8096 or 0414-648-0722 > > > > Life is a Mystery to be Lived, not a Problem to be Solved > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Scholarships for Techies! Can't > > afford IT training? All 2003 ictp students receive scholarships. Get > > hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. > > www.ictp.com/training/sourceforge.asp > > _______________________________________________ > > Apc-aa-coders mailing list > > Apc...@li... > > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders > > > > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: > > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > > http://www.vasoftware.com > > _______________________________________________ > > Apc-aa-coders mailing list > > Apc...@li... > > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders > > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Apc-aa-coders mailing list > Apc...@li... > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders > > |
From: <jak...@se...> - 2003-01-24 16:19:58
|
Perhaps this approach may work: Let some script generate code into a text area, which the superadmin copies manually into config.php3. Jakub > -----Original Message----- > From: apc...@li... > [mailto:apc...@li...] On Behalf > Of Ram Prasad > Sent: Thursday, January 23, 2003 8:00 PM > To: 'Mitra'; apc...@so... > Subject: RE: [Apc-aa-coders] Abandoning aadb.sql > > > Also, it would be nice if we have a page to set up the initial > configuration. This way, the config.php3 can be set using the web > interface, which can then be used to configure apc-aa. > > - Ram > > -----Original Message----- > From: apc...@li... > [mailto:apc...@li...] On Behalf Of Mitra > Sent: Thursday, January 23, 2003 1:24 PM > To: apc...@so... > Subject: [Apc-aa-coders] Abandoning aadb.sql > > > I'm just installing APC-AA on a machine where I do not have any kind > of shell access. This is going to be the case for many potential > users of apc-aa. > > So of course, I could not follow the directions, which depend on shell > access. > > Typically all of doc/install-3.html can be skipped, since any > competent ISP will have a reasonably recent version of Apache, PHP > and MySQL installed. > > My first install attempt failed since the sysadmin hadn't given ALTER > or DROP permissions to MYSQL, but the second attempt worked fine - > using sql_update.php3 and then setup.php3 to get it all going. > > Here are some suggestions > 1: Create some test scripts, so that a user can tell if the system is > set up correctly, and if not knows what to ask for, I've started with > admin/test.htm and admin/test.php which test PHP installation, and > Server Side Includes, but it would be great to have something which > excercised other common functions and maybe checked PHP options etc? > > 2: Stop any dependency on aadb.sql, I think that all it does is > replicate what sql_update.php3 does anyway, so why have the > functionality in two places? Maybe just have setup.php3 run > sql_update if the tables don't exist? > > - Mitra > > > > -- > Mitra Technology Consulting - www.mitra.biz - mi...@mi... > 02-6684-8096 or 0414-648-0722 > > Life is a Mystery to be Lived, not a Problem to be Solved > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Scholarships for Techies! Can't > afford IT training? All 2003 ictp students receive scholarships. Get > hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. > www.ictp.com/training/sourceforge.asp > _______________________________________________ > Apc-aa-coders mailing list > Apc...@li... > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Apc-aa-coders mailing list > Apc...@li... > https://lists.sourceforge.net/lists/listinfo/apc-aa-coders > |
From: <jak...@se...> - 2003-01-24 14:57:46
|
I comitted a few minor changes into CVS, 01/24/01 - bug fix in slicedit.php3, mistyped URL sliceEdit.php3 (Jakub) 01/24/01 - changed design of se_fields.php3 (Jakub) 01/24/01 - added H2 to admin.css (Jakub) Jakub |
From: Marek T. <ma...@gn...> - 2003-01-24 13:18:09
|
> The question .... are GIF's supported - your code recognizes them as > a supported type but your email said they weren't supported? No longer, and GD authors are quite strict: "PLEASE DON'T ASK FOR GIF-BASED VERSIONS OF GD. HARANGUES ABOUT GIF WILL BE DELETED UNREAD. Thank you! " http://www.boutell.com/gd/ > Problem 1: Are there simple instructions we could give people (in the > FAQ and installation docs) for installing GD, since it seems that it > is not present on most PHP installations. php 4.3.0 is available, and it includes a version of gd as "standard equipment." Best Marek |
From: Mitra <mi...@mi...> - 2003-01-24 13:05:37
|
I'm happy to rewrite the installation instructions - in fact, I already did this to give the alternative way of doing it when you don't have shell access (such as with my current project). What I'm hoping for is a consensus to drop aadb.sql so we no longer document it and have to keep supporting it. - Mitra At 12:44 PM +0100 24/1/03, Marek Tichy wrote: >Hi Mitra, >yes, yes, you are indeed right. The aadb.sql file is there for >historical reasons, this file has been there ever since, >while sql_update.php3 was introduced with 1.8 ? (guessing - doesn't >really matter). I think you are just the first one who has noticed >that you can use sql update as well, even if you don't have any >database structure yet. Don't be ashamed of it - great spotting ! >I can rewrite the installation instructions if you want me to do do. >Best > Marek > >-----Original Message----- >From: apc...@li... >[mailto:apc...@li...]On Behalf Of Mitra >Sent: 23 January 2003 22:43 >To: Honza Malik; apc...@so... >Subject: RE: [Apc-aa-coders] Abandoning aadb.sql > >I agree that we don't want write access to the scripts. > >Honza - I'm probably missunderstanding something - what is the point >of aadb.sql ? What function does aadb.sql provide that >sql_update.php3 doesn't? What advantages are there of configuring >apc-aa with aadb.sql rather than via sql_update.php3? > >- Mitra > > >At 9:52 PM +0100 23/1/03, Honza Malik wrote: > >>I agree with droping aadb.sql, mainly if we can quite easily write an >>option for sql_update.php3, which will generate aadb.sql. >> >>I'm not sure about configuration using web interface. It would require >>write access to config.php3. I think we should never give webserver the >>rights to write to any AA script. >> >> Honza >> >> >>On =89t, 2003-01-23 at 19:59, Ram Prasad wrote: >>> Also, it would be nice if we have a page to set up the initial >>> configuration. This way, the config.php3 can be set using the web >>> interface, which can then be used to configure apc-aa. >>> >>> - Ram >>> >>> -----Original Message----- >>> From: apc...@li... >>> [mailto:apc...@li...] On Behalf Of Mitra >>> Sent: Thursday, January 23, 2003 1:24 PM > > To: apc...@so... > > Subject: [Apc-aa-coders] Abandoning aadb.sql > > > > > > I'm just installing APC-AA on a machine where I do not have any kind > > of shell access. This is going to be the case for many potential >> users of apc-aa. >> >> So of course, I could not follow the directions, which depend on shell >> access. >> >> Typically all of doc/install-3.html can be skipped, since any >> competent ISP will have a reasonably recent version of Apache, PHP >> and MySQL installed. >> >> My first install attempt failed since the sysadmin hadn't given ALTER >> or DROP permissions to MYSQL, but the second attempt worked fine - >> using sql_update.php3 and then setup.php3 to get it all going. >> >> Here are some suggestions >> 1: Create some test scripts, so that a user can tell if the system is >> set up correctly, and if not knows what to ask for, I've started with >> admin/test.htm and admin/test.php which test PHP installation, and >> Server Side Includes, but it would be great to have something which >> excercised other common functions and maybe checked PHP options etc? > > > > > > 2: Stop any dependency on aadb.sql, I think that all it does is > > > replicate what sql_update.php3 does anyway, so why have the > > > functionality in two places? Maybe just have setup.php3 run >> sql_update if the tables don't exist? >> >> - Mitra >> >> > > > >------------------------------------------------------- >This SF.NET email is sponsored by: >SourceForge Enterprise Edition + IBM + LinuxWorld http://www.vasoftware.com >_______________________________________________ >Apc-aa-coders mailing list >Apc...@li... >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders > > > >-- >Mitra Technology Consulting - www.mitra.biz - mi...@mi... >02-6684-8096 or 0414-648-0722 > >Life is a Mystery to be Lived, not a Problem to be Solved -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Mitra <mi...@mi...> - 2003-01-24 13:05:34
|
Stanislav Your image upload library looks really useful, timely as I need something like ti for a project I'm working on for a community radio station. One question, and two problems The question .... are GIF's supported - your code recognizes them as a supported type but your email said they weren't supported? Problem 1: Are there simple instructions we could give people (in the FAQ and installation docs) for installing GD, since it seems that it is not present on most PHP installations. Problem 2: .... lets take a typical example . I'll setup file upload to have parameters image/*:200:100 So lets say the user uploads an image 400*100, it will get resampled to 200*50 which is great. But ... how do we generate the output HTML , what I'd like to output is <IMG SRC="/apc-aa-uploads/12345/foo.jpg" HEIGHT=50 WIDTH=200> but I have no way to know that the height and width actually are 50 and 200. I can think of several ways around this. 1: Have the upload function stuff the resampled height in the img_width..... and img_height..... fields this is not so clever as there might be multiple images on a form. 2: Provide an output expansion that gets what is required, I think the ideal might be {img:width:apc-aa-uploads/12345/foo.jpg} and {img:height:apc-aa-uploads/12345/foo.jpg} So that the output expression becomes simpyl <IMG SRC="{img_url.........}" HEIGHT={img:height:{img_url.........}} WIDTH={img:width:{img_url.........}}> This would give maximum flexibility to output anything extra without requiring lots of switches and math in each output? What do you think - could you provide a couple of functions that take a file name and return the width and height ? if so then I'll code them into the string expansion code. - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Marek T. <ma...@gn...> - 2003-01-24 11:42:46
|
RE: [Apc-aa-coders] Abandoning aadb.sqlHi Mitra, yes, yes, you are indeed right. The aadb.sql file is there for historical reasons, this file has been there ever since, while sql_update.php3 was introduced with 1.8 ? (guessing - doesn't really matter). I think you are just the first one who has noticed that you can use sql update as well, even if you don't have any database structure yet. Don't be ashamed of it - great spotting ! I can rewrite the installation instructions if you want me to do do. Best Marek -----Original Message----- From: apc...@li... [mailto:apc...@li...]On Behalf Of Mitra Sent: 23 January 2003 22:43 To: Honza Malik; apc...@so... Subject: RE: [Apc-aa-coders] Abandoning aadb.sql I agree that we don't want write access to the scripts. Honza - I'm probably missunderstanding something - what is the point of aadb.sql ? What function does aadb.sql provide that sql_update.php3 doesn't? What advantages are there of configuring apc-aa with aadb.sql rather than via sql_update.php3? - Mitra At 9:52 PM +0100 23/1/03, Honza Malik wrote: I agree with droping aadb.sql, mainly if we can quite easily write an option for sql_update.php3, which will generate aadb.sql. I'm not sure about configuration using web interface. It would require write access to config.php3. I think we should never give webserver the rights to write to any AA script. Honza On ât, 2003-01-23 at 19:59, Ram Prasad wrote: > Also, it would be nice if we have a page to set up the initial > configuration. This way, the config.php3 can be set using the web > interface, which can then be used to configure apc-aa. > > - Ram > > -----Original Message----- > From: apc...@li... > [mailto:apc...@li...] On Behalf Of Mitra > Sent: Thursday, January 23, 2003 1:24 PM > To: apc...@so... > Subject: [Apc-aa-coders] Abandoning aadb.sql > > > I'm just installing APC-AA on a machine where I do not have any kind > of shell access. This is going to be the case for many potential > users of apc-aa. > > So of course, I could not follow the directions, which depend on shell > access. > > Typically all of doc/install-3.html can be skipped, since any > competent ISP will have a reasonably recent version of Apache, PHP > and MySQL installed. > > My first install attempt failed since the sysadmin hadn't given ALTER > or DROP permissions to MYSQL, but the second attempt worked fine - > using sql_update.php3 and then setup.php3 to get it all going. > > Here are some suggestions > 1: Create some test scripts, so that a user can tell if the system is > set up correctly, and if not knows what to ask for, I've started with > admin/test.htm and admin/test.php which test PHP installation, and > Server Side Includes, but it would be great to have something which > excercised other common functions and maybe checked PHP options etc? > > 2: Stop any dependency on aadb.sql, I think that all it does is > replicate what sql_update.php3 does anyway, so why have the > functionality in two places? Maybe just have setup.php3 run > sql_update if the tables don't exist? > > - Mitra > > ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld http://www.vasoftware.com _______________________________________________ Apc-aa-coders mailing list Apc...@li... https://lists.sourceforge.net/lists/listinfo/apc-aa-coders -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Mitra <mi...@mi...> - 2003-01-24 11:35:41
|
Ok - stranger .... my guess was wrong, md5 returns a 32 character string, which cannot contain 00 or 27 so cannot end up as a shorter string. To test, I ran a loop through 99999 samples of new_id, which should have generated about 400 bad ids by your statistics. I think the bad ids in your database must be the result of some buggy earlier code. Lets try three things. 1: Please check my test - appended at the end of this message. 2: Please re-run your test, see if the number of bad ids has gone up, if there is something bad then as long as you have created more than 256 ids then statistically it should have increased by 1 or more. 3: Please send the code for your test, I'll run it on my installation and see how many odd length ids I have. - Mitra At 11:55 PM +0100 22/1/03, Honza Malik wrote: > >3) Your assumption that packed ids are EXACTLY 16 characters long (and > >unpacked are EXACTLY 32 characters long) is unfortunately wrong. I can't > >say you why - we generate the ids by new_id() function, but in our > >database are packed ids for item 16 (in 91907 items), 15 (366) and 14 > >(4) characters long. > > Strange - because new_id uses "md5" which has to return 128 bits. > > I wonder if these were ids which generated a leading ascii zero, the > ratios look reasonable for this, i.e. 919007/366 = 251, which is > close to a one in 256 chance, i.e. something that occurred when 8 > bits (2^8=256) all were zero. This makes sense if we assume that > md5 returns a number which the ereg in new_id casts as a string, and > so ignores the leading zero. > > I've fixed zids.php3 to allow 12..16 character packed ids, and 24..32 > long, but this could break my tagged ids. I've also fixed > util.php3.new_id to only return a string of exactly 16 chars. > > > >5) In zids.php3 you wrote: >> > >> >function id_t2l(&$str) { >> >#TODO: Look online for quicker way to substr last 32 chars - mitra >> > if (ereg("(.*)([0-9a-f]{32})",$str,$parts)) >> > return $parts[2]; >> > >> >The quicker way is: substr($str, -32), but see 3) >> >> Ok - I'll make this 24..32, and I guess we can't use tags that end in >> a hex character [0-9a-f) > >Or you can use some delimeter (tag:unpacked_id). As I write before, we >never use tags so far, so the syntax is on your choice. require "../include/config.php3"; require $GLOBALS[AA_INC_PATH]."util.php3"; $i = 0; $j= 99999; print "<br>Testing start, loops=$j: sample="; $foo = new_id(); print $foo; while ($i++ < $j) { $foo = new_id(); if (strlen($foo) != 32) print "<br>FOO:$i:$foo:strlen=".strlen($foo); if (strlen(pack_id($foo)) != 16) print "<br>FOO:$i:$foo:packed strlen=".strlen(\ pack_id($foo)); } print "<br>Testing end sample = "; $foo = new_id(); print $foo; print "Done\n"; -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Mitra <mi...@mi...> - 2003-01-23 22:03:04
|
This sounds like a trivial change, but I'm unclear where are all the places that need changing if a change like this is to be made to a key table like view? Maybe this is something you could put in the Developers part of the =46AQ, I know that if I do it, I'll probably miss one place and break something. - Mitra At 9:57 PM +0100 23/1/03, Honza Malik wrote: >It's quite hard to decide, when to count hit and when not by script. The >x-vid-item_id commend is mainly used for fulltext item display, so used >aproximation is not so bad, but I agree it could be improved. The idea >of view parameter sounds good. > > Honza > >On P=E1, 2003-01-17 at 08:39, Mitra wrote: >> I'm doing some work on the flexible Ids that we discussed. >> >> Looking at view.php3, it is very strange in the way it Counts hits - >> where parameters are passed with cmd[]=3Dx-vid-123-456 - >> >> it increments the first item in the view, but not the others, this is >> going to make the first item look much more popular than the others? >> >> Maybe this should be a parameter of the view, overridable in the >> code? So for example as a site editor I might consider that showing >> a list of headlines didn't count as a "display", but showing the >> abstracts did? >> >> - Mitra > > > >------------------------------------------------------- >This SF.NET email is sponsored by: >SourceForge Enterprise Edition + IBM + LinuxWorld http://www.vasoftware.com >_______________________________________________ >Apc-aa-coders mailing list >Apc...@li... >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Mitra <mi...@mi...> - 2003-01-23 21:53:44
|
I agree that we don't want write access to the scripts. Honza - I'm probably missunderstanding something - what is the point of aadb.sql ? What function does aadb.sql provide that sql_update.php3 doesn't? What advantages are there of configuring apc-aa with aadb.sql rather than via sql_update.php3? - Mitra At 9:52 PM +0100 23/1/03, Honza Malik wrote: >I agree with droping aadb.sql, mainly if we can quite easily write an >option for sql_update.php3, which will generate aadb.sql. > >I'm not sure about configuration using web interface. It would require >write access to config.php3. I think we should never give webserver the >rights to write to any AA script. > > Honza > > >On =E2t, 2003-01-23 at 19:59, Ram Prasad wrote: >> Also, it would be nice if we have a page to set up the initial >> configuration. This way, the config.php3 can be set using the web >> interface, which can then be used to configure apc-aa. >> >> - Ram >> >> -----Original Message----- >> From: apc...@li... >> [mailto:apc...@li...] On Behalf Of Mitra >> Sent: Thursday, January 23, 2003 1:24 PM >> To: apc...@so... >> Subject: [Apc-aa-coders] Abandoning aadb.sql >> >> >> I'm just installing APC-AA on a machine where I do not have any kind >> of shell access. This is going to be the case for many potential >> users of apc-aa. >> >> So of course, I could not follow the directions, which depend on shell >> access. >> >> Typically all of doc/install-3.html can be skipped, since any >> competent ISP will have a reasonably recent version of Apache, PHP >> and MySQL installed. >> >> My first install attempt failed since the sysadmin hadn't given ALTER >> or DROP permissions to MYSQL, but the second attempt worked fine - >> using sql_update.php3 and then setup.php3 to get it all going. >> >> Here are some suggestions >> 1: Create some test scripts, so that a user can tell if the system is >> set up correctly, and if not knows what to ask for, I've started with >> admin/test.htm and admin/test.php which test PHP installation, and >> Server Side Includes, but it would be great to have something which >> excercised other common functions and maybe checked PHP options etc? > > > > 2: Stop any dependency on aadb.sql, I think that all it does is > > replicate what sql_update.php3 does anyway, so why have the > > functionality in two places? Maybe just have setup.php3 run >> sql_update if the tables don't exist? >> >> - Mitra >> >> > > > >------------------------------------------------------- >This SF.NET email is sponsored by: >SourceForge Enterprise Edition + IBM + LinuxWorld http://www.vasoftware.com >_______________________________________________ >Apc-aa-coders mailing list >Apc...@li... >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Honza M. <hon...@ec...> - 2003-01-23 20:39:48
|
It's quite hard to decide, when to count hit and when not by script. The x-vid-item_id commend is mainly used for fulltext item display, so used=20 aproximation is not so bad, but I agree it could be improved. The idea of view parameter sounds good. Honza On P=E1, 2003-01-17 at 08:39, Mitra wrote: > I'm doing some work on the flexible Ids that we discussed. >=20 > Looking at view.php3, it is very strange in the way it Counts hits -=20 > where parameters are passed with cmd[]=3Dx-vid-123-456 - >=20 > it increments the first item in the view, but not the others, this is=20 > going to make the first item look much more popular than the others? >=20 > Maybe this should be a parameter of the view, overridable in the=20 > code? So for example as a site editor I might consider that showing=20 > a list of headlines didn't count as a "display", but showing the=20 > abstracts did? >=20 > - Mitra |
From: Honza M. <hon...@ec...> - 2003-01-23 20:35:01
|
I agree with droping aadb.sql, mainly if we can quite easily write an option for sql_update.php3, which will generate aadb.sql. I'm not sure about configuration using web interface. It would require write access to config.php3. I think we should never give webserver the rights to write to any AA script. Honza On =C8t, 2003-01-23 at 19:59, Ram Prasad wrote: > Also, it would be nice if we have a page to set up the initial > configuration. This way, the config.php3 can be set using the web > interface, which can then be used to configure apc-aa. >=20 > - Ram >=20 > -----Original Message----- > From: apc...@li... > [mailto:apc...@li...] On Behalf Of Mitra > Sent: Thursday, January 23, 2003 1:24 PM > To: apc...@so... > Subject: [Apc-aa-coders] Abandoning aadb.sql >=20 >=20 > I'm just installing APC-AA on a machine where I do not have any kind=20 > of shell access. This is going to be the case for many potential=20 > users of apc-aa. >=20 > So of course, I could not follow the directions, which depend on shell > access. >=20 > Typically all of doc/install-3.html can be skipped, since any=20 > competent ISP will have a reasonably recent version of Apache, PHP=20 > and MySQL installed. >=20 > My first install attempt failed since the sysadmin hadn't given ALTER=20 > or DROP permissions to MYSQL, but the second attempt worked fine -=20 > using sql_update.php3 and then setup.php3 to get it all going. >=20 > Here are some suggestions > 1: Create some test scripts, so that a user can tell if the system is=20 > set up correctly, and if not knows what to ask for, I've started with=20 > admin/test.htm and admin/test.php which test PHP installation, and=20 > Server Side Includes, but it would be great to have something which=20 > excercised other common functions and maybe checked PHP options etc? >=20 > 2: Stop any dependency on aadb.sql, I think that all it does is=20 > replicate what sql_update.php3 does anyway, so why have the=20 > functionality in two places? Maybe just have setup.php3 run=20 > sql_update if the tables don't exist? >=20 > - Mitra >=20 >=20 |
From: Ram P. <ra...@pa...> - 2003-01-23 19:00:11
|
Also, it would be nice if we have a page to set up the initial configuration. This way, the config.php3 can be set using the web interface, which can then be used to configure apc-aa. - Ram -----Original Message----- From: apc...@li... [mailto:apc...@li...] On Behalf Of Mitra Sent: Thursday, January 23, 2003 1:24 PM To: apc...@so... Subject: [Apc-aa-coders] Abandoning aadb.sql I'm just installing APC-AA on a machine where I do not have any kind of shell access. This is going to be the case for many potential users of apc-aa. So of course, I could not follow the directions, which depend on shell access. Typically all of doc/install-3.html can be skipped, since any competent ISP will have a reasonably recent version of Apache, PHP and MySQL installed. My first install attempt failed since the sysadmin hadn't given ALTER or DROP permissions to MYSQL, but the second attempt worked fine - using sql_update.php3 and then setup.php3 to get it all going. Here are some suggestions 1: Create some test scripts, so that a user can tell if the system is set up correctly, and if not knows what to ask for, I've started with admin/test.htm and admin/test.php which test PHP installation, and Server Side Includes, but it would be great to have something which excercised other common functions and maybe checked PHP options etc? 2: Stop any dependency on aadb.sql, I think that all it does is replicate what sql_update.php3 does anyway, so why have the functionality in two places? Maybe just have setup.php3 run sql_update if the tables don't exist? - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved ------------------------------------------------------- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp _______________________________________________ Apc-aa-coders mailing list Apc...@li... https://lists.sourceforge.net/lists/listinfo/apc-aa-coders |
From: Mitra <mi...@mi...> - 2003-01-23 07:54:41
|
I'm just installing APC-AA on a machine where I do not have any kind of shell access. This is going to be the case for many potential users of apc-aa. So of course, I could not follow the directions, which depend on shell access. Typically all of doc/install-3.html can be skipped, since any competent ISP will have a reasonably recent version of Apache, PHP and MySQL installed. My first install attempt failed since the sysadmin hadn't given ALTER or DROP permissions to MYSQL, but the second attempt worked fine - using sql_update.php3 and then setup.php3 to get it all going. Here are some suggestions 1: Create some test scripts, so that a user can tell if the system is set up correctly, and if not knows what to ask for, I've started with admin/test.htm and admin/test.php which test PHP installation, and Server Side Includes, but it would be great to have something which excercised other common functions and maybe checked PHP options etc? 2: Stop any dependency on aadb.sql, I think that all it does is replicate what sql_update.php3 does anyway, so why have the functionality in two places? Maybe just have setup.php3 run sql_update if the tables don't exist? - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |
From: Honza M. <hon...@ec...> - 2003-01-22 22:37:55
|
> >2) You are using array_slice, array_map functions which are implemente= d > >only in PHP4 (array_map PHP 4 >=3D 4.0.6). So far we use only PHP3 > >functions in AA. Maybe is the time to change, but we have at least ask > >apc-aa-general. >=20 > I'll ask. >=20 > If necessary, maybe there are equivalents of any PHP4 functions we=20 > are using, for example an implementation of array_map written in=20 > PHP3, that we could conditionally include? That's right for array_map and array_slice, but when we will start using other PHP4 construct (like foreach()), then the PHP3 compatibility is lost - there is no possibility, how to write it in PHP3. > >On the other hand the 'x', 'y' and 'z' in > >related_sel.php3 is not exactly the same as tagged ids - it is never > >writen to the database. We add 'x', ... just as information to > >StoreItem() function (see insert_fnc_ids() in include/itemfunc.php3 - > >there ut is used). In this function we remove 'x', ... and to the > >database we store untagged item ids! > This is what I keep asking (unanswered) questions about. In=20 > related_sel.php3 you have three buttons "Add" "Add Mutual" "Add=20 > Backward" which add "x", "y" or "z", if you add the result as an id=20 > then its is stripped, but if you add it as text it is stored, but=20 > doesn't seem to be used anywhere, and didn't work with related views!=20 > So why were the three buttons put in if the code doesn't use them, or=20 > was this some project that never got finished. No, all is finished. We use 'x', 'y' and 'z' right if you add result as an id. The 'x', 'y' and 'z' are used as 'flags' in insert_fnc_ids(). You are right the 'x', 'y' and 'z' is stripped, but before it is stripped we read this 'flag' and store the stripped id differently (based on the 'flag' value). If it is 'x' (Add), we store the id to the current item. If it is 'y' (Add Mutual), we store id to the current item AND the id of current item we store in related item (so both items are then in relation - mutualy) If it is 'z' (Add Backward), we store only id of current item to related item (the item with stripped id). See insert_fnc_ids()! If someone use related item window and stores the id as text, it is wrong ussage of the field and it can't work. So far we never store taged item into database. > > > >5) In zids.php3 you wrote: > > > >function id_t2l(&$str) { > >#TODO: Look online for quicker way to substr last 32 chars - mitra > > if (ereg("(.*)([0-9a-f]{32})",$str,$parts)) > > return $parts[2]; > > > >The quicker way is: substr($str, -32), but see 3) >=20 > Ok - I'll make this 24..32, and I guess we can't use tags that end in=20 > a hex character [0-9a-f) Or you can use some delimeter (tag:unpacked_id). As I write before, we never use tags so far, so the syntax is on your choice. Honza On St, 2003-01-22 at 22:54, Mitra wrote: > At 6:08 PM +0100 22/1/03, Honza Malik wrote: > >Hi Mitra, > > > > thans for the changes, it is step forward. A few comments: > > > >1) I fixed small bug in zids->shortids() - check CVS >=20 > Thanks - I guess none of my test views are using short ids! >=20 > >2) You are using array_slice, array_map functions which are implemente= d > >only in PHP4 (array_map PHP 4 >=3D 4.0.6). So far we use only PHP3 > >functions in AA. Maybe is the time to change, but we have at least ask > >apc-aa-general. >=20 > I'll ask. >=20 > If necessary, maybe there are equivalents of any PHP4 functions we=20 > are using, for example an implementation of array_map written in=20 > PHP3, that we could conditionally include? >=20 > > > >3) Your assumption that packed ids are EXACTLY 16 characters long (and > >unpacked are EXACTLY 32 characters long) is unfortunately wrong. I can= 't > >say you why - we generate the ids by new_id() function, but in our > >database are packed ids for item 16 (in 91907 items), 15 (366) and 14 > >(4) characters long. >=20 > Strange - because new_id uses "md5" which has to return 128 bits. >=20 > I wonder if these were ids which generated a leading ascii zero, the=20 > ratios look reasonable for this, i.e. 919007/366 =3D 251, which is=20 > close to a one in 256 chance, i.e. something that occurred when 8=20 > bits (2^8=3D256) all were zero. This makes sense if we assume that=20 > md5 returns a number which the ereg in new_id casts as a string, and=20 > so ignores the leading zero. >=20 > I've fixed zids.php3 to allow 12..16 character packed ids, and 24..32=20 > long, but this could break my tagged ids. I've also fixed=20 > util.php3.new_id to only return a string of exactly 16 chars. >=20 >=20 > > > >4) You wrote: > >> The main reason for doing this was to add tagged ids, i.e. being ab= le > >> to have a field in a record that includes an extra piece of > >> information to type a link, for example the existing related_sel.ph= p3 > >> adds an 'x','y' or 'z' for the direction of the link (although this > >> doesn't seem to be used anywhere at the moment!). > > > >It is good idea of tagged ids. >=20 > Thanks - I'm building a site now that uses them. >=20 > >On the other hand the 'x', 'y' and 'z' in > >related_sel.php3 is not exactly the same as tagged ids - it is never > >writen to the database. We add 'x', ... just as information to > >StoreItem() function (see insert_fnc_ids() in include/itemfunc.php3 - > >there ut is used). In this function we remove 'x', ... and to the > >database we store untagged item ids! >=20 >=20 > This is what I keep asking (unanswered) questions about. In=20 > related_sel.php3 you have three buttons "Add" "Add Mutual" "Add=20 > Backward" which add "x", "y" or "z", if you add the result as an id=20 > then its is stripped, but if you add it as text it is stored, but=20 > doesn't seem to be used anywhere, and didn't work with related views!=20 > So why were the three buttons put in if the code doesn't use them, or=20 > was this some project that never got finished. >=20 > I don't care too much ... except that I've been trying very hard not=20 > to break code, that I couldn't figure out how it could ever be used! >=20 > > > >5) In zids.php3 you wrote: > > > >function id_t2l(&$str) { > >#TODO: Look online for quicker way to substr last 32 chars - mitra > > if (ereg("(.*)([0-9a-f]{32})",$str,$parts)) > > return $parts[2]; > > > >The quicker way is: substr($str, -32), but see 3) >=20 > Ok - I'll make this 24..32, and I guess we can't use tags that end in=20 > a hex character [0-9a-f) >=20 > - Mitra >=20 >=20 > >On =DAt, 2003-01-21 at 07:48, Mitra wrote: > >> Some big changes on the CVS version. > >> > >> DO NOT DOWNLOAD ON LIVE SERVERS YET > > > > > > The big change is the id encapsulation discussed on here a couple = of > > > weeks ago. I've added a class "zids" which encapsulates an array o= f > > > ids. > > > > > > Basically the way it works is to store the ids in whatever format > >> they are supplied in, and then has methods to convert and return th= em > >> in the format needed, so for example it can be initialized with > >> packed ids, and then return long ids. > >> > >> The main reason for doing this was to add tagged ids, i.e. being ab= le > > > to have a field in a record that includes an extra piece of > >> information to type a link, for example the existing related_sel.ph= p3 > >> adds an 'x','y' or 'z' for the direction of the link (although this > >> doesn't seem to be used anywhere at the moment!). > >> > >> In case you are interested I need the tagged ids for a project wher= e > >> I want to flag businesses based on criteria (organic, community > >> supporter etc) but want to have a value (good, medium, bad) on eac= h > >> link. > >> > >> I've changed code to use this class in places where I need it, its > >> generally applicable so gradually I'll change code as I work in > >> different places. Because of the way the zids class is written, th= e > >> tagged ids won't effect any code not designed to handle them becaus= e > >> they'll be converted to long or quoted etc ids in those places. > >> > >> The code also includes other methods for working on ids or collecti= on > >> of ids, for example there is a "sqlin()" method which returns a > >> string like 'item.id IN ("12345","6778")' > >> > >> Because this code makes changes in lots of places, its possible I'v= e > >> broken something that I haven't been able to test. Please email me > >> and I'll make rapid fixes. > >> > >> One other change I've made is to add a global variable that works > >> like $debug, but just gives warnings on places that something stran= ge > >> is noticed , for example trying to unpack an id which is already > >> unpacked. I encourage the use of this flag to help track errors, > >> without generating warnings for users. > >> > >> It would be great if people with non-active installations could tes= t > >> this, i.e. people for whom finding a bug won't muck up a live serve= r! > >> > >> Note the CVS version also includes Jakub's system-wide m_gettext > >> changes, so that is another reason to download and test on a non-li= ve > >> installation. > >> > >> I'll be happy to take bug reports and treat them as a priority to g= et > >> them fixed. > >> > >> - Mitra > >> > >> > >> 01/21/03 - code rule changes > >> - added global flag $errcheck like $debug but generates > >> warnings on str > >> angeness > >> - added zids.php3 to encapsulate id management including: > >> * adds support for tagged ids in many places (not all y= et) > >> ** If related item window field set to store text, it w= ill > >> cleanly ed > >> it these > >> *** More changes to related item window coming > >> * duplicates pack_id and unpack_id to pack_id128 and > >> unpack_id128 whi > >> ch check type > >> - commented out require of _lang.php3 files from config.= php3 > > > > > > > >------------------------------------------------------- > >This SF.net email is sponsored by: Scholarships for Techies! > >Can't afford IT training? All 2003 ictp students receive scholarships. > >Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. > >www.ictp.com/training/sourceforge.asp > >_______________________________________________ > >Apc-aa-coders mailing list > >Apc...@li... > >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders >=20 |
From: Mitra <mi...@mi...> - 2003-01-22 21:59:25
|
This was for the PTS project, noone is using that code now, so the function can be commented out. I'm working in that file at the moment, so I'll fix it in my next CVS update - Mitra At 8:56 PM +0100 22/1/03, Jakub Adamek wrote: >I found a function default_fnc_variable() in itemfunc.php3 for Default >field value added by Ram Prasad on 05-March-2002. This is a bad >function. It returns ANY global variable the name of which you give as >parameter. > >Ram, what did you need this function for? Let's correct it to return >only one of allowed variables or delete it. > >Jakub > > > >------------------------------------------------------- >This SF.net email is sponsored by: Scholarships for Techies! >Can't afford IT training? All 2003 ictp students receive scholarships. >Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. >www.ictp.com/training/sourceforge.asp >_______________________________________________ >Apc-aa-coders mailing list >Apc...@li... >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |