php-general Digest 22 Aug 2006 00:17:06 -0000 Issue 4306

2006-08-21 Thread php-general-digest-help
php-general Digest 22 Aug 2006 00:17:06 - Issue 4306 Topics (messages 240943 through 240974): setting a session with a text link? 240943 by: Ross 240949 by: Ivo F.A.C. Fokkema 240952 by: Richard Lynch 240955 by: Ross 240956 by: Richard Lynch Re:

Re: [PHP] Recommendations for PHP debuggers?

2006-08-21 Thread Dave M G
Paul, Robert, Thank you for replying and for your recomendations. While looking into PHP debuggers, I've often come across mention of simply using functions like var_dump() and print_r(). But unless I misunderstand the concept, one has to be always writing these commands into the code, see

[PHP] Re: Recommendations for PHP debuggers?

2006-08-21 Thread Tony Marston
Check out PHPEdit from http://www.waterproof.fr/products/PHPEdit/ It has an integrated debugger and is a lot cheaper than Zend Studio Pro. -- Tony Marston http://www.tonymarston.net http://www.radicore.org Dave M G [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] PHP List, For

[PHP] Re: Recommendations for PHP debuggers?

2006-08-21 Thread Colin Guthrie
Marcus Bointon wrote: On 21 Aug 2006, at 04:55, Dave M G wrote: So I'm looking around for other debugging options. One oft-overlooked option: xdebug.org. It enhances PHP's built-in debugging features enormously, adds profiling, trace and coverage logging, remote debugging too. The improved

Re: [PHP] Recommendations for PHP debuggers?

2006-08-21 Thread Marcus Bointon
On 21 Aug 2006, at 04:55, Dave M G wrote: So I'm looking around for other debugging options. One oft-overlooked option: xdebug.org. It enhances PHP's built-in debugging features enormously, adds profiling, trace and coverage logging, remote debugging too. The improved readability of stack

[PHP] Regex

