php-general Digest 2 Oct 2005 15:26:22 -0000 Issue 3715

Topics (messages 223506 through 223529):

Re: function not returning anything via return$
        223506 by: Jasper Bryant-Greene

session_name("CCLTrolley")
        223507 by: John Taylor-Johnston
        223508 by: Robert Cummings
        223509 by: John Taylor-Johnston
        223510 by: Robert Cummings
        223511 by: Jasper Bryant-Greene
        223512 by: Robert Cummings
        223514 by: John Taylor-Johnston
        223515 by: Robert Cummings
        223516 by: John Taylor-Johnston
        223517 by: John Taylor-Johnston
        223518 by: Robert Cummings
        223520 by: Robert Cummings
        223521 by: John Taylor-Johnston

problem half-solved, however have another
        223513 by: matt VanDeWalle

Re: RecursiveIteratorIterator för PHP 5.0.5 Win32
        223519 by: Erik Franzén

anyone want to teach php?
        223522 by: Karl James

Re: Auto unzip uploaded file
        223523 by: mail

Broken pipe
        223524 by: Ben-Nes Yonatan

Test Emai --- Please igonre
        223525 by: Zareef Ahmed

Re: PHP 5 Hosting
        223526 by: Zareef Ahmed

php5<-->com terribly wrong ?
        223527 by: Martin Staiger

Test Mail please igonre it
        223528 by: Zareef Ahmed

Re: "Sanitize" paths
        223529 by: Philip Hallstrom

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:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
[EMAIL PROTECTED] wrote:
        rdfpic2html( $rdfpicdata );

Shouldn't that be:

$rdfpicdata = rdfpic2html( $rdfpicdata );

Since you haven't defined rdfpic2html as receiving its argument by reference...

--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

--- End Message ---
--- Begin Message ---
$TrolleyContents is a string.
Basically what I want to accomplish here is if $TrolleyContents already exists append $AddToTrolley to $TrolleyContents, if not register $TrolleyContents.
Am I going about it right?
John

<?php
#printcontents.php

session_name("CCLTrolley");
session_start();

if (isset($HTTP_POST_VARS["AddToTrolley"]))
{
$TrolleyContents = $TrolleyContents.",".$HTTP_POST_VARS["AddToTrolley"];
}else{
session_register("TrolleyContents");
}
echo $TrolleyContents;

phpinfo();
?>

--- End Message ---
--- Begin Message ---
On Sat, 2005-10-01 at 23:57, John Taylor-Johnston wrote:
> $TrolleyContents is a string.
> Basically what I want to accomplish here is if $TrolleyContents already 
> exists append $AddToTrolley to $TrolleyContents, if not register 
> $TrolleyContents.
> Am I going about it right?
> John
> 
> <?php
> #printcontents.php
> 
> session_name("CCLTrolley");
> session_start();
> 
> if (isset($HTTP_POST_VARS["AddToTrolley"]))
> {
> $TrolleyContents = $TrolleyContents.",".$HTTP_POST_VARS["AddToTrolley"];
> }else{
> session_register("TrolleyContents");
> }
> echo $TrolleyContents;
> 
> phpinfo();
> ?>

Looks a bit odd to me :) But could be because you're using outdated
semantics. It should be sufficient to do the following:

<?php

session_name( 'CCLTrolley' );
session_start();

//
// Initialize the trolley.
//
if( !isset( $_SESSION['TrolleyContents'] ) )
{
    $_SESSION['TrolleyContents'] = '';
}

//
// Add new entry.
//
if( isset( $_POST['AddToTrolley'] ) )
{
    if( $_SESSION['TrolleyContents'] ) == '' )
    {
        $_SESSION['TrolleyContents'] = $_POST['AddToTrolley'];
    }
    else
    {
        $_SESSION['TrolleyContents'] .= ','.$_POST['AddToTrolley'];
    }
}

echo $_SESSION['TrolleyContents'];

phpinfo();

?>

Is there a reason you're using a comma delimited string? I would
recommend using an array instead:

<?php

session_name( 'CCLTrolley' );
session_start();

//
// Initialize the trolley.
//
if( !isset( $_SESSION['TrolleyContents'] ) )
{
    $_SESSION['TrolleyContents'] = array();
}

//
// Add new entry.
//
if( isset( $_POST['AddToTrolley'] ) )
{
    $_SESSION['TrolleyContents'][$_POST['AddToTrolley']] =
$_POST['AddToTrolley']
}

echo implode( ',', $_SESSION['TrolleyContents'] );

phpinfo();

?>

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
Robert Cummings wrote:

