php-general Digest 23 Aug 2004 05:17:48 -0000 Issue 2952

Topics (messages 194426 through 194449):

Re: OO in PHP5.0 - Referencing Object or not?!
        194426 by: Raffael Wannenmacher
        194429 by: l0t3k
        194430 by: Daniel Schierbeck
        194434 by: Curt Zirzow

matching system - anyone seen any?
        194427 by: Kim Steinhaug

PHP5 Gd Library error compiling
        194428 by: Martin Visser
        194437 by: Curt Zirzow

Re: Linkpoint API question
        194431 by: Brian Dunning

Re: [OFF] Double charges on credit cards
        194432 by: Brian Dunning

Re: Class Con- and Destructor Inheritance
        194433 by: Justin Patrin
        194436 by: Curt Zirzow

PHP4/5 MySQL nested query problem
        194435 by: Kevin Wormington
        194438 by: John Holmes
        194443 by: Kevin Wormington

Instant message
        194439 by: Phpu
        194447 by: Manuel Lemos
        194448 by: Manuel Lemos

Submitting "get" form
        194440 by: Gerard Samuel
        194441 by: John Holmes
        194442 by: Chris Shiflett
        194446 by: Gerard Samuel

php4 classes, extending same class
        194444 by: MnP

Re: [OFF] - Fraudulent web orders - any ideas?
        194445 by: Grant

After upgrading PHP, Session Values not stored properly
        194449 by: Sheni R. Meledath

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Daniel Schierbeck wrote:

Raffael Wannenmacher wrote:

hello together

look at the following code ...

why is this ..

-- code start
if ( is_object($this->getManagerObject()->getDataFieldManager()) )
{
for ( $j = 0; $j < $this->getManagerObject()->getDataFieldManager()->getCount(); $j++ )
{
if ( $this->getManagerObject()->getDataFieldManager()->m_objData[$j]['GI_ID'] == $this->getID() )
{
$l_objDataField = new GalleryDataField(
$this->getManagerObject()->getDataFieldManager(),
$this->getManagerObject()->getDataFieldManager()->m_objData[$j]
);


$l_objDataField->generateXML();

$l_strData .= $l_objDataField->getXML();

unset($l_objDataField);
}
}
}
-- code end

.. about 2 seconds slower than this ..

-- code start
$l_objDataFieldManager = $this->getManagerObject()->getDataFieldManager();


if ( is_object( $l_objDataFieldManager ) )
{
for ( $j = 0; $j < $l_objDataFieldManager->getCount(); $j++ )
{
if ( $l_objDataFieldManager->m_objData[$j]['GI_ID'] == $this->getID() )
{
$l_objDataField = new GalleryDataField(
$l_objDataFieldManager,
$l_objDataFieldManager->m_objData[$j]
);

$l_objDataField->generateXML();

$l_strData .= $l_objDataField->getXML();

unset($l_objDataField);
}
}
}

unset($l_objDataFieldManager);
-- code end

???

i just read, that objects in php 5 automatically returned as reference? in my code it doesn't seems like that!!

ps: variable m_objData contains a lot of data from a mysql db

thanks for answers.

