RE: [PHP] About Session And Cookies

2007-08-17 Thread Bastien Koert
If cookies are not available, you can either hide the id in the hidden form field element or enable trans_sid to automatically pass the session id in the url bastien> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]; php-general@lists.php.net> Date: Fri, 17 Aug 2007 17:03:54 -0700> Subject: RE:

RE: [PHP] About Session And Cookies

2007-08-17 Thread Warren Vail
Kelvin, Sessions is just one of the items recommended for an e-commerce website. I seem to recall that if cookies were not enabled that there was a way of passing the session id in the URL as a "Get" parameter. Basically you will store the items to be purchased in a special table and a shopper I

[PHP] Re: www.soongy.com

2007-08-17 Thread Dan
What is this supposed to be exactly? I gather from looking at it quickly that uses can signup, then send messages to other signed up users right? So it's like email, but you can only send messages to other people that signup, and login through that specific webpage. Forgive me but I don't see

RE: [PHP] apache/php with sybase12.5

2007-08-17 Thread ROUKOS Michel
Hi, I installed libtool 1.5 and tried again. The libphp.so was not created as well. I tried also to run with ./configure --with-apx2=/usr/local/apache2/bin/apxs make make install same results: libphp5.so is not created under modules/ directory. Thanks and regards, Michel -Original Message--

[PHP] About Session And Cookies

2007-08-17 Thread Kelvin Park
I am trying to setup a secure login system. I've heard that if I use just cookies for login, members without cookie turned out won't be able to see the member pages. Is using session recommended for e-commerce websites with shopping carts? Or, using both of them might be more effective in some

Re: [PHP] cant get if logic correct..