2006-08-21 Thread Nadim Attari
Hello, I have some text in a table... the text contains hyperlinks (but not html coded, i.e. plain Some text...http://www.something.com;) When i retrieve these texts from the table, i want the hyperlinks to become clickable, i.e. a href etc added automatically. Some text...a

[PHP] stupid compile problem... additional ini files not found

2006-08-21 Thread Jochem Maas
hi people, anyone know why my additional ini files are being ignored. I've just built php5.1.1 the configure line is: './configure' '--with-interbase=shared,/opt/firebird' '--with-apxs2=/usr/sbin/apxs' '--with-gd=shared' '--with-zlib-dir' '--with-jpeg-dir'

[PHP] setting a session with a text link?

2006-08-21 Thread Ross
I want to set a session with a text link, am having problems with the syntax. The link swiches the session to on or off. a href= class=link_textswtich off/a href= class=link_textswtich on/a I want to do this but the syntax is incorrect. ?=$_SERVER['PHP_SELF']?$_SESSION['switch]='0'; ?

Re: [PHP] stupid compile problem... additional ini files not found

2006-08-21 Thread John Nichel
Jochem Maas wrote: hi people, anyone know why my additional ini files are being ignored. I've just built php5.1.1 the configure line is: './configure' '--with-interbase=shared,/opt/firebird' '--with-apxs2=/usr/sbin/apxs' '--with-gd=shared' '--with-zlib-dir' '--with-jpeg-dir'

Re: [PHP] stupid compile problem... additional ini files not found

2006-08-21 Thread Jochem Maas
John Nichel wrote: Jochem Maas wrote: hi people, anyone know why my additional ini files are being ignored. I've just built php5.1.1 the configure line is: './configure' '--with-interbase=shared,/opt/firebird' '--with-apxs2=/usr/sbin/apxs' '--with-gd=shared' '--with-zlib-dir'

Re: [PHP] Recommendations for PHP debuggers?

2006-08-21 Thread Larry Garfield
I use the Zend IDE at work, and honestly I love just about everything about it except the price. The setup can be tricky, but I'm an IT guy so it didn't take weeks, just an hour or two with our company server. :-) Having used both the real time debugger and print-method (sometimes fancily

[PHP] [SOLVED - THE REDHAT WAY] Re: [PHP] stupid compile problem... additional ini files not found

2006-08-21 Thread Jochem Maas
I worked round my problem by adding the contents of my additional ini files to the bottom of the std ini file - a typical redhat solution to a typical redhat problem (I only ever seem to have to go through this kind of crap on Redhat - Debian is much nicer to me). Jochem Maas wrote: hi people,

[PHP] Re: Recommendations for PHP debuggers?

2006-08-21 Thread Colin Guthrie
Larry Garfield wrote: I'm watching this thread closely myself, as I'd love something to use at home (on Linux) that doesn't cost what Zend does. :-) Currently I use PHPeclipse, but it is frankly not that good (the code assistance feature is rudimentary at best), and I've not setup the

[PHP] Re: setting a session with a text link?

2006-08-21 Thread Ivo F.A.C. Fokkema
On Mon, 21 Aug 2006 13:08:04 +0100, Ross wrote: I want to set a session with a text link, am having problems with the syntax. The link swiches the session to on or off. a href= class=link_textswtich off/a href= class=link_textswtich on/a I want to do this but the syntax is incorrect.

[PHP] Re: Regex

2006-08-21 Thread Ivo F.A.C. Fokkema
On Mon, 21 Aug 2006 13:51:16 +0400, Nadim Attari wrote: Hello, I have some text in a table... the text contains hyperlinks (but not html coded, i.e. plain Some text...http://www.something.com;) When i retrieve these texts from the table, i want the hyperlinks to become clickable, i.e.

Re: [PHP] Re: Recommendations for PHP debuggers?

2006-08-21 Thread Dan McCullough
How is this different then what they try and sell you for $249. I have eclipse for Java development, and was looking at Zends package for PHP development, but if they are basically selling me the same thing then I would go with eclipse. On 8/21/06, Colin Guthrie [EMAIL PROTECTED] wrote: Larry

Re: [PHP] setting a session with a text link?

2006-08-21 Thread Richard Lynch
On Mon, August 21, 2006 7:08 am, Ross wrote: I want to set a session with a text link, am having problems with the syntax. The link swiches the session to on or off. a href= class=link_textswtich off/a href= class=link_textswtich on/a I want to do this but the syntax is incorrect.

Re: [PHP] Regex

2006-08-21 Thread Richard Lynch
On Mon, August 21, 2006 4:51 am, Nadim Attari wrote: I have some text in a table... the text contains hyperlinks (but not html coded, i.e. plain Some text...http://www.something.com;) When i retrieve these texts from the table, i want the hyperlinks to become clickable, i.e. a href etc added

Re: [PHP] stupid compile problem... additional ini files not found

2006-08-21 Thread Richard Lynch
Are /etc and /etc/php.d set to be executable by the PHP user?... Though I *thought* the files were getting read by root at Apache startup, so that shouldn't matter... Did you remember to restart Apache? Are you 100% sure your apache restart script didn't fail to kill/start it?... I spent most

[PHP] Re: setting a session with a text link?

2006-08-21 Thread Ross
That is it but can I not set the session variable directly from the link? Something like.. print('A href=' . $_SERVER['PHP_SELF'] . '?$_SESSION['switch=on']Switch on/ABR Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, 21 Aug 2006 13:08:04 +0100, Ross

Re: [PHP] Re: setting a session with a text link?

2006-08-21 Thread Richard Lynch
a href=?php echo $_SERVER['PHP_SELF']??_SESSION[switch]=0off/a This *might* work, if you have session.auto_start set to ON, so that the session is started before PHP processes the URL, and if you have register_globals set to ON But I doubt it, as that would be horrible security, because you

Re: [PHP] syntax error help

2006-08-21 Thread Richard Lynch
Older version of MySQL does not support subselects. On Sun, August 20, 2006 5:18 am, Bigmark wrote: Can anyone tell me why this works on my localhost but gets an error on my server: ?php $sql = SELECT COUNT(*) FROM leaderboard WHERE points =( SELECT points FROM leaderboard WHERE

Re: [PHP] dynamic variable usage

2006-08-21 Thread Richard Lynch
On Sat, August 19, 2006 10:49 am, Hiren Parmar wrote: i have one problem regarding variable's access ... i hv defined some varibale like DEFINE('_xx_USERNAME','Username'); in one file ... and in another file , i got this variable (_xx_USERNAME) as a value of another variable ... like

Re: [PHP] OT alternate website authentication methods

2006-08-21 Thread Richard Lynch
On Fri, August 18, 2006 4:08 pm, Chris W. Parker wrote: Last night I was reading Chris Shiflett's PHP Security book from O'Reilly and got to thinking about ways to authenticate a user other than using a password. Ideas: 1. Use flash to allow the user to draw an image. If the original image

Re: [PHP] number list

2006-08-21 Thread Richard Lynch
On Sun, August 20, 2006 12:30 am, Bigmark wrote: Hi, can anyone help me with this at all. i have a table leaderboard with username points etc and can echo the scores in asc order ok but what i want is to grab the scores and display a users position using their session ID. So if the scores

[PHP] preg_match problem

2006-08-21 Thread afan
hi. I have to check if the script file belongs to any ov form1.php to form6.php files. Need something like: preg_match('/form*.php/', $_SERVER['PHP_SELF']) wher * kan be any number between 1 and 6. Thanks for any help. -afan -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] preg_match problem

2006-08-21 Thread Dave Goodchild
On 21/08/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hi. I have to check if the script file belongs to any ov form1.php to form6.php files. Need something like: preg_match('/form*.php/', $_SERVER['PHP_SELF']) wher * kan be any number between 1 and 6. Thanks for any help. the pattern is

[PHP] Re: preg_match problem

2006-08-21 Thread Alex Turner
Off the top of my head: /form[1-6]\.php/ AJ www.deployview.com [EMAIL PROTECTED] wrote: hi. I have to check if the script file belongs to any ov form1.php to form6.php files. Need something like: preg_match('/form*.php/', $_SERVER['PHP_SELF']) wher * kan be any number between 1 and 6.

Re: [PHP] preg_match problem

2006-08-21 Thread Alex Turner
I think this pattern would also match form16.php etc, which I think is not what afan wanted. Dave Goodchild wrote: On 21/08/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hi. I have to check if the script file belongs to any ov form1.php to form6.php files. Need something like:

Re: [PHP] stupid compile problem... additional ini files not found

2006-08-21 Thread Jochem Maas
hi Richard, Richard Lynch wrote: Are /etc and /etc/php.d set to be executable by the PHP user?... read and execute bit is on for everyone on those dirs. Though I *thought* the files were getting read by root at Apache startup, so that shouldn't matter... Did you remember to restart

Re: [PHP] preg_match problem

2006-08-21 Thread afan
Works perfect. Thanks! ;) -afan function doMatch($f) { echo $f, = , (preg_match(#^form[1-6]\.php\$#,basename($f))?true:false), \n; } doMatch(form1.php); // true doMatch(form2.php); // true doMatch(form3.php); // true doMatch(form4.php);

Re: [PHP] Shopping cart

2006-08-21 Thread Gerry D
So if I understand you gentlemen correctly, these pre-builds serve as examples how NOT to do it? Gerry On 8/20/06, Larry Garfield [EMAIL PROTECTED] wrote: On Sunday 20 August 2006 20:17, Gerry D wrote: On 8/19/06, Larry Garfield [EMAIL PROTECTED] wrote: OSCommerce is crap. Don't bother.

Re: [PHP] preg_match problem

2006-08-21 Thread Jochem Maas
function doMatch($f) { echo $f, = , (preg_match(#^form[1-6]\.php\$#,basename($f))?true:false), \n; } doMatch(form1.php); // true doMatch(form2.php); // true doMatch(form3.php); // true doMatch(form4.php); // true doMatch(form5.php); //

[PHP] Re: [css-d] Where CSS, XHTML and Javascript meet

2006-08-21 Thread Kevin Murphy
Don't forget that you can also do the CSS inline: body style=background: url(/images/$random_image) And then also in the CSS file have all the other declarations for the body tag. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu

[PHP] Re: Regex

2006-08-21 Thread M. Sokolewicz
Nadim Attari wrote: Hello, I have some text in a table... the text contains hyperlinks (but not html coded, i.e. plain Some text...http://www.something.com;) When i retrieve these texts from the table, i want the hyperlinks to become clickable, i.e. a href etc added automatically. Some

Re: [PHP] Re: Regex

2006-08-21 Thread Dave Goodchild
On 21/08/06, M. Sokolewicz [EMAIL PROTECTED] wrote: A little harsh but I agree with the sentiment - plus you will get a lot of pleasure out of it when you see how powerful a tool it is in your arsenal. -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk

[PHP] Re: Regex

2006-08-21 Thread Alex Turner
If what you mean is a db table, then it would seem to me that you should not be using a regex. PHP has rawurlencode() for this sort of thing. But - you should learn regex ;-) Try something like (untested and late at night) function urlme($location) { $enc=rawurlencode($location);

Re: [PHP] Re: Regex

2006-08-21 Thread J R
http://www.php.net/manual/en/reference.pcre.pattern.syntax.php On 8/22/06, Alex Turner [EMAIL PROTECTED] wrote: If what you mean is a db table, then it would seem to me that you should not be using a regex. PHP has rawurlencode() for this sort of thing. But - you should learn regex ;-) Try

Re: [PHP] Recommendations for PHP debuggers?

2006-08-21 Thread Yann Larrivee
Hello, Just use xdebug www.xdebug.org It's nice, and IDE independant. It also generate code profile (in case you need to optimise) Has far has IDE wise. I know Komodo use xdebug for it's debugger and code step trough, so it must be good. If you have more questions regarding xdebug let me

Re: [PHP] Shopping cart

2006-08-21 Thread Larry Garfield
There may be other canned solutions that are not as bad as OSCommerce. It's the only one I've worked with other than Drupal. I've worked with Drupal extensively, but haven't used its ecommerce modules extensively. But yes, I highly recommend OSCommerce as an example of how not to write a PHP

Re: [PHP] Re: Recommendations for PHP debuggers?

2006-08-21 Thread Larry Garfield
On Monday 21 August 2006 09:52, Colin Guthrie wrote: Larry Garfield wrote: I'm watching this thread closely myself, as I'd love something to use at home (on Linux) that doesn't cost what Zend does. :-) Currently I use PHPeclipse, but it is frankly not that good (the code assistance feature

Re: [PHP] Recommendations for PHP debuggers?

2006-08-21 Thread Lester Caine
Larry Garfield wrote: I'm watching this thread closely myself, as I'd love something to use at home (on Linux) that doesn't cost what Zend does. :-) Currently I use PHPeclipse, but it is frankly not that good (the code assistance feature is rudimentary at best), and I've not setup the