On Sat, 2005-10-01 at 23:57, John Taylor-Johnston wrote:
$TrolleyContents is a string.
Basically what I want to accomplish here is if $TrolleyContents already exists append $AddToTrolley to $TrolleyContents, if not register $TrolleyContents.
Am I going about it right?
John

<?php
#printcontents.php

session_name("CCLTrolley");
session_start();

if (isset($HTTP_POST_VARS["AddToTrolley"]))
{
$TrolleyContents = $TrolleyContents.",".$HTTP_POST_VARS["AddToTrolley"];
}else{
session_register("TrolleyContents");
}
echo $TrolleyContents;

phpinfo();
?>

Looks a bit odd to me :) But could be because you're using outdated
semantics. It should be sufficient to do the following:

<?php

session_name( 'CCLTrolley' );
session_start();

//
// Initialize the trolley.
//
if( !isset( $_SESSION['TrolleyContents'] ) )
{
   $_SESSION['TrolleyContents'] = '';
}

//
// Add new entry.
//
if( isset( $_POST['AddToTrolley'] ) )
{
   if( $_SESSION['TrolleyContents'] ) == '' )
   {
       $_SESSION['TrolleyContents'] = $_POST['AddToTrolley'];
   }
   else
   {
       $_SESSION['TrolleyContents'] .= ','.$_POST['AddToTrolley'];
   }
}

echo $_SESSION['TrolleyContents'];

phpinfo();

?>

Is there a reason you're using a comma delimited string? I would
recommend using an array instead:

<?php

session_name( 'CCLTrolley' );
session_start();

//
// Initialize the trolley.
//
if( !isset( $_SESSION['TrolleyContents'] ) )
{
   $_SESSION['TrolleyContents'] = array();
}

//
// Add new entry.
//
if( isset( $_POST['AddToTrolley'] ) )
{
   $_SESSION['TrolleyContents'][$_POST['AddToTrolley']] =
$_POST['AddToTrolley']
}

echo implode( ',', $_SESSION['TrolleyContents'] );

phpinfo();

?>
Why is it outdated semantics?

P.S. do folks prefer I reply on top or on bottom?

--- End Message ---
--- Begin Message ---
On Sun, 2005-10-02 at 00:18, John Taylor-Johnston wrote:
> Robert Cummings wrote:
> 
> Why is it outdated semantics?
> 
> P.S. do folks prefer I reply on top or on bottom?

Might i refer you to:

http://ca.php.net/manual/en/language.variables.predefined.php
http://ca.php.net/manual/en/function.session-register.php

$HTTP_POST_VARS has been considered deprecated for some time now.
session_register() is considered clumsy and dangerous since it is only
works with register_globals enabled which is itself considered poor
coding style in this enlightened era of PHP.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
John Taylor-Johnston wrote:
Looks a bit odd to me :) But could be because you're using outdated
semantics. It should be sufficient to do the following:

[snip]

Why is it outdated semantics?

I believe he was referring to your use of $HTTP_POST_VARS and session_register, which have been replaced by $_POST and $_SESSION, respectively. The manual will have more details.

P.S. do folks prefer I reply on top or on bottom?

Well, I can't speak for everyone else, but personally, bottom, as long as you trim your posts :)

--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

--- End Message ---
--- Begin Message ---
On Sun, 2005-10-02 at 00:18, John Taylor-Johnston wrote:
>
> P.S. do folks prefer I reply on top or on bottom?

Some people don't care, but those that do care have loud voices and
would prefer you bottom post since they haven't yet been upgraded to
random access reading and are still hooked up to a tape drive :B

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
<?php

session_name( 'CCLTrolley' );
session_start();

//
// Initialize the trolley.
//
if( !isset( $_SESSION['TrolleyContents'] ) )
{
   $_SESSION['TrolleyContents'] = '';
}

//
// Add new entry.
//
if( isset( $_POST['AddToTrolley'] ) )
{
   if( $_SESSION['TrolleyContents'] ) == '' )
   {
       $_SESSION['TrolleyContents'] = $_POST['AddToTrolley'];
   }
   else
   {
       $_SESSION['TrolleyContents'] .= ','.$_POST['AddToTrolley'];
   }
}

echo $_SESSION['TrolleyContents'];

phpinfo();

?>


Robert Cummings wrote:

John Taylor-Johnston wrote:
Robert Cummings wrote:

Why is it outdated semantics?


Might i refer you to:

http://ca.php.net/manual/en/language.variables.predefined.php
http://ca.php.net/manual/en/function.session-register.php

$HTTP_POST_VARS has been considered deprecated for some time now.
session_register() is considered clumsy and dangerous since it is only
works with register_globals enabled which is itself considered poor
coding style in this enlightened era of PHP.

