php-general Digest 19 Apr 2010 13:56:40 -0000 Issue 6701

2010-04-19 Thread php-general-digest-help
php-general Digest 19 Apr 2010 13:56:40 - Issue 6701 Topics (messages 304189 through 304209): Re: Mail Function Using PEAR Issues 304189 by: Kevin Kinsey 304190 by: Alice Wei 304191 by: Karl DeSaulniers 304192 by: Kevin Kinsey 304194 by: Peter Lind

Re: [PHP] How to do i18n better?

2010-04-19 Thread Peter Lind
Consider checking out http://php.net/gettext - it's the set of functions in PHP for i18n. With regards to language switching, you should consider using a url hierarchy for it, instead of just serving all pages with changing content. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk

Re: [PHP] Mail Function Using PEAR Issues

2010-04-19 Thread Peter Lind
Most, if not all, mail servers keep log files. You should look for the log files to see if the mail server has sent your mail properly or is experiencing problems (those may not feed back into PHP). Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn:

[PHP] Class constants

2010-04-19 Thread Gary .
Should I be able to do this: class X { const FOO = 'foo'; const FOOBAR = X::FOO . 'bar'; ... } ? Because I can't. I get syntax error, unexpected '.', expecting ',' or ';'. I assume this is because the constants are like statics which can't be initialised by functions etc. but is there

Re: [PHP] Class constants

2010-04-19 Thread Peter Lind
On 19 April 2010 10:30, Gary . php-gene...@garydjones.name wrote: Should I be able to do this: class X {  const FOO = 'foo';  const FOOBAR = X::FOO . 'bar'; ... } ? Because I can't. I get syntax error, unexpected '.', expecting ',' or ';'. I assume this is because the constants are

[PHP] Get Power Saving Settings of the Server

2010-04-19 Thread kranthi
Hi all, My PHP script is running as CLI. Can I get the Power Management Settings of the server ? I am using PHP 5.3.2 on Fedora 12 Machine (2.6.32.10-90.fc12.i686) KK. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Get Power Saving Settings of the Server

2010-04-19 Thread Richard
Hi, My PHP script is running as CLI. Can I get the Power Management Settings of the server ? I am using PHP 5.3.2 on Fedora 12 Machine (2.6.32.10-90.fc12.i686) Your server management software may provide a way to get this information either through the command line or through a network

Re: [PHP] How to do i18n better?

2010-04-19 Thread Michiel Sikma
On 19 April 2010 00:55, Andre Polykanine an...@oire.org wrote: Now the i18n process is made as follows: we set a cookie on the site and depending on it we select the language to display the site in. We have three (currently) interface files: rus.lng, ukr.lng, and enu.lng (for English US).

Re: [PHP] PHP include security

2010-04-19 Thread Michiel Sikma
On 18 April 2010 21:43, Micky Hulse mickyhulse.li...@gmail.com wrote: On Sun, Apr 18, 2010 at 10:23 AM, Michiel Sikma mich...@thingmajig.org wrote: I would prefer to use include() since it runs the code in the same context, ...snip... with your data rather than printing it right away.

Re: [PHP] Does PHP support multi-thread ?

2010-04-19 Thread Richard Quadling
On 18 April 2010 14:17, ttplayer f...@qq.com wrote: Hello, everyone, please answer me. Thank you.  Does PHP support multi-thread ? As you've been informed, PHP doesn't natively support threading. But, the issue of forking was mentioned. I'm on Windows, and by using a combination of MS's

Re[2]: [PHP] How to do i18n better?

2010-04-19 Thread Andre Polykanine
Hello Peter, Regarding the URL switching suggested by you and Michiel, how do I do this if I have a rather complicated .htaccess file? For instance, a blog entry URL is formed as follows: http://oire.org/menelion/entry/190/ which is phisically http://oire.org/oire.php?o=menelione=190 If I need to

Re: [PHP] How to do i18n better?

2010-04-19 Thread Per Jessen
Andre Polykanine wrote: etc. I know that PHP does support somehow exporting the strings into a .pod file. Maybe it would be better to do that? If so, how can I do it? Could you suggest me maybe a better solution than we currently have? For mostly dynamic messages or pages, I would take a

Re: [PHP] Class constants

2010-04-19 Thread Gary .
On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote: On 19 April 2010 10:30, Gary wrote: Should I be able to do this: class X {  const FOO = 'foo';  const FOOBAR = X::FOO . 'bar'; ... } So no, you shouldn't be able to do that. Okay. Why not? -- PHP General Mailing List

RE: [PHP] Mail Function Using PEAR Issues

