php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11919 bad return of yp_next
Submitted: 2001-07-06 02:53 UTC Modified: 2007-04-04 19:05 UTC
From: Bernard dot Prevosto at ifremer dot fr Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 4.0.6 OS: Solaris 5.5.1
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2001-07-06 02:53 UTC] Bernard dot Prevosto at ifremer dot fr
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





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-17 10:52 UTC] lobbin@php.net
Does this happen in PHP 4.1.0?


R.
 [2001-12-18 04:32 UTC] Bernard dot Prevosto at ifremer dot fr
It's not OK whith PHP 4.1.0
 [2002-04-09 15:42 UTC] jimw@php.net
you need to provide a more concise example. please demonstrate exactly which function is failing, and how, without all the extraneous output. as near as i can tell, it is simply the order or format in which the entries are being returned that has changed.

it is probably related to bug #8041, which was fixed between 4.0.5 and 4.0.6.
 [2002-05-11 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Nov 28 03:03:14 2021 UTC