RE: [PHP-DB] How can you hide database login passwd in your script?

2001-09-05 Thread speedboy
> $0 option: > Put your user ID and password in a config file, then give only the > webserver user access to it. Read the config file to make it work. This > also allows easy switching between test and production environments. You can't change the group owner of a file unless you have root. Th

RE: [PHP-DB] How can you hide database login passwd in your script?

2001-09-05 Thread Marco Draijer
For everybody who cannot change system settings like ownership of directories and access configurations in the webserver: Make a simple include file containing: $db_passwd = "secret"; (just plain ascii) and put it in a directory beneath (or higher than, whatever is your point of view) the webr

[PHP-DB] HELP - Linux and Sql Anywhere 5.5

2001-09-05 Thread Boris
Is it possible to have Sybase Sql Anywhere 5.5 database server on windows nt and client on Linux and how? Thanks Boris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administr

RE: [PHP-DB] How can you hide database login passwd in yourscript?

2001-09-05 Thread Alnisa Allgood
At 6:22 PM +1000 9/5/01, speedboy wrote: > > $0 option: >> Put your user ID and password in a config file, then give only the >> webserver user access to it. Read the config file to make it work. This >> also allows easy switching between test and production environments. > >You can't change

[PHP-DB] Re: Searching a table

2001-09-05 Thread Marcus Tobias
Hi Devon! Take a look in the function reference to mysql functions of PHP. There are functions to connect to the mysql database and requesting datas with SQL queries. You need knowlege on SQL to use it. There are example too. bye Marcus "Devon" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL

[PHP-DB] INSERT Problem

2001-09-05 Thread shi
Hi I'm trying to insert a text into a MYSQL DB, and here is the problem. If the text looks like this "x xx x x xxx 'xxx xxx" then PHP interprets the text following the ' as an sql statement. Does anyone know how to overcome this problem. Thank you Shimon -- PHP Database Mailing List (http

[PHP-DB] insert problem mysql

2001-09-05 Thread shi
Hi I'm trying to insert a text into a MYSQL DB, and here is the problem. If the text looks like this "x xx x x xxx 'xxx xxx" then PHP interprets the text following the ' as an sql statement. Does anyone know how to overcome this problem. Thank you Shimon -- PHP Database Mailing List (http

Re: [PHP-DB] INSERT Problem

2001-09-05 Thread Miles Thompson
Have a look at addslashes http://www.php.net/manual/en/function.addslashes.php Miles At 01:20 PM 9/5/01 +0200, shi wrote: >Hi >I'm trying to insert a text into a MYSQL DB, and here is the problem. If the >text looks like this "x xx x x xxx 'xxx xxx" then PHP interprets the >text following the

[PHP-DB] postgresql groups and users

2001-09-05 Thread Michiel_Lange
for my application in php I connect with a postgresql database. In this database I have made users and groups, where 1 user can be the member of many groups (n on m relation) That works, but how do I let php find out if a user is a member of a certain group? I tried to get the relation out of the

RE: [PHP-DB] html generated web pages

2001-09-05 Thread Rick Emery
Now...I understand. To accomplish what you want requires that you store user preferences in a database of some sorts. Then extract those preferences and insert them as HTML attributes to various tags. First, I would recommend that you use Cascading Style Sheets to set-up CLASSes and IDs for eac

[PHP-DB] Re: Searching a table

2001-09-05 Thread Jacob Singh
Hello, Devon, Try the methos outlines in this article: http://phpbuilder.com/columns/clay19990421.php3 The method is basically this: break up all your fields into one word chunks. insert into a search_table a chunk and it's corresponding ID of the row it came from. It won't take boo

[PHP-DB] Re: postgresql groups and users

2001-09-05 Thread Steve Brett
"Michiel Lange" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > for my application in php I connect with a postgresql database. > In this database I have made users and groups, where 1 user can be the > member of many groups (n on m relation)

[PHP-DB] webpage counters

2001-09-05 Thread Eduardo Vela
Hi: I have two types of counters in my web site and I would like to know which one is better. a) the first one using a field in mysql table and updating it each time a visitor hits the page. b) the second one using a plaint text file using code like this: in this case i had to change the perm

[PHP-DB] some commands

2001-09-05 Thread Sharmad Naik
Does php help me in find features and faults of my m/c or network. I want to know whether there are any commands or calls to do so. like getting my cpu info. -TIA Sharmad -- Donot rely on the Operating System which don't have any sources for. -Seen somewher

Re: [PHP-DB] How can you hide database login passwd in yourscript?

