Re: [PHP] Program Execution and reading results

2007-06-21 Thread makhan

Thanks Paul for your response. my issue is not just reading from the output
text file. But my issue is what I would do in the php script while the
program is execting( i.e after issueing shell_exec() command) and how would
i know that file has been written so that i can read it using php.

Thanks



pscott wrote:
> 
> 
> On Wed, 2007-06-20 at 21:42 -0700, makhan wrote:
>> Now after my
>> program has written its output I want to read this text file from php and
>> send it back to the browser.
>> Can someone please guide me how I can do this.
> 
> This seems like an overly complex way of doing something that sounds
> quite simple, but anyway, you can use fopen() to open up the resultant
> file and do what you need with it.
> 
> http://www.php.net/fopen
> 
> --Paul
> 
> 
> All Email originating from UWC is covered by disclaimer
> http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
View this message in context: 
http://www.nabble.com/Program-Execution-and-reading-results-tf3956489.html#a11228521
Sent from the PHP - General mailing list archive at Nabble.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Program Execution and reading results

2007-06-21 Thread Paul Scott

On Thu, 2007-06-21 at 01:13 -0700, makhan wrote:
> Thanks Paul for your response. my issue is not just reading from the output
> text file. But my issue is what I would do in the php script while the
> program is execting( i.e after issueing shell_exec() command) and how would
> i know that file has been written so that i can read it using php.

If its a really long process, use a callback function to email you or
just display a message on screen

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Program Execution and reading results

2007-06-21 Thread Zoltán Németh
2007. 06. 21, csütörtök keltezéssel 01.13-kor makhan ezt írta:
> Thanks Paul for your response. my issue is not just reading from the output
> text file. But my issue is what I would do in the php script while the
> program is execting( i.e after issueing shell_exec() command) and how would
> i know that file has been written so that i can read it using php.

use exec() instead of shell_exec()
http://hu2.php.net/manual/en/function.exec.php

and specify the second and third parameters to get output and return
value from the external program. then it can return the filename, thus
you can open it from php

greets
Zoltán Németh

> 
> Thanks
> 
> 
> 
> pscott wrote:
> > 
> > 
> > On Wed, 2007-06-20 at 21:42 -0700, makhan wrote:
> >> Now after my
> >> program has written its output I want to read this text file from php and
> >> send it back to the browser.
> >> Can someone please guide me how I can do this.
> > 
> > This seems like an overly complex way of doing something that sounds
> > quite simple, but anyway, you can use fopen() to open up the resultant
> > file and do what you need with it.
> > 
> > http://www.php.net/fopen
> > 
> > --Paul
> > 
> > 
> > All Email originating from UWC is covered by disclaimer
> > http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/Program-Execution-and-reading-results-tf3956489.html#a11228521
> Sent from the PHP - General mailing list archive at Nabble.com.
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Counting Capital Letters

2007-06-21 Thread Robin Vickery

On 21/06/07, Richard Davey <[EMAIL PROTECTED]> wrote:

Hi,

I've written a short regexp which will *count* how many capital letters
are in a given string (the woefully simple: '/[A-Z]/')

Although it's an English language web site, I'm curious how you'd
count capital letters that span beyond just the standard A-Z.

For example characters such as the Latin capital letter S with Acute.
I'm not interested in covering all possible character sets, but I
don't want to piss-off any Europeans who may register on the site and
want to use one of "their own" capital letters.

Anyone approached this before?


It'd probably be a good start to use [[:upper:]] rather than [A-Z].
There's also \p{Lu} if you use utf-8 mode which matches utf-8
characters with the uppercase letter property.

-robin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Program Execution and reading results

2007-06-21 Thread Richard Heyes

makhan wrote:

Thanks Paul for your response. my issue is not just reading from the output
text file. But my issue is what I would do in the php script while the
program is execting( i.e after issueing shell_exec() command) and how would
i know that file has been written so that i can read it using php.


Not having read the rest of the thread, the script would issue the 
exec() or shell_exec() command and continue only when the command has 
finished. You can  see this (on Unix) by this code:




In effect, this script will wait 60 seconds before ending.

--
Richard Heyes
0844 801 1072
http://www.websupportsolutions.co.uk
Knowledge Base and HelpDesk software

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Program Execution and reading results

2007-06-21 Thread Richard Heyes

use exec() instead of shell_exec()


Why?

--
Richard Heyes
0844 801 1072
http://www.websupportsolutions.co.uk
Knowledge Base and HelpDesk software

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Program Execution and reading results

2007-06-21 Thread Zoltán Németh
2007. 06. 21, csütörtök keltezéssel 10.08-kor Richard Heyes ezt írta:
> > use exec() instead of shell_exec()
> 
> Why?

hmm I thought the OP's question was about how can he get output/return
value from the external program (the file name for example) - maybe it
was my misunderstanding

greets
Zoltán Németh

> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Program Execution and reading results

2007-06-21 Thread Richard Heyes

hmm I thought the OP's question was about how can he get output/return
value from the external program (the file name for example) - maybe it
was my misunderstanding


In which case I would still use shell_exec():



--
Richard Heyes
0844 801 1072
http://www.websupportsolutions.co.uk
Knowledge Base and HelpDesk software

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Program Execution and reading results

2007-06-21 Thread Zoltán Németh
2007. 06. 21, csütörtök keltezéssel 10.46-kor Richard Heyes ezt írta:
> > hmm I thought the OP's question was about how can he get output/return
> > value from the external program (the file name for example) - maybe it
> > was my misunderstanding
> 
> In which case I would still use shell_exec():
> 
>$output = shell_exec('ls -l');
> ?>
> 

okay I admit my ignorance :)
I didn't know about the return value of shell_exec, now I checked the
manual and wow there it is...
so both can be used to get output

greets
Zoltán Németh

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] open a file in a folder without knowing the filename

2007-06-21 Thread Graham Shaw
Hi,

I'm probably missing something really obvious here but how would I go about 
opening a file or multiple files in a folder without knowing the filename 
ahead of time?

Loading a file in and sending the contents to a databse I can do but 
everywhere i've looked all require the filename to be known ahead of time or 
entered via a form, I'd like to be able to grab a file/all files in a folder 
and strip them into usable form to insert into a database. Each filename is 
generated randomly so I need to be able to do it without knowing the 
filename in advance.

Could anybody point me in the right direction?

Thanks,
Graham

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] open a file in a folder without knowing the filename

2007-06-21 Thread Paul Scott

On Thu, 2007-06-21 at 01:49 +0100, Graham Shaw wrote:
> I'm probably missing something really obvious here but how would I go about 
> opening a file or multiple files in a folder without knowing the filename 
> ahead of time?

You can use the glob function http://www.php.net/glob to build an array
of the files in a directory, according to a filter if needs be, and then
use a foreach to manipulate them

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] open a file in a folder without knowing the filename

2007-06-21 Thread Edward Kay
> -Original Message-
> From: Graham Shaw [mailto:[EMAIL PROTECTED]
>
> I'm probably missing something really obvious here but how would
> I go about
> opening a file or multiple files in a folder without knowing the filename
> ahead of time?

Read the files in the directory and place the names of the ones you want
into an array using the directory functions:
http://uk.php.net/manual/en/ref.dir.php

Edward

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] phpinfo displays blank page

2007-06-21 Thread Daniel Brown

On 6/20/07, Tijnema <[EMAIL PROTECTED]> wrote:

On 6/21/07, Jeff Schwartz <[EMAIL PROTECTED]> wrote:
> You're right, that works. So why doesn't my script work? All it contains is:
>
>  phpinfo();
> ?>

Hard to say, as this just *should* work.

What you can try is to hook up the processor with some debugger
The strace program will do the job I think, if not, then you should
move on to GDB.
This should point out some errors that point to the problem.

Oh, btw, maybe very obvious but is your script readable by the user
you execute the PHP CLI with?

Tijnema

*Also, please don't top post...*
>
> Tijnema <[EMAIL PROTECTED]> wrote:
> On 6/20/07, Jeff Schwartz wrote:
> > Thanks for getting back to me so quickly.
> >
> > I checked the archives and viewed the source before I posted the problem.
> The source is empty except for the junk IE puts into it. Is there a specific
> log or error file I should check?
> >
> > I upgraded from 4.x. I also ran "php phpinfo.php" (phpinfo.php is a script
> containing only the phpinfo command) at a server prompt but nothing was
> displayed.
>
> What happens if you run this on the command line:
> php -r "phpinfo();"
>
> That should work :)
>
> Tijnema
> >
> >
> > Jochem Maas wrote:
> > Daniel Brown wrote:
> > > On 6/20/07, Jeff Schwartz wrote:
> > >> When I run phpinfo() nothing is displayed. It used to work. I recently
> > >> upgraded to 5.2.1 but I can't be sure that's exactly when phpinfo
> > >> stopped working. Has anyone else run into this?
> >
> > lots of people :-)
> >
> > what did you upgrade from?
> > do what Dan said - only I'd run through his points in the following order
> 2,3,1
> >
> > you may have php setup to log elsewhere than the apache error log - if so
> check there also.
> >
> > lastly I sometimes find it useful to try running the cmdline version php -
> sometimes
> > I screw things up and the cmdline is helpful in that it [sometimes]
> > spits out a bunch of errors (usually related to extensions that could not
> be loaded)
> >
> > >>
> > >> Thanks,
> > >> Jeff
> > >>
> > >>
> > >> -
> > >> Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user
> > >> panel and lay it on us.
> > >
> > > 1.) Search the archives.
> > > 2.) Try to view the source of the page. If you see the PHP
> > > source, it's not working properly.
> > > 3.) Check the Apache error logs.
> > >
> > > See what you come up with after trying all three of the above and
> > > post your results. It'll give everyone here a better idea of what
> > > your particular problem may be.
> > >
> >
> >
> >
> >
> > -
> > Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's
> on, when.
>
>
>
> 
> Bored stiff? Loosen up...
> Download and play hundreds of games for free on Yahoo! Games.
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




   Jeff,

   Check to make sure that the extension is loaded when you restart
Apache.  You did restart Apache, right?

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Program Execution and reading results

2007-06-21 Thread Daniel Brown

On 6/21/07, Zoltán Németh <[EMAIL PROTECTED]> wrote:

2007. 06. 21, csütörtök keltezéssel 10.46-kor Richard Heyes ezt írta:
> > hmm I thought the OP's question was about how can he get output/return
> > value from the external program (the file name for example) - maybe it
> > was my misunderstanding
>
> In which case I would still use shell_exec():
>
>$output = shell_exec('ls -l');
> ?>
>

okay I admit my ignorance :)
I didn't know about the return value of shell_exec, now I checked the
manual and wow there it is...
so both can be used to get output

greets
Zoltán Németh

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




 '.$filetocreate.' 2>&1',$ret);
   // To append to a file, redirect output with double right carats:
   // exec($filetoexecute.' >> '.$filetoappend.' 2>&1',$ret);

   file_exists($filetocreate) ? $file_written = True : $file_written = False;

   // Because we used 2>&1, errors are redirected to stdout
   // $ret contains the redirected error output from the command line
?>

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] open a file in a folder without knowing the filename

2007-06-21 Thread Daniel Brown

On 6/21/07, Edward Kay <[EMAIL PROTECTED]> wrote:

> -Original Message-
> From: Graham Shaw [mailto:[EMAIL PROTECTED]
>
> I'm probably missing something really obvious here but how would
> I go about
> opening a file or multiple files in a folder without knowing the filename
> ahead of time?

Read the files in the directory and place the names of the ones you want
into an array using the directory functions:
http://uk.php.net/manual/en/ref.dir.php

Edward

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




DISCLAIMER:
   Once again, I'm programming in the email window without testing
the code at all.  In theory, it should work, but there's probably a
bug somewhere.

&1',$ret) : $ret = $err; //
Redirects error output.

   // If you want to list files AND directories, comment this section out
   // and change return $files; below to return $ret;
   for($i=0;$i


--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Interesting article about PHP security exploit by GIF files

2007-06-21 Thread tedd

At 9:27 PM +0200 6/20/07, Tijnema wrote:

On 6/20/07, tedd <[EMAIL PROTECTED]> wrote:

If you are worried about evil code being in the image, you could
always resample the image (larger or smaller). Not that I have
personal experience, but I would think that any piece of code that is
resampled is going to have a difficult time running.

Cheers,

tedd


Well, some smart guy could still come around ifhe knows how the file
is resampled, as he would just need to the opposite, but that would
only work if you go from gif to gif I think, Don't think it will be
possible with JPEG or such...

Tijnema



The resampling of the image could certainly be random -- there's 
really not a lot of visual difference between a 200 x 200 image and a 
range of 195 x 195 to 205 x 205 images -- so that gives you a range 
of 10 possibilities. Plus , you can mix and match various dimensions 
producing uneven images, such as a 201 x 199 image. That should give 
you enough range to make it very unlikely that someone could guess as 
to which which random image configuration was going to be applied.


And, you can change all gifs to jpegs.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php framework, large site

2007-06-21 Thread Crayon Shin Chan
On Wednesday 20 June 2007 03:27, Robert Cummings wrote:

> > 1) study a selection of frameworks and learn from their strengths and
> > weaknesses then go on to create a kickass framework based on what
> > you've learnt
>
> Now, now, let's not pretend that you even nearly suggested that in your
> original answer:
>
> "It's an extremely inefficient use of precious time.
>
>  at it :)"
>
> You don't offer anything up. Only that pursing the creation of a
> framework is "extremely inefficient use of precious time" by relating
> it to Inventing of the wheel over and over. ...

I still stand by that answer. But IF the OP wanted really really wanted to 
create a new framework then that is where the first paragraph comes in.

> > Please note the distinction between possibility and probability.
>
> Please stay on track.

Note how hard it is to get a straight answer out of you. You said:

> Ah but it is quite possible that the OP will go ahead and try to build
> a framework, he may fail miserably, all the while learning from his
> mistakes. Then he may try again and subsequently build a kickass
> framework. Since not all paths lead to the same conclusion it is just
> as possible that if he doesn't go down this path that he will never
> create a kickass framework no matter how many frameworks he studies.

Which basically is saying, whatever path you choose the outcome may not 
turn out the way you expect, which I summed up as:

> Now you're trudging into the realms of philosophy, crystal ball gazing
> and groundless speculation.

You counter with:

> No, it's simple probability.

Seeking clarification I ask:

> So it's probability now? Which has the greater probability:
>
> 1) study a selection of frameworks and learn from their strengths and
> weaknesses then go on to create a kickass framework based on what
> you've learnt
>
> 2) just jump right in a create a kickass framework
>
> Please note the distinction between possibility and probability.

And finally you dodge the question with:

> Please stay on track.

Similarly I ask at which point you made the word "update" to 
mean "popularity":

> > > > Read what I wrote above, I'm talking about UPDATES (or the lack
> > > > of), not popularity.
> > >
> > > You implied it.
> >
> > Where? How? Maybe the English that they taught me at school is subtly
> > different to the English that you learnt.
>
> I'm moving forward with the discussion, not backwards, Please keep up.
> I've no reason for the discussion to go into circular mode.

And you dismiss the question out of hand - damn you're good at this.


> > Still, it's good to know that your code is flawless and can be relied
> > upon.


> So obviously I said they were all fallacious. Perhaps you don't
> understand what fallacious means.

Perhaps you don't recognise sarcasm when you see it?

-- 
Crayon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Counting Capital Letters

2007-06-21 Thread tedd

At 12:32 AM +0100 6/21/07, Richard Davey wrote:

Hi,

I've written a short regexp which will *count* how many capital letters
are in a given string (the woefully simple: '/[A-Z]/')

Although it's an English language web site, I'm curious how you'd
count capital letters that span beyond just the standard A-Z.

For example characters such as the Latin capital letter S with Acute.
I'm not interested in covering all possible character sets, but I
don't want to piss-off any Europeans who may register on the site and
want to use one of "their own" capital letters.

Anyone approached this before?

Cheers,

Rich


Rich:

Can't say that I have, but try this off the top of my head:

1. Explode the string into two arrays (array1, array2);

2. Lowercase one array;

3. Use array_dif.

4 Count array_dif.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php framework, large site

2007-06-21 Thread Robert Cummings
On Thu, 2007-06-21 at 22:41 +0800, Crayon Shin Chan wrote:
> On Wednesday 20 June 2007 03:27, Robert Cummings wrote:
> 
> > > 1) study a selection of frameworks and learn from their strengths and
> > > weaknesses then go on to create a kickass framework based on what
> > > you've learnt
> >
> > Now, now, let's not pretend that you even nearly suggested that in your
> > original answer:
> >
> > "It's an extremely inefficient use of precious time.
> >
> >  at it :)"
> >
> > You don't offer anything up. Only that pursing the creation of a
> > framework is "extremely inefficient use of precious time" by relating
> > it to Inventing of the wheel over and over. ...
> 
> I still stand by that answer. But IF the OP wanted really really wanted to 
> create a new framework then that is where the first paragraph comes in.
> 
> > > Please note the distinction between possibility and probability.
> >
> > Please stay on track.
> 
> Note how hard it is to get a straight answer out of you. You said:
> 
> > Ah but it is quite possible that the OP will go ahead and try to build
> > a framework, he may fail miserably, all the while learning from his
> > mistakes. Then he may try again and subsequently build a kickass
> > framework. Since not all paths lead to the same conclusion it is just
> > as possible that if he doesn't go down this path that he will never
> > create a kickass framework no matter how many frameworks he studies.
> 
> Which basically is saying, whatever path you choose the outcome may not 
> turn out the way you expect, which I summed up as:
> 
> > Now you're trudging into the realms of philosophy, crystal ball gazing
> > and groundless speculation.
> 
> You counter with:
> 
> > No, it's simple probability.
> 
> Seeking clarification I ask:
> 
> > So it's probability now? Which has the greater probability:
> >
> > 1) study a selection of frameworks and learn from their strengths and
> > weaknesses then go on to create a kickass framework based on what
> > you've learnt
> >
> > 2) just jump right in a create a kickass framework
> >
> > Please note the distinction between possibility and probability.
> 
> And finally you dodge the question with:
> 
> > Please stay on track.

Your question of "which has greater probability" was moving off track.
It is irrelevant to the OP's question of how to start a framework and
your original dismissive answer that all but said he shouldn't.

> Similarly I ask at which point you made the word "update" to 
> mean "popularity":
> 
> > > > > Read what I wrote above, I'm talking about UPDATES (or the lack
> > > > > of), not popularity.
> > > >
> > > > You implied it.
> > >
> > > Where? How? Maybe the English that they taught me at school is subtly
> > > different to the English that you learnt.
> >
> > I'm moving forward with the discussion, not backwards, Please keep up.
> > I've no reason for the discussion to go into circular mode.
> 
> And you dismiss the question out of hand - damn you're good at this.

Because we already discussed popularity and how you implied it in a
previous posting. I see now reason to circle back to that when the
answer already exists in the mailing list archives.

> 
> > > Still, it's good to know that your code is flawless and can be relied
> > > upon.
> 
> 
> > So obviously I said they were all fallacious. Perhaps you don't
> > understand what fallacious means.
> 
> Perhaps you don't recognise sarcasm when you see it?

No, I'm unable to read your mind and in the absence of facial and vocal
cues I can only ascertain sarcasm by the above NEWLY included sarcasm
delimiters or by a winkie smiley (or other similar smileys) that usually
accompanies such contexts as sarcasm.

Cheers,
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



Re: [PHP] Program Execution and reading results

2007-06-21 Thread makhan

Thanks guys for your response. I think this output from reply can solve my
problem. Becuase I can return some value like ' fileready == true' as the
output from the executable program. And when fileready is true I can read
the output text file. Can you please explain a little bit what kind of
output shell_exec will retrieve. I mean how can i define a boolean variable
like fileready and have it returned to php as output so that I know that
text file is ready to be read.

Thanks


Daniel Brown-5 wrote:
> 
> On 6/21/07, Zoltán Németh <[EMAIL PROTECTED]> wrote:
>> 2007. 06. 21, csütörtök keltezéssel 10.46-kor Richard Heyes ezt írta:
>> > > hmm I thought the OP's question was about how can he get
>> output/return
>> > > value from the external program (the file name for example) - maybe
>> it
>> > > was my misunderstanding
>> >
>> > In which case I would still use shell_exec():
>> >
>> > > >   $output = shell_exec('ls -l');
>> > ?>
>> >
>>
>> okay I admit my ignorance :)
>> I didn't know about the return value of shell_exec, now I checked the
>> manual and wow there it is...
>> so both can be used to get output
>>
>> greets
>> Zoltán Németh
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> 
>  $filetoexecute = "somefile.sh";
> $filetocreate = "newfile.txt";
> $filetoappend = "existingfile.txt";
> 
> // To create a file, redirect the output with a single right carat:
> exec($filetoexecute.' > '.$filetocreate.' 2>&1',$ret);
> // To append to a file, redirect output with double right carats:
> // exec($filetoexecute.' >> '.$filetoappend.' 2>&1',$ret);
> 
> file_exists($filetocreate) ? $file_written = True : $file_written =
> False;
> 
> // Because we used 2>&1, errors are redirected to stdout
> // $ret contains the redirected error output from the command line
> ?>
> 
> -- 
> Daniel P. Brown
> [office] (570-) 587-7080 Ext. 272
> [mobile] (570-) 766-8107
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Program-Execution-and-reading-results-tf3956489.html#a11235284
Sent from the PHP - General mailing list archive at Nabble.com.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Integer Overflow Error

2007-06-21 Thread Suhas Pharkute

Hi,

I tried to search on this mailing list and I saw the bug was reported and
fixed. I am using PHP 4.4.7 and GD 2

The error that I am getting is at statement

$img_t = imagecreatetruecolor(100,100);*

Fatal error*: Possible integer overflow in memory allocation (4 * -91750400
+ 0) in *actions.php* on line *1328*

Can one some give me other clues?

Thanks in advance,

Suhas


Re: [PHP] Re: php framework, large site

2007-06-21 Thread Jim Lucas
Since this has really nothing to do with helping the OP with his original question, and honestly 
sounds like a bitch fest from hell. Why don't you take your disagreement of list   Please.


The one thing I hate is when I see emails from one person telling them that their opinion is more 
correct the the other, or what ever the heck it is that they are talking about.


If you two can't get to the point of answering the damn question.  Then please quit talking, because 
it isn't doing anybody any good.  You're only wasting our bandwidth.


Oh, instead of debating between the two (or three, four, five, etc...) of you what you think the op 
meant in his question, why don't you do the easy thing and ask the op to clarify what it is are his 
intentions were by ask the question.


Honestly, "hi, can some body help me, how to start php framwork for large site?" to me would suggest 
that he wants to build his own.


Now, to me, he wants to start his own PHP Framework.  Now, if you can't suggest any good sources for 
the op to read/investigate.  Keep your mouth shut and don't waist everybody's bandwidth and time!


--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Integer Overflow Error

2007-06-21 Thread Tijnema

On 6/21/07, Suhas Pharkute <[EMAIL PROTECTED]> wrote:

Hi,

I tried to search on this mailing list and I saw the bug was reported and
fixed. I am using PHP 4.4.7 and GD 2

The error that I am getting is at statement

$img_t = imagecreatetruecolor(100,100);*

Fatal error*: Possible integer overflow in memory allocation (4 * -91750400
+ 0) in *actions.php* on line *1328*

Can one some give me other clues?

Thanks in advance,

Suhas



Time to move on to PHP5?

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] phpinfo displays blank page

2007-06-21 Thread Tijnema

On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:

On 6/20/07, Tijnema <[EMAIL PROTECTED]> wrote:
> On 6/21/07, Jeff Schwartz <[EMAIL PROTECTED]> wrote:
> > You're right, that works. So why doesn't my script work? All it contains is:
> >
> >  > phpinfo();
> > ?>
>
> Hard to say, as this just *should* work.
>
> What you can try is to hook up the processor with some debugger
> The strace program will do the job I think, if not, then you should
> move on to GDB.
> This should point out some errors that point to the problem.
>
> Oh, btw, maybe very obvious but is your script readable by the user
> you execute the PHP CLI with?
>
> Tijnema
>
> *Also, please don't top post...*
> >
> > Tijnema <[EMAIL PROTECTED]> wrote:
> > On 6/20/07, Jeff Schwartz wrote:
> > > Thanks for getting back to me so quickly.
> > >
> > > I checked the archives and viewed the source before I posted the problem.
> > The source is empty except for the junk IE puts into it. Is there a specific
> > log or error file I should check?
> > >
> > > I upgraded from 4.x. I also ran "php phpinfo.php" (phpinfo.php is a script
> > containing only the phpinfo command) at a server prompt but nothing was
> > displayed.
> >
> > What happens if you run this on the command line:
> > php -r "phpinfo();"
> >
> > That should work :)
> >
> > Tijnema
> > >
> > >
> > > Jochem Maas wrote:
> > > Daniel Brown wrote:
> > > > On 6/20/07, Jeff Schwartz wrote:
> > > >> When I run phpinfo() nothing is displayed. It used to work. I recently
> > > >> upgraded to 5.2.1 but I can't be sure that's exactly when phpinfo
> > > >> stopped working. Has anyone else run into this?
> > >
> > > lots of people :-)
> > >
> > > what did you upgrade from?
> > > do what Dan said - only I'd run through his points in the following order
> > 2,3,1
> > >
> > > you may have php setup to log elsewhere than the apache error log - if so
> > check there also.
> > >
> > > lastly I sometimes find it useful to try running the cmdline version php -
> > sometimes
> > > I screw things up and the cmdline is helpful in that it [sometimes]
> > > spits out a bunch of errors (usually related to extensions that could not
> > be loaded)
> > >
> > > >>
> > > >> Thanks,
> > > >> Jeff
> > > >>
> > > >>
> > > >> -
> > > >> Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user
> > > >> panel and lay it on us.
> > > >
> > > > 1.) Search the archives.
> > > > 2.) Try to view the source of the page. If you see the PHP
> > > > source, it's not working properly.
> > > > 3.) Check the Apache error logs.
> > > >
> > > > See what you come up with after trying all three of the above and
> > > > post your results. It'll give everyone here a better idea of what
> > > > your particular problem may be.
> > > >
> > >
> > >
> > >
> > >
> > > -
> > > Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's
> > on, when.
> >
> >
> >
> > 
> > Bored stiff? Loosen up...
> > Download and play hundreds of games for free on Yahoo! Games.
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

   Jeff,

   Check to make sure that the extension is loaded when you restart
Apache.  You did restart Apache, right?

--
Daniel P. Brown


Good point, but that doesn't affect the PHP CLI ;)

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] open a file in a folder without knowing the filename

2007-06-21 Thread Tijnema

On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:

On 6/21/07, Edward Kay <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: Graham Shaw [mailto:[EMAIL PROTECTED]
> >
> > I'm probably missing something really obvious here but how would
> > I go about
> > opening a file or multiple files in a folder without knowing the filename
> > ahead of time?
>
> Read the files in the directory and place the names of the ones you want
> into an array using the directory functions:
> http://uk.php.net/manual/en/ref.dir.php
>
> Edward
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

DISCLAIMER:
   Once again, I'm programming in the email window without testing
the code at all.  In theory, it should work, but there's probably a
bug somewhere.




Daniel P. Brown


I like that disclaimer :)

I write a lot of code for this list in my mail..

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Integer Overflow Error

2007-06-21 Thread Jochem Maas
Suhas Pharkute wrote:
> Hi,
> 
> I tried to search on this mailing list and I saw the bug was reported and
> fixed. I am using PHP 4.4.7 and GD 2

you make it sound like there is only one bug.

> 
> The error that I am getting is at statement
> 
> $img_t = imagecreatetruecolor(100,100);*
 ^--- is that in your source code? or 
was it a copy/paste error?

> 
> Fatal error*: Possible integer overflow in memory allocation (4 * -91750400
> + 0) in *actions.php* on line *1328*
> 
> Can one some give me other clues?
> 
> Thanks in advance,
> 
> Suhas
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php framework, large site

2007-06-21 Thread Robert Cummings
On Thu, 2007-06-21 at 09:15 -0700, Jim Lucas wrote:
> Since this has really nothing to do with helping the OP with his original 
> question, and honestly 
> sounds like a bitch fest from hell. Why don't you take your disagreement of 
> list   Please.
> 
> The one thing I hate is when I see emails from one person telling them that 
> their opinion is more 
> correct the the other, or what ever the heck it is that they are talking 
> about.

I never said my opinion was more correct, I merely pointed out the OP
wanted to start a framework in contrast to the comment posted by Crayon.

> If you two can't get to the point of answering the damn question.  Then 
> please quit talking, because 
> it isn't doing anybody any good.  You're only wasting our bandwidth.

With all respect, the bandwidth is pretty cheap, even on a 14k modem.

> Oh, instead of debating between the two (or three, four, five, etc...) of you 
> what you think the op 
> meant in his question, why don't you do the easy thing and ask the op to 
> clarify what it is are his 
> intentions were by ask the question.

The OP already clarified his position.

> Honestly, "hi, can some body help me, how to start php framwork for large 
> site?" to me would suggest 
> that he wants to build his own.

EXACTLY!

> Now, to me, he wants to start his own PHP Framework.  Now, if you can't 
> suggest any good sources for 
> the op to read/investigate.  Keep your mouth shut and don't waist everybody's 
> bandwidth and time!

I bothered to jump into the thread in the first place because I dislike
when someone jumps on a question with an answer that belittles the
attempt to do something for which a person is requesting help. Since
then Crayon has gone on and on and I've just been rebutting his idiocy.

Cheers,
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



Re: [PHP] Integer Overflow Error

2007-06-21 Thread Robert Cummings
On Thu, 2007-06-21 at 18:16 +0200, Tijnema wrote:
> On 6/21/07, Suhas Pharkute <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I tried to search on this mailing list and I saw the bug was reported and
> > fixed. I am using PHP 4.4.7 and GD 2
> >
> > The error that I am getting is at statement
> >
> > $img_t = imagecreatetruecolor(100,100);*
> >
> > Fatal error*: Possible integer overflow in memory allocation (4 * -91750400
> > + 0) in *actions.php* on line *1328*
> >
> > Can one some give me other clues?
> >
> > Thanks in advance,
> >
> > Suhas
> >
> 
> Time to move on to PHP5?

Why? PHP4 gets bug fixes, and PHP5 probably uses the same code for GD.

Cheers,
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



Re: [PHP] phpinfo displays blank page

2007-06-21 Thread Daniel Brown

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:

Good point, but that doesn't affect the PHP CLI ;)

Tijnema



   Yes, I'm aware of that but if the CGI/module displays the
correct stuff, then it can narrow the problems down to the CLI itself.

   With regard to the CLI, try a few things from the command line:
   `whereis php` # Shows all PHP-CLIs in $PATH
   `which php` # Shows which PHP-CLI is being used.
   `php -v` # Shows the version of PHP from the `which` command.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] open a file in a folder without knowing the filename

2007-06-21 Thread Daniel Brown

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:

I like that disclaimer :)

I write a lot of code for this list in my mail..


   Yeah, I think I use the "Gmail PHP IDE" more than I use ViM!  ;-P

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Integer Overflow Error

2007-06-21 Thread Suhas Pharkute

Ok, I am sorry, but not sure what do you mean here? Is there any error?

If so it will not even run the code

Suhas

On 6/21/07, Jochem Maas <[EMAIL PROTECTED]> wrote:


Suhas Pharkute wrote:
> Hi,
>
> I tried to search on this mailing list and I saw the bug was reported
and
> fixed. I am using PHP 4.4.7 and GD 2

you make it sound like there is only one bug.

>
> The error that I am getting is at statement
>
> $img_t = imagecreatetruecolor(100,100);*
 ^--- is that in your source code?
or was it a copy/paste error?

>
> Fatal error*: Possible integer overflow in memory allocation (4 *
-91750400
> + 0) in *actions.php* on line *1328*
>
> Can one some give me other clues?
>
> Thanks in advance,
>
> Suhas
>





--
Suhas Pharkute, PhD
CEO - Syna Intelligence, LLP
V. 208 830 8915 (C)
E. [EMAIL PROTECTED],.com
W. http://synaintel.com


Re: [PHP] open a file in a folder without knowing the filename

2007-06-21 Thread Tijnema

On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> I like that disclaimer :)
>
> I write a lot of code for this list in my mail..

   Yeah, I think I use the "Gmail PHP IDE" more than I use ViM!  ;-P

--
Daniel P. Brown


Let's send a future request to google, we want PHP color coding in Gmail!!! :)

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php framework, large site

2007-06-21 Thread Jim Lucas

Robert Cummings wrote:

On Thu, 2007-06-21 at 09:15 -0700, Jim Lucas wrote:
Since this has really nothing to do with helping the OP with his original question, and honestly 
sounds like a bitch fest from hell. Why don't you take your disagreement of list   Please.


The one thing I hate is when I see emails from one person telling them that their opinion is more 
correct the the other, or what ever the heck it is that they are talking about.


I never said my opinion was more correct, I merely pointed out the OP
wanted to start a framework in contrast to the comment posted by Crayon.


Remember, this was a blanket email, intended for a handful of people.



If you two can't get to the point of answering the damn question.  Then please quit talking, because 
it isn't doing anybody any good.  You're only wasting our bandwidth.


With all respect, the bandwidth is pretty cheap, even on a 14k modem.


granted, if you think of it individually, but really, how many people get this mailing list and how 
many different website mirror the PHP mailing list server.  and however else it my be duplicated.




Oh, instead of debating between the two (or three, four, five, etc...) of you what you think the op 
meant in his question, why don't you do the easy thing and ask the op to clarify what it is are his 
intentions were by ask the question.


The OP already clarified his position.


Yes the op did,

"So,
Much off topic, but ok.
1. drupal are ok, but soo slow.. and I don't need CMS. I want to write my own.

The main reason I want write my own framework / project is performance.
Now I think to use postgresql, memcached, PDO, apc.

Need some help from experienced users! How to get done big project! Ok, thanks."

So, at this point, shouldn't the discussion change to what the op it really 
wanting information about?

Remember, this is intended to all (not just you Robert)



Honestly, "hi, can some body help me, how to start php framwork for large site?" to me would suggest 
that he wants to build his own.


EXACTLY!


Thought I was right.



Now, to me, he wants to start his own PHP Framework.  Now, if you can't suggest any good sources for 
the op to read/investigate.  Keep your mouth shut and don't waist everybody's bandwidth and time!


I bothered to jump into the thread in the first place because I dislike
when someone jumps on a question with an answer that belittles the
attempt to do something for which a person is requesting help. Since
then Crayon has gone on and on and I've just been rebutting his idiocy.


Once again, not all these comments were intended for you Robert



Cheers,
Rob.



--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Integer Overflow Error

2007-06-21 Thread Jochem Maas
Suhas Pharkute wrote:
> Ok, I am sorry, but not sure what do you mean here? 

the feeling is mutual.
it's rather like I asked you what color the sky is ... and you answered 'yes'.

> Is there any error?
> 
> If so it will not even run the code
> 
> Suhas
> 
> On 6/21/07, Jochem Maas <[EMAIL PROTECTED]> wrote:
>>
>> Suhas Pharkute wrote:
>> > Hi,
>> >
>> > I tried to search on this mailing list and I saw the bug was reported
>> and
>> > fixed. I am using PHP 4.4.7 and GD 2
>>
>> you make it sound like there is only one bug.
>>
>> >
>> > The error that I am getting is at statement
>> >
>> > $img_t = imagecreatetruecolor(100,100);*
>>  ^--- is that in your source
>> code?
>> or was it a copy/paste error?
>>
>> >
>> > Fatal error*: Possible integer overflow in memory allocation (4 *
>> -91750400
>> > + 0) in *actions.php* on line *1328*
>> >
>> > Can one some give me other clues?
>> >
>> > Thanks in advance,
>> >
>> > Suhas
>> >
>>
>>
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php framework, large site

