php-general Digest 27 Aug 2009 08:42:01 -0000 Issue 6308

2009-08-27 Thread php-general-digest-help
php-general Digest 27 Aug 2009 08:42:01 - Issue 6308 Topics (messages 297329 through 297339): Re: unset() something that doesn't exist 297329 by: Stuart 297339 by: Peter Ford Re: parse_ini_file problem 297330 by: Jim Lucas Re: What if this code is right ? It worked

Re: [PHP] Can't find the server path when, in http.conf, using Alias and DirectoryIndex

2009-08-27 Thread Torben Wilson
2009/8/26 Paul Gardiner li...@glidos.net: Paul Gardiner wrote: I want to write a simple indexing script to display a directory full of photos as a gallery of thumbnails. (There are various solutions out there for this, but they're all a bit more complicated than I need). I've added a file

[PHP] user permissions

2009-08-27 Thread John
Hi, What is the best way to assign permissions to users? a) Each user has a list of permissions associated with that user or b) Each task/permission has a list of users that qualify or c) Have a table with a row for each user/permission combination Thanks! John --

Re: [PHP] user permissions

2009-08-27 Thread Robyn Overstreet
This is where binary is actually helpful. You can store each task/permission as a bit, ie, as a yes or no piece of data. For example: read, write, edit, moderate ... a user with read/write permissions only would be represented by: 1100, which in decimal is 12. So in effect, you're storing 4

Re: [PHP] Can't find the server path when, in http.conf, using Alias and DirectoryIndex

2009-08-27 Thread Paul Gardiner
Torben Wilson wrote: 2009/8/26 Paul Gardiner li...@glidos.net: Paul Gardiner wrote: I want to write a simple indexing script to display a directory full of photos as a gallery of thumbnails. (There are various solutions out there for this, but they're all a bit more complicated than I need).

Re: [PHP] Can't find the server path when, in http.conf, using Alias and DirectoryIndex

2009-08-27 Thread Torben Wilson
2009/8/27 Paul Gardiner li...@glidos.net: Torben Wilson wrote: 2009/8/26 Paul Gardiner li...@glidos.net: Paul Gardiner wrote: I want to write a simple indexing script to display a directory full of photos as a gallery of thumbnails. (There are various solutions out there for this, but

Re: [PHP] Re: unset() something that doesn't exist

2009-08-27 Thread Peter Ford
Stuart wrote: (among other things) If you ask me you are essentially describing engineers (or doers) as idiots and salespeople as morons. I won't debate the labels but unfortunately it's a fact of life that most management types in this world are ex-sales because they're the ones who know how

[PHP] Re: parse_ini_file problem

2009-08-27 Thread Ralph Deffke
Is it that some code, creating this error u talking about, is reading the init file? I would guess so, to me it looks like if u open the file dirctly the scrupt is suppost to die. that seems like a little funny protection not no show the init parameters. if thats the case u got to send the code

Re: [PHP] parse_ini_file problem

2009-08-27 Thread Stuart
2009/8/26 Richard H Lee rich...@webdezign.co.uk: Hi all, I think I'm having a problem with parse_ini_file in php. I am using wamp on two machines. I'm installing a Digishop e-commerce package. The blah.ini.php file starts with ?php die ? [SOMETITLE] some_setting=Ok, I

Re: [PHP] Exclusive File Access

2009-08-27 Thread Lupus Michaelis
Bastien Koert wrote: lock it with www.php.net/flock But you remain to be carefull, because flock is more like a semaphore : it doesn't really lock the file. See man page for flock. (Maybe under MS Windows the lock is hard). -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org -- PHP

[PHP] Login should not allow users to login if the application is logged in with the same login credentials

2009-08-27 Thread Balasubramanyam A
Hello, I've written a simple application, where users need to login to access the features of the application. I want to develop login system such that, if user is already logged in, the application should not allow the users to login with the same login credentials. How do I accomplish this?

[PHP] vote package

2009-08-27 Thread Noel Butler
Hi All, Can someone suggest a reputable vote script in php that uses mysql, doesnt need to be fancy, just have a decent reputation for not being exloited :) also tracking of users via IP to prevent ghost voting...WE are using php 5.3.0, the old one fails under that, adn it had known issues so we

Re: [PHP] Login should not allow users to login if the application is logged in with the same login credentials

2009-08-27 Thread hack988 hack988
Use Database Online table for user sessions. 2009/8/27 Balasubramanyam A knowledge.wea...@gmail.com: Hello, I've written a simple application, where users need to login to access the features of the application. I want to develop login system such that, if user is already logged in, the

RES: [PHP] Login should not allow users to login if the application is logged in with the same login credentials

2009-08-27 Thread Jônatas Zechim
Use a DB session handler or save a time() on the user table every refresh, when loggin verify this time(). Zechim -Mensagem original- De: Balasubramanyam A [mailto:knowledge.wea...@gmail.com] Enviada em: quinta-feira, 27 de agosto de 2009 08:24 Para: php-general@lists.php.net Assunto:

Re: [PHP]Some body test php6-dev version for mbs?

2009-08-27 Thread hack988 hack988
Nobody Discuss with is title or I'm post to wrong mailing-list? 2009/8/27 hack988 hack988 hack...@dev.htwap.com: I'm try php6-dev recently.I found it had so many diffrent with older versions.I'll discuss with everybody in later:) now i have a problem in php6-dev codes follow:(warning:this

Re: [PHP] user permissions

2009-08-27 Thread Phpster
On Aug 27, 2009, at 2:55 AM, John i...@dynatechdesign.ca wrote: Hi, What is the best way to assign permissions to users? a) Each user has a list of permissions associated with that user or Nope b) Each task/permission has a list of users that qualify or Nope c)