2001-09-05 Thread Paul Burney
>> That does not stop another php user fopen'ing your config file. This is a point that needs to be stressed. The other posts about keeping db connection info outside of the web tree and naming the files .php are good ones, but even with them, there can be major security problems on a shared vir

RE: [PHP-DB] How can you hide database login passwd in your script?

2001-09-05 Thread Rick Emery
Another solution is DO NOT store passwords and usernames in the database file. Rather, store a hash of the password and username using the php MD5() function. Something like: $username = $HTTP_POST_VARS['user']; # from FORM page $password = $HTTP_POST_VARS['pw']; # from FORM page $hash = md5

[PHP-DB] RE: bizarre ocilogon problem

2001-09-05 Thread Brian Mauter
Are you running out of logons? You should only need the client libraries on the machine with the PHP pages. You do not need them anywhere else. (That's the beauty of the web!) Make sure you have ocilogoff in your PHP page when you're done. Even better (for performance reasons) create a session

[PHP-DB] Re: PHP and Fox Pro (ADODB) question

2001-09-05 Thread John Lim
Hello, You need to configure an ODBC DSN that accesses the foxpro database. Assume the DSN is called foxy. Then download from http://php.weblogs.com/adodb the library. Sample code: include('adodb.inc.php'); include('tohtml.inc.php'); $conn = &ADONewConnection('vfp'); $conn->PConnect('foxy

[PHP-DB] Re: insert problem mysql

2001-09-05 Thread John Lim
Use $s = addslashes($s); "Shi" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi > I'm trying to insert a text into a MYSQL DB, and here is the problem. If the > text looks like this "x xx x x xxx 'xxx xxx" then PHP interprets the > text following the '

[PHP-DB] Re: insert problem mysql

2001-09-05 Thread shi
Thanks Shimon "John Lim" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Use > > $s = addslashes($s); > > > "Shi" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi > > I'm trying to insert a text into a MYSQL DB, and her

[PHP-DB] Re: PHP and Fox Pro (ADODB) question

2001-09-05 Thread Er Galvão Abbott
Is it possible to do it on Linux servers? On Wed, 5 Sep 2001 23:39:09 +0800, [EMAIL PROTECTED] (John Lim) wrote: >Hello, > >You need to configure an ODBC DSN that accesses the foxpro database. Assume >the DSN is called foxy. > >Then download from http://php.weblogs.com/adodb the library. > >Sa

[PHP-DB] Re: PHP and Fox Pro (ADODB) question

2001-09-05 Thread John Lim
Best is to port the database to mysql then. Regards, John "Er GalvãO Abbott" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Is it possible to do it on Linux servers? > > > > On Wed, 5 Sep 2001 23:39:09 +0800, [EMAIL PROTECTED] (John Lim) > wrote: > > >Hello,

[PHP-DB] implementing php with IBM branded apache

2001-09-05 Thread Marc Grober
We are using the IBM branded apache on an rs6k. I would like to add php functionality. Is there some way to add the php module? As I understand it, I can still use php it just won;t be compiled into apache ??? marc grober -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-m

Re: [PHP-DB] implementing php with IBM branded apache

2001-09-05 Thread Tom Carter
What OS are you running on it? I've used php on an rs6000 while at IBM. worked fine, I didn't install it tho, but I don't think they had any problems. HTH, Tom - Original Message - From: "Marc Grober" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, Septem

[PHP-DB] ODBC and SQL Server

2001-09-05 Thread Todd Cary
I am trying to setup an ODBC connect to SQL Server. My DSN is "Acct32_ODBC". I am using NT Authentication, so that could be my problem. odbc_connect("Acct32_ODBC", "", ""); Warning: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'PENTIUM3\IUSR_PENTIUM3'., SQL s

Re: [PHP-DB] Re: PHP and Fox Pro (ADODB) question

2001-09-05 Thread Miles Thompson
I'd *mildly* disagree with that suggestion - is this a VFP database or 2.x? Are sub-selects used extensively? Do you need stored procedures? If so, PostgreSQL may be a better choice. If it's 2.x, simple joins, sure, MySQL is fine. Miles Thompson At 12:53 AM 9/6/01 +0800, John Lim wrote: >Best

RE: [PHP-DB] ODBC and SQL Server

2001-09-05 Thread Andrew Hill
Well, does the "Test" button on your ODBC Admininstrator shed any light? :) If it works there, and doesn't work in your PHP, create an ODBC Trace in the Administrator so you can see the exact parameters of the connect. HTH Best regards, Andrew Hill Director of Technology Evangelism OpenLink Soft

