|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-04-10 09:46 UTC] p dot frost at kent dot ac dot uk
[2009-05-18 06:22 UTC] grant dot croker at ingres dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 10:00:02 2025 UTC |
Description: ------------ When issued via PHP, the following statement fails to take effect: "GRANT all ON TABLE wuser.test_ TO userx" (followed by a commit, of course). The PHP driver does not return any output after it has sent the SQL (it does not throw any errors either). When userx attempts to access wuser.test_, Ingres complains: "E_US0DAE SELECT on table test_ no GRANT or GRANT compatible permit exists." When issued via isql in a terminal, the GRANT statement takes affect and userx is able to manipulate the data in test_. If the underscore is removed from test_ and the command is issued from PHP, the GRANT takes effect and userx is able to access the table. It seems that the underscore is causing the problem somehow. Underscores within the name (as opposed to at the end) do not cause any problems. For information, this is the output of "php -i | grep -i ingres" (the bug has also been confirmed using ingres2_query): Configure Command => './configure' '--enable-track-vars' '--with-ingres=/u4/ingres/AI/ingres' '--prefix=/u1/www' '--with-apxs=/u1/www/bin/apxs' '--with-regex=php' '--with-gd=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-zlib-dir=/usr/local' '--with-xpm-dir=/usr/local' '--with-freetype-dir=/usr/local' '--with-expat-dir=/usr/local' '--with-iconv=/usr/local' '--with-dom' '--with-mssql=/usr/local' '--with-openssl=/usr/local/ssl' ingres_ii Ingres II Support => enabled ingres.allow_persistent => On => On ingres.default_database => no value => no value ingres.default_password => no value => no value ingres.default_user => no value => no value ingres.max_links => Unlimited => Unlimited ingres.max_persistent => Unlimited => Unlimited LD_LIBRARY_PATH => /usr/local/lib:/usr/local/gnu/lib:/opt/SUNWspro/lib:/usr/openwin:/u4/ingres/AI/ingres/lib:/u4/ingres/AI/ingres/lib VEC => /u4/ingres/AI/ingres/vec TERM_INGRES => vt100f II_SYSTEM => /u4/ingres/AI PATH => /u4/ingres/AI/ingres/bin:/home/pkg/icedba/bin:/usr/local/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/local/gnu/bin:/usr/ccs/bin:/usr/local/sbin:/usr/local/bin:/usr/l/bin:/usr/l/misdev/utl:/usr/ucb:/usr/local/mh/bin:/usr/etc:/usr/bin:.:/usr/work/c102:/usr/work/c106 INGRES_KEYS => vt100f.map _SERVER["LD_LIBRARY_PATH"] => /usr/local/lib:/usr/local/gnu/lib:/opt/SUNWspro/lib:/usr/openwin:/u4/ingres/AI/ingres/lib:/u4/ingres/AI/ingres/lib _SERVER["VEC"] => /u4/ingres/AI/ingres/vec _SERVER["TERM_INGRES"] => vt100f _SERVER["II_SYSTEM"] => /u4/ingres/AI _SERVER["PATH"] => /u4/ingres/AI/ingres/bin:/home/pkg/icedba/bin:/usr/local/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/local/gnu/bin:/usr/ccs/bin:/usr/local/sbin:/usr/local/bin:/usr/l/bin:/usr/l/misdev/utl:/usr/ucb:/usr/local/mh/bin:/usr/etc:/usr/bin:.:/usr/work/c102:/usr/work/c106 _SERVER["INGRES_KEYS"] => vt100f.map _ENV["LD_LIBRARY_PATH"] => /usr/local/lib:/usr/local/gnu/lib:/opt/SUNWspro/lib:/usr/openwin:/u4/ingres/AI/ingres/lib:/u4/ingres/AI/ingres/lib _ENV["VEC"] => /u4/ingres/AI/ingres/vec _ENV["TERM_INGRES"] => vt100f _ENV["II_SYSTEM"] => /u4/ingres/AI _ENV["PATH"] => /u4/ingres/AI/ingres/bin:/home/pkg/icedba/bin:/usr/local/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/local/gnu/bin:/usr/ccs/bin:/usr/local/sbin:/usr/local/bin:/usr/l/bin:/usr/l/misdev/utl:/usr/ucb:/usr/local/mh/bin:/usr/etc:/usr/bin:.:/usr/work/c102:/usr/work/c106 _ENV["INGRES_KEYS"] => vt100f.map Reproduce code: --------------- wuser.test_ is a pre-existing table which is owned by wuser and was created via the following statement: CREATE TABLE test_(testchar char(4)); commit; PHP code: $link = ingres_connect("$dbserver::$db", "wuser", ""); ingres_query("grant all on table wuser.test_ to userx",$link); ingres_commit($link); ingres_close($link); Then (in isql or 4GL, as userx): select * from wuser.test_; Expected result: ---------------- I expected the SELECT statement to return the contents of the table. Actual result: -------------- "E_US0DAE SELECT on table test_ no GRANT or GRANT compatible permit exists."