Re: [PHP]Some body test php6-dev version for mbs?

2009-08-27 Thread Ashley Sheridan
On Thu, 2009-08-27 at 20:03 +0800, hack988 hack988 wrote: Nobody Discuss with is title or I'm post to wrong mailing-list? 2009/8/27 hack988 hack988 hack...@dev.htwap.com: I'm try php6-dev recently.I found it had so many diffrent with older versions.I'll discuss with everybody in later:)

Re: [PHP] Login should not allow users to login if the application is logged in with the same login credentials

2009-08-27 Thread Phpster
On Aug 27, 2009, at 8:01 AM, hack988 hack988 hack...@dev.htwap.com wrote: Use Database Online table for user sessions. 2009/8/27 Balasubramanyam A knowledge.wea...@gmail.com: Hello, I've written a simple application, where users need to login to access the features of the

Re: [PHP]Some body test php6-dev version for mbs?

2009-08-27 Thread hack988 hack988
I'm not sure,but one thing is that ,the code save as ANSI format will trow Parse error in php6. Sometime I don't like script run with unicode because of some system environment limitation. 2009/8/27 Ashley Sheridan a...@ashleysheridan.co.uk: On Thu, 2009-08-27 at 20:03 +0800, hack988 hack988

Re: [PHP]Some body test php6-dev version for mbs?

2009-08-27 Thread Ashley Sheridan
On Thu, 2009-08-27 at 20:17 +0800, hack988 hack988 wrote: I'm not sure,but one thing is that ,the code save as ANSI format will trow Parse error in php6. Sometime I don't like script run with unicode because of some system environment limitation. 2009/8/27 Ashley Sheridan

Re: [PHP]Some body test php6-dev version for mbs?

2009-08-27 Thread hack988 hack988
I'm not sure,but one thing is that ,the code save as ANSI format will throw Parse error in php6. Sometime I don't like script run with unicode because of some system environment limitation. I'm make a spell mistake in before message :( (trow-throw). Any boday have a solution for it? -- PHP

Re: [PHP]Some body test php6-dev version for mbs?

2009-08-27 Thread hack988 hack988
Yes i kown that. But so many codes, project that i programing or managed is write in gb2312 or some mbs charset.If I change all of them to utf-8 charset,it would cause so many unkown error or some logic error for codes. 2009/8/27 Ashley Sheridan a...@ashleysheridan.co.uk: On Thu, 2009-08-27 at

RE: [PHP] Re: How to output a NULL field?

2009-08-27 Thread David Stoltz
You're a genius - that works! -Original Message- From: Bastien Koert [mailto:phps...@gmail.com] Sent: Wednesday, August 26, 2009 2:02 PM To: Andrew Ballard Cc: Shawn McKenzie; php-general@lists.php.net; David Stoltz Subject: Re: [PHP] Re: How to output a NULL field? One option

[PHP] phpmailer send() always return true even the email address is invalid

2009-08-27 Thread Keith
Due to my web hosting server implement SMTP authentication, I couldn't do it with PHP mail() function, so I opt for PHPMailer. However, the $mail-Send() method always return true even I've set the $mail-AddAddress with invalid email address. I've tried with valid address. It's good and I've

