php-general Digest 31 Oct 2007 03:49:07 -0000 Issue 5101

2007-10-30 Thread php-general-digest-help
php-general Digest 31 Oct 2007 03:49:07 - Issue 5101 Topics (messages 263809 through 263833): Re: isodd() php5? 263809 by: tedd Re: REGEX: grouping of alternative patterns 263810 by: Robin Vickery 263811 by: Ford, Mike Re: moving over to php 5 263812 by:

Re: [PHP] unexpected '@' in preg_replace???

2007-10-30 Thread Zoltán Németh
2007. 10. 29, hétfő keltezéssel 11.17-kor Daniel Brown ezt írta: On 10/29/07, Zoltán Németh [EMAIL PROTECTED] wrote: hi list, I have this code: [snip!] Parse error: syntax error, unexpected '@' in /home/znemeth/public_html/test/pregreplacetest1.php(94) : regexp code on line 1

Re: [PHP] unexpected '@' in preg_replace??? - SOLVED

2007-10-30 Thread Zoltán Németh
2007. 10. 29, hétfő keltezéssel 09.17-kor Jim Lucas ezt írta: Daniel Brown wrote: On 10/29/07, Zoltán Németh [EMAIL PROTECTED] wrote: hi list, I have this code: [snip!] Parse error: syntax error, unexpected '@' in /home/znemeth/public_html/test/pregreplacetest1.php(94) : regexp code

Re: [PHP] moving over to php 5

2007-10-30 Thread Per Jessen
Larry Garfield wrote: On Monday 29 October 2007, Per Jessen wrote: Cristian Vrabie wrote: Hmm 117,223 hosts with php4 only support. Did you actually checked how many have php5 support? Many more. There are 178.112 hosters that have PHP5 support. I checked. Where and how did you check?

Re: [PHP] moving over to php 5

2007-10-30 Thread Per Jessen
Larry Garfield wrote: Here's a bigger question: When will people stop using mysql_ as their example API, when PDO is more standard in PHP 5 and more secure, and mysqli is available as well? As always, the key question must be - what's the advantage of moving? When the developer benefits from

[PHP] isodd() php5?

2007-10-30 Thread Hulf
Hi, Is there a built in function in PHP5 to determine if an integer is even or odd? Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] isodd() php5?

