php-general Digest 17 Jun 2007 13:13:17 -0000 Issue 4853

2007-06-17 Thread php-general-digest-help
php-general Digest 17 Jun 2007 13:13:17 - Issue 4853 Topics (messages 257191 through 257211): php framework, large site 257191 by: martins $_SERVER['HTTP_ACCEPT_ENCODING'] unavailable 257192 by: Vlad Vlasceanu I have a problem with nobody! 257193 by: BSumrall

[PHP] Re: Previous and Next Month and Year

2007-06-17 Thread Vlad Vlasceanu
time() returns a unix timestamp of the current moment in time (now), so in effect you are adding or subtracting 6 seconds to that. calling: date('m/d/Y', time()); is the same as calling: date('m/d/Y'); On the other hand: mktime(hour, minute, second, month, day, year) generates a timestamp such

Re: [PHP] Re: Previous and Next Month and Year

2007-06-17 Thread Keith Spiller
Hi Vlad, Thank you for taking the time to help me. The code: $prev_month = date('F Y', mktime(0, 0, 0, 0, date('m') - 6, date('Y'))); $next_month = date('F Y', mktime(0, 0, 0, 0, date('m') + 6, date('Y'))); echo $prev_month br / \n; echo $next_month br / \n; Generates: November 2006

Re: [PHP] Previous and Next Month and Year

2007-06-17 Thread Tom Rogers
Hi, Sunday, June 17, 2007, 3:54:01 PM, you wrote: KS Hi, KS RE: Previous and Next Month and Year KS This is my code: KS $next_month = date('F Y', time()+$month); KS $prev_month = date('F Y', time()-$month); KS echo $prev_month br / \n; #Result June 2007 KS echo $next_month br /

Re: [PHP] I have a problem with nobody! SOLVED!

2007-06-17 Thread Stut
BSumrall wrote: The last paragraph of the page Go figure! The appropriate code is; mail ($to, $subject, $message, $header = 'From: Larry, Curly and Moe [EMAIL PROTECTED]'); The final parameter is important and should also be included. It sets the envelope sender which is the address

Re: [PHP] Previous and Next Month and Year

2007-06-17 Thread Larry Garfield
I generally use strtotime() as the swiss army knife of PHP date handling. You give it a string and a timestamp to use as a base, and it gives you back a new timestamp. So you can say: strtotime(+6 months, $sometimestamp); And it will give you back the time stamp six months after

RE: [PHP] I have a problem with nobody! SOLVED!

2007-06-17 Thread tedd
The last paragraph of the page Go figure! The appropriate code is; mail ($to, $subject, $message, $header = 'From: Larry, Curly and Moe [EMAIL PROTECTED]'); Brad: Don't forget to add the content. mail($to, $subject, $headers, $body); And you can also add Reply-to: Such as: $headers

Re: [PHP] I have a problem with nobody! SOLVED!

2007-06-17 Thread Stut
tedd wrote: The last paragraph of the page Go figure! The appropriate code is; mail ($to, $subject, $message, $header = 'From: Larry, Curly and Moe [EMAIL PROTECTED]'); Brad: Don't forget to add the content. mail($to, $subject, $headers, $body); Headers and body should be the

[PHP] New htmlentities() '$double_enocde' Param Question

2007-06-17 Thread Chris
I just need a clarification about the new $double_encode param for htmlentities() and htmlspecialchars(). Is it supposed to do as I expect it to do in the code below or am I misuderstanding its use? // Output: lt; echo htmlentities('', ENT_QUOTES, false); // Expected Output: lt; // Actual

Re: [PHP] I have a problem with nobody! SOLVED!

2007-06-17 Thread Robert Cummings
On Sun, 2007-06-17 at 12:56 +0100, Stut wrote: tedd wrote: $headers ='From: Larry, Curly and Moe[EMAIL PROTECTED]')\n; $headers .= 'Reply-to: Moe[EMAIL PROTECTED]' \n; Strictly speaking, those line endings should be \r\n. While I agree with you that it should be \r\n, I've found I get

Re: [PHP] create file permission problem (solved)

2007-06-17 Thread Daniel Brown
On 6/15/07, tedd [EMAIL PROTECTED] wrote: At 6:56 PM -0400 6/15/07, Daniel Brown wrote: I don't think it's PAM-compliant to use a single-quote character in your passwords, Tedd. ;-P -- Daniel P. Brown Daniel: Bzzzet, thanks for trying. Let me explain again, maybe I did explain myself