Re: [PHP] phpmailer send() always return true even the email address is invalid

2009-08-27 Thread Ashley Sheridan
On Thu, 2009-08-27 at 20:38 +0800, Keith wrote: Due to my web hosting server implement SMTP authentication, I couldn't do it with PHP mail() function, so I opt for PHPMailer. However, the $mail-Send() method always return true even I've set the $mail-AddAddress with invalid email address.

Re: [PHP] phpmailer send() always return true even the emailaddress is invalid

2009-08-27 Thread Viktor Popov
Ashley Sheridan wrote: On Thu, 2009-08-27 at 20:38 +0800, Keith wrote: Due to my web hosting server implement SMTP authentication, I couldn't do it with PHP mail() function, so I opt for PHPMailer. However, the $mail-Send() method always return true even I've set the $mail-AddAddress with

RE: [PHP]Some body test php6-dev version for mbs?

2009-08-27 Thread Mike Roberts
I have removed myself from this list multiple times to no avail, even at the direction of 'more knowledgeable' members of the group who know better than I how to become delisted. Most of the time, I have the messages going to 'Junk Mail', but apparently yours sneaked through. If anybody with

RE: [PHP] phpmailer send() always return true even the email address is invalid

2009-08-27 Thread Bob McConnell
From: Ashley Sheridan On Thu, 2009-08-27 at 20:38 +0800, Keith wrote: Due to my web hosting server implement SMTP authentication, I couldn't do it with PHP mail() function, so I opt for PHPMailer. However, the $mail-Send() method always return true even I've set the $mail-AddAddress with

[PHP] Re: Login should not allow users to login if the application is logged in with the same login credentials

2009-08-27 Thread Al
Balasubramanyam A wrote: Hello, I've written a simple application, where users need to login to access the features of the application. I want to develop login system such that, if user is already logged in, the application should not allow the users to login with the same login credentials.

Re: [PHP] phpmailer send() always return true even the emailaddress is invalid

2009-08-27 Thread Keith
Ash, Viktor, Thanks! Yes, validate the email is the preliminary solution. However, it is still possible that the email address is valid but is not exist in the target email provider. I wish to know also if the email can reach the recipient or not. Actually, I have tested with localhost in my

Re: [PHP] Sockets (reading)

2009-08-27 Thread Martin Scotta
On Wed, Aug 26, 2009 at 5:36 PM, Philip Thompson philthath...@gmail.comwrote: On Aug 26, 2009, at 2:47 PM, Bob McConnell wrote: From: Philip Thompson On Aug 26, 2009, at 11:56 AM, Bob McConnell wrote: From: Philip Thompson During a socket read, why would all the requested number of

Re: [PHP] phpmailer send() always return true even the email address is invalid

2009-08-27 Thread Paul M Foster
On Thu, Aug 27, 2009 at 09:00:24AM -0400, Bob McConnell wrote: The return code only tells you the local server accepted the mail. It is unlikely that server knows the address is invalid since it can only validate the domain portion of the address. Only the destination server can validate

Re: [PHP] Re: How to output a NULL field?

2009-08-27 Thread Martin Scotta
On Thu, Aug 27, 2009 at 9:37 AM, David Stoltz dsto...@shh.org wrote: You're a genius - that works! -Original Message- From: Bastien Koert [mailto:phps...@gmail.com] Sent: Wednesday, August 26, 2009 2:02 PM To: Andrew Ballard Cc: Shawn McKenzie; php-general@lists.php.net; David

RE: [PHP] phpmailer send() always return true even the emailaddress is invalid

2009-08-27 Thread Bob McConnell
From: Paul M Foster On Thu, Aug 27, 2009 at 09:00:24AM -0400, Bob McConnell wrote: The return code only tells you the local server accepted the mail. It is unlikely that server knows the address is invalid since it can only validate the domain portion of the address. Only the destination

[PHP] Special Characters in a String for Output

2009-08-27 Thread David Stoltz
I have: $goalString = p align=leftGoals Entered By .$mymanager./ppOn .$when.:/pp align=left.$mygoal./p; Which outputs in this A tag: a href=# onmouseover=applyDMXTooltip(this,'?php echo $goalString; ?','normal','linear','mouse','out',1,1,'mouseout','yellow',false,'','',

Re: [PHP] parse_ini_file problem [SOLVED]

