[PHP-DB] where can I post some mysql related questions?
hi, I've currently been looking for a mysql news server where I could post some questions on mysql database design (cause they shurely wouldn't fit here) and I have yet to find one. Can anyone help? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] where can I post some mysql related questions?
Mike wrote: hi, I've currently been looking for a mysql news server where I could post some questions on mysql database design (cause they shurely wouldn't fit here) and I have yet to find one. Can anyone help? http://lists.mysql.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Finding the value of the COMMENT in a table column
Hi all, Anyone know how to access the optional COMMENT you can add to columns during table creation? eg. create table x (fldx char(1) COMMENT 'some comment', fldy char (1) COMMENT 'another comment') I want to 'get' the COMMENT field. I know it should be in the manual, but I can't find it. Thanks ... Ross . . Ross Honniball. JCU Bookshop Cairns, Qld, Australia. . -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML question
On Sun, 19 Sep 2004, David Orlovich wrote: I think you're just missing some double quotes (which you have to escape). How about something like this: echo tda href=\mailto:;, $row['Email'], \, $row['Email'], /a/td; Cheers, David. Perfect!!! Many thanks. Pete -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] SQLite problem INSERTing string
Hello, I am currently experiencing a problem with an INSERT statement in SQLite. First of all an excerpt from the code: $val = 127.0.0.1; $query = INSERT INTO node (uri,name) VALUES (.$val.,'bla'); $db_name = mysqlite; if($db_hdl = sqlite_open($db_name)){ $db_result = sqlite_query($db_hdl,$query); } I get the error message: Warning: sqlite_query(): near .: syntax error in C:\Programme\xampp\htdocs\dipl\testclient\sqlite_test.php on line 10 I tried addslashes (which I know I shouldn't), sqlite_escape_string, any variant of quotes etc, I asked google and the searched the news groups but with no relevant result, except the insight, that others experience the same so long unsolved problem or use a syntax in their tutorials that does not work with my code... As you an see from the error message, I use Windows, Apache, PHP4 with SQLite in a 2.8.14 version. If anyone has a clue, please contact me or just answer. Thanks in advance Stefan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] SQLite problem INSERTing string
$val = 127.0.0.1; $query = INSERT INTO node (uri,name) VALUES ('.$val.','bla'); Try that? -Original Message- From: Stefan Reimers [mailto:[EMAIL PROTECTED] Sent: Sunday, September 19, 2004 6:37 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] SQLite problem INSERTing string Hello, I am currently experiencing a problem with an INSERT statement in SQLite. First of all an excerpt from the code: $val = 127.0.0.1; $query = INSERT INTO node (uri,name) VALUES (.$val.,'bla'); $db_name = mysqlite; if($db_hdl = sqlite_open($db_name)){ $db_result = sqlite_query($db_hdl,$query); } I get the error message: Warning: sqlite_query(): near .: syntax error in C:\Programme\xampp\htdocs\dipl\testclient\sqlite_test.php on line 10 I tried addslashes (which I know I shouldn't), sqlite_escape_string, any variant of quotes etc, I asked google and the searched the news groups but with no relevant result, except the insight, that others experience the same so long unsolved problem or use a syntax in their tutorials that does not work with my code... As you an see from the error message, I use Windows, Apache, PHP4 with SQLite in a 2.8.14 version. If anyone has a clue, please contact me or just answer. Thanks in advance Stefan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] SQLite problem INSERTing string
$val=127.0.0.1; $query=INSERT INTO node set uri=\$val\, name=\bla\; Try this one... think is better n less confusing for u... On Sun, 19 Sep 2004 19:13:48 +0200, Darryl [EMAIL PROTECTED] wrote: $val = 127.0.0.1; $query = INSERT INTO node (uri,name) VALUES ('.$val.','bla'); Try that? -Original Message- From: Stefan Reimers [mailto:[EMAIL PROTECTED] Sent: Sunday, September 19, 2004 6:37 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] SQLite problem INSERTing string Hello, I am currently experiencing a problem with an INSERT statement in SQLite. First of all an excerpt from the code: $val = 127.0.0.1; $query = INSERT INTO node (uri,name) VALUES (.$val.,'bla'); $db_name = mysqlite; if($db_hdl = sqlite_open($db_name)){ $db_result = sqlite_query($db_hdl,$query); } I get the error message: Warning: sqlite_query(): near .: syntax error in C:\Programme\xampp\htdocs\dipl\testclient\sqlite_test.php on line 10 I tried addslashes (which I know I shouldn't), sqlite_escape_string, any variant of quotes etc, I asked google and the searched the news groups but with no relevant result, except the insight, that others experience the same so long unsolved problem or use a syntax in their tutorials that does not work with my code... As you an see from the error message, I use Windows, Apache, PHP4 with SQLite in a 2.8.14 version. If anyone has a clue, please contact me or just answer. Thanks in advance Stefan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Abstraction Layer....
Anyone for a list of php abstraction classes? ADODB, PEAR::DB... any others? or better? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: SQLite problem INSERTing string
Hi again, first of all thanks for quick suggestions. After some more testing, I can get more specific: This might be a more general problem than the . in the error message. Even when I use $val = hello I get an equivalent error message sqlite_query(): near hello As said, I have done all the quoting stuff, so \' instead of ' was no solution either, until I tried double quotes instead of single ones, just as M Saleh Eg suggested. So the following statement finally works: $query = INSERT INTO node (uri,name) VALUES (\$val\,\\); Just for everybody else: SQLite does not support the SET statement in INSERTs, so INSERT INTO table SET attr=val would not work. Thx Stefan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Abstraction Layer....
PHP knows at least three more: dba - for databases built on Berkeley DB which can be used some DB-configurations of MySQL dbm - also very specific for dbm-format, which seems not to be a relational one. Some apps seem to use that kind of DB internally. dbx - supports about a dozen types of RDBMS (e.g. PostgreSQL and Oracle, furthermore ODBC) and is very nice. I worked with it the last four months to write a flexible information system. Some comparisons can be found at: http://php.weblogs.com/Compare_PEAR_DB_ADOdb http://phplens.com/lens/adodb/ Stefan M Saleh Eg wrote: Anyone for a list of php abstraction classes? ADODB, PEAR::DB... any others? or better? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Abstraction Layer....
Hello, On 09/19/2004 02:32 PM, M Saleh Eg wrote: Anyone for a list of php abstraction classes? ADODB, PEAR::DB... any others? or better? Metabase http://www.phpclasses.org/metabase PEAR::MDB http://pear.php.net/package/MDB Creole http://creole.phpdb.org/ -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Passing URL parameters, how to hide
I'm still confused over one aspect of URL parameters. As far as a form passing data back to the server, I understand about get, post and replace. Here is my problem. I have an update form. User is logged in to the system and needs to update whatever information. Right now I'm including in the link the user's ID, so when they arrive at the update page, their record will be displayed. The problem is all one has to do is change the ID number in the URL parameter in the update page and you can go to someone else's record. How do programmers generally get around this ? I must be missing something. Thank you, Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Passing URL parameters, how to hide-Nevermind
Ugh, I should rest on the weekends :) --- Stuart Felenstein [EMAIL PROTECTED] wrote: -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Passing URL parameters, how to hide
Turned out hiding the id wasn't necessary as the awaiting update page can grab the session ID. I wasn't thinking. Sorry Stuart --- John Holmes [EMAIL PROTECTED] wrote: Stuart Felenstein wrote: I'm still confused over one aspect of URL parameters. As far as a form passing data back to the server, I understand about get, post and replace. Here is my problem. I have an update form. User is logged in to the system and needs to update whatever information. Right now I'm including in the link the user's ID, so when they arrive at the update page, their record will be displayed. The problem is all one has to do is change the ID number in the URL parameter in the update page and you can go to someone else's record. How do programmers generally get around this ? I must be missing something. How do you identify the user once they are logged in? There should be some way to relate the logged in user to valid records they can see. Then, if they request an invalid record, you can show them an error page. Hiding the ID isn't going to fix anything. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP + SSL + LDAP + IPLANET
Greetings, (That Iplanet word must have peaked your interest...riight...) OS: Solaris 9 CC: GCC 3.2.2 APP: Sun ONE Web Server 6.2SP2 LDAP: Sun ONE Directory Server 5.2 (configured for SSL and confirmed with non-php apps) Configured PHP 4.3.8/or 5.1 with openssl, openldap, libxml, zlib using GCC 3.2.2 (all latest stable versions). Created and installed the certificates. Verified using openssl programs and ldapsearch utils. I have a *few* questions a) Internet research to get ldaps working with PHP tells me that I have to setup a HOME environment variable for the Web Server User and dump a .ldaprc file in there, in addition to specifying option in the ldap.conf file. I did that in the magnus.conf file using init-cgi directive. The Env Variable is visible to all the cgi programs. HOWEVER, the phpinfo() command does not pick up that (and all of my other user Environment variables such as ORACLE_HOME etc) and hence does not see that file. phpinfo() keeps reporting that the user is root (I don't want that!). The Web Server runs as a non-root user. What gives ? I read some docs but they are not clear on how to pass these env variables.. Q: How can I make vendor/custom environment variables available for PHP running in IPLANET server ? b) I added the following lines to my /usr/local/openldap/etc/openldap/ldap.conf file # Instruct client to NOT request a server's cert. TLS_REQCERT never # Define location of CA Cert TLS_CACERT /usr/local/ssl/certs/AD_CA_CERT.pem TLS_CACERTDIR /usr/local/ssl/certs #--end-- The ldapsearch util works good and makes SSL connection to the ldap server (using ldapsearch -H ldaps://server.tigr.org) To test PHP's ability, I am using the connect_AD function from the PHP man page (replicated below) function connect_AD() { $ldap_server = ldaps://adserver.ad.com ; $ldap_user = CN=web service account,OU=Service Accounts,DC=ad,DC=com ; $ldap_pass = password ; $ad = ldap_connect($ldap_server) ; ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3) ; $bound = ldap_bind($ad, $ldap_user, $ldap_pass); return $ad ; } BUT the above function does not work. It just hangs at the ldap_connect stage. No output on snoop also (tcpdump for solaris). However, when I tried to specifiy ldap_connect (server, 636), it get's past that point but hangs at ldap_bind. I have a feeling that PHP under IPLANET is just not able to pick up the installed certificates. May be connected to the fact that I can't get it retrieve my environment variables specified in the server ... ? Any pointers ? please ? I will summarize once i find a solution. many many tia rajeev
Re: [PHP-DB] Re: SQLite problem INSERTing string
I think I figured it out. SQLLite doesnt take single quotes as the text or varchar datatype values the strings passed to sqllite should match the data type of the column ... so ur mistake was creating a data type mismatch at the SQL lite end. hmm... thanx for the info Stefan... I never knew SQLLite doesnt support the inline Inserts using Set... thanx for that. I dont use SQLLite now.. plannin' to do that whenever possible.. On Sun, 19 Sep 2004 19:58:14 +0200, Stefan Reimers [EMAIL PROTECTED] wrote: Hi again, first of all thanks for quick suggestions. After some more testing, I can get more specific: This might be a more general problem than the . in the error message. Even when I use $val = hello I get an equivalent error message sqlite_query(): near hello As said, I have done all the quoting stuff, so \' instead of ' was no solution either, until I tried double quotes instead of single ones, just as M Saleh Eg suggested. So the following statement finally works: $query = INSERT INTO node (uri,name) VALUES (\$val\,\\); Just for everybody else: SQLite does not support the SET statement in INSERTs, so INSERT INTO table SET attr=val would not work. Thx Stefan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] PHP + SSL + LDAP + IPLANET
OK - just got a bit crazier! That function works when running on the command line. As the root user, as the webserver user and ANY user who can run the php command (truss on php shows that it IS reading the ldap.conf file from /usr/local/openldap/etc) But why does it not work from the Web Server ?! rajeev -Original Message- From: Karamchedu, Rajeev K. [mailto:[EMAIL PROTECTED] Sent: Sun 9/19/2004 6:26 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP + SSL + LDAP + IPLANET Greetings, (That Iplanet word must have peaked your interest...riight...) OS: Solaris 9 CC: GCC 3.2.2 APP: Sun ONE Web Server 6.2SP2 LDAP: Sun ONE Directory Server 5.2 (configured for SSL and confirmed with non-php apps) Configured PHP 4.3.8/or 5.1 with openssl, openldap, libxml, zlib using GCC 3.2.2 (all latest stable versions). Created and installed the certificates. Verified using openssl programs and ldapsearch utils. I have a *few* questions a) Internet research to get ldaps working with PHP tells me that I have to setup a HOME environment variable for the Web Server User and dump a .ldaprc file in there, in addition to specifying option in the ldap.conf file. I did that in the magnus.conf file using init-cgi directive. The Env Variable is visible to all the cgi programs. HOWEVER, the phpinfo() command does not pick up that (and all of my other user Environment variables such as ORACLE_HOME etc) and hence does not see that file. phpinfo() keeps reporting that the user is root (I don't want that!). The Web Server runs as a non-root user. What gives ? I read some docs but they are not clear on how to pass these env variables.. Q: How can I make vendor/custom environment variables available for PHP running in IPLANET server ? b) I added the following lines to my /usr/local/openldap/etc/openldap/ldap.conf file # Instruct client to NOT request a server's cert. TLS_REQCERT never # Define location of CA Cert TLS_CACERT /usr/local/ssl/certs/AD_CA_CERT.pem TLS_CACERTDIR /usr/local/ssl/certs #--end-- The ldapsearch util works good and makes SSL connection to the ldap server (using ldapsearch -H ldaps://server.tigr.org) To test PHP's ability, I am using the connect_AD function from the PHP man page (replicated below) function connect_AD() { $ldap_server = ldaps://adserver.ad.com ; $ldap_user = CN=web service account,OU=Service Accounts,DC=ad,DC=com ; $ldap_pass = password ; $ad = ldap_connect($ldap_server) ; ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3) ; $bound = ldap_bind($ad, $ldap_user, $ldap_pass); return $ad ; } BUT the above function does not work. It just hangs at the ldap_connect stage. No output on snoop also (tcpdump for solaris). However, when I tried to specifiy ldap_connect (server, 636), it get's past that point but hangs at ldap_bind. I have a feeling that PHP under IPLANET is just not able to pick up the installed certificates. May be connected to the fact that I can't get it retrieve my environment variables specified in the server ... ? Any pointers ? please ? I will summarize once i find a solution. many many tia rajeev
[PHP-DB] Re: Finding the value of the COMMENT in a table column
On Sun, 19 Sep 2004 21:19, Ross Honniball wrote: Hi all, Anyone know how to access the optional COMMENT you can add to columns during table creation? eg. create table x (fldx char(1) COMMENT 'some comment', fldy char (1) COMMENT 'another comment') I want to 'get' the COMMENT field. I know it should be in the manual, but I can't find it. Thanks ... Ross . . Ross Honniball. JCU Bookshop Cairns, Qld, Australia. SHOW TABLE STATUS LIKE 'pattern' or SHOW CREATE TABLE tablename will return the table comment, along with other info - you'll have to parse it out of the returned data. If there is a better way, I haven't found it yet :-0 Not sure how this will work with column comments. Cheers -- David Robley May I introduce the family Stone? Tom asked slyly. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php