[PHP] XSL
I am attempting to put this in my XSL, ">, However I get a ton of errors. How do I do this properly? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] AFter the URL in PHP
On Saturday, January 24, 2004, at 05:57 PM, Randy Johnson wrote: Hello, I am not sure if this is a php thing or not but hope is... I see some sites like this: www.domain.com/tree where tree is not a directory for example www.domain.com/tree/ would not work the word tree above is not really a directory but a username or id or whatever Anybody know what I am talking about? Apache mod_rewrite. Typically, it can be used for things like [internally] converting the url from... http://example.com/articles/45/ ...to... http://example.com/articles.php?id=45 It's a big can of worms to open, but searching for 'mod_rewrite tutorial' on google, or looking at the sitepoint.com forums (they have a mod_rewrite forum especially) and do some research. Either way, it's not really a PHP question :) Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: "Additional Features for working with linked Tables have been deactivated."
How about checking the phpmyadmin documentation, where this is all clearly explained? "Freedomware" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > It looks like all the databases I view with phpMyAdmin feature the > following error message: > > "The additional Features for working with linked Tables have been > deactivated. To find out why click here." > > > When I click the link, I get this: > > Database mysql running on localhost > $cfg['Servers'][$i]['pmadb'] ... not OK [ Documentation ] > > $cfg['Servers'][$i]['relation'] ... not OK [ Documentation ] > General relation features: Disabled > > $cfg['Servers'][$i]['table_info'] ... not OK [ Documentation ] > Display Features: Disabled > > $cfg['Servers'][$i]['table_coords'] ... not OK [ Documentation ] > $cfg['Servers'][$i]['pdf_pages'] ... not OK [ Documentation ] > Creation of PDFs: Disabled > > $cfg['Servers'][$i]['column_info'] ... not OK [ Documentation ] > Displaying Column Comments: Disabled > Bookmarked SQL-query: Disabled > MIME ... not OK [ Documentation ] > $cfg['Servers'][$i]['history'] ... not OK [ Documentation ] > SQL-history: Disabled > > > Rather than troubleshoot all seven of these, can you see any evidence of > a central problem that might be causing it? Or is there some way to work > around it? > > Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: "Additional Features for working with linked Tables have been deactivated."
Aidan Lister wrote: How about checking the phpmyadmin documentation, where this is all clearly explained? I thought it made more sense to see if anyone who's been through this before knows of a quick fix - before I dive into SEVEN "documentation" links, none of which strike me as particularly "clear." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Importing Data with EMS MySQL Manager
I'm getting closer. I find that I can work around a lot of problems by creating tables in EMS MySQL Manager, which also has a neat feature for importing data from CSV files. Has anyone done this with EMS MysQL Manager before? If so, would you mind looking at http://geowebworks.geobop.org/mysql/csv/ and seeing if you can see where I went off track? It looks like I'm probably just doing one or two things wrong now. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: "Additional Features for working with linked Tables have been deactivated."
On Saturday 24 January 2004 15:22, Freedomware wrote: > Aidan Lister wrote: > > How about checking the phpmyadmin documentation, where this is all > > clearly explained? > > I thought it made more sense to see if anyone who's been through this > before knows of a quick fix - before I dive into SEVEN "documentation" > links, none of which strike me as particularly "clear." It makes even more sense to ask on the phpmyadmin list/forum? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Freedom is nothing else but the chance to do better. -- Camus */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: "Additional Features for working with linked Tables have been deactivated."
Jason Wong wrote: > It makes even more sense to ask on the phpmyadmin list/forum? I thought this was a general purpose PHP list and some people who frequent this list had used phpMyAdmin. My mistake. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: "Additional Features for working with linked Tables have been deactivated."
On Saturday 24 January 2004 15:51, Freedomware wrote: > I thought this was a general purpose PHP list It is. But your questions have nowt to do with PHP. > and some people who > frequent this list had used phpMyAdmin. My mistake. The people frequenting the phpMyAdmin list/forum are *more* likely to be using phpMyAdmin and the people frequenting this list. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Most people can do without the essentials, but not without the luxuries. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mycrypt on local doesn't decode but does on web server?
Hello, I am hoping that some body might be able to point out what is going wrong. Basically I am running apache2 etc (sokkit) on a local MS XP machine. I downloaded libmcrypt.dll from http://ftp.emini.dk/pub/php/win32/mcrypt/ as specified on php.net under ‘Mcrypt Encryption Functions’ and configured with no probs. Viewing my local phpinfo() mcrypt: is showing up however with less supported ciphers than on the web server I use, but that’s not a problem. So I run the script on localhost. It encodes but won’t decode. I run the same script on the web server and all works? What am I missing none of the functions are returning any error #s / Falses etc. Code is attached. Thanks for any help or advice Will I've stopped 46,300 spam messages. You can too! One month FREE spam protection at www.cloudmark.com <>-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mycrypt on local doesn't decode but does on web server?
Hi, Saturday, January 24, 2004, 11:02:23 PM, you wrote: W> Hello, I am hoping that some body might be able to point outwhat is going wrong. W> W> Basically I am running apache2 etc (sokkit) on a local MS W> XPmachine. I downloaded libmcrypt.dll from W> http://ftp.emini.dk/pub/php/win32/mcrypt/as specified on php.net W> under Mcrypt Encryption Functions and configuredwith no probs. W> W> Viewing my local phpinfo() mcrypt: is showingup however with W> less supported ciphers than on the web server I use, but thatsnot W> a problem. W> W> So I run the script on localhost. It encodes but wont decode. W> Irun the same script on the web server and all works? What am I W> missing none ofthe functions are returning any error #s / Falses W> etc. W> W> Code is attached. W> W> Thanks for any help or advice W> W> Will Get the dll from here and try (just the mycrypt.dll, don't use the php_mycrypt.dll it is missing a bit) http://ftp.proventum.net/pub/php/win32/misc/mcrypt/ -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using templates (Code & User Interface)
"Hamid Hossain" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Always I have a problem that I don't know how to make my code away from the > user interface files. > > I tried to use some template classes, but I did'nt like what I tired because > some if statments are used inside the template. Maybe you could try to use TemplateTamer. With TT there are no statements inside the template (like if loops etc), in template file there are only begin i end markers which show where some template starts and palceholders for variables, and that is all. All program logic is stored in separate php file, and programed in standard php. Aside from that TemplateTamer commes with IDE to develop in which shows you structure of the templates in tree like view, lets you conviniently edit template and coresponding php file, keeps account of all files in the project, and even has some rudimentary vizards that can offer you some code that fits your template. So if this sounds interesting please try it, and also do not hesitate to mail me if you have some questions, or need some advice. rush -- http://www.templatetamer.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: XSL
Aidan Lister wrote: > I am attempting to put this in my XSL, />">, However I get a ton of errors. How do I do this properly? try something like this: or this: (^untested, but this is the way to do it in xsl..) look here: http://www.w3.org/TR/xslt#dt-attribute-value-template greetz! webwurst -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 24 Jan 2004 15:24:48 -0000 Issue 2549
php-general Digest 24 Jan 2004 15:24:48 - Issue 2549 Topics (messages 175608 through 175632): How do you set up table columns for numerals? 175608 by: Freedomware 175612 by: Giz 175613 by: Freedomware 175615 by: David OBrien Re: Securing php from rogue php scripts 175609 by: David T-G Re: Function for crypt and decript. 175610 by: Justin French Re: what PHP really needs 175611 by: Jason Sheets 175618 by: Hamid Hossain porting perl scripts to php 175614 by: admin.datazap.net Re: Session time-out value 175616 by: Jason Wong Re: can't figure out this mysql error 175617 by: Jason Wong Using templates (Code & User Interface) 175619 by: Hamid Hossain 175631 by: rush AFter the URL in PHP 175620 by: Randy Johnson 175622 by: Justin French XSL 175621 by: Aidan Lister 175632 by: Tobias Bradtke Re: "Additional Features for working with linked Tables have been deactivated." 175623 by: Aidan Lister 175624 by: Freedomware 175626 by: Jason Wong 175627 by: Freedomware 175628 by: Jason Wong Importing Data with EMS MySQL Manager 175625 by: Freedomware mycrypt on local doesn't decode but does on web server? 175629 by: Will 175630 by: Tom Rogers Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- I'm having some roblems creating a table with phpMyAdmin. I think they're pretty minor problems, mostly relating to numerals. Would someone be willing to look at my notes at http://geowebworks.geobop.org/mysql/3.php - especially the last picture - and suggest what I need to do to fix it? It's also possible the instructions I'm following are flawed, though they look pretty sensible. Here's the last error message I got: #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(20), `Area` VARCHAR(6), `Area` SMALLINT(8), `HighestAltitude` --- End Message --- --- Begin Message --- I looked at your page. First off, you should add a primary key column that has no information in it. Just make this a number(4) called state_id. Then you will be able to specify that it's auto_increment. The problem you had is that you tried to make a varchar column auto_increment which makes no sense. Auto_increment will start at 1 and each time you insert a new row will assign a unique key = max(state_id)+1 Also any number columns should be number types. You can apply formatting (commas separating 100's) when you select the data or present it with php. As for your other issues, I can't see what the error message was, but when you are using number types like smallint, you shouldn't specify lengths.. these are implicit in the type. A smallint for example is 2 bytes. This means that you have 64k of possible integers that can be stored in there. What you do want to make sure is that it's unsigned. -Original Message- From: Freedomware [mailto:[EMAIL PROTECTED] Sent: Friday, January 23, 2004 6:41 PM To: [EMAIL PROTECTED] Subject: [PHP] How do you set up table columns for numerals? I'm having some roblems creating a table with phpMyAdmin. I think they're pretty minor problems, mostly relating to numerals. Would someone be willing to look at my notes at http://geowebworks.geobop.org/mysql/3.php - especially the last picture - and suggest what I need to do to fix it? It's also possible the instructions I'm following are flawed, though they look pretty sensible. Here's the last error message I got: #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(20), `Area` VARCHAR(6), `Area` SMALLINT(8), `HighestAltitude` -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- End Message --- --- Begin Message --- Giz wrote: I looked at your page. First off, you should add a primary key column that has no information in it. Just make this a number(4) called state_id. OK, I gave it another try, but I don't see where I type in "4." When I clicked Save, I got an error message: "This is not a number!" but it didn't specify what it was referring to. I put a screenshot online at http://geowebworks.geobop.org/mysql/3.php - the last picture on the page. Thanks. --- End Message --- --- Begin Message --- normally auto_increment fields need to be of a number type not varchar -Dave At 11:30 PM 1/23/2004, Freedomware wrote: Giz wrote: I looked at your page. First off, you should add a primary key column that has no information in it. Just make this a number(4) c
RE: [PHP] what PHP really needs
> -Original Message- > From: Hamid Hossain [mailto:[EMAIL PROTECTED] > As a ColdFusion Certified Developer I can say: You are right! > > In CF you can fire a sql statment and store its result in a > variable which > is not going to be removed from the server's memory after > responding to the > user. That variable will be available for sometime declared by > you when you > created the query. Perhaps you weren't aware that every modern database does the same thing (or can if you turn it on): the results of query sets are cached at the db server and are available if the same query is used without involving a file read. If any update changes any of the underlying result sets then the corresponding cache entry is invalidated and the momeory released for another cache entry. Let the db server handle query/cache consistency ... why put yet another server in the way that will have to be triggered by the underlying db to clear ITS cache? Mark C, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why we love Microsoft (0t)
Ryan A wrote: Anyway, a 17yr old kid by the name of Mike Rowe opens up a webdesigning company and names it MikeRoweSoft (say it out loud..if you're really daft not to get it just be reading it)..then registers mikerowesoft.com...a couple of days later he gets an email from microsoft's lawyers to hand over the domain for 10$...he refuses and says no way, how about 10,000? a couple of days later he gets a legal document of around 25 pages from the lawyers!! They are going after him extortion!! Read the whole thing at mikerowesoft.com its pretty amusing, gives a totally new meaning to scumbags, sons of bitches and cheap bastards...oops, hope i dont get sued for saying that. Another case of hearing only one side of the story. The following was posted in the forums at mikerowesoft.com (now removed, unsurprisingly)... "I listened to your interview on CBC radio. You said, on live radio, that you did choose the domain name because of Microsoft's public profile. Then, less than a minute later, you claimed to have been surprised that Microsoft was suing you. But, you had admitted everything in the first minute of your interview. Then, you went on to say that you didn't expect you would be able to keep the domain. This sounds suspicious and I think Microsoft has every right to say that you were looking for a pay off at a later date -- not to mention, the publicity." His case fell apart the moment he admitted that that was the reason he chose that domain name. I see now that he has settled with MS which is a shame because I think he should be made an example of. MS are only doing this to save their public face. As for the argument that he's only 17, what the hell does that matter? His motivation was clearly to cash in on either the similarity or the publicity from the action MS would take. The lucky fscker got the latter. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: "Additional Features for working with linked Tables have been deactivated."
I do belive you may want to read the list newbie guide before making any more off topic posts. Please search the archives for it. Freedomware wrote: Jason Wong wrote: > It makes even more sense to ask on the phpmyadmin list/forum? I thought this was a general purpose PHP list and some people who frequent this list had used phpMyAdmin. My mistake. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why we love Microsoft (0t)
Stuart wrote: As for the argument that he's only 17, what the hell does that matter? His motivation was clearly to cash in on either the similarity or the publicity from the action MS would take. The lucky fscker got the latter. Gee, like Microsoft is such a tough sucker to hook. Frankly, I don't think a scumbag who abuses the law (not to mention consumers, public schools, etc.) as much as Bill Gates does deserves its protection. * * * * * * * * * * > Another case of hearing only one side of the story. The following was > posted in the forums at mikerowesoft.com (now removed, unsurprisingly)... > > "I listened to your interview on CBC radio. You said, on live radio, > that you did choose the domain name because of Microsoft's public > profile. Then, less than a minute later, you claimed to have been > surprised that Microsoft was suing you. But, you had admitted everything > in the first minute of your interview. Then, you went on to say that you > didn't expect you would be able to keep the domain. This sounds > suspicious and I think Microsoft has every right to say that you were > looking for a pay off at a later date -- not to mention, the publicity." * * * * * * * * * * So, he's sort of a modern day Robin Hood, blackmailing the world's richest thief... > His case fell apart the moment he admitted that that was the reason he > chose that domain name. I see now that he has settled with MS which is a > shame because I think he should be made an example of. MS are only doing > this to save their public face. Huh? Microsoft's public face is as far gone as Michael Jackson's! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RewriteRule REGEX ?
My server runs Apache 2.0. I am trying to do a simple URL rewrite so that old URLs will map to our new style of URLS... From This: articles.php?id=999 To This:articles/999 In the .htaccess file for the htdocs folder that contains the web files, I put the following: RewriteEngine on RewriteRule ^articles\.php\?id=([0-9]+)$ articles/$1 [R] I've also tried this (no slash in front of ?): RewriteEngine on RewriteRule ^articles\.php?id=([0-9]+)$ articles/$1 [R] But I keep getting a 404 error for articles.php, which means that something must be wrong with my RewriteRule because it's not matching. I've tried various tweaks and just can't get it to work. What am I doing wrong?? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what PHP really needs
Like Hamid Said, if the ColdFusion server has the query already in memory. It doesn't need to send traffic to another server to get the information again. Most systems I've worked on have the db and the web server on different areas of a firewall, so you're going through a lot of excess steps if you're hitting the db every time for something that won't change. Plus, you have a granular control on what is being cached. The sql server will only cache what it has room for. So if enough queries are run against it, the original query won't be cached anymore regardless. But I think the original question was about a tree that took a long time to create, and application variables would be a plus in this situation. Marlon (another certified cf developer) > -Original Message- > From: Mark Charette [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 24, 2004 9:35 AM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] what PHP really needs > > > > -Original Message- > > From: Hamid Hossain [mailto:[EMAIL PROTECTED] > > As a ColdFusion Certified Developer I can say: You are right! > > > > In CF you can fire a sql statment and store its result in a > > variable which > > is not going to be removed from the server's memory after > > responding to the > > user. That variable will be available for sometime declared by > > you when you > > created the query. > > Perhaps you weren't aware that every modern database does the same thing > (or > can if you turn it on): the results of query sets are cached at the db > server and are available if the same query is used without involving a > file > read. If any update changes any of the underlying result sets then the > corresponding cache entry is invalidated and the momeory released for > another cache entry. > > Let the db server handle query/cache consistency ... why put yet another > server in the way that will have to be triggered by the underlying db to > clear ITS cache? > > Mark C, > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what PHP really needs
Marlon Moyer wrote: Like Hamid Said, if the ColdFusion server has the query already in memory. It doesn't need to send traffic to another server to get the information again. Most systems I've worked on have the db and the web server on different areas of a firewall, so you're going through a lot of excess steps if you're hitting the db every time for something that won't change. The problem I have with this is where the database DOES change, and not on any set interval. I used to work at Insight, and our product database changed constantly, at any give moment to account for pricing changes, stock changes, specials, updates from places like TechData, etc. If I'm caching the results of my query, I miss those updates, and have a customer placing an order for a product at the wrong price, out of stock, etc. Now I can somewhat understand the use of this on a db that rarely changes, depending on how often rare is. Or in a case where the db is updated at a set time. Still, if rare is a time period of months, why have a db anyway? Static HTML would be faster than php, cold fussion, etc. And if the db is updated at a set time, what happens when I have to push a change out that is outside of the set time? Maybe it's just me, but I feel that the db is supposed to handle the dynamic data, not the web server. Plus, you have a granular control on what is being cached. The sql server will only cache what it has room for. So if enough queries are run against it, the original query won't be cached anymore regardless. But I think the original question was about a tree that took a long time to create, and application variables would be a plus in this situation. Marlon (another certified cf developer) -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: RewriteRule REGEX ?
Did you try to remove that '^' ? That means start.. In other words you are saying that the uri starts with articles, when I would think it starts with /articles... Yes, that could really matter... -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com "Monty" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > My server runs Apache 2.0. I am trying to do a simple URL rewrite so that > old URLs will map to our new style of URLS... > > From This: articles.php?id=999 > To This:articles/999 > > In the .htaccess file for the htdocs folder that contains the web files, I > put the following: > > RewriteEngine on > RewriteRule ^articles\.php\?id=([0-9]+)$ articles/$1 [R] > > I've also tried this (no slash in front of ?): > > RewriteEngine on > RewriteRule ^articles\.php?id=([0-9]+)$ articles/$1 [R] > > But I keep getting a 404 error for articles.php, which means that something > must be wrong with my RewriteRule because it's not matching. I've tried > various tweaks and just can't get it to work. > > What am I doing wrong?? > > Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: RewriteRule REGEX ?
Yes, I did try removing both the ^ and the $, and adding a / in front of articles.php, but it made no difference. > From: [EMAIL PROTECTED] (Dvdmandt) > Reply-To: "DvDmanDT" <[EMAIL PROTECTED]> > Newsgroups: php.general > Date: Sat, 24 Jan 2004 19:06:09 +0100 > To: [EMAIL PROTECTED] > Subject: Re: RewriteRule REGEX ? > > Did you try to remove that '^' ? That means start.. In other words you are > saying that the uri starts with articles, when I would think it starts with > /articles... Yes, that could really matter... > > -- > // DvDmanDT > MSN: dvdmandtâhotmail.com > Mail: dvdmandtâtelia.com > "Monty" <[EMAIL PROTECTED]> skrev i meddelandet > news:[EMAIL PROTECTED] >> My server runs Apache 2.0. I am trying to do a simple URL rewrite so that >> old URLs will map to our new style of URLS... >> >> From This: articles.php?id=999 >> To This:articles/999 >> >> In the .htaccess file for the htdocs folder that contains the web files, I >> put the following: >> >> RewriteEngine on >> RewriteRule ^articles\.php\?id=([0-9]+)$ articles/$1 [R] >> >> I've also tried this (no slash in front of ?): >> >> RewriteEngine on >> RewriteRule ^articles\.php?id=([0-9]+)$ articles/$1 [R] >> >> But I keep getting a 404 error for articles.php, which means that > something >> must be wrong with my RewriteRule because it's not matching. I've tried >> various tweaks and just can't get it to work. >> >> What am I doing wrong?? >> >> Thanks. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what PHP really needs
On Sat, 24 Jan 2004, Marlon Moyer wrote: > Like Hamid Said, if the ColdFusion server has the query already in memory. > It doesn't need to send traffic to another server to get the information > again. Most systems I've worked on have the db and the web server on > different areas of a firewall, so you're going through a lot of excess steps > if you're hitting the db every time for something that won't change. You missed the point. If you have to connect to a server anyway, whjat's the difference between going to a cached queryset on a CF server or going to a cached queryset on a db server? It's a wire transaction in any case. > Plus, you have a granular control on what is being cached. The sql server > will only cache what it has room for. So if enough queries are run against > it, the original query won't be cached anymore regardless. And this won;t happen on the CF server when you run out of memory to cache a transaction? Yeah, right. Does CF have to query the db server to stay in sync? Of course it does. Now there's multiple transactions to coordinate & synchronize. > But I think the original question was about a tree that took a long time to > create, and application variables would be a plus in this situation. That remains to be seen. Getting the data in an optimal way can be a non-trivial operation. -- "Half the people know what they're talking about, and the other half are writing code." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using templates (Code & User Interface)
On Sat, 2004-01-24 at 01:53, Hamid Hossain wrote: > Hi, > > Always I have a problem that I don't know how to make my code away from the > user interface files. > > I tried to use some template classes, but I did'nt like what I tired because > some if statments are used inside the template. > > How can I prepare my code to be working in more that one template? Should I > use some methodology like FuseBox.org A common misconception is that templates provide complete separation from logic, this is untrue. Template frameworks (the best ones) provide separation of business logic from presentation logic. So using an "if" statement inside a template is completely normal if it pertains to the display logic. So for instance the following is generally valid in a template (using InterJinn's syntax since I'm writing this :): Display information about the user in some template formatted fashion that will only be displayed if the user is logged in. Whereas something like the following would not be appropriate template logic: Since th calculation for timeLeft would almost certainly be business logic. HTH, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: RewriteRule REGEX ?
On Sat, Jan 24, 2004 at 12:18:36PM -0500, Monty wrote: > > From This: articles.php?id=999 > To This:articles/999 ... > What am I doing wrong?? I suspect you may not be looking at the problem the right way. What exactly do you want to do? Normally, you'd go the other direction; that is, you'd have mod_rewrite recognize ^/articles/([0-9]+)$ and translate it to /articles.php?id=$1 ... so that a request to the "pretty" URL gets served as an HTTP GET on the PHP script. I get the impression that you're expecting mod_rewrite to translate copy from inside your HTML files, as well as recognize and reverse the translation when the request comes back in. Is that it? > RewriteEngine on > RewriteRule ^articles\.php\?id=([0-9]+)$ articles/$1 [R] > But I keep getting a 404 error for articles.php, which means that something > must be wrong with my RewriteRule because it's not matching. I've tried > various tweaks and just can't get it to work. I bet if you create an "articles" directory in your documentroot, with with files named things like "999" in it, you'll stop seeing the 404's. Check your apache error_log. If what you're trying to achieve is to have existing HTML files get their embedded URLs translated, you're going to have to do that with an output filter. You can do it with PHP, or use mod_sed ... lots of options. But a rewrite rule won't change page content, it'll only rewrite the *requests* that come in. Of course, if you know all this already, and really are trying to point requests for /articles.php?id=123 to a file named "123" in the directory "articles", then you'll still need to inspect your error_log. -- Paul Chvostek <[EMAIL PROTECTED]> it.canadahttp://www.it.ca/ Free PHP web hosting!http://www.it.ca/web/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Message rejected
Hi! Your have sent me a message from an address marked as being primarily a source of SPAM (also known as "unsolicited commercial e-mail"), and the message has been discarded. If in fact this was a genuine non-SPAM message and you still wish to contact me, then you need to re-send the message from a different address. And please accept my apologies for the inconvenience. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what PHP really needs
Marlon Moyer wrote: But I think the original question was about a tree that took a long time to create, and application variables would be a plus in this situation. Again, if you're just talking about reading, how hard is it to just do this to save: $save_data = ''; Now save that to a RAM disk and include() it whenever you need it recreated. You can do the same thing with objects, too. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can we make .exe programs with php?
Can we make .exe programs with php? for example we can do it with delphi, vbasic.but can we do with php? _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can we make .exe programs with php?
On Sat, 24 Jan 2004, pehepe php wrote: > Can we make .exe programs with php? for example we can do it with delphi, > vbasic.but can we do with php? No (and .exe is a convention that isn't universal, btw). PHP is an interpreted language, not a compiled one. -- "Half the people know what they're talking about, and the other half are writing code." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Form variables + sessions, is this how it is supposed to work?
Thanks for any advice. If I register a session variable, set its value with one form and then try to change its value with another form, it seems to retain only the original value and is not replaced with the newly posted one? Is this how it is supposed to work and I have to unset the variable to do this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Threading & PHP
Hi, This may be completely crazy, but let me tell you what I want to do: thread PHP. My server is a dual-processor 2 GHz machine, and it's not very loaded. I have a few tasks that are huge and lengthy and would benefit from being placed in their own "thread" if you will. This would serve to either accelerate the process by splitting it among CPUs or allow the process to continue "in the background" for a few seconds after all pages have been loaded. There are two areas where I'd use this: 1) To accelerate results in a relevancy ranking/fuzzy matching algorithm I have created, and although I've optimized the heck out of it, it can be slow when hundreds of thousands of items are thrown at it. It would be easy to split the array in half and run the algorithm on both halves, which would almost half processing time for returning results. 2) With image processing. When a user uploads an image to a few of my pages, the image is processed, re-compressed, and filed in the database or a file system. This can take several seconds, and I'd prefer that the user doesn't have to wait for the process to complete. How might I be able to make some PHP code run as a "thread" that would serve these purposes? -Galen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Threading & PHP
One possibility is to have the code which first receives the request split it up into subrequests and do HTTP requests for the subrequests. Whether that makes sense depends on whether the overhead of an HTTP transaction is a big part of the execution time of the subrequests. - Lucas On Saturday, Jan 24, 2004, at 15:24 America/New_York, Galen wrote: Hi, This may be completely crazy, but let me tell you what I want to do: thread PHP. My server is a dual-processor 2 GHz machine, and it's not very loaded. I have a few tasks that are huge and lengthy and would benefit from being placed in their own "thread" if you will. This would serve to either accelerate the process by splitting it among CPUs or allow the process to continue "in the background" for a few seconds after all pages have been loaded. There are two areas where I'd use this: 1) To accelerate results in a relevancy ranking/fuzzy matching algorithm I have created, and although I've optimized the heck out of it, it can be slow when hundreds of thousands of items are thrown at it. It would be easy to split the array in half and run the algorithm on both halves, which would almost half processing time for returning results. 2) With image processing. When a user uploads an image to a few of my pages, the image is processed, re-compressed, and filed in the database or a file system. This can take several seconds, and I'd prefer that the user doesn't have to wait for the process to complete. How might I be able to make some PHP code run as a "thread" that would serve these purposes? -Galen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Threading & PHP
On Sat, 24 Jan 2004, Galen wrote: > Hi, > > This may be completely crazy, but let me tell you what I want to do: > thread PHP. Can you set processor affinity on your system? If so, you can "pseudo thread" by assigning processes to different CPUs; e.g., run your main Webserver on one processor and a slave Web server or helper processes assigned to the other processor. This is a very common way of dividing tasks on multi-processor systems where code-rewrites to make things thread-safe are not cost effective. -- "Half the people know what they're talking about, and the other half are writing code." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can we make .exe programs with php?
On Saturday 24 January 2004 02:55 pm, Mark Charette wrote: > On Sat, 24 Jan 2004, pehepe php wrote: > > Can we make .exe programs with php? for example we can do it with delphi, > > vbasic.but can we do with php? Not recommended for production boxes, but... http://pecl.php.net/bcompiler Also, there's Pharrot, but I don't know if that's even past the planning stages. If you're after encoding, try Turck MMCache. It's stable, IIRC. > > No (and .exe is a convention that isn't universal, btw). PHP is an > interpreted language, not a compiled one. > > -- > "Half the people know what they're talking about, and the > other half are writing code." -- Evan Nemerson [EMAIL PROTECTED] http://coeusgroup.com/en -- "...the whole idea of revenge and punishment is a childish daydream. Properly speaking, there is no such thing as revenge. Revenge is an act which you want to commit when you are powerless and because you are powerless: as soon as the sense of impotence is removed, the desire evaporates also. " -George Orwell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Threading & PHP
php.net/pcntl cvs.php.net/cvs.php/pecl/threads On Saturday 24 January 2004 03:24 pm, Galen wrote: > Hi, > > This may be completely crazy, but let me tell you what I want to do: > thread PHP. > > My server is a dual-processor 2 GHz machine, and it's not very loaded. > I have a few tasks that are huge and lengthy and would benefit from > being placed in their own "thread" if you will. This would serve to > either accelerate the process by splitting it among CPUs or allow the > process to continue "in the background" for a few seconds after all > pages have been loaded. > > There are two areas where I'd use this: > 1) To accelerate results in a relevancy ranking/fuzzy matching > algorithm I have created, and although I've optimized the heck out of > it, it can be slow when hundreds of thousands of items are thrown at > it. It would be easy to split the array in half and run the algorithm > on both halves, which would almost half processing time for returning > results. > > 2) With image processing. When a user uploads an image to a few of my > pages, the image is processed, re-compressed, and filed in the database > or a file system. This can take several seconds, and I'd prefer that > the user doesn't have to wait for the process to complete. > > How might I be able to make some PHP code run as a "thread" that would > serve these purposes? > > -Galen -- Evan Nemerson [EMAIL PROTECTED] http://coeusgroup.com/en -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what PHP really needs
> > > Like Hamid Said, if the ColdFusion server has the query already in > memory. > > It doesn't need to send traffic to another server to get the information > > again. Most systems I've worked on have the db and the web server on > > different areas of a firewall, so you're going through a lot of excess > steps > > if you're hitting the db every time for something that won't change. > > You missed the point. If you have to connect to a server anyway, whjat's > the difference between going to a cached queryset on a CF server or going > to a cached queryset on a db server? It's a wire transaction in any case. [Marlon Moyer] Because most CF servers are installed on the same web server, no wire is required between the web server and cf server. > > > Plus, you have a granular control on what is being cached. The sql > server > > will only cache what it has room for. So if enough queries are run > against > > it, the original query won't be cached anymore regardless. > > And this won;t happen on the CF server when you run out of memory to cache > a transaction? Yeah, right. > [Marlon Moyer] You don't have much control over what a db server caches, but considering I can tell CF exactly what I want it to save the chances are less likely, but still possible, that it will flush from memory. It's the same with session variables. I could keep saving data in session variables until I ran out of memory also. > Does CF have to query the db server to stay in sync? Of course it does. > Now there's multiple transactions to coordinate & synchronize. > [Marlon Moyer] I'm not talking about queries that require constant refreshing. That would be a bad use of an application variable. What I'm talking about are queries that maybe refresh once or twice a day. I can schedule this easily. > > But I think the original question was about a tree that took a long time > to > > create, and application variables would be a plus in this situation. > > That remains to be seen. Getting the data in an optimal way can be a > non-trivial operation. > > -- > "Half the people know what they're talking about, and the > other half are writing code." > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form variables + sessions, is this how it is supposed to work?
On Sunday 25 January 2004 04:02, Paul wrote: > If I register a session variable, set its value with one form and then try > to change its value with another form, it seems to retain only the original > value and is not replaced with the newly posted one? > > Is this how it is supposed to work and I have to unset the variable to do > this? Please include some *concise* code illustrating your problem. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* "I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter." -- Winston Churchill */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what PHP really needs
I don't have a problem with this method. It would be nice though to be able just set 1 application variable and be done with it. > -Original Message- > From: John W. Holmes > > Marlon Moyer wrote: > > > But I think the original question was about a tree that took a long time > to > > create, and application variables would be a plus in this situation. > > Again, if you're just talking about reading, how hard is it to just do > this to save: > > $save_data = ''; > > Now save that to a RAM disk and include() it whenever you need it > recreated. You can do the same thing with objects, too. > [Marlon Moyer] This is something I wish CF had the ability to do. > -- > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > php|architect: The Magazine for PHP Professionals - www.phparch.com > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what PHP really needs
> -Original Message- > From: John Nichel [mailto:[EMAIL PROTECTED] > > > The problem I have with this is where the database DOES change, and not > on any set interval. I used to work at Insight, and our product > database changed constantly, at any give moment to account for pricing > changes, stock changes, specials, updates from places like TechData, > etc. If I'm caching the results of my query, I miss those updates, and > have a customer placing an order for a product at the wrong price, out > of stock, etc. [Marlon Moyer] This isn't a situation that you would use a cached query. You would only use it when something doesn't change that often, or you have control of when it changes. > > Now I can somewhat understand the use of this on a db that rarely > changes, depending on how often rare is. Or in a case where the db is > updated at a set time. Still, if rare is a time period of months, why > have a db anyway? Static HTML would be faster than php, cold fussion, > etc. And if the db is updated at a set time, what happens when I have > to push a change out that is outside of the set time? > > Maybe it's just me, but I feel that the db is supposed to handle the > dynamic data, not the web server. > [Marlon Moyer] My time frame is usually once or twice a day. I've set up admin pages that will refresh the queries on demand, or the pages themselves update the db and then refresh the query. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can we make .exe programs with php?
A while ago there was someone who announced a link to some program that allowed you to make exe's (yes, it works)... Although, it's 100% uncompiled (not even to bytecodes), so the only thing you gain is that it'll be easier to run... :p Also checkout this: http://binaryphp.sf.net -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com "Pehepe Php" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > Can we make .exe programs with php? for example we can do it with delphi, > vbasic.but can we do with php? > > _ > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what PHP really needs
f stock, etc. > > [Marlon Moyer] > This isn't a situation that you would use a cached query. You > would only use > it when something doesn't change that often, or you have control > of when it > changes. Hell, I have stuff like that - it's called generate an include file with a cron job. Trivial. All my web pages include it. The variables are all set by an outside process. Re CF server & Web server. It's "on the wire" (using sockets). You're going up & down the stacks just as if you're using a wire except for the last 2 levels (ip & above stacks are used). And only the smallest shops would consider having a web server and CF (or db) server on the same box. No scalability or easy recovery from failure. Heck, I run a tiny little ISP out of my basement, and have all major services segregated onto different machinery with 1000baseT private net between the different boxes (db & search services, DNS resolvers, web servers, mail server, and backup array). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what PHP really needs
>Let the db server handle query/cache consistency ... why put yet another >server in the way that will have to be triggered by the underlying db to >clear ITS cache? Very true, but tests I've done in the past with PostgreSQL and MySQL-driven PHP sites show that adding a simple static file cache (for data that changes rarely) can make a world of difference on a heavily-loaded site, trimming response times by 90% in some cases. A database server by nature must assume that all data is equally mutable. An application developer, however, knows by design how "fresh" any one piece of data needs to be and can cache accordingly. E.g., don't hit the database for your site's navigational structure or news articles every single time, if these things don't change more than a few times per week. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] AFter the URL in PHP
--- Randy Johnson <[EMAIL PROTECTED]> wrote: > I am not sure if this is a php thing or not but hope is... It's more an Apache thing, but I think it's relevant. > I see some sites like this: > > www.domain.com/tree > > where tree is not a directory > > for example > www.domain.com/tree/ would not work Actually, it would work. Just make tree a PHP script, and add something like this to your .htaccess: ForceType application/x-httpd-php Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Threading & PHP
--- Galen <[EMAIL PROTECTED]> wrote: > This may be completely crazy, but let me tell you what I want to do: > thread PHP. If you use PHP as an Apache module, you can use Apache 2, which has threading. Just make sure any extension you use is thread-safe. Chris = Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what PHP really needs
--- Mark Charette <[EMAIL PROTECTED]> wrote: > And only the smallest shops would consider having a web server and > CF (or db) server on the same box. No scalability or easy recovery > from failure. This is incorrect. The recommended Web architecture for ColdFusion is to have the Web server and the CF server on the same physical box and to have many of these nodes running on small servers. As for the ColdFusion versus PHP discussion, I'm not really interested. Chris = Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what PHP really needs
--- "John W. Holmes" <[EMAIL PROTECTED]> wrote: > Marlon Moyer wrote: > > But I think the original question was about a tree that took a > > long time to create, and application variables would be a plus > > in this situation... > > Again, if you're just talking about reading, how hard is it to > just do this to save: > > $save_data = ''; > > Now save that to a RAM disk and include() it whenever you need it > recreated. You can do the same thing with objects, too. Wow, the simplicity of logic at its best. :-) Nice one, John. Chris = Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what PHP really needs
Chris Shiflett wrote: As for the ColdFusion versus PHP discussion, I'm not really interested. What about a Godzilla versus the Shrek dragon discussion? ;) -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] binary code, unreadable code etc
Hi, I have been following the thread "Can we make .exe programs with php? " for some time now and have been visiting the URLs and examples that are being recomended to do this. Some of the solutions are pretty good like BinaryPHP and BCompiler...and I personally use Turck MMCache on our sites. Am just curious to know what do you guys use when you dont want anybody to be able to read your source files...I like the Turck encoder but problem is that the client has to have Turck installed on his server to use the files..BCompiler seems good but is still too young, and I dont know or have a C++ compiler to use BinaryPHP so I use codesecure instead...till now no problems...but not as secure (i think) as the others. The others that come to mind are Zend and Ioncube...too expensive for me (and quite a few here) , as I was not born with a silver spoon up my ...or anywhere else. Since PHP does not have any built in functions to do this, like for example C...any ideas? or recomendations? Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] binary code, unreadable code etc
Ryan A wrote: server to use the files..BCompiler seems good but is still too young, and I dont know or have a C++ compiler to use BinaryPHP gcc can be a C++ compiler. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form variables + sessions, is this how it is supposed to work?
OK thanks. I figured out my problem but I am not sure why this is. I am trying to impliment a back button to allow the user to go back and change form values. If I uses sessions and register $test then this does not work, it sticks does not change the value of $test if the user re-submits: Thanks for any help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 25 Jan 2004 04:43:51 -0000 Issue 2550
php-general Digest 25 Jan 2004 04:43:51 - Issue 2550 Topics (messages 175633 through 175669): Re: what PHP really needs 175633 by: Mark Charette 175638 by: Marlon Moyer 175639 by: John Nichel 175642 by: Mark Charette 175646 by: John W. Holmes 175655 by: Marlon Moyer 175657 by: Marlon Moyer 175658 by: Marlon Moyer 175660 by: Mark Charette 175661 by: Mike Migurski 175664 by: Chris Shiflett 175665 by: Chris Shiflett 175666 by: John Nichel Re: Why we love Microsoft (0t) 175634 by: Stuart 175636 by: Freedomware Re: "Additional Features for working with linked Tables have been deactivated." 175635 by: Raditha Dissanayake RewriteRule REGEX ? 175637 by: Monty 175640 by: DvDmanDT 175641 by: Monty 175644 by: Paul Chvostek Re: Using templates (Code & User Interface) 175643 by: Robert Cummings Message rejected 175645 by: Piers Lauder Can we make .exe programs with php? 175647 by: pehepe php 175648 by: Mark Charette 175653 by: Evan Nemerson 175659 by: DvDmanDT Form variables + sessions, is this how it is supposed to work? 175649 by: Paul 175656 by: Jason Wong 175669 by: Paul Threading & PHP 175650 by: Galen 175651 by: Lucas Gonze 175652 by: Mark Charette 175654 by: Evan Nemerson 175663 by: Chris Shiflett Re: AFter the URL in PHP 175662 by: Chris Shiflett binary code, unreadable code etc 175667 by: Ryan A 175668 by: John Nichel Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- > -Original Message- > From: Hamid Hossain [mailto:[EMAIL PROTECTED] > As a ColdFusion Certified Developer I can say: You are right! > > In CF you can fire a sql statment and store its result in a > variable which > is not going to be removed from the server's memory after > responding to the > user. That variable will be available for sometime declared by > you when you > created the query. Perhaps you weren't aware that every modern database does the same thing (or can if you turn it on): the results of query sets are cached at the db server and are available if the same query is used without involving a file read. If any update changes any of the underlying result sets then the corresponding cache entry is invalidated and the momeory released for another cache entry. Let the db server handle query/cache consistency ... why put yet another server in the way that will have to be triggered by the underlying db to clear ITS cache? Mark C, --- End Message --- --- Begin Message --- Like Hamid Said, if the ColdFusion server has the query already in memory. It doesn't need to send traffic to another server to get the information again. Most systems I've worked on have the db and the web server on different areas of a firewall, so you're going through a lot of excess steps if you're hitting the db every time for something that won't change. Plus, you have a granular control on what is being cached. The sql server will only cache what it has room for. So if enough queries are run against it, the original query won't be cached anymore regardless. But I think the original question was about a tree that took a long time to create, and application variables would be a plus in this situation. Marlon (another certified cf developer) > -Original Message- > From: Mark Charette [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 24, 2004 9:35 AM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] what PHP really needs > > > > -Original Message- > > From: Hamid Hossain [mailto:[EMAIL PROTECTED] > > As a ColdFusion Certified Developer I can say: You are right! > > > > In CF you can fire a sql statment and store its result in a > > variable which > > is not going to be removed from the server's memory after > > responding to the > > user. That variable will be available for sometime declared by > > you when you > > created the query. > > Perhaps you weren't aware that every modern database does the same thing > (or > can if you turn it on): the results of query sets are cached at the db > server and are available if the same query is used without involving a > file > read. If any update changes any of the underlying result sets then the > corresponding cache entry is invalidated and the momeory released for > another cache entry. > > Let the db server handle query/cache consistency ... why put yet another > server in the way that will have to be triggered by the underlying db to > clear ITS cache? > > Mark C, > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscrib
Re: [PHP] Form variables + sessions, is this how it is supposed to work? - Grammar corrected
I figured out my problem but I am not sure why this is. I am trying to implement a back button to allow the user to go back and change form values. If I use sessions and register $test then this does not work, the value of $test does not change if the user re-submits: Thanks for any help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: RewriteRule REGEX ?
Actually, it's not the reverse that I want to do. Right now the pages on my site use this form of URL: domain.com/articles.php?id=999 Now that I have upgraded my server to Apache 2, I'm going to use the ForceType and FollowSymLinks options to change the entire site to use this search-engine-friendly form of URL to access all pages: domain.com/articles/999 But I don't want the old links to be broken once I change the site to this new type of URL. So, if someone types in "domain.com/articles.php?id=999", instead of getting a 404 error, I'd like to use the RewriteEngine to rewrite that URL to the valid new URL format: domain.com/articles/999. So, I thought this would work in my .htaccess file, but it doesn't: RewriteRule articles\.php?id=([0-9]+) articles/$1 [R] Do I have to escape the ? before id \? I tried it, but it didn't make a difference. I also tried /articles... but that didn't work, either. Monty > From: [EMAIL PROTECTED] (Paul Chvostek) > Newsgroups: php.general > Date: Sat, 24 Jan 2004 13:39:25 -0500 > To: Monty <[EMAIL PROTECTED]> > Subject: Re: RewriteRule REGEX ? > > > On Sat, Jan 24, 2004 at 12:18:36PM -0500, Monty wrote: >> >> From This: articles.php?id=999 >> To This:articles/999 > ... >> What am I doing wrong?? > > I suspect you may not be looking at the problem the right way. > > What exactly do you want to do? > > Normally, you'd go the other direction; that is, you'd have mod_rewrite > recognize ^/articles/([0-9]+)$ and translate it to /articles.php?id=$1 > ... so that a request to the "pretty" URL gets served as an HTTP GET on > the PHP script. > > I get the impression that you're expecting mod_rewrite to translate copy > from inside your HTML files, as well as recognize and reverse the > translation when the request comes back in. Is that it? > >> RewriteEngine on >> RewriteRule ^articles\.php\?id=([0-9]+)$ articles/$1 [R] > >> But I keep getting a 404 error for articles.php, which means that something >> must be wrong with my RewriteRule because it's not matching. I've tried >> various tweaks and just can't get it to work. > > I bet if you create an "articles" directory in your documentroot, with > with files named things like "999" in it, you'll stop seeing the 404's. > Check your apache error_log. > > If what you're trying to achieve is to have existing HTML files get > their embedded URLs translated, you're going to have to do that with an > output filter. You can do it with PHP, or use mod_sed ... lots of > options. But a rewrite rule won't change page content, it'll only > rewrite the *requests* that come in. > > Of course, if you know all this already, and really are trying to point > requests for /articles.php?id=123 to a file named "123" in the directory > "articles", then you'll still need to inspect your error_log. > > -- > Paul Chvostek <[EMAIL PROTECTED]> > it.canadahttp://www.it.ca/ > Free PHP web hosting!http://www.it.ca/web/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using templates (Code & User Interface)
I wrote my own template system that works very well... I've got an outer control file that handles the user input, sets the variables for what the template should use of stylesheets and menus and such, and a variable for what body to use. All my body files are either PHP programs in themselves mixed with HTML presentation (I try to keep near all the PHP in the start, and the actual presentation generation at the end). Basically it means that the template only holds the basic table structure of the site, and a little code to include the files that are needed to make it into what it's suppose to look like. The way I made it I can use the same template file all over the site, or make another template and tell the control scripts to use that instead. I still haven't made it possible for the menu system to change looks though, but I plan to add that in the future... It would be very easy to change my system to allow it to use different templates or other elements based on various conditions FWIW Rene Fate would have it, that on Sat, 24 Jan 2004 09:53:16 +0300, Hamid Hossain wrote: >Hi, > >Always I have a problem that I don't know how to make my code away from the >user interface files. > >I tried to use some template classes, but I did'nt like what I tired because >some if statments are used inside the template. > >How can I prepare my code to be working in more that one template? Should I >use some methodology like FuseBox.org > >Regards, >Hamid Hossain -- Rene Brehmer aka Metalbunny http://metalbunny.net/ References, tools, and other useful stuff... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sample code
Thanks for any help. Even if I remove the specific default value for the text input, only the first posted value seems to be accepted and stays regardless of whether I change it :( test10.php --- NEXT test11.php --- test12.php --- START OVER "Paul" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I figured out my problem but I am not sure why this is. > > > > I am trying to implement a back button to allow the user to go back and > change form values. > > > > If I use sessions and register $test then this does not work, the value of > $test does not change if the user re-submits: > > > > > > > > Thanks for any help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] porting perl scripts to php
Al -- You have started a new thread by taking an existing message and replying to it while merely changing the Subject: line. That is bad, because it breaks threading. Whenever you reply to a message, your mail client generates a "References:" header that tells all recipients to which posting(s) your posting refers. A mail client uses this information to build a "thread tree" of the postings so that it is easy to see just how they relate to each other. With your posting style you successfully torpedoed this useful feature; your posting shows up within an existing thread even though it is completely unrelated. Always do a fresh post when you want to start a new thread. That means that you do not select any sort of "Reply" when you start your message. You can save the list address in your address book (or equivalent) for convenience. ...and then [EMAIL PROTECTED] said... % % Hi, Hi! % % I was wondering if there is an easy way to port perl scripts to php, or % maybe someone could recommend someone who could help me? The two languages are not terribly different; you may be able to do the porting on your own if you know php. You could exec the perl script and get the result if that setup works for you. I would be happy to be of service if you would like. Feel free to drop me a reply. % % Thanks, % Al HTH & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature