|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1434 print and printf with sybase module
Submitted: 1999-05-21 04:46 UTC Modified: 1999-12-13 16:09 UTC
From: rico at unipg dot it Assigned:
Status: Closed Package: Sybase (dblib) related
PHP Version: 3.0.6 OS: AIX 4.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: rico at unipg dot it
New email:
PHP Version: OS:


 [1999-05-21 04:46 UTC] rico at unipg dot it
I'm trying to use PHP3 on system AIX 4.3 and sybase 11
I created the following script:
<head><title> Title </title></head>
<body bgcolor="#ffffff" link="#ff0000" vlink="#0000ff" >
<form action=nothing.php3>
$sybdb  =  new  CSybDb("host",  "user",  "pass",  "db");
$result = sybase_query("select des_key, cod_key from keywords order by des_key",
$rows = sybase_num_rows($result);
$j = 0;
print "<select name=giggi>";
while ($j < $rows) {
              list($uno, $due) = sybase_fetch_row($result);
              print "<option value=$due >  $uno\n";
              # printf ("<option value=%s > %s \n",$due, $uno);
              $j = $j + 1;
print "</select>";


I'm seen that if I use "print" inside the script
the PHP3 doen't work fine , 
but work fine if I use "printf"
There is a logic reason? Could you help me?
This is the output of phpinfo():

                              PHP Version 3.0.6

by Rasmus Lerdorf, Andi Gutmans, Zeev Suraski, Stig Bakken, Shane Caraveo,
Jim Winstead, and countless others.

                    System: AIX velthur 3 4 001770294C00
                           Build Date: May 14 1999


  Extensions                                    Additional Information

 PHP core     CFLAGS= -O2 -O2
 Functions    No additional information.
 PHP_DL       Dynamic Library support enabled.
 PHP_dir      No additional information.
 PHP_filestat No additional information.
 PHP_file     No additional information.
 PHP_head     No additional information.
 Sendmail     Path to sendmail: /usr/sbin/sendmail -t
 Syslog       No additional information.

               persistent     Yes

               links:         0/Unlimited
 Sybase SQL
               Total links:   0/Unlimited

               name:          PHP 3.0

               Client API     Sybase DB-Library/11.1.1/P/rs6000/AIX 4.1.4/1/OPT/Tue Aug 12 18:20:36 1997

 Expressions  No additional information.
              APACHE_INCLUDE=-I../apache_1.3.6/src/include -I../apache_1.3.6/src/os/unix 
              Apache Version: Apache/1.3.6
              Apache Release: 10306100
              Apache API Version: 19990320
 Apache       User/Group: nobody(-2)/247
              Max Requests: per child: 30    keep alive: on    max per connection: 100
              Timeouts: connection: 300    keep-alive: 15
              Server Root: /srv/WWW/apache_1.3.6
              Loaded modules: mod_php3, mod_setenvif, mod_usertrack, mod_cern_meta, mod_auth, mod_access,
              mod_alias, mod_userdir, mod_speling, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir,
              mod_autoindex, mod_include, mod_info, mod_status, mod_negotiation, mod_mime,
              mod_log_referer, mod_log_agent, mod_log_config, mod_env, http_core
 Crypt        No additional information.
 DBM          ndbm support enabled
 bcmath       No additional information.
 browscap     No additional information.
 PHP_pack     No additional information.



                php3.ini file path is set to: /usr/local/lib

         Directive              Master Value             Local Value
  arg_separator             &                       &
  asp_tags                 0                       0
  auto_prepend_file         none                    none
  auto_append_file          none                    none
  browscap                  none                    none
  cgi_ext                   none                    none             none                    none
  debugger.port            0                       0
  define_syslog_variables  0                       0
  display_errors           1                       1
  doc_root                  none                    none
  enable_dl                1                       1
  engine                   1                       1
  error_log                 none                    none
  error_append_string       none                    none
  error_prepend_string      none                    none
  error_reporting          55                      55
  extension_dir             none                    none
  gpc_order                 GPC                     GPC
  include_path              none                    none
  isapi_ext                 none                    none
  last_modified            0                       0
  log_errors               0                       0
  max execution time       30                      30
  magic_quotes_gpc         0                       0
  magic_quotes_runtime     0                       0
  magic_quotes_sybase      0                       0
  memory limit             8388608                 8388608
  nsapi_ext                 none                    none
  open_basedir              none                    none
  precision                14                      14
  safe_mode                0                       0
  safe_mode_exec_dir        /usr/local/php/bin      /usr/local/php/bin
  sendmail_from             none                    none
  sendmail_path             /usr/sbin/sendmail -t   /usr/sbin/sendmail -t
  short_open_tag           1                       1
  smtp                      localhost               localhost
  sql_safe_mode            0                       0
  track_errors             0                       0
  track_vars               1                       1
  upload_max_filesize      2097152                 2097152
  upload_tmp_dir            none                    none
  user_dir                  none                    none
  warn_plus_overloading    0                       0
  xbithack                 0                       0
  y2k_compliance           0                       0
  highlight_comment         #FF8000                 #FF8000
  highlight_default         #0000BB                 #0000BB
  highlight_html            #000000                 #000000
  highlight_string          #DD0000                 #DD0000
  highlight_bg              #FFFFFF                 #FFFFFF
  highlight_keyword         #007700                 #007700



     Variable                                                Value
 _                /srv/WWW/apache_1.3.6/bin/httpd
 MANPATH          /usr/dt/man:/usr/share/man:/usr/local/man:/usr/man
 LANG             en_US
 LOGIN            root 
 NLSPATH          /usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/
 PATH             /usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/local/bin:/var/ifor:/var/radius/bin
 LC__FASTMSG      true
 LOGNAME          root
 MAIL             /usr/spool/mail/root
 LOCPATH          /usr/lib/nls/loc
 SYBASE           /sybase
 USER             root
 AUTHSTATE        compat
 SHELL            /bin/ksh
 ODMDIR           /etc/objrepos
 HOME             /
 TERM             xterm
 PWD              /
 TZ               MET-1MDT,M3.5.0,M10.5.0
 A__z             ! LOGNAME


                                PHP Variables

      Variable                              Value
  PHP_SELF          /php3.test/DASP/index.php3


                             Apache Environment

       Variable                                                   Value
 DOCUMENT_ROOT        /srv/WWW/apache_1.3.6/htdocs
 HTTP_ACCEPT          image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
 HTTP_ACCEPT_CHARSET  iso-8859-1,*,utf-8
 HTTP_CONNECTION      Keep-Alive
 HTTP_USER_AGENT      Mozilla/4.04 [en] (X11; I; Linux 2.0.35 i586)
 PATH                 /usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/local/bin:/var/ifor:/var/radius
 SCRIPT_FILENAME      /srv/WWW/apache_1.3.6/htdocs/index.php3
 SERVER_SOFTWARE      Apache/1.3.6 (Unix) PHP/3.0.6

                          HTTP Headers Information

                            HTTP Request Headers
  HTTP Request   GET /php3.test/DASP/index.php3 HTTP/1.0

  Accept         image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
                 image/png, */*
  Accept-Charset iso-8859-1,*,utf-8
  Connection     Keep-Alive
  User-Agent     Mozilla/4.04 [en] (X11; I; Linux 2.0.35 i586)
                            HTTP Response Headers
  Connection     close
  Content-Type   text/html 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-12-13 16:09 UTC] joey at cvs dot php dot net

BTW, be careful what you show:

"This is the output of phpinfo()...LOGIN=root"
Why are you running webserver as root?

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Mar 24 15:03:44 2023 UTC