Re: [PHP] file_exists and wildcard/regex

2008-12-09 Thread Per Jessen
Ashley Sheridan wrote: > If you're on a Linux system, you could look at ls and the regular > expressions it lets you use with it. You could exec out and get the > returned results. Also, as it's a system call, it should be very > speedy. 'ls' is just a plain binary (/bin/ls), not a system call.

Re: [PHP] file_exists and wildcard/regex

2008-12-09 Thread Per Jessen
[EMAIL PROTECTED] wrote: > > I'm not sure how glob works in the guts, but I know it is dog-slow for > large numbers of files (or maybe just large numbers of results). > I'm not sure what the context of this was, but the speed of searching a directory with a large number of files, e.g. 100,000s,

Re: [PHP] MSSQL_CONNECT problem

2008-12-09 Thread Andrew Ballard
On Tue, Dec 9, 2008 at 3:41 PM, David Stoltz <[EMAIL PROTECTED]> wrote: > Yes, I'm using a valid SQL account. I've tried putting both versions of > "ntwdblib.dll" in the php directory, and the system32 directory (not at once > of course), and I get the same error. > > I've pretty much tried every

[PHP] usort for sorting an array of objects

2008-12-09 Thread German Geek
Hi Guys, I need to sort an array of objects. I found this ( at a url that didnt let me send this msg... ) and I would know how to do it, but I believe there might be a cleaner, more elegant way to do it. In Java, you just need to implement the interface Comparable and provide a method called compa

Re: [PHP] Re: file_exists and wildcard/regex

2008-12-09 Thread German Geek
On Wed, Dec 10, 2008 at 1:13 PM, Stut <[EMAIL PROTECTED]> wrote: > > On 9 Dec 2008, at 23:24, Daniel Kolbo wrote: > > Maciek Sokolewicz wrote: >> >>> Daniel Kolbo wrote: >>> What is the preferred method with php to test and see if a file [pattern] exists? For example, i only n

Re: [PHP] Re: file_exists and wildcard/regex

2008-12-09 Thread Stut
On 9 Dec 2008, at 23:24, Daniel Kolbo wrote: Maciek Sokolewicz wrote: Daniel Kolbo wrote: What is the preferred method with php to test and see if a file [pattern] exists? For example, i only need to search in one directory, that may have any number of files named such as afile1.txt, afi

Re: [PHP] Re: file_exists and wildcard/regex

2008-12-09 Thread Chris
Daniel Kolbo wrote: Maciek Sokolewicz wrote: Daniel Kolbo wrote: What is the preferred method with php to test and see if a file [pattern] exists? For example, i only need to search in one directory, that may have any number of files named such as afile1.txt, afile2.txt, afile3.txt, A

[PHP] Re: file_exists and wildcard/regex

2008-12-09 Thread Daniel Kolbo
Maciek Sokolewicz wrote: Daniel Kolbo wrote: What is the preferred method with php to test and see if a file [pattern] exists? For example, i only need to search in one directory, that may have any number of files named such as afile1.txt, afile2.txt, afile3.txt, And also, bfile1.txt,

Re: [PHP] file_exists and wildcard/regex

2008-12-09 Thread ceo
I'm not sure how glob works in the guts, but I know it is dog-slow for large numbers of files (or maybe just large numbers of results). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: file_exists and wildcard/regex

2008-12-09 Thread Maciek Sokolewicz
Daniel Kolbo wrote: What is the preferred method with php to test and see if a file [pattern] exists? For example, i only need to search in one directory, that may have any number of files named such as afile1.txt, afile2.txt, afile3.txt, And also, bfile1.txt, bfile2.txt, bfile3.txt, ..

Re: [PHP] file_exists and wildcard/regex

2008-12-09 Thread Ashley Sheridan
On Tue, 2008-12-09 at 12:54 -1000, Daniel Kolbo wrote: > > Daniel Kolbo wrote: > > What is the preferred method with php to test and see if a file > > [pattern] exists? > > > > For example, i only need to search in one directory, that may have any > > number of files named such as afile1.txt, af

