You can subscribe to this list here.
2001 |
Jan
|
Feb
(1) |
Mar
(265) |
Apr
(166) |
May
(25) |
Jun
(17) |
Jul
(20) |
Aug
(47) |
Sep
(6) |
Oct
(14) |
Nov
(66) |
Dec
(64) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(109) |
Feb
(64) |
Mar
(34) |
Apr
(23) |
May
(64) |
Jun
(9) |
Jul
(13) |
Aug
(6) |
Sep
(33) |
Oct
(272) |
Nov
(67) |
Dec
(75) |
2003 |
Jan
(264) |
Feb
(244) |
Mar
(171) |
Apr
(119) |
May
(54) |
Jun
(93) |
Jul
(51) |
Aug
(48) |
Sep
(14) |
Oct
(49) |
Nov
(47) |
Dec
(15) |
2004 |
Jan
(13) |
Feb
(27) |
Mar
(18) |
Apr
(44) |
May
(35) |
Jun
(24) |
Jul
(39) |
Aug
(142) |
Sep
(35) |
Oct
(34) |
Nov
(49) |
Dec
(24) |
2005 |
Jan
(60) |
Feb
(71) |
Mar
(19) |
Apr
(27) |
May
(68) |
Jun
(4) |
Jul
(30) |
Aug
(10) |
Sep
(23) |
Oct
(24) |
Nov
(13) |
Dec
(6) |
2006 |
Jan
(4) |
Feb
(46) |
Mar
(64) |
Apr
(18) |
May
(16) |
Jun
(37) |
Jul
(7) |
Aug
(19) |
Sep
(9) |
Oct
(8) |
Nov
(3) |
Dec
(23) |
2007 |
Jan
(25) |
Feb
(21) |
Mar
(32) |
Apr
(36) |
May
(12) |
Jun
(1) |
Jul
(7) |
Aug
(15) |
Sep
(13) |
Oct
(1) |
Nov
|
Dec
|
2008 |
Jan
(3) |
Feb
(5) |
Mar
(1) |
Apr
(2) |
May
|
Jun
(1) |
Jul
(2) |
Aug
(7) |
Sep
|
Oct
(5) |
Nov
(1) |
Dec
|
2009 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: ChiNoKaze <chi...@ya...> - 2004-05-11 14:08:13
|
> Is there anyway to 'see' what's going on when PHPWebsite tries to > connect to MySQL when setting up the config file? Something like a > verbose error? The generic 'can't connect' error isn't really getting > me too far. Hi Darrel, PHPWS uses the DB.php functionality from the PEAR libs. You can find the specific error that this library is returning by inserting an echo statement in the set_config.php file in phpwsroot/setup. At line 231 begins an if/elseif series of statements. 231 if ($error == "DB") 232 echo "Unable to connect to your server's database.<br />"; 233 elseif ($error == "prefix") modify it such: 231 if ($error == "DB"){ 232 echo "Unable to connect to your server's database.<br />"; 233 echo $core->db->message . "<br />"; 234 }elseif ($error == "prefix") Notice the addition of the curly braces as well as the extra echo statement. This will show you what error the Pear library is returning. I had this same problem, and the error it returned me was: DB Error: extension not found To resolve the issue in Gentoo I had to redo "emerge mod_php". I don't know anything about Mandrake though. HTH, Michael __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover |
From: Steven L. <st...@tu...> - 2004-05-11 13:23:13
|
On Mon, 2004-05-10 at 18:19, Don Seiler wrote: > I've run into a problem with paging that I can't find a solution to yet. > Basically a bug was brought to my attention in phpwsBB where the paging > was broken when viewing the threads within a forum. The main problem > (after correcting a bad var reference) was that I didn't have a way of > passing the designated forum ID to the paging system, so once I began > paging after the first page, I would have no idea which forum I was > viewing the threads for. > > Interested parties can view bug here: > > http://sourceforge.net/tracker/index.php?func=detail&aid=951537&group_id=81260&atid=562402 > > Any list masters know how to add an extra var on the paging URL? Don, The last parameter (#4) for the getList() method of PHPWS_Manager is $overRideOp. I see in your conf/manager.php file that your op for listing threads is: PHPWSBB_MAN_OP=listthreads. You could change your getList() call to something "like" this (not sure how you pass your forum id): $newOp = PHPWSBB_MAN_OP=listthreads&PHPWS_MAN_ITEMS[]=" . $this->forum->getId(); $this->getList("threads", NULL, FALSE, $newOp); Hope this helps. -- Steven |
From: darrel <da...@da...> - 2004-05-11 03:35:11
|
Well, before I totally give up on PHPWebsite, I thought I'd pose this question one more time... Is there anyway to 'see' what's going on when PHPWebsite tries to connect to MySQL when setting up the config file? Something like a verbose error? The generic 'can't connect' error isn't really getting me too far. I've tried a number of things...rebooted machine, installed php-mysql, double and triple-checked MySQL Database name, password, username, etc. It's my box, so I have full access to it if that helps at all. It doesn't look like MySQL is generating an error log for this database, so it seems like the issue is on PHPWebsite's end. -Darrel |
From: Don S. <do...@se...> - 2004-05-10 22:19:11
|
I've run into a problem with paging that I can't find a solution to yet. Basically a bug was brought to my attention in phpwsBB where the paging was broken when viewing the threads within a forum. The main problem (after correcting a bad var reference) was that I didn't have a way of passing the designated forum ID to the paging system, so once I began paging after the first page, I would have no idea which forum I was viewing the threads for. Interested parties can view bug here: http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D951537&group_i= d=3D81260&atid=3D562402 Any list masters know how to add an extra var on the paging URL? Don. --=20 "I've coined new words, like misunderstanding and Hispanically." George W. Bush March 29, 2001 =46rom speech given at the Radio and Television Correspondents Association dinner in Washington, D.C. |
From: Michael S. <mi...@sc...> - 2004-05-10 12:02:48
|
I wanted to use Dreamweaver specialized templates with PHP Website. Essentially, that means, IMO, associating a specific template with each page. I was thinking that a page could have a subclass specification so that the themes: theme.tpl, theme.contacts.tpl, theme.donate.tpl for example, could be used. In the case aboe, contacts and donate are subclassed from theme.tpl. I don't really understand the source code too well. The process of how a page is actually displayed still remains a mystery to me since the modules seem to be included in a random order. I also don't know how to modify my dreamweaver files to display certain modules, including the login/logout interface. For the first part, I need to understand how a page parameter can be used to decide which theme is selected and second, I need to understand how to edit my Dreamweaver templates to show the modules I am interested in. Thanks. -Michael. |
From: Ken N. <ke...@co...> - 2004-05-08 18:00:24
|
Hey Everyone, I hit a brick wall. My module is ready for alpha release except (and this is a BIG except), the module will not display anything from the functions: _categoryblock, _categorylist, and _itemview UNTIL I edit / add / delete a record. Using the debug module, it seems that no object is being created until after performing an edit / add / delete. Here is the first "line" from the debugs: Before: object(cg_nakesmanager)(25) { ["Nakes"]=> NULL ["_module"]=> string(5) "Nakes" ["_table"]=> string(15) "mod_Nakes_items" ["_request"]=> string(11) "NakesMan_op" ["_class"]=> NULL After: object(cg_nakesmanager)(25) { ["Nakes"]=> &object(cg_nakes)(29) I am registering the module with Source Forge, but it may be a few days before it goes online. In the meantime, the file can be downloaded from: http://geekystuff.net/files/nakes-0.0.1.tar.gz I would greatly appreciate any help to fix the above problem. I think it is something relatively simple, but I am not seeing the solution. I _have_ looked at many other modules, and tried many (what I hoped would be) solutions - to no avail. Thanks! Ken -- Kenneth Nordquist http://communitygems.com |
From: Steven L. <st...@tu...> - 2004-05-07 14:00:29
|
On Thu, 2004-05-06 at 11:10, Shaun Murray wrote: > Is there an accepted way in which I can add a content variable on > upgrading a module? > > I've split the announce module so that it's got three now instead of > two so that the list of current announcements on the home page can be > in a different box to the announcement. > > Before it was > > CNT_announce > CNT_announce_past > > I added > > CNT_announce_current > > > But, unless I uninstall/reinstall the module, loosing all content, the > variables in conf/layout.php I've added don't get into the mod_layout > table. I can see where in Boost it adds the content variables to the > layout table but was wondering if there was an easy way of including > that mechanisim in the module's update.php Here is one thing you can try. In update.php put this: if($currentVersion < "_version_upgrading_to_") { $sql = "DELETE FROM mod_layout_box WHERE mod_title='_your_module_'"; $GLOBALS['core']->query($sql, true); $_SESSION['OBJ_layout']->installModule("_your_module_"); } That should do it. -- Steven |
From: Shaun M. <sh...@ae...> - 2004-05-06 20:35:18
|
On 6 May 2004, at 19:34, Mike Potvin wrote: > How can I modify the layout (indentation etc) of the What's Related > box? > I'd like to remove the bullets and indentation. Is this done through a > template that I just haven't found yet? In your style.css, add .tightlist { margin: 0px; padding: 0px } Shaun aegis design - http://www.aegisdesign.co.uk |
From: Matthew M. <ma...@tu...> - 2004-05-06 20:29:24
|
On Thu, 2004-05-06 at 14:34, Mike Potvin wrote: > How can I modify the layout (indentation etc) of the What's Related box? > I'd like to remove the bullets and indentation. Is this done through a > template that I just haven't found yet? This file contains the unorder list tag (<ul>) /mod/fatcat/templates/related/related/link.tpl This file has the list (<li>) elements: /mod/fatcat/templates/related/related/link.tpl You can remove these or add css classes to them to try and make them look better. > Thanks, > Mike... > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Sleepycat Software > Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver > higher performing products faster, at low TCO. > http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers -- Matthew McNaney Internet Systems Architect Electronic Student Services Appalachian State University Phone: 828-262-6493 http://phpwebsite.appstate.edu http://ess.appstate.edu |
From: Mike P. <php...@po...> - 2004-05-06 18:34:22
|
How can I modify the layout (indentation etc) of the What's Related box? I'd like to remove the bullets and indentation. Is this done through a template that I just haven't found yet? Thanks, Mike... |
From: Shaun M. <sh...@ae...> - 2004-05-06 15:10:16
|
Is there an accepted way in which I can add a content variable on upgrading a module? I've split the announce module so that it's got three now instead of two so that the list of current announcements on the home page can be in a different box to the announcement. Before it was CNT_announce CNT_announce_past I added CNT_announce_current But, unless I uninstall/reinstall the module, loosing all content, the variables in conf/layout.php I've added don't get into the mod_layout table. I can see where in Boost it adds the content variables to the layout table but was wondering if there was an easy way of including that mechanisim in the module's update.php Shaun aegis design - http://www.aegisdesign.co.uk |
From: Alla B. <al...@sc...> - 2004-05-06 14:50:57
|
Hello, (I am not on the list, please put me in CC when replying to the list) There is a problem in phpwebsite's configuration that can allow anonymous users to upload PHP files and execute them if the web server is configured to allow PUT HTTP method. The directories /files, /file/phatfile and /files/phatform have the following permissions: drwxrwsr-x 4 apache apache 512 May 5 18:10 files drwxrwsr-x 2 apache apache 512 May 5 18:18 phatfile drwxrwsr-x 4 apache apache 512 May 4 14:38 phatform They are writable for apache user to make possible file uploads through Document Manager. Document Manager does not allow uploading of PHP files. However if the web server is configured to allow PUT method (Apache with WebDAV or Microsoft IIS) it is possible to upload files to these directories directly, using a PUT request: PUT /files/evilfile.php HTTP/1.1 Host: someone.running.phpwebsite This gives an attacker the ability to run arbitrary commands on the server with the privileges of Apapche. Uploading can be done using curl utility: curl -T evilfile.php http://someone.running.phpwebsite/files/evilfile.php By default Apache does not allow PUT method. Microsoft IIS does allow PUT method by default (unless WebDAV is explicitely disabled). I believe that some Linux distributions ship Apache with WebDAV enabled, in that case it may allow PUT as well. I think it should be fixed like this. "files" directory should be kept outside phpwebsite web accessible directory, so that it can't be accessed directly through the web server. All the files in the directory should be only fetched by Document Manager. I believe there is already functionality for fetching files, because it is possible to download a file using a URL like this: index.php?module=phatfile&PHPWS_MAN_ITEMS[]=1&FILE_MAN_OP=Download&submit=Go I believe it is quite important to move "files" directory outside web root. It will also solve a problem with people uploading a type of file that phpwebsite does not know about, but the web server does and executes it. Please feel free to contact me if there is anything I can do to help fixing this. I can't provide a patch, sorry for that. Alla. |
From: Kenneth P. <kpo...@po...> - 2004-05-05 16:47:35
|
Thanks for sharing this, Shaun! I've tried to reproduce this exploit, but the Guestbook mod from Badguy doe= sn't have a seperate login procedure. The admin part is called directly via an URL, and the login security is han= dled by phpWS. I don't know if it would be possible then to exploit this vulnerbility, but= I'm definitely not sure. Any comments out there? Kenneth Poulsen Shaun Murray <sh...@ae...> wrote: ... > It's based on another guestbook script from proxy2.de which > has had an SQL injection exploit discovered recently. I think it's=20 > one of 'badguy's on http://www.chula-rural.net/ which appears to be > down.=20 > http://www.net-security.org/vuln.php?id=3D3408 >=20 > I've no idea if the phpwebsite module version is equally at > risk so I'd=20 > thought I'd try a heads-up on the list just in case. >=20 |
From: Shaun M. <sh...@ae...> - 2004-05-05 15:39:02
|
I've been trying to get hold of the developer of the Guestbook module. It's based on another guestbook script from proxy2.de which has had an SQL injection exploit discovered recently. I think it's one of 'badguy's on http://www.chula-rural.net/ which appears to be down. Hopefully he's not discovered the exploit through hackers. http://www.net-security.org/vuln.php?id=3408 I've no idea if the phpwebsite module version is equally at risk so I'd thought I'd try a heads-up on the list just in case. Also, if anyone is hosting with a cpanel.net back end on their system, that includes Advanced Guestbook v2.2 in the cgi-center. The latest version os v2.3.1 but no mention of the exploit being fixed. Shaun aegis design - http://www.aegisdesign.co.uk |
From: darrel <da...@da...> - 2004-05-05 04:46:27
|
>The first thing I would check is to see if you have php-mysql installed >for Apache. I fought for hours one day to get config to work, but >(oddly enough) it never did. I could connect to MySQL via CL and via >MySQLcc, but not through phpWebSite. I installed php-mysql and VOILA! >It wErked! Ooh! Had my hopes up there for a minute. I didn't have php-mysql installed. Installed it, restarted mySQL and HTTPD, but, alas, still can't connect. Thanks for tip, though. Any other suggestions as to how to go about finding the culprit? -Darrel |
From: Matthew M. <ma...@tu...> - 2004-05-04 11:56:15
|
It will be available in 0.9.4 due out later this year. That info needs to be updated. On Mon, 2004-05-03 at 16:30, Mike Potvin wrote: > I would like to be able to delegate permissions on Web Pages within PHPWS > so that only certain users are allowed to edit them. Is this possible? > The docs have a short blurb that states... > > "0.9.2 does not support permissions per element. For example I can't > assign permission for only one person to edit a specific PageMaster page. > This functionality will be available in version 0.9.3." > > Thanks, > Mike... > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers -- Matthew McNaney Internet Systems Architect Electronic Student Services Appalachian State University Phone: 828-262-6493 http://phpwebsite.appstate.edu http://ess.appstate.edu |
From: Matthew M. <ma...@tu...> - 2004-05-04 11:54:16
|
Yes I can take a look at that. Matt On Mon, 2004-05-03 at 22:40, La...@Op... wrote: > Re: w3c (form labels) > ------------------------------------------------------------------------ > I have a question about "FORM LABELS" and > passing the Bobby section 508 accessibility standards. > > When you run the "bobby" accessibility check at: > http://bobby.watchfire.com > on: > http://phpwebsite.appstate.edu > > 'Bobby' flags the "user name" and "password" input fields > for not having a "label" tag... > > is there a fix in the cooker for this accessibility issue? > > (version: 0.9.3-2, "clear" theme) > > bobby> Section 508 Accessibility > bobby> This page does not meet the requirements > bobby> for Section 508 Approved status. > bobby> Below is a list of 1 Section 508 accessibility > bobby> error(s) found: > bobby> > bobby> Provide an explicit label for each form control. > bobby> (2 instances) Lines 470, 472 > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers -- Matthew McNaney Internet Systems Architect Electronic Student Services Appalachian State University Phone: 828-262-6493 http://phpwebsite.appstate.edu http://ess.appstate.edu |
From: Ken N. <ke...@co...> - 2004-05-04 04:07:56
|
The first thing I would check is to see if you have php-mysql installed for Apache. I fought for hours one day to get config to work, but (oddly enough) it never did. I could connect to MySQL via CL and via MySQLcc, but not through phpWebSite. I installed php-mysql and VOILA! It wErked! On Mon, 2004-05-03 at 23:55, darrel wrote: > I hope this isn't too basic of a question for this group. > > I'm stuck on the config step. I can't connect to MySQL (get the > generic, can't connect to database, try again, PHPWebsite error...) > > Is there any way to get a more detailed error out of PHPWebsite? I've > looked in the MySQL folders and I'm not getting a .err file or > anything in the logs about it trying to connect, so I'm guessing it's > something (hopefully) obvious on the config-file end of things. > > Any suggestions or pointers in the right direction appreciated! > > FYI, it's my box, so I have full access to it. I'm connecting via > 'localhost' and have checked and double checked that the > username/pwd/database name are all correct. I'm running Linux > Mandrake. > > -Darrel -- Kenneth Nordquist http://communitygems.com |
From: darrel <da...@da...> - 2004-05-04 03:56:21
|
I hope this isn't too basic of a question for this group. I'm stuck on the config step. I can't connect to MySQL (get the generic, can't connect to database, try again, PHPWebsite error...) Is there any way to get a more detailed error out of PHPWebsite? I've looked in the MySQL folders and I'm not getting a .err file or anything in the logs about it trying to connect, so I'm guessing it's something (hopefully) obvious on the config-file end of things. Any suggestions or pointers in the right direction appreciated! FYI, it's my box, so I have full access to it. I'm connecting via 'localhost' and have checked and double checked that the username/pwd/database name are all correct. I'm running Linux Mandrake. -Darrel |
From: <La...@Op...> - 2004-05-04 02:36:01
|
Re: w3c (form labels) ------------------------------------------------------------------------ I have a question about "FORM LABELS" and passing the Bobby section 508 accessibility standards. When you run the "bobby" accessibility check at: http://bobby.watchfire.com on: http://phpwebsite.appstate.edu 'Bobby' flags the "user name" and "password" input fields for not having a "label" tag... is there a fix in the cooker for this accessibility issue? (version: 0.9.3-2, "clear" theme) bobby> Section 508 Accessibility bobby> This page does not meet the requirements bobby> for Section 508 Approved status. bobby> Below is a list of 1 Section 508 accessibility bobby> error(s) found: bobby> bobby> Provide an explicit label for each form control. bobby> (2 instances) Lines 470, 472 |
From: Mike P. <php...@po...> - 2004-05-03 20:31:20
|
I would like to be able to delegate permissions on Web Pages within PHPWS so that only certain users are allowed to edit them. Is this possible? The docs have a short blurb that states... "0.9.2 does not support permissions per element. For example I can't assign permission for only one person to edit a specific PageMaster page. This functionality will be available in version 0.9.3." Thanks, Mike... |
From: Ken N. <ke...@co...> - 2004-04-29 06:41:08
|
OK... This may be a phpws programming 101 question, but I think my current problem lies with not understanding phpws sessions. For the sake of an illustration, I am picking the announcement module. 1) runtime.php is parsed a) it parses Announcement.php b) checks to see if any announcements are in the db c) if there are, it creates a new PHPWS_Announcement for every announcement, uses the view() method d) then displays the announcement(s) So far, so good! Now, I look into announcements' index.php and see (for me) a confusing array of session names. I snipped the non-manager $_REQUEST case/switch items. If someone will be so kind as to explain the how and why, I would really appreciate it. /mod/announce/index.php (lines 90-115) <snip> if(isset($_REQUEST["ANN_user_op"])) switch($_REQUEST["ANN_user_op"]) { case "list": $_SESSION["SES_ANN_MANAGER"]->listAnnouncements(); break; case "view": $_SESSION["SES_ANN"] = new PHPWS_Announcement($_REQUEST["ANN_id"]); $_SESSION["SES_ANN"]->view("full"); $_SESSION["SES_ANN"]->hit(); break; case "submit_announcement": $_SESSION["SES_ANN_MANAGER"]->userMenu(); $_SESSION["SES_ANN"] = new PHPWS_Announcement; $_SESSION["SES_ANN"]->edit(); break; case "save": $_SESSION["SES_ANN"]->save(); break; case "categories": $_SESSION["SES_ANN_MANAGER"]->categories(); break; } </snip> Specifically: case "view" uses all $_SESSION["SES_ANN"] while case "submit_announcement" uses both $_SESSION["SES_ANN_MANAGER"] and $_SESSION["SES_ANN"] I know this has to be a really obvious methodology, but I think I am missing the forest because of the trees. Oh, before I sent this in to the list, I did RTFD and STFW for some direction. If someone could walk me through this on or off list, I would appreciate it. -- Kenneth Nordquist http://communitygems.com |
From: Jim W. <ji...@ke...> - 2004-04-28 19:47:11
|
Matthew McNaney said: > Greetings. > > As some of you may know, I have been programming 0.9.4 under Postgres. > Not because I like it better than MySQL (I don't) but because I want the > next version to be more compatible. So far 0.9.4 works under Postgres > swimmingly. > > However I have hit a snag. > Currently I am working on backward compatibility. My test module is > announcements. > Herein lies the problem. Announcement uses variable case column names in > its tables. For example, in mod_announce we have columns named > userCreated, userUpdated, dateCreated, etc. > > When those columns are sent to postgres, they are changed to > usercreated, userupdated, and datecreated. As you can see, postgres > removes capitalization. This is a problem because when announce queries > the database, it expects them to contain capitalization. For example, > when pulling the settings, announce tries to get the result in the > 'showCurrent' column. But the array returned by select only has a > 'showcurrent' column. So we get a big ole error. > > Now there is a solution to this problem. I wrote a parser that finds the > column names in a 'create table' query. Then I run a function from PEAR > named quoteIdentifier. This function checks to see which db is running > and applies the correct delimiter. For postgres, it is quotes. Mysql: > backtick. When the delimiter is applied, the capitalization is retained. > So far so good. > > But now there are more problems. Every function that accesses these > tables then needs its columns delimited as well. Every select, update, > alter, and insert must be delimited or capitalization will be lost and > the query will fail. So I would have to update every function to do so. > > Is there a simpler solution? Yes. You must make sure that you never use > capitalization in your column names. If you do that, then everything is > fine. Both MySQL and Postgres will work fine as long as the column names > are all lowercase. I am guessing the other databases will behave as > well. > > But what of 0.9.3 compatibility? Currently, I believe announcements will > work under MySQL (I haven't tested it yet) because MySQL doesn't force > lower case letters on column names. But announcements will not work in > Postgres unless I make the broad changes above. > > So here is what we must decide. Do we delimit column names or not? > > Here is what I think: > > We don't delimit. Instead we tell developers that although 0.9.4 is much > more friendly to postgres, you have to keep column names lowercase. > > Modules written for 0.9.3 will still work in 0.9.4 under MySQL. > Developers who want their pre-0.9.4 module to work in 0.9.4 will have to > lowercase their sql columns AND adjust their code to recognize the > changed case. > > I feel that delimiting on everything will add an extra layer of work on > a rather simple process. However, I would like to hear other opinions. > > Thanks, > Matt > > > If you read down to this line you should be able to assemble the clues > in the email to find the buried treasure! Good luck! > I'm runing 0.9.3 with Postgres and that is what I ended up doing. My modifications include converting camel case to words separated by underscore (e.g. userCreated because user_created). The other thing that I found was an issue was the handling of sequence based primary keys. Because Postgres (and other databases) have unique ways of retrieving index information on a table, and they are capable of having multi-column primary keys, this part of the way phpwebsite works must be changed. The function in question is called: PHPWS_Database::sqlGetIndex It seems that phpwebsite needs to do one of two things: 1. Register the names of sequence based primary keys somehow (in some sort of phpwebsite metatable for example. Then sqlGetIndex would simply do a lookup in that metatable. OR 2. Use a standard name for these types of primary keys (e.g. seqkey or idkey) for all applications and their tables. Then sqlGetIndex would not be required. This and the column naming issue you mentioned before are 99%+ of all that is necessary to get postgres working. Note that a couple other things like some of the aggregate function calls caused problems until they were aliased (e.g. MAX(date) AS max_date). Aliasing those is good practice anyway. Best regards, Jim Wilson |
From: Don S. <do...@se...> - 2004-04-28 19:15:35
|
On Wed, Apr 28, 2004 at 03:05:33PM -0400, Matthew McNaney wrote: > Here is what I think: >=20 > We don't delimit. Instead we tell developers that although 0.9.4 is much > more friendly to postgres, you have to keep column names lowercase. I agree wholeheartedly. Mixing cases in DBMS systems is pointless because the names of objects like tables and fields are usually always returned either all lower or all upper case (like Oracle). You should always just use one case (I pick lower for laziness) and underscores for readability. Don. --=20 "My education message will resignate amonst all parents." George W. Bush January 19, 2000 Quoted in the New York Post. |
From: Matthew M. <ma...@tu...> - 2004-04-28 19:11:16
|
Greetings. As some of you may know, I have been programming 0.9.4 under Postgres. Not because I like it better than MySQL (I don't) but because I want the next version to be more compatible. So far 0.9.4 works under Postgres swimmingly. However I have hit a snag. Currently I am working on backward compatibility. My test module is announcements. Herein lies the problem. Announcement uses variable case column names in its tables. For example, in mod_announce we have columns named userCreated, userUpdated, dateCreated, etc. When those columns are sent to postgres, they are changed to usercreated, userupdated, and datecreated. As you can see, postgres removes capitalization. This is a problem because when announce queries the database, it expects them to contain capitalization. For example, when pulling the settings, announce tries to get the result in the 'showCurrent' column. But the array returned by select only has a 'showcurrent' column. So we get a big ole error. Now there is a solution to this problem. I wrote a parser that finds the column names in a 'create table' query. Then I run a function from PEAR named quoteIdentifier. This function checks to see which db is running and applies the correct delimiter. For postgres, it is quotes. Mysql: backtick. When the delimiter is applied, the capitalization is retained. So far so good. But now there are more problems. Every function that accesses these tables then needs its columns delimited as well. Every select, update, alter, and insert must be delimited or capitalization will be lost and the query will fail. So I would have to update every function to do so. Is there a simpler solution? Yes. You must make sure that you never use capitalization in your column names. If you do that, then everything is fine. Both MySQL and Postgres will work fine as long as the column names are all lowercase. I am guessing the other databases will behave as well. But what of 0.9.3 compatibility? Currently, I believe announcements will work under MySQL (I haven't tested it yet) because MySQL doesn't force lower case letters on column names. But announcements will not work in Postgres unless I make the broad changes above. So here is what we must decide. Do we delimit column names or not? Here is what I think: We don't delimit. Instead we tell developers that although 0.9.4 is much more friendly to postgres, you have to keep column names lowercase. Modules written for 0.9.3 will still work in 0.9.4 under MySQL. Developers who want their pre-0.9.4 module to work in 0.9.4 will have to lowercase their sql columns AND adjust their code to recognize the changed case. I feel that delimiting on everything will add an extra layer of work on a rather simple process. However, I would like to hear other opinions. Thanks, Matt If you read down to this line you should be able to assemble the clues in the email to find the buried treasure! Good luck! -- Matthew McNaney Internet Systems Architect Electronic Student Services Appalachian State University Phone: 828-262-6493 http://phpwebsite.appstate.edu http://ess.appstate.edu |