2007-10-30 Thread Jason
At 09:32 30/10/2007, Hulf wrote: Hi, Is there a built in function in PHP5 to determine if an integer is even or odd? How about : if ($IntegerValue % 2) { // odd } else { // even } HTH J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] PHP installation

2007-10-30 Thread Richard Heyes
Hi, Trying to install PHP, however it's failing with the following: Configuring extensions checking whether to enable LIBXML support... yes checking libxml2 install dir... /usr/lib64 checking for xml2-config path... /usr/bin/xml2-config checking whether libxml build works... no configure:

Re: [PHP] PHP installation

2007-10-30 Thread Per Jessen
Richard Heyes wrote: The following is in config.log: configure:20028: checking whether libxml build works configure:20055: gcc -o conftest -g -O2 conftest.c -lresolv -lm -ldl -lnsl -lxml2 -lz -lm 15 /usr/bin/ld: cannot find -lz Looks like you need to install libz. /Per

[PHP] REGEX: grouping of alternative patterns

2007-10-30 Thread Stijn Verholen
Hey list, I'm having problems with grouped alternative patterns. The regex I would like to use, is the following: /\s*(`?.+`?)\s*int\s*(\(([0-9]+)\))?\s*(unsigned)?\s*(((auto_increment)?\s*(primary\s*key)?)|((not\s*null)?\s*(default\s*(`.*`|[0-9]*)?)?))\s*/i It matches this statement: `id`

Re: [PHP] PHP installation

2007-10-30 Thread Richard Heyes
Per Jessen wrote: Richard Heyes wrote: The following is in config.log: configure:20028: checking whether libxml build works configure:20055: gcc -o conftest -g -O2 conftest.c -lresolv -lm -ldl -lnsl -lxml2 -lz -lm 15 /usr/bin/ld: cannot find -lz Looks like you need to install

Re: [PHP] PHP installation

2007-10-30 Thread Richard Heyes
Richard Heyes wrote: Per Jessen wrote: Richard Heyes wrote: The following is in config.log: configure:20028: checking whether libxml build works configure:20055: gcc -o conftest -g -O2 conftest.c -lresolv -lm -ldl -lnsl -lxml2 -lz -lm 15 /usr/bin/ld: cannot find -lz Looks

Re: [PHP] isodd() php5?

2007-10-30 Thread tedd
At 9:32 AM + 10/30/07, Hulf wrote: Hi, Is there a built in function in PHP5 to determine if an integer is even or odd? Ross Try: echo($integer 1); 1 = odd, 0 = even. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General

Re: [PHP] REGEX: grouping of alternative patterns

2007-10-30 Thread Robin Vickery
On 30/10/2007, Stijn Verholen [EMAIL PROTECTED] wrote: Hey list, I'm having problems with grouped alternative patterns. The regex I would like to use, is the following:

RE: [PHP] REGEX: grouping of alternative patterns

2007-10-30 Thread Ford, Mike
On 30 October 2007 11:07, Stijn Verholen wrote: Hey list, I'm having problems with grouped alternative patterns. The regex I would like to use, is the following: /\s*(`?.+`?)\s*int\s*(\(([0-9]+)\))?\s*(unsigned)?\s*(((auto_i ncrement)?\s*(primary\s*key)?)|((not\s*null)?\s*(default\s*(`.

Re: [PHP] moving over to php 5

2007-10-30 Thread Robin Vickery
On 30/10/2007, Per Jessen [EMAIL PROTECTED] wrote: Larry Garfield wrote: On Monday 29 October 2007, Per Jessen wrote: Cristian Vrabie wrote: Hmm 117,223 hosts with php4 only support. Did you actually checked how many have php5 support? Many more. There are 178.112 hosters that have

Re: [PHP] REGEX: grouping of alternative patterns [SOLVED]

2007-10-30 Thread Stijn Verholen
Robin Vickery schreef: [snip] Because each of your subpatterns can match an empty string, the lefthand subpattern always matches and the righthand subpattern might as well not be there. Indeed they do, i did not realise that. The simplest solution, if you don't want to completely rethink

Re: [PHP] moving over to php 5

2007-10-30 Thread Larry Garfield
On Tuesday 30 October 2007, Per Jessen wrote: Larry Garfield wrote: Here's a bigger question: When will people stop using mysql_ as their example API, when PDO is more standard in PHP 5 and more secure, and mysqli is available as well? As always, the key question must be - what's the

Re: [PHP] unexpected '@' in preg_replace???

2007-10-30 Thread Daniel Brown
On 10/30/07, Zoltán Németh [EMAIL PROTECTED] wrote: 2007. 10. 29, hétfő keltezéssel 11.17-kor Daniel Brown ezt írta: On 10/29/07, Zoltán Németh [EMAIL PROTECTED] wrote: hi list, I have this code: [snip!] Parse error: syntax error, unexpected '@' in

Re: [PHP] moving over to php 5

2007-10-30 Thread Cristian Vrabie
Robin Vickery wrote: On 30/10/2007, Per Jessen [EMAIL PROTECTED] wrote: Larry Garfield wrote: On Monday 29 October 2007, Per Jessen wrote: Cristian Vrabie wrote: Hmm 117,223 hosts with php4 only support. Did you actually checked how many have php5 support? Many more.

Re: [PHP] moving over to php 5

2007-10-30 Thread Robert Cummings
On Tue, 2007-10-30 at 09:10 -0500, Larry Garfield wrote: On Tuesday 30 October 2007, Per Jessen wrote: Larry Garfield wrote: Here's a bigger question: When will people stop using mysql_ as their example API, when PDO is more standard in PHP 5 and more secure, and mysqli is available as

Re: [PHP] unexpected '@' in preg_replace???

2007-10-30 Thread Zoltán Németh
2007. 10. 30, kedd keltezéssel 10.21-kor Daniel Brown ezt írta: On 10/30/07, Zoltán Németh [EMAIL PROTECTED] wrote: 2007. 10. 29, hétfő keltezéssel 11.17-kor Daniel Brown ezt írta: On 10/29/07, Zoltán Németh [EMAIL PROTECTED] wrote: hi list, I have this code: [snip!] Parse

[PHP] Compilers

2007-10-30 Thread Wolf
Anyone use compilers (linux based or Windoze) and which do you use? Looking for something free (best) or low cost as we are doing some investigation on what methods are best for some of the stuff we have, and I'm thinking a compiled PHP app should run faster. Thanks! Wolf -- PHP General

Re: [PHP] Compilers

2007-10-30 Thread Richard Heyes
Wolf wrote: Anyone use compilers (linux based or Windoze) and which do you use? Looking for something free (best) or low cost as we are doing some investigation on what methods are best for some of the stuff we have, and I'm thinking a compiled PHP app should run faster. There's the free

Re: [PHP] Compilers

2007-10-30 Thread Cristian Vrabie
Richard Heyes wrote: Wolf wrote: Anyone use compilers (linux based or Windoze) and which do you use? Looking for something free (best) or low cost as we are doing some investigation on what methods are best for some of the stuff we have, and I'm thinking a compiled PHP app should run

Re: [PHP] Compilers

2007-10-30 Thread Nathan Nobbe
On 10/30/07, Richard Heyes [EMAIL PROTECTED] wrote: Wolf wrote: Anyone use compilers (linux based or Windoze) and which do you use? Looking for something free (best) or low cost as we are doing some investigation on what methods are best for some of the stuff we have, and I'm thinking

Re: [PHP] Newline

2007-10-30 Thread hochprior
Nathan Nobbe wrote: On 10/29/07, Crayon Shin Chan [EMAIL PROTECTED] wrote: On Sunday 28 October 2007, magoo wrote: I have switched to using single quotes, and found out that newline (\n) only works in double quotes. It looks kind of stupid using 'someString'.\n; and it`s kind of inconsistent

[PHP] C-style macros?

2007-10-30 Thread khang tran
this may already have been asked before, but i'll ask anyway. is there any way to do C-style macros in PHP? i heard a rumor that PHP6 is gonna support this--can anyone confirm to what degree? thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Compilers

2007-10-30 Thread Satyam
In the works: http://phpcompiler.org/ The guys working on it are still actively developing and answering the support list. It does not compile to executable yet (I understand it mostly does except for some tricky parts of the language) but it helps development with other tools that you will

Re: [PHP] moving over to php 5

2007-10-30 Thread Per Jessen
Larry Garfield wrote: The sooner you convince new PHP programmers to do things in a naturally more secure way, the fewer bugs they will accidentally introduce later. And how do you go about convincing them? That's still the key question. /Per Jessen, Zürich -- PHP General Mailing List

Re: [PHP] PHP installation

2007-10-30 Thread Per Jessen
Richard Heyes wrote: OK so now I'm back to compiling PHP after the ridiculous nightmare of rpms. I checked /lib and have the following: [EMAIL PROTECTED] php-5.2.4]# ls -l /lib/libz.so.1.2.3 -rwxr-xr-x 1 root root 71744 Sep 21 19:23 /lib/libz.so.1.2.3 Is PHP looking for a different file?

Re: [PHP] SPL

2007-10-30 Thread Børge Holen
On Monday 29 October 2007 16:26:13 Jim Lucas wrote: Børge Holen wrote: On Sunday 28 October 2007 07:27:53 you wrote: Børge Holen wrote: I found this code at php.net witch needs very little modifications and can do so much, but I can't figure out how to make it read alphabeticly as

[PHP] Session vars in parent dir

2007-10-30 Thread Nathan Hawks
Howdy all, I have a login app that runs at: DOCUMENT_ROOT/admin/index.php and an AJAX action at: DOCUMENT_ROOT/somefile.php The login app and all the scripts based under the admin/ folder have no problems, but the AJAX scripts don't know jack about any stinkin $_SESSION var. I can only

[PHP] re: session question

2007-10-30 Thread Nathan Hawks
Nevermind... I don't know what the problem is yet but it's not the folder. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] More about my weird session

2007-10-30 Thread Nathan Hawks
session_module_name() returns 'files' for both. Altering the session.cookie_path (to set it to /) and session.cookie_domain (to set it to '') did not help. Moving the files to DOCUMENT_ROOT where the Ajax scripts are didn't help; the main app still has the session, the Ajax script still doesn't.

[PHP] Talking to myself about sessions [Solved]

2007-10-30 Thread Nathan Hawks
It was a symfony thing. For anyone else's future reference, if you are integrating with some big monolith of an app and you find that your sessions are disconnected when going from the big app to your little script... check out session_name(). K bye! -- PHP General Mailing List

[PHP] GD Library

2007-10-30 Thread Charlene
I have the GD Library installed, but I don't see any of the fonts. What is the preferred location to download fonts (standard fonts like Arial, Verdana, etc.) and which directory should they be stored in? Charlene -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Stopping objects from auto-serializing

2007-10-30 Thread David Christopher Zentgraf
Hi, I'm trying to set up my PHP app at my host, but am stumbling over the PHP configuration there. register_globals is enabled, which seems to auto-serialize my objects into $_SESSION, which in some cases overwrites variables in there. I'm not sure if register_globals is where the

Re: [PHP] Stopping objects from auto-serializing

2007-10-30 Thread Larry Garfield
Try: php_value register_globals Off That should not have any impact on the $_SESSION array, but turning register globals off anyway is a good thing. On Tuesday 30 October 2007, David Christopher Zentgraf wrote: Hi, I'm trying to set up my PHP app at my host, but am stumbling over the PHP

Re: [PHP] Stopping objects from auto-serializing

2007-10-30 Thread David Christopher Zentgraf
On 31 Oct 2007, at 13:50, Larry Garfield wrote: Try: php_value register_globals Off Same Apache misconfiguration error. Even though the host actually requires me to enable PHP processing via an AddHandler .htaccess directive, php_flag/value directives are throwing an error. Weird.

Re: [PHP] Stopping objects from auto-serializing

2007-10-30 Thread Jochem Maas
David Christopher Zentgraf wrote: Hi, I'm trying to set up my PHP app at my host, but am stumbling over the PHP configuration there. register_globals is enabled, which seems to auto-serialize my objects into $_SESSION, which in some cases overwrites variables in there. I'm not sure if

Re: [PHP] Stopping objects from auto-serializing

2007-10-30 Thread David Christopher Zentgraf
On 31 Oct 2007, at 15:32, Jochem Maas wrote: aside from this error (my guess is your not allowed to override it) I can't see the problem of serialization .. don't put the object in $_SESSION? ... what are you doing? show us the code? I'm not putting the object in $_SESSION, but PHP