History log of /PHP-8.2/ext/odbc/php_odbc.c (Results 1 – 25 of 390)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# bbe12229 04-Nov-2023 Saki Takamachi <34942839+SakiTakamachi@users.noreply.github.com>

Fix GH-12296: [odbc] [pdo_odbc] Optimized odbc connection string creating (#12306)

Declare and initialize on one line

changed to use php_memnistr

store strlen(db) in a vari

Fix GH-12296: [odbc] [pdo_odbc] Optimized odbc connection string creating (#12306)

Declare and initialize on one line

changed to use php_memnistr

store strlen(db) in a variable

Added a semicolon to the end of dsn.

If there is a semicolon at the end of the original dsn, it will be duplicated, so it will be removed.

Add condition when authentication information is null

show more ...


# 9dcdfa5e 28-Aug-2023 Máté Kocsis

Use correct format specifier


# 038b2ae2 08-Aug-2023 Máté Kocsis

Make the $enable parameter of odbc_autocommit() nullable (#11909)

Co-authored-by: George Peter Banyard <girgias@php.net>


# 03fd4054 06-Sep-2022 Tim Düsterhus

Use php_info_print_table_header for actual column headers only (#9485)

Using php_info_print_table_header() for "Foo: bar" looks odd and out of place,
because the whole line is colored. I

Use php_info_print_table_header for actual column headers only (#9485)

Using php_info_print_table_header() for "Foo: bar" looks odd and out of place,
because the whole line is colored. It is also questionable from a HTML
semantics point of view, because it does not described the columns that follow.

The use of this across extensions is inconsistent. It was part of the skeleton,
but ext/date or ext/json already use a regular row.

show more ...


# 77ac1e85 26-Dec-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-12974: Apache crashes on shutdown when using pg_pconnect()

On ZTS, the global variables are stored in dynamically allocated memory.
When the module gets shut down this memory is r

Fix GH-12974: Apache crashes on shutdown when using pg_pconnect()

On ZTS, the global variables are stored in dynamically allocated memory.
When the module gets shut down this memory is released. After the module
is shut down, only then are the persistent resources cleared. Normally
this isn't an issue, but pgsql and odbc refer to the globals to modify
some counters, after the globals have been freed.
Fix this by guarding the modification.

Closes GH-13032.

show more ...


# d98a45d0 19-Dec-2023 David Carlier

ext/pgsql: pgsql.allow_persistent, no need to use such large type for boolean state.

also ext/odbc, simplifying odd comparison with non persistent connections.

Close GH-12976


# 5a2b2516 31-Aug-2023 Calvin Buckley

Fix persistent procedural ODBC connections not getting closed

Like oci8, procedural ODBC uses an apply function on the hash list to
enumerate persistent connections and close the specifi

Fix persistent procedural ODBC connections not getting closed

Like oci8, procedural ODBC uses an apply function on the hash list to
enumerate persistent connections and close the specific one. However,
this function take zvals, not resources. However, it was getting casted
as such, causing it to interpret the pointer incorrectly. This could
have caused other issues, but mostly manifested as failing to close the
connection even fi it matched.

The function now takes a zval and gets the resource from that. In
addition, it also removes the cast of the function pointer and moves
casting to the function body, to avoid possible confusion like this in
refactors again. It also cleans up style and uses constants in the
function body.

Closes GH-12132

Signed-off-by: George Peter Banyard <girgias@php.net>

show more ...


# a022ec53 31-Aug-2023 Calvin Buckley

Fix memory leak with failed SQLPrepare

Closes GH-12095

Signed-off-by: George Peter Banyard <girgias@php.net>


# 1ad59b32 30-Aug-2022 George Peter Banyard

Update INI validator and displayers depending on INI type

Closes GH-9451


# f3a14d1b 23-Aug-2022 Calvin Buckley

Fix GH-9347: Current ODBC liveness checks may be inadequate

We implement SQL_ATTR_CONNECTION_DEAD for ODBC and PDO_ODBC.

This is semantically appropriate and should be used whenever

Fix GH-9347: Current ODBC liveness checks may be inadequate

We implement SQL_ATTR_CONNECTION_DEAD for ODBC and PDO_ODBC.

This is semantically appropriate and should be used whenever the
driver supports it. In the event that it fails or says the connection
isn't dead (which may be inaccurate in some cases), try the old
heuristic.

Closes GH-9353.

show more ...


# ba9debb5 28-Jul-2022 Nikita Popov

Fix parentheses warnings


# 236fd4ce 20-Jul-2022 Máté Kocsis

Declare ext/odbc constants in stubs (#9045)


# 445d9502 10-Jun-2022 Calvin Buckley

Fix handling of single-key connection strings

A connection string may contain just a single key, but
PHP used ";" as the heuristic to detect if a string was a connection
string versu

Fix handling of single-key connection strings

A connection string may contain just a single key, but
PHP used ";" as the heuristic to detect if a string was a connection
string versus plain DSN. However, a single-key connection string
would get treated like a DSN name, i.e. "DSN=*LOCAL". This makes it
so that "=" is used, as a connection string must contain a key.

Closes GH-8748.

show more ...


# e85b17b9 12-Apr-2022 Tim Düsterhus

Mark parameter in ext/odbc as sensitive


# 2920a266 22-Apr-2022 Calvin Buckley

Quote when adding to connection string in (PDO_)ODBC

Because the UID= and PWD= values are appended to the SQLDriverConnect
case when credentials are passed, we have to append them to the

Quote when adding to connection string in (PDO_)ODBC

Because the UID= and PWD= values are appended to the SQLDriverConnect
case when credentials are passed, we have to append them to the string
in case users are relying on this behaviour. However, they must be
quoted, or the arguments will be invalid (or possibly more injected).
This means users had to quote arguments or append credentials to the raw
connection string themselves.

It seems that ODBC quoting rules are consistent enough (and that
Microsoft trusts them enough to encode into the .NET BCL) that we can
actually check if the string is already quoted (in case a user is
already quoting because of this not being fixed), and if not, apply the
appropriate ODBC quoting rules.

This is because the code exists in main/, and are shared between
both ODBC extensions, so it doesn't make sense for it to only exist
in one or the other. There may be a better spot for it.

Closes GH-8307.

show more ...


# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs


# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...


# 3f71ba26 27-Apr-2021 Nikita Popov

Remove incorrect format argument

rc is not used by the printf format.


# 7f839762 26-Mar-2021 Christoph M. Becker

Fix #80460: ODBC doesn't account for SQL_NO_TOTAL indicator

The `StrLen_or_IndPtr` parameter usually may be `SQL_NO_TOTAL`; we need
to cater to that possibility to avoid working with neg

Fix #80460: ODBC doesn't account for SQL_NO_TOTAL indicator

The `StrLen_or_IndPtr` parameter usually may be `SQL_NO_TOTAL`; we need
to cater to that possibility to avoid working with negative string
lengths and other issues. A noteable exemption are calls to
`SQLGetData()` which return `SQL_SUCCESS`; in that case `SQL_NO_TOTAL`
can not occur.

Closes GH-6809.

show more ...


# 5caaf40b 29-Sep-2020 George Peter Banyard

Introduce pseudo-keyword ZEND_FALLTHROUGH

And use it instead of comments


# 3e01f5af 15-Jan-2021 Nikita Popov

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.

show more ...


# f674a334 05-Jan-2021 Christoph M. Becker

Fix #80592: all floats are the same in ODBC parameters

We must not release the strings until we are done with them.

Closes GH-6579.


# ee3227af 29-Oct-2020 Christoph M. Becker

Fix format specifier

In this function, `i` is of type `size_t`.


# c21e901b 29-Oct-2020 Christoph M. Becker

Fix #44618: Fetching may rely on uninitialized data

Unless `SQLGetData()` returns `SQL_SUCCESS` or `SQL_SUCCESS_WITH_INFO`,
the `StrLen_or_IndPtr` output argument is not guaranteed to be

Fix #44618: Fetching may rely on uninitialized data

Unless `SQLGetData()` returns `SQL_SUCCESS` or `SQL_SUCCESS_WITH_INFO`,
the `StrLen_or_IndPtr` output argument is not guaranteed to be properly
set. Thus we handle retrieval failure other than `SQL_ERROR` by
yielding `false` for those column values and raising a warning.

Closes GH-6281.

show more ...


# 8d4774a2 12-Oct-2020 Christoph M. Becker

Change parameters types from int to bool

These are typical boolean parameters, so we shouldn't advertize them as
integers. For the `$reverse` parameter that even fixes expectations,

Change parameters types from int to bool

These are typical boolean parameters, so we shouldn't advertize them as
integers. For the `$reverse` parameter that even fixes expectations,
because the `reverse` member is a bitfield of 1 bit, so assigning any
even integer would not set it.

Closes GH-6328.

show more ...


12345678910>>...16