Justtechjobs.com Find a programming school near you






Online Campus Both


php-developer-list | 2001122

[PHP-DEV] Bug #11919 Updated: bad return of yp_next From: lobbin <email protected>
Date: 12/17/01

ID: 11919
Updated by: lobbin
Reported By: Bernard.Prevosto <email protected>
Old Status: Open
Status: Feedback
Bug Type: YP/NIS related
Operating System: Solaris 5.5.1
PHP Version: 4.0.6
New Comment:

Does this happen in PHP 4.1.0?

R.

Previous Comments:
------------------------------------------------------------------------

[2001-07-06 02:53:08] Bernard.Prevosto <email protected>

Hello,

the next script is OK with php4.0.5 but not with php4.0.6
-------------------------------------------

<?php
  $map = "hosts.byname";
  $domain = yp_get_default_domain();
                 echo "Le domaine par défaut est : " . $domain . "\n";
$order = yp_order($domain,$map);
                  echo "Le numéro d'ordre de cette carte est : " .
$order . "\n";
  $master = yp_master($domain, $map);
                  echo "Master for this map is: " . $master ."\n";
$entry = yp_match($domain, $map, "balanec");
                echo "La valeur trouvée est: " . $entry ."\n";
                                  
$entry = yp_first($domain, $map);
print_r ($entry);
                     $key = $entry ["key"];
                      $value = $entry ["value"];
                      
                 echo "La première entrée de cette carte est " . $key .
" et sa valeur est " . $value . "\n";
                 $first = $key;
  $entry = yp_next($domain, $map, $first);
  print_r ($entry);
  
  
                if(!$entry) {
                echo yp_errno() . ": " . yp_err_string() . "\n";
                    }
                    $key = key ($entry);
                    
                      

                    $value = $entry [$key];
                   

                    
                echo "L'entree suivante après $first a la cle " . $key
. " et sa valeur " . $value ."\n";
--------------------------------

with php4.0.5 the result is:
---------------------

Le domaine par défaut est : brest.ifremer.fr
Le numéro d'ordre de cette carte est : 994254209
Master for this map is: brest
La valeur trouvée est: 134.246.166.3 balanec

Array
(
    [key] => cata3000gm611

    [value] => 134.246.148.206 cata3000gm611

)
La première entrée de cette carte est cata3000gm611
 et sa valeur est 134.246.148.206 cata3000gm611

Array
(
    [cata3000720def
] => 134.246.171.208 cata3000720def

)
L'entree suivante après cata3000gm611
 a la cle cata3000720def
 et sa valeur 134.246.171.208 cata3000720def

but whith php4.0.6 th result is:
----------------------

Le domaine par défaut est : brest.ifremer.fr
Le numéro d'ordre de cette carte est : 994254209
Master for this map is: brest
La valeur trouvée est: 134.246.166.3 balanec
Array
(
    [cata3000gm611] => 134.246.148.206 cata3000gm611
    [key] => cata3000gm611
    [value] => 134.246.148.206 cata3000gm611
)
La première entrée de cette carte est cata3000gm611 et sa valeur est
134.246.148.206 cata3000gm611
Array
(
    [br166-156] => 134.246.166.156 br166-156
)
L'entree suivante après cata3000gm611 a la cle br166-156 et sa valeur

-----

the last value is missing.

my configure line is:
./configure \
--with-apache=/home1/beniguet/tmsiric/bpre/anonymous/apache/apache_1.3.19 \
--with-ldap=/home/services/systeme/reseau/openldap \
--with-mysql=/home1/iletudy/www/httpd/mysql \
--with-pgsql=/home1/iletudy/www/httpd/pgsql \
--with-sybase=/home1/iletudy/www/httpd/sybase \
--with-oracle=/home1/iletudy/www/httpd/oracle \
--with-oci8=/home1/iletudy/www/httpd/oracle \
--with-gd=/home/services_SV/bibli/gdlib \
--with-zlib-dir=/home/services_SV/bibli/zlib \
--with-jpeg-dir=/home/services_SV/bibli/jpeglib \
--with-png-dir=/home/services_SV/bibli/pnglib \
--with-tiff-dir=/home/services_SV/bibli/tifflib \
--with-imap=/home1/iletudy/www/httpd/imap \
--with-snmp=/home/services_SV/systeme/reseau/ucd-snmp \
--with-mcrypt=/home/services_SV/bibli/mcryptlib \
--with-sablot=/home/services_SV/bibli/sablotlib \
--enable-yp \
--enable-ftp \
--enable-calendar \
--disable-pear \
--with-config-file-path=/home1/iletudy/www/httpd/php

------------------------------------------------------------------------

Edit this bug report at http://bugs.php.net/?id=11919&edit=1

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>