Re: Re[6]: [PHP] Need a more elegant way of bitwise ORing values

2007-06-17 Thread Robin Vickery
On 13/06/07, Richard Davey [EMAIL PROTECTED] wrote: Hi Robert, Wednesday, June 13, 2007, 3:15:39 PM, you wrote: It's terribly verbose and inefficient... ?php $filter['flags'] = 0; if( $allow_fraction ) { $filter['flags'] |= FILTER_FLAG_ALLOW_FRACTION; } if( $allow_thousand ) {

[PHP] Re: php framework, large site

2007-06-17 Thread itoctopus
cakephp is not bad, why write your own? -- itoctopus - http://www.itoctopus.com martins [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi, can some body help me, how to start php framwork for large site? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Are IP addresses reliable?

2007-06-17 Thread Daniel Brown
On 6/16/07, william(at)elan.net [EMAIL PROTECTED] wrote: On Sat, 16 Jun 2007, PHP Developer wrote: I wanna know that is there a way to forge someone's IP address? for example, I have a client with an static ip address, and she is a superuser. Can i rely on her IP address? or somebody else

[PHP] Basic Encoding Rules (BER)

2007-06-17 Thread Elier
Hi guys, I'm searching for a implementation of Basic Encoding Rules (BER) in PHP but I can't find anything .. This encodign is required in the RFC 2696 - LDAP Control Extension for Simple Paged Results Manipulation Any idea ? Best Regards, Elier -- PHP General Mailing List

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

2007-06-17 Thread Robert Cummings
On Sun, 2007-06-17 at 12:04 -0400, itoctopus wrote: cakephp is not bad, why write your own? Why not write your own? Good reasons to write your own: 1. gain experience from doing 2. a solution that exactly fits your needs 3. 100% license control 4. it's fun Cheers, Rob. --

Re: [PHP] Basic Encoding Rules (BER)

2007-06-17 Thread Tijnema
On 6/17/07, Elier [EMAIL PROTECTED] wrote: Hi guys, I'm searching for a implementation of Basic Encoding Rules (BER) in PHP but I can't find anything .. This encodign is required in the RFC 2696 - LDAP Control Extension for Simple Paged Results Manipulation Any idea ? Best Regards, Elier

Re: [PHP] Re: Previous and Next Month and Year

2007-06-17 Thread Myron Turner
Keith Spiller wrote: Hi Vlad, Thank you for taking the time to help me. The code: $prev_month = date('F Y', mktime(0, 0, 0, 0, date('m') - 6, date('Y'))); $next_month = date('F Y', mktime(0, 0, 0, 0, date('m') + 6, date('Y'))); echo $prev_month br / \n; echo $next_month br / \n;

[PHP] Php script diagnostic app?

2007-06-17 Thread MIKE YRABEDRA
I was wondering if there was some kind of application that would process a php script, logging any functions (or classes) it encounters along the way. Logging times and memory use. I am trying to figure out what in a script slows it down so much. Any ideas? -- Mike Yrabedra B^) -- PHP

[PHP] if test

2007-06-17 Thread jekillen
Hello again; does the following test pass if the file is successfully included: if( include( some file ) ) or does it pass with: if( ! include( some file ) ) Thanks JK -- 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-17 Thread Crayon Shin Chan
On Monday 18 June 2007 00:12, Robert Cummings wrote: Good reasons to write your own: It's an extremely inefficient use of precious time. Inventing the wheel over and over. Surely out of the billions of half-baked to fully-baked frameworks out there must be something suitable for everyone. How

Re: [PHP] Php script diagnostic app?

2007-06-17 Thread Robert Cummings
On Sun, 2007-06-17 at 13:35 -0400, MIKE YRABEDRA wrote: I was wondering if there was some kind of application that would process a php script, logging any functions (or classes) it encounters along the way. Logging times and memory use. I am trying to figure out what in a script slows it

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

2007-06-17 Thread Brian Seymour
Depends, is time a factor. If not, why not write your own framework. Brian Seymour AeroCoreProductions http://www.aerocore.net/ -Original Message- From: Crayon Shin Chan [mailto:[EMAIL PROTECTED] Sent: Sunday, June 17, 2007 1:53 PM To: php-general@lists.php.net Subject: Re: [PHP] Re: php

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