[PHP-DB] Parsing Error

2001-09-05 Thread Jeff Grossman
I keep getting a Parsing Error on line 1 error with the following page. What am I doing wrong? http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd";> xxx \n"; echo " Store Job Desc \n"; while (($row = mysql_fetch_array($result))) { $store=$row["store"];

Re: [PHP-DB] Parsing Error

2001-09-05 Thread Bas Jobsen
Maybe rename your page to loose.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?

2001-09-05 Thread Bas Jobsen
Hello, Maybe someone can tell me, the difference b.e. $result = mysql_query ($query); unset($result); #or better mysql_free_result($result); tnx, Bas Jobsen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: [PHP-DB] ODBC and SQL Server

2001-09-05 Thread Todd Cary
Andrew - Thank you for getting back to me... <<< Well, does the "Test" button on your ODBC Admininstrator shed any light? :) If it works there, and doesn't work in your PHP, create an ODBC Trace in the Administrator so you can see the exact parameters of the connect. >>> The test does give

RE: [PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?

2001-09-05 Thread Rick Emery
unset() simply deletes the pointer to the data without releasing the space held by the data. mysql_free_result() releases the data storage pointed-to by the $result pointer. This is important because $result could be pointing-to a dataspace containing a large number or rows returned by the mysql_q

Re: [PHP-DB] ODBC and SQL Server

2001-09-05 Thread Todd Cary
Andrew - Could it be that the string, "Acct32_ODBC\ 0", should be "Acct32_ODBC"? If so, how do I get rid of the terminating "\0" in PHP? Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

[PHP-DB] Forms Question

2001-09-05 Thread Jeff Grossman
Hello, Here is the code I have: while ($row=mysql_fetch_array($result)) { $store=$row["store"]; $jobdesc=$row["jobdesc"]; echo ""; echo "Store: Signal Hill Reseda Orange West Covina Riverside Norwalk Fountain Valley

Re: [PHP-DB] Forms Question

2001-09-05 Thread Bas Jobsen
> Hello, > Here is the code I have: sure, your query is something like: select ..., store, jobdesc .. FROM .. why using: >$store=$row["store"]; >$jobdesc=$row["jobdesc"]; echo"dhdhdh".$row["store"]."blabla" would also work i should use: while (LIST($store,$jobdesc)=mysql_fetch_

Re: [PHP-DB] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?

2001-09-05 Thread Bas Jobsen
Hello, > unset() simply deletes the pointer to the data without releasing the space > held by the data. > mysql_free_result() releases the data storage pointed-to by the $result > pointer. > This is important because $result could be pointing-to a dataspace > containing a large number or rows ret

RE: [PHP-DB] ODBC and SQL Server

2001-09-05 Thread Andrew Hill
Todd, I don't believe so. Try passing in user and pass variables into your odbc_connect - I'm not sure that is happening. I've about reached my usefulness with regards to debugging a driver connection in someone else's ODBC drivers. At the risk of a plug, I can certainly get our working :) muc

Re: [PHP-DB] ODBC and SQL Server

2001-09-05 Thread Todd Cary
Andrew - What I am trying to do is to find out if I can use PHP with my client's MS SQL Server DB. Anything that can help me obtain that information would be greatly appreciated. OS: Win 2K (SP 2) DBMS: MS SQl Server 7 Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP Database Mai

RE: [PHP-DB] ODBC and SQL Server

2001-09-05 Thread Andrew Hill
Todd, Download and install the Lite (Single Tier) driver from our site (Product Availability link) to your Win box. Configure and test a DSN in the ODBC Administrator (The Test button shows up in the Create New Datasource dialog - be sure to hit "Apply" before the Test button, or it will not find

Re: [PHP-DB] Forms Question

2001-09-05 Thread Steve Cayford
On Wednesday, September 5, 2001, at 04:50 PM, Jeff Grossman wrote: > Hello, > Here is the code I have: > > while ($row=mysql_fetch_array($result)) { >$store=$row["store"]; >$jobdesc=$row["jobdesc"]; > echo ""; > echo "Store: > > Signal Hill > Reseda > O

[PHP-DB] best solution with db..?

2001-09-05 Thread Andrius Jakutis
Hello, I am newbie, so, please give me advice. Ok, I have PHP webpage, where I give information from MYSQL database (Info in english). I'd like to have website in german. Should I recreate (double) tables (those, where is text which is needed to be translated), or there is some clever solution?

Re: [PHP-DB] Forms Question

2001-09-05 Thread Michael Garvin
The solution is easier than you think. You'll need to insert an if statement in your option html tag that says echo "Signal Hill\n"; should become: echo "Signal Hill\n"; Jeff Grossman wrote: >Hello, >Here is the code I have: > >while ($row=mysql_fetch_array($result)) { > $store=$row["store

[PHP-DB] Re: PhP_dbm.dll

2001-09-05 Thread Yousuf A Vasanwala
Please Can anyone help pn this matter I recently installed PHP4 but with it didn't get the php_dbm.dll file. Yousuf A Vasanwala Durban > Hi, > > I recently installed PHP4 but with it didn't get the php_dbm.dll file. > > Basically what i need is the support for Berkeley DB db2 handler.. though >

Re: [PHP-DB] ODBC and SQL Server

2001-09-05 Thread Todd Cary
Andrew - Since I installed the OpenLink ODBC, the MS SQL Server Enterprise Manager has just about become useless as well as MS SQL Server itself. It take many minutes to do just about anything - even after I uninstalled OL. Do you have any suggestions? Todd -- Todd Cary Ariste Software [EMAI

[PHP-DB] Newbie Help: Searching

2001-09-05 Thread Devon
$Query = "SELECT * FROM enet WHERE TechContact LIKE '%' AND AdminContact LIKE '%'"; This query simply prints out my entire tables, is there a way using PHP so I can make the '%' a user input so they can search the table under those fields. Cheers -- PHP Database Mailing List (http://www.php.

RE: [PHP-DB] Newbie Help: Searching

2001-09-05 Thread Beau Lebens
have a form with something like then submit it to a page that might do something like $Query = "SELECT * FROM enet WHERE TechContact LIKE '%$TechContact%' AND AdminContact LIKE '%'"; which will locate anything CONTAINING what the user enters in the text field HTH Beau // -Original Mes

[PHP-DB] Installing SQL Server

2001-09-05 Thread Todd Cary
Has anybody succeeded in running PHP, using ODBC and the MS SQL Server ODBC driver? If so, I can use some guidance. Many thanks Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Re: [PHP-DB] Installing SQL Server

2001-09-05 Thread Frank M. Kromann
Yes, I have. I think I got the ODBC driver from MDAC 2.6 (available from www.microsoft.com/data), but you will also get it by installing other Microsoft products (Access or Office). Depending on the version of SQL Server you use you can get improved performence by ysing the native MSSQL extens

Re: [PHP-DB] html generated web pages

2001-09-05 Thread RSalomo
i'm sorry but i don't quite understand here. yes, i'm looking for a theoritical (logical) answers or quick and dirty solutions. since i'm a newbie here. i guess i'll do more reading and searching. thank you very much rick, joe, olinux o and others for replying. rudy - Original Message -

Re: [PHP-DB] newbie needs to format time field

2001-09-05 Thread Eric J Schwinder
thanks so much, I've gotten a lot from that page of the mySQL documentation... but I'm still needing little more help. I am currently using the following PHP to generate my page (with results displayed in standard mySQL date and time formats): $db = mysql_connect("localhost", "username", "pas

Re: [PHP-DB] newbie needs to format time field

2001-09-05 Thread Paul Burney
on 9/5/01 9:22 PM, Eric J Schwinder at [EMAIL PROTECTED] wrote: > thanks so much, I've gotten a lot from that page of the mySQL > documentation... Here's another one for you: A SELECT expression may be given an alias using AS. So instead of: > SEL

Re: [PHP-DB] html generated web pages

2001-09-05 Thread leo g. divinagracia iii
still, you have to make a way for your website to store the preferences of each user/web visitor, right? you can save the info in text file, somewhere not in the WEB DOCS path. that way, hackers cant break your webserver and browse outside the normal web pages path. (hacker can break into the m

Re: [PHP-DB] webpage counters

2001-09-05 Thread leo g. divinagracia iii
mysql will always have overhead. plus, IMO, mysql is overkill for just simple page counters. if i were you, keeping the text files outside the WEB DOC path would be better. they would have to crack into the machine itself... not just the web server... Eduardo Vela wrote: > > Hi: > > I have

[PHP-DB] Re: best solution with db..?

2001-09-05 Thread Marcus Tobias
Hi Andrius! It is depending on the style of the table. There are some solutions. One way is to split the the table in definition and content. This is the most open solution. For example: Table: Definition IDNameContentID Table: Content IDLanguageContentValue ForeingKey: Defi