Re: [PHP] Any conflict with $_POST when 2 users concurrently submitting the same form using POST method?

2009-06-09 Thread Keith
Craige, Marc, Nitsan,Bastien, Thanks for your reply! This is my understanding and comment from your replies: (1) If the web server do have assign anonymous request ID to each HTTP request from client browser, and assign $_POST to each request ID and works within request ID scope, this is fine w

[PHP] PHP as Server Side for a Web Database Application.

2009-06-09 Thread R. S. Patil
Hi, We are in phase of evaluating PHP as Serverside technology for our first web application. We have finalized Flex for user interface and Birt as reporting engine. Now the data services are to be evaluated. Flex forums recommended us using PHP for this. We would like to implement SOA for databa

Re: [PHP] php applications

2009-06-09 Thread Paul M Foster
On Wed, Jun 10, 2009 at 02:48:23AM +0100, Michael wrote: > This was about half of my point, writing these applications in PHP is > difficult, it is a task to be overcome. PHP requires cajoling into being > useful. Your solution to "use the Java extension" is peculiarly ironic - > yes: Use Java! >

Re: [PHP] php applications

2009-06-09 Thread Robert Cummings
Michael wrote: Robert Cummings wrote: > Michael wrote: >> "Languages were designed to be programmed, what they are programmed to >> do is entirely up to the programmer." >> >> Perhaps there is no hope then. This is so distant from the actual case >> it does not require more than pointing ou

Re: [PHP] php applications

2009-06-09 Thread Michael
Robert Cummings wrote: > Michael wrote: >> "Languages were designed to be programmed, what they are programmed to >> do is entirely up to the programmer." >> >> Perhaps there is no hope then. This is so distant from the actual case >> it does not require more than pointing out. >> >> If you want t

Re: [PHP] php applications

2009-06-09 Thread Robert Cummings
Michael wrote: "Languages were designed to be programmed, what they are programmed to do is entirely up to the programmer." Perhaps there is no hope then. This is so distant from the actual case it does not require more than pointing out. If you want to write demons in php fine, i wince at t

Re: [PHP] php applications

2009-06-09 Thread Michael
"Languages were designed to be programmed, what they are programmed to do is entirely up to the programmer." Perhaps there is no hope then. This is so distant from the actual case it does not require more than pointing out. If you want to write demons in php fine, i wince at the thought. The

Re: [PHP] php applications

2009-06-09 Thread Robert Cummings
Michael wrote: This was about half of my point, writing these applications in PHP is difficult, it is a task to be overcome. PHP requires cajoling into being useful. Your solution to "use the Java extension" is peculiarly ironic - yes: Use Java! If the only language you know is PHP i'm sure i

Re: [PHP] php applications

2009-06-09 Thread Robert Cummings
Michael wrote: Robert Cummings wrote: Michael wrote: Paul M Foster wrote: On Mon, Jun 08, 2009 at 09:30:18AM -0700, Kyle Terry wrote: I don't mean to be the thread spirit killer, but I think another language would be better for this. Such as Python. PHP desktop apps might be fun to h

Re: [PHP] php applications

2009-06-09 Thread Michael
Daniel Brown wrote: > Hate to police threads here, but please don't top-post. Apologies, my client was not configured properly. Hopefully it is threading now, if not please notify me. Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub

Re: [PHP] php applications

2009-06-09 Thread Daniel Brown
Hate to police threads here, but please don't top-post. On Tue, Jun 9, 2009 at 21:48, Michael wrote: > This was about half of my point, writing these applications in PHP is > difficult, it is a task to be overcome. PHP requires cajoling into being > useful. Your solution to "use the Java exten

Re: [PHP] php applications

2009-06-09 Thread Michael
This was about half of my point, writing these applications in PHP is difficult, it is a task to be overcome. PHP requires cajoling into being useful. Your solution to "use the Java extension" is peculiarly ironic - yes: Use Java! If the only language you know is PHP i'm sure it looks very cap

Re: [PHP] php applications