As you can read in some of the posts here, it only SEEMS like the objects are passed by reference (it's a conspiracy!). I'm not sure if it'll help you, but try using the ampersand (&) symbol to force passing-by-reference.



Cheers, Daniel

if i put de ampersand ( & ) everywhere, where it should pass as reference, the script runs as longer as without ampersand.. its really confusing !!!

...

"In PHP 5, the infrastructure of the object model was rewritten to work with object handles. Unless you explicitly clone an object by using the clone keyword you will never create behind the scene duplicates of your objects. In PHP 5, there is neither a need to pass objects by reference nor assigning them by reference.

Note: Passing by reference and assigning by reference is still supported, in case you want to actually change a variable’s content (whether object or other type)."
-> source: http://www.zend.com/php5/andi-book-excerpt.php


"Be warned, though—normal variables (i.e. those which aren’t objects) are still copied (from my experiments with the beta), so if you need to pass one by reference you still need to use the & reference operator."
-> source: http://www.sitepoint.com/print/1192


do u have a url to a document where this attitude/behavior is explained for real, in detail?!

thenks!
--- End Message ---
--- Begin Message ---
Raffael,
    object in PHP5 _are_ passed by reference. internally, objects are
handles unique to a request, so all youre doing is passing a handle around.
note, however, that simple variable access will _always_ be faster than
method calls. this is true in C as well as PHP, except in PHP the effects
are more noticeable since it is interpreted rather than compiled.

l0t3k

--- End Message ---
--- Begin Message --- L0t3k wrote:
Raffael,
    object in PHP5 _are_ passed by reference. internally, objects are
handles unique to a request, so all youre doing is passing a handle around.
note, however, that simple variable access will _always_ be faster than
method calls. this is true in C as well as PHP, except in PHP the effects
are more noticeable since it is interpreted rather than compiled.

l0t3k
Just to get things straight:

        <?php

        class Foo
        {
                public $foo = "bar";
        }

        $obj1 = new Foo;
        $obj2 = $obj1;
        $obj3 = $obj2;

        $obj2 = NULL;

        echo $obj1->foo;

        ?>

outputs

        bar

while

        <?php

        class Foo
        {
                public $foo = "bar";
        }

        $obj1 = new Foo;
        $obj2 =& $obj1;
        $obj3 =& $obj2;

        $obj2 = NULL;

        echo $obj1->foo;

        ?>

outputs

Notice: Trying to get property of non-object in /free1go/a/o/www.aoide.1go.dk/lab/bar.php5 on line 16

Hence, there is a difference between references and object handles. When you pass by reference,for instance $foo =& $bar, where $bar is an object, $foo will point to whatever $bar is pointing to. When you write $foo = $bar, $foo will point to the same object as $bar, but $foo is not forever bound to $bar, as in the first example. It simply has the same object handle. Therefore, when you delete $bar ($bar = NULL), $foo will be intact when using =, but will be set to NULL as well when using =&.


Cheers, Daniel

--- End Message ---
--- Begin Message ---
* Thus wrote Raffael Wannenmacher:
> hello together
> 
> look at the following code ...
> 
> why is this ..
> 
> -- code start
>        if ( is_object($this->getManagerObject()->getDataFieldManager()) )
>        {
>            for ( $j = 0; $j < 
> $this->getManagerObject()->getDataFieldManager()->getCount(); $j++ )
> ...
>
> -- code end
> 
> .. about 2 seconds slower than this ..
> 
> -- code start
>        $l_objDataFieldManager = 
> $this->getManagerObject()->getDataFieldManager();
> 
>        if ( is_object( $l_objDataFieldManager ) )
>        {
>            for ( $j = 0; $j < $l_objDataFieldManager->getCount(); $j++ )
>            {
>                if ( $l_objDataFieldManager->m_objData[$j]['GI_ID'] == 
> $this->getID() )
>...

This would be expected since each time through the loop, because
the first one has to call a method returning an object of which its
method is called returning another object of another method is then
called upon each time the loop iteration occurs, vs. the latter
where one method is called.

>...
> -- code end
> 
> ???
> 
> i just read, that objects in php 5 automatically returned as reference? 
> in my code it doesn't seems like that!!

The code execution time, in your case, has nothing to do with how
the objects are being returned. You are calling several method()
calls to access one object within a loop, you're second way of
accessing the object is the more sensible way to approach this.


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

--- End Message ---
--- Begin Message ---
I wonder if anyone have come across a script/system that already has
this feature, else I would need to do it all over again. The scenario is
this :

I want people to select the movies they have seen and rate them 1/10.
Movies not available in the "polling" system they can add, and rate them.
This way the database is constantly growing, and ratings are constantly
added.

You can rate as many films you want, or noen if you like.

Then, after you have rated you can "match" your ratings to find other
people that match your selections. More like matching a profile really.

There would be some sort of system inside here which could build a form
of profile based on your ratings, and then compare theese profiles. I
havnt really started planning how this would work, or should work, but
first mainly if anyone has seen such a system around.

Looking for existing wheels... :D

-- 
Kim Steinhaug
-------------------------------------------------------------------------
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
-------------------------------------------------------------------------
www.steinhaug.com - www.easywebshop.no - www.easycms.no www.webkitpro.com
-------------------------------------------------------------------------

--- End Message ---
--- Begin Message ---
PHP5, with GD on Linux (Slackware 10.0)


./configure goes just fine, but when I try 'make', there's an error.

this is how I configured it:
./configure --prefix=/usr/local/php5 --with-zlib --with-pear=/usr/share/pear --with-mysql=/usr/local/mysql --includedir=/usr/include --without-sqlite --disable-cgi --with-apxs2=/usr/local/apache2/bin/apxs --with-freetype-dir=/usr/include/freetype2 --enable-gd-native-tt --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib --with-xpm-dir=/usr/local/lib --with-gd=/usr/local/include


this is some off the output (the GD part):
+++++
checking for GD support... yes
checking for the location of libjpeg... /usr/local/lib
checking for the location of libpng... /usr/local/lib
checking for the location of libXpm... /usr/local/lib
checking for FreeType 1.x support... no
checking for FreeType 2... /usr/include/freetype2
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
checking for XpmFreeXpmImage in -lXpm... yes
checking for gdImageString16 in -lgd... yes
checking for gdImagePaletteCopy in -lgd... yes
checking for gdImageCreateFromPng in -lgd... yes
checking for gdImageCreateFromGif in -lgd... yes
checking for gdImageGif in -lgd... yes
checking for gdImageWBMP in -lgd... yes
checking for gdImageCreateFromJpeg in -lgd... yes
checking for gdImageCreateFromXpm in -lgd... yes
checking for gdImageCreateFromGd2 in -lgd... yes
checking for gdImageCreateTrueColor in -lgd... yes
checking for gdImageSetTile in -lgd... yes
checking for gdImageEllipse in -lgd... no
checking for gdImageSetBrush in -lgd... yes
checking for gdImageStringTTF in -lgd... yes
checking for gdImageStringFT in -lgd... yes
checking for gdImageStringFTEx in -lgd... yes
checking for gdImageColorClosestHWB in -lgd... yes
checking for gdImageColorResolve in -lgd... yes
checking for gdImageGifCtx in -lgd... yes
checking for gdCacheCreate in -lgd... yes
checking for gdFontCacheShutdown in -lgd... yes
checking for gdNewDynamicCtxEx in -lgd... yes
checking for gdImageCreate in -lgd... yes
+++++
-------------------------------------------------
if you have something to say about this, go ahead; I just started to use Linux and this is the first time I did this.
I've installed PHP 4 on a Windows box, with the gd library and that worked.
-------------------------------------------------


this is the error I get when I 'make' the configuration:
+++++ (everything above this contains no errors)
ext/gd/gd.lo(.text+0x1be8): In function `zif_imagecolormatch':
/usr/local/php5/ext/gd/gd.c:902: undefined reference to `gdImageColorMatch'
ext/gd/gd.lo(.text+0x4242): In function `zif_imagerotate':
/usr/local/php5/ext/gd/gd.c:1215: undefined reference to `gdImageRotate'
ext/gd/gd.lo(.text+0x5823): In function `zif_imagexbm':
/usr/local/php5/ext/gd/gd.c:1837: undefined reference to `gdImageXbmCtx'
ext/gd/gd.lo(.text+0x8218): In function `zif_imageline':
/usr/local/php5/ext/gd/gd.c:2305: undefined reference to `gdImageAALine'
ext/gd/gd.lo(.text+0x9a01): In function `zif_imageellipse':
/usr/local/php5/ext/gd/gd.c:2444: undefined reference to `gdImageEllipse'
ext/gd/gd.lo(.text+0xe7d3): In function `php_image_filter_negate':
/usr/local/php5/ext/gd/gd.c:4002: undefined reference to `gdImageNegate'
ext/gd/gd.lo(.text+0xe89f): In function `php_image_filter_grayscale':
/usr/local/php5/ext/gd/gd.c:4013: undefined reference to `gdImageGrayScale'
ext/gd/gd.lo(.text+0xe97f): In function `php_image_filter_brightness':
/usr/local/php5/ext/gd/gd.c:4036: undefined reference to `gdImageBrightness'
ext/gd/gd.lo(.text+0xea66): In function `php_image_filter_contrast':
/usr/local/php5/ext/gd/gd.c:4059: undefined reference to `gdImageContrast'
ext/gd/gd.lo(.text+0xeb51): In function `php_image_filter_colorize':
/usr/local/php5/ext/gd/gd.c:4082: undefined reference to `gdImageColor'
ext/gd/gd.lo(.text+0xec1d): In function `php_image_filter_edgedetect':
/usr/local/php5/ext/gd/gd.c:4093: undefined reference to `gdImageEdgeDetectQuick'
ext/gd/gd.lo(.text+0xece9): In function `php_image_filter_emboss':
/usr/local/php5/ext/gd/gd.c:4104: undefined reference to `gdImageEmboss'
ext/gd/gd.lo(.text+0xedb5): In function `php_image_filter_gaussian_blur':
/usr/local/php5/ext/gd/gd.c:4115: undefined reference to `gdImageGaussianBlur'
ext/gd/gd.lo(.text+0xee81): In function `php_image_filter_selective_blur':
/usr/local/php5/ext/gd/gd.c:4126: undefined reference to `gdImageSelectiveBlur'
ext/gd/gd.lo(.text+0xef4d): In function `php_image_filter_mean_removal':
/usr/local/php5/ext/gd/gd.c:4137: undefined reference to `gdImageMeanRemoval'
ext/gd/gd.lo(.text+0xf034): In function `php_image_filter_smooth':
/usr/local/php5/ext/gd/gd.c:4161: undefined reference to `gdImageSmooth'
ext/gd/gd.lo(.text+0xf231): In function `zif_imageantialias':
/usr/local/php5/ext/gd/gd.c:4216: undefined reference to `gdImageAntialias'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


I tried to compile PHP with only --with-gd (without --with-jpeg-dir etc) and than I get an error:
Fatal error: Call to undefined function imagecreatefromjpeg()



does anyone know how to solve this problem?

Martin
--- End Message ---
--- Begin Message ---
* Thus wrote Martin Visser:
> PHP5, with GD on Linux (Slackware 10.0)
> 
> 
> ./configure goes just fine, but when I try 'make', there's an error.
> 
> this is how I configured it:
> ./configure --prefix=/usr/local/php5 --with-zlib 
> --with-pear=/usr/share/pear --with-mysql=/usr/local/mysql 
> --includedir=/usr/include --without-sqlite --disable-cgi 
> --with-apxs2=/usr/local/apache2/bin/apxs 
> --with-freetype-dir=/usr/include/freetype2 --enable-gd-native-tt 
> --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib 
> --with-xpm-dir=/usr/local/lib --with-gd=/usr/local/include
> 
>...
> 
> this is the error I get when I 'make' the configuration:
> +++++ (everything above this contains no errors)
> ext/gd/gd.lo(.text+0x1be8): In function `zif_imagecolormatch':
> /usr/local/php5/ext/gd/gd.c:902: undefined reference to `gdImageColorMatch'

This is usually due to header and library mismatch from my
exprirence.

>...
> 
> I tried to compile PHP with only --with-gd (without --with-jpeg-dir etc) 
> and than I get an error:
> Fatal error: Call to undefined function imagecreatefromjpeg()
> 
> 
> does anyone know how to solve this problem?

did you try it with: 
  configure --with-gd 
  or
  configure --with-gd=/usr/...


You can leave in the --with-jpeg-dir directives, it simply sounds
like you have mulitple versions (gd1 and gd2) on your system and
things are getting confused when it gets compiled.



Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

--- End Message ---
--- Begin Message --- Solved. The first transaction should be a PREAUTH, and the second transaction should be a POSTAUTH. Linkpoint's documentation is incorrect where it lists the possible transaction types. POSTAUTH shows up as TICKET in the transaction report, but it doesn't work if you try to send it as TICKET.

Nicely done, Linkpoint. Thanks to all for the help.  :)

- Brian
--- End Message ---
--- Begin Message --- Solved. As suggested, the tech guy at EFS was on paint. The first transaction should be an AUTH, and the second transaction should be PRIOR_AUTH_CAPTURE, not just CAPTURE.

Thanks everyone for confirming there was no way what the guy said could be true... :)
--- End Message ---
--- Begin Message ---
On Sun, 22 Aug 2004 13:04:11 +0200, Daniel Schierbeck <[EMAIL PROTECTED]> wrote:
> Hello there. I was experimenting a bit with the constructors and
> destructors, and found that this code:
> 
>         <?php
> 
>         class First
>         {
>                 public function __construct ()
>                 {
>                         echo "Hello, World!\n";
>                 }
> 
>                 public function __destruct ()
>                 {
>                         echo "Goodbye, World!\n";
>                 }
>         }
> 
>         class Second extends First
>         {
> 
>         }
> 
>         $second = new Second;
> 
>         ?>
> 
> Outputs
> 
>         Hello, World!
>         Goodbye, World!
> 
> , yet the PHP manual
> (http://www.php.net/manual/en/language.oop5.decon.php) says:
> 
>         Note:  Parent constructors are not called implicitly. In order
>         to run a parent constructor, a call to parent::__construct() is
>         required.
> 
> Is this an error in the manual or in PHP itself? Should I report it
> somewhere?
> 

No, this is not a bug. This means that if you define a new constructor
/ destructor, the parent class's won't be called unless you put it in
the new ones.

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

--- End Message ---
--- Begin Message ---
* Thus wrote Justin Patrin:
> On Sun, 22 Aug 2004 13:04:11 +0200, Daniel Schierbeck <[EMAIL PROTECTED]> wrote:
> > 
> > ...
> > 
> >         Note:  Parent constructors are not called implicitly. In order
> >         to run a parent constructor, a call to parent::__construct() is
> >         required.
> > 
> > Is this an error in the manual or in PHP itself? Should I report it
> > somewhere?
> > 
> 
> No, this is not a bug. This means that if you define a new constructor
> / destructor, the parent class's won't be called unless you put it in
> the new ones.

Although not a bug, it is a little misleading, i've corrected it to
explain when the constructor isn't called.


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

--- End Message ---
--- Begin Message --- I have ran into an interesting query performance problem that occurs with both 4.3.7 and 5.0.1 against a MySQL 4.1 database. The test program (attached below) works, but performance is extremely sloooow, a perl version of the test program completes in less than 5 seconds with 80k records in table 1 and 138k records in table 2. The PHP program is taking something like 1 to 2 seconds per record. This only seems to occur when you have a query nested inside of another. My test program attached uses mysqli, but mysql functions yield the same result. Any ideas would be appreciated.

<?
$link = mysqli_connect("localhost","test","test","db");

$qry = "select a,b from table1";

$result = mysqli_query($link,$qry);
if (!$result) { echo mysql_error() . "\n"; }
while ($data = mysqli_fetch_array($result, MYSQLI_BOTH)) {
    $sql = "select * from table2 where common=".$data[0];
    $result2 = mysqli_query($link,$sql);
    if (!$result2) { echo mysql_error() . "\n"; }
    while ($data2 = mysqli_fetch_array($result2,MYSQLI_BOTH)) {
      $linenum++;
    }
    mysqli_free_result($result2);
}
mysqli_free_result($result);
mysqli_close($link);

--- End Message ---
--- Begin Message ---
Kevin Wormington wrote:

I have ran into an interesting query performance problem that occurs with both 4.3.7 and 5.0.1 against a MySQL 4.1 database. The test program (attached below) works, but performance is extremely sloooow, a perl version of the test program completes in less than 5 seconds with 80k records in table 1 and 138k records in table 2. The PHP program is taking something like 1 to 2 seconds per record. This only seems to occur when you have a query nested inside of another. My test program attached uses mysqli, but mysql functions yield the same result. Any ideas would be appreciated.

<?
$link = mysqli_connect("localhost","test","test","db");

$qry = "select a,b from table1";

$result = mysqli_query($link,$qry);
if (!$result) { echo mysql_error() . "\n"; }
while ($data = mysqli_fetch_array($result, MYSQLI_BOTH)) {
    $sql = "select * from table2 where common=".$data[0];
    $result2 = mysqli_query($link,$sql);
    if (!$result2) { echo mysql_error() . "\n"; }
    while ($data2 = mysqli_fetch_array($result2,MYSQLI_BOTH)) {
      $linenum++;
    }
    mysqli_free_result($result2);
}
mysqli_free_result($result);
mysqli_close($link);

Is there some fundamental reason you're using nested queries instead of a JOIN? PHP is generally slower in loops compared to Perl from the comparisons I've seen, but the real issue is why are you using nested queries to begin with...


--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message --- My "real" application has inserts and does other various forms of processing in the loops which cannot be done from pure sql via join, etc. The test program I attached was just the minimum required to see the performance issue. I agree that PHP is probably a little slower that perl in loops, but not 5 seconds vs. several hours.

Kevin
On Aug 22, 2004, at 9:49 PM, John Holmes wrote:

Kevin Wormington wrote:

I have ran into an interesting query performance problem that occurs with both 4.3.7 and 5.0.1 against a MySQL 4.1 database. The test program (attached below) works, but performance is extremely sloooow, a perl version of the test program completes in less than 5 seconds with 80k records in table 1 and 138k records in table 2. The PHP program is taking something like 1 to 2 seconds per record. This only seems to occur when you have a query nested inside of another. My test program attached uses mysqli, but mysql functions yield the same result. Any ideas would be appreciated.
<?
$link = mysqli_connect("localhost","test","test","db");
$qry = "select a,b from table1";
$result = mysqli_query($link,$qry);
if (!$result) { echo mysql_error() . "\n"; }
while ($data = mysqli_fetch_array($result, MYSQLI_BOTH)) {
$sql = "select * from table2 where common=".$data[0];
$result2 = mysqli_query($link,$sql);
if (!$result2) { echo mysql_error() . "\n"; }
while ($data2 = mysqli_fetch_array($result2,MYSQLI_BOTH)) {
$linenum++;
}
mysqli_free_result($result2);
}
mysqli_free_result($result);
mysqli_close($link);

Is there some fundamental reason you're using nested queries instead of a JOIN? PHP is generally slower in loops compared to Perl from the comparisons I've seen, but the real issue is why are you using nested queries to begin with...


--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Hi,
I have a site where people meet and talk. I want to be able to send instant messages 
to those who are online, but i do not know how to do it.
I need java? Can i do it in php?
Please give me a link or something to grab
Thanks

--- End Message ---
--- Begin Message ---
Hello,

On 08/22/2004 09:07 PM, Phpu wrote:
I have a site where people meet and talk. I want to be able to send instant messages 
to those who are online, but i do not know how to do it.
I need java? Can i do it in php?

You may find some classes here precisely for that purpose:

http://www.phpclasses.org/browse/class/66.html




--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--- End Message ---
--- Begin Message ---
Hello,

On 08/22/2004 09:07 PM, Phpu wrote:
I have a site where people meet and talk. I want to be able to send instant messages 
to those who are online, but i do not know how to do it.
I need java? Can i do it in php?

You may find some classes here precisely for that purpose:

http://www.phpclasses.org/browse/class/66.html




--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--- End Message ---
--- Begin Message ---
Say I have a form like ->
<form action="./foo.php?id=20" method="get">
 ...
 <input type="submit"... />
</form>

If this form is submitted, the $_GET['id'] variable *is not* available.
If the method is changed to "post", the $_GET['id'] variable *is* available.

Is this how forms are supposed to work???
Thanks

--- End Message ---
--- Begin Message ---
Gerard Samuel wrote:

Say I have a form like ->
<form action="./foo.php?id=20" method="get">
 ...
 <input type="submit"... />
</form>

If this form is submitted, the $_GET['id'] variable *is not* available.
If the method is changed to "post", the $_GET['id'] variable *is* available.


Is this how forms are supposed to work???

Yes.

--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
--- Gerard Samuel <[EMAIL PROTECTED]> wrote:
> Say I have a form like ->
> <form action="./foo.php?id=20" method="get">
>   ...
>   <input type="submit"... />
> </form>
> 
> If this form is submitted, the $_GET['id'] variable *is not* available.
> If the method is changed to "post", the $_GET['id'] variable *is*
> available.
> 
> Is this how forms are supposed to work???

Yes, when you use the GET method, the query string of the URL that your
browser requests contains the form data. I think you want to have
something like this in your form:

<input type="hidden" name="id" value="20" />

Hope that helps.

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
     Coming Fall 2004
HTTP Developer's Handbook - Sams
     http://httphandbook.org/
PHP Community Site
     http://phpcommunity.org/

--- End Message ---
--- Begin Message --- Chris Shiflett wrote:
Yes, when you use the GET method, the query string of the URL that your
browser requests contains the form data. I think you want to have
something like this in your form:

<input type="hidden" name="id" value="20" />


Thanks John/Chris for the explanations...

--- End Message ---
--- Begin Message ---
I have the following classes being inherited:

User extends School

I have two classes:
Profile extends User
and
Buddies extends User

being used in the same .php file. I get a "Fatal error: Cannot
redeclare class school in ..."


I can see why this is happening but three questions,

1. Does php5 allow for multiple extends? e.g. Profile extends User
extends School

2. Programmatically, how can I resolve this sort of issue besides not
using this class and making a new class with a different name?

3. Is there a way to uninclude a included file?

Thanks in advance.

--- End Message ---
--- Begin Message ---
--- Markus Mayer <[EMAIL PROTECTED]> wrote:

> On Monday 16 August 2004 17:03, Brian Dunning wrote:
> > I think I may have solved it by an even simpler
> method: I emailed the
> > perpetrator to "thank him for all of his orders"
> to see what he'd say.
> 
> :-)  Great idea!  (me shows the thumbs up)
> 
> > Anyone know who the "proper authorities" are, to
> whom I could give my
> 
> It doesn't matter where the fraud comes from, its
> worth following up because 
> my guess is you could be dealing with a small part
> of some organised credit 
> card fraud group.  My best suggestion is to give the
> FBI a quick call or look 
> at their web site.  Although the orders may be
> foreign (what location comes 
> back when you put the IP address into
> http://www.geobytes.com/IpLocator.htm), 
> as far as I know, this is something the FBI can
> handle, and if they don't, I 
> would expect they know who does.
> 
> Hope this helps.
> 
> best regards
> Markus

I just got caught up on my mailing lists so sorry
about the late reply, but you could always start
charging cards when the order is ready to be shipped
instead of when the card is submitted to you.

- Grant


                
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

--- End Message ---
--- Begin Message ---
Hi,

We recently upgraded PHP on our web server to version 4.3.8. After upgrading sessions are not working properly. Please help to configure the latest version.

There is a log-in module on our web site. After successfully entering the log-in information, a session variable is created to track the user. But this value is not carried while loading other pages. So it returns to log-in module again. On the server , the session file is created (/tmp - path for session files) and the values are also saved in the file. The values are not retrieved properly by the following pages after log-in.

The same log-in module was working perfectly with the older version 4.3.2.

This is the LoadModule entry in the httpd.conf file for Apache.
        LoadModule php4_module modules/mod_php4-4.3.8.so

Server Version
System - FreeBSD 4.7-RELEASE-p27 FreeBSD 4.7-RELEASE-p27 #33: Mo i386
Server API - Apache/1.3.27 OpenSSL/0.9.6 (Unix) PHP/4.3.8

Session Settings on this server (<?echo phpinfo();?>)

Session Support - enabled
Registered save handlers - files user

Directive                       Local Value     Master Value
session.auto_start              Off             Off
session.bug_compat_42           On              On
session.bug_compat_warn On              On
session.cache_expire            180             180
session.cache_limiter           nocache         nocache
session.cookie_domain           no value        no value
session.cookie_lifetime 0               0
session.cookie_path             /               /
session.cookie_secure           Off             Off
session.entropy_file            no value        no value
session.entropy_length          0               0
session.gc_divisor              100             100
session.gc_maxlifetime          1440            1440
session.gc_probability          1               1
session.name                    PHPSESSID       PHPSESSID
session.referer_check           no value        no value
session.save_handler            files           files
session.save_path               /tmp            /tmp
session.serialize_handler       php             php
session.use_cookies             On              On
session.use_only_cookies        Off             Off
session.use_trans_sid           On              On

Regards

Sheni R Meledath
[EMAIL PROTECTED]

--- End Message ---

Reply via email to