Bug #30322 [Com]: mssql_fetch_field(result)->column_source same as ->name

2012-01-04 Thread jochem dot blok at fasterforward dot nl
Edit report at https://bugs.php.net/bug.php?id=30322&edit=1

 ID: 30322
 Comment by: jochem dot blok at fasterforward dot nl
 Reported by:erik at xpand dot nl
 Summary:mssql_fetch_field(result)->column_source same as
 ->name
 Status: Bogus
 Type:   Bug
 Package:MSSQL related
 Operating System:   Windows Server 2003
 PHP Version:5.0.2
 Block user comment: N
 Private report: N

 New Comment:

The described result is the samen on Linux Debian. The driver (FreeTDS) is 
different then the Windows driver. Are you sure this is not a bug in PHP?

(Yes I have seen this bug is 8 years old ;))


Previous Comments:

[2004-10-05 09:34:41] der...@php.net

No bug in PHP -> bogus.


[2004-10-05 08:44:08] erik at xpand dot nl

It wasn't a support request. I was sure it is a bug, but I didn't realize it 
could be a bug in the mssql-lib.

Thanks for your reply


[2004-10-04 22:34:39] il...@php.net

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

The data you are seeing is returned directly from mssql library without any 
modifications. So, the bug (valid bug btw) is not a PHP one, but a bug in the 
mssql library you are using.


[2004-10-04 16:22:18] erik at xpand dot nl

Description:

I executed this query with 2 columns which have the same name:
SELECT tbl1.n_MatchID, tbl2.n_MatchID FROM tbl1,tbl2 WHERE (etc)

When I request the fields, the column_source and the name are the same...

Reproduce code:
---
$query = "SELECT Infostrada.tFootballMatch.n_MatchID as a, 
Infostrada.tFootballMatchDetail.n_MatchID as b FROM 
Infostrada.tFootballMatchDetail, Infostrada.tFootballMatch WHERE 
Infostrada.tFootballMatch.n_MatchID = 
Infostrada.tFootballMatchDetail.n_MatchID";
$result = mssql_query($query) or die();

while($obj = mssql_fetch_field($result)) {
echo $obj->column_source . "." . $obj->name . "";
}

Expected result:

tFootballMatch.n_MatchID
tFootballMatchDetail.n_MatchID

($obj->column_source.$obj->name)

Actual result:
--
n_MatchID.n_MatchID
n_MatchID.n_MatchID






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=30322&edit=1


#49231 [Opn]: iconv doenst handle iso-8859-15 well

2009-08-12 Thread jochem dot blok at fasterforward dot nl
 ID:   49231
 User updated by:  jochem dot blok at fasterforward dot nl
 Reported By:  jochem dot blok at fasterforward dot nl
 Status:   Open
 Bug Type: ICONV related
 Operating System: Windows XP
 PHP Version:  5.2.10
 New Comment:

When I try this: 



It works in a browser. Debugging in Zend Studio gives the wrong
character. It seems that Zend Studio uses the editor encoding or
something like that. When I change the encoding (under Desktop) to
ISO-8859-15 it works!

Your snippet also gives a4, which is correct in both the browser and
Zend Studio.

It seems to be an Zend Studio issue :) Thanks for pointing me to the
solution.


Previous Comments:


[2009-08-12 11:37:22] sjoerd-php at linuxonly dot nl

Thank you for your bug report.

I was unable to reproduce the problem. Are you sure that PHP outputs
the wrong character? It could be the tool you use to view the output has
a problem displaying the euro character. Try the following code:

echo bin2hex(iconv('utf-8','ISO-8859-15', html_entity_decode('€',
null, 'UTF-8'))); // should output a4.

--------

[2009-08-12 10:30:38] jochem dot blok at fasterforward dot nl

Description:

iconv doenst handle iso-8859-15 well. See
http://en.wikipedia.org/wiki/ISO/IEC_8859-15. The reproduce code gives ¤
and that should be €. Its seems that iconv converts to ISO-8859-1

Reproduce code:
---
echo
iconv('utf-8','ISO-8859-15',html_entity_decode(utf8_encode('€'),null,
'UTF-8'));

Expected result:

€

Actual result:
--
¤





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



#49231 [NEW]: iconv doenst handle iso-8859-15 well

2009-08-12 Thread jochem dot blok at fasterforward dot nl
From: jochem dot blok at fasterforward dot nl
Operating system: Windows XP
PHP version:  5.2.10
PHP Bug Type: ICONV related
Bug description:  iconv doenst handle iso-8859-15 well

Description:

iconv doenst handle iso-8859-15 well. See
http://en.wikipedia.org/wiki/ISO/IEC_8859-15. The reproduce code gives ¤
and that should be €. Its seems that iconv converts to ISO-8859-1

Reproduce code:
---
echo
iconv('utf-8','ISO-8859-15',html_entity_decode(utf8_encode('€'),null,
'UTF-8'));

Expected result:

€

Actual result:
--
¤