2009-08-27 Thread Richard H Lee
Hi Jim, Cheers for the reply. I had to swap the quotes around to get it running on the windows command line. This from the 5.3.0 machine that does not parse: C:\wamp\www\digishop\install\langC:\wamp\bin\php\php5.3.0\php -r print_r(parse_ini_file('1-ISO-8859-1.ini.php')); PHP

Re: [PHP] Special Characters in a String for Output

2009-08-27 Thread Bastien Koert
On Thu, Aug 27, 2009 at 9:56 AM, David Stoltzdsto...@shh.org wrote: I have: $goalString = p align=leftGoals Entered By .$mymanager./ppOn .$when.:/pp align=left.$mygoal./p; Which outputs in this A tag: a href=# onmouseover=applyDMXTooltip(this,'?php echo $goalString;

Re: [PHP] Re: page works on public web site, but not on my computer

2009-08-27 Thread mike bode
I understand, but that's not an option. I am not interested in getting into a Linux vs. Windows fight here, let's just say that I am stuck with Windows. Now, somthing's gotta be seriously wrong here. I have tried now 4 or 5 different scripts for the photo gallery that I am trying to implement

Re: [PHP] Re: page works on public web site, but not on my computer

2009-08-27 Thread Ashley Sheridan
On Thu, 2009-08-27 at 08:49 -0600, mike bode wrote: I understand, but that's not an option. I am not interested in getting into a Linux vs. Windows fight here, let's just say that I am stuck with Windows. Now, somthing's gotta be seriously wrong here. I have tried now 4 or 5 different

RE: [PHP] Re: page works on public web site, but not on my computer

2009-08-27 Thread Bob McConnell
Mike, It's not MS-Windows, it's just Vista. Vista was designed and distributed for use as a home entertainment center. It was loaded with DRM and other restrictions to entice the RIAA and MPAA to use it as their primary platform for distributing music and movies, respectively. That pretty much

Re: [PHP] vote package

2009-08-27 Thread tedd
At 9:52 PM +1000 8/27/09, Noel Butler wrote: Hi All, Can someone suggest a reputable vote script in php that uses mysql, doesnt need to be fancy, just have a decent reputation for not being exloited :) also tracking of users via IP to prevent ghost voting...WE are using php 5.3.0, the old one

Re: [PHP] Re: page works on public web site, but not on my computer

2009-08-27 Thread Lars Torben Wilson
2009/8/27 mike bode mikebo...@hotmail.com: I understand, but that's not an option. I am not interested in getting into a Linux vs. Windows fight here, let's just say that I am stuck with Windows. Now, somthing's gotta be seriously wrong here. I have tried now 4 or 5 different scripts for the

Re: [PHP] phpmailer send() always return true even the emailaddress is invalid

2009-08-27 Thread Shawn McKenzie
Paul M Foster wrote: On Thu, Aug 27, 2009 at 09:00:24AM -0400, Bob McConnell wrote: The return code only tells you the local server accepted the mail. It is unlikely that server knows the address is invalid since it can only validate the domain portion of the address. Only the destination

[PHP] Re: user permissions

2009-08-27 Thread Shawn McKenzie
John wrote: Hi, What is the best way to assign permissions to users? a) Each user has a list of permissions associated with that user or b) Each task/permission has a list of users that qualify or c) Have a table with a row for each user/permission combination

RE: [PHP] Re: page works on public web site, but not on my computer

2009-08-27 Thread Arno Kuhl
-Original Message- From: mike bode [mailto:mikebo...@hotmail.com] Sent: 27 August 2009 04:49 PM To: php-general@lists.php.net Subject: Re: [PHP] Re: page works on public web site, but not on my computer I understand, but that's not an option. I am not interested in getting into a Linux

[PHP] Re: page works on public web site, but not on my computer

2009-08-27 Thread Shawn McKenzie
mike bode wrote: I have posted the question in another thread a bit down, but only buried within the thread, so please excuse me when I ask again. I want to use some PHP code from a web site (http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm), and I am following their instruction

[PHP] Re: Getting backtrace through GDB?

2009-08-27 Thread Jason Young
Anyone, anyone? Bueller? :P I'm sure someone has experience with GDB? I'm not looking for a newbie primer, I'm just curious if anyone has had experience with the problem below and knew how to correct it.. Thanks :) Jason Young wrote: Hi all, I'm trying to follow the instructions for

Re: [PHP] phpmailer send() always return true even the emailaddress is invalid