2007-06-17 Thread Robert Cummings
On Mon, 2007-06-18 at 01:52 +0800, Crayon Shin Chan wrote: On Monday 18 June 2007 00:12, Robert Cummings wrote: Good reasons to write your own: It's an extremely inefficient use of precious time. Inventing the wheel over and over. Surely out of the billions of half-baked to fully-baked

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

2007-06-17 Thread Crayon Shin Chan
On Monday 18 June 2007 02:12, Robert Cummings wrote: Why not? You're argument is invalid. You're == You are, which makes the above invalid, or at least nonsensical. It suggests that since solutions already exist to a problem that we should lie down and leave things as they are. Progress,

[PHP] unlink before imagepng?

2007-06-17 Thread Brian Dunning
If I write an edited image back to disk using imagepng, is it desirable to first unlink the existing image? I notice that it works fine if I don't. Just wondering if there are any pros or cons. - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] OK to have many files in one folder?

2007-06-17 Thread Brian Dunning
For everyone who advised me to beware the inode, allow me to forward what the Rackspace admins told me. This is Greek to me, and I'm hoping one of you can translate. All I understood was where he said I appear to have more than enough. Yes? ---snip--- All of your slices on the disk are

Re: [PHP] if test

2007-06-17 Thread Jochem Maas
jekillen wrote: Hello again; does the following test pass if the file is successfully included: if( include( some file ) ) or does it pass with: if( ! include( some file ) ) have you tried it? Thanks JK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] pack vs. serialize

2007-06-17 Thread Nathan Nobbe
all, i have recently stumbled upon the packhttp://www.php.net/manual/en/function.pack.phpmethod. can this be used as a substitute for serializehttp://www.php.net/manual/en/function.serialize.php ? if so, is there any rationalization for this; like would it perhaps create a more compact

Re: [PHP] OK to have many files in one folder?

2007-06-17 Thread Tijnema
On 6/17/07, Brian Dunning [EMAIL PROTECTED] wrote: For everyone who advised me to beware the inode, allow me to forward what the Rackspace admins told me. This is Greek to me, and I'm hoping one of you can translate. All I understood was where he said I appear to have more than enough. Yes?

Re: Re[6]: [PHP] Need a more elegant way of bitwise ORing values

2007-06-17 Thread Nathan Nobbe
admittedly i had to read up quickly on the usage of a *binary pattern*where each bit in said *pattern* is used to represent the state of some boolean variable. wikipedia sufficed http://en.wikipedia.org/wiki/Bitwise_operation#OR this makes much more sense to me now; as ive seen this technique

Re: [PHP] Need a more elegant way of bitwise ORing values

2007-06-17 Thread Nathan Nobbe
admittedly i had to read up quickly on the usage of a *binary pattern* where each bit in said* pattern* is used to represent the state of some boolean variable. wikipedia sufficed http://en.wikipedia.org/wiki/Bitwise_operation#OR this makes much more sense to me now; as ive seen this technique

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

2007-06-17 Thread Robert Cummings
On Mon, 2007-06-18 at 02:55 +0800, Crayon Shin Chan wrote: On Monday 18 June 2007 02:12, Robert Cummings wrote: Why not? You're argument is invalid. You're == You are, which makes the above invalid, or at least nonsensical. Typo... *yawn*. You knew what was intended. Feel free to

Re: [PHP] if test

2007-06-17 Thread Stut
Jochem Maas wrote: jekillen wrote: Hello again; does the following test pass if the file is successfully included: if( include( some file ) ) or does it pass with: if( ! include( some file ) ) have you tried it? Or, better yet, looked in the manual? http://php.net/include -Stut --

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

2007-06-17 Thread Nathan Nobbe
the best part about re-inventing the wheel is, once youve re-invented it; its yours! time is precious yes; but what happens when you get along using some lib and you cant get it to do what you want? you start writing weak code because you never learned how to write good code in the first place,

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

2007-06-17 Thread martins
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

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

2007-06-17 Thread Larry Garfield
On Sunday 17 June 2007, martins wrote: 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. Three of those are

Re: [PHP] Php script diagnostic app?

2007-06-17 Thread Daniel Brown
On 6/17/07, Robert Cummings [EMAIL PROTECTED] wrote: On Sun, 2007-06-17 at 13:35 -0400, MIKE YRABEDRA wrote: I was wondering if there was some kind of application that would process a php script, logging any functions (or classes) it encounters along the way. Logging times and memory use.

[PHP] Re: pack vs. serialize