2010-04-19 Thread Alice Wei
Date: Sun, 18 Apr 2010 21:39:19 -0500 From: k...@daleco.biz To: aj...@alumni.iu.edu CC: k...@designdrumm.com; php-general@lists.php.net Subject: Re: [PHP] Mail Function Using PEAR Issues Alice Wei wrote: Date: Sun, 18 Apr 2010 21:02:29 -0500 From: k...@daleco.biz To:

Re: [PHP] Class constants

2010-04-19 Thread Peter Lind
On 19 April 2010 14:24, Gary . php-gene...@garydjones.name wrote: On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote: On 19 April 2010 10:30, Gary wrote: Should I be able to do this: class X {  const FOO = 'foo';  const FOOBAR = X::FOO . 'bar'; ... } So no, you shouldn't be able to do

Re: [PHP] Class constants

2010-04-19 Thread Ashley Sheridan
On Mon, 2010-04-19 at 14:37 +0200, Peter Lind wrote: On 19 April 2010 14:24, Gary . php-gene...@garydjones.name wrote: On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote: On 19 April 2010 10:30, Gary wrote: Should I be able to do this: class X { const FOO = 'foo'; const FOOBAR

[PHP] Array to csv or excel in php

2010-04-19 Thread Manolis Vlachakis
hallo there everyone.. i got an array from my database Help with Code Tagshttp://www.daniweb.com/forums/misc-explaincode.html?TB_iframe=trueheight=400width=680 *PHP Syntax* (Toggle Plain Texthttp://www.daniweb.com/forums/post1194347.html# ) 1. $save=split([|;],$listOfItems); and what i

Re: [PHP] How to do i18n better?

2010-04-19 Thread Robert Cummings
Michiel Sikma wrote: On 19 April 2010 00:55, Andre Polykanine an...@oire.org wrote: Now the i18n process is made as follows: we set a cookie on the site and depending on it we select the language to display the site in. We have three (currently) interface files: rus.lng, ukr.lng, and enu.lng

Re: [PHP] Class constants

2010-04-19 Thread Gary .
On Mon, Apr 19, 2010 at 2:37 PM, Peter Lind peter.e.l...@gmail.com wrote: On 19 April 2010 14:24, Gary wrote: On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote: So no, you shouldn't be able to do that. Okay. Why not? Hate to ask, but did you at any point consider to read the PHP docs on

Re: [PHP] How to do i18n better?

2010-04-19 Thread Peter Lind
On 19 April 2010 15:56, Robert Cummings rob...@interjinn.com wrote: Unless you have namespaces (and I can't remember if they completed namespaced based functions) then don't use something so commuon as a function named underscore :/ Cheers, Rob. You might want to have a look at

Re: [PHP] How to do i18n better?

2010-04-19 Thread Robert Cummings
Peter Lind wrote: On 19 April 2010 15:56, Robert Cummings rob...@interjinn.com wrote: Unless you have namespaces (and I can't remember if they completed namespaced based functions) then don't use something so commuon as a function named underscore :/ Cheers, Rob. You might want to have a

Re: [PHP] solution

2010-04-19 Thread tedd
At 7:26 PM +0200 4/18/10, Michiel Sikma wrote: On 17 April 2010 13:03, Paulo-WORK pauloworkm...@googlemail.com wrote: I have reached a solution for my problem with js. Following all the sugestions and using jquery turned out to be quite simple. using .hide( ) and .show( ) i am able to

Re: Re[2]: [PHP] How to do i18n better?

2010-04-19 Thread Peter Lind
On 19 April 2010 12:54, Andre Polykanine an...@oire.org wrote: Hello Peter, Regarding the URL switching suggested by you and Michiel, how do I do this if I have a rather complicated .htaccess file? For instance, a blog entry URL is formed as follows: http://oire.org/menelion/entry/190/ which

Re: [PHP] Class constants

2010-04-19 Thread Gary .
On Mon, Apr 19, 2010 at 3:12 PM, Ashley Sheridan wrote: On 19 April 2010 14:24, Gary wrote: Okay. Why not? ... Class constants must be defined with static values, not variables. They are constants after all! If they relied on the value of a variable, surely that would mean that their own

Re: [PHP] Class constants

2010-04-19 Thread Peter Lind
On 19 April 2010 16:18, Gary . php-gene...@garydjones.name wrote: On Mon, Apr 19, 2010 at 2:37 PM, Peter Lind peter.e.l...@gmail.com wrote: On 19 April 2010 14:24, Gary wrote: On Mon, Apr 19, 2010 at 10:36 AM, Peter Lind wrote: So no, you shouldn't be able to do that. Okay. Why not? Hate

[PHP] Directory permissions question

2010-04-19 Thread Al
I'm working on a hosted website that was hacked and found something I don't fully understand. Thought someone here may know the answer. The site has 4 php malicious files in directories owned by system [php created dirs on the site are named nobody] and permissions 755. Is there any way the

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Andrew Ballard
On Mon, Apr 19, 2010 at 9:45 AM, Manolis Vlachakis vlachakis.mano...@gmail.com wrote: hallo there everyone.. i got an array from my database Help with Code Tagshttp://www.daniweb.com/forums/misc-explaincode.html?TB_iframe=trueheight=400width=680 *PHP Syntax* (Toggle Plain

Re: [PHP] Directory permissions question

2010-04-19 Thread Adam Richardson
On Mon, Apr 19, 2010 at 10:59 AM, Al n...@ridersite.org wrote: I'm working on a hosted website that was hacked and found something I don't fully understand. Thought someone here may know the answer. The site has 4 php malicious files in directories owned by system [php created dirs on the

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Peter Lind
On 19 April 2010 17:00, Andrew Ballard aball...@gmail.com wrote: On Mon, Apr 19, 2010 at 9:45 AM, Manolis Vlachakis vlachakis.mano...@gmail.com wrote: hallo there everyone.. i got an array from my database Help with Code

Re: [PHP] Directory permissions question

2010-04-19 Thread Al
On 4/19/2010 11:11 AM, Adam Richardson wrote: On Mon, Apr 19, 2010 at 10:59 AM, Aln...@ridersite.org wrote: I'm working on a hosted website that was hacked and found something I don't fully understand. Thought someone here may know the answer. The site has 4 php malicious files in

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Andrew Ballard
On Mon, Apr 19, 2010 at 11:14 AM, Peter Lind peter.e.l...@gmail.com wrote: On 19 April 2010 17:00, Andrew Ballard aball...@gmail.com wrote: On Mon, Apr 19, 2010 at 9:45 AM, Manolis Vlachakis 1. $save=split([|;],$listOfItems); and what i want i s after making some changes to the attributes

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Peter Lind
On 19 April 2010 17:40, Andrew Ballard aball...@gmail.com wrote: On Mon, Apr 19, 2010 at 11:14 AM, Peter Lind peter.e.l...@gmail.com wrote: On 19 April 2010 17:00, Andrew Ballard aball...@gmail.com wrote: On Mon, Apr 19, 2010 at 9:45 AM, Manolis Vlachakis   1. $save=split([|;],$listOfItems);

Re: [PHP] Directory permissions question

2010-04-19 Thread Jim Lucas
Al wrote: I'm working on a hosted website that was hacked and found something I don't fully understand. Thought someone here may know the answer. The site has 4 php malicious files in directories owned by system [php created dirs on the site are named nobody] and permissions 755. Is there

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Ken Guest
For non-simple data I have been using PEAR's File_CSV package. It's proven itself very useful in regards to not having to determine in my own code whether something needs to be quoted etc etc - especially if the output CSV needs to be wholly RFC 4180 compliant. The documentation of it is rather

Re: [PHP] Directory permissions question

2010-04-19 Thread Al Rider
Apache 2.0.63 php 5.2.8 I know both are obsolete and need updating. I told my client to request same from their ISP. Al On 4/19/2010 12:01 PM, Jim Lucas wrote: Al wrote: I'm working on a hosted website that was hacked and found something I don't fully understand. Thought someone here

Re: [PHP] Directory permissions question

2010-04-19 Thread Peter Lind
On 19 April 2010 17:18, Al n...@ridersite.org wrote: On 4/19/2010 11:11 AM, Adam Richardson wrote: On Mon, Apr 19, 2010 at 10:59 AM, Aln...@ridersite.org  wrote: I'm working on a hosted website that was hacked and found something I don't fully understand. Thought someone here may know the

[PHP] Adding reCAPTCHA to form using PHP

2010-04-19 Thread Ernie Kemp
Need help with reCAPTCHA. Never installed it before. When Submit is clicked the quoterequest-redirect.php is run but I think it would be better to test the reCAPTCHA before the quoterequest-redirect.php program has been run. I check the CAPTCHA in quoterequest-redirect.php, it displays a invalid

Re: [PHP] Class constants

2010-04-19 Thread Adam Richardson
On Mon, Apr 19, 2010 at 10:25 AM, Peter Lind peter.e.l...@gmail.com wrote: On 19 April 2010 16:18, Gary . php-gene...@garydjones.name wrote: On Mon, Apr 19, 2010 at 2:37 PM, Peter Lind peter.e.l...@gmail.com wrote: On 19 April 2010 14:24, Gary wrote: On Mon, Apr 19, 2010 at 10:36 AM,

Re: [PHP] PHP include security

2010-04-19 Thread Micky Hulse
Hi Michiel! One thing to keep in mind is that this one doesn't take eval() vs regular include execution time into account, in case you were still considering using it. According to this page, it's many times I was still considering it... I mean, I am still exploring all my options for the

Re: [PHP] Adding reCAPTCHA to form using PHP

2010-04-19 Thread tedd
At 12:21 PM -0400 4/19/10, Ernie Kemp wrote: Need help with reCAPTCHA. Never installed it before. When Submit is clicked the quoterequest-redirect.php is run but I think it would be better to test the reCAPTCHA before the quoterequest-redirect.php program has been run. I check the CAPTCHA in

RE: [PHP] Array to csv or excel in php

2010-04-19 Thread Jay Blanchard
[snip] to export them on an csv or excel format[/snip] Stupid browser tricks http://www.evolt.org/node/26896 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Adding reCAPTCHA to form using PHP

2010-04-19 Thread Ernie Kemp
Thanks for your reply Tedd. Maybe my reCAPTCHA is more complicated than it needs to be but when you click the Submit button the form triggers the action=quoterequest-redirect.php which goes to another program without checking the CAPTCHA. I test in the called program and display a message if it's

Re: [PHP] Adding reCAPTCHA to form using PHP

2010-04-19 Thread Andrew Ballard
On Mon, Apr 19, 2010 at 12:50 PM, tedd tedd.sperl...@gmail.com wrote: At 12:21 PM -0400 4/19/10, Ernie Kemp wrote: Need help with reCAPTCHA. Never installed it before. When Submit is clicked the quoterequest-redirect.php is run but I think it would be better to test the reCAPTCHA before the

Re: [PHP] Adding reCAPTCHA to form using PHP

2010-04-19 Thread tedd
At 2:10 PM -0400 4/19/10, Andrew Ballard wrote: On Mon, Apr 19, 2010 at 12:50 PM, tedd tedd.sperl...@gmail.com wrote: At 12:21 PM -0400 4/19/10, Ernie Kemp wrote: Need help with reCAPTCHA. Never installed it before. When Submit is clicked the quoterequest-redirect.php is run but I think

Re: [PHP] Class constants

2010-04-19 Thread David Harkness
On Mon, Apr 19, 2010 at 7:25 AM, Peter Lind peter.e.l...@gmail.com wrote: Per the PHP manual: The value must be a constant expression. Is something that depends on other classes, variables or functions constant? When I came up against this problem myself, I read a constant expression to mean

Re: [PHP] How to do i18n better?

2010-04-19 Thread Michiel Sikma
On 19 April 2010 15:56, Robert Cummings rob...@interjinn.com wrote: -snip- Unless you have namespaces (and I can't remember if they completed namespaced based functions) then don't use something so commuon as a function named underscore :/ Cheers, Rob. No, you're actually absolutely

Re: [PHP] How to do i18n better?

2010-04-19 Thread Jason Pruim
On Apr 18, 2010, at 6:55 PM, Andre Polykanine wrote: Hi everyone, I posted this in the PHP-i18n list, however got no answer so trying here). We are making a blog platform (http://oire.org/) which is provided in several languages (currently they are Russian, Ukrainian, and English). Now the

Re: [PHP] How to do i18n better?

2010-04-19 Thread Ashley Sheridan
On Mon, 2010-04-19 at 19:17 -0400, Jason Pruim wrote: On Apr 18, 2010, at 6:55 PM, Andre Polykanine wrote: Hi everyone, I posted this in the PHP-i18n list, however got no answer so trying here). We are making a blog platform (http://oire.org/) which is provided in several languages

Re: [PHP] How to do i18n better?

2010-04-19 Thread tedd
At 12:17 AM +0100 4/20/10, Ashley Sheridan wrote: Links within the site itself allow the user to change their language afterwards, and you could store that in a cookie to it remembers their choice. Thanks, Ash Ash: This is something I found interesting. http://php1.net/c/language-example/

RE: [PHP] Mail Function Using PEAR Issues

2010-04-19 Thread David McGlone
On Mon, 2010-04-19 at 08:25 -0400, Alice Wei wrote: I have not changed any of my SMTP settings since my new installation of PHP with Pear. So, I am not sure what the settings are supposed to be. Would I need to install anything else even when the Pear Mail package has been installed?