Re: [PHP] file_exists and wildcard/regex

2008-12-09 Thread Daniel Kolbo
Daniel Kolbo wrote: What is the preferred method with php to test and see if a file [pattern] exists? For example, i only need to search in one directory, that may have any number of files named such as afile1.txt, afile2.txt, afile3.txt, And also, bfile1.txt, bfile2.txt, bfile3.txt,

Re: [PHP] file_exists and wildcard/regex

2008-12-09 Thread Stut
On 9 Dec 2008, at 22:26, Daniel Kolbo wrote: What is the preferred method with php to test and see if a file [pattern] exists? For example, i only need to search in one directory, that may have any number of files named such as afile1.txt, afile2.txt, afile3.txt, And also, bfile1.txt

[PHP] file_exists and wildcard/regex

2008-12-09 Thread Daniel Kolbo
What is the preferred method with php to test and see if a file [pattern] exists? For example, i only need to search in one directory, that may have any number of files named such as afile1.txt, afile2.txt, afile3.txt, And also, bfile1.txt, bfile2.txt, bfile3.txt, ... I want to see if an

Re: [PHP] echo SESSION var doesn't work if unset after echo

2008-12-09 Thread Ashley Sheridan
On Tue, 2008-12-09 at 16:51 -0500, Eric Wood wrote: > I have two vars doing the same thing. One is echo'd/unset in the > section and the other echo'd/unset in the footer of the page. > No re-direct request is being made. > > Ok now check this. If I use this code: > > if(isset($_SESSION["Ec

Re: [PHP] echo SESSION var doesn't work if unset after echo

2008-12-09 Thread Eric Wood
I have two vars doing the same thing. One is echo'd/unset in the section and the other echo'd/unset in the footer of the page. No re-direct request is being made. Ok now check this. If I use this code: if(isset($_SESSION["Ecomm"])) { echo $_SESSION["Ecomm"]; unset($_SESSION["Ecomm"]);

Re: [PHP] how to not show login info in the url ...what am I looking for?

2008-12-09 Thread Stut
On 9 Dec 2008, at 21:41, Terion Miller wrote: So I have this login information passing parameters in the url to the next page (this is on a intranet app) which I thought was no big deal until a wise crack graphics guy decided to hack it because he could by changing the ?adminID= until he go

Re: [PHP] how to not show login info in the url ...what am I looking for?

2008-12-09 Thread Ashley Sheridan
On Tue, 2008-12-09 at 15:41 -0600, Terion Miller wrote: > So I have this login information passing parameters in the url to the next > page (this is on a intranet app) which I thought was no big deal until a > wise crack graphics guy decided to hack it because he could by changing the > ?adminID=

[PHP] how to not show login info in the url ...what am I looking for?

2008-12-09 Thread Terion Miller
So I have this login information passing parameters in the url to the next page (this is on a intranet app) which I thought was no big deal until a wise crack graphics guy decided to hack it because he could by changing the ?adminID= until he got one that worked...he didn't do anything except aler

Re: [PHP] Re: how do i allow more than 2 threads of php to run?

2008-12-09 Thread Rene Veerman
Gal Gur-Arie wrote: Rene Veerman wrote: i'm getting freezes for the 3rd to Nth concurrent request on my homeserver (got root, on debian4 + apache2). how can i allow more threads? like 50 or so? Any chance that you're using session and checking it from the same browser from different t

Re: [PHP] MSSQL_CONNECT problem

2008-12-09 Thread Daniel Brown
On Tue, Dec 9, 2008 at 3:41 PM, David Stoltz <[EMAIL PROTECTED]> wrote: > > Do you have any other thoughts? When posting to the list, please don't top-post. Dave, are you seeing that error from both the CLI and the web? Have you properly configured your DSN? What's the output from the fo

Re: [PHP] get calling function name

2008-12-09 Thread Daniel Kolbo
Stut wrote: On 9 Dec 2008, at 19:37, Daniel Kolbo wrote: is there a way (i swear i saw it in the documentation at one point) to get the name of the calling scope (or function) from within another function? eg. function a() { b(); } function b() { echo "the calling function is: " . fun

RE: [PHP] MSSQL_CONNECT problem

2008-12-09 Thread David Stoltz
Bastien - I'm getting desperate, Yes, I'm using a valid SQL account. I've tried putting both versions of "ntwdblib.dll" in the php directory, and the system32 directory (not at once of course), and I get the same error. I've pretty much tried everything I've readthe kicker is I can access t

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Ashley Sheridan
On Tue, 2008-12-09 at 12:19 -0800, Daevid Vincent wrote: > Assuming this is in-fact your issue, I ALWAYS do this registry hack on > my Windows computers: > http://support.microsoft.com/kb/282402 > > > On Tue, 2008-12-09 at 22:10 +0200, Krister Karlström wrote: > > > Hi! > > > > Please note that

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Daevid Vincent
Assuming this is in-fact your issue, I ALWAYS do this registry hack on my Windows computers: http://support.microsoft.com/kb/282402 On Tue, 2008-12-09 at 22:10 +0200, Krister Karlström wrote: > Hi! > > Please note that most browser follows the RFC:s and does not allow more > than two connectio

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Krister Karlström
Hi! Please note that most browser follows the RFC:s and does not allow more than two connections to each domain simultaneously. You can do work-arounds to solve this problem, like using subdomains for some requests. In Firefox you might also be able to disable this feature... Regards, Kriste

Re: [PHP] echo SESSION var doesn't work if unset after echo

2008-12-09 Thread Tim | iHostNZ
On Wed, Dec 10, 2008 at 8:11 AM, <[EMAIL PROTECTED]> wrote: > > Fire up Live HTTP Headers in Firefox. > Where is this "Live HTTP Headers in Firefox"? Is it an extension? > > My theory is that the browser is RE-requesting the data because of the > private, must-revalidate. > > So it goes like this

Re: [PHP] echo SESSION var doesn't work if unset after echo

2008-12-09 Thread Ashley Sheridan
On Tue, 2008-12-09 at 19:11 +, [EMAIL PROTECTED] wrote: > Fire up Live HTTP Headers in Firefox. > > > > My theory is that the browser is RE-requesting the data because of the > private, must-revalidate. > > > > So it goes like this: > > > > Browser -> GET -> Ecomm: fooie ; unset Ecomm

Re: [PHP] get calling function name

2008-12-09 Thread Stut
On 9 Dec 2008, at 19:37, Daniel Kolbo wrote: is there a way (i swear i saw it in the documentation at one point) to get the name of the calling scope (or function) from within another function? eg. function a() { b(); } function b() { echo "the calling function is: " . func_caller(); }

Re: [PHP] A MySQL Question

2008-12-09 Thread Yeti
> Sure you can... I'm screaming right now... and I'm in space. A container > within a container within a container within a container (ad infinitum) > is still within the outermost container. I didn't hear you scream. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

[PHP] get calling function name

2008-12-09 Thread Daniel Kolbo
Greetings, is there a way (i swear i saw it in the documentation at one point) to get the name of the calling scope (or function) from within another function? eg. function a() { b(); } function b() { echo "the calling function is: " . func_caller(); } a(); where this would print th

Re: [PHP] Include directive..

2008-12-09 Thread Jim Lucas
Dele wrote: > Hi, > > Thanks for the reply. What I did was to edit the includes path in my php.ini > file to specify the location to my script folders. > > I did that but now am experiencing another problem. Don't know if you are > into the Zend Framework. :) But any help on tis post will be app

Re: [PHP] echo SESSION var doesn't work if unset after echo

2008-12-09 Thread ceo
Fire up Live HTTP Headers in Firefox. My theory is that the browser is RE-requesting the data because of the private, must-revalidate. So it goes like this: Browser -> GET -> Ecomm: fooie ; unset Ecomm Browser -> GET -> Ecomm: [not set] If you are using Ajax and JS and whatnot, the p

Re: [PHP] A MySQL Question

2008-12-09 Thread Robert Cummings
On Tue, 2008-12-09 at 01:49 -0800, Yeti wrote: > As a matter of fact, in space you can't even scream. Sure you can... I'm screaming right now... and I'm in space. A container within a container within a container within a container (ad infinitum) is still within the outermost container. Cheers, R

Re: [PHP] A MySQL Question

2008-12-09 Thread Robert Cummings
On Tue, 2008-12-09 at 16:40 +, [EMAIL PROTECTED] wrote: > Perhaps you couldn't hear the big bang in this universe, but what about in > the universe that spawned it? > :-) The black hole wouldn't allow it to travel in that direction ;) Cheers, Rob. -- http://www.interjinn.com Application and

[PHP] echo SESSION var doesn't work if unset after echo

2008-12-09 Thread Eric Wood
I set Ecomm to a little javascript code on the previous page then echo it no the next page. session_cache_limiter ('private, must-revalidate'); session_start(); . stuff ... if(isset($_SESSION["Ecomm"])) { echo $_SESSION["Ecomm"]; unset($_SESSION["Ecomm"]); } . stuff ... For

Re: [PHP] Include directive..

2008-12-09 Thread Jim Lucas
dele454 wrote: > Hi, > > I am modifying the apache config file on my domain to include the path to > the Zend Framework on a specified location outside the public folder. > > So in my http.conf file i simply include the path to where the includes file > is to customise the virtual host: > > [COD

Re: [PHP] A MySQL Question

2008-12-09 Thread Bastien Koert
On Tue, Dec 9, 2008 at 11:40 AM, <[EMAIL PROTECTED]> wrote: > > Perhaps you couldn't hear the big bang in this universe, but what about in > the universe that spawned it? > :-) > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > The o

Re: [PHP] A MySQL Question

2008-12-09 Thread ceo
Perhaps you couldn't hear the big bang in this universe, but what about in the universe that spawned it? :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Poll of sorts: Javascript Form validation or PHP

2008-12-09 Thread ceo
> Being JSON immediately parsable by both Javascript and PHP it is > possible to exploit it to keep the regular expressions for the input > fields in a single place, and avoid mantaining them synched between the > Js and PHP scripts! Yes, but... The Regex engines are not the same, so you

[PHP] Re: how do i allow more than 2 threads of php to run?

2008-12-09 Thread Gal Gur-Arie
Rene Veerman wrote: > i'm getting freezes for the 3rd to Nth concurrent request on my > homeserver (got root, on debian4 + apache2). > how can i allow more threads? like 50 or so? > > Any chance that you're using session and checking it from the same browser from different tabs (using same sessio

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Rene Veerman
Jochem Maas wrote: Rene Veerman schreef: Jochem Maas wrote: Rene Veerman schreef: i'm getting freezes for the 3rd to Nth concurrent request on my homeserver (got root, on debian4 + apache2). how can i allow more threads? like 50 or so? probably need to fix the a

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Jochem Maas
Rene Veerman schreef: > Jochem Maas wrote: >> Rene Veerman schreef: >> >>> i'm getting freezes for the 3rd to Nth concurrent request on my >>> homeserver (got root, on debian4 + apache2). >>> how can i allow more threads? like 50 or so? >>> >> >> probably need to fix the apache.conf to allow

Re: [PHP] A MySQL Question

2008-12-09 Thread tedd
At 12:44 AM +1300 12/10/08, German Geek wrote: Anybody agree or am i alone in this universe? Of course you are alone. As for the existence and history of the Universe, the Earth, you, or God -- it's all a matter of perception; and what you believe to be true; and on what the foundations you

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Rene Veerman
Jochem Maas wrote: Rene Veerman schreef: i'm getting freezes for the 3rd to Nth concurrent request on my homeserver (got root, on debian4 + apache2). how can i allow more threads? like 50 or so? probably need to fix the apache.conf to allow more concurrent child processes. K, how

Re: [PHP] pear Mail/Mime problem on new Ubuntu Linux server

2008-12-09 Thread Eric Butera
On Tue, Dec 9, 2008 at 6:57 AM, German Geek <[EMAIL PROTECTED]> wrote: > Hi All, > > Can someone think of a reason why when changing from a Windows 2003 Web > Edition server running PHP 5.2 to a Ubuntu machine, also with PHP 5.2 can > cause the following problem: > > The emails sent from the server

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Jochem Maas
Rene Veerman schreef: > i'm getting freezes for the 3rd to Nth concurrent request on my > homeserver (got root, on debian4 + apache2). > how can i allow more threads? like 50 or so? probably need to fix the apache.conf to allow more concurrent child processes. also note I said 'processes' - php i

[PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Rene Veerman
i'm getting freezes for the 3rd to Nth concurrent request on my homeserver (got root, on debian4 + apache2). how can i allow more threads? like 50 or so? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] pear Mail/Mime problem on new Ubuntu Linux server

2008-12-09 Thread Richard Heyes
> Might it be the Unix newline characters? Unlikely, IIRC the PEAR mime stuff uses \r\n (ie Windows). Try using the htmlMimeMail5 code here: http://www.phpguru.org/downloads/html.mime.mail/htmlMimeMail5/ -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org (U

[PHP] pear Mail/Mime problem on new Ubuntu Linux server

2008-12-09 Thread German Geek
Hi All, Can someone think of a reason why when changing from a Windows 2003 Web Edition server running PHP 5.2 to a Ubuntu machine, also with PHP 5.2 can cause the following problem: The emails sent from the server, which should be in HTML format (the client wanted this specifically) now only sho

Re: [PHP] Accounting component in PHP

2008-12-09 Thread German Geek
You can do raw queries also... Just makes trivial queries and your model (if you believe in modelling) easier to manage. Believe me, I thought like you did before using symfony. On Tue, Dec 9, 2008 at 10:52 PM, altern <[EMAIL PROTECTED]> wrote: > > All my queries are complex. If I will use ORM, t

Re: [PHP] A MySQL Question

2008-12-09 Thread German Geek
On Tue, Dec 9, 2008 at 10:49 PM, Yeti <[EMAIL PROTECTED]> wrote: > As a matter of fact, in space you can't even scream. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > I don't know if there is a "better" or "best" solution to this,

[PHP] Re: Poll of sorts: Javascript Form validation or PHP

2008-12-09 Thread LucaP
Being JSON immediately parsable by both Javascript and PHP it is possible to exploit it to keep the regular expressions for the input fields in a single place, and avoid mantaining them synched between the Js and PHP scripts! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] Accounting component in PHP

2008-12-09 Thread altern
All my queries are complex. If I will use ORM, then I still will need another wrapper to create, for example template criteria objects. I have application that is very similar to billing system. Such type of applications definitely have other business logic levels in addition to ORM queries, as yo

Re: [PHP] A MySQL Question

2008-12-09 Thread Yeti
As a matter of fact, in space you can't even scream. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Stack Trace Length for Exceptions

2008-12-09 Thread Waynn Lue
I've been adding in exceptions at various points in the code so that I can more easily track where things are breaking and through which code path, but I just ran into a problem where it seems that the full stack trace isn't showing up in the error_logs. When I check out the logs, it only shows th

Re: [PHP] A MySQL Question

2008-12-09 Thread Peter Ford
German Geek wrote: > On Tue, Dec 9, 2008 at 2:46 PM, Micah Gersten <[EMAIL PROTECTED]> wrote: > >> Robert Cummings wrote: >>> On Tue, 2008-12-09 at 00:16 +, Nathan Rixham wrote: >>> Ashley Sheridan wrote: > On Mon, 2008-12-08 at 23:23 +, [EMAIL PROTECTED] wrote: > >>

Re: [PHP] A MySQL Question

2008-12-09 Thread Robert Cummings
On Mon, 2008-12-08 at 23:50 -0800, Yeti wrote: > define('HUMAN_STUPIDITY', true); > function bigbang() { > while (HUMAN_STUPIDITY || !isset($debate_is_over)) { } > return true; > } > if (!isset($universe)) bigbang(); > ?> > > Who says the big bang is past? I can't hear it. Cheers, R