2007-06-21 Thread Robert Cummings
On Thu, 2007-06-21 at 10:21 -0700, Jim Lucas wrote:
> Robert Cummings wrote:
> >
> > I bothered to jump into the thread in the first place because I dislike
> > when someone jumps on a question with an answer that belittles the
> > attempt to do something for which a person is requesting help. Since
> > then Crayon has gone on and on and I've just been rebutting his idiocy.
> 
> Once again, not all these comments were intended for you Robert

I know, I was just commenting on why I bothered. I'll stay off this
thread now unless I have something more constructive for the OP himself.

Cheers,
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



Re: [PHP] open a file in a folder without knowing the filename

2007-06-21 Thread Dan

Seconded :D
"Tijnema" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> I like that disclaimer :)
>
> I write a lot of code for this list in my mail..

   Yeah, I think I use the "Gmail PHP IDE" more than I use ViM!  ;-P

--
Daniel P. Brown


Let's send a future request to google, we want PHP color coding in 
Gmail!!! :)


Tijnema 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] If statement duplicating mysql records?

2007-06-21 Thread Roberto Mansfield
Jason Pruim wrote:
> 
> 
> The code I had worked out, originally was something along the lines of:
> 
> if($row[5] =="Level1") (
> echo "$row[0] ";
> echo "$row[1]  ";
> echo "Instructions";
> echo " href='update.php?taskid=$row[0]'>Click here!";
> }
> 
> if($row[5] =="Level2"){
> echo "$row[0] ";
> echo "$row[1]  ";
> echo "Instructions";
> echo " href='update.php?taskid=$row[0]'>Click here!";
> 
> {
> else
> {
> echo "$row[0] ";
> echo "$row[1]  ";
> echo " href='$row[2]'>Instructions";
> echo " href='update.php?taskid=$row[0]'>Click here!";
> 
> }
> 
> and what would happen is if $row[5] =="Level1" it would change the color
> to yellow, but then it would also display another line of the same info
> that would have the $unclassified color assigned to it.

Ahh, this is different from your original post. You have TWO if
statements here. So when $row[5] = "Level1", it was satisfying the first
IF statement and then falling into the ELSE of the second IF statement.

Makes sense to me now why it was failing.

Roberto

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Interesting article about PHP security exploit by GIF files

2007-06-21 Thread Dan
What's with all this checking of mime types, etc?  As long as you check that 
it doesn't have .php at the end of it's filename then you're fine.  Unless 
you have PHP set to run on every filetype or something strange.  Isn't it 
obvious not to allow anything.anything.php as an upload?


- Dan

"Tijnema" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Hi all,

Just received a mail from phpclasses, which pointed to this very
interesting article[1]. Seems good to know for starters ;)
The experts around here probably already know this way of exploits.

Tijnema

[1] 
http://www.phpclasses.org/blog/post/67-PHP-security-exploit-with-GIF-images.html 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] If statement duplicating mysql records?

2007-06-21 Thread Jason Pruim


On Jun 21, 2007, at 1:42 PM, Roberto Mansfield wrote:


Jason Pruim wrote:



The code I had worked out, originally was something along the  
lines of:


if($row[5] =="Level1") (
echo "$row[0] ";
echo "$row[1]  ";
echo "InstructionsA>";

echo "Click here!";
}

if($row[5] =="Level2"){
echo "$row[0] ";
echo "$row[1]  ";
echo "InstructionsA>";

echo "Click here!";

{
else
{
echo "$row[0] ";
echo "$row[1]  ";
echo "Instructions";
echo "Click here!";

}

and what would happen is if $row[5] =="Level1" it would change the  
color
to yellow, but then it would also display another line of the same  
info

that would have the $unclassified color assigned to it.


Ahh, this is different from your original post. You have TWO if
statements here. So when $row[5] = "Level1", it was satisfying the  
first
IF statement and then falling into the ELSE of the second IF  
statement.


Makes sense to me now why it was failing.

Roberto'


It's not quite making sense to me though... My understanding of IF  
statements is if the condition is met it ignores all the other if's.  
Is that not correct? At this point it's just me trying to figure  
things out for my knowledge :)





--
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



[PHP] Strange Fatal Error Possibly Memory

2007-06-21 Thread Dan

I keep geting this fatal error at the bottom of a php application

Fatal error: Exception thrown without a stack frame in Unknown on line 0

It sounds like it would be a problem with the memory stack, but all I'm 
doing is uploading a file, writing, and reading it.  Any ideas on what this 
error could mean?


- Dan 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] If statement duplicating mysql records?

2007-06-21 Thread Roberto Mansfield
Jason Pruim wrote:
> 
> It's not quite making sense to me though... My understanding of IF
> statements is if the condition is met it ignores all the other if's. Is
> that not correct? At this point it's just me trying to figure things out
> for my knowledge :)

No, that's not how it works. If the condition is met, the contents of
the if block are executed. If not, and there is an ELSE block, those
commands are executed. Then, the script continues after the whole
if/then/else structure.

Maybe you are thinking of an IF/ELSEIF/ELSEIF/.../ELSE structure?

if ( $row[5] == "Level1" ) {
  // your commands

} elseif ( $row[5] == "Level2" ) {
  // your commands

} else {
  // your commands

}

This would work in the way you are thinking. Hope this helps your
understanding.


-- 
Roberto Mansfield
Institutional Research and Application Development (IRAD)
SAS Computing

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Strange Fatal Error Possibly Memory

2007-06-21 Thread Tijnema

On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:

I keep geting this fatal error at the bottom of a php application

Fatal error: Exception thrown without a stack frame in Unknown on line 0

It sounds like it would be a problem with the memory stack, but all I'm
doing is uploading a file, writing, and reading it.  Any ideas on what this
error could mean?

- Dan


Check your Apache logs (or whatever you're using..)

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Strange Fatal Error Possibly Memory

2007-06-21 Thread Dan
I cleared all my logs, then ran the app having problems a few times.  There 
were no error messages in the Apache logs.  Does PHP have error logs 
somewhere?


- Dan

"Tijnema" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:

I keep geting this fatal error at the bottom of a php application

Fatal error: Exception thrown without a stack frame in Unknown on line 0

It sounds like it would be a problem with the memory stack, but all I'm
doing is uploading a file, writing, and reading it.  Any ideas on what 
this

error could mean?

- Dan


Check your Apache logs (or whatever you're using..)

Tijnema 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] open a file in a folder without knowing the filename

2007-06-21 Thread Tijnema

On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:

Seconded :D


Cool, please go to the following url and clickthe button:

http://gpcc.tijnema.info/

Tijnema


"Tijnema" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:
>> On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
>> > I like that disclaimer :)
>> >
>> > I write a lot of code for this list in my mail..
>>
>>Yeah, I think I use the "Gmail PHP IDE" more than I use ViM!  ;-P
>>
>> --
>> Daniel P. Brown
>
> Let's send a future request to google, we want PHP color coding in
> Gmail!!! :)
>
> Tijnema

--
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] Strange Fatal Error Possibly Memory

2007-06-21 Thread Tijnema

On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:

I cleared all my logs, then ran the app having problems a few times.  There
were no error messages in the Apache logs.  Does PHP have error logs
somewhere?

- Dan


Hmm, do you have some code? Can you narrow down the problem?

Google returns problems with destructor, or with a self-made error handler...

Tijnema


"Tijnema" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
>> I keep geting this fatal error at the bottom of a php application
>>
>> Fatal error: Exception thrown without a stack frame in Unknown on line 0
>>
>> It sounds like it would be a problem with the memory stack, but all I'm
>> doing is uploading a file, writing, and reading it.  Any ideas on what
>> this
>> error could mean?
>>
>> - Dan
>
> Check your Apache logs (or whatever you're using..)
>
> Tijnema

--
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



[PHP] Is There a Function to .... to [yada] ..... [/yada]?

2007-06-21 Thread Stephen
I can't find one. 
   
  Thanks
  Stephen


RE: [PHP] Is There a Function to .... to [yada] ..... [/yada]?

2007-06-21 Thread Vo, Lance
str-replace?

http://us.php.net/manual/en/function.str-replace.php


-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 21, 2007 1:17 PM
To: php-general@lists.php.net
Subject: [PHP] Is There a Function to    to [yada]
. [/yada]?


I can't find one. 
   
  Thanks
  Stephen

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Is There a Function to .... to [yada] ..... [/yada]?

2007-06-21 Thread Tijnema

On 6/21/07, Stephen <[EMAIL PROTECTED]> wrote:

I can't find one.

 Thanks
 Stephen


preg_replace?
http://www.php.net/preg_replace

Tijnema




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Is There a Function to .... to [yada] ..... [/yada]?

2007-06-21 Thread Richard Heyes

Stephen wrote:
I can't find one. 
   
  Thanks

  Stephen


Ahh yes, you want the yada() function. Alternatively if you're after 
something to turn  into [yada] you could try the regex functions 
(PCRE).


--
Richard Heyes
0844 801 1072
http://www.websupportsolutions.co.uk
Knowledge Base and HelpDesk software

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Tijnema

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:

On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
> Seconded :D

Cool, please go to the following url and clickthe button:

http://gpcc.tijnema.info/

Tijnema


Go, go, go people :)

5 users have clicked yet :)

Tijnema


> "Tijnema" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:
> >> On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> >> > I like that disclaimer :)
> >> >
> >> > I write a lot of code for this list in my mail..
> >>
> >>Yeah, I think I use the "Gmail PHP IDE" more than I use ViM!  ;-P
> >>
> >> --
> >> Daniel P. Brown
> >
> > Let's send a future request to google, we want PHP color coding in
> > Gmail!!! :)
> >
> > Tijnema
>
> --
> 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] If statement duplicating mysql records?

2007-06-21 Thread Jason Pruim


On Jun 21, 2007, at 1:58 PM, Roberto Mansfield wrote:


Jason Pruim wrote:


It's not quite making sense to me though... My understanding of IF
statements is if the condition is met it ignores all the other  
if's. Is
that not correct? At this point it's just me trying to figure  
things out

for my knowledge :)


No, that's not how it works. If the condition is met, the contents of
the if block are executed. If not, and there is an ELSE block, those
commands are executed. Then, the script continues after the whole
if/then/else structure.

Maybe you are thinking of an IF/ELSEIF/ELSEIF/.../ELSE structure?

if ( $row[5] == "Level1" ) {
  // your commands

} elseif ( $row[5] == "Level2" ) {
  // your commands

} else {
  // your commands

}

This would work in the way you are thinking. Hope this helps your
understanding.



Hi Roberto,

Thanks for pointing that out, I think it looks better then having a  
bunch of related if statements with an else at the end anyway. :)


Always helps when you use the right tools for the job! :)



--
Roberto Mansfield
Institutional Research and Application Development (IRAD)
SAS Computing



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Strange Fatal Error Possibly Memory

2007-06-21 Thread Dan
I'm using Delphi4PHP so a lot of the code is prewritten components, 
libraries, etc. Here's some code that I can post without giving away too 
much.  As you can see it's not your typical PHP, it is using a ton of 
specific functions.


   require_once("vcl/vcl.inc.php");  // main PHP file, sets up the 
rest.

   use_unit("dbgrids.inc.php");
   use_unit("dbtables.inc.php");
   use_unit("comctrls.inc.php");
   use_unit("buttons.inc.php");
   use_unit("imglist.inc.php");
   use_unit("menus.inc.php");
   use_unit("forms.inc.php");
   use_unit("extctrls.inc.php");
   use_unit("stdctrls.inc.php");

   //Class definition
   class Some extends Page
   {
   Some code that responds to events.
   }

   global $application;

   global $Some;

   //Creates the form
   $Some=new Some($application);

   //Read from resource file
   $Some->loadResource(__FILE__);

   //Shows the form
   $Some->show();

?>
"Tijnema" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
I cleared all my logs, then ran the app having problems a few times. 
There

were no error messages in the Apache logs.  Does PHP have error logs
somewhere?

- Dan


Hmm, do you have some code? Can you narrow down the problem?

Google returns problems with destructor, or with a self-made error 
handler...


Tijnema


"Tijnema" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
>> I keep geting this fatal error at the bottom of a php application
>>
>> Fatal error: Exception thrown without a stack frame in Unknown on line 
>> 0

