Re: [PHP] help out a noob w/ include switch?

2005-09-21 Thread Philip Hallstrom
Hi All, My very first post to this group as I'm a freshly spanked new born php baby. Hope I have the correct stop for noob tech questions. Please re-direct me if I have it wrong. I've been doing web dev for a quite while with a variety of methods (html, xhtml/css, cfml, flash/as, on and

Re: [PHP] Php logging into online bank to get details automatically

2005-09-21 Thread I. Gray
Thanks, Jasper I looked at my banks TCs and it says don't use software that stores your password unless it is used by a specific banking service. I am going to look into the curl functions, but I am pretty sure that the bank won't let it work unless it thinks it is a proper browser like IE

Re: [PHP] Php logging into online bank to get details automatically

2005-09-21 Thread Jasper Bryant-Greene
I. Gray wrote: I looked at my banks TCs and it says don't use software that stores your password unless it is used by a specific banking service. You might like to send them an email to clarify; as a general rule your bank manager is the kind of person you least want to piss off ;) I am

[PHP] Bytecode

2005-09-21 Thread Andy Pieters
Hi all I came across some text that sais PHP compiles the script to bytecode prior to running it. Is this true, and is it possible to instead of .php source files, use those bytecodes files in distribution? With kind regards Andy -- Registered Linux User Number 379093 Now listening to

Re: [PHP] Bytecode

2005-09-21 Thread Jasper Bryant-Greene
Andy Pieters wrote: I came across some text that sais PHP compiles the script to bytecode prior to running it. Is this true, and is it possible to instead of .php source files, use those bytecodes files in distribution? http://php.net/bcompiler -- Jasper Bryant-Greene Freelance web

Re: [PHP] Bytecode

2005-09-21 Thread Rory Browne
I came across some text that sais PHP compiles the script to bytecode prior to running it. PHP compilies the source to OPCodes. Is this true, and is it possible to instead of .php source files, use those bytecodes files in distribution? With kind regards Andy -- Registered

Re: [PHP] Bytecode

2005-09-21 Thread Rory Browne
On 9/21/05, Andy Pieters [EMAIL PROTECTED] wrote: Hi all I came across some text that sais PHP compiles the script to bytecode prior to running it. Is this true, and is it possible to instead of .php source files, use those bytecodes files in distribution? There are no bytecode files.

Re: [PHP] BOOKING SYSTEM

2005-09-21 Thread php @ net mines
Got the solution finally!!! The code is not optimised yet but here it is: (The accomodation holds total availability and the accomodation1 the bookings...) function checkspecificdate($thespecificdatefrom,$thespecificdateto,$productid) { list($dd1,$mm1,$1) = split(/,

Re: [PHP] Tidying code for PHP5.0.5/PHP4.4.0

2005-09-21 Thread Jochem Maas
Michael Sims wrote: Jochem Maas wrote: Michael Sims wrote: So, as far as foo() knows: foo($a = 5); and foo(5); are exactly the same... I don't think they are, and you're examples don't prove it. Anyone care to come up with the proof. No, I was wrong, Rasmus corrected me. That's my

Re: [PHP] Fwd: Code Optimization Help

2005-09-21 Thread Jochem Maas
Joseph Crawford wrote: Ok so finally i implemented my logging class into my mail merge object, this is the results Word - Application Opened. Word - Document1 Document Added. Word - header.doc Document Saved. Word - header.doc Document Closed. Word - Document2 Document Added. Word - ds.doc

Re: [PHP] Php logging into online bank to get details automatically

2005-09-21 Thread John Nichel
Jasper Bryant-Greene wrote: John Nichel wrote: I. Gray wrote: I thought I may of read of this somewhere- but I may be wrong. I am also not sure whether this is allowed by banks, so please let me know- I want to stay on the right side of the law! Your account...I can't see where it would

[PHP] security/sql issues with php

2005-09-21 Thread bruce
hi.. i've been searching/researching the areas of security regarding url input, form input, as well as database input (mysql). while there are plenty of articles that touch on the topic, i'm looking for a given site/package/lib (open source) that is pretty much the standard that i could use for

[PHP] Re: security/sql issues with php

2005-09-21 Thread Aaron Greenspan
Bruce, If you're looking for commercial-grade open-source packages, I think you're going to have a pretty hard time finding much. Most commercial-grade software is...commercial. The truly robust open-source packages, i.e. Mozilla, MySQL, JBoss, BerkeleyDB, etc., are backed by some sort of

RE: [PHP] Re: security/sql issues with php

2005-09-21 Thread bruce
i would have thought (perhaps wrongly) that someone would have created a series of functions/routines and wrapped them in a package/lib to deal with the security issues that i've raised!! but i have to tell you. i've looked at some open source classess/apps that aren't that strong. in fact, some

[PHP] exec command fails in php, works in the command line

2005-09-21 Thread ernst
I have two programs on two servers, and they both have similar problems. In each one, I use 'exec' to call a helper program. In one case, it is ecasound, which I use to resample an mp3. In the other, it is convert, which creates a thumbnail of a very large image the user has uploaded. In

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread John Nichel
[EMAIL PROTECTED] wrote: I have two programs on two servers, and they both have similar problems. In each one, I use 'exec' to call a helper program. In one case, it is ecasound, which I use to resample an mp3. In the other, it is convert, which creates a thumbnail of a very large image the

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread John Nichel
[EMAIL PROTECTED] wrote: I have two programs on two servers, and they both have similar problems. In each one, I use 'exec' to call a helper program. In one case, it is ecasound, which I use to resample an mp3. In the other, it is convert, which creates a thumbnail of a very large image the

Re: [PHP] Re: security/sql issues with php

2005-09-21 Thread Greg Schnippel
have you tried googling on +application framework +php.. that seems like what you're looking for and several of these projects are commercial-grade and open source. i use dbasis as my application framework and highly recommend it -- its a component of the syntaxCMS project. i have also used

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread John Nichel
Please reply to the list. [EMAIL PROTECTED] wrote: No, all of these things your are bringing up would cause the programs to NEVER work, not work some of the time or when the data they are processing is small. Depends on the install. My cli uses a different php.ini than the web one. Did you

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread ernst
I don't want to crowd the list up with dead ends, so I was trying to respond only to you. I'm not calling a php program from exec, I'm calling ecasound and convert. For example, in the php code: exec(convert $internalpath/$filename -resize {$thumbWidth}x{$thumbHeight}

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread John Nichel
[EMAIL PROTECTED] wrote: I don't want to crowd the list up with dead ends, so I was trying to respond only to you. snip You'll get more chances at finding the solution to this with the list's eyes on it rather than just myself. Plus, it provides an archive of the problem and the (if we find

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread ernst
If the web server didn't have permission to execute the app, it would NEVER execute the app, not execute it some of the time. In fact, it ALWAYS executes the app, it just doesn't always allow it to finish. I log all attempts to run these apps in order to debug, so I know that the command as

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread John Nichel
[EMAIL PROTECTED] wrote: If the web server didn't have permission to execute the app, it would NEVER execute the app, not execute it some of the time. In fact, it ALWAYS executes the app, it just doesn't always allow it to finish. I log all attempts to run these apps in order to debug, so I

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread ernst
the logs say things like: /kunden/homepages/12/d117065027/htdocs/software/ImageMagick-6.2.3/utilities/convert ib_images/Other_Spices_Basic_004.jpg -resize 180x120 ib_images/Other_Spices_Basic_004_thumb.jpg this is a command I'm trying to get php to run. I then cut and paste it to the command

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread John Nichel
[EMAIL PROTECTED] wrote: the logs say things like: /kunden/homepages/12/d117065027/htdocs/software/ImageMagick-6.2.3/utilities/convert ib_images/Other_Spices_Basic_004.jpg -resize 180x120 ib_images/Other_Spices_Basic_004_thumb.jpg this is a command I'm trying to get php to run. I then cut

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread ernst
timeout isn't being used on either of these machines, and as far as I read it, the timeout directive would make the web server fail, producing an apache error or some strange behaviour on the client end. Neither of these happens, the php script completes normally, but the exec command (and

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread John Nichel
[EMAIL PROTECTED] wrote: timeout isn't being used on either of these machines, and as far as I read it, the timeout directive would make the web server fail, producing an apache error or some strange behaviour on the client end. Neither of How is timeout _not_ being used? It's a core

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread ernst
as I said, the default timout is 300 seconds, a lot longer than my program takes to run, and I am pretty certain that if timeout were triggered, I'd see it in the client. Yeah, I'm using a browser on the php page, and everything seems to function fine from the browser to the server, it's

[PHP] why memory limit is still being complained about?

2005-09-21 Thread Bing Du
Hi, I'm installing and configuring Gallery 2.0. One system check is check memory limit. The warning is: Warning: Your PHP is configured to limit the memory to 8Mb (memory_limit parameter in php.ini). You should raise this limit to at least 16MB for proper Gallery operation.

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread John Nichel
[EMAIL PROTECTED] wrote: as I said, the default timout is 300 seconds, a lot longer than my program takes to run, and I am pretty certain that if timeout were triggered, I'd see it in the client. Yeah, I'm using a browser on the php page, and everything seems to function fine from the

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread ernst
convert doesn't produce any output regardless of whether it works or not. Ecasound produces output when it works, but when it doesn't, it produces no output. Using php tricks to capture standard error also produces no output. On Wed, 21 Sep 2005, John Nichel wrote: [EMAIL PROTECTED]

[PHP] Local session.gc_maxlifetime not always being respected

2005-09-21 Thread Michael Caplan
Hi, I have a rather peculiar problem with session.gc_maxlifetime local settings not being respected under certain circumstances. In order to ensure that sessions created for our application would have a max lifetime longer than the default 24 minutes, we cranked session.gc_maxlifetime in an

RE: [PHP] security/sql issues with php

2005-09-21 Thread bruce
got it!! if i could find docs/methods/etc.. i'd gladly share... two questions: 1) css scripting. how can it be prevented?? what are some of the methods that you guys use? 2) what are some of the actual code methods used in real sites to deal with URL/Query (GET/POST) parsing? what do you guys

Re: [PHP] security/sql issues with php

2005-09-21 Thread Chris Shiflett
bruce wrote: i've been searching/researching the areas of security regarding url input, form input, as well as database input (mysql). while there are plenty of articles that touch on the topic, i'm looking for a given site/package/lib (open source) that is pretty much the standard that i could

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread John Nichel
[EMAIL PROTECTED] wrote: convert doesn't produce any output regardless of whether it works or not. Ecasound produces output when it works, but when it doesn't, it produces no output. Using php tricks to capture standard error also produces no output. Hopefully somebody else on the list can

[PHP] Local session.gc_maxlifetime not always being respected

2005-09-21 Thread Michael Caplan
Hi, I have a rather peculiar problem with session.gc_maxlifetime local settings not being respected under certain circumstances. In order to ensure that sessions created for our application would have a max lifetime longer than the default 24 minutes, we cranked session.gc_maxlifetime in an

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread ernst
You're telling me. That's why I think php or apache kills it. On Wed, 21 Sep 2005, John Nichel wrote: [EMAIL PROTECTED] wrote: convert doesn't produce any output regardless of whether it works or not. Ecasound produces output when it works, but when it doesn't, it produces no output. Using

Re: [PHP] losing session data with cross-site scripting

2005-09-21 Thread Chris Shiflett
Steve Lefevre wrote: I have a php site on a production server. The production server doesn't have the spell libraries, and rather than migrate the site, we setup spell checking functions on the development site, and shuttled the users back and forth with specially crafted get links and forms.

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread Rasmus Lerdorf
[EMAIL PROTECTED] wrote: You're telling me. That's why I think php or apache kills it. I didn't really follow this, but typically you can debug exec problems from the command line by switching to the web server user id and running the exact same command. -Rasmus -- PHP General Mailing List

Re: [PHP] Bytecode

2005-09-21 Thread Chris Shiflett
Andy Pieters wrote: I came across some text that sais PHP compiles the script to bytecode prior to running it. Is this true, and is it possible to instead of .php source files, use those bytecodes files in distribution? It sounds like you're looking for APC: http://php.net/apc Hope that

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread ernst
Yes, but that's been done. Since these are shared servers, on one I am logged in as the user the web server is running as, on the other I can't su to nobody, but were there permissions errors, I would have been able to capture them. If permissions caused this, it would fail every time, since

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread rouvas
I am assuming that you get hold of the file through uploading it, correct? So, when it fails maybe another upload (i.e. script invocation) is happening and the previous file gets lost/corrupted/whatever. Try to move the file to another dir (maybe /tmp) with a random name and see what happens.

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread ernst
php places uploaded files in the /tmp directory with a unique name, and when I copy them to my directory, I also guarantee a unique name for them. I have verified that this is all working. I've patched this with a cron job that runs every minute, but it really should happen in php, so that

[PHP] email validation (no regex)

2005-09-21 Thread Jim Moseby
I threw together this totally untested and unreliable code to solicit comments on whether or not this is a good way to validate emails. Consider the following: pseudocode function validate_email($email){ if (str_word_count($email,'@')!=1){return('Not a proper email address');}

[PHP] Re: email validation (no regex)

2005-09-21 Thread Al
Jim Moseby wrote: I threw together this totally untested and unreliable code to solicit comments on whether or not this is a good way to validate emails. Consider the following: pseudocode function validate_email($email){ if (str_word_count($email,'@')!=1){return('Not a proper email

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Jim Moseby
So, what is the general thought about validating email addresses in this manner? JM Thre is a good reason why virtually everyone uses regex patterns for email validating. Excellent start! And that good reason is...? How can regex ensure that the email address that is submitted is

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread bruce
jim... validating email means different things to different people... but there's no way you're going to be able to 'throw' together something in 2-3 days that others have taken years to create/refine... if you only want to determine if an email address is valid, what does that mean to you? are

Re: [PHP] Re: email validation (no regex)

2005-09-21 Thread Ben
Jim Moseby said the following on 09/21/05 11:00: So, what is the general thought about validating email addresses in this manner? JM Thre is a good reason why virtually everyone uses regex patterns for email validating. Excellent start! And that good reason is...? How can regex

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Jim Moseby
jim... validating email means different things to different people... True, but for the most part people just want to know whether a user has entered a real working email address into their forms. What better test than to try to send an email to it? but there's no way you're going to

[PHP] Retrieving variable name?

2005-09-21 Thread Jeffrey Sambells
is it possible to retrieve the name of a variable passed into a function from within the function? ? function example($input) { //for example here can I determine that $input came from $a in the previous scope? } example($a); ? Jeffrey Sambells Director of Research and Development

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread adriano ghezzi
did you tried to run the script from the shell as www-data user ? (if not su www-data) an then run the script may be something regarding permission hth 2005/9/21, John Nichel [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: I have two programs on two servers, and they both have similar problems.

[PHP] Re: email validation (no regex)

2005-09-21 Thread Manuel Lemos
Hello, on 09/21/2005 02:49 PM Jim Moseby said the following: I threw together this totally untested and unreliable code to solicit comments on whether or not this is a good way to validate emails. Consider the following: So, what is the general thought about validating email addresses in

Re: [PHP] exec command fails in php, works in the command line

2005-09-21 Thread ernst
yeah, if you look at the thread you will see that I've already done this. On Wed, 21 Sep 2005, adriano ghezzi wrote: did you tried to run the script from the shell as www-data user ? (if not su www-data) an then run the script may be something regarding permission hth 2005/9/21, John Nichel

FW: [PHP] Re: email validation (no regex)

2005-09-21 Thread Jim Moseby
(Forwarding private reply to the list) -Original Message- From: Al Rider Sent: Wednesday, September 21, 2005 2:19 PM To: Jim Moseby Subject: Re: [PHP] Re: email validation (no regex) What you have is virtually impossible to determine if all legitimate possibilities are covered.

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Murray @ PlanetThoughtful
What you have is virtually impossible to determine if all legitimate possibilities are covered. email validation using regex is a very heavily analyzed subject Google regex email validate and you'll find loads of expressions. Look at the Zend article, it provides some insight. I

FW: [PHP] email validation (no regex)

2005-09-21 Thread Jim Moseby
(private email forwarded to list) -Original Message- From: [EMAIL PROTECTED] Sent: Wednesday, September 21, 2005 2:19 PM To: Jim Moseby Subject: Re: [PHP] email validation (no regex) There's no requirement for an MX-record, so you'd need to check the A-record ($domain) too. This

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread bruce
because you should want/need to validate that the address is correct prior to determining if the email server is up running... the regex function simply allows you to quickly determine if the address is valid... doens't mean that it's going to go to an actual live user...!! btw simply checking

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Murray @ PlanetThoughtful
because you should want/need to validate that the address is correct prior to determining if the email server is up running... the regex function simply allows you to quickly determine if the address is valid... doens't mean that it's going to go to an actual live user...!! btw simply

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Jim Moseby
btw simply checking for a single '@' with a domain doesn't do it... what if the user has '[EMAIL PROTECTED]' or '[EMAIL PROTECTED]'. will your regex accept/deny this??? My function will quickly deny those because the DNS lookup for them will immediately fail. Will your regex deny '[EMAIL

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Murray @ PlanetThoughtful
because you should want/need to validate that the address is correct prior to determining if the email server is up running... the regex function simply allows you to quickly determine if the address is valid... doens't mean that it's going to go to an actual live user...!! btw

RE: [PHP] email validation (no regex)

2005-09-21 Thread Michael Sims
Jim Moseby wrote: There's no requirement for an MX-record, so you'd need to check the A-record ($domain) too. Excellent answer. No requirement for MX record? [showing my ignorance] How does email routing happen if there is no mail exchanger in the zonefile for a particular domain?

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Philip Hallstrom
but you could do what you want to do. however, it's going to be painful if you want it to match the rfc spec... Really? Why does it need to be painful? I just need to do a 'EHLO', 'Mail From:' and 'RCPT to:' and 'QUIT'. It's not going to actually send an email. Seems simple to me. Maybe

Re: [PHP] why memory limit is still being complained about?

2005-09-21 Thread Jeffrey Sambells
Not sure about Gallery or Apache 2 but Apache 1 uses different php.ini files for cli, cgi and mod_php. It could be that gallery checks using the command line version of php which has a different setting for memory limit? Seems silly but it's a thought. Jeff Jeffrey Sambells Director of

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Michael Sims
Philip Hallstrom wrote: but you could do what you want to do. however, it's going to be painful if you want it to match the rfc spec... Really? Why does it need to be painful? I just need to do a 'EHLO', 'Mail From:' and 'RCPT to:' and 'QUIT'. It's not going to actually send an email.

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Jim Moseby
-Original Message- From: Jim Moseby [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 21, 2005 12:21 PM To: php-general@lists.php.net Subject: RE: [PHP] Re: email validation (no regex) btw simply checking for a single '@' with a domain doesn't do it... what if the user

Re: [PHP] losing session data with cross-site scripting

2005-09-21 Thread Steve Lefevre
Chris Shiflett wrote: Steve Lefevre wrote: I have a php site on a production server. The production server doesn't have the spell libraries, and rather than migrate the site, we setup spell checking functions on the development site, and shuttled the users back and forth with specially

[PHP] Re: Retrieving variable name?

2005-09-21 Thread l0t3k
Jeffrey Sambells [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] is it possible to retrieve the name of a variable passed into a function from within the function? Short Answer : No Longer Answer : Maybe, if you have knowledge of PHP internals and a willingness to write an

Re: [PHP] security/sql issues with php

2005-09-21 Thread Jasper Bryant-Greene
bruce wrote: two questions: 1) css scripting. how can it be prevented?? what are some of the methods that you guys use? Before outputting anything user-sourced to the browser, htmlspecialchars() it, preferably with the ENT_QUOTES option. If you want to allow some HTML, only then parse the

Re: [PHP] Re: Retrieving variable name?

2005-09-21 Thread Thorsten Suckow-Homberg
Short Answer : No Longer Answer : Maybe, if you have knowledge of PHP internals and a willingness to write an extension. Even then it may not work.. g Well, PHP5's magic methods __get()/ __set() could be used to resolve the variable's name... -- PHP General Mailing List

RE: [PHP] security/sql issues with php

2005-09-21 Thread bruce
ok... i'm confused regarding XSS. Cross-Site Scripting appears to be due to somehow allowing a user to insert 'html'/data/etc into the URL that you as the app are expecting? is this correct? wouldn't this be easy enough to solve in most cases, if the app did the proper validation/data

Re: [PHP] Retrieving variable name?

2005-09-21 Thread Scott Noyes
is it possible to retrieve the name of a variable passed into a function from within the function? Sure. Use debug_backtrace to figure out what line and what file the caller is in, then read that file, find that line, find the function call within that line, and read what ever is between the

RE: [PHP] security/sql issues with php

2005-09-21 Thread bruce
followup... i just read an article that described how someone could have a url of 'http://foo.com/' and have the URL in an img in their website. the website could be cat.com. the article implied that if a user would select the img, the link to the foo.com would be initiated, thereby

[PHP] Re: Retrieving variable name?

2005-09-21 Thread Jake Gardner
Maybe something fancy with references? http://us2.php.net/manual/en/language.references.php On 9/21/05, Thorsten Suckow-Homberg [EMAIL PROTECTED] wrote: Short Answer : No Longer Answer : Maybe, if you have knowledge of PHP internals and a willingness to write an extension. Even then it may

Re: [PHP] Re: Retrieving variable name?

2005-09-21 Thread Jeffrey Sambells
oh well, thanks for the help. Jeffrey Sambells Director of Research and Development We-Create Inc. 519.897.2552 cell 519.745.7374 office 888.615.7374 toll free http://www.wecreate.com On 21-Sep-05, at 6:02 PM, Jake Gardner wrote: Maybe something fancy with references?

Re: [PHP] losing session data with cross-site scripting

2005-09-21 Thread Chris Shiflett
Steve Lefevre wrote: No, it's not. They're totally separate machines at different ISPs. In this case, a user's session is stagnant for the duration of their trip to the other server. I'm guessing that users are typically only there for a brief moment, but this is something to keep in mind.

Re: [PHP] security/sql issues with php

2005-09-21 Thread Chris Shiflett
Jasper Bryant-Greene wrote: Before outputting anything user-sourced to the browser, htmlspecialchars() it, preferably with the ENT_QUOTES option. If you want to allow some HTML, only then parse the string to un-escape certain HTML tags. Jasper++ Check the types if it's a problem for you

Re: [PHP] security/sql issues with php

2005-09-21 Thread Chris Shiflett
bruce wrote: i'm confused regarding XSS. Cross-Site Scripting appears to be due to somehow allowing a user to insert 'html'/data/etc into the URL that you as the app are expecting? is this correct? A XSS vulnerability exists whenever you output tainted data. For example, if a user can

Re: [PHP] security/sql issues with php

2005-09-21 Thread Mikey
Checking data types can be very misleading. I've seen many examples (even recently in a book) that use is_int() to check to see whether something in $_GET or $_POST is an integer. Because everything in $_GET and $_POST is a string, this check always fails. Chris I have found that adding 0

Re: [PHP] security/sql issues with php

2005-09-21 Thread Chris Shiflett
bruce wrote: i just read an article that described how someone could have a url of 'http://foo.com/' and have the URL in an img in their website. the website could be cat.com. the article implied that if a user would select the img, the link to the foo.com would be initiated, thereby fooling

Re: [PHP] security/sql issues with php

2005-09-21 Thread Chris Shiflett
Mikey wrote: I have found that adding 0 and then running is_int() usually works. You mean always works. :-) Casting something to an integer and then checking to see if it's an integer doesn't tell you anything useful: ?php $int = 'this is not an int'; $int += 0; if (is_int($int)) {

RE: [PHP] security/sql issues with php

2005-09-21 Thread bruce
chris.. i'm still confused... w/r to your example, what's wrong with using the $_GET['username'] that you present. unless you're saying it should be checked/validated before using it.. in which case the app could do something like $_GET['username'] = reg_check($_GET['username'])... is this

RE: [PHP] security/sql issues with php

2005-09-21 Thread bruce
chris.. thanks for the replies... i think i understand what you're stating.. but i'm still confused as to why my app/server would allow a GET/POST piece of data that would/should be originating from a form on my site to come from a 3rd party/external site/app? i would have assumed that there

Re: [PHP] security/sql issues with php

2005-09-21 Thread Robert Cummings
On Wed, 2005-09-21 at 19:21, Chris Shiflett wrote: Mikey wrote: I have found that adding 0 and then running is_int() usually works. You mean always works. :-) Casting something to an integer and then checking to see if it's an integer doesn't tell you anything useful: ?php $int =

RE: [PHP] security/sql issues with php

2005-09-21 Thread bruce
but now that you're talking about ints/strings/floats, aren't you now getting into data typing issues... which gets into the correct/appropriate archistecture of your app, variable namespace issues, etc... -bruce -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent:

RE: [PHP] security/sql issues with php

2005-09-21 Thread bruce
followup... for the short term, i'm going to rip apart a few of the open source web apps that have received funding, to get a feel for what/how these apps have decided to handle their security issues... the assumption/hope is that these guys have put $$$ into doing a serious security audit on

RE: [PHP] security/sql issues with php

2005-09-21 Thread Robert Cummings
On Wed, 2005-09-21 at 19:54, bruce wrote: but now that you're talking about ints/strings/floats, aren't you now getting into data typing issues... which gets into the correct/appropriate archistecture of your app, variable namespace issues, etc... Nope, just showing that adding 0 to data

RE: [PHP] security/sql issues with php

2005-09-21 Thread bruce
recognized that... but in all honesty, if you're going to write an app, and you're going to do something with the data, it makes sense to me that you 'know'/ensure that you're dealing with the correct kind of data. as i see it, this allows you another way (low entropy) to determine that the

Re: [PHP] security/sql issues with php

2005-09-21 Thread Jasper Bryant-Greene
bruce wrote: thanks for the replies... i think i understand what you're stating.. but i'm still confused as to why my app/server would allow a GET/POST piece of data that would/should be originating from a form on my site to come from a 3rd party/external site/app? i would have assumed that

Re: [PHP] security/sql issues with php

2005-09-21 Thread Jasper Bryant-Greene
Jasper Bryant-Greene wrote: Anyone else could link to your page with that URL and have the script executed on your page. You can't stop this, so you have to escape and validate the data coming in. Sorry to reply to my own message, but to clarify, I meant you can't stop others linking to your

RE: [PHP] security/sql issues with php

2005-09-21 Thread Chris W. Parker
bruce mailto:[EMAIL PROTECTED] on Wednesday, September 21, 2005 5:10 PM said: but in all honesty thanks for being honest. , if you're going to write an app, and you're going to do something with the data, it makes sense to me that you 'know'/ensure that you're dealing with the correct

Re: [PHP] security/sql issues with php

2005-09-21 Thread Chris Shiflett
Robert Cummings wrote: Not if it's a float. True. :-) The point remains - checking data type is often misleading. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] security/sql issues with php

2005-09-21 Thread Chris Shiflett
bruce wrote: but in all honesty, if you're going to write an app, and you're going to do something with the data, it makes sense to me that you 'know'/ensure that you're dealing with the correct kind of data. as i see it, this allows you another way (low entropy) to determine that the

Re: [PHP] security/sql issues with php

2005-09-21 Thread Robert Cummings
On Wed, 2005-09-21 at 20:18, Chris Shiflett wrote: Robert Cummings wrote: Not if it's a float. True. :-) The point remains - checking data type is often misleading. Yep, I wasn't trying to remove the point, just don't want noobs getting mixed up on type juggling :) Cheers, Rob. --

RE: [PHP] security/sql issues with php

2005-09-21 Thread bruce
i agree with what you're saying... my primary concern was to make sure that there wasn't/isn't something going on that i haven't seen... up to know, i'm ok with what you're saying. however, i still don't have a good answer to my question regarding how easy (or hard) it is to detect if a query

[PHP] colleges/schools that offer php/web development courses

2005-09-21 Thread bruce
hey... can you guys give the names of any schools/colleges that have formal programs to teach web development/security applications. thanks -bruce [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] colleges/schools that offer php/web development courses

2005-09-21 Thread bruce
followup... surprisingly, google doesn't really list alot based on my searches... thanks hey... can you guys give the names of any schools/colleges that have formal programs to teach web development/security applications. thanks -bruce [EMAIL PROTECTED] -- PHP General Mailing List

RE: [PHP] security/sql issues with php

2005-09-21 Thread bruce
right... but here again, you're talking about the server app, getting the query, and validating the information within the query. since i assume the '%x' chars traslate into something other than straight text, i assume that the html function you mention strips out these chars, or it returns a

[PHP] scanning software...

2005-09-21 Thread bruce
since we've long had software to scan C/C++ code for errors, are there similar 'open source' software apps for scanning web applications? more to the point, are there any good 'open source' testing apps for web sites? not just apps that test the usage load of a site, but apps that can be used to

Re: [PHP] losing session data with cross-site scripting

2005-09-21 Thread Steve Lefevre
Chris Shiflett wrote: Steve Lefevre wrote: In this case, a user's session is stagnant for the duration of their trip to the other server. I'm guessing that users are typically only there for a brief moment, but this is something to keep in mind. Is there a way that some of your users might

[PHP] Unique ID on 5.0.4 (Windows)

2005-09-21 Thread Chris
Hi, Pretty soon I'm going to be needing to generate a unique identifier in a script. I'm looking into how to go about doing it now. It has to work on Apache 2 / PHP 5.0.4 (Module) / Windows 2000 Server. Any suggestions on how I might be able to do it? I've noticed the uuid PECL package,

  1   2   >