-- 
Edit bug report at http://bugs.php.net/?id=49231&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49231&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49231&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49231&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49231&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49231&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49231&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=49231&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=49231&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=49231&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=49231&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=49231&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=49231&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=49231&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49231&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=49231&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=49231&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=49231&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=49231&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=49231&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=49231&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=49231&r=mysqlcfg



#49107 [Com]: Empty string is returned as NULL, see bug: 39213

2009-07-30 Thread jochem dot blok at fasterforward dot nl
 ID:   49107
 Comment by:   jochem dot blok at fasterforward dot nl
 Reported By:  jochem dot blok at fasterforward dot nl
 Status:   Open
 Bug Type: MSSQL related
 Operating System: Debian
 PHP Version:  5.2.10
 New Comment:

Additional info:

FreeTDS (tds version 8.0), Sql Server 2005 SP3


Previous Comments:


[2009-07-30 07:53:37] jochem dot blok at fasterforward dot nl

Description:

This is the same bug as reported in bug: 39213. An empty string is
returned as NULL.

Reproduce code:
---
$conn = mssql_connect('host','user','password', true);


mssql_query("CREATE TABLE #tmp(c VARCHAR(10) NULL)", $conn) or
die("error querying");

mssql_query("INSERT INTO #tmp VALUES('')", $conn) or die("error
querying");

$res = mssql_query("SELECT * FROM #tmp", $conn) or die("query");
$row = mssql_fetch_assoc($res);

$s = is_null($row['c']) ? 'NULL' : $row['c'];
echo "got -$s-\n";

Expected result:

var_dump($s) should print string(0) ""

Actual result:
--
var_dump($s) print NULL





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



#49107 [NEW]: Empty string is returned as NULL, see bug: 39213

2009-07-30 Thread jochem dot blok at fasterforward dot nl
From: jochem dot blok at fasterforward dot nl
Operating system: Debian
PHP version:  5.2.10
PHP Bug Type: MSSQL related
Bug description:  Empty string is returned as NULL, see bug: 39213

Description:

This is the same bug as reported in bug: 39213. An empty string is
returned as NULL.

Reproduce code:
---
$conn = mssql_connect('host','user','password', true);


mssql_query("CREATE TABLE #tmp(c VARCHAR(10) NULL)", $conn) or
die("error querying");

mssql_query("INSERT INTO #tmp VALUES('')", $conn) or die("error
querying");

$res = mssql_query("SELECT * FROM #tmp", $conn) or die("query");
$row = mssql_fetch_assoc($res);

$s = is_null($row['c']) ? 'NULL' : $row['c'];
echo "got -$s-\n";

Expected result:

var_dump($s) should print string(0) ""

Actual result:
--
var_dump($s) print NULL

-- 
Edit bug report at http://bugs.php.net/?id=49107&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49107&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49107&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49107&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49107&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49107&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49107&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=49107&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=49107&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=49107&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=49107&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=49107&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=49107&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=49107&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49107&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=49107&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=49107&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=49107&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=49107&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=49107&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=49107&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=49107&r=mysqlcfg



#45756 [Opn]: Query is executed on wrong server (resource). Bug with global resource scope?

2008-08-08 Thread jochem dot blok at fasterforward dot nl
 ID:   45756
 User updated by:  jochem dot blok at fasterforward dot nl
 Reported By:  jochem dot blok at fasterforward dot nl
 Status:   Open
 Bug Type: MSSQL related
 Operating System: Debian
 PHP Version:  5.2.6
 New Comment:

Btw. FreeTDS is used described in the manual:
http://nl2.php.net/manual/en/mssql.setup.php


Previous Comments:


[2008-08-08 07:18:08] jochem dot blok at fasterforward dot nl

Description:

See reproduce code. The query is executed 2 times on resource $r2.

Reproduce code:
---
$r1 = mssql_connect('my_server', 'my_user', 'my_pass');
mssql_select_db('database_1', $r1);

$r2 = mssql_connect('my_server', 'my_user', 'my_pass');
mssql_select_db('database_2', $r2);

$sSql = 'select count(*) as total from my_table';

$rRes1 = mssql_query($sSql, $r1);
$oRow1 = mssql_fetch_object($rRes1);
echo '1:   '.$oRow1->total.'';

$rRes2 = mssql_query($sSql, $r2);
$oRow2 = mssql_fetch_object($rRes2);
echo '2:   '.$oRow2->total.'';

Expected result:

Different total.

Actual result:
--
Same total.





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



#45756 [NEW]: Query is executed on wrong server (resource). Bug with global resource scope?

2008-08-08 Thread jochem dot blok at fasterforward dot nl
From: jochem dot blok at fasterforward dot nl
Operating system: Debian
PHP version:  5.2.6
PHP Bug Type: MSSQL related
Bug description:  Query is executed on wrong server (resource). Bug with global 
resource scope?

Description:

See reproduce code. The query is executed 2 times on resource $r2.

Reproduce code:
---
$r1 = mssql_connect('my_server', 'my_user', 'my_pass');
mssql_select_db('database_1', $r1);

$r2 = mssql_connect('my_server', 'my_user', 'my_pass');
mssql_select_db('database_2', $r2);

$sSql = 'select count(*) as total from my_table';

$rRes1 = mssql_query($sSql, $r1);
$oRow1 = mssql_fetch_object($rRes1);
echo '1:   '.$oRow1->total.'';

$rRes2 = mssql_query($sSql, $r2);
$oRow2 = mssql_fetch_object($rRes2);
echo '2:   '.$oRow2->total.'';

Expected result:

Different total.

Actual result:
--
Same total.

-- 
Edit bug report at http://bugs.php.net/?id=45756&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45756&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45756&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45756&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45756&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=45756&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=45756&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=45756&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=45756&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=45756&r=support
Expected behavior:http://bugs.php.net/fix.php?id=45756&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=45756&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=45756&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45756&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45756&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45756&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=45756&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=45756&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45756&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=45756&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=45756&r=mysqlcfg



#44484 [NEW]: Call to magic function __toString gives a undefined method error

2008-03-19 Thread jochem dot blok at fasterforward dot nl
From: jochem dot blok at fasterforward dot nl
Operating system: Windows XP SP2
PHP version:  5.2.5
PHP Bug Type: SimpleXML related
Bug description:  Call to magic function __toString gives a undefined method 
error

Description:

The call to magic function __toString() gives a Fatal error. This method 
should exists, see the reply of [EMAIL PROTECTED] at 
http://bugs.php.net/bug.php?id=25640

Reproduce code:
---


 
  PHP: Behind the Parser
  
   
Ms. Coder
Onlivia Actora
   
   
Mr. Coder
El ActÓr
   
  
  
   So, this language. It's like, a programming language. Or is it a
   scripting language? All is revealed in this thrilling horror spoof
   of a documentary.
  
  
   PHP solves all my web problems
  
  7
  5
 

XML;

$xml = new SimpleXMLElement($xmlstr);

$m = $xml->movie[0]->plot; // "So this language. It's like..."

$m->__toString()
?>

Expected result:

So, this language. It's like, a programming language. Or is it a
   scripting language? All is revealed in this thrilling horror spoof
   of a documentary.

Actual result:
--
Fatal error: Call to undefined method SimpleXMLElement::__toString() in
C:\php\xml.php on line 35

-- 
Edit bug report at http://bugs.php.net/?id=44484&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44484&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44484&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44484&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44484&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44484&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44484&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44484&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44484&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44484&r=support
Expected behavior:http://bugs.php.net/fix.php?id=44484&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44484&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44484&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44484&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44484&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44484&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44484&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44484&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44484&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44484&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44484&r=mysqlcfg



#34647 [Com]: mssql.timeout has no affect

2007-06-20 Thread jochem dot blok at fasterforward dot nl
 ID:   34647
 Comment by:   jochem dot blok at fasterforward dot nl
 Reported By:  j dot geusebroek at intellit dot nl
 Status:   No Feedback
 Bug Type: MSSQL related
 Operating System: Suse 9.3
 PHP Version:  5.0.5
 Assigned To:  fmk
 New Comment:

I also have this problem with PHP 5.2.0.

mssql.timeout is set to Local Value 60 and Master Value 60. Php doesn't
time out. I have a query which run over 60 seconds.


Previous Comments:


[2007-06-15 11:36:39] sarstrom at gmail dot com

I'm sorry, but setting the timeouts in php.ini doesn't help either.
phpinfo() confirms that the limit is set to 1 second, but it waits an
infinite amount of time for the query to finish!

Deliberatly making a self-join-query will lock up one php-thread
forever, after all threads are locked up, the webserver won't answer any
further requests.

/hps



[2007-06-14 16:47:33] [EMAIL PROTECTED]

The two time out parameters is used during request startup and it will
not have any effect to change the value at runtime.

I'll look at a way to move these to the connect/query functions, but
until then you should specify these in your php.ini file.



[2007-06-13 11:30:52] sarstrom at gmail dot com

I can still reproduce this problem as of 2007-06-13.

I've tried with PHP 5.2.1 and 5.2.3, And FreeTDS is at 0.64
on a FreeBSD 6.1 install.

This code always waits the 20 seconds and tells me that everything went
according to plan

$dbLink = mssql_connect('sqldmz','sosuser','123456');
ini_set('mssql.timeout','1');
$query = "WAITFOR DELAY '000:00:20' SELECT TOP 1 * FROM
tbl_serviceorder";
$res = mssql_query($query,$dbLink);

if(!$res) {
   echo 'No, error, warning, timeout!';
}
else {
   $row = mssql_fetch_assoc($res);
   echo 'Everything is OK: '.$row['OrderNumber'];
}

/hps



[2005-11-14 01:00:03] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, 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".



[2005-11-06 23:19:58] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip





The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34647

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