Cheers,
Rob.
So use
$_POST["AddToTrolley"]
instead of
$HTTP_POST_VARS["AddToTrolley"]?

Thanks.

--- End Message ---
--- Begin Message ---
On Sun, 2005-10-02 at 00:32, John Taylor-Johnston wrote:
> > <?php
> >
> > session_name( 'CCLTrolley' );
> > session_start();
> >
> > //
> > // Initialize the trolley.
> > //
> > if( !isset( $_SESSION['TrolleyContents'] ) )
> > {
> >    $_SESSION['TrolleyContents'] = '';
> > }
> >
> > //
> > // Add new entry.
> > //
> > if( isset( $_POST['AddToTrolley'] ) )
> > {
> >    if( $_SESSION['TrolleyContents'] ) == '' )
> >    {
> >        $_SESSION['TrolleyContents'] = $_POST['AddToTrolley'];
> >    }
> >    else
> >    {
> >        $_SESSION['TrolleyContents'] .= ','.$_POST['AddToTrolley'];
> >    }
> > }
> >
> > echo $_SESSION['TrolleyContents'];
> >
> > phpinfo();
> >
> > ?>
> 
> 
> Robert Cummings wrote:
> 
> >John Taylor-Johnston wrote:
> >  
> >
> >>Robert Cummings wrote:
> >>
> >>Why is it outdated semantics?
> >>
> >>    
> >>
> >
> >Might i refer you to:
> >
> >http://ca.php.net/manual/en/language.variables.predefined.php
> >http://ca.php.net/manual/en/function.session-register.php
> >
> >$HTTP_POST_VARS has been considered deprecated for some time now.
> >session_register() is considered clumsy and dangerous since it is only
> >works with register_globals enabled which is itself considered poor
> >coding style in this enlightened era of PHP.
> >
> >Cheers,
> >Rob.
> >  
> >
> So use
> $_POST["AddToTrolley"]
> instead of
> $HTTP_POST_VARS["AddToTrolley"]?

And $_SESSION instead of session_register and always access your session
vars through $_SESSION.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
Robert Cummings wrote:

<?php
session_name( 'CCLTrolley' );
session_start();
// Initialize the trolley.
if( !isset( $_SESSION['TrolleyContents'] ) )
{
$_SESSION['TrolleyContents'] = array();
}
// Add new entry.
if( isset( $_POST['AddToTrolley'] ) )
{
$_SESSION['TrolleyContents'][$_POST['AddToTrolley']] = $_POST['AddToTrolley']
}
echo implode( ',', $_SESSION['TrolleyContents'] );
?>

I've never been very good getting my head around arrays.
Then how do I check to know if $mydata->RNum is in $_SESSION['TrolleyContents'] ?
Thanks for your patience.
John

--- End Message ---
--- Begin Message ---
Robert Cummings wrote:

And $_SESSION instead of session_register and always access your session
vars through $_SESSION.

I'm safe with "PHP Version 4.1.2" ?
John

--- End Message ---
--- Begin Message ---
On Sun, 2005-10-02 at 00:41, John Taylor-Johnston wrote:
> Robert Cummings wrote:
> 
> > And $_SESSION instead of session_register and always access your session
> > vars through $_SESSION.
> 
> I'm safe with "PHP Version 4.1.2" ?

Should be. The docs state that the $_XXX series of vars were introduced
in PHP 4.1.0.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
On Sun, 2005-10-02 at 00:37, John Taylor-Johnston wrote:
> Robert Cummings wrote:
> 
> > <?php
> > session_name( 'CCLTrolley' );
> > session_start();
> > // Initialize the trolley.
> > if( !isset( $_SESSION['TrolleyContents'] ) )
> > {
> > $_SESSION['TrolleyContents'] = array();
> > }
> > // Add new entry.
> > if( isset( $_POST['AddToTrolley'] ) )
> > {
> > $_SESSION['TrolleyContents'][$_POST['AddToTrolley']] = 
> > $_POST['AddToTrolley']
> > }
> > echo implode( ',', $_SESSION['TrolleyContents'] );
> > ?>
> 
> I've never been very good getting my head around arrays.
> Then how do I check to know if $mydata->RNum is in 
> $_SESSION['TrolleyContents'] ?
> Thanks for your patience.

If you go with an array system might I suggest the following change to
what I wrote:

<?php

session_name( 'CCLTrolley' );
session_start();

//
// Initialize the trolley.
//
if( !isset( $_SESSION['TrolleyContents'] ) )
{
    $_SESSION['TrolleyContents'] = array();
}

