Re: [PHP-DB] Secure database connectivity?
>file by FTP for example). If you're really paranoid, put the >username/password outside your htroot into a separate file, say >passwords.inc and include it into php with >include('/secure/passwords.inc'), but this isn't really needed, and >BTW, it won't make the connection method more secure, or insecure. Perhaps I'm paranoid.. don't think it's bad. I would recommend putting it outside the htroot.. this will prevent people from seeing it if someone screws up the serverconfig.. Another thing I wouldn't call it password.inc.. if someone would gain access to your userdir they would first look for something with password or passwd in it.. give it an unrelated name.. I must agree that it won't make your PHP script more secure since it's parsed. But it's always a good thing to be carefull. Bye, B. -- 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]
Re: [PHP-DB] Advice On Building Dynamic MySQL Queries
My solution was almost as elegent... $query="select * from customers"; $queryand=false; if(!empty($f_Account)) { $query.=" WHERE upper(P.Account) like upper('$f_Account')"; $queryand=true; } if(!empty($f_First_Name)) { $query.=($queryand?" AND ":" WHERE ")."upper(p.First_Name) like upper('$f_First_Name')"; $queryand=true; } ... For searchs, case doesn't matter (in my example), but you do need to index your table accordingly for best results. Also note upper() is the oracle uppercase function. I believe the uppercase function varies from one RDBMS to another. "Victor Foitzik" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello JD, > on 19.04.2001 you wrote: > > > if (!empty($Price)) > > { > > if(empty($whereclause)) > > { > > $whereclause.="Price$Price"; > > } > > else > > { > > $whereclause.=" AND 'Price $Price"; > > } > > } > > and even better would be: > > if (!empty($$varname)) { >$whereclause .= ($whereclause ? ' AND ' : ''). > "$varname =" . $$varname; > } > > or something like this ;-) > > HTH > Vic > > > > -- > 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 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]
Re: [PHP-DB] Secure database connectivity?
Hello Stuart, on 19.04.2001 you wrote: > Hi people, > I'm setting up a database to collect email addresses on my web site, but I > want to avoid using the insecure connection method: > mysql_connect("host", "user", "pass") > as this obviously displays my username and password to anyone who wants it. Does it ? I don't quite understand what the problem is, users fetching the page with their browsers won't get to php code, but the output, which certainly won't contain your username or password. Of course you should ensure that the file itself should not be accessible by ways other than HTTP (e.g. no (anonymous) user should be able to fetch the file by FTP for example). If you're really paranoid, put the username/password outside your htroot into a separate file, say passwords.inc and include it into php with include('/secure/passwords.inc'), but this isn't really needed, and BTW, it won't make the connection method more secure, or insecure. HTH Vic -- 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]
Re: [PHP-DB] Fatal error: undefined function mysql_connect()
Hello franky, on 13.04.2001 you wrote: > I'm trying to connect to mySQL DB by Web page > and > when I use mysql_connect() > this append: > Fatal error: Call to unsupported or undefined function mysql_connect() > thanks! are you really sure your php has mysql support compiled in (yes, it is possible to compile it without ;-)) ? check for mysql info, if you don't find anything, fetch the latest version and build a new php module with mysql support. HTH Vic -- 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]
Re: [PHP-DB] Advice On Building Dynamic MySQL Queries
Hello JD, on 19.04.2001 you wrote: > if (!empty($Price)) > { > if(empty($whereclause)) > { > $whereclause.="Price$Price"; > } > else > { > $whereclause.=" AND 'Price $Price"; > } > } and even better would be: if (!empty($$varname)) { $whereclause .= ($whereclause ? ' AND ' : ''). "$varname =" . $$varname; } or something like this ;-) HTH Vic -- 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]
Re: [PHP-DB] Advice On Building Dynamic MySQL Queries
Hello JD, on 19.04.2001 you wrote: > I am building a query from a search form. This is the code I have now: > if (!empty($whereclause)) > { > $whereclause=urldecode($whereclause); > $whereclause=stripslashes($whereclause); > } > extract($HTTP_POST_VARS); > if (!empty($Price)) > { > if(empty($whereclause)) <--- blah blah blah ---> > It Just became apparent that I am going to need to add a whole bunch more > search criteria.. Does anyone have any advice/suggestions for getting rid of > all those if statements? > JD what about using a foreach statement and going through all the variables you need like this ? $myvars = array('Price', 'Stuff', 'Thing'); foreach ($myvars as $varname) { if (!empty($$varname)) { // do funky stuff here } } HTH Victor -- 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]
Re[2]: [PHP-DB] OCI_DEFAULT
Hello Johannes, on 19.04.2001 you wrote: > hi, > OCIExecute() executes a previously parsed statement. (see OCIParse(). The > optional mode allows you to specify the execution-mode (default is > OCI_COMMIT_ON_SUCCESS). If you don't want statements to be committed > automaticly specify OCI_DEFAULT as your mode. that's right, but had anyone of you the same problem i had ? consider the following situation: using persistent connections and specifying OCI_DEFAULT works quite okay, but subsequent calls to OCIExecute remain in the OCI_DEFAULT state, whether or not you specify OCI_COMMIT_ON_SUCCESS. this means that executes made with this call remain uncommitted. Even more, scripts that reuse the connection are not able to do normal queries with this connection. Am I doing something really nasty, or is this just a feature i don't understand ? Tested PHP versions were 4.0.3pl and 4.0.4pl1 both on FreeBSD and Debian ... Hope somebody knows about ... Victor -- 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] Help with Apache+PHP4 on Windows ME
** Note: This server config and usage is NOT intended to run a FTP or webserver. Just a test of running Apache on a Windows machine ** Recently I downloaded and installed Apache 1.3.19 (the apache_1.3.19-win32-src-r2.msi file from http://httpd.apache.org/dist/httpd/binaries/win32/) on my Windows ME machine and it works perfectly. No errors, setup for the right directories, and works when I goto http://myipaddress. After installing Apache and making sure it was shut down, I installed PHP 4.04pl1 (php404pl1-installer.exe from www.php.net) without any errors. Now here is my problem.. I think I setup everything properly and followed the README exactly, but the next time I ran Apache and uploaded a .php file and clicked on it via a web browser, it asked if I wanted to "Open or Save the file from the Current Location" instead of parsing it. I also noticed when I did a look up on my server, it didn't have PHP next with the rest of the info like Apache 1.3.19 (Win32) Does anybody know a solution? I am willing to show you my httpd.conf and php.ini if you like. Thanks for your help. __ FREE Personalized Email at Mail.com Sign up at http://www.mail.com/?sr=signup -- 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]
Re: [PHP-DB] Values for Popdownmenu (Categorie and Subcategorie) from MySQL
At 01:51 AM 4/20/2001 +0200, Denis Mettler wrote: >I know how i can fill the values in the first popdownmenu, >but i don't know how to handle the second one withe the chosen >value from the first. If you mean that you want a selection in the first drop down list to automagically trigger a change in a second drop down list your *only* options are to either use Javascript (yuck) or to make this a two step process (i.e. select from the first list, submit form, generate second list). I personally would recommend the second option since you probably have no guarantee that Javascript will be enabled and you will have to perform the sanity checking anyways. Cheers, Ron - Island Net AMT Solutions Group Inc. Telephone: 250 383-0096 1412 Quadra Toll Free:1 800 331-3055 Victoria, B.C. Fax:250 383-6698 V8W 2L1 E-Mail:[EMAIL PROTECTED] Canada WWW: http://www.islandnet.com/ - -- 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] Values for Popdownmenu (Categorie and Subcategorie) from MySQL
Hi there, I would like to create a form which gets it's values out of a Database and 2 Tables: MainCat: MC_ID MC_Name SubCat: SC_ID MC_ID SC_Name I know how i can fill the values in the first popdownmenu, but i don't know how to handle the second one withe the chosen value from the first. Can anybody help me? -- Best Regards / Beste Gruesse Denis Mettler http://www.denis-mettler.de -- 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] db3 problems
Hello, Has anyone experienced any problems with the db3 stuff in php4.0.4pl1? Im getting some segfaults accessing db3 files in certain modes, and driver initialization errors any other time, this on a redhat 6.1 box with db3.2.9 installed from source. On a redhat 7.0 box with db3-3.1.14-6 installed from rpms (STock redhat install) it all works well except accessing a db3 file in 'c' mode if it already exists (see bug report 10380). Any insight would be most appreciated. TIA. Mike Robinson -- 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]
Re: [PHP-DB] PHP and MySQL
try the tutorial at www.thickbook.com or at www.devshed.com for setting everything up. olinux - Original Message - From: "Mike Corredea" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 19, 2001 10:02 AM Subject: [PHP-DB] PHP and MySQL > I just downloaded MySQL-3.23.36.tar (Which is the Source tar) from their > site and I have php-4.0.4pl1. I have installed MySQL and it is ready to > go. I know this for I can connect via the MySQL Monitor. When I try to > configure php with the line "./configure > --with-apache=/usr/local/apache_1.3.19 --with-mysql --with-ldap > --enable-track-vars" it tells me that it can't find the header files. > Then I point it to the header files, after that I get the error "can't > find client lib". What should I do about this ?? Where do I tell php to > look for it ?? > > > -- > 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] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- 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]
Re: [PHP-DB] mysql --> Commercial DBs, When will I need to upgrade?
>If anyone has had some experience with upgrading as your operations grow, >I'd appreciate if you could answer ANY of the following questions: Did you say M$.. yuck.. if you think you need something else then MySQL you could take a look at PostgreSQL.. It's good, it's free and it doesn't have M$ written all over it :-) The subject sounds like commercial databases are better then OpenSource.. I don't think that's treu. You could find great solutions in OpenSource.. Like MySQL.. PostgreSQL and others.. I even know quite a few people on several lists who kicked off commercial products and started using opensource.. for various reasons. If you look at the specs.. you will see MySQL performs very good.. also with large databases. Having your own dedicated server will help you to get better performing websites.. Memory.. the more.. the better.. you can have to little but never to much of it.. If you're currently experiencing performance problems I would assume a dedicated server might help.. Bye, B. P.S. the subject is great flamebait.. -- 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 --> Commercial DBs, When will I need to upgrade?
I've been programming PHP w/ mysql for almost 2 years now for my company. We develop online testing and surveying software. We are currently running operations for a few specific companies where maybe 20-30 tests will be taken online per day (it requires pulling the test questions out of the database in random order, and then putting all of their answers into the database at the end of the test.) This is currently running on a shared webserver using php3 and mysql. Recently we've been talking about some projects that will require a lot more use. (Could be 100 people taking a test at once or it could be 1000 people taking a test at once. We don't know yet.) If anyone has had some experience with upgrading as your operations grow, I'd appreciate if you could answer ANY of the following questions: 1. At what point will mysql blow up (how many tests could be taken at once? How many rows of results could be stored in a table before it bogs down?) 2. At what point will we need a dedicated server instead of shared-hosting? 3. How fast of a server do we need? Will a 1ghz server outperform a 500mhz server when using apache-php-mysql? 4. If we need a new database, what is the next step above mysql? I have some experience with Oracle but it is too expensive. Is there anything inbetween that is friendly to PHP? 5. If MS-SQL is an option for a database-upgrade. What are the implications of switching our server to a win32-based server? Will we have problems with PHP on windows when all of our scripts were programmed for unix? I realize these are a lot of questions and that we probably need some consulting work done, but if any of you could share your knowledge on any one of those topics I would really appreciate it. I just need something to give me a head start in my research. Point me in the right direction! - Doug Schasteen [EMAIL PROTECTED] P.S. - if you know of any good articles online that compare different servers or databases please share.
RE: [PHP-DB] Help Me Fix My User Defined Funtion
> -Original Message- > From: SOHH.com Webmaster [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 19, 2001 4:45 PM > To: Mark Roedel > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP-DB] Help Me Fix My User Defined Funtion > > > However, since posting my question, I have solved it by doing > the following: > > while($row_listbyreads = mysql_fetch_array($result_listbyreads)) { > $sectionID = $row_listbyreads["sectionID"]; > $contentcount = $row_listbyreads["contentcount"]; > $contentheadline = > stripslashes($row_listbyreads["contentheadline"]); > $contentID = $row_listbyreads["contentID"]; > > ?> > > > > > } > ?> > > Which works but what if I wanted to use the results to do > something else? Like take the string ($link) and count the > lenght of it (just an example). You can keep calling the function every time you need the value $stringlength = strlen(generatesectionlink($sectionID,$contentID); OR you could just assign the return-value of the function to a variable and use that for the remainder of that run through the loop. $thislink = generatesectionlink($sectionID,$contentID); $linklength = strlen($thislink); echo $thislink; --- Mark Roedel | "The most overlooked advantage to owning a Systems Programmer| computer is that if they foul up there's no LeTourneau University | law against whacking them around a little." Longview, Texas, USA | -- Owen Porterfield -- 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]
RE: [PHP-DB] Help Me Fix My User Defined Funtion
Ok, fair enough. Basically the top had all my MySQL calls and then it's followed by - However, since posting my question, I have solved it by doing the following: Which works but what if I wanted to use the results to do something else? Like take the string ($link) and count the lenght of it (just an example). Steven -Original Message- From: Mark Roedel [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 11:21 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Help Me Fix My User Defined Funtion > -Original Message- > From: SOHH.com Webmaster [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 19, 2001 3:32 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Help Me Fix My User Defined Funtion > > > I created a funciton to pass two variables and create a > dynamic link. It doesn't give me an error, but it doesn't > give me the results either. What am I missing in my > function? (It's down below) The function itself looks fine to me...is it possible there's a problem in the way you're calling it? (How 'bout a code snippet showing that as well...) --- Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University ||-- Henry Kissinger -- 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]
Re: [PHP-DB] Sending e-mail thru PHP page (2nd part)
on 4/19/01 10:46 AM, Hector M Banda at [EMAIL PROTECTED] wrote: > Is any way I can guess the users e-mail address? > I'm thinking in the way you setup your e-mail acct on the browser when > you first install it. There shouldn't be a way. I think you could access the email address via JavaScript in Netscape 1.0 or 2.0, but no modern browsers should support that. You'll just have to require entry into the field, check it on the server to see if it's valid, and if not, ask the user for a valid address. There are many ways to check email addresses. Check php.net, zend.com, or the general list archives for more info. Hope that helps. Sincerely, Paul Burney http://paulburney.com/ -- 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]
Re: [PHP-DB] Sending e-mail thru PHP page (2nd part)
I don't know how you're operating your PHP system but can you not simply have an email form field?? Russ #---# "Believe nothing - consider everything" "Web Developers do it on-the-fly." Russ Michell Anglia Polytechnic University Webteam e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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] Sending e-mail thru PHP page (2nd part)
Thanks to all of you guys who responded. Is any way I can guess the users e-mail address? I'm thinking in the way you setup your e-mail acct on the browser when you first install it. Because e-mail is one of the things I'm asking on the form where I collect the user's info. Thanks again.
[PHP-DB] Advice On Building Dynamic MySQL Queries
I am building a query from a search form. This is the code I have now: if (!empty($whereclause)) { $whereclause=urldecode($whereclause); $whereclause=stripslashes($whereclause); } extract($HTTP_POST_VARS); if (!empty($Price)) { if(empty($whereclause)) { $whereclause.="Price$Price"; } else { $whereclause.=" AND 'Price $Price"; } } if (!empty($Area)) { if(empty($whereclause)) { $whereclause.="Area LIKE '$Area'"; } else { $whereclause.=" AND Area LIKE '$Area'"; } } if (!empty($MLS_Number)) { if(empty($whereclause)) { $whereclause.="MLS_Number LIKE '$MLS_Number'"; } else { $whereclause.=" AND MLS_Number LIKE '$MLS_Number'"; } } if (!empty($File_Number)) { if(empty($whereclause)) { $whereclause.="File_Number LIKE '$File_Number'"; } else { $whereclause.=" AND File_Number LIKE '$File_Number'"; } } if (!empty($Description)) { if(empty($whereclause)) { $whereclause.="Description LIKE '%$Description%'"; } else { $whereclause.=" AND Description LIKE '%$Description%'"; } } $query="SELECT lid,Price,Address,Area,Description,File_Number,Realtor_First_name FROM listings LEFT JOIN areas ON (listings.aid=areas.aid) LEFT JOIN realtors ON (listings.rid1=realtors.rid) LEFT JOIN prop_types ON (listings.ptid=prop_types.ptid) LEFT JOIN prop_styles ON (listings.psid=prop_styles.psid) WHERE $whereclause order by Price ASC"; #echo "$query"; if(empty($whereclause)) { echo"You Did Not Specify Anything To Search For! Back"; } else { $results=$CONNECTION->Execute("$query") or DIE($CONNECTION->ErrorMsg()); $results__numRows=0; $results__totalRows=$results->RecordCount(); echo $results->Fields("aid"); echo "$query"; while ($results__numRows<$results__totalRows) { # Display stuff $results__numRows++; $results->MoveNext(); } $results->Close(); } It Just became apparent that I am going to need to add a whole bunch more search criteria.. Does anyone have any advice/suggestions for getting rid of all those if statements? JD -- 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] Help Me Fix My User Defined Funtion
I created a funciton to pass two variables and create a dynamic link. It doesn't give me an error, but it doesn't give me the results either. What am I missing in my function? (It's down below) Steven Samuel function generatesectionlink($sectionID,$contentID) { if ($sectionID == 4) { $link = "http://www.sohh.com/thewire/read.php?contentID=$contentID"; } else if ($sectionID == 3) { $link = "http://www.sohh.com/react/read.php?contentID=$contentID"; } else if ($sectionID == 2) { $link = "http://www.sohh.com/sohhlive/read.php?contentID=$contentID"; } else { $link = "http://www.sohh.com/thecore/read.php?contentID=$contentID"; } return ($link); } -- 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]
Re: [PHP-DB] Fw: sending e-mail thru PHP page.
HaHa!! I'm just sorting that one too: Try: $sender = "[EMAIL PROTECTED]"; mail("$mail_to","$subject","$body","From: $sender"); That should do it... Also check out the threads on phpbuilder.com: http://www.phpbuilder.com/forum/read.php3?num=2&id=117925&loc=0&thread=117925 Good luck!! Russ #---# "Believe nothing - consider everything" "Web Developers do it on-the-fly." Russ Michell Anglia Polytechnic University Webteam e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- 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]
Re: [PHP-DB] PHP and MySQL
Well, where did you install it? If the header files are under /usr/local/mysql/include and the library files are under /usr/local/mysql/lib (for example) then you would need to tell PHP to use --with-mysql=/usr/local/mysql since PHP needs to be able to find both the header and library files somewhere under the path you give it. -Rasmus On Thu, 19 Apr 2001, Mike Corredea wrote: > I just downloaded MySQL-3.23.36.tar (Which is the Source tar) from their > site and I have php-4.0.4pl1. I have installed MySQL and it is ready to > go. I know this for I can connect via the MySQL Monitor. When I try to > configure php with the line "./configure > --with-apache=/usr/local/apache_1.3.19 --with-mysql --with-ldap > --enable-track-vars" it tells me that it can't find the header files. > Then I point it to the header files, after that I get the error "can't > find client lib". What should I do about this ?? Where do I tell php to > look for it ?? > > > -- > 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 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] Fw: sending e-mail thru PHP page.
- Original Message - From: Hector M Banda To: [EMAIL PROTECTED] Sent: Thursday, April 19, 2001 10:11 AM Subject: sending e-mail thru PHP page. Hi all, I have mysql as the database for my php pages where I store my information. When I'm done, I send an e-mail to my e-mail account just to be aware of who is using it. The problem is that when I use the following code to send the e-mail, I get 'nobody' as the sender. mail([EMAIL PROTECTED], "Message",$body message); is not a big deal saying that but since I'm going to be doing this on my server to do virtual domains, my friends will ask me sooner or later about this little issue. Sorry for this off topic. TIA.
[PHP-DB] PHP and MySQL
I just downloaded MySQL-3.23.36.tar (Which is the Source tar) from their site and I have php-4.0.4pl1. I have installed MySQL and it is ready to go. I know this for I can connect via the MySQL Monitor. When I try to configure php with the line "./configure --with-apache=/usr/local/apache_1.3.19 --with-mysql --with-ldap --enable-track-vars" it tells me that it can't find the header files. Then I point it to the header files, after that I get the error "can't find client lib". What should I do about this ?? Where do I tell php to look for it ?? -- 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]
Re: [PHP-DB] OCI_DEFAULT
hi, OCIExecute() executes a previously parsed statement. (see OCIParse(). The optional mode allows you to specify the execution-mode (default is OCI_COMMIT_ON_SUCCESS). If you don't want statements to be committed automaticly specify OCI_DEFAULT as your mode. hope it helps Johannes ""Randal Pitt"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 9bms4l$ru4$[EMAIL PROTECTED]">news:9bms4l$ru4$[EMAIL PROTECTED]... > Hello, > > Can anyone explain what OCI_DEFAULT does? as in: > > OCIExecute($stmt,OCI_DEFAULT); > > Cheers, > > Randal. > > > > -- > 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 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]
RE: [PHP-DB] Designing a database
You've gotten some good general instructions here! The design of the database depends on its intended use -- with more information about the application, we could give your more specific assistance on the db design. What's it going to be used for? How will it be accessed? By motherboard serial number, machine ID, inventory tag, ..., what? That's for starters... -Original Message- From: Joni Järvinen - Wandu [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 02:32 To: PHP-DB Subject: [PHP-DB] Designing a database Hey I'm quite new to databases so I though I'd ask you for some tips in designing a database. The db that I'm supposed to design holds information about workstations: Motherboard (Motherboard id, # of pci slots, agp slot etc etc.), Harddisks (Size, in what ide and master/slave, etc), the physical location of the workstation and it's hardware configuration etc. So if you could give me some tips and pointers for what tables to create etc I would be grateful. TIA -Joni- -- 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 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]
Re: [PHP-DB] Sessions w/ Communicator 4.7 Problem
Hi, > $test = "The session data was transferred."; > echo "Click this link: test2.php"; change this to test2.php"; you need to specify a variable name first behind the ?. It worked for me on NS 4.75 Johannes > > -- > 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 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]
Re: [PHP-DB] Variables and DB
how about posting the code? or describe the problem a bit closer. Johannes "Rui Machado" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello > > I'm writting a registration form with connection to > mysql DB, but I have a problem in the last step, I > can't access the variables to put them in the DB. > I'm using the same file to process the form, but the > last step is confirmation of the data and insertion in > the DB, here it fails because I can't submit the > variables. > > Any clue? > > I was thinking of doing hidden types but I think this > is not the best way. > > Use GLOBALS? > > Thanks > > Rui Machado > > __ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great prices > http://auctions.yahoo.com/ > > -- > 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 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] OCI_DEFAULT
Hello, Can anyone explain what OCI_DEFAULT does? as in: OCIExecute($stmt,OCI_DEFAULT); Cheers, Randal. -- 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] Variables and DB
Hello I'm writting a registration form with connection to mysql DB, but I have a problem in the last step, I can't access the variables to put them in the DB. I'm using the same file to process the form, but the last step is confirmation of the data and insertion in the DB, here it fails because I can't submit the variables. Any clue? I was thinking of doing hidden types but I think this is not the best way. Use GLOBALS? Thanks Rui Machado __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- 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] New with MySQL 3.23: Commands out of sync error
Hi. I have just run into a strange problem that I'm having a hell of a time extricating myself from. Here's the story... Recently, I upgraded to MySQL 3.23.33, mainly to experiment with some of the new transactional capabilities. But a whole chunk of code which had always worked perfectly began failing. After adding evil debug code to display all MySQL error messages, I found that I was getting the following error when trying to retrieve data from a query result: "Commands out of sync; You can't run this command now" I looked up this error on the mysql site, and was taken to this page... http://www.mysql.com/doc/C/o/Commands_out_of_sync.html It mentions the need to use the command mysql_use_result(), but php doesn't support that. I understand that it's on the "to do" list. Does anyone else have experience with this problem? At the moment, it has me completely incapacitated, as moving back to MySQL 3.22 is not an option. The applications in question are seriously heavy with database usage, and can't really be slimmed down. (Another problem which may be related is that I have been getting unpredictable results connecting to the database with mysql_connect and pconnect -- sometimes it fails to connect for no apparent reason (about 1 time in 20, maybe (which is a lot))). Thanks in advance... Alex - - - - - - - - - - - - Alexander Fordyce [EMAIL PROTECTED] -- 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] can't connect to mysql
I just looked at my mysql.sock file and it has a length of zero. Is this the right size, I don't think it is. If not, do I have to reinstall MySQL to get the file back or can I get it from somewhere else. FYI: running RH7.0, Apache Thanks, John -- 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]
Re: [PHP-DB] Secure database connectivity?
>So I need a secure method for PHP to access a MySQL DB - I expect there's a >million different ways of doing it, and I doubt any of them are simple...! You could start including a file from outside your HTML directory.. so Apache can't show it to the world.. but PHP can get it for inclusing.. I don't say this is the most secure way.. but much better then putting them all in your HTML directory.. Bye, B. -- 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] Secure database connectivity?
Hi people, I'm setting up a database to collect email addresses on my web site, but I want to avoid using the insecure connection method: mysql_connect("host", "user", "pass") as this obviously displays my username and password to anyone who wants it. So I need a secure method for PHP to access a MySQL DB - I expect there's a million different ways of doing it, and I doubt any of them are simple...! Cheers. -- 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]
Re: [PHP-DB] Designing a database
>So if you could give me some tips and pointers for what tables to create >etc I would be grateful. You can find a few articles on www.devshed.com about database normalization. The whole idea is to put every piece of data only once in your database. And refer to them as an ID. Every ID must be unique and should never change.. so someones postalcode is a very bad idea. You can think of multiple designs.. I'm not going to do it for you.. It will and does take some time and.. unfortunately I'm not having lots of it :( To start you need to write down all data you want to add.. and what you want to be able to pull out of the database.. I found some good pointers in the book MySQL written by Paul DuBois. It handles MySQL and connections to MySQL databases.. Have fun.. B. -- 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]
Re: [PHP-DB] PHP On Linux
Hello Ben, try http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/ as an installation guide, and http://www.knowledgeisland.com/inet/php/php.html for php tutorials HTH Regards - Original Message - From: "Ben Cairns" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 19, 2001 11:42 AM Subject: [PHP-DB] PHP On Linux > I have nearly 18 Months devel on Windows, but we are now moving to Linux, > > I have never installed PHP On Linux before, so could someone pls give me an > 'Installation Guide' to follow for PHP With MySQL Support, on Linux, > > Also, I would like to know what I have to do with MySQL: You know, what files > go where etc... > > Thanks. > > > -- Ben Cairns - Head Of Technical Operations > intasept.COM > Tel: 01332 365333 > Fax: 01332 346010 > E-Mail: [EMAIL PROTECTED] > Web: http://www.intasept.com > > "MAKING sense of > the INFORMATION > TECHNOLOGY age > @ WORK.." > > > -- > 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 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]
Re: [PHP-DB] Connecting to a remote postgres database
I use binary from www.php4win.de with Apache/W2K for testing codes under my PC. Since php_pgsql.dll does not have pg_cmdtuples(), PostgreSQL/Windows combination is not suitable for not only production use but also testing. Did anyone compile php_pgsql.dll with pg_cmdtuples()? If there is pg_cmdtuples(), it would be really nice. -- Yasuo Ohgaki ""Jerome O Macaranas"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > using PHP 4.0 under Win2K IIS 5.0 > > got this error > -> Fatal error: Call to undefined function: pg_connect() in C:\Inetpub\PHPwwwroot\index.php on line 17 > > is there something i have to load.. why undefined function? > > code: > > $dbname = pg_connect ("host=computer.test.com port=5432 dbname=test user=user password=password"); > echo ("DATABASE NAME = $dbname"); > pg_close ("$dbname"); > > > thanks in advance > > __ > www.edsamail.com > > -- > 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 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] PHP On Linux
I have nearly 18 Months devel on Windows, but we are now moving to Linux, I have never installed PHP On Linux before, so could someone pls give me an 'Installation Guide' to follow for PHP With MySQL Support, on Linux, Also, I would like to know what I have to do with MySQL: You know, what files go where etc... Thanks. -- Ben Cairns - Head Of Technical Operations intasept.COM Tel: 01332 365333 Fax: 01332 346010 E-Mail: [EMAIL PROTECTED] Web: http://www.intasept.com "MAKING sense of the INFORMATION TECHNOLOGY age @ WORK.." -- 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]
Re: [PHP-DB] Designing a database
Designing DB's is an entire domain of study in itself! However the rules (guidelines rather) I stick by at present but am open to new ones as I need them,- are: * Don't repeat data across tables (leads to 'data redundancy' = more complex to update the DB) * If in doubt 'put it' in a new table * Use useful and memorable names for your tables and table columns I do: tablename_colname Good luck! Russ #---# "Believe nothing - consider everything" "Web Developers do it on-the-fly." Russ Michell Anglia Polytechnic University Webteam www.apu.ac.uk/webteam [EMAIL PROTECTED] +44 (0)1223 363271 ext 2331 www.theruss.com #---# -- 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] Designing a database
Hey I'm quite new to databases so I though I'd ask you for some tips in designing a database. The db that I'm supposed to design holds information about workstations: Motherboard (Motherboard id, # of pci slots, agp slot etc etc.), Harddisks (Size, in what ide and master/slave, etc), the physical location of the workstation and it's hardware configuration etc. So if you could give me some tips and pointers for what tables to create etc I would be grateful. TIA -Joni- -- 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]
Re: [PHP-DB] Make history HOW?
I have a similar PHP system on my site using sessions: I have an admin session, where each step(1-5) is a different page(script) and as each page is progressed into a new session is registered with the users username, the activity currently being edited and the team within this activity they are editing. This same method could be employed by you where the page title is registered as a session variable and echoed to the page. If the user goes back a page then check to see if the variable is set and if it is then unregister or destroy it, thus delivering an accurate method of the users progress throughout the site. if(!empty($yourvar)) { session_unregister('yourvar'); } Hop this is of some use to you! Regards: Russ #---# "Believe nothing - consider everything" "Web Developers do it on-the-fly." Russ Michell Anglia Polytechnic University Webteam www.apu.ac.uk/webteam [EMAIL PROTECTED] +44 (0)1223 363271 ext 2331 www.theruss.com #---# -- 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] Erro in connecting........
Warning: Unable to connect to PostgreSQL server: No pg_hba.conf entry for host xxx.xxx.xxx.xxx, user username, database dbname in C:\Inetpub\PHPwwwroot\index.php what maybe my problem..?? __ www.edsamail.com -- 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]
Re: [PHP-DB] Error Msg: Wrong data type when performing "extract()"
Hmmm not sure - You could try to strip out much of the sql by simply using: $sqlstmt ="SELECT * FROM stock_in, equip, vendor"; $sqlstmt.="WHERE equip.id=equip_id and vendor.id=vendor_id and equip.id='$id'"; $sqlstmt.="ORDER BY equip.id ASC"; # print $sqlstmt; $result=mysql_query($sqlstmt); # print $result; $row=mysql_fetch_array($result) That way if an error existed somewhere B4 then it'd go.. Sorry if that was next-to-useless. Russ #---# "Believe nothing - consider everything" "Web Developers do it on-the-fly." Russ Michell Anglia Polytechnic University Webteam www.apu.ac.uk/webteam [EMAIL PROTECTED] +44 (0)1223 363271 ext 2331 www.theruss.com #---# -- 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]
Re: [PHP-DB] Connecting to a remote postgres database
Uncomment this line in your php.ini file: extension=php_pgsql.dll -Rasmus On Thu, 19 Apr 2001, Jerome O Macaranas wrote: > using PHP 4.0 under Win2K IIS 5.0 > > got this error > -> Fatal error: Call to undefined function: pg_connect() in >C:\Inetpub\PHPwwwroot\index.php on line 17 > > is there something i have to load.. why undefined function? > > code: > > $dbname = pg_connect ("host=computer.test.com port=5432 dbname=test user=user >password=password"); > echo ("DATABASE NAME = $dbname"); > pg_close ("$dbname"); > > > thanks in advance > > __ > www.edsamail.com > > -- > 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 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]