2007-08-17 Thread Wouter van Vliet / Interpotential
is_integer probably wouldn't work, since you're dealing with strings here. Your best friend here would probably be 'is_numeric' which would return true on both the string '1' as the integer 1 true. As well as 1.1 and '1.1'. The only one solution I could think if would be: preg_match('/^\d+$/',

RE: [PHP] Regular Expression just one step away from what I need....

2007-08-17 Thread Jay Blanchard
[snip] I am no regex expert but wouldn't preg_match_all( "/'([^']+)'/Ui", $theString, $matches); Be more flexible? [/snip] Thanks all, I completely forgot about greedy/ungreedy. That is what you get for being rusty! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

Re: [PHP] Which CAPTCHA is the besta?

2007-08-17 Thread tedd
At 3:19 PM -0700 8/16/07, Tony Di Croce wrote: I need a CAPTCHA script Which one is the best? (I dont mind if its somewhat difficult). Tony: 1. No captcha works 100%. 2. All captchas prohibit someone -- the more difficult, the more exclusion. 3. So, if you need a captcha, don't make it d

Re: [PHP] Regular Expression just one step away from what I need....

2007-08-17 Thread Geoff Nicol
I am no regex expert but wouldn't preg_match_all( "/'([^']+)'/Ui", $theString, $matches); Be more flexible? On 8/17/07, Thijs Lensselink <[EMAIL PROTECTED]> wrote: > > > If it's only real words this will do: > > $theString = "'foo''bar''glorp'"; > preg_match_all( "/'([a-z]+)'/Ui", $theString, $ma

Re: [PHP] Regular Expression just one step away from what I need....

2007-08-17 Thread Robert Cummings
On Fri, 2007-08-17 at 12:00 -0500, Jay Blanchard wrote: > Given the string 'foo''bar''glorp' (all quotes are single quotes)I had > hoped to find a regular expression using preg_match that would return an > array containing just those words without having to go through > additional gyrations, like e

Re: [PHP] Regular Expression just one step away from what I need....

2007-08-17 Thread Thijs Lensselink
Jay Blanchard wrote: > Given the string 'foo''bar''glorp' (all quotes are single quotes)I had > hoped to find a regular expression using preg_match that would return an > array containing just those words without having to go through > additional gyrations, like exploding a string to get an array.

[PHP] Re: Regular Expression just one step away from what I need....

2007-08-17 Thread M. Sokolewicz
Jay Blanchard wrote: Given the string 'foo''bar''glorp' (all quotes are single quotes)I had hoped to find a regular expression using preg_match that would return an array containing just those words without having to go through additional gyrations, like exploding a string to get an array. I have

Re: [PHP] apache/php with sybase12.5

2007-08-17 Thread Lens Development
ROUKOS Michel wrote: > Hi, > > I am integrating httpd-2.0.59 with php-5.2.1 and Sybase 12.5 on a > solaris 8 machine. I followed these steps: > Install apache: > > ./configure --prefix=/usr/local/apache2 --enable-so > make > make install > > > PHP configuration: > > > I edited this file php-5.2.1/

[PHP] Regular Expression just one step away from what I need....

2007-08-17 Thread Jay Blanchard
Given the string 'foo''bar''glorp' (all quotes are single quotes)I had hoped to find a regular expression using preg_match that would return an array containing just those words without having to go through additional gyrations, like exploding a string to get an array. I have only had limited luck

Re: [PHP] Re: Which CAPTCHA is the besta?

2007-08-17 Thread Geoff Nicol
There are several PHP Captcha classes available as well. A few examples are: http://www.white-hat-web-design.co.uk/articles/php-captcha.php http://milki.erphesfurt.de/captcha/ http://nogajski.de/horst/php/captcha/

RE: [PHP] cant get if logic correct..

2007-08-17 Thread Sanjeev N
Why don't you try to check for if it is integer. You will get the function to check the variable (is_integer not sure) in manual. Warm Regards, Sanjeev http://www.sanchanworld.com http://webdirectory.sanchanworld.com - Submit your website URL http://webhosting.sanchanworld.com - Choose your best

RE: [PHP] for loop inside a switch

2007-08-17 Thread Sanjeev N
This will not work at all.. Instead of switch try with if condition as follows for ($i=0; $i <21; $i++) { if(faq$i == $q){ echo $faq1; break; } } Now it works.. You can write the code to display the result how you want.. but you cant write the code to write

Re: [PHP] Re: XML editors

2007-08-17 Thread Frank Arensmeier
16 aug 2007 kl. 13.12 skrev Colin Guthrie: Frank Arensmeier wrote: Although I am not able to give you any helping advice, I would like to know if there are any PHP based XML "online" - editors out there (that would allow me to edit XML files online so to say). One thing that poped up in my

Re: [PHP] Re: STDIN Stream Query

2007-08-17 Thread Per Jessen
Jason Freeman wrote: > Per Jessen wrote: >> >> When a file descriptor (stdin) is non-blocking, any read() will not >> block and wait for data to become available, but will return right >> away with or without data. Set the fd to blocking to wait for data. >> > > This is true which is why I put f

RE: [PHP] apache/php with sybase12.5

2007-08-17 Thread ROUKOS Michel
Hi, If I place the following line in httpd.conf LoadModule php5_module "modules/libphp5.so" I receive this error: Syntax error on line 232 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: ld.so.1: /usr/local/apache2/bin/httpd: fatal: /usr/loca

Re: [PHP] php 5 and ms sql server express won't play nice !

2007-08-17 Thread Kirk Friggstad
On 8/17/07, Gregory Machin <[EMAIL PROTECTED]> wrote: > with the suggested config i get the following > > Warning: mssql_connect() [function.mssql-connect]: Unable to connect > to server: (local)\SQLEXPRESS in C:\wamp\www\test\test.php on line 8 > Couldn't connect to SQL Server on (local)\SQLEXPRES

Re: [PHP] Re: STDIN Stream Query

2007-08-17 Thread Jason Freeman
Per Jessen wrote: Jason Freeman wrote: Hi All I am having a problem getting stream_set_blocking to work the way I expect on STDIN. Please could someone tell me why while blocking is set to false fread does not get anything. When a file descriptor (stdin) is non-blocking, any read(

Re: [PHP] apache/php with sybase12.5

2007-08-17 Thread Thijs Lensselink
On Fri, 17 Aug 2007 16:00:35 +0300, "ROUKOS Michel" <[EMAIL PROTECTED]> wrote: > Hi, > > I am integrating httpd-2.0.59 with php-5.2.1 and Sybase 12.5 on a > solaris 8 machine. I followed these steps: > Install apache: > > ./configure --prefix=/usr/local/apache2 --enable-so > make > make install >

[PHP] apache/php with sybase12.5

2007-08-17 Thread ROUKOS Michel
Hi, I am integrating httpd-2.0.59 with php-5.2.1 and Sybase 12.5 on a solaris 8 machine. I followed these steps: Install apache: ./configure --prefix=/usr/local/apache2 --enable-so make make install PHP configuration: I edited this file php-5.2.1/ext/sybase_ct/ php_sybase_ct.h and changed thi

Re: [PHP] Re: isset($a->b) even if $a->b = null

2007-08-17 Thread Borokov Smith
Maybe if you tell us exactly what you wish to achieve. Class variables that are not created at object creation is bad design. Olav Mørkrid schreef: yes, but that assumes you have a defined class. if $a comes from mysql_fetch_object() for instance you have just a stdobject, and this method will p

[PHP] Re: Which CAPTCHA is the besta?

2007-08-17 Thread Al
Here's a simple one you can hack to fit your needs. This a file for generating the captcha image. $src = @imagecreate($width, $height) or die("Cannot Initialize new GD image stream"); $background_color = imagecolorallocate($src, 200, 200, 200); $text_color = imagecolorallocate

Re: [PHP] Re: isset($a->b) even if $a->b = null

2007-08-17 Thread Olav Mørkrid
yes, but that assumes you have a defined class. if $a comes from mysql_fetch_object() for instance you have just a stdobject, and this method will produce an error. On 17/08/07, Michael Preslar <[EMAIL PROTECTED]> wrote: > Found something. > > For class variables.. > > http://us.php.net/manual/en/

Re: [PHP] Re: isset($a->b) even if $a->b = null

2007-08-17 Thread Michael Preslar
Found something. For class variables.. http://us.php.net/manual/en/function.property-exists.php class a { var $b; } if (property_exists('a','b')) { print "yes\n"; } On 8/17/07, Olav Mørkrid <[EMAIL PROTECTED]> wrote: > the test i need should give the following results: > > - FALSE when $a

Re: [PHP] Re: isset($a->b) even if $a->b = null

2007-08-17 Thread Olav Mørkrid
the solution has been found. array_key_exists() can actually be used on objects, and yields the correct result. http://no.php.net/array_key_exists thanks to dordea cosmin for pointing this out. On 17/08/07, Olav Mørkrid <[EMAIL PROTECTED]> wrote: > the test i need should give the following resul

Re: [PHP] Re: isset($a->b) even if $a->b = null

2007-08-17 Thread Olav Mørkrid
the test i need should give the following results: - FALSE when $a->b does not exist at all - TRUE when $a->b = null - TRUE when $a->b = empty() gives true for both $a->b = null and not setting any value, so that's no good. borokovs suggestion seems to miss the purpose. anyone else? On 17/08/

Re: [PHP] isset($a->b) even if $a->b = null

2007-08-17 Thread Michael Preslar
On 8/17/07, Olav Mørkrid <[EMAIL PROTECTED]> wrote: > how do i test if a property of a stdclass object is set, even if its > value is null, similar to how array_key_exists() works for arrays. > > the following method fails: > > $a->b = null; > if(isset($a->b)) > echo "yes"; > > and property

[PHP] Re: isset($a->b) even if $a->b = null

2007-08-17 Thread Colin Guthrie
Olav Mørkrid wrote: > how do i test if a property of a stdclass object is set, even if its > value is null, similar to how array_key_exists() works for arrays. > > the following method fails: > > $a->b = null; > if(isset($a->b)) > echo "yes"; > > and property_exists() seems only to work

Re: [PHP] isset($a->b) even if $a->b = null

2007-08-17 Thread Borokov Smith
Olav Mørkrid schreef: how do i test if a property of a stdclass object is set, even if its value is null, similar to how array_key_exists() works for arrays. the following method fails: $a->b = null; if(isset($a->b)) echo "yes"; and property_exists() seems only to work for defined obje

[PHP] isset($a->b) even if $a->b = null

2007-08-17 Thread Olav Mørkrid
how do i test if a property of a stdclass object is set, even if its value is null, similar to how array_key_exists() works for arrays. the following method fails: $a->b = null; if(isset($a->b)) echo "yes"; and property_exists() seems only to work for defined objects. hope someone can h

[PHP] Re: Re: a DOM object in $_SESSION ?

2007-08-17 Thread Per Jessen
Colin Guthrie wrote: > Per Jessen wrote: >> Does anyone know if this works? I've been trying out a few things, >> and it doesn't seem to work. I.e. the object is there, but the >> contents aren't. > > I think it wont directly but it should be solvable by creating an > class which extends DomDo

RE: [PHP] a DOM object in $_SESSION ?

2007-08-17 Thread Per Jessen
Edward Kay wrote: >> Does anyone know if this works? I've been trying out a few things, >> and it doesn't seem to work. I.e. the object is there, but the >> contents aren't. > > I don't think it is possible due to the way PHP handles the XML data > [1]. > > This is from 2002 / PHP 4.3 but a c

[PHP] Re: a DOM object in $_SESSION ?

2007-08-17 Thread Colin Guthrie
Per Jessen wrote: > Does anyone know if this works? I've been trying out a few things, and > it doesn't seem to work. I.e. the object is there, but the contents > aren't. I think it wont directly but it should be solvable by creating an class which extends DomDocument but also implements __sle

RE: [PHP] a DOM object in $_SESSION ?

2007-08-17 Thread Edward Kay
> Does anyone know if this works? I've been trying out a few things, and > it doesn't seem to work. I.e. the object is there, but the contents > aren't. I don't think it is possible due to the way PHP handles the XML data [1]. This is from 2002 / PHP 4.3 but a comment [2] in the PHP manual for

[PHP] a DOM object in $_SESSION ?

2007-08-17 Thread Per Jessen
Does anyone know if this works? I've been trying out a few things, and it doesn't seem to work. I.e. the object is there, but the contents aren't. thanks Per Jessen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php 5 and ms sql server express won't play nice !

2007-08-17 Thread Tijnema
On 8/16/07, Gregory Machin <[EMAIL PROTECTED]> wrote: > Hi > I have tried most of the configuration options in the php manual / > examples http://www.php.net/function.mssql-connect and I just can't > get it to connect > I'm running WAMP5 and have enables php_mssql.dll extentions etc .. > sql serve

Re: [PHP] php 5 and ms sql server express won't play nice !

2007-08-17 Thread Gregory Machin
with the suggested config i get the following Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: (local)\SQLEXPRESS in C:\wamp\www\test\test.php on line 8 Couldn't connect to SQL Server on (local)\SQLEXPRESS this is my connection script wrote: > SQL Server Express d