2009-08-27 Thread Paul M Foster
On Thu, Aug 27, 2009 at 10:06:03AM -0500, Shawn McKenzie wrote: Paul M Foster wrote: On Thu, Aug 27, 2009 at 09:00:24AM -0400, Bob McConnell wrote: The return code only tells you the local server accepted the mail. It is unlikely that server knows the address is invalid since it can only

Re: [PHP] Re: unset() something that doesn't exist

2009-08-27 Thread Ben Dunlap
ISTR the Royal Air Force has a Specialist Aircrew track where the really good pilots, who wanted to fly planes rather than desks, could be promoted to management ranks but avoid the management duties. They had a position like this at the first big company I worked for -- Member of the

Re: [PHP] phpmailer send() always return true even the emailaddress is invalid

2009-08-27 Thread Ben Dunlap
another change in the email admin best practices discussion. For a short while the network became clogged in bounce messages sent to both valid and invalid addresses. Some of the invalid addresses even triggered infinite loops of error messages. None of the servers I am familiar with send

RE: [PHP] Re: unset() something that doesn't exist

2009-08-27 Thread Bob McConnell
From: Ben Dunlap ISTR the Royal Air Force has a Specialist Aircrew track where the really good pilots, who wanted to fly planes rather than desks, could be promoted to management ranks but avoid the management duties. They had a position like this at the first big company I worked for --

Re: [PHP] phpmailer send() always return true even the emailaddress is invalid

2009-08-27 Thread Paul M Foster
On Thu, Aug 27, 2009 at 10:57:32AM -0700, Ben Dunlap wrote: another change in the email admin best practices discussion. For a short while the network became clogged in bounce messages sent to both valid and invalid addresses. Some of the invalid addresses even triggered infinite loops of

[PHP] PHP Crash in file_get_contents

2009-08-27 Thread Seth Hill
Hello all, I'm experiencing a curious error that I'm hoping someone can help with. I am using file_get_contents() with Google Maps Geocoding to retrieve information about an address. The URL that I'm requesting looks like: http://maps.google.com/maps/geo?q=[Search Subject]key=[google maps

Re: [PHP] phpmailer send() always return true even the emailaddress is invalid

2009-08-27 Thread Ben Dunlap
The second problem is that it still forces the originating SMTP server to pass on the 5xx error as a bounce message to the originator. Yeah, I guess this would be a problem in cases where the originating server is an open relay that's being exploited by a spammer. I wonder what proportion of

Re: [PHP] vote package

2009-08-27 Thread tedd
At 7:18 AM +1000 8/28/09, Noel Butler wrote: On Thu, 2009-08-27 at 10:55 -0400, tedd wrote: I think you'll run into exploitation problems regardless. I'm getting that impression from the hours and hours I wasted yesterday prior to my post trying to find a good one :( There's not going to

[PHP] Re: Getting backtrace through GDB?

2009-08-27 Thread Lupus Michaelis
Jason Young wrote: Anyone, anyone? Bueller? :P I'm sure someone has experience with GDB? I'm not looking for a newbie primer, I'm just curious if anyone has had experience with the problem below and knew how to correct it.. I guess we are on PHP users list, gdb's ;) If no symbols

Re: [PHP] vote package

2009-08-27 Thread Ben Dunlap
You might try to use the reported IP of the submitter, again unique, but that can be forged -- so again anyone can vote more than once. Can you say more about forging the reported IP? I've always been under the impression that forging the source IP in a TCP session is a pretty sophisticated

Re: [PHP] user permissions

2009-08-27 Thread Ben Dunlap
Sort of. Create two tables a login table with user details and a specific field for a ROLE. Then create a roles table that lists the various permissions. I store this [8] This process is significantly simpler when managing users, it's easier to adjust permissions on one role than to edit a

Re: [PHP] user permissions

2009-08-27 Thread Phpster
On Aug 27, 2009, at 9:02 PM, Ben Dunlap bdun...@agentintellect.com wrote: Sort of. Create two tables a login table with user details and a specific field for a ROLE. Then create a roles table that lists the various permissions. I store this [8] This process is significantly simpler

Re: [PHP] user permissions

2009-08-27 Thread Ben Dunlap
Yes, they offer an additional layer of granularity on permissions. The apps I write use groups and role to limit acces to certain functionality. The roles determine functional access to records, ie what the user can do with them. The groups membership determines what records the user can see.