phplib-users Mailing List for PHPLIB (Page 14)
Brought to you by:
nhruby,
richardarcher
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(106) |
Sep
(99) |
Oct
(44) |
Nov
(97) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(56) |
Feb
(81) |
Mar
(134) |
Apr
(69) |
May
(106) |
Jun
(122) |
Jul
(98) |
Aug
(52) |
Sep
(184) |
Oct
(219) |
Nov
(102) |
Dec
(106) |
2003 |
Jan
(88) |
Feb
(37) |
Mar
(46) |
Apr
(51) |
May
(30) |
Jun
(17) |
Jul
(45) |
Aug
(19) |
Sep
(5) |
Oct
(4) |
Nov
(12) |
Dec
(7) |
2004 |
Jan
(11) |
Feb
(7) |
Mar
|
Apr
(15) |
May
(17) |
Jun
(13) |
Jul
(5) |
Aug
|
Sep
(8) |
Oct
(6) |
Nov
(21) |
Dec
(13) |
2005 |
Jan
(4) |
Feb
(3) |
Mar
(7) |
Apr
(7) |
May
|
Jun
(11) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2006 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
(5) |
2007 |
Jan
(15) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(9) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
(12) |
May
|
Jun
(3) |
Jul
(1) |
Aug
(19) |
Sep
(2) |
Oct
|
Nov
|
Dec
(6) |
2009 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
From: Liberty Y. <li...@em...> - 2003-07-16 22:07:40
|
I can't answer your question..though i do have a few comments. Why are you inputting primary keys? Few RDBMS don't have the option to auto-increment your primary key field. I rarely find myself in a situation where i'm inputing the value for a primary key field. Foreign keys, yes, but never primary keys!!! If you're inserting a new record, let your server do that for you. I _know_ MySQL will do that for you On Wed, 2003-07-16 at 14:20, Neha Mathur wrote: > Hello, > > I'm trying to use nextid but even after reading the documentation notes on > it, I'm still quite confused on how to use it. > > I have a db_sql instanced and I need to find out the next primary key in > sequence in a table in my database so I can insert a row with this data as > such - > > $db = new DB_SQL_SubClass(connection params); > $nextIDinSeq = nextid("???"); \\ i have no clue what goes within the parens > there > > $insertQuery = "insert into xyztable ('Next in Sequence') values > ($nextIDinSeq)"; > $db->query($insertQuery); > etc etc... > > How do I determine what the nextid is? > > Help? Please? > > Maya > > > > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Neha M. <ne...@sp...> - 2003-07-16 21:18:37
|
Hello, I'm trying to use nextid but even after reading the documentation notes on it, I'm still quite confused on how to use it. I have a db_sql instanced and I need to find out the next primary key in sequence in a table in my database so I can insert a row with this data as such - $db = new DB_SQL_SubClass(connection params); $nextIDinSeq = nextid("???"); \\ i have no clue what goes within the parens there $insertQuery = "insert into xyztable ('Next in Sequence') values ($nextIDinSeq)"; $db->query($insertQuery); etc etc... How do I determine what the nextid is? Help? Please? Maya |
From: Nathaniel P. <np...@te...> - 2003-07-15 18:58:45
|
----- Original Message ----- From: "Daniel Bondurant" <bo...@io...> To: <Php...@li...> Sent: Monday, July 14, 2003 11:45 AM Subject: [Phplib-users] killing sessions when closing browser > After I upgraded to phplib 7.4-pre2, and can't seem to get sessions to be destroyed when a browser is closed and then reopened. Before the user would have to log in again, now they are still logged in. > > How do I force the login when the browser is closed and then re-opened. > > I have Session set to: > $allowcache = no > $lifetime = 0 (for session cookies) Well, you can't really force an explicit logout when the browser is closed (unless you resort to some somewhat unreliable Javascript trickery, as someone else already mentioned). However, using session cookies (as opposed to persistent cookies) for the PHPlib session ID should, in effect, cause a 'logout' of sorts (in reality what happens is that the old, authenticated session is abandoned, and a new one is created when the browser opens). Your settings appear to be correct for the desired behavior, although you might want to make sure that $mode is set to 'cookie' as well. You might also want to take a look at the cookie that PHPlib sets to make sure that it is a 'session' cookie instead of a persistent cookie. If it's setting a persistant cookie, take a look through your subclass(es) of Session and make sure that the instance variables are being set correctly (i.e. if you set these settings in session.inc's Session, but use a different setting in the subclass of Session in local.inc, the local.inc subclass would override the settings in the session.inc class). Use the subclass in local.inc to set these settings whenever possible. If that's not the problem, make sure there aren't any problems in your 'auth' scheme. Pay special attention to your auth_validatelogin()/auth_doregister() and auth_preauth() methods in your Auth subclass to make sure that there isn't something there that is logging in your users some other way, which doesn't rely on PHPlib's sessions. Also, you'll want to make sure that if your app is using 'get' as the default mode, or for some reason $fallback_mode is being used instead of $mode, that the browser isn't automatically appending the session id to the URL after the browser is closed. Normally, this shouldn't happen, however it is possible that bookmarks/favorites with the session id in the url or a 'start browser on the last page I visited' setting could cause an old session to be used. Unfortunately there's not much you can do about this kind of problem (since you can't control whether a client bookmarks a page or uses different settings), although to help alleviate it, you'll want to set $gc_time to a relatively low value. This will garbage-collect old sessions automatically, and make it so that an old session cannot be ressurected if it is older than $gc_time minutes old. (at least that's the way I understand it). If you're using 'cookie' mode (and it is working as it should) this paragraph shouldn't apply to you. Check the docs here: http://www.sanisoft.com/phplib/manual/session.php Although it is not set up in the default install of PHPlib, if you have a customized auto_init file for Session, you might want to look through that to make sure that it doesn't reset the cookies or anything. As I said, if you haven't mucked around with it, it shouldn't be a problem. For more info see: http://www.sanisoft.com/phplib/manual/using_autoinit.php Also, poorly behaved web-proxies might cause the behavior you described. If you use a web proxy, try disabling it (if you can) or talk to your system administrator. Hope this helps... _________________________________ Nathaniel Price <np...@te...> Webmaster |
From: Robert H. <rm...@le...> - 2003-07-15 17:49:12
|
What not spawn a popup window using the onclose event to request a logout or even just do the logout? -----Original Message----- From: php...@li... [mailto:php...@li...]On Behalf Of Layne Weathers Sent: Tuesday, July 15, 2003 9:42 AM To: Daniel Bondurant Cc: Php...@li... Subject: Re: [Phplib-users] killing sessions when closing browser > After I upgraded to phplib 7.4-pre2, and can't seem to get sessions to > be destroyed when a browser is closed and then reopened. Before the > user would have to log in again, now they are still logged in. Sessions have never worked that way. You were mistaken concerning the previous behavior. The only way to tie sessions to a particular browser window is to use GET instead of a session cookie (I do not recommend this). If you actually quit the browser and launch it again you will have destroyed the session cookie and will be forced to login again. There are two ways in which it could appear that closing and opening a new browser window destroys the session cookie. First, Windows IE can run as multiple processes. If you login to a page, close the window and open a window in a new process, you have a new browser memory with new session cookies - you will have to login. Second, if you allow your auth to expire by inactivity, close the browser window and open another window, you will be forced to login again. Both may initially appear to tie sessions to windows, but they do not. They both work the same in 7.4-pre2 as in previous versions of PHPLib. > How do I force the login when the browser is closed and then re-opened. Use GET (I do not recommend this). I suggest you forget about it. As long as you have auth set to expire at a reasonable time, and encourage your users to logout instead of closing the browser window, you should be just fine. Layne Weathers P.S. It occurs to me that you could spawn a pop-under window with javascript that periodically checks to see that the main window is still open. If the main window is not open, the pop-under could load the logout page. There is nothing to prevent the user from closing the pop-under before closing the main window. This kind of "solution" does not work for all users and, IMHO, is rarely worth the effort. ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1 _______________________________________________ Phplib-users mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Layne W. <la...@dr...> - 2003-07-15 17:36:46
|
> After I upgraded to phplib 7.4-pre2, and can't seem to get sessions to > be destroyed when a browser is closed and then reopened. Before the > user would have to log in again, now they are still logged in. Sessions have never worked that way. You were mistaken concerning the previous behavior. The only way to tie sessions to a particular browser window is to use GET instead of a session cookie (I do not recommend this). If you actually quit the browser and launch it again you will have destroyed the session cookie and will be forced to login again. There are two ways in which it could appear that closing and opening a new browser window destroys the session cookie. First, Windows IE can run as multiple processes. If you login to a page, close the window and open a window in a new process, you have a new browser memory with new session cookies - you will have to login. Second, if you allow your auth to expire by inactivity, close the browser window and open another window, you will be forced to login again. Both may initially appear to tie sessions to windows, but they do not. They both work the same in 7.4-pre2 as in previous versions of PHPLib. > How do I force the login when the browser is closed and then re-opened. Use GET (I do not recommend this). I suggest you forget about it. As long as you have auth set to expire at a reasonable time, and encourage your users to logout instead of closing the browser window, you should be just fine. Layne Weathers P.S. It occurs to me that you could spawn a pop-under window with javascript that periodically checks to see that the main window is still open. If the main window is not open, the pop-under could load the logout page. There is nothing to prevent the user from closing the pop-under before closing the main window. This kind of "solution" does not work for all users and, IMHO, is rarely worth the effort. |
From: Daniel B. <bo...@io...> - 2003-07-14 18:48:54
|
After I upgraded to phplib 7.4-pre2, and can't seem to get sessions to = be destroyed when a browser is closed and then reopened. Before the = user would have to log in again, now they are still logged in. How do I force the login when the browser is closed and then re-opened. = I have Session set to: $allowcache =3D no $lifetime =3D 0 (for session cookies) thanks - daniel |
From: Peter T. <pte...@te...> - 2003-07-08 18:05:40
|
What about oohforms? Is that class 'reg globals-safe' as well? Peter At 19:11 08-07-2003, Dr Tarique Sani wrote: >On Sat, 20 Oct 2001, Matt Williams wrote: > > > On Thursday 03 July 2003 16:56, Layne Weathers wrote: > > > > > I've been using the latest CVS session, auth, perm, user, db_mysql, and > > > template in production for some time, as have several other people I > > > know. It doesn't seem like people have reported many problems with the > > > other libraries, but I don't have enough personal experience to say one > > > way or the other. > > > > We've been using the lastest ish CVS with reg globals off and the custom > > session class on our intranet for a while now and have all seems to be > well. > > We have a pilot coming up soon too so we may get more feedback from that. > >We have used the CVS with reg globals and session 4 on three large >projects - no problems till date > >Tarique > >-- >=================================================================== >PHP Applications for E-Biz: http://www.sanisoft.com -o) > /\\ >Indian PHP User Group: http://groups.yahoo.com/group/in-phpug _\_v >=================================================================== > > > >------------------------------------------------------- >This SF.Net email sponsored by: Parasoft >Error proof Web apps, automate testing & more. >Download & eval WebKing and get a free book. >www.parasoft.com/bulletproofapps >_______________________________________________ >Phplib-users mailing list >Php...@li... >https://lists.sourceforge.net/lists/listinfo/phplib-users ---------- TERIS Information Services BV Peter Termaten Phone: +31 23 565 2682 Aagje Dekenstraat 43 Fax: +31 23 565 2676 2135 RJ Hoofddorp Mobile: +31 653 65 8686 www.teris.nl ---------- |
From: Dr T. S. <ta...@sa...> - 2003-07-08 17:47:53
|
On Sat, 20 Oct 2001, Matt Williams wrote: > On Thursday 03 July 2003 16:56, Layne Weathers wrote: > > > I've been using the latest CVS session, auth, perm, user, db_mysql, and > > template in production for some time, as have several other people I > > know. It doesn't seem like people have reported many problems with the > > other libraries, but I don't have enough personal experience to say one > > way or the other. > > We've been using the lastest ish CVS with reg globals off and the custom > session class on our intranet for a while now and have all seems to be well. > We have a pilot coming up soon too so we may get more feedback from that. We have used the CVS with reg globals and session 4 on three large projects - no problems till date Tarique -- =================================================================== PHP Applications for E-Biz: http://www.sanisoft.com -o) /\\ Indian PHP User Group: http://groups.yahoo.com/group/in-phpug _\_v =================================================================== |
From: Matt W. <li...@ye...> - 2003-07-07 07:48:09
|
On Thursday 03 July 2003 16:56, Layne Weathers wrote: > I've been using the latest CVS session, auth, perm, user, db_mysql, and > template in production for some time, as have several other people I > know. It doesn't seem like people have reported many problems with the > other libraries, but I don't have enough personal experience to say one > way or the other. We've been using the lastest ish CVS with reg globals off and the custom=20 session class on our intranet for a while now and have all seems to be we= ll.=20 We have a pilot coming up soon too so we may get more feedback from that. Matt |
From: Peter T. <pte...@te...> - 2003-07-06 19:57:37
|
Try this: $f->add_element(array("type"=>"checkbox", "name"=>"test", "multiple"=>1)); The 'multiple' makes that 'name' can be accessed as an array. No need to use the brackets []. Peter A t 00:44 06-07-2003, Ernest Beinrohr wrote: >Hi, I am using ooh forms checkbox elements. It's a multiline same-named >checkbox. I had to use for it's name something like "name"=>"test[]", so >that PHP recognizes it as multiple value. > >But, I cannot access that element from javascript. Until now I used, >document.formname.element[i] , but I cannot do this with the brackets in >element name. Does anyone has a solution ? > >-- >Ernest Beinrohr, OERNii >eAdmin @ AxonPro.sk, http://www.AxonPro.sk >+421-2-62410360, +421-903-482603 >HomePage: http://www.OERNii.sk/ >----- > "Be liberal in what you accept,and conservative in what you send." > -- Postel > > > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 >_______________________________________________ >Phplib-users mailing list >Php...@li... >https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Ernest B. <Er...@Be...> - 2003-07-05 22:44:20
|
Hi, I am using ooh forms checkbox elements. It's a multiline same-named checkbox. I had to use for it's name something like "name"=>"test[]", so that PHP recognizes it as multiple value. But, I cannot access that element from javascript. Until now I used, document.formname.element[i] , but I cannot do this with the brackets in element name. Does anyone has a solution ? -- Ernest Beinrohr, OERNii eAdmin @ AxonPro.sk, http://www.AxonPro.sk +421-2-62410360, +421-903-482603 HomePage: http://www.OERNii.sk/ ----- "Be liberal in what you accept,and conservative in what you send." -- Postel |
From: Layne W. <la...@dr...> - 2003-07-03 15:56:55
|
> Are the prereleases stable enough to deploy in production? I've been using the latest CVS session, auth, perm, user, db_mysql, and template in production for some time, as have several other people I know. It doesn't seem like people have reported many problems with the other libraries, but I don't have enough personal experience to say one way or the other. Layne Weathers |
From: Andy F. <an...@bu...> - 2003-07-03 14:25:29
|
Are the prereleases stable enough to deploy in production? -----Original Message----- From: Joe Stewart [mailto:jo...@be...] Sent: Thursday, July 03, 2003 8:55 AM To: 'php...@li...' Subject: Re: [Phplib-users] Hello? Dev mailing list? On Thu, Jul 03, 2003 at 09:14:06AM -0400, Andy Fundinger wrote: > Is there a phplib-devel mailing list? The only discussion list I seem to > find for this project is a user mailing list. > Currently development discussion is here too. I'd also like to see a -dev list. > Also, I'm trying to bring up phplib7.2 on php 4.3.2 without register globals > but that's taking an awful lot of code fixes, has anyone already made these > fixes? Does some other package do authentication and permissions without > register globals being needed? > Try downloading phplib-7.4-pre2.tar.gz. The session, auth, and perms work w/php 4.2.3 and register_globals off. Don't know if sessions broke w/4.3.2 and register_globals off. Joe > -Andy Fundinger > > ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ Phplib-users mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phplib-users |
From: Joe S. <jo...@be...> - 2003-07-03 13:47:24
|
On Thu, Jul 03, 2003 at 09:14:06AM -0400, Andy Fundinger wrote: > Is there a phplib-devel mailing list? The only discussion list I seem to > find for this project is a user mailing list. > Currently development discussion is here too. I'd also like to see a -dev list. > Also, I'm trying to bring up phplib7.2 on php 4.3.2 without register globals > but that's taking an awful lot of code fixes, has anyone already made these > fixes? Does some other package do authentication and permissions without > register globals being needed? > Try downloading phplib-7.4-pre2.tar.gz. The session, auth, and perms work w/php 4.2.3 and register_globals off. Don't know if sessions broke w/4.3.2 and register_globals off. Joe > -Andy Fundinger > > |
From: Andy F. <an...@bu...> - 2003-07-03 13:19:07
|
Is there a phplib-devel mailing list? The only discussion list I seem to find for this project is a user mailing list. Also, I'm trying to bring up phplib7.2 on php 4.3.2 without register globals but that's taking an awful lot of code fixes, has anyone already made these fixes? Does some other package do authentication and permissions without register globals being needed? -Andy Fundinger |
From: Layne W. <la...@dr...> - 2003-07-01 23:20:30
|
>> Put your header declaration *after* page_open() - the default PHP >> behavior is to overwrite previously set headers of the same name. >> FWIW, when I send an image file through a PHP script, I send the >> following headers, mainly taken from session.inc: >> >> header("Expires: " . gmdate("D, d M Y H:i:s", time() + 1440 * 60) . " >> GMT"); >> header("Last-Modified: " . gmdate("D, d M Y H:i:s", >> filemtime("./logo.gif")) . " GMT"); >> header("Cache-Control: public"); >> header("Cache-Control: max-age=" . 1440 * 60, false); >> header("Pragma: public"); >> >> HTH, >> Layne Weathers > > > If PHP overwrites headers with same name, how can your example have > two "Cache-Control" headers? Notice that the second header sends a second argument, false. The *default* behavior is overwrite, but you can control that by telling PHP to append instead of overwrite. Layne Weathers |
From: Frank B. <fb...@sy...> - 2003-07-01 22:24:41
|
At 05:14 PM 7/1/03, Layne Weathers wrote: >>Thanks for the ideas, but my scripts will be accessed very infrequently >>and I will not remember to convert them to static pages each time I make >>changes to them. I have figured out that inserting the following line at >>top of a script appears to cause browser to cache the page (at least for >>current browser session, close/reopen browser and pages are retrieved >>again - as expected). >> >>header('Last-Modified: '.date( 'r', >>filemtime($HTTP_SERVER_VARS['SCRIPT_FILENAME']) )); >> >>But scripts that call phplib's page_open function are not affected (ie: >>not cached) by this change? > >Put your header declaration *after* page_open() - the default PHP behavior >is to overwrite previously set headers of the same name. FWIW, when I send >an image file through a PHP script, I send the following headers, mainly >taken from session.inc: > >header("Expires: " . gmdate("D, d M Y H:i:s", time() + 1440 * 60) . " GMT"); >header("Last-Modified: " . gmdate("D, d M Y H:i:s", >filemtime("./logo.gif")) . " GMT"); >header("Cache-Control: public"); >header("Cache-Control: max-age=" . 1440 * 60, false); >header("Pragma: public"); > >HTH, >Layne Weathers If PHP overwrites headers with same name, how can your example have two "Cache-Control" headers? Placing my "header" code after page_open didn't help. I had a look at session.inc (phplib 7.2d) and thought that the following code should accomplish the intended result: class BK5_Session extends Session { var $classname = "BK5_Session"; var $that_class = "CT_Sql_BK5"; var $allowcache = "private"; } But that didn't work either - pages are not being cached. |
From: Layne W. <la...@dr...> - 2003-07-01 21:15:08
|
> Thanks for the ideas, but my scripts will be accessed very > infrequently and I will not remember to convert them to static pages > each time I make changes to them. I have figured out that inserting > the following line at top of a script appears to cause browser to > cache the page (at least for current browser session, close/reopen > browser and pages are retrieved again - as expected). > > header('Last-Modified: '.date( 'r', > filemtime($HTTP_SERVER_VARS['SCRIPT_FILENAME']) )); > > But scripts that call phplib's page_open function are not affected > (ie: not cached) by this change? Put your header declaration *after* page_open() - the default PHP behavior is to overwrite previously set headers of the same name. FWIW, when I send an image file through a PHP script, I send the following headers, mainly taken from session.inc: header("Expires: " . gmdate("D, d M Y H:i:s", time() + 1440 * 60) . " GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s", filemtime("./logo.gif")) . " GMT"); header("Cache-Control: public"); header("Cache-Control: max-age=" . 1440 * 60, false); header("Pragma: public"); HTH, Layne Weathers |
From: Frank B. <fb...@sy...> - 2003-07-01 19:10:18
|
At 10:50 PM 6/30/03, Layne Weathers wrote: >>>I have a situation where it is easier to generate a static html page with >>>php code (much repetition). The problem is that repeat visits to the same >>>page within one browser session is causing the page to be retrieved from >>>server each time it is viewed. I would like the page to be handled like a >>>static page, based on the file's timestamp on server (since the page is >>>indeed 'static'). >> >>There is no "page" on the server, only a PHP script. >> >>Simple fix: >> >>Backup your PHP script (important!) >>Load the page in your browser >>View Source >>Select All >>Copy >>Open the original script >>Select All >>Paste >>Save > >This is one of the main reasons I have a copy of PHP compiled for command >line usage: > $ ./create_some_page.php > some_page.html > >Start the script with > #!/usr/local/bin/php -q >and make sure it is executable. > >Layne Weathers Thanks for the ideas, but my scripts will be accessed very infrequently and I will not remember to convert them to static pages each time I make changes to them. I have figured out that inserting the following line at top of a script appears to cause browser to cache the page (at least for current browser session, close/reopen browser and pages are retrieved again - as expected). header('Last-Modified: '.date( 'r', filemtime($HTTP_SERVER_VARS['SCRIPT_FILENAME']) )); But scripts that call phplib's page_open function are not affected (ie: not cached) by this change? Frank |
From: Richard A. <rh...@ju...> - 2003-07-01 03:50:41
|
At 21:50 -0500 30/6/03, Layne Weathers wrote: >This is one of the main reasons I have a copy of PHP compiled for >command line usage: It's also great for cron jobs which perform database maintenance. With PHPLIB for DB abstraction, of course :) ...R. |
From: Layne W. <la...@dr...> - 2003-07-01 02:50:57
|
>> I have a situation where it is easier to generate a static html page >> with >> php code (much repetition). The problem is that repeat visits to the >> same >> page within one browser session is causing the page to be retrieved >> from >> server each time it is viewed. I would like the page to be handled >> like a >> static page, based on the file's timestamp on server (since the page >> is >> indeed 'static'). > > There is no "page" on the server, only a PHP script. > > Simple fix: > > Backup your PHP script (important!) > Load the page in your browser > View Source > Select All > Copy > Open the original script > Select All > Paste > Save This is one of the main reasons I have a copy of PHP compiled for command line usage: $ ./create_some_page.php > some_page.html Start the script with #!/usr/local/bin/php -q and make sure it is executable. Layne Weathers |
From: Richard A. <rh...@ju...> - 2003-07-01 02:04:07
|
At 21:31 -0400 30/6/03, Frank Bax wrote: >I have a situation where it is easier to generate a static html page with >php code (much repetition). The problem is that repeat visits to the same >page within one browser session is causing the page to be retrieved from >server each time it is viewed. I would like the page to be handled like a >static page, based on the file's timestamp on server (since the page is >indeed 'static'). There is no "page" on the server, only a PHP script. Simple fix: Backup your PHP script (important!) Load the page in your browser View Source Select All Copy Open the original script Select All Paste Save ...R. |
From: Frank B. <fb...@sy...> - 2003-07-01 01:37:48
|
Is this code inside a function with $db_m being passed as a parameter? I discovered a problem many moons ago where the second query in a function would fail if database connection variable was passed to function through parameter list. Since then I have always made the variable global, and never checked to see if the problem was fixed. At 12:58 PM 6/27/03, Hugo Morganho wrote: >Hi. >I' had a strange problem with this example. > >$db_m->query("insert into magazine_user(magazine_user_user_id) values >('$user_id'"); >jc_call->Create_Project($project_name); >$db_m->query("insert into magazine_user(magazine_user_user_id) values >('$user_id'2"); > > >in the Create_project i have another $db defined that points to another >database, different from the $db_m. >When i run the second query, gives me error, because now $db_m points to >the database defined at create_project, and gives me one error. >Anyone knows how does this occur? what can i do to solve this problem? >Thanks > > > >------------------------------------------------------- >This SF.Net email is sponsored by: INetU >Attention Web Developers & Consultants: Become An INetU Hosting Partner. >Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! >INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php >_______________________________________________ >Phplib-users mailing list >Php...@li... >https://lists.sourceforge.net/lists/listinfo/phplib-users > |
From: Frank B. <fb...@sy...> - 2003-07-01 01:32:56
|
I have a situation where it is easier to generate a static html page with php code (much repetition). The problem is that repeat visits to the same page within one browser session is causing the page to be retrieved from server each time it is viewed. I would like the page to be handled like a static page, based on the file's timestamp on server (since the page is indeed 'static'). I have changed apache to allow files with html extension to contain php code, but this does not solve the problem. Any ideas out there? Can this behaviour be controlled in a page not using phplib auth/sess/perm? Can this behaviour be controlled in a page that does use phplib auth/sess/perm? |
From: Gaetano G. <giu...@se...> - 2003-06-27 18:36:06
|
Maybe just using a different variable fr the 2 db connections would be = enough? Gaetano > -----Messaggio originale----- > Da: php...@li... > [mailto:php...@li...]Per conto di Hugo > Morganho > Inviato: venerdi 27 giugno 2003 18:59 > A: php...@li... > Oggetto: [Phplib-users] Problem with database class > Priorita: Alta >=20 >=20 > Hi. > I' had a strange problem with this example. >=20 > $db_m->query("insert into magazine_user(magazine_user_user_id) values=20 > ('$user_id'"); > jc_call->Create_Project($project_name); > $db_m->query("insert into magazine_user(magazine_user_user_id) values=20 > ('$user_id'2"); >=20 >=20 > in the Create_project i have another $db defined that points=20 > to another=20 > database, different from the $db_m. > When i run the second query, gives me error, because now=20 > $db_m points to=20 > the database defined at create_project, and gives me one error. > Anyone knows how does this occur? what can i do to solve this problem? > Thanks >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: INetU > Attention Web Developers & Consultants: Become An INetU=20 > Hosting Partner. > Refer Dedicated Servers. We Manage Them. You Get 10% Monthly=20 > Commission! > INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users |