2009-06-09 Thread Eddie Drapkin
While the technology is pretty immature at the moment, due to its under-use no doubt, saying that PHP is never the tool for a desktop application is pretty inane. While the primary developmental lifecycle is geared towards web development (who's arguing that?), there's nothing really pervasive pre

Re: [PHP] php applications

2009-06-09 Thread Michael
Robert Cummings wrote: Michael wrote: Paul M Foster wrote: On Mon, Jun 08, 2009 at 09:30:18AM -0700, Kyle Terry wrote: I don't mean to be the thread spirit killer, but I think another language would be better for this. Such as Python. PHP desktop apps might be fun to hack around with, b

Re: [PHP] php applications

2009-06-09 Thread Daniel Brown
On Tue, Jun 9, 2009 at 20:42, Robert Cummings wrote: > > From my POV, better than writing "Programmed desktop applications in VB". > But that's just my POV :) Did I happen to tell you that's what I've been doing all day, or are you just *that* good at making me miserable --- even when it's not

Re: [PHP] php applications

2009-06-09 Thread Robert Cummings
Michael wrote: Paul M Foster wrote: On Mon, Jun 08, 2009 at 09:30:18AM -0700, Kyle Terry wrote: I don't mean to be the thread spirit killer, but I think another language would be better for this. Such as Python. PHP desktop apps might be fun to hack around with, but I wouldn't use it fo

Re: [PHP] Re: SHOULD I NOT USE "ELSE" IN IF STATEMENTS....?

2009-06-09 Thread Clancy
On Tue, 09 Jun 2009 12:22:22 -0400, rob...@interjinn.com (Robert Cummings) wrote: >Craige Leeder wrote: >> I'm not sure I agree with NEVER using else. Sometimes else is a very >> logical way to organize code. However, it should not be used for data >> validation IE: >> >> >> function myValida

Re: [PHP] php applications

2009-06-09 Thread Robert Cummings
Kyle Terry wrote: On Mon, Jun 8, 2009 at 9:33 AM, Robert Cummings wrote: Kyle Terry wrote: On Mon, Jun 8, 2009 at 8:48 AM, tedd wrote: Hi gang: I've heard that php can be used for more than web programming, but I am not aware of specifically how that can be done. So, let me ask directly -

Re: [PHP] php applications

2009-06-09 Thread Eddie Drapkin
Depends on how you look at it, I'd take the perspective that that's a non-normal approach to the language and demonstrates a fuller understanding of the language. Same as if you put (and I do) "wrote an asynchronous socket server in PHP." Despite the position PHP developers are usually applying f

Re: [PHP] php applications

2009-06-09 Thread Kyle Terry
On Mon, Jun 8, 2009 at 9:33 AM, Robert Cummings wrote: > Kyle Terry wrote: > >> On Mon, Jun 8, 2009 at 8:48 AM, tedd wrote: >> >> Hi gang: >>> >>> I've heard that php can be used for more than web programming, but I am >>> not >>> aware of specifically how that can be done. So, let me ask direct

Re: [PHP] How does caching work?

2009-06-09 Thread Stuart
2009/6/9 Paul M Foster : > This question may be too complex for a reasonable answer on this list, > but I'll ask anyway. > > If a page has static content (no PHP variables, etc.), I can > understand how caching works. The engine just checks to see if it's got > a copy of the requested page in the c

Re: [PHP] php applications

2009-06-09 Thread Michael
Paul M Foster wrote: On Mon, Jun 08, 2009 at 09:30:18AM -0700, Kyle Terry wrote: I don't mean to be the thread spirit killer, but I think another language would be better for this. Such as Python. PHP desktop apps might be fun to hack around with, but I wouldn't use it for a production appli

Re: [PHP] best solution to ecommerce web pages

2009-06-09 Thread Ashley Sheridan
On Tue, 2009-06-09 at 16:52 -0400, Robert Cummings wrote: > Ashley Sheridan wrote: > > On Sun, 2009-06-07 at 13:29 +0200, mrfroasty wrote: > >> Alain Roger wrote: > >>> Hi, > >>> > >>> i'm currently investigating what would be the best solution to develop an > >>> e-commerce web site. > >>> should

Re: [PHP] Show the entire browser request

2009-06-09 Thread Dotan Cohen
> Just checked your site in Elinks (works like Lynx) and I'm getting the > headers come back to me. I'm assuming you changed your site code before > me sending this and after you sent the original message? > The individual headers are as they always were. It's the entire request verbatim (valid or

Re: [PHP] best solution to ecommerce web pages

2009-06-09 Thread LAMP
Ashley Sheridan wrote: On Sun, 2009-06-07 at 13:29 +0200, mrfroasty wrote: Alain Roger wrote: Hi, i'm currently investigating what would be the best solution to develop an e-commerce web site. should i use some PHP template engine like smarty or CMS like Joomla, Drupal ? thanks a lot,

Re: [PHP] Show the entire browser request

2009-06-09 Thread Ashley Sheridan
On Tue, 2009-06-09 at 17:58 +0300, Dotan Cohen wrote: > > There are no risks that I can see in the code. You're welcome to use > > it, and a link to http://stut.net/ is always appreciated ;-) > > > > In August when I will have more time to devote to it I will put it on > the site. With link, and i

Re: [PHP] best solution to ecommerce web pages

2009-06-09 Thread Robert Cummings
Ashley Sheridan wrote: On Sun, 2009-06-07 at 13:29 +0200, mrfroasty wrote: Alain Roger wrote: Hi, i'm currently investigating what would be the best solution to develop an e-commerce web site. should i use some PHP template engine like smarty or CMS like Joomla, Drupal ? thanks a lot, Jo

Re: [PHP] Re: Cross site scripting

2009-06-09 Thread Nitsan Bin-Nun
XSS or Cross Site Scripting is the ability to inject malicious javascript or HTML to the $_POST or $_GET variables, and at the bottom line - to get them printed and output-ed to the client through the HTML code of the page. In order to avoid such security issues all you have to do is to sanitise t

Re: [PHP] How does caching work?

2009-06-09 Thread Robert Cummings
Paul M Foster wrote: This question may be too complex for a reasonable answer on this list, but I'll ask anyway. If a page has static content (no PHP variables, etc.), I can understand how caching works. The engine just checks to see if it's got a copy of the requested page in the cache, and d

Re: [PHP] How does caching work?

2009-06-09 Thread Daniel Brown
On Tue, Jun 9, 2009 at 16:35, Paul M Foster wrote: > > But if a page is populated with variables from a database (for example) > which could change from time to time, how could a caching engine > possibly cache it? How would it determine whether to re-fetch the page > or use the cached version?

Re: [PHP] best solution to ecommerce web pages

2009-06-09 Thread Ashley Sheridan
On Sun, 2009-06-07 at 13:29 +0200, mrfroasty wrote: > Alain Roger wrote: > > Hi, > > > > i'm currently investigating what would be the best solution to develop an > > e-commerce web site. > > should i use some PHP template engine like smarty or CMS like Joomla, Drupal > > ? > > > > thanks a lot, >

[PHP] How does caching work?

2009-06-09 Thread Paul M Foster
This question may be too complex for a reasonable answer on this list, but I'll ask anyway. If a page has static content (no PHP variables, etc.), I can understand how caching works. The engine just checks to see if it's got a copy of the requested page in the cache, and displays it if so, or fetc

[PHP] Re: SHOULD I NOT USE "ELSE" IN IF STATEMENTS....?

2009-06-09 Thread O. Lavell
Colin Guthrie wrote: > 'Twas brillig, and O. Lavell at 08/06/09 16:33 did gyre and gimble: [..] > So personally I like early return. I use it mostly to cut down brace and > indentation churn. I try to keep code into 80 cols and if 40 of them are > used up with indents that doesn't leave much roo

Re: [PHP] Re: Cross site scripting

2009-06-09 Thread Skip Evans
Well, the function filter_input(INPUT_GET, 'kw', FILTER_SANITIZE_ENCODED); ...seemed to take care of the example on the report by Security Metrics. Am I on the right track here, at least? I'm reading pages on 'sanitizing PHP input'. Is that where I should be headed? Skip Shawn McKenzie w

[PHP] Re: SHOULD I NOT USE "ELSE" IN IF STATEMENTS....?

2009-06-09 Thread Colin Guthrie
'Twas brillig, and O. Lavell at 08/06/09 16:33 did gyre and gimble: adam.timberlake wrote: Im reading this post and i donnot understand how i should write my code: http://www.talkphp.com/absolute-beginners/4237-curly- brackets.html#post23720 Does it mean that i am to not write else statements

[PHP] Re: Cross site scripting

2009-06-09 Thread Shawn McKenzie
Skip Evans wrote: > Hey all, > > You may have seen my earlier message about a current client whose site > I've taken over maintenance on that is trying to get PCI Compliance from > Security Metrics. I've put all the forms behind https and a couple of > other things, but this one I don't know how t

[PHP] Php and Imagemagick problems

2009-06-09 Thread Miller, Terion
I am having a heck of a time getting a script to convert images to workit worked fine for a few hours, then someone "tweaked it" and now it doesn't work and I can't get it back...they "tweaked" the original file The script runs and uploads files but no longer "converts" them with the Image

RE: [PHP] Any conflict with $_POST when 2 users concurrently submitting the same form using POST method?

2009-06-09 Thread HallMarc Websites
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Information from ESET Smart Security, version of virus signature database 4141 (20090609) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: SHOULD I NOT USE "ELSE" IN IF STATEMENTS....?

2009-06-09 Thread Robert Cummings
Craige Leeder wrote: I'm not sure I agree with NEVER using else. Sometimes else is a very logical way to organize code. However, it should not be used for data validation IE: function myValidatorFunc($data) { if (empty(data)) { return false; } else { if (!is_numeric($data))

Re: [PHP] Re: SHOULD I NOT USE "ELSE" IN IF STATEMENTS....?

2009-06-09 Thread Craige Leeder
I'm not sure I agree with NEVER using else. Sometimes else is a very logical way to organize code. However, it should not be used for data validation IE: function myValidatorFunc($data) { if (empty(data)) { return false; } else { if (!is_numeric($data)) { return fals

[PHP] Cross site scripting

2009-06-09 Thread Skip Evans
Hey all, You may have seen my earlier message about a current client whose site I've taken over maintenance on that is trying to get PCI Compliance from Security Metrics. I've put all the forms behind https and a couple of other things, but this one I don't know how to solve. I'll read up on

Re: [PHP] Any conflict with $_POST when 2 users concurrently submitting the same form using POST method?

2009-06-09 Thread Craige Leeder
While yes $_POST is a supergloabal, even a superglobal has it's own scope. The scope of $_POST is to the call of the user to the web server. Therefor, no User A's information will not be overwritten by User B's information. Hope this helps. Let me know if you want any further clarification. Th

Re: [PHP] Any conflict with $_POST when 2 users concurrently submitting the same form using POST method?

2009-06-09 Thread Bastien Koert
On Tue, Jun 9, 2009 at 11:51 AM, Nitsan Bin-Nun wrote: > Hell no! > > Why would they be overwritten? > > An HTTP request is sent from user A, the interpreter is "compiling" > the PHP script with the received HTTP request variables and send back > the HTTP response to user A, during this time the sa

Re: [PHP] Any conflict with $_POST when 2 users concurrently submitting the same form using POST method?

2009-06-09 Thread Nitsan Bin-Nun
Hell no! Why would they be overwritten? An HTTP request is sent from user A, the interpreter is "compiling" the PHP script with the received HTTP request variables and send back the HTTP response to user A, during this time the same thing happens with user B. I can't think of any possible reason

[PHP] Any conflict with $_POST when 2 users concurrently submitting the same form using POST method?

2009-06-09 Thread Keith
Let's say user A and user B submitting purchase order form with "order.php" at the same time, with method=post action='confirmation.php'. (1) Will $_POST['order'] submitted by user A replaced by $_POST['order'] submitted by user B, and the both user A & B getting the same order, which is mad

Re: [PHP] Show the entire browser request

2009-06-09 Thread Dotan Cohen
> There are no risks that I can see in the code. You're welcome to use > it, and a link to http://stut.net/ is always appreciated ;-) > In August when I will have more time to devote to it I will put it on the site. With link, and it is _me_ who appreciates _your_ help. Thanks! Dotan Cohen http:

[PHP] socket_write return wrong data length

2009-06-09 Thread Manuel C.
Hi all, I'm writting a little telnet client, but I've a problem with the socket_write function public function send($data){ $datalen = strlen($data); $datawritten = 0; do { $datawritten = socket_write($this->_tnsock

Re: [PHP] how to get rid of that annoying |

2009-06-09 Thread Bastien Koert
On Tue, Jun 9, 2009 at 1:47 AM, PJ wrote: > Robert Cummings wrote: >> >> >> PJ wrote: >>> Robert Cummings wrote: PJ wrote: > Robert Cummings wrote: >> PJ wrote: >>> I know this a silly question, but I can't figure out if it's even >>> possible to get rid of that final annoying

Re: [PHP] Show the entire browser request

2009-06-09 Thread Stuart
2009/6/9 Dotan Cohen : > Why should this be run on port 8000? Is there a security implication > of running this on port 80? Would it be unwise to use this as a public > service, for instance? You can run it on port 80 but you'll need to make sure there's not another web server running on that port

Re: [PHP] Show the entire browser request

2009-06-09 Thread Dotan Cohen
Why should this be run on port 8000? Is there a security implication of running this on port 80? Would it be unwise to use this as a public service, for instance? I was considering adding the tool to http://simplesniff, which is why I ask. Of course, that would only be with your permission, and it

[PHP] automatic timezone adjustment

2009-06-09 Thread viraj
hi all, i'm trying to implement automatic timezone adjustment in one of my application, it should work based on the country,state and city which users specify in their account settings. i have two questions. 1. since there are thousands of cities, what is the best and the easiest way to figure ou

Re: [PHP] Show the entire browser request

2009-06-09 Thread Dotan Cohen
> Run this on a command line and hit the IP on port 8000. All it does is > read the request and send it back as the response. It ignores POST > bodies but it would be pretty simple to modify it so it echo's those > back too. > >    http://dev.stut.net/php/httpsrv.phps > Stuart, that is quite a bit

Re: [PHP] Show the entire browser request

2009-06-09 Thread Stuart
2009/6/8 Dotan Cohen : >> If its the request from the browser, why not just fire up a packet sniffer >> and get it that way? Unless it's using SSL/TLS/VPN/something that would >> encrypt it, you should be able to see the request in clear text. >> > > The browser is running on a Symbian cellphone.

Re: [PHP] PHP running Python script - not waiting for Python script to finish

2009-06-09 Thread Robert Cummings
Per Jessen wrote: Adrian Price-Whelan wrote: Hey - Running these on a Linux server with PHP 5 and Python 2.5. My problem is this: I have a simple php form that executes a long (~3 minutes) Python script using the 'exec' function from php. The issue is that the browser, I think, 'times out'

Re: [PHP] Strange PHP/Python problem

2009-06-09 Thread Robert Cummings
Adrian Price-Whelan wrote: Hey all- Something strange is happening with a python script I am executing from a php page: I am executing this by doing $output = `python blahblah.py arg1 arg2 arg3` Say my Python code looks like this: import sys import os thisPID = os.getpid() print thisPID pri

Re: [PHP] PHP running Python script - not waiting for Python script to finish

2009-06-09 Thread Per Jessen
Adrian Price-Whelan wrote: > Hey - > > Running these on a Linux server with PHP 5 and Python 2.5. > > My problem is this: I have a simple php form that executes a long (~3 > minutes) Python script using the 'exec' function from php. The issue > is that the browser, I think, 'times out' before th