//
// Add new entry.
//
if( isset( $_POST['AddToTrolley'] ) )
{
    if( isset( $_SESSION['TrolleyContents'][$_POST['AddToTrolley']] ) )
    {
        $_SESSION['TrolleyContents'][$_POST['AddToTrolley']] += 1;
    }
    else
    {
        $_SESSION['TrolleyContents'][$_POST['AddToTrolley']] = 1;
    }
}

echo implode( ',', array_keys( $_SESSION['TrolleyContents'] ) );

phpinfo();

?>

To check if something is in the trolley:

<?php
if( isset( $_SESSION['TrolleyContents'][$myData->RNum] ) )
{
    echo 'Yaaaaaaaaaaaaaaaaay!';
}
?>

To decrement the quantity of an item in the trolley:

<?php
if( isset( $_SESSION['TrolleyContents'][$myData->RNum] ) )
{
    $_SESSION['TrolleyContents'][$myData->RNum] -= 1;
    if( $_SESSION['TrolleyContents'][$myData->RNum] <= 0 )
    {
        unset( $_SESSION['TrolleyContents'][$myData->RNum] );
    }
}
?>

I'll leave it as an exercise for you to add or delete X quantity.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
Robert Cummings wrote:

To decrement the quantity of an item in the trolley:
<?php
if( isset( $_SESSION['TrolleyContents'][$myData->RNum] ) )
{
   $_SESSION['TrolleyContents'][$myData->RNum] -= 1;
   if( $_SESSION['TrolleyContents'][$myData->RNum] <= 0 )
   {
       unset( $_SESSION['TrolleyContents'][$myData->RNum] );
   }
}
?>
I'll leave it as an exercise for you to add or delete X quantity.
Cheers,
Rob.
Thanks. Always willing to learn,
John

--- End Message ---
--- Begin Message ---
hello again
I have been battling this mysterious char thats showing up in the buffer when i first log onto my chat, or else try to add new things to the logon function, I am getting the code not to "fall through" to the next prompt however, using $varname = socket_recv($sock, $read, 1024, 0) this won't put anything but a number in that variable, say for example the passwd was 'test'(just for the sake of testing for now), the password would end up being not test, but maybe the number 5 I'm assuming its returning the number of digits but this is totally not what I expected, and the manual for socket_recv is um, well for a lack of better wording, its not there on the website anymore, all except the format of it, no descriptions or anything, should i be using something else instead of socket_recv()?
--- End Message ---
--- Begin Message ---
Of course you are right. I was fooled by this page:

http://www.wiki.cc/php/RecursiveIterator

<?php
class RecursiveArrayIterator extends ArrayIterator implements RecursiveIteratorIterator
{
    function hasChildren()
    {
        return is_array($this->current());
    }

    function getChildren()
    {
        return new RecursiveArrayIterator($this->current());
    }
}
?>

Thanxs

/Erik

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

I was wondering if there is anyone that would like to teach 
Me the language as a teacher of a class would. Like 
Giving assignments and stuff. 

I tried to learn from books and website tutorials but it doesn't 
Seem to do the trick for me.

Would anybody be willing to do this, if so please email me 
Off list, and directly to my verizon.net address listed below.

I would be willing to pay somebody for their services.
I would like to keep it reasonable please. I am live from check
To check. I understand most of the basics. I will have to refresh
My self with the basics again but it shouldn't take to much time.

Please let me know your thoughts if any one can help me.

Karl James ("The Saint")
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.theufl.com/

--- End Message ---
--- Begin Message ---
James Lobley wrote: 
> You might like to take a look at this:
>http://www.phpconcept.net/pclzip/index.en.php
> I've had great success with it - both extracting files and creating zips.

Thank you, the page looks great.

Norbert
 
             

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

I wrote a php script which is running very long queries (hours) on a database. I seem to have a problem to run the code when there are single queries which take long times (like 5 hours for an update query), from the log of the database I received the following code:


2005-09-30 17:12:13 IDT postgres : LOG: 00000: duration: 18730038.678 ms statement: UPDATE product_temp SET nleft=(SELECT 2005-09-30 17:12:13 IDT postgres : LOCATION: exec_simple_query, postgres.c:1035 2005-09-30 17:12:13 IDT postgres : LOG: 08006: could not send data to client: Broken pipe
2005-09-30 17:12:13 IDT postgres : LOCATION:  internal_flush, pqcomm.c:1050
2005-09-30 17:12:13 IDT postgres : LOG: 08P01: unexpected EOF on client connection
2005-09-30 17:12:13 IDT postgres : LOCATION:  SocketBackend, postgres.c:287
2005-09-30 17:12:13 IDT postgres : LOG: 00000: disconnection: session time: 6:04:58.52 2005-09-30 17:12:13 IDT postgres : LOCATION: log_disconnections, postgres.c:3403


Now after the 5 hours update it need to echo into a log file a line which say that it ended this command (just for me to know the times), my assumption is that PHP read the code into memory at start and opened the connection to the file, after a time which he waited to any given "life sign" he gave up and closed the connection to the file, and when the code came back to the file it encountered no connection to the file (broken pipe).


Am I correct at my assumption? if so how can I set the PHP to wait how much I tell him?

Ofcourse if im wrong I would like to know the reason also :)