2007-06-17 Thread Abdullah Ramazanoglu
Nathan Nobbe dedi ki: all, i have recently stumbled upon the packhttp://www.php.net/manual/en/function.pack.phpmethod. can this be used as a substitute for serializehttp://www.php.net/manual/en/function.serialize.php ? if so, is there any rationalization for this; like would it perhaps

[PHP] possible to move_uploaded_file to a variable instead a file?

2007-06-17 Thread Mark
hey, i`m wondering if it`s possible to move a uploaded file inside a variable. i would like to know this because i`m currently writing a database backup script and in there the user uploads a sql file that gets executed. now i _don`t_ want the file to be stored on the server!! simply because

Re: [PHP] possible to move_uploaded_file to a variable instead a file?

2007-06-17 Thread Larry Garfield
I believe you can just fopen() and friends the file directly out of /tmp, or wherever the file gets put. Just read the file itself into a string and have your way with it. PHP will delete the temp file for you when the script ends. On Sunday 17 June 2007, Mark wrote: hey, i`m wondering if

[PHP] Re: possible to move_uploaded_file to a variable instead a file?

2007-06-17 Thread Gregory Beaver
Mark wrote: hey, i`m wondering if it`s possible to move a uploaded file inside a variable. i would like to know this because i`m currently writing a database backup script and in there the user uploads a sql file that gets executed. now i _don`t_ want the file to be stored on the server!!

[PHP] Unable to use exec() in php

2007-06-17 Thread makhan
Hi I am using exec() funtions to run simple commands like exec('date') in php without any success. I am using apache on my windows system. Can someno guid me what could be wrong. I have checked the php.ini file and its not in the safe mode. -- View this message in context:

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

2007-06-17 Thread Robert Cummings
On Sun, 2007-06-17 at 17:26 -0500, Larry Garfield wrote: On Sunday 17 June 2007, martins wrote: 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

[PHP] Controlling project version

2007-06-17 Thread Miguel Vaz
Hi, I recently finished a project for our local city hall and some people asked me to do some version control for future updates. They suggested the use of a linux script called Recursive Version Control, which i never even heard anything about. What do you guys/girls use out

Re: [PHP] Unable to use exec() in php

2007-06-17 Thread Jim Lucas
makhan wrote: Hi I am using exec() funtions to run simple commands like exec('date') in php without any success. I am using apache on my windows system. Can someno guid me what could be wrong. I have checked the php.ini file and its not in the safe mode. without any success What exactly

Re: [PHP] Controlling project version

2007-06-17 Thread Larry Garfield
Never heard of RVC. I use subversion both at work and for my personal stuff. Fairly easy to setup once you understand it, fairly easy to use, good command line and GUI tools to suit your preference. On Sunday 17 June 2007, Miguel Vaz wrote: Hi, I recently finished a project for

Re: [PHP] Controlling project version

2007-06-17 Thread Jim Lucas
Miguel Vaz wrote: Hi, I recently finished a project for our local city hall and some people asked me to do some version control for future updates. They suggested the use of a linux script called Recursive Version Control, which i never even heard anything about. What do you

Re: [PHP] Controlling project version

2007-06-17 Thread Chris
Miguel Vaz wrote: Hi, I recently finished a project for our local city hall and some people asked me to do some version control for future updates. They suggested the use of a linux script called Recursive Version Control, which i never even heard anything about. Sure you don't

Re: [PHP] Php script diagnostic app?

2007-06-17 Thread Paul Scott
On Sun, 2007-06-17 at 13:53 -0400, Robert Cummings wrote: I believe there are profiling tools... probably from Zend. How big is I prefer using XDEBUG, which is totally free. You can install it from the pecl repositories: pecl install xdebug Then, you simply install it as an extension on your

Re: [PHP] Unable to use exec() in php

2007-06-17 Thread makhan
Thanks jim for your reponse , from no success means I am not able to get any output. I am also using shell_exec('matlab -r myscript') to run my matlab script. I see a new matlab.exe process starting in the windows task manager. And the browser keeps busy trying to open this php page. I have

Re: [PHP] Php script diagnostic app?

2007-06-17 Thread Paul Scott
On Mon, 2007-06-18 at 06:39 +0200, Paul Scott wrote: If you would like a more detailed HOWTO, please let me know, and I will write up something for you. http://fsiu.uwc.ac.za/index.php?module=blogaction=viewsinglepostid=gen9Srv59Nme5_9262_1182142431userid=3897070607 --Paul All Email