>>
>> It sounds like it would be a problem with the memory stack, but all 
>> I'm

>> doing is uploading a file, writing, and reading it.  Any ideas on what
>> this
>> error could mean?
>>
>> - Dan
>
> Check your Apache logs (or whatever you're using..)
>
> Tijnema

--
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] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Jason Pruim


On Jun 21, 2007, at 2:25 PM, Tijnema wrote:


On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:

On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
> Seconded :D

Cool, please go to the following url and clickthe button:

http://gpcc.tijnema.info/

Tijnema


Go, go, go people :)

5 users have clicked yet :)

Tijnema


Make that 6 :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Tijnema

On 6/21/07, Jason Pruim <[EMAIL PROTECTED]> wrote:


On Jun 21, 2007, at 2:25 PM, Tijnema wrote:

> On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
>> On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
>> > Seconded :D
>>
>> Cool, please go to the following url and clickthe button:
>>
>> http://gpcc.tijnema.info/
>>
>> Tijnema
>
> Go, go, go people :)
>
> 5 users have clicked yet :)
>
> Tijnema

Make that 6 :)


Yes, it's at 6 now:
http://gpcc.tijnema.info/?stats

Tijnema






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Is There a Function to .... to [yada] ..... [/yada]?

2007-06-21 Thread Stephen
"Vo, Lance" <[EMAIL PROTECTED]> wrote:str-replace?

http://us.php.net/manual/en/function.str-replace.php
  I am hoping for something that checks for matching open and closing markup, 
and will leave < and > unchanged, otherwise.
   
  And also a function to convert back.
   
  Thanks
  Stephen


Re: [PHP] Strange Fatal Error Possibly Memory

2007-06-21 Thread Tijnema

On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:

I'm using Delphi4PHP so a lot of the code is prewritten components,
libraries, etc. Here's some code that I can post without giving away too
much.  As you can see it's not your typical PHP, it is using a ton of
specific functions.




Nah, the code is probably in the Delphi4PHP code, I found this forum
topic, which might help you:
http://forums.delphi-php.net/showthread.php?s=7914eb00a6869351f1734d447e6c6faa&t=401

Tijnema

ps. Please don't top post

"Tijnema" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
>> I cleared all my logs, then ran the app having problems a few times.
>> There
>> were no error messages in the Apache logs.  Does PHP have error logs
>> somewhere?
>>
>> - Dan
>
> Hmm, do you have some code? Can you narrow down the problem?
>
> Google returns problems with destructor, or with a self-made error
> handler...
>
> Tijnema
>>
>> "Tijnema" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>> > On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
>> >> I keep geting this fatal error at the bottom of a php application
>> >>
>> >> Fatal error: Exception thrown without a stack frame in Unknown on line
>> >> 0
>> >>
>> >> It sounds like it would be a problem with the memory stack, but all
>> >> I'm
>> >> doing is uploading a file, writing, and reading it.  Any ideas on what
>> >> this
>> >> error could mean?
>> >>
>> >> - Dan
>> >
>> > Check your Apache logs (or whatever you're using..)
>> >
>> > Tijnema
>>
>> --
>> 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




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Daniel Brown

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:

On 6/21/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
>
> On Jun 21, 2007, at 2:25 PM, Tijnema wrote:
>
> > On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> >> On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
> >> > Seconded :D
> >>
> >> Cool, please go to the following url and clickthe button:
> >>
> >> http://gpcc.tijnema.info/
> >>
> >> Tijnema
> >
> > Go, go, go people :)
> >
> > 5 users have clicked yet :)
> >
> > Tijnema
>
> Make that 6 :)

Yes, it's at 6 now:
http://gpcc.tijnema.info/?stats

Tijnema
>
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




   I voted, but I don't know how likely Google would be to do this.
Still, it would be cool as a Firefox plugin to detect PHP code and
highlight it, eh?

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Reoccuring task manager feature enhancement

2007-06-21 Thread Jason Pruim
Okay, so I don't even have the whole system up and working quite yet  
that Dan Brown typed out for me in another e-mail and I have people  
wanting new features... They would like to be able to schedule things  
to happen every other week, once a month on a certain day, quarterly,  
etc. etc... Now I know I need to use a time stamp to create the  
current time, and I think I can use mktime() to create a time stamp  
for in the future, and add that to the database.


Then to check if it should show up put my sql statement to something  
like: "SELECT * FROM tasks where TIMESTAMP = TODAY or TIMESTAMP is  
older then today and NOT completed"


What I'm not sure about is the best way to setup the logic for  
setting when it is scheduled, such as, if it is supposed to repeat  
every month on the same day, would it be best to simply have a check  
box for "Reoccur Monthly" and if clicked do use PHP wizardry  to  
schedule it to do it every month? Or would it be simpler to when it  
comes up, reschedule it for the next month? As you can see, I'm still  
thinking it through, and wanted to collective knowledge of the group  
to weigh in. Code I'll look for later when I decide on a tactic to use.



Thanks for any advice you can give! :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Robert Cummings
On Thu, 2007-06-21 at 20:25 +0200, Tijnema wrote:
> On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
> > > Seconded :D
> >
> > Cool, please go to the following url and clickthe button:
> >
> > http://gpcc.tijnema.info/
> >
> > Tijnema
> 
> Go, go, go people :)
> 
> 5 users have clicked yet :)

Someone else is doing it too... ;)

 'Cool idea!',
);
  
foreach( $rawPost as $key => $value )
{
$post[] = urlencode( $key ).'='.urlencode( $value );
}
 
$post = implode( '&', $post );

$ch = curl_init( 'http://gpcc.tijnema.info/?' );

curl_setopt( $ch, CURLOPT_HEADER, 0 );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );

if( $rawPost )
{
curl_setopt( $ch, CURLOPT_POSTFIELDS, $post );
}
 
$result = curl_exec( $ch );
}
 
for( $i = 0; $i < 1; $i++ )
{
teehee();
}

?>

Cheers,
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



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Mohamed Yusuf

cool idea, but me thinks gmail will not implement it.

On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:


On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> On 6/21/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
> >
> > On Jun 21, 2007, at 2:25 PM, Tijnema wrote:
> >
> > > On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > >> On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
> > >> > Seconded :D
> > >>
> > >> Cool, please go to the following url and clickthe button:
> > >>
> > >> http://gpcc.tijnema.info/
> > >>
> > >> Tijnema
> > >
> > > Go, go, go people :)
> > >
> > > 5 users have clicked yet :)
> > >
> > > Tijnema
> >
> > Make that 6 :)
>
> Yes, it's at 6 now:
> http://gpcc.tijnema.info/?stats
>
> Tijnema
> >
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

I voted, but I don't know how likely Google would be to do this.
Still, it would be cool as a Firefox plugin to detect PHP code and
highlight it, eh?

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Tijnema

On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> On 6/21/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
> >
> > On Jun 21, 2007, at 2:25 PM, Tijnema wrote:
> >
> > > On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > >> On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
> > >> > Seconded :D
> > >>
> > >> Cool, please go to the following url and clickthe button:
> > >>
> > >> http://gpcc.tijnema.info/
> > >>
> > >> Tijnema
> > >
> > > Go, go, go people :)
> > >
> > > 5 users have clicked yet :)
> > >
> > > Tijnema
> >
> > Make that 6 :)
>
> Yes, it's at 6 now:
> http://gpcc.tijnema.info/?stats
>
> Tijnema
> >
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

   I voted, but I don't know how likely Google would be to do this.
Still, it would be cool as a Firefox plugin to detect PHP code and
highlight it, eh?

--
Daniel P. Brown


"Wie niet waagt, wie niet wint"

That's dutch for something like this:

"Who doesn't try, won't get it"

I don't see a big chance that it gets implemented, but right now,
google wants to improve all their services with things that users
want, so if ther are enough users :)

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Daniel Brown

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:

On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:
> On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > On 6/21/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
> > >
> > > On Jun 21, 2007, at 2:25 PM, Tijnema wrote:
> > >
> > > > On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > > >> On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
> > > >> > Seconded :D
> > > >>
> > > >> Cool, please go to the following url and clickthe button:
> > > >>
> > > >> http://gpcc.tijnema.info/
> > > >>
> > > >> Tijnema
> > > >
> > > > Go, go, go people :)
> > > >
> > > > 5 users have clicked yet :)
> > > >
> > > > Tijnema
> > >
> > > Make that 6 :)
> >
> > Yes, it's at 6 now:
> > http://gpcc.tijnema.info/?stats
> >
> > Tijnema
> > >
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>I voted, but I don't know how likely Google would be to do this.
> Still, it would be cool as a Firefox plugin to detect PHP code and
> highlight it, eh?
>
> --
> Daniel P. Brown

"Wie niet waagt, wie niet wint"

That's dutch for something like this:

"Who doesn't try, won't get it"

I don't see a big chance that it gets implemented, but right now,
google wants to improve all their services with things that users
want, so if ther are enough users :)

Tijnema



   True, but six votes is a far cry from "enough users."

   It's a good start though.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Tijnema

On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:

On Thu, 2007-06-21 at 20:25 +0200, Tijnema wrote:
> On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
> > > Seconded :D
> >
> > Cool, please go to the following url and clickthe button:
> >
> > http://gpcc.tijnema.info/
> >
> > Tijnema
>
> Go, go, go people :)
>
> 5 users have clicked yet :)

Someone else is doing it too... ;)

 'Cool idea!',
   );

   foreach( $rawPost as $key => $value )
   {
   $post[] = urlencode( $key ).'='.urlencode( $value );
   }

   $post = implode( '&', $post );

   $ch = curl_init( 'http://gpcc.tijnema.info/?' );

   curl_setopt( $ch, CURLOPT_HEADER, 0 );
   curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
   curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
   curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );

   if( $rawPost )
   {
   curl_setopt( $ch, CURLOPT_POSTFIELDS, $post );
   }

   $result = curl_exec( $ch );
   }

   for( $i = 0; $i < 1; $i++ )
   {
   teehee();
   }

?>

Cheers,
Rob.



IP Check based ;)

So, it is possible if you use different proxy each time...


Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php framework, large site

2007-06-21 Thread Daniel Brown

   My Spam filter got sick from over-eating.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Robert Cummings
On Thu, 2007-06-21 at 20:47 +0200, Tijnema wrote:
> On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Thu, 2007-06-21 at 20:25 +0200, Tijnema wrote:
> > > On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > > > On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
> > > > > Seconded :D
> > > >
> > > > Cool, please go to the following url and clickthe button:
> > > >
> > > > http://gpcc.tijnema.info/
> > > >
> > > > Tijnema
> > >
> > > Go, go, go people :)
> > >
> > > 5 users have clicked yet :)
> >
> > Someone else is doing it too... ;)
> >
> >  >
> >function teehee()
> >{
> >$rawPost = array
> >(
> >'submit' => 'Cool idea!',
> >);
> >
> >foreach( $rawPost as $key => $value )
> >{
> >$post[] = urlencode( $key ).'='.urlencode( $value );
> >}
> >
> >$post = implode( '&', $post );
> >
> >$ch = curl_init( 'http://gpcc.tijnema.info/?' );
> >
> >curl_setopt( $ch, CURLOPT_HEADER, 0 );
> >curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
> >curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
> >curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );
> >
> >if( $rawPost )
> >{
> >curl_setopt( $ch, CURLOPT_POSTFIELDS, $post );
> >}
> >
> >$result = curl_exec( $ch );
> >}
> >
> >for( $i = 0; $i < 1; $i++ )
> >{
> >teehee();
> >}
> >
> > ?>
> >
> > Cheers,
> > Rob.
> 
> 
> IP Check based ;)
> 
> So, it is possible if you use different proxy each time...

I think it's bust... cuz the numbers are climbing by the thousand son
page reload.

Cheers,
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



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Daniel Brown

On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:

Someone else is doing it too... ;)



curl_setopt( $ch, CURLOPT_HEADER, 0 );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );



   Robert,

   That's just not cool

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Tijnema

On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:

On Thu, 2007-06-21 at 20:47 +0200, Tijnema wrote:
> On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Thu, 2007-06-21 at 20:25 +0200, Tijnema wrote:
> > > On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > > > On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
> > > > > Seconded :D
> > > >
> > > > Cool, please go to the following url and clickthe button:
> > > >
> > > > http://gpcc.tijnema.info/
> > > >
> > > > Tijnema
> > >
> > > Go, go, go people :)
> > >
> > > 5 users have clicked yet :)
> >
> > Someone else is doing it too... ;)
> >
> >  >
> >function teehee()
> >{
> >$rawPost = array
> >(
> >'submit' => 'Cool idea!',
> >);
> >
> >foreach( $rawPost as $key => $value )
> >{
> >$post[] = urlencode( $key ).'='.urlencode( $value );
> >}
> >
> >$post = implode( '&', $post );
> >
> >$ch = curl_init( 'http://gpcc.tijnema.info/?' );
> >
> >curl_setopt( $ch, CURLOPT_HEADER, 0 );
> >curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
> >curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
> >curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );
> >
> >if( $rawPost )
> >{
> >curl_setopt( $ch, CURLOPT_POSTFIELDS, $post );
> >}
> >
> >$result = curl_exec( $ch );
> >}
> >
> >for( $i = 0; $i < 1; $i++ )
> >{
> >teehee();
> >}
> >
> > ?>
> >
> > Cheers,
> > Rob.
>
>
> IP Check based ;)
>
> So, it is possible if you use different proxy each time...

I think it's bust... cuz the numbers are climbing by the thousand son
page reload.

Cheers,
Rob.


Stats script is bugyy :P

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Latest PHP for Mac OS X 10.3.9 (Panther)

2007-06-21 Thread Rahul Sitaram Johari

Ave,

I¹m looking for the latest PHP releases (5.2.2 or higher) for Mac OS X
10.3.9 (Panther). 
Entropy.ch is only providing releases for Mac OS X 10.4 (Tiger), in fact
there stable PHP 5.2.2 release won¹t even install on < 10.4 Mac¹s.

Is there any other way to get latest PHP releases for Mac OS X 10.3.9?

I¹m currently running PHP 5.0.1 / Apache 1.3

Thanks.

~~~
Rahul Sitaram Johari
CEO, Twenty Four Seventy Nine Inc.

W: http://www.rahulsjohari.com
E: [EMAIL PROTECTED]

³I morti non sono piu soli ... The dead are no longer lonely²


Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Daniel Brown

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:

On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Thu, 2007-06-21 at 20:25 +0200, Tijnema wrote:
> > On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > > On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
> > > > Seconded :D
> > >
> > > Cool, please go to the following url and clickthe button:
> > >
> > > http://gpcc.tijnema.info/
> > >
> > > Tijnema
> >
> > Go, go, go people :)
> >
> > 5 users have clicked yet :)
>
> Someone else is doing it too... ;)
>
> 
>function teehee()
>{
>$rawPost = array
>(
>'submit' => 'Cool idea!',
>);
>
>foreach( $rawPost as $key => $value )
>{
>$post[] = urlencode( $key ).'='.urlencode( $value );
>}
>
>$post = implode( '&', $post );
>
>$ch = curl_init( 'http://gpcc.tijnema.info/?' );
>
>curl_setopt( $ch, CURLOPT_HEADER, 0 );
>curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
>curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
>curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );
>
>if( $rawPost )
>{
>curl_setopt( $ch, CURLOPT_POSTFIELDS, $post );
>}
>
>$result = curl_exec( $ch );
>}
>
>for( $i = 0; $i < 1; $i++ )
>{
>teehee();
>}
>
> ?>
>
> Cheers,
> Rob.


IP Check based ;)

So, it is possible if you use different proxy each time...


Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




   Maybe so, but you're using mysql_num_rows(); for displaying on the
vote page.  ;-P

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Robert Cummings
On Thu, 2007-06-21 at 14:50 -0400, Daniel Brown wrote:
> On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > Someone else is doing it too... ;)
> 
> > curl_setopt( $ch, CURLOPT_HEADER, 0 );
> > curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
> > curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
> > curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );
> 
> 
> Robert,
> 
> That's just not cool

Bah, Tij knows it was for fun :)

Cheers,
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



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Tijnema

On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:

On Thu, 2007-06-21 at 14:50 -0400, Daniel Brown wrote:
> On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > Someone else is doing it too... ;)
> 
> > curl_setopt( $ch, CURLOPT_HEADER, 0 );
> > curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
> > curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
> > curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );
> 
>
> Robert,
>
> That's just not cool

Bah, Tij knows it was for fun :)

Cheers,
Rob.


Yes, and it doesn't work anymore :)

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Daniel Brown

On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:

On Thu, 2007-06-21 at 14:50 -0400, Daniel Brown wrote:
> On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > Someone else is doing it too... ;)
> 
> > curl_setopt( $ch, CURLOPT_HEADER, 0 );
> > curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
> > curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
> > curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );
> 
>
> Robert,
>
> That's just not cool

Bah, Tij knows it was for fun :)

Cheers,
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.  |
`'




   No, I didn't mean that.  I meant that you could've saved time and
run multiple instances like I did:

 "Cool idea!");

   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL, 'http://gpcc.tijnema.info/?');
   curl_setopt($ch, CURLOPT_POST, 1);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
   curl_exec($ch);
}

?>

php vote.php >> /dev/null &
php vote.php >> /dev/null &
php vote.php >> /dev/null &
php vote.php >> /dev/null &
php vote.php >> /dev/null &


   Over 250316 now  guess I should cut it.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Tijnema

On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:

On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Thu, 2007-06-21 at 14:50 -0400, Daniel Brown wrote:
> > On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > Someone else is doing it too... ;)
> > 
> > > curl_setopt( $ch, CURLOPT_HEADER, 0 );
> > > curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
> > > curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
> > > curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );
> > 
> >
> > Robert,
> >
> > That's just not cool
>
> Bah, Tij knows it was for fun :)
>
> Cheers,
> 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.  |
> `'
>
>

   No, I didn't mean that.  I meant that you could've saved time and
run multiple instances like I did:

 "Cool idea!");

   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL, 'http://gpcc.tijnema.info/?');
   curl_setopt($ch, CURLOPT_POST, 1);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
   curl_exec($ch);
}

?>

php vote.php >> /dev/null &
php vote.php >> /dev/null &
php vote.php >> /dev/null &
php vote.php >> /dev/null &
php vote.php >> /dev/null &


   Over 250316 now  guess I should cut it.

--
Daniel P. Brown


Hmm, there's no sense in running this, all it does is getting the same
page over and over again, no automated clicks are counted anymore:)

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Tijnema

On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:

On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Thu, 2007-06-21 at 14:50 -0400, Daniel Brown wrote:
> > On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > Someone else is doing it too... ;)
> > 
> > > curl_setopt( $ch, CURLOPT_HEADER, 0 );
> > > curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
> > > curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
> > > curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );
> > 
> >
> > Robert,
> >
> > That's just not cool
>
> Bah, Tij knows it was for fun :)
>
> Cheers,
> 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.  |
> `'
>
>

   No, I didn't mean that.  I meant that you could've saved time and
run multiple instances like I did:

 "Cool idea!");

   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL, 'http://gpcc.tijnema.info/?');
   curl_setopt($ch, CURLOPT_POST, 1);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
   curl_exec($ch);
}

?>

php vote.php >> /dev/null &
php vote.php >> /dev/null &
php vote.php >> /dev/null &
php vote.php >> /dev/null &
php vote.php >> /dev/null &


   Over 250316 now  guess I should cut it.

--
Daniel P. Brown


It says 18 for me now ... :P

Fixed the script so it's working fine now :)

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Robert Cummings
On Thu, 2007-06-21 at 15:04 -0400, Daniel Brown wrote:
> On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Thu, 2007-06-21 at 14:50 -0400, Daniel Brown wrote:
> > > On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > > Someone else is doing it too... ;)
> > > 
> > > > curl_setopt( $ch, CURLOPT_HEADER, 0 );
> > > > curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
> > > > curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
> > > > curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );
> > > 
> > >
> > > Robert,
> > >
> > > That's just not cool
> >
> > Bah, Tij knows it was for fun :)
> >
> No, I didn't mean that.  I meant that you could've saved time and
> run multiple instances like I did:
> 
>  
> 
> while(1) {
> $data = array('submit' => "Cool idea!");
> 
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL, 'http://gpcc.tijnema.info/?');
> curl_setopt($ch, CURLOPT_POST, 1);
> curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
> curl_exec($ch);
> }
> 
> ?>

*lol* I didnt' want to kill his server :)

Cheers,
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



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Tijnema

On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:

On Thu, 2007-06-21 at 15:04 -0400, Daniel Brown wrote:
> On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Thu, 2007-06-21 at 14:50 -0400, Daniel Brown wrote:
> > > On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > > Someone else is doing it too... ;)
> > > 
> > > > curl_setopt( $ch, CURLOPT_HEADER, 0 );
> > > > curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
> > > > curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
> > > > curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );
> > > 
> > >
> > > Robert,
> > >
> > > That's just not cool
> >
> > Bah, Tij knows it was for fun :)
> >
> No, I didn't mean that.  I meant that you could've saved time and
> run multiple instances like I did:
>
> 
>
> while(1) {
> $data = array('submit' => "Cool idea!");
>
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL, 'http://gpcc.tijnema.info/?');
> curl_setopt($ch, CURLOPT_POST, 1);
> curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
> curl_exec($ch);
> }
>
> ?>

*lol* I didnt' want to kill his server :)

Cheers,
Rob.


Isn't my server ;) Paid host so I don't care :)

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Latest PHP for Mac OS X 10.3.9 (Panther)

2007-06-21 Thread Eric Butera

On 6/21/07, Rahul Sitaram Johari <[EMAIL PROTECTED]> wrote:


Ave,

I¹m looking for the latest PHP releases (5.2.2 or higher) for Mac OS X
10.3.9 (Panther).
Entropy.ch is only providing releases for Mac OS X 10.4 (Tiger), in fact
there stable PHP 5.2.2 release won¹t even install on < 10.4 Mac¹s.

Is there any other way to get latest PHP releases for Mac OS X 10.3.9?

I¹m currently running PHP 5.0.1 / Apache 1.3

Thanks.

~~~
Rahul Sitaram Johari
CEO, Twenty Four Seventy Nine Inc.

W: http://www.rahulsjohari.com
E: [EMAIL PROTECTED]

³I morti non sono piu soli ... The dead are no longer lonely²



Install Fink for dependencies & compile your own version! :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Daniel Brown

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:

On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Thu, 2007-06-21 at 15:04 -0400, Daniel Brown wrote:
> > On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > On Thu, 2007-06-21 at 14:50 -0400, Daniel Brown wrote:
> > > > On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > > > Someone else is doing it too... ;)
> > > > 
> > > > > curl_setopt( $ch, CURLOPT_HEADER, 0 );
> > > > > curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
> > > > > curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
> > > > > curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );
> > > > 
> > > >
> > > > Robert,
> > > >
> > > > That's just not cool
> > >
> > > Bah, Tij knows it was for fun :)
> > >
> > No, I didn't mean that.  I meant that you could've saved time and
> > run multiple instances like I did:
> >
> >  >
> >
> > while(1) {
> > $data = array('submit' => "Cool idea!");
> >
> > $ch = curl_init();
> > curl_setopt($ch, CURLOPT_URL, 'http://gpcc.tijnema.info/?');
> > curl_setopt($ch, CURLOPT_POST, 1);
> > curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
> > curl_exec($ch);
> > }
> >
> > ?>
>
> *lol* I didnt' want to kill his server :)
>
> Cheers,
> Rob.

Isn't my server ;) Paid host so I don't care :)

Tijnema



   Read: Game on!  ;-P

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Tijnema

On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Thu, 2007-06-21 at 15:04 -0400, Daniel Brown wrote:
> > > On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > > On Thu, 2007-06-21 at 14:50 -0400, Daniel Brown wrote:
> > > > > On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > > > > Someone else is doing it too... ;)
> > > > > 
> > > > > > curl_setopt( $ch, CURLOPT_HEADER, 0 );
> > > > > > curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
> > > > > > curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
> > > > > > curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );
> > > > > 
> > > > >
> > > > > Robert,
> > > > >
> > > > > That's just not cool
> > > >
> > > > Bah, Tij knows it was for fun :)
> > > >
> > > No, I didn't mean that.  I meant that you could've saved time and
> > > run multiple instances like I did:
> > >
> > >  > >
> > >
> > > while(1) {
> > > $data = array('submit' => "Cool idea!");
> > >
> > > $ch = curl_init();
> > > curl_setopt($ch, CURLOPT_URL, 'http://gpcc.tijnema.info/?');
> > > curl_setopt($ch, CURLOPT_POST, 1);
> > > curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
> > > curl_exec($ch);
> > > }
> > >
> > > ?>
> >
> > *lol* I didnt' want to kill his server :)
> >
> > Cheers,
> > Rob.
>
> Isn't my server ;) Paid host so I don't care :)
>
> Tijnema
>

   Read: Game on!  ;-P

--
Daniel P. Brown


Yeah, why not? If you have another way around :)
The current "hack" doesn't work anymore ;)

Tijnema
--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Small LAMP install/distro

2007-06-21 Thread tg-php
Ok, done all my googling and experimenting, now I'm tossing it to you guys.

Can anyone recommend a small, no frills, LAMP-centric linux package/distro?

What I'm doing is setting up a test/development environment in a VMWare virtual 
machine to keep things all nice and comparmentalized.  It's going to emulate 
(at least in PHP and MySQL version and configuration) my web host.   Ideally 
I'd like to keep using my traditional Windows apps to do development, but save 
my work to a Samba share on the virtual machine (so guess toss Samba into that 
too).

Maybe there's better ways to do what I want, but now I'm discovered a challenge 
that I'd like to overcome.

I have something called "Grandma's LAMP", which is actually pretty cool.  It 
runs Xubuntu, which I dig, but still takes up 1.5gig (and is config'd for a max 
of 10gb 
HD space).   It has the full GUI and everything installed.

GUI is nice, but not 100% necessary.  AMP + Samba is good.  And I'm 
transporting this all around on a 2GB thunbdrive (oh yeah, did I not mention 
that?).

If it was sans-GUI, I don't see why the whole thing couldn't be under 500MB.

Thought maybe someone out there had seen a distro pack specifically geared for 
quick and dirty LAMP + Samba setup.

-TG

___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Daniel Brown

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:

On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:
> On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > On Thu, 2007-06-21 at 15:04 -0400, Daniel Brown wrote:
> > > > On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > > > On Thu, 2007-06-21 at 14:50 -0400, Daniel Brown wrote:
> > > > > > On 6/21/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > > > > > Someone else is doing it too... ;)
> > > > > > 
> > > > > > > curl_setopt( $ch, CURLOPT_HEADER, 0 );
> > > > > > > curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
> > > > > > > curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
> > > > > > > curl_setopt( $ch, CURLOPT_TIMEOUT, 45 );
> > > > > > 
> > > > > >
> > > > > > Robert,
> > > > > >
> > > > > > That's just not cool
> > > > >
> > > > > Bah, Tij knows it was for fun :)
> > > > >
> > > > No, I didn't mean that.  I meant that you could've saved time and
> > > > run multiple instances like I did:
> > > >
> > > >  > > >
> > > >
> > > > while(1) {
> > > > $data = array('submit' => "Cool idea!");
> > > >
> > > > $ch = curl_init();
> > > > curl_setopt($ch, CURLOPT_URL, 'http://gpcc.tijnema.info/?');
> > > > curl_setopt($ch, CURLOPT_POST, 1);
> > > > curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
> > > > curl_exec($ch);
> > > > }
> > > >
> > > > ?>
> > >
> > > *lol* I didnt' want to kill his server :)
> > >
> > > Cheers,
> > > Rob.
> >
> > Isn't my server ;) Paid host so I don't care :)
> >
> > Tijnema
> >
>
>Read: Game on!  ;-P
>
> --
> Daniel P. Brown

Yeah, why not? If you have another way around :)
The current "hack" doesn't work anymore ;)

Tijnema
--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info



   That's fine.  I `killall`'ed my scripts over an hour ago.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] If statement duplicating mysql records?

2007-06-21 Thread Jim Lucas

Jason Pruim wrote:


On Jun 21, 2007, at 1:58 PM, Roberto Mansfield wrote:


Jason Pruim wrote:


It's not quite making sense to me though... My understanding of IF
statements is if the condition is met it ignores all the other if's. Is
that not correct? At this point it's just me trying to figure things out
for my knowledge :)


No, that's not how it works. If the condition is met, the contents of
the if block are executed. If not, and there is an ELSE block, those
commands are executed. Then, the script continues after the whole
if/then/else structure.

Maybe you are thinking of an IF/ELSEIF/ELSEIF/.../ELSE structure?

if ( $row[5] == "Level1" ) {
  // your commands

} elseif ( $row[5] == "Level2" ) {
  // your commands

} else {
  // your commands

}

This would work in the way you are thinking. Hope this helps your
understanding.



Hi Roberto,

Thanks for pointing that out, I think it looks better then having a 
bunch of related if statements with an else at the end anyway. :)


Always helps when you use the right tools for the job! :)


well, the right tool for the job is a matter of choice.

Maybe I want to use a switch statement instead.

switch($row[5]) {

case 'Level1':
// Your code
break;

case 'Level2':
// Your code
break;

default:
// if none of the case statements above match, then this will be used
break;

}

Just another way to complete the same task





--Roberto Mansfield
Institutional Research and Application Development (IRAD)
SAS Computing



--PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Small LAMP install/distro

2007-06-21 Thread Daniel Brown

On 6/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Ok, done all my googling and experimenting, now I'm tossing it to you guys.

Can anyone recommend a small, no frills, LAMP-centric linux package/distro?

What I'm doing is setting up a test/development environment in a VMWare virtual 
machine to keep things all nice and comparmentalized.  It's going to emulate 
(at least in PHP and MySQL version and configuration) my web host.   Ideally 
I'd like to keep using my traditional Windows apps to do development, but save 
my work to a Samba share on the virtual machine (so guess toss Samba into that 
too).

Maybe there's better ways to do what I want, but now I'm discovered a challenge 
that I'd like to overcome.

I have something called "Grandma's LAMP", which is actually pretty cool.  It 
runs Xubuntu, which I dig, but still takes up 1.5gig (and is config'd for a max of 10gb
HD space).   It has the full GUI and everything installed.

GUI is nice, but not 100% necessary.  AMP + Samba is good.  And I'm 
transporting this all around on a 2GB thunbdrive (oh yeah, did I not mention 
that?).

If it was sans-GUI, I don't see why the whole thing couldn't be under 500MB.

Thought maybe someone out there had seen a distro pack specifically geared for 
quick and dirty LAMP + Samba setup.

-TG

___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




   Google for "DSL" (Damn Small Linux).

   I've used that a few times myself.  Pretty cool.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Small LAMP install/distro

2007-06-21 Thread tg-php
Yeah, I took a quick look at Damn Small Linux.   And have been playing around 
with Puppy Linux (which is pretty cool too).

I may end up using one of those.  Wanted to see if there was a distro with 
everything built into it already (Damn Small seems to have a lot of average 
user apps and not really developer/small server type stuff)

Thanks for the suggestion though, Daniel.

(And yes, I top-post. Get the pitchforks!)

-TG

= = = Original message = = =

On 6/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Ok, done all my googling and experimenting, now I'm tossing it to you guys.
>
> Can anyone recommend a small, no frills, LAMP-centric linux package/distro?
>
> What I'm doing is setting up a test/development environment in a VMWare 
> virtual machine to keep things all nice and comparmentalized.  It's going to 
> emulate (at least in PHP and MySQL version and configuration) my web host.   
> Ideally I'd like to keep using my traditional Windows apps to do development, 
> but save my work to a Samba share on the virtual machine (so guess toss Samba 
> into that too).
>
> Maybe there's better ways to do what I want, but now I'm discovered a 
> challenge that I'd like to overcome.
>
> I have something called "Grandma's LAMP", which is actually pretty cool.  It 
> runs Xubuntu, which I dig, but still takes up 1.5gig (and is config'd for a 
> max of 10gb
> HD space).   It has the full GUI and everything installed.
>
> GUI is nice, but not 100% necessary.  AMP + Samba is good.  And I'm 
> transporting this all around on a 2GB thunbdrive (oh yeah, did I not mention 
> that?).
>
> If it was sans-GUI, I don't see why the whole thing couldn't be under 500MB.
>
> Thought maybe someone out there had seen a distro pack specifically geared 
> for quick and dirty LAMP + Samba setup.
>
> -TG
>

Google for "DSL" (Damn Small Linux).

I've used that a few times myself.  Pretty cool.

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Justin P. Goldberg

Matt Cutts blogged about color-coding messages  in his inbox like Mutt does,
http://www.mattcutts.com/blog/keep-it-coming-gmail/

and the solution he found,
http://www.mattcutts.com/blog/other-googlers-you-should-read/

This doesn't do what you want though. I think a firefox addon or
greasemonkey script would do this better.

I wish someone would come up with something like google docs, but just for
coding though. That would be cool, especially if it could edit files over
ftp/sftp and webdav.

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:


On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
> > Seconded :D
>
> Cool, please go to the following url and clickthe button:
>
> http://gpcc.tijnema.info/
>
> Tijnema

Go, go, go people :)

5 users have clicked yet :)

Tijnema
>
> > "Tijnema" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:
> > >> On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > >> > I like that disclaimer :)
> > >> >
> > >> > I write a lot of code for this list in my mail..
> > >>
> > >>Yeah, I think I use the "Gmail PHP IDE" more than I use
ViM!  ;-P
> > >>
> > >> --
> > >> Daniel P. Brown
> > >
> > > Let's send a future request to google, we want PHP color coding in
> > > Gmail!!! :)
> > >
> > > Tijnema
> >
> > --
> > 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] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Tijnema

On 6/21/07, Justin P. Goldberg <[EMAIL PROTECTED]> wrote:

Matt Cutts blogged about color-coding messages  in his inbox like Mutt does,
http://www.mattcutts.com/blog/keep-it-coming-gmail/

and the solution he found,
http://www.mattcutts.com/blog/other-googlers-you-should-read/

This doesn't do what you want though. I think a firefox addon or
greasemonkey script would do this better.


Yes, and what about the IE users? Server side implementation is a lot
better here I think, but that's up to google...


I wish someone would come up with something like google docs, but just for
coding though. That would be cool, especially if it could edit files over
ftp/sftp and webdav.


You mean just a webbased editor?
Not too hard to create, but where to store the files? I don't have a
few TB left for such things ;)
The editor itself would not be too hard to create and seems quite good
idea to me, maybe i'll start write something when I have some time :)

Tijnema


On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
>
> On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > On 6/21/07, Dan <[EMAIL PROTECTED]> wrote:
> > > Seconded :D
> >
> > Cool, please go to the following url and clickthe button:
> >
> > http://gpcc.tijnema.info/
> >
> > Tijnema
>
> Go, go, go people :)
>
> 5 users have clicked yet :)
>
> Tijnema
> >
> > > "Tijnema" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > > > On 6/21/07, Daniel Brown <[EMAIL PROTECTED]> wrote:
> > > >> On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:
> > > >> > I like that disclaimer :)
> > > >> >
> > > >> > I write a lot of code for this list in my mail..
> > > >>
> > > >>Yeah, I think I use the "Gmail PHP IDE" more than I use
> ViM!  ;-P
> > > >>
> > > >> --
> > > >> Daniel P. Brown
> > > >
> > > > Let's send a future request to google, we want PHP color coding in
> > > > Gmail!!! :)
> > > >
> > > > Tijnema
> > >
> > > --
> > > 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
>
>




--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Color Coding in Gmail (was: open a file in a folder without knowing the filename)

2007-06-21 Thread Greg Donald

On 6/21/07, Tijnema <[EMAIL PROTECTED]> wrote:

> Cool, please go to the following url and clickthe button:
>
> http://gpcc.tijnema.info/


Where's the 'no' option ?  I call shenanigans.


--
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Small LAMP install/distro

2007-06-21 Thread Warren Vail
Did you know that VM-ware actually runs under RH linux?

Warren

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 21, 2007 1:16 PM
To: php-general@lists.php.net
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Small LAMP install/distro

Yeah, I took a quick look at Damn Small Linux.   And have been playing
around with Puppy Linux (which is pretty cool too).

I may end up using one of those.  Wanted to see if there was a distro with
everything built into it already (Damn Small seems to have a lot of average
user apps and not really developer/small server type stuff)

Thanks for the suggestion though, Daniel.

(And yes, I top-post. Get the pitchforks!)

-TG

= = = Original message = = =

On 6/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
> Ok, done all my googling and experimenting, now I'm tossing it to you
guys.
>
> Can anyone recommend a small, no frills, LAMP-centric linux
package/distro?
>
> What I'm doing is setting up a test/development environment in a VMWare
virtual machine to keep things all nice and comparmentalized.  It's going to
emulate (at least in PHP and MySQL version and configuration) my web host.
Ideally I'd like to keep using my traditional Windows apps to do
development, but save my work to a Samba share on the virtual machine (so
guess toss Samba into that too).
>
> Maybe there's better ways to do what I want, but now I'm discovered a
challenge that I'd like to overcome.
>
> I have something called "Grandma's LAMP", which is actually pretty cool.
It runs Xubuntu, which I dig, but still takes up 1.5gig (and is config'd for
a max of 10gb
> HD space).   It has the full GUI and everything installed.
>
> GUI is nice, but not 100% necessary.  AMP + Samba is good.  And I'm
transporting this all around on a 2GB thunbdrive (oh yeah, did I not mention
that?).
>
> If it was sans-GUI, I don't see why the whole thing couldn't be under
500MB.
>
> Thought maybe someone out there had seen a distro pack specifically geared
for quick and dirty LAMP + Samba setup.
>
> -TG
>

Google for "DSL" (Damn Small Linux).

I've used that a few times myself.  Pretty cool.

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
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] Is There a Function to .... to [yada] ..... [/yada]?

2007-06-21 Thread Greg Donald

On 6/21/07, Stephen <[EMAIL PROTECTED]> wrote:

  I am hoping for something that checks for matching open and closing markup, 
and will
leave < and > unchanged, otherwise.


You'll get much more help by posting your own (broken) attempt at
coding this than just "hoping" for someone to do it for you.


--
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] strtotime returns 00:00 for 7am

2007-06-21 Thread Greg Donald

On 6/20/07, Phil Princely <[EMAIL PROTECTED]> wrote:

using this code:

function test_time($time_string) {
echo strftime("%X %A, %b %e\n", strtotime($time_string));


You should be testing the strtotime() call's return value, it returns
false on failure.

if (($timestamp = strtotime($str)) === false) {}


}

test_time('now');
test_time('4pm + 2 Hours');
test_time('now + 2 fortnights');
test_time('last Monday');
test_time('tomorrow');
test_time('5am tomorrow');
test_time('7am 12 days ago');

gives this output:

21:46:18 Wednesday, Jun 20

18:00:00 Wednesday, Jun 20

21:46:18 Wednesday, Jul 18

00:00:00 Monday, Jun 18

00:00:00 Thursday, Jun 21

00:00:00 Thursday, Jun 21

07:00:00 Friday, Jun  8


I'm wondering why the 2nd and 3rd last both give 00:00 as the
time. Especially why 5am tomorrow doesn't work. Using PHP5.


That false return value I mentioned above becomes a zero when used as
the second parameter to strftime().


--
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Latest PHP for Mac OS X 10.3.9 (Panther)

2007-06-21 Thread Greg Donald

On 6/21/07, Rahul Sitaram Johari <[EMAIL PROTECTED]> wrote:

Is there any other way to get latest PHP releases for Mac OS X 10.3.9?


In my opinion building from source is the best option.  You'll not be
depending on someone else to provide it for your specific OS version
nor will you be tied to their chosen configuration.

Not much on details but it gets me through every time a new PHP
version is released:

http://destiney.com/blog/php-4-and-5-on-mac-os-x


--
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Reoccuring task manager feature enhancement

2007-06-21 Thread Chris

Jason Pruim wrote:
Okay, so I don't even have the whole system up and working quite yet 
that Dan Brown typed out for me in another e-mail and I have people 
wanting new features... They would like to be able to schedule things to 
happen every other week, once a month on a certain day, quarterly, etc. 
etc... Now I know I need to use a time stamp to create the current time, 
and I think I can use mktime() to create a time stamp for in the future, 
and add that to the database.


Then to check if it should show up put my sql statement to something 
like: "SELECT * FROM tasks where TIMESTAMP = TODAY or TIMESTAMP is older 
then today and NOT completed"


What I'm not sure about is the best way to setup the logic for setting 
when it is scheduled, such as, if it is supposed to repeat every month 
on the same day, would it be best to simply have a check box for 
"Reoccur Monthly" and if clicked do use PHP wizardry  to schedule it to 
do it every month? Or would it be simpler to when it comes up, 
reschedule it for the next month? As you can see, I'm still thinking it 
through, and wanted to collective knowledge of the group to weigh in. 
Code I'll look for later when I decide on a tactic to use.


Actually instead of working all this out you could use some of the ideas 
already out there. I noticed this article the other day:


http://devzone.zend.com/article/2207

I have not used it so can't say from experience how well it works.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Small LAMP install/distro

2007-06-21 Thread Robert Cummings
On Thu, 2007-06-21 at 16:05 -0700, Warren Vail wrote:
> Did you know that VM-ware actually runs under RH linux?

Doesn't it run under pretty much every OS?

Cheers,
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



RE: [PHP] Small LAMP install/distro

2007-06-21 Thread tg-php
Yeah.. I'm aware.  As I stated in my original email:

"Ideally I'd like to keep using my traditional Windows apps to do 
development..."

I'm comfortable moving around in linux, but the tools and OS I choose to use 
are all Windows-centric.   But instead of installing Apache and PHP and MySQL 
on my Windows machine at work and at home, as I have in the past, then lose 
interest in the project I'm working on and have a bunch of servers installed 
that I'm not using, I'd like to set up a virtual machine to keep all the 
server/test environment contained out of the way.

And while I'm 'comfortable' getting around in linux and know a few tricks, I 
don't feel that I know it well enough to try to start trimming out a gig or two 
of stuff and fiddling with swap space settings and all to make my own 
streamline distro with the apps I want.  Especially if one already exists.

I'd rather waste my time developing PHP apps that nobody but me will ever use, 
than fiddling with OS streamlining and configuration.

-TG

= = = Original message = = =

Did you know that VM-ware actually runs under RH linux?

Warren

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 21, 2007 1:16 PM
To: php-general@lists.php.net
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Small LAMP install/distro

Yeah, I took a quick look at Damn Small Linux.   And have been playing
around with Puppy Linux (which is pretty cool too).

I may end up using one of those.  Wanted to see if there was a distro with
everything built into it already (Damn Small seems to have a lot of average
user apps and not really developer/small server type stuff)

Thanks for the suggestion though, Daniel.

(And yes, I top-post. Get the pitchforks!)

-TG

= = = Original message = = =

On 6/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
> Ok, done all my googling and experimenting, now I'm tossing it to you
guys.
>
> Can anyone recommend a small, no frills, LAMP-centric linux
package/distro?
>
> What I'm doing is setting up a test/development environment in a VMWare
virtual machine to keep things all nice and comparmentalized.  It's going to
emulate (at least in PHP and MySQL version and configuration) my web host.
Ideally I'd like to keep using my traditional Windows apps to do
development, but save my work to a Samba share on the virtual machine (so
guess toss Samba into that too).
>
> Maybe there's better ways to do what I want, but now I'm discovered a
challenge that I'd like to overcome.
>
> I have something called "Grandma's LAMP", which is actually pretty cool.
It runs Xubuntu, which I dig, but still takes up 1.5gig (and is config'd for
a max of 10gb
> HD space).   It has the full GUI and everything installed.
>
> GUI is nice, but not 100% necessary.  AMP + Samba is good.  And I'm
transporting this all around on a 2GB thunbdrive (oh yeah, did I not mention
that?).
>
> If it was sans-GUI, I don't see why the whole thing couldn't be under
500MB.
>
> Thought maybe someone out there had seen a distro pack specifically geared
for quick and dirty LAMP + Samba setup.
>
> -TG
>

Google for "DSL" (Damn Small Linux).

I've used that a few times myself.  Pretty cool.

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Small LAMP install/distro

2007-06-21 Thread Warren Vail
I can recommend Fedora Core 6, it has more uptodate Apache, PHP and MySQL,
than does Red Hat Enterprise 4, which is what the company I consult for
installed on their VM-ware environment.  We spent a lot of time upgrading
everything on the VM Host because the RH Enterprise was so far behind.  I
run the Fedora 6 on a spare machine at home, and everything that version is
far superior, don't even try to convince the corporate types though, they
want a corporate name behind things, like there might be someone to blame,
other than themselves, if something goes wrong.

I've also used Free BSD, Redhat 9, and older versions of Suse, but prefer
the Fedora.  The MySQL on Fedora 6 has master/slave replication, if you know
what that is.

Warren 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 21, 2007 9:41 PM
To: php-general@lists.php.net
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Small LAMP install/distro

Yeah.. I'm aware.  As I stated in my original email:

"Ideally I'd like to keep using my traditional Windows apps to do
development..."

I'm comfortable moving around in linux, but the tools and OS I choose to use
are all Windows-centric.   But instead of installing Apache and PHP and
MySQL on my Windows machine at work and at home, as I have in the past, then
lose interest in the project I'm working on and have a bunch of servers
installed that I'm not using, I'd like to set up a virtual machine to keep
all the server/test environment contained out of the way.

And while I'm 'comfortable' getting around in linux and know a few tricks, I
don't feel that I know it well enough to try to start trimming out a gig or
two of stuff and fiddling with swap space settings and all to make my own
streamline distro with the apps I want.  Especially if one already exists.

I'd rather waste my time developing PHP apps that nobody but me will ever
use, than fiddling with OS streamlining and configuration.

-TG

= = = Original message = = =

Did you know that VM-ware actually runs under RH linux?

Warren

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 21, 2007 1:16 PM
To: php-general@lists.php.net
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Small LAMP install/distro

Yeah, I took a quick look at Damn Small Linux.   And have been playing
around with Puppy Linux (which is pretty cool too).

I may end up using one of those.  Wanted to see if there was a distro with
everything built into it already (Damn Small seems to have a lot of average
user apps and not really developer/small server type stuff)

Thanks for the suggestion though, Daniel.

(And yes, I top-post. Get the pitchforks!)

-TG

= = = Original message = = =

On 6/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
> Ok, done all my googling and experimenting, now I'm tossing it to you
guys.
>
> Can anyone recommend a small, no frills, LAMP-centric linux
package/distro?
>
> What I'm doing is setting up a test/development environment in a 
> VMWare
virtual machine to keep things all nice and comparmentalized.  It's going to
emulate (at least in PHP and MySQL version and configuration) my web host.
Ideally I'd like to keep using my traditional Windows apps to do
development, but save my work to a Samba share on the virtual machine (so
guess toss Samba into that too).
>
> Maybe there's better ways to do what I want, but now I'm discovered a
challenge that I'd like to overcome.
>
> I have something called "Grandma's LAMP", which is actually pretty cool.
It runs Xubuntu, which I dig, but still takes up 1.5gig (and is config'd for
a max of 10gb
> HD space).   It has the full GUI and everything installed.
>
> GUI is nice, but not 100% necessary.  AMP + Samba is good.  And I'm
transporting this all around on a 2GB thunbdrive (oh yeah, did I not mention
that?).
>
> If it was sans-GUI, I don't see why the whole thing couldn't be under
500MB.
>
> Thought maybe someone out there had seen a distro pack specifically 
> geared
for quick and dirty LAMP + Samba setup.
>
> -TG
>

Google for "DSL" (Damn Small Linux).

I've used that a few times myself.  Pretty cool.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php