Thanks in advance,

 Ben-Nes Yonatan

--- End Message ---
--- Begin Message ---
This is a test mail. Please igno
re it --
Zareef Ahmed :: A PHP Developer in India ( Delhi )
Homepage :: http://www.zareef.net

--- End Message ---
--- Begin Message ---
On 9/30/05, Tom Chubb <[EMAIL PROTECTED]> wrote:

> This is an interesting one.
> As someone learning PHP, I am still confused which route I should be going
> down?
> Especially as I am looking to take on a dedicated server soon, I don't
> know if PHP5 will become standard soon or are we going to see PHP6
> first??!?

 It is a really serious problem, PHP 5 have so much good things specially in
terms of XML that I just want to use them in my programmes but whenever I
decide to do programming in PHP 5, I stuck on the choice of a good server.
Most of the Hosting service providers are still providing hosting in PHP 4.
 I think PHP is going through a very tough phase. It has got the
capabilities but we can not use them, thats why we can SAY that PHP is good
programming language But we can not PROVE that in practically.
 Well the original posting was about hosting service provider, somewhere I
read about HOSTWAY. they are in PHP 5 hosting.
  Zareef Aahmed

Please can some more experienced people let me have their views on this?
> Many thanks,#
> Tom
>
> On 30/09/05, Joe Wollard <[EMAIL PROTECTED]> wrote:
> > The first two results both seem pretty good at a glance:
> >
> > http://www.google.com/search?hl=en&q=php5+ssh+hosting&btnG=Google+Search
> >
> >
> >
> > On Sep 29, 2005, at 8:29 PM, Ed Lazor wrote:
> >
> > > Any recommendations on good host providers for PHP 5? Bonus points
> > > if they support SSH access and a PHP compiler like Zend.
> > >
> > > Thanks,
> > >
> > > Ed
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> Tom Chubb
> [EMAIL PROTECTED]
> 07915 053312
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Zareef Ahmed :: A PHP Developer in India ( Delhi )
Homepage :: http://www.zareef.net

--- End Message ---
--- Begin Message ---
Dear experts,

something must be terribliy wrong with either php5<->com or our
configuration/code.

We used to control MS-Index-Server via php4 without any problems:
----------------------------------------------------
$q = new com ("ixsso.Query");
$util = new com ("ixsso.util");
$q->query = $QueryText . ' AND  #filename "(*"';
$q->SortBy = "rank[d]";
$q->catalog = "docs";
$q->Columns = "filename, Path, size, characterization, rank";
$q->MaxRecords = 300;
$util->AddScopeToQuery ($q, "/", "deep");
$q->LocaleID = $util->ISOToLocaleID("EN-US");

$rs = $q->CreateRecordSet("nonsequential");

// Loop over result
while (!$rs->EOF)
{
    ........

     $rowcount++;
     $rs->MoveNext();
}
----------------------------------------------------

Since we migrated to php5 we changed the iterator to run with FOREACH which
causes a fatal error:

foreach($rs as $ResultCounter)
{
   ...

}
--> Fatal error: Uncaught exception 'Exception' with message 'Object of type
variant did not create an Iterator'
in..
Same thing happens with:
foreach($rs as $ResultCounter => $row)
{
   ...
}
--> Fatal error: Uncaught exception 'Exception' with message 'Object of type
variant did not create an Iterator'
in..

Also, we tried to use the com-exception try..catch which didn't work either.

What's wrong here???

Environment :
win XP/2003, Apache 2.0.53, php 5.0.5

I'm thankful for any hint!
Marc

--- End Message ---
--- Begin Message ---
--
Zareef Ahmed :: A PHP Developer in India ( Delhi )
Homepage :: http://www.zareef.net

--- End Message ---
--- Begin Message ---
realpath() is your friend...

That has been my first impression too, but...

realpath() expands all symbolic links

I am actually using symlinks :)

I trust the files on my server so "local redirects" via symlinks are no
problem, the user submitted data is.

Then realpath() your doc root as well and then you'll be comparing apples to apples...
--- End Message ---

Reply via email to