php-general Digest 2 Aug 2007 07:44:12 -0000 Issue 4938

2007-08-02 Thread php-general-digest-help
php-general Digest 2 Aug 2007 07:44:12 - Issue 4938 Topics (messages 260021 through 260044): Re: Validating Email Conditional 260021 by: Jim Lucas 260022 by: Edward Kay 260035 by: Robin Vickery 260038 by: Davi 260042 by: Robin Vickery addSlashes

Re: [PHP] Validating Email Conditional

2007-08-02 Thread Robin Vickery
On 02/08/07, CK [EMAIL PROTECTED] wrote: Hi, Would you point out why? As I've tested a range of email address, and have not found one rejected that is formatted correctly. ok, here's a few perfectly valid email addresses off the top of my head. The first one's especially annoying as I use it

Re: [PHP] mail function

2007-08-02 Thread Siavash Miri
Check to see if you can send mail out of your server aside from the php script. Also, check the logs: error_log, maillog, messages to see what's wrong with the script or the mail function. I'm not sure if these logs exist on IIS or where they are. Siavash - Original Message - From:

[PHP] PHP and nCurses

2007-08-02 Thread Man-wai Chang
Anyone ever coded a full business app using PHP and nCurses? -- @~@ Might, Courage, Vision, SINCERITY. / v \ Simplicity is Beauty! May the Force and Farce be with you! /( _ )\ (Xubuntu 7.04) Linux 2.6.22.1 ^ ^ 15:43:01 up 21 days 17:47 2 users load average: 0.01 0.04 0.00

Re: [PHP] Question about passing date in sql...

2007-08-02 Thread Payne
Stut wrote: Michael Preslar wrote: I know it has to do with date='`date +%Y%m%d`', because if I remove it works. Are you trying to use perl's back tic operator in php here? PHP also supports the that. However, I think the OP's problem is that it's inside other quotes and is therefore not

Re: [PHP] Session Issues with Certain ISPs

2007-08-02 Thread Mark Tuma
Hi Richard, Sorry to have not responded for so long, and thanks for your views. It turns out the problem is browser based, at least in part. A windows PC with IE6 in our office could not get the site working right, whereas a linux laptop with firefox was fine with it. The immediate need is

Re: [PHP] Question about passing date in sql...

2007-08-02 Thread Payne
Payne wrote: Stut wrote: Michael Preslar wrote: I know it has to do with date='`date +%Y%m%d`', because if I remove it works. Are you trying to use perl's back tic operator in php here? PHP also supports the that. However, I think the OP's problem is that it's inside other quotes and is

Re: [PHP] mail function

2007-08-02 Thread Stut
Animesh Joshi wrote: I've installed IIS (Internet information services on my windows XP machine. I've also installed php 5.0 from www.php.net. I'm trying to use the mail() function in a simple php script which uses a html form. However, i'm not able to send the mail using the mail($to,

Re: [PHP] Includes eating up my time [SOLVED]

2007-08-02 Thread Dave M G
David, Thank you for responding. __autoload ... which basically only loads classes when they are required. Yes, this is exactly what I needed. Not only was I already on PHP5, but fortunately I had also already been building my classes so that it was one class per file, as __autoload

Re: [PHP] Loss of precision in intval()

2007-08-02 Thread Roberto Mansfield
Those numbers must fall on the other side of the number. E.g., 75.81 == 75.8100011 (etc) so you get the expected results. Mark Summers wrote: I like to think that I'm reasonably aware of the limitations of floating point (famous last words). To my mind, the ridiculousness (probably

[PHP] Setting group sticky bit on directory with chmod()

2007-08-02 Thread Ben Ramsey
I'm trying to set a sticky bit on a directory with chmod(). The same octal value works from the command prompt, but it doesn't appear to work correctly with the PHP function. Anyone have an idea as to why? PROMPT (works): $ chmod 2775 /path/to/dir PHP (doesn't work): chmod('/path/to/dir',

[PHP] Cut text from a string

2007-08-02 Thread Don Don
hi all, am trying to cut some texts from a serries of string values e.g. this is how we do (50 cents feat. the game) give it to me (nelly feat timerland) let me hold you (bow wow feat omarion) i want to cut off the text between the comas and i've seen some examples ? $string = Hello world,

RE: [PHP] Cut text from a string

2007-08-02 Thread Jay Blanchard
[snip] hi all, am trying to cut some texts from a serries of string values e.g. this is how we do (50 cents feat. the game) give it to me (nelly feat timerland) let me hold you (bow wow feat omarion) i want to cut off the text between the comas and i've seen some examples [/snip] Comas? Do you

Re: [PHP] Cut text from a string

2007-08-02 Thread Dan Shirah
Maybe I'm blind, but I don't see any commas in the text you are referring to. On 8/2/07, Don Don [EMAIL PROTECTED] wrote: hi all, am trying to cut some texts from a serries of string values e.g. this is how we do (50 cents feat. the game) give it to me (nelly feat timerland) let me hold

[PHP] How can I get a list of object vars?

2007-08-02 Thread js
Hi list. I'm trying to write a ORM in PHP. I want the ORM to have metadata mapping, which have a list of properties name and the value, without using any external file. (I like simple one, not want messy XML) I'm thinking PHP's reflective functions might help me to do that and treid

Re: [PHP] Setting group sticky bit on directory with chmod()

2007-08-02 Thread Daniel Brown
On 8/2/07, Ben Ramsey [EMAIL PROTECTED] wrote: I'm trying to set a sticky bit on a directory with chmod(). The same octal value works from the command prompt, but it doesn't appear to work correctly with the PHP function. Anyone have an idea as to why? PROMPT (works): $ chmod 2775

Re: [PHP] Cut text from a string

2007-08-02 Thread Daniel Brown
On 8/2/07, Dan Shirah [EMAIL PROTECTED] wrote: Maybe I'm blind, but I don't see any commas in the text you are referring to. On 8/2/07, Don Don [EMAIL PROTECTED] wrote: hi all, am trying to cut some texts from a serries of string values e.g. this is how we do (50 cents feat. the game)

Re: [PHP] Setting group sticky bit on directory with chmod()

2007-08-02 Thread Ben Ramsey
On 8/2/07 10:57 AM, Daniel Brown wrote: On 8/2/07, Ben Ramsey [EMAIL PROTECTED] wrote: PHP (doesn't work): chmod('/path/to/dir', 02775); We've tested the PHP code on files, and it works, but it doesn't work on directories. Drop the preceding 0 from the chmod() function parameters.

Re: [PHP] Setting group sticky bit on directory with chmod()

2007-08-02 Thread Ben Ramsey
On 8/2/07 10:57 AM, Daniel Brown wrote: On 8/2/07, Ben Ramsey [EMAIL PROTECTED] wrote: PHP (doesn't work): chmod('/path/to/dir', 02775); We've tested the PHP code on files, and it works, but it doesn't work on directories. Drop the preceding 0 from the chmod() function parameters.

Re: [PHP] Setting group sticky bit on directory with chmod()

2007-08-02 Thread Ben Ramsey
On 8/2/07 11:45 AM, Tijnema wrote: On 8/2/07, Ben Ramsey [EMAIL PROTECTED] wrote: So, what are we doing wrong with chmod() that is causing us to get the wrong results? Keep in mind that we are running the PHP script as the same user who owns the directory. Who is the owner of the directory

[PHP] Does PDO prevent class functions from calling other class functions?

2007-08-02 Thread Ken Tozier
Hi I've been writing PHP classes for around two years now but all of a sudden, the things I used to do don't work any more. I have a class that implements utility functions for database calls using PDO and am finding that I can't call one utility function from within another. If each

Re: [PHP] Setting group sticky bit on directory with chmod()

2007-08-02 Thread Ben Ramsey
On 8/2/07 10:57 AM, Daniel Brown wrote: On 8/2/07, Ben Ramsey [EMAIL PROTECTED] wrote: PHP (doesn't work): chmod('/path/to/dir', 02775); We've tested the PHP code on files, and it works, but it doesn't work on directories. Drop the preceding 0 from the chmod() function parameters.

Re: [PHP] Setting group sticky bit on directory with chmod()

2007-08-02 Thread Tijnema
On 8/2/07, Ben Ramsey [EMAIL PROTECTED] wrote: On 8/2/07 10:57 AM, Daniel Brown wrote: On 8/2/07, Ben Ramsey [EMAIL PROTECTED] wrote: PHP (doesn't work): chmod('/path/to/dir', 02775); We've tested the PHP code on files, and it works, but it doesn't work on directories. Drop

Re: [PHP] Does PDO prevent class functions from calling other class functions?

2007-08-02 Thread Nathan Nobbe
On 8/2/07, Ken Tozier [EMAIL PROTECTED] wrote: I have a class that implements utility functions for database calls using PDO and am finding that I can't call one utility function from within another. can you supply an error or warning that php is giving ? it would help to determine the

Re: [PHP] How can I get a list of object vars?

2007-08-02 Thread Robin Vickery
On 02/08/07, js [EMAIL PROTECTED] wrote: Hi list. I'm trying to write a ORM in PHP. I want the ORM to have metadata mapping, which have a list of properties name and the value, without using any external file. (I like simple one, not want messy XML) I'm thinking PHP's reflective

Re: [PHP] Does PDO prevent class functions from calling other class functions?

2007-08-02 Thread Ken Tozier
On Aug 2, 2007, at 12:03 PM, Nathan Nobbe wrote: can you supply an error or warning that php is giving ? it would help to determine the problem. How would I go about that? I just took a quick look at the try/catch documentation and it looks like it's my responsibility to throw exceptions

Re: [PHP] How can I get a list of object vars?

2007-08-02 Thread Nathan Nobbe
On 8/2/07, js [EMAIL PROTECTED] wrote: you may need to work with the reflective functions for a while to get them down. if you want to see some usage of them, check out PHPUnithttp://www.phpunit.de/ . Robin Vickery wrote: $properties = (array) $myObject; no? no, thats why there are

Re: [PHP] Does PDO prevent class functions from calling other class functions?

2007-08-02 Thread Nathan Nobbe
On 8/2/07, Ken Tozier [EMAIL PROTECTED] wrote: How would I go about that? I just took a quick look at the try/catch documentation and it looks like it's my responsibility to throw exceptions which isn't particularly useful if it's PHP itself that is doing something unexpected well, youre

[PHP] Which PHP-Editor to use?

2007-08-02 Thread Merlin
Hi there, I have worked now for several years happily with homesite 4.5, but now it looks like I have to switch to another system as homesite will not run without admin rights on a XP machine. What editors do you use? Do you have any recomendations on a special one? I have looked into

RE: [PHP] Setting group sticky bit on directory with chmod()

2007-08-02 Thread Ford, Mike
On 02 August 2007 15:58, Daniel Brown wrote: On 8/2/07, Ben Ramsey [EMAIL PROTECTED] wrote: I'm trying to set a sticky bit on a directory with chmod(). The same octal value works from the command prompt, but it doesn't appear to work correctly with the PHP function. Anyone have an idea as

RE: [PHP] Which PHP-Editor to use?

2007-08-02 Thread Chris Boget
I have worked now for several years happily with homesite 4.5, but now it looks like I have to switch to another system as homesite will not run without admin rights on a XP machine. What editors do you use? I used Homesite for the longest time until I was introduced to Visual Slick

Re: [PHP] Setting group sticky bit on directory with chmod()

2007-08-02 Thread Daniel Brown
Well, you're pleasant today, Mike. On 8/2/07, Ford, Mike [EMAIL PROTECTED] wrote: On 02 August 2007 15:58, Daniel Brown wrote: On 8/2/07, Ben Ramsey [EMAIL PROTECTED] wrote: I'm trying to set a sticky bit on a directory with chmod(). The same octal value works from the command

Re: [PHP] Which PHP-Editor to use?

2007-08-02 Thread Nathan Nobbe
eclipse with php eclipse, but i may be switching to eclipse pdt once it becomes stable if there is no support for xdebug in php eclipse when it does. -nathan On 8/2/07, Merlin [EMAIL PROTECTED] wrote: Hi there, I have worked now for several years happily with homesite 4.5, but now it looks

Re: [PHP] Which PHP-Editor to use?

2007-08-02 Thread tg-php
The age old question... is it that time of the year again already? Some reviews and lists: http://www.php-editors.com/ I've used Zend Studio for years, and really like it, but lately I've gotten tired of the java virtual machine seeming to hog tons of system resources. I've also used Crimson

RE: [PHP] Which PHP-Editor to use?

2007-08-02 Thread Sanjeev N
Hi, I have used both Editplus and Macromedia dreamweaver. If you want to see the visual the elements then dreamweaver is best. If you only want the coding environment the I also suggest you to use editplus Warm Regards, Sanjeev http://www.sanchanworld.com/ http://webdirectory.sanchanworld.com

Re: [PHP] Does PDO prevent class functions from calling other class functions?

2007-08-02 Thread Ken Tozier
On Aug 2, 2007, at 12:19 PM, Nathan Nobbe wrote: On 8/2/07, Ken Tozier [EMAIL PROTECTED] wrote: How would I go about that? I just took a quick look at the try/catch documentation and it looks like it's my responsibility to throw exceptions which isn't particularly useful if it's PHP itself

Re: [PHP] Does PDO prevent class functions from calling other class functions?

2007-08-02 Thread Ken Tozier
On Aug 2, 2007, at 12:15 PM, Andrew Ballard wrote: Ken, Your method name is site_for_pub, and you are trying to call site_for_pub_id. I am indeed. What a bonehead. Thanks Andrew that fixed it. Ken -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Which PHP-Editor to use?

2007-08-02 Thread Tom Ray [Lists]
Merlin wrote: Hi there, I have worked now for several years happily with homesite 4.5, but now it looks like I have to switch to another system as homesite will not run without admin rights on a XP machine. What editors do you use? Do you have any recomendations on a special one? I have

Re: [PHP] Does PDO prevent class functions from calling other class functions?

2007-08-02 Thread Andrew Ballard
Ken, Your method name is site_for_pub, and you are trying to call site_for_pub_id. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Which PHP-Editor to use?

2007-08-02 Thread Robert Cummings
On Thu, 2007-08-02 at 13:36 -0400, [EMAIL PROTECTED] wrote: -Original Message- From: Merlin [mailto:[EMAIL PROTECTED] Sent: Thursday, August 02, 2007 12:13 PM To: php-general@lists.php.net Subject: [PHP] Which PHP-Editor to use? Hi there, I have worked now for several years

Re: [PHP] Which PHP-Editor to use?

2007-08-02 Thread Richard Heyes
I have worked now for several years happily with homesite 4.5, but now it looks like I have to switch to another system as homesite will not run without admin rights on a XP machine. What editors do you use? Do you have any recomendations on a special one? I have looked into eclipse, but I

RE: [PHP] Which PHP-Editor to use?

2007-08-02 Thread djnecrogami
-Original Message- From: Merlin [mailto:[EMAIL PROTECTED] Sent: Thursday, August 02, 2007 12:13 PM To: php-general@lists.php.net Subject: [PHP] Which PHP-Editor to use? Hi there, I have worked now for several years happily with homesite 4.5, but now it looks like I have to switch to

Re: [PHP] Cut text from a string

2007-08-02 Thread tedd
At 11:07 AM -0400 8/2/07, Daniel Brown wrote: To remove the text between the comas would be a great feat, especially if you're still groggy from waking up from the first one. LOL! Thanks for the code. Next time I have a coma, I'll use it. Cheers, tedd -- --- http://sperling.com

[PHP] PDO::ATTR_TIMEOUT script specific?

2007-08-02 Thread Ken Tozier
Hi I have a script that needs to get ad information from two different sources, a primary and fallback. The primary source is a high traffic (and poorly designed/unpartitioned MSSQL database) with millions of records that gets locked up when 'certain folks' (ie executives) perform large

Re: [PHP] Does PDO prevent class functions from calling other class functions?

2007-08-02 Thread Andrew Ballard
It's usually the obvious things that get you -- especially after you've been staring at the same piece of code for any length of time. :) Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Numbers, Numbers everywhere! Need some Dollar help.

2007-08-02 Thread Dan Shirah
Greetins all, In my form I have an area where the user enters in the payment amount: input type=Text value= size=20 maxlength=16 name=payment_amount This is all fine and dandy and works as generically as it can. BUT, the problem is that I need to make sure the user didn't fat finger any of the

Re: [PHP] Numbers, Numbers everywhere! Need some Dollar help.

2007-08-02 Thread Brad Bonkoski
Dan Shirah wrote: Greetins all, In my form I have an area where the user enters in the payment amount: input type=Text value= size=20 maxlength=16 name=payment_amount This is all fine and dandy and works as generically as it can. BUT, the problem is that I need to make sure the user didn't

Re: [PHP] Numbers, Numbers everywhere! Need some Dollar help.

2007-08-02 Thread Daniel Brown
On 8/2/07, Dan Shirah [EMAIL PROTECTED] wrote: Greetins all, In my form I have an area where the user enters in the payment amount: input type=Text value= size=20 maxlength=16 name=payment_amount This is all fine and dandy and works as generically as it can. BUT, the problem is that I need

Re: [PHP] Numbers, Numbers everywhere! Need some Dollar help.

2007-08-02 Thread Eric Butera
On 8/2/07, Dan Shirah [EMAIL PROTECTED] wrote: Greetins all, In my form I have an area where the user enters in the payment amount: input type=Text value= size=20 maxlength=16 name=payment_amount This is all fine and dandy and works as generically as it can. BUT, the problem is that I need

Re: [PHP] Numbers, Numbers everywhere! Need some Dollar help.

2007-08-02 Thread David Giragosian
On 8/2/07, Brad Bonkoski [EMAIL PROTECTED] wrote: Dan Shirah wrote: Greetins all, In my form I have an area where the user enters in the payment amount: input type=Text value= size=20 maxlength=16 name=payment_amount This is all fine and dandy and works as generically as it can.

Re: [PHP] Cut text from a string

2007-08-02 Thread Don Don
I meant i want to get rid of the braces. e.g. get the text up to the start of the first brace and ignore anything from the first brace onwards Dan Shirah [EMAIL PROTECTED] wrote: Maybe I'm blind, but I don't see any commas in the text you are referring to. On 8/2/07, Don Don wrote: hi all,

[PHP] Separation of Roles; with Salaries

2007-08-02 Thread Instruct ICC
Finally I have the green light to get some separation of roles/duties. First there was just me. Web Programmer, yet all web related hats. Then there was the Server Administrator, and me, the Web Developer (sort of like peers). Although the admin doesn't like to change the server settings

Re: [PHP] Cut text from a string

2007-08-02 Thread Daniel Brown
On 8/2/07, Don Don [EMAIL PROTECTED] wrote: I meant i want to get rid of the braces. e.g. get the text up to the start of the first brace and ignore anything from the first brace onwards Dan Shirah [EMAIL PROTECTED] wrote: Maybe I'm blind, but I don't see any commas in the text you are

[PHP] Re: Which PHP-Editor to use?

2007-08-02 Thread Al
phpEdit http://www.waterproof.fr/products/PHPEdit/ Merlin wrote: Hi there, I have worked now for several years happily with homesite 4.5, but now it looks like I have to switch to another system as homesite will not run without admin rights on a XP machine. What editors do you use? Do you

RE: [PHP] Re: Which PHP-Editor to use?

2007-08-02 Thread Chris Aitken
/) To unsubscribe, visit: http://www.php.net/unsub.php __ NOD32 2433 (20070802) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] php install problem

2007-08-02 Thread David McDivitt
I hate to ask a simple question, but I have two issues installing PHP. I have XP SP 2 with IIS. When I ran the install php-5.2.3-win32-installer.msi, it said it could not access httpd.config and I would have to configure the web server manually. I could not find anything on the internet

Re: [PHP] Numbers, Numbers everywhere! Need some Dollar help.

2007-08-02 Thread Tijnema
On 8/2/07, Brad Bonkoski [EMAIL PROTECTED] wrote: Dan Shirah wrote: Greetins all, In my form I have an area where the user enters in the payment amount: input type=Text value= size=20 maxlength=16 name=payment_amount This is all fine and dandy and works as generically as it can.

Re: [PHP] [pcre] backreferences to all matches of a repeated subexpression

2007-08-02 Thread Steffen Ebermann
On Wed, Aug 01, 2007 at 08:05:09PM -0700, Jack Bates wrote: I'm not sure how to get an array of all subexpression matches, in the order matches appear in the subject, instead of the order expressions appear in the pattern. This problem gave me a headache. My only idea is to use preg_split()

Re: [PHP] Cut text from a string

2007-08-02 Thread Crash Dummy
I meant i want to get rid of the braces. e.g. get the text up to the start of the first brace and ignore anything from the first brace onwards I don't see any braces, either. For the record: brace = {} bracket = [] parentheses = () comma = , semicolon = ; To extract the partial string leading

Re: [PHP] Which PHP-Editor to use?

2007-08-02 Thread Tijnema
On 8/2/07, Merlin [EMAIL PROTECTED] wrote: Hi there, I have worked now for several years happily with homesite 4.5, but now it looks like I have to switch to another system as homesite will not run without admin rights on a XP machine. What editors do you use? Do you have any recomendations

Re: [PHP] How can I get a list of object vars?

2007-08-02 Thread js
Thank you, it worked, but it contains some dust. Is it possible to remove the dust? ?php class Obj { private $priv; public $pub; protected $prot = 'foo'; } $obj = new Obj(); $obj-more_var = 'val'; foreach ((array)$obj as $k = $v) echo $k = $v\n; ? -- PHP General Mailing List

Re: [PHP] Numbers, Numbers everywhere! Need some Dollar help.

2007-08-02 Thread M. Sokolewicz
Tijnema wrote: On 8/2/07, Brad Bonkoski [EMAIL PROTECTED] wrote: Dan Shirah wrote: Greetins all, In my form I have an area where the user enters in the payment amount: input type=Text value= size=20 maxlength=16 name=payment_amount This is all fine and dandy and works as generically as it

[PHP] About PHP/MYSQL Pagination

2007-08-02 Thread Kelvin Park
I just couldn't find it anywhere, google or yahoo. I know how to make first, previous, last, and next links for php/mysql pagination. How do you list page numbers in the middle, between previous and next? (ex. first previous | 1 2 3 4 5 | next last ) I know how to display them from 1 to

[PHP] Re: About PHP/MYSQL Pagination

2007-08-02 Thread Kelvin Park
Kelvin Park wrote: I just couldn't find it anywhere, google or yahoo. I know how to make first, previous, last, and next links for php/mysql pagination. How do you list page numbers in the middle, between previous and next? (ex. first previous | 1 2 3 4 5 | next last ) I know how to

Re: [PHP] How can I get a list of object vars?

2007-08-02 Thread Nathan Nobbe
i think you misunderstood me; i was recommending you NOT use the array cast of an object to accomplish your task. rather, i would advise you spend time learning the reflection API because its designed for retrieval of information about classes and functions, etc.. apparently the array cast method

[PHP] UTF-8 support

2007-08-02 Thread Naz Gassiep
The functions trim() and explode() appear to be munging multibyte UTF-8 strings. I can't find multibyte safe versions of them in the manual, do they exist, or do I have to make my own? - Naz. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Which PHP-Editor to use?

2007-08-02 Thread Naz Gassiep
Merlin wrote: Hi there, I have worked now for several years happily with homesite 4.5, but now it looks like I have to switch to another system as homesite will not run without admin rights on a XP machine. What editors do you use? Do you have any recomendations on a special one? I have