RE: [PHP-DB] PHP Mysql apache economy hosting
i honestly don't know direct stats on uptime, they seem pretty good, i haven't tried hitting them yet and been greeted with an error :P i have experienced lag-periods, but don't know if this is becuase of me being in AUS and them in the US, because of my dodgy dial-up ISP, or becuase of their connection :) // -Original Message- // From: Roger Ramirez [mailto:[EMAIL PROTECTED]] // Sent: Friday, 13 July 2001 7:08 PM // To: Beau Lebens; PHP DB Mailing List // Subject: Re: [PHP-DB] PHP Mysql apache economy hosting // // // How long have you been using phpwebhosting.com? They sound // pretty amazing // for the low price of $9.99. Are they stable? I'm curious // because I may be // doing some work for a few clients and I'm looking for a good hosting // provider to set them up at. // // Currently I'm using cedant.com and they are not bad at all but // phpwebhosting.comjust sounds really amazing. // // - Original Message - // From: Beau Lebens [EMAIL PROTECTED] // To: 'Ken Sommers' [EMAIL PROTECTED]; PHP DB // Mailing List // [EMAIL PROTECTED] // Sent: Friday, July 13, 2001 2:32 AM // Subject: RE: [PHP-DB] PHP Mysql apache economy hosting // // // i am using phpwebhosting.com, which is only 9.95US per // month, so far they // have been really good. // // have PHP4, MYSQL (one table with account, extras by request) 150mb // storage, // but this is unmonitored, PO3 email account, subdomains etc // etc - take a // look // at their site :) // // // -Original Message- // // From: Ken Sommers [mailto:[EMAIL PROTECTED]] // // Sent: Friday, 13 July 2001 2:26 PM // // To: PHP DB Mailing List // // Subject: [PHP-DB] PHP Mysql apache economy hosting // // // // // // Hello, // // can anyone recommend a good // // PHP4/ Mysql/ apache/Unix-Linux economy web hosting co.? // // what should I look for? // // how do I verify uptime? // // // // thanks // // Ken // // // // // // // // // // -- // // 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 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] NEXT - PREVIOUS coding
hi.. friends i have a database (mysql) in which their r many records. Through PHP i want them to display on the page. Main requirement is that there should be a NEXT - PREVIOUS facility. So if there r 20 records and suppose only 10 should show up on scren at a time, then a NEXT link should be visible which could show the remaining 10 records. Their can be n no. of records. Pls help. Kind Regards, Pranot
RE: [PHP-DB] NEXT - PREVIOUS coding
rough and readysomething like this should work... $pagesize = 20; $page = $page ? $page : 1; $pages = ceil(mysql_num_rows( $results ) / $pagesize ); mysql_data_seek( $results, ($page - 1) * $pagesize ); while( ($row = mysql_fetch_object( $results )) ( $counter++ $pagesize) ) { // print rows of data etc etc } if( ($page 1) ) { print a href=?page=.($page + 1).Next/a; } if( ($page $pages) ( $pages 1 ) ) { print a href=?page=.($page + 1).Next/a; } -Original Message- From: Pranot Kokate [mailto:[EMAIL PROTECTED]] Sent: 16 July 2001 09:40 To: [EMAIL PROTECTED] Subject: [PHP-DB] NEXT - PREVIOUS coding hi.. friends i have a database (mysql) in which their r many records. Through PHP i want them to display on the page. Main requirement is that there should be a NEXT - PREVIOUS facility. So if there r 20 records and suppose only 10 should show up on scren at a time, then a NEXT link should be visible which could show the remaining 10 records. Their can be n no. of records. Pls help. Kind Regards, Pranot -- 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] Re: NEXT - PREVIOUS coding
Hello, Pranot Kokate wrote: hi.. friends i have a database (mysql) in which their r many records. Through PHP i want them to display on the page. Main requirement is that there should be a NEXT - PREVIOUS facility. So if there r 20 records and suppose only 10 should show up on scren at a time, then a NEXT link should be visible which could show the remaining 10 records. Their can be n no. of records. Usually you may use the LIMIT clause to specify the range of query result rows that you want to show. You may want to try this PHP class that already display query results in HTML tables eventually spliting the results in pages that you may go using links like you want. http://phpclasses.UpperDesign.com/browse.html/package/130 Manuel Lemos -- 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] problem with regular expression
Why not simply : [a-zA-Z0-9]+ that would match any sequence of letters or numbers ? - Mensaje original - De: Jennifer Arcino Demeterio [EMAIL PROTECTED] Para: [EMAIL PROTECTED] Enviado: lundi 16 juillet 2001 04:35 Asunto: [PHP-DB] problem with regular expression i have a script to identify if the input is a combination of letters and numbers if (eregi([a-zA-Z0-9][0-9]+[a-zA-Z][0-9a-zA-Z],$fieldvalue)) print alphanumeric } else { not an alphanumeric } my problem is, when the string ends with a number, for example hello123, it says not an alpanumeric ... it works fine when the number is placed before the letters or in between letters ... why is that? i would really appreciate your help, thanks very much :) -- 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] I need a User Authentication solution
I have been working on a multi-tier solution that is based off some of the scripting found at phpbuilder.com. It works with Linux, Apache and MySQL, as well as uses .htaccess to optionally authenticate, allowing you to authenticate in multiple ways, depending on what kind of data you are securing. It runs through SSL(optional) and encrypts password information using the MD5 hash. It handles multiple groups of users, and site areas etc... David, if you are interested in this, let me know. It's almost done. Thanks, Brian Grayless -Original Message- From: leo g. divinagracia iii [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 12:38 PM Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] I need a User Authentication solution if you are using apache, you try the .htaccess file authorization technique... are you concerned about sending the username and password via plain text through the wire? if yes, then you may have to implement SSL on your server... David Coleman wrote: Hello, I'm looking for a complete User Authentication solution. Kind of like the ASP solution listed below: http://www.powerasp.com/content/code-snippets/advanced-password-protection.a sp However, I'd like the solution to run on Linux w/ PHP and MySQL. Does anyone know of an off-the-shelf password protection script I could purchase? Or, can someone help me develop one. Thanks! -David -- 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] -- Leo G. Divinagracia III [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 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] FOPEN () communication
PHP manual says: fopen fopen -- Opens file or URL Description int fopen (string filename, string mode [, int use_include_path]) If filename begins with http://; (not case sensitive), an HTTP 1.0 connection is opened to the specified server, the page is requested using the HTTP GET method, and a file pointer is returned to the beginning of the body of the response. consider this use of Fopen(): $movie_site = fopen(http://www.site.com/MovieResponder.php?star=; . urlencode($star) . year= . urlencode($year), r); $movie_info = fread($movie_site, 10240); fclose($movie_site); --- http://www.site.com/MovieResponder.php performs a query on it;s own database with $star and $year how does http://www.site.com/MovieResponder.php get the query result in the body of the response? a simple html body echo ($result); /body ?? how does this stuff communicate? where's a tutorial or some docs on it? Ken -- 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] I need a User Authentication solution
Hi Brian, ... well, I think that there'll be a few people interesting in it, me too. Why simply put it on phpclasses or the other well-known source- and project-stores ?? If you don't want to do this, please let me know if you could mail me this then. TIA, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Brian Grayless [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 3:33 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] I need a User Authentication solution I have been working on a multi-tier solution that is based off some of the scripting found at phpbuilder.com. It works with Linux, Apache and MySQL, as well as uses .htaccess to optionally authenticate, allowing you to authenticate in multiple ways, depending on what kind of data you are securing. It runs through SSL(optional) and encrypts password information using the MD5 hash. It handles multiple groups of users, and site areas etc... David, if you are interested in this, let me know. It's almost done. Thanks, Brian Grayless -Original Message- From: leo g. divinagracia iii [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 12:38 PM Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] I need a User Authentication solution if you are using apache, you try the .htaccess file authorization technique... are you concerned about sending the username and password via plain text through the wire? if yes, then you may have to implement SSL on your server... David Coleman wrote: Hello, I'm looking for a complete User Authentication solution. Kind of like the ASP solution listed below: http://www.powerasp.com/content/code-snippets/advanced-passwor d-protection.a sp However, I'd like the solution to run on Linux w/ PHP and MySQL. Does anyone know of an off-the-shelf password protection script I could purchase? Or, can someone help me develop one. Thanks! -David -- 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] -- Leo G. Divinagracia III [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 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] problem with regular expression
On Mon, Jul 16, 2001 at 10:41:15AM -0300, Thomas wrote: - Mensaje original - De: Jennifer Arcino Demeterio [EMAIL PROTECTED] Para: [EMAIL PROTECTED] Enviado: lundi 16 juillet 2001 04:35 Asunto: [PHP-DB] problem with regular expression i have a script to identify if the input is a combination of letters and numbers if (eregi([a-zA-Z0-9][0-9]+[a-zA-Z][0-9a-zA-Z],$fieldvalue)) print alphanumeric } else { not an alphanumeric } my problem is, when the string ends with a number, for example hello123, it says not an alpanumeric ... it works fine when the number is placed before the letters or in between letters ... why is that? the regular expression you have says: match any letter or number, followed by one or more numbers followed by any letter followed by any letter or number. hello123 fails on the 'e' (not being a number). Something like H12345 would fail because there is no letter after the 5. Cheers, Bill i would really appreciate your help, thanks very much :) = sigkiller was here (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]
RE: [PHP-DB] Question about strlen .. I think
You could split the string on the slashes with explode('/',$string) and then manipulate the array elements you get back. Good luck, Ben -Original Message- From: Dennis Kaandorp [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 15, 2001 9:21 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Question about strlen .. I think Hello, On my site users can submit ftp's. Is there a way to replace the spaces between the paths? This is what I mean: /uploads//by/ /dennis/ must become /uploads/4sp/by/3spdennis/ Thnx, Dennis -- 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] problem with oci8
When i use php (all version) with oci8 version 8.1.7 on linux, all character like éèàù etc, are converted. script: ? // connection a la base linux $c = ocilogon(toto,totopass,linux); $sql = select * from toto_table where fonction like 'g%'; $stmt = ociparse($c, $sql ); ociexecute($stmt); $nb_row = ocifetchstatement($stmt, $result); echo $nb_row; for($i=0;$i$nb_row; $i++) echo $result[ID][$i].--.$result[FONCTION][$i].br; ? Fonction value is générique and appear generique on web page. How can i get good charater? Thanks -- 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] escape char hell ....
hi, i've got myself into a bit of a mess. i have a database with approx 4000 records (mysql) and when i populated the database i was given 4000 text files with the product name as the file name and the description of the product as the contents. so i set up a text field in the table to hold the descriptions and wrote a script in php to handle the import. all went well, client impressed etc, but now i'm running into problems with allsorts of escape chars in the description field and am looking for a script that will strip the escape chars from the database ... anyone had similar problems ? new records added to the db now have all html chars translated on input and translated on query. many thanks, Steve -- 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] the body of the response
PHP manual says: fopen fopen -- Opens file or URL Description int fopen (string filename, string mode [, int use_include_path]) If filename begins with http://; (not case sensitive), an HTTP 1.0 connection is opened to the specified server, the page is requested using the HTTP GET method, and a file pointer is returned to the beginning of the body of the response. can someone explain the clause: and a file pointer is returned to the beginning of the body of the response. can someone explain and describe what this body is? can query results be put in this 'body',,if so how? thanks, Ken -- 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] How to drop a table when user leaves prematurely?
BD pressed the little lettered thingies in this order... Ugh! I'm sure this is fairly simple, but I have yet to come up with a way to do it... In a nutshell, our application creates, uses and drops a table while the user is working on the site. Unfortunately, because of other considerations, we can't use a defined temp table - it has to be created as a regular table. We have a routine in the app that will drop the table once the user is done with their work, but if they leave for some reason before they're done, the table is left hanging out there. This wasn't a problem at first, but we're building up quite a collection of useless tables right now. Is there any way to drop the table automagically when the user leaves prematurely, either by closing their browser or jumping to another site? I tried using register_shutdown_function(), but it didn't seem to have any effect... I think, and I know I may be way off base, is that there are a lot of pages involved in this application, and I'm not sure how to tell the app that the user is just going from one page to the next or is actually going bye-bye... HTTP is stateless (there is no persistent connection between the server and browser), so there is no way for you to tell the difference on the server side whether the user has gone to get coffee, has closed his or her browser or has been abducted by aliens. You can do two things that are rather unreliable: 1) Have a Log Out button. This is unreliable because many (most?) people will simply not use it. 2) Use a javascript to detect when the user has gone away. This is unreliable because many people disable javascript or use non-compliant browsers. The only sure way to keep your temp tables at a minimum is to store a creation date or datetime field in the temp table and destroy the table when it has reached a reasonable age. I prefer to run perl scripts from cron to do this and typically choose 48 hours as the time at which I feel that it is safe to assume that the user has abandoned his or her data. Good luck... Christopher Ostmo a.k.a. [EMAIL PROTECTED] AppIdeas.com Innovative Application Ideas Meeting cutting edge dynamic web site needs since the dawn of Internet time (1995) Business Applications: http://www.AppIdeas.com/ Open Source Applications: http://open.AppIdeas.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] Re: upload problem ...
Make sure you have ENCTYPE=multipart/form-data in the FORM tag, otherwise it will not work. You should have a begin and end FORM tag and make sure it has the ENCTYPE attribute, and the METHOD='POST' and the ACTION attribute filled in, too. Comp.Mail.Sendmail [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have implemented the code even as one file but the php file just run without uploading the file to the server, though i have chmod the uploadfolder tmp as 777,, Any help.Thanks ... Jonathan Hilgeman [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... File 1 (whateverform.php): FORM ENCTYPE=multipart/form-data ACTION=fileupload-destination.php METHOD=POST INPUT TYPE='File' NAME='alfredoUpload' /FORM File 2 (fileupload-destination.php): if (is_uploaded_file($alfredoUpload)) { // Uncomment the following line ONLY if you're on Red Hat 7.0 // $Fix_RH7_Upload = fix_php_rh7_upload_bug($alfredoUpload); // Move to directory $filename = basename ($alfredoUpload_name); move_uploaded_file($alfredoUpload, /home/mydirectory/uploadfolder/ . $filename); } // # // Fix PHP Upload Bug on Red Hat 7.0 // # function fix_php_rh7_upload_bug($tmp) { $infile=fopen($tmp,r); // Open the file for the copy $outfile=fopen($tmp.new,w); // create a new temp file $header=fgets($infile,255); //get the 1st line (netscape sometimes doesn't add a Content-type line) //if its more than just a \r\n sequence then if (strlen($header)2) $header=fgets($infile,255); //get next line also while(!feof($infile)) { // Loop through the remaining file $temp=fread($infile,128); fwrite($outfile,$temp,strlen($temp)); //copying contents to new temp file } fclose($outfile); fclose($infile); copy($tmp.new,$tmp); //replace the original with our new bug fixed file unlink($tmp.new); //and delete the new file return filesize($tmp); //return a true file size } You can post the upload to the same file if you want (so File 1 AND File 2 are whateverform.php). I just split them up for this example. I don't take credit for the fix_php_rh7_upload_bug function. That was posted by someone else on the PHP documentation. - Jonathan -Original Message- From: comp.mail.sendmail [mailto:[EMAIL PROTECTED]] Sent: Friday, July 13, 2001 10:28 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] upload problem ... Could anyone send me the actual code for doing the files upload to a linux box with php. I know the form for the upload but not the php file that does the upload . Thanks everyone. -- 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] enum !!
how do i store multiple data in one field? i have a table like this +---+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+---+--+-+-+---+ | test | enum('a','b','c') | YES | | NULL| | +---+---+--+-+-+---+ insert into test values('a','b','c'); doens't work. please help -- 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] Re: enum !!
McShen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... how do i store multiple data in one field? i have a table like this +---+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+---+--+-+-+---+ | test | enum('a','b','c') | YES | | NULL| | +---+---+--+-+-+---+ insert into test values('a','b','c'); doens't work. please help Your query is mixed up; 'test' is the field name, not the table name, and I think you want to put the values into three separate records, not one... Try INSERT INTO tablename ( test ) VALUES ( 'a' ), ( 'b'), ('c'), (''); This should get you four records, with 'test' values of a, b, c, and null. If you want to store more than one value in the same record, you should be looking at sets, not enums. -- 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] Re: enum !!
First normal form (1NF), A table in which the intersection of every column and record contains one, and only one, value. -Original Message- From: Hugh Bothwell [mailto:[EMAIL PROTECTED]] Sent: 16 July 2001 19:21 To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: enum !! McShen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... how do i store multiple data in one field? i have a table like this +---+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+---+--+-+-+---+ | test | enum('a','b','c') | YES | | NULL| | +---+---+--+-+-+---+ insert into test values('a','b','c'); doens't work. please help Your query is mixed up; 'test' is the field name, not the table name, and I think you want to put the values into three separate records, not one... Try INSERT INTO tablename ( test ) VALUES ( 'a' ), ( 'b'), ('c'), (''); This should get you four records, with 'test' values of a, b, c, and null. If you want to store more than one value in the same record, you should be looking at sets, not enums. -- 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] Re: enum !!
Yes, that syntax is OK if you EXACTLY match the structure of the table. If you redesign the table and insert a column between name and cat, your data will go into the new field. For that reason I prefer insert into test set name = shen, cat = a,c Yes, one insert statement per line. To do multiple inserts you could store the values in an array and then set up a loop to process the array, one insertion per row. You could extend that to open and read a text file, http://www.php.net/manual/en/function.fopen.php http://www.php.net/manual/en/function.fgets.php parsing each line into an array http://www.php.net/manual/en/function.split.php or http://www.php.net/manual/en/function.explode.php and using your array processing code to do the rest. Have fun - Miles Thompson At 03:00 PM 7/16/01 -0400, McShen wrote: BTW, did i insert those data correctly? here was what i type insert into test values('shen','a,c'); insert into test values('shen1','a,c'); I think they were wrong. How do i insert 2 values ? McShen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ok. I use set to make a table. here is my table 'test' +---+--+ | name | cat | +---+--+ | shen | a,c | | shen1 | b,c | +---+--+ How can I find all records that contain 'c'? i tried select * from test where cat='c'; it returned empty set; please help Tom Hodder [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... First normal form (1NF), A table in which the intersection of every column and record contains one, and only one, value. -Original Message- From: Hugh Bothwell [mailto:[EMAIL PROTECTED]] Sent: 16 July 2001 19:21 To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: enum !! McShen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... how do i store multiple data in one field? i have a table like this +---+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+---+--+-+-+---+ | test | enum('a','b','c') | YES | | NULL| | +---+---+--+-+-+---+ insert into test values('a','b','c'); doens't work. please help Your query is mixed up; 'test' is the field name, not the table name, and I think you want to put the values into three separate records, not one... Try INSERT INTO tablename ( test ) VALUES ( 'a' ), ( 'b'), ('c'), (''); This should get you four records, with 'test' values of a, b, c, and null. If you want to store more than one value in the same record, you should be looking at sets, not enums. -- 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 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] the body of the response
The body of the response is the data that the http://www.site.com/MovieResponder.php script would produce. The fread() call that I meantioned before would read -all- of this data into a variable. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 11:52 AM To: PHP DB Mailing List Subject: [PHP-DB] the body of the response PHP manual says: fopen fopen -- Opens file or URL Description int fopen (string filename, string mode [, int use_include_path]) If filename begins with http://; (not case sensitive), an HTTP 1.0 connection is opened to the specified server, the page is requested using the HTTP GET method, and a file pointer is returned to the beginning of the body of the response. can someone explain the clause: and a file pointer is returned to the beginning of the body of the response. can someone explain and describe what this body is? can query results be put in this 'body',,if so how? thanks, Ken -- 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] Re: enum !!
I applaud your efforts to learn SQL. I wonder, though, if the PHP-DB list the best place to learn SQL. I would think that a book or a web-based tutorial on SQL would be more conducive to your efforts. In the example you have given below, you would probably want to use LIKE. For example, SELECT * FROM test WHERE cat LIKE '%c%'; or similar ought to do it. Of course, I hope that the example is merely an example because if you really designed a production table like that then you wouldn't be taking advantage of the relational part of your relational database management system. So please keep learning SQL...it's a fantastic skill to have. If you have a specific SQL problem every once in a while there are those on this list who would undoubtedly enjoy helping out. Several beginner-level questions back-to-back, though, is way beyond the charter of this mailing list. The overall purpose of this particular mailing list is for discussions about PHP's ability to interface with databases. There may possibly be an SQL beginners mailing list on egroups or someplace similar...you might find an environment like that better than the PHP-DB list to help you with this stuff. Doug At 02:56 PM 7/16/01 -0400, McShen wrote: ok. I use set to make a table. here is my table 'test' +---+--+ | name | cat | +---+--+ | shen | a,c | | shen1 | b,c | +---+--+ How can I find all records that contain 'c'? i tried select * from test where cat='c'; ...snip... -- 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] the body of the response
thanks for response, I am curious, how does the http://www.site.com/MovieResponder.php script get the data in the body?. what is the mechanism involved? is this body the body /php echo $data;? /body of an html page? is this the body we are talking about or some other body? what is the secret code involved? thanks again, Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 12:53 PM Subject: RE: [PHP-DB] the body of the response The body of the response is the data that the http://www.site.com/MovieResponder.php script would produce. The fread() call that I meantioned before would read -all- of this data into a variable. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 11:52 AM To: PHP DB Mailing List Subject: [PHP-DB] the body of the response PHP manual says: fopen fopen -- Opens file or URL Description int fopen (string filename, string mode [, int use_include_path]) If filename begins with http://; (not case sensitive), an HTTP 1.0 connection is opened to the specified server, the page is requested using the HTTP GET method, and a file pointer is returned to the beginning of the body of the response. can someone explain the clause: and a file pointer is returned to the beginning of the body of the response. can someone explain and describe what this body is? can query results be put in this 'body',,if so how? thanks, Ken -- 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] OSX+Apache+PHP4 setup
Whats up guys? I got a quick question about how the Mac OSX Server handles the Apache modules. I am not sure, but I am hoping that the way it handles Apache is the same as the PC port. I was reading some documentation in a info.php file from the OSX Server Library directory and it said I had to do this to enable PHP on the web server: ?php // To enable PHP, just uncomment the following lines in httpd.conf: // #LoadModule php4_module // #AddModule mod_php4.c // To test PHP, just invoke this page from a browser: // http://mydomain.com/info.php phpinfo(); ? The thing that has me boggled is I did a search for the httpd.conf file and ended up finding one in the /System/Library/Perl/Darwin/Apache/ directory called httpd_conf.pm. Is this the same file that I need to do this to? Im wondering because its located in the /Perl/ directory and I am not sure if I should add these comments to it or create a brand new http.conf file. Thanks for the help! -- ___ FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup FREE PC-to-Phone calls with Net2Phone http://www.net2phone.com/cgi-bin/link.cgi?121 -- 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] OSX+Apache+PHP4 setup
The httpd.conf file is in /etc/http/conf thanks, beckie http://www.onlymacintosh.com On Tue, 17 Jul 2001, Brian Tegtmeier wrote: Whats up guys? I got a quick question about how the Mac OSX Server handles the Apache modules. I am not sure, but I am hoping that the way it handles Apache is the same as the PC port. I was reading some documentation in a info.php file from the OSX Server Library directory and it said I had to do this to enable PHP on the web server: ?php // To enable PHP, just uncomment the following lines in httpd.conf: // #LoadModule php4_module // #AddModule mod_php4.c // To test PHP, just invoke this page from a browser: // http://mydomain.com/info.php phpinfo(); ? The thing that has me boggled is I did a search for the httpd.conf file and ended up finding one in the /System/Library/Perl/Darwin/Apache/ directory called httpd_conf.pm. Is this the same file that I need to do this to? Im wondering because its located in the /Perl/ directory and I am not sure if I should add these comments to it or create a brand new http.conf file. Thanks for the help! -- ___ FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup FREE PC-to-Phone calls with Net2Phone http://www.net2phone.com/cgi-bin/link.cgi?121 -- 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] * I used to think of Microsoft as the borg but I changed my mind. The borg strive for perfection. Beckie Pack Systems Applications Engineer Intellicom, Inc. * -- 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] the body of the response
MovieResponder.php can generate -anything- you want... HTML code, a serialize()d array, or anything else... By using fopen() to call http://www.wherever.com/MovieResponder.php and fread() to grab the data to a local variable, you're calling the MovieResponder.php script as if you are simply accessing it through a web browser! Whatever MovieResponder.php outputs-- HTML, etc... Will be saved in your local variable for manipulation! Here's an example... Say your MovieResponder.php file takes the $actor and $year variables, and queries MySQL, then returns a list of movies. ... Let's say you called your script through your web browser as http://www.wherever.com/MovieResponder.php?actor=Somebodyyear=1977 And you created MovieResponder.php to give you this response: Movie One 1977 Movie Two 1977 Movie Three 1977 ... If your local PHP script looks like this: $file = fopen(http://www.wherever.com/MovieResponder.php?actor=; . urlencode($actor) . year= . urlencode($year), r); $data = fread($file, 10240); fclose($file); ... Then if you called your local script with $actor = Somebody and $year = 1977, when it is called, your $data variable would contain: Movie One 1977 Movie Two 1977 Movie Three 1977 Easy as that! It's a very simple concept. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 4:04 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] the body of the response thanks for response, I am curious, how does the http://www.site.com/MovieResponder.php script get the data in the body?. what is the mechanism involved? is this body the body /php echo $data;? /body of an html page? is this the body we are talking about or some other body? what is the secret code involved? thanks again, Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 12:53 PM Subject: RE: [PHP-DB] the body of the response The body of the response is the data that the http://www.site.com/MovieResponder.php script would produce. The fread() call that I meantioned before would read -all- of this data into a variable. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 11:52 AM To: PHP DB Mailing List Subject: [PHP-DB] the body of the response PHP manual says: fopen fopen -- Opens file or URL Description int fopen (string filename, string mode [, int use_include_path]) If filename begins with http://; (not case sensitive), an HTTP 1.0 connection is opened to the specified server, the page is requested using the HTTP GET method, and a file pointer is returned to the beginning of the body of the response. can someone explain the clause: and a file pointer is returned to the beginning of the body of the response. can someone explain and describe what this body is? can query results be put in this 'body',,if so how? thanks, Ken -- 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] the body of the response
MR.Loff, I see the concept.. but i still don;t see the secret code. for this process: And you created MovieResponder.php to give you this response: Movie One 1977 Movie Two 1977 Movie Three 1977 how does it GIVE..is there a php function called GIVE()? where does the Give() function Give it's data? does it have to give in here? body ? php Give() ? /body what gives? what is the secret code? I looked up Give() in the php manual..no such function.as give(). what is the secret code? --- MovieResponder.php can generate -anything- you want... HTML code, a serialize()d array, or anything else... suppose I Need MovieResponder.php to generate an array.. how do I generate it ? what does generate mean in PHP? does it mean an assignment statement? does an assignment statement GENERATE an array? or maybe an Echo statement to the body GENERATEs an array? what is the secret code Generate() is not a valid php function either. what is the secret code,?,and why is it secret? Ken Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 1:34 PM Subject: RE: [PHP-DB] the body of the response MovieResponder.php can generate -anything- you want... HTML code, a serialize()d array, or anything else... By using fopen() to call http://www.wherever.com/MovieResponder.php and fread() to grab the data to a local variable, you're calling the MovieResponder.php script as if you are simply accessing it through a web browser! Whatever MovieResponder.php outputs-- HTML, etc... Will be saved in your local variable for manipulation! Here's an example... Say your MovieResponder.php file takes the $actor and $year variables, and queries MySQL, then returns a list of movies. ... Let's say you called your script through your web browser as http://www.wherever.com/MovieResponder.php?actor=Somebodyyear=1977 And you created MovieResponder.php to give you this response: Movie One 1977 Movie Two 1977 Movie Three 1977 ... If your local PHP script looks like this: $file = fopen(http://www.wherever.com/MovieResponder.php?actor=; . urlencode($actor) . year= . urlencode($year), r); $data = fread($file, 10240); fclose($file); ... Then if you called your local script with $actor = Somebody and $year = 1977, when it is called, your $data variable would contain: Movie One 1977 Movie Two 1977 Movie Three 1977 Easy as that! It's a very simple concept. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 4:04 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] the body of the response thanks for response, I am curious, how does the http://www.site.com/MovieResponder.php script get the data in the body?. what is the mechanism involved? is this body the body /php echo $data;? /body of an html page? is this the body we are talking about or some other body? what is the secret code involved? thanks again, Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 12:53 PM Subject: RE: [PHP-DB] the body of the response The body of the response is the data that the http://www.site.com/MovieResponder.php script would produce. The fread() call that I meantioned before would read -all- of this data into a variable. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 11:52 AM To: PHP DB Mailing List Subject: [PHP-DB] the body of the response PHP manual says: fopen fopen -- Opens file or URL Description int fopen (string filename, string mode [, int use_include_path]) If filename begins with http://; (not case sensitive), an HTTP 1.0 connection is opened to the specified server, the page is requested using the HTTP GET method, and a file pointer is returned to the beginning of the body of the response. can someone explain the clause: and a file pointer is returned to the beginning of the body of the response. can someone explain and describe what this body is? can query results be put in this 'body',,if so how? thanks, Ken -- 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] the body of the response
Ken-- There's no secret code. By giving the response, I mean the MovieResponder.php outputs that data... This is the most elementary of PHP features... See: http://www.php.net/manual/en/function.echo.php http://www.php.net/manual/en/function.print.php By giving the data to your script, I am saying that the MovieResponder.php script outputs the data (see above) thinking that a -web browser- is at the other end... Your script takes that data, and stores it to a variable by calling fread() (which I explained before). You may want to start from the beginning, and get a good grasp as how exactly the PHP language works: http://www.php.net/manual/en/langref.php Then experiment! Create a PHP script that reads the data from a URL, for example: ?php $url = fopen(http://snaps.php.net/;, r); $page = fread($url, 10240); fclose($url); echo $page; ? The $page variable will contain the output of http://snaps.php.net/. Good luck! --Matt -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 4:50 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] the body of the response MR.Loff, I see the concept.. but i still don;t see the secret code. for this process: And you created MovieResponder.php to give you this response: Movie One 1977 Movie Two 1977 Movie Three 1977 how does it GIVE..is there a php function called GIVE()? where does the Give() function Give it's data? does it have to give in here? body ? php Give() ? /body what gives? what is the secret code? I looked up Give() in the php manual..no such function.as give(). what is the secret code? --- MovieResponder.php can generate -anything- you want... HTML code, a serialize()d array, or anything else... suppose I Need MovieResponder.php to generate an array.. how do I generate it ? what does generate mean in PHP? does it mean an assignment statement? does an assignment statement GENERATE an array? or maybe an Echo statement to the body GENERATEs an array? what is the secret code Generate() is not a valid php function either. what is the secret code,?,and why is it secret? Ken Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 1:34 PM Subject: RE: [PHP-DB] the body of the response MovieResponder.php can generate -anything- you want... HTML code, a serialize()d array, or anything else... By using fopen() to call http://www.wherever.com/MovieResponder.php and fread() to grab the data to a local variable, you're calling the MovieResponder.php script as if you are simply accessing it through a web browser! Whatever MovieResponder.php outputs-- HTML, etc... Will be saved in your local variable for manipulation! Here's an example... Say your MovieResponder.php file takes the $actor and $year variables, and queries MySQL, then returns a list of movies. ... Let's say you called your script through your web browser as http://www.wherever.com/MovieResponder.php?actor=Somebodyyear=1977 And you created MovieResponder.php to give you this response: Movie One 1977 Movie Two 1977 Movie Three 1977 ... If your local PHP script looks like this: $file = fopen(http://www.wherever.com/MovieResponder.php?actor=; . urlencode($actor) . year= . urlencode($year), r); $data = fread($file, 10240); fclose($file); ... Then if you called your local script with $actor = Somebody and $year = 1977, when it is called, your $data variable would contain: Movie One 1977 Movie Two 1977 Movie Three 1977 Easy as that! It's a very simple concept. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 4:04 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] the body of the response thanks for response, I am curious, how does the http://www.site.com/MovieResponder.php script get the data in the body?. what is the mechanism involved? is this body the body /php echo $data;? /body of an html page? is this the body we are talking about or some other body? what is the secret code involved? thanks again, Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 12:53 PM Subject: RE: [PHP-DB] the body of the response The body of the response is the data that the http://www.site.com/MovieResponder.php script would produce. The fread() call that I meantioned before would read -all- of this data into a variable. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 11:52 AM To: PHP DB Mailing List Subject: [PHP-DB] the body of the response PHP manual says: fopen fopen -- Opens file or URL Description int fopen (string filename, string mode [, int
[PHP-DB] Re: the body of the response
In article 008101c10e0f$379207e0$c844500c@zeospantera, [EMAIL PROTECTED] (Ken Sommers) wrote: PHP manual says: fopen fopen -- Opens file or URL Description int fopen (string filename, string mode [, int use_include_path]) If filename begins with http://; (not case sensitive), an HTTP 1.0 connection is opened to the specified server, the page is requested using the HTTP GET method, and a file pointer is returned to the beginning of the body of the response. can someone explain the clause: and a file pointer is returned to the beginning of the body of the response. can someone explain and describe what this body is? Presumably that's what RFC 2616 refers to as the message body, the part of the response that follows the headers. Translated: what you get with fopen() is what you'd get by fetching the same URL with a browser and then viewing source. BTW, fsockopen() can be used to get both headers (Content-type, Content-length, Expires, Location, etc.) and body (HTML/HTML or whatever). -- CC -- 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] the body of the response
I looked up Output(); could not find output() function in PHP. what is the secret code to output? Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 2:05 PM Subject: RE: [PHP-DB] the body of the response Ken-- There's no secret code. By giving the response, I mean the MovieResponder.php outputs that data... This is the most elementary of PHP features... See: http://www.php.net/manual/en/function.echo.php http://www.php.net/manual/en/function.print.php By giving the data to your script, I am saying that the MovieResponder.php script outputs the data (see above) thinking that a -web browser- is at the other end... Your script takes that data, and stores it to a variable by calling fread() (which I explained before). You may want to start from the beginning, and get a good grasp as how exactly the PHP language works: http://www.php.net/manual/en/langref.php Then experiment! Create a PHP script that reads the data from a URL, for example: ?php $url = fopen(http://snaps.php.net/;, r); $page = fread($url, 10240); fclose($url); echo $page; ? The $page variable will contain the output of http://snaps.php.net/. Good luck! --Matt -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 4:50 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] the body of the response MR.Loff, I see the concept.. but i still don;t see the secret code. for this process: And you created MovieResponder.php to give you this response: Movie One 1977 Movie Two 1977 Movie Three 1977 how does it GIVE..is there a php function called GIVE()? where does the Give() function Give it's data? does it have to give in here? body ? php Give() ? /body what gives? what is the secret code? I looked up Give() in the php manual..no such function.as give(). what is the secret code? --- MovieResponder.php can generate -anything- you want... HTML code, a serialize()d array, or anything else... suppose I Need MovieResponder.php to generate an array.. how do I generate it ? what does generate mean in PHP? does it mean an assignment statement? does an assignment statement GENERATE an array? or maybe an Echo statement to the body GENERATEs an array? what is the secret code Generate() is not a valid php function either. what is the secret code,?,and why is it secret? Ken Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 1:34 PM Subject: RE: [PHP-DB] the body of the response MovieResponder.php can generate -anything- you want... HTML code, a serialize()d array, or anything else... By using fopen() to call http://www.wherever.com/MovieResponder.php and fread() to grab the data to a local variable, you're calling the MovieResponder.php script as if you are simply accessing it through a web browser! Whatever MovieResponder.php outputs-- HTML, etc... Will be saved in your local variable for manipulation! Here's an example... Say your MovieResponder.php file takes the $actor and $year variables, and queries MySQL, then returns a list of movies. ... Let's say you called your script through your web browser as http://www.wherever.com/MovieResponder.php?actor=Somebodyyear=1977 And you created MovieResponder.php to give you this response: Movie One 1977 Movie Two 1977 Movie Three 1977 ... If your local PHP script looks like this: $file = fopen(http://www.wherever.com/MovieResponder.php?actor=; . urlencode($actor) . year= . urlencode($year), r); $data = fread($file, 10240); fclose($file); ... Then if you called your local script with $actor = Somebody and $year = 1977, when it is called, your $data variable would contain: Movie One 1977 Movie Two 1977 Movie Three 1977 Easy as that! It's a very simple concept. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 4:04 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] the body of the response thanks for response, I am curious, how does the http://www.site.com/MovieResponder.php script get the data in the body?. what is the mechanism involved? is this body the body /php echo $data;? /body of an html page? is this the body we are talking about or some other body? what is the secret code involved? thanks again, Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 12:53 PM Subject: RE: [PHP-DB] the body of the response The body of the response is the data that the
RE: [PHP-DB] the body of the response
Ken-- Output is a term I use to describe using echo or print on the data. There aren't any secret codes in PHP. :) There are functions and language constructs. See http://www.php.net/manual/en/functions.php Perhaps you should look into purchasing a book to learn how to get started with PHP-- I'm sure others on the list could make some great recommendations. --Matt -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 5:17 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] the body of the response I looked up Output(); could not find output() function in PHP. what is the secret code to output? Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 2:05 PM Subject: RE: [PHP-DB] the body of the response Ken-- There's no secret code. By giving the response, I mean the MovieResponder.php outputs that data... This is the most elementary of PHP features... See: http://www.php.net/manual/en/function.echo.php http://www.php.net/manual/en/function.print.php By giving the data to your script, I am saying that the MovieResponder.php script outputs the data (see above) thinking that a -web browser- is at the other end... Your script takes that data, and stores it to a variable by calling fread() (which I explained before). You may want to start from the beginning, and get a good grasp as how exactly the PHP language works: http://www.php.net/manual/en/langref.php Then experiment! Create a PHP script that reads the data from a URL, for example: ?php $url = fopen(http://snaps.php.net/;, r); $page = fread($url, 10240); fclose($url); echo $page; ? The $page variable will contain the output of http://snaps.php.net/. Good luck! --Matt -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 4:50 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] the body of the response MR.Loff, I see the concept.. but i still don;t see the secret code. for this process: And you created MovieResponder.php to give you this response: Movie One 1977 Movie Two 1977 Movie Three 1977 how does it GIVE..is there a php function called GIVE()? where does the Give() function Give it's data? does it have to give in here? body ? php Give() ? /body what gives? what is the secret code? I looked up Give() in the php manual..no such function.as give(). what is the secret code? --- MovieResponder.php can generate -anything- you want... HTML code, a serialize()d array, or anything else... suppose I Need MovieResponder.php to generate an array.. how do I generate it ? what does generate mean in PHP? does it mean an assignment statement? does an assignment statement GENERATE an array? or maybe an Echo statement to the body GENERATEs an array? what is the secret code Generate() is not a valid php function either. what is the secret code,?,and why is it secret? Ken Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 1:34 PM Subject: RE: [PHP-DB] the body of the response MovieResponder.php can generate -anything- you want... HTML code, a serialize()d array, or anything else... By using fopen() to call http://www.wherever.com/MovieResponder.php and fread() to grab the data to a local variable, you're calling the MovieResponder.php script as if you are simply accessing it through a web browser! Whatever MovieResponder.php outputs-- HTML, etc... Will be saved in your local variable for manipulation! Here's an example... Say your MovieResponder.php file takes the $actor and $year variables, and queries MySQL, then returns a list of movies. ... Let's say you called your script through your web browser as http://www.wherever.com/MovieResponder.php?actor=Somebodyyear=1977 And you created MovieResponder.php to give you this response: Movie One 1977 Movie Two 1977 Movie Three 1977 ... If your local PHP script looks like this: $file = fopen(http://www.wherever.com/MovieResponder.php?actor=; . urlencode($actor) . year= . urlencode($year), r); $data = fread($file, 10240); fclose($file); ... Then if you called your local script with $actor = Somebody and $year = 1977, when it is called, your $data variable would contain: Movie One 1977 Movie Two 1977 Movie Three 1977 Easy as that! It's a very simple concept. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 4:04 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] the body of the response thanks for response, I am curious, how does the
[PHP-DB] remote database exchange
Is it possible to exchange data on remote databases in PHP mysql? Suppose I had a MUSIC database that you wanted your site visitors to be able to query,and it was OK with me because you had a MOVIE database that I wanted MY site visitors to be able to query, Could we swing this? what is the name of this process? remote process serving? remote database access? relay exchange process server? IF it exists,,where are all the tutorials and docs on it? Ken -- 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] Re: the body of the response
are you saying that i can grab the output of your echo() statements in YOUR PHP script by Fopen()ing your URL in MY script and then Fread()ing that resulting file pointer? --Yes! That's -exactly- what I've been trying to explain. :) That's the -best- way I can think of retrieving the info from a remote database, unless you allowed remote access directly to the database, which could be a security issue. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 5:37 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: the body of the response thanks CC, are you saying that i can grab the output of your echo() statements in YOUR PHP script by Fopen()ing your URL in MY script and then Fread()ing that resulting file pointer? IF so,, is this done much? or are there easier more stable less error-prone ways to access remote databases? Suppose I had a MUSIC database that you wanted your site visitors to be able to query,and it was OK with me because you had a MOVIE database that i wanted MY site visitors to be able to query, would we set it up this way? ken - Original Message - From: CC Zona [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 2:16 PM Subject: [PHP-DB] Re: the body of the response In article 008101c10e0f$379207e0$c844500c@zeospantera, [EMAIL PROTECTED] (Ken Sommers) wrote: PHP manual says: fopen fopen -- Opens file or URL Description int fopen (string filename, string mode [, int use_include_path]) If filename begins with http://; (not case sensitive), an HTTP 1.0 connection is opened to the specified server, the page is requested using the HTTP GET method, and a file pointer is returned to the beginning of the body of the response. can someone explain the clause: and a file pointer is returned to the beginning of the body of the response. can someone explain and describe what this body is? Presumably that's what RFC 2616 refers to as the message body, the part of the response that follows the headers. Translated: what you get with fopen() is what you'd get by fetching the same URL with a browser and then viewing source. BTW, fsockopen() can be used to get both headers (Content-type, Content-length, Expires, Location, etc.) and body (HTML/HTML or whatever). -- CC -- 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 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] IBM DB2 on Linux with PHP is very slow
I'm experiencing slowness in the fetching of result sets. I set the cursortype parameter as suggested by Christian Szardenings to SQL_CUR_USE_ODBC, and I get the following: Warning: SQL error: [IBM][CLI Driver] CLI0150E Driver not capable. SQLSTATE=S1C00, SQL state S1C00 in SQLSetConnectOption in /home/butcher/public_html/php/service_portal/content.php(68) : eval()'d code online 56 msg: [IBM][CLI Driver] CLI0150E Driver not capable. SQLSTATE=S1C00 The SQLSTATE pretty well says it all - I've been through the CLI docs and all the words indicate that this cursortype isn't supported. Side note: according to the IBM docs, SQLSetConnectOption is deprecated in favor of SQLSetSQLAttr or some such... Anyone have any clues? I'm using DB2 V7.1. Regards, Glenn Butcher PS - I sent a similar query last week; my identity wasn't properly configured and my reply-to address went out as an IP address - my apologies. -- 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] Re: the body of the response
thanks CC, are you saying that i can grab the output of your echo() statements in YOUR PHP script by Fopen()ing your URL in MY script and then Fread()ing that resulting file pointer? IF so,, is this done much? or are there easier more stable less error-prone ways to access remote databases? Suppose I had a MUSIC database that you wanted your site visitors to be able to query,and it was OK with me because you had a MOVIE database that i wanted MY site visitors to be able to query, would we set it up this way? ken - Original Message - From: CC Zona [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 2:16 PM Subject: [PHP-DB] Re: the body of the response In article 008101c10e0f$379207e0$c844500c@zeospantera, [EMAIL PROTECTED] (Ken Sommers) wrote: PHP manual says: fopen fopen -- Opens file or URL Description int fopen (string filename, string mode [, int use_include_path]) If filename begins with http://; (not case sensitive), an HTTP 1.0 connection is opened to the specified server, the page is requested using the HTTP GET method, and a file pointer is returned to the beginning of the body of the response. can someone explain the clause: and a file pointer is returned to the beginning of the body of the response. can someone explain and describe what this body is? Presumably that's what RFC 2616 refers to as the message body, the part of the response that follows the headers. Translated: what you get with fopen() is what you'd get by fetching the same URL with a browser and then viewing source. BTW, fsockopen() can be used to get both headers (Content-type, Content-length, Expires, Location, etc.) and body (HTML/HTML or whatever). -- CC -- 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] Re: enum !!
thx alot! Doug Semig [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I applaud your efforts to learn SQL. I wonder, though, if the PHP-DB list the best place to learn SQL. I would think that a book or a web-based tutorial on SQL would be more conducive to your efforts. In the example you have given below, you would probably want to use LIKE. For example, SELECT * FROM test WHERE cat LIKE '%c%'; or similar ought to do it. Of course, I hope that the example is merely an example because if you really designed a production table like that then you wouldn't be taking advantage of the relational part of your relational database management system. So please keep learning SQL...it's a fantastic skill to have. If you have a specific SQL problem every once in a while there are those on this list who would undoubtedly enjoy helping out. Several beginner-level questions back-to-back, though, is way beyond the charter of this mailing list. The overall purpose of this particular mailing list is for discussions about PHP's ability to interface with databases. There may possibly be an SQL beginners mailing list on egroups or someplace similar...you might find an environment like that better than the PHP-DB list to help you with this stuff. Doug At 02:56 PM 7/16/01 -0400, McShen wrote: ok. I use set to make a table. here is my table 'test' +---+--+ | name | cat | +---+--+ | shen | a,c | | shen1 | b,c | +---+--+ How can I find all records that contain 'c'? i tried select * from test where cat='c'; ...snip... -- 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] remote database exchange
The mysql_connect() function accepts a host name, which can be the internet address of another machine! However-- the MySQL database on that machine has to be set up to allow outside connections for whatever particular username/password you are using! Please see these pages to answer your questions: http://www.mysql.com/doc/A/d/Adding_users.html-- MySQL username/password configuration http://www.php.net/manual/en/ref.mysql.php---MySQL functions in PHP The PHP page has an example on that page that will show you -exactly- how to do it. --Matt -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 5:53 PM To: PHP DB Mailing List Subject: [PHP-DB] remote database exchange Is it possible to exchange data on remote databases in PHP mysql? Suppose I had a MUSIC database that you wanted your site visitors to be able to query,and it was OK with me because you had a MOVIE database that I wanted MY site visitors to be able to query, Could we swing this? what is the name of this process? remote process serving? remote database access? relay exchange process server? IF it exists,,where are all the tutorials and docs on it? Ken -- 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] Re: the body of the response
In article 00c801c10e3f$758ba8a0$b943500c@zeospantera, [EMAIL PROTECTED] (Ken Sommers) wrote: Suppose I had a MUSIC database that you wanted your site visitors to be able to query,and it was OK with me because you had a MOVIE database that i wanted MY site visitors to be able to query, would we set it up this way? (Sorry, forgot to respond to this part before...) Well, technically, you could...but generally-speaking, I wouldn't. Not unless the database was very small, the queries were very simple, and there was good reason to avoid using a DBMS (ex. MySQL, PostgreSQL, Access, Oracle, etc.). Also, if either of you considers the contents of your respective databases to be valuable (or sensitive), then you should consider that what you propose to do is put the entire contents of both databases up on the WWW for anyone to view/copy/download in toto. -- CC -- 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] remote database exchange
Suppose I Need to get Vendor prices from a very large remote (Oracle) price list . They probably don't have PHP installed. What are my options? Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 3:31 PM Subject: RE: [PHP-DB] remote database exchange The mysql_connect() function accepts a host name, which can be the internet address of another machine! However-- the MySQL database on that machine has to be set up to allow outside connections for whatever particular username/password you are using! Please see these pages to answer your questions: http://www.mysql.com/doc/A/d/Adding_users.html-- MySQL username/password configuration http://www.php.net/manual/en/ref.mysql.php---MySQL functions in PHP The PHP page has an example on that page that will show you -exactly- how to do it. --Matt -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 5:53 PM To: PHP DB Mailing List Subject: [PHP-DB] remote database exchange Is it possible to exchange data on remote databases in PHP mysql? Suppose I had a MUSIC database that you wanted your site visitors to be able to query,and it was OK with me because you had a MOVIE database that I wanted MY site visitors to be able to query, Could we swing this? what is the name of this process? remote process serving? remote database access? relay exchange process server? IF it exists,,where are all the tutorials and docs on it? Ken -- 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] Re: remote database exchange
In article 00d201c10e41$9fa2e340$b943500c@zeospantera, [EMAIL PROTECTED] (Ken Sommers) wrote: Is it possible to exchange data on remote databases in PHP mysql? PHP is a scripting language. MySQL is a database management system (DBMS). Two different things. Suppose I had a MUSIC database that you wanted your site visitors to be able to query,and it was OK with me because you had a MOVIE database that I wanted MY site visitors to be able to query, Could we swing this? (Already answered in the previous thread.) IF it exists,,where are all the tutorials and docs on it? Any tutorial/book that explains how to make a search engine using PHP and MySQL can give you the overview. The difference betweeen implementing that fuctionality via a remote connection vs. a local connection is trivial (a minor difference in the host setting for the database connection parameters). http://www.google.com/search?q=php+mysql+tutorial -- CC -- 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] remote database exchange
(Quote from an annotation found on http://www.php.net/manual/en/function.ocilogon.php): [EMAIL PROTECTED] 31-Mar-2000 11:32 Regarding connecting to an Oracle Db on NT from Linux, here is what you need to do. Little Oracle knowledge is a prerequisite. 1. Install Oracle database client onto Linux. 2. Once installed on Linux, modify the tnsanmes.ora file to create an alias to the database running on the NT box. Follow the syntax already in the tnsnames.ora file 3. Depending on the version of Oracle you have and the Oracle Database has the listener running there is a utility called tnsping(xx) that you can use to verify that you can hit a remote 0racle database syntax is tnsping alias in tnsnames.ora 4. You could use sqlplus to conenct to the remote database to verify the login process works. Remember to use login_id@tnsnames_alias/password 5. Once you have gotten this far PHP should be able to hit the database. Give it a shot. You might need to tool around the PHP config to get things to work. use the phpinfo function to debug, its rather useful. That's the only solution I've found without setting up a CGI on the other end to retrieve the info... -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 6:56 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] remote database exchange Suppose I Need to get Vendor prices from a very large remote (Oracle) price list . They probably don't have PHP installed. What are my options? Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 3:31 PM Subject: RE: [PHP-DB] remote database exchange The mysql_connect() function accepts a host name, which can be the internet address of another machine! However-- the MySQL database on that machine has to be set up to allow outside connections for whatever particular username/password you are using! Please see these pages to answer your questions: http://www.mysql.com/doc/A/d/Adding_users.html-- MySQL username/password configuration http://www.php.net/manual/en/ref.mysql.php---MySQL functions in PHP The PHP page has an example on that page that will show you -exactly- how to do it. --Matt -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 5:53 PM To: PHP DB Mailing List Subject: [PHP-DB] remote database exchange Is it possible to exchange data on remote databases in PHP mysql? Suppose I had a MUSIC database that you wanted your site visitors to be able to query,and it was OK with me because you had a MOVIE database that I wanted MY site visitors to be able to query, Could we swing this? what is the name of this process? remote process serving? remote database access? relay exchange process server? IF it exists,,where are all the tutorials and docs on it? Ken -- 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] Need syntax for conditional in recordset loop
How would I code IF .odbc_result($data2,$i) = 'SOX' THEN make it a link? By link I mean that I want the word SOX highlited in blue and underlined and referencing a webpage that explains SOX verbosefully. Don't know PHP IF THEN syntax too well. /* fill table with data */ do { echo tr; $fields=odbc_num_fields($data2); for($i=3 ; $i=$fields ; $i++) echo td nowrap.odbc_result($data2,$i)./td; echo /tr\n; } while(odbc_fetch_row($data2)); echo /table; John A. Davis Information Systems Specialist OHD DWP State of Oregon -- 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] remote database exchange
I am not familiar with Oracle, but by looking through the PHP docs, it appears that you can't connect remotely to an Oracle server... Am I wrong about this, or is it a limitation of the Oracle library, or is Oracle not built to allow remote connections? -Original Message- From: CC Zona [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 7:34 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] remote database exchange In article 012601c10e4a$6c7a2ec0$b943500c@zeospantera, [EMAIL PROTECTED] (Ken Sommers) wrote: Suppose I Need to get Vendor prices from a very large remote (Oracle) price list . They probably don't have PHP installed. If... -you have PHP installed, -AND you have Oracle support compiled in to that install, -AND you have connection info (username/password/hostname) for an account on that Oracle system that has been granted access to vendor prices, -AND you know how to use PHP's Oracle functions, -AND you know how to query an Oracle database ...then you're set. Whether they have PHP installed or not is irrelevant. -- CC -- 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] remote database exchange
Great, thanks for a complete answer I love it.. I ran mysql show variables; to see if my host server has Oracle support,, I don't see anything about Oracle or any other DBMS,, any way to tell without asking them? ken - Original Message - From: CC Zona [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 4:33 PM Subject: Re: [PHP-DB] remote database exchange In article 012601c10e4a$6c7a2ec0$b943500c@zeospantera, [EMAIL PROTECTED] (Ken Sommers) wrote: Suppose I Need to get Vendor prices from a very large remote (Oracle) price list . They probably don't have PHP installed. If... -you have PHP installed, -AND you have Oracle support compiled in to that install, -AND you have connection info (username/password/hostname) for an account on that Oracle system that has been granted access to vendor prices, -AND you know how to use PHP's Oracle functions, -AND you know how to query an Oracle database ...then you're set. Whether they have PHP installed or not is irrelevant. -- CC -- 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] How to drop a table when user leaves prematurely?
Thanks, Christopher... I feel better now knowing that I wasn't just missing something really obvious.. on the other hand, I should have thought of the stateless aspect myself I'll take the timestamp approach, and see what I can come up with... BD http://www.bustdustr.net http://www.rfbdproductions.com The Entertainment Center Home Of Radio Free BD For A Difference. - Original Message - From: Christopher Ostmo [EMAIL PROTECTED] To: BD [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 1:42 PM Subject: Re: [PHP-DB] How to drop a table when user leaves prematurely? BD pressed the little lettered thingies in this order... Ugh! I'm sure this is fairly simple, but I have yet to come up with a way to do it... In a nutshell, our application creates, uses and drops a table while the user is working on the site. Unfortunately, because of other considerations, we can't use a defined temp table - it has to be created as a regular table. We have a routine in the app that will drop the table once the user is done with their work, but if they leave for some reason before they're done, the table is left hanging out there. This wasn't a problem at first, but we're building up quite a collection of useless tables right now. Is there any way to drop the table automagically when the user leaves prematurely, either by closing their browser or jumping to another site? I tried using register_shutdown_function(), but it didn't seem to have any effect... I think, and I know I may be way off base, is that there are a lot of pages involved in this application, and I'm not sure how to tell the app that the user is just going from one page to the next or is actually going bye-bye... HTTP is stateless (there is no persistent connection between the server and browser), so there is no way for you to tell the difference on the server side whether the user has gone to get coffee, has closed his or her browser or has been abducted by aliens. You can do two things that are rather unreliable: 1) Have a Log Out button. This is unreliable because many (most?) people will simply not use it. 2) Use a javascript to detect when the user has gone away. This is unreliable because many people disable javascript or use non-compliant browsers. The only sure way to keep your temp tables at a minimum is to store a creation date or datetime field in the temp table and destroy the table when it has reached a reasonable age. I prefer to run perl scripts from cron to do this and typically choose 48 hours as the time at which I feel that it is safe to assume that the user has abandoned his or her data. Good luck... Christopher Ostmo a.k.a. [EMAIL PROTECTED] AppIdeas.com Innovative Application Ideas Meeting cutting edge dynamic web site needs since the dawn of Internet time (1995) Business Applications: http://www.AppIdeas.com/ Open Source Applications: http://open.AppIdeas.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] php/mysql/unix-Linux hosting with major DBMS support?
Any one use or know of a php/mysql/unix-Linux hosting company with PHP database support compiled with all the major DBMS's such as: mSQL MySQL PostgreSQL Sybase Oracle Informix MS-SQL Other ODBC Database I will need to use some or all of these DBMS PHP functions for remote access. thanks,, Ken -- 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/mysql/unix-Linux hosting with major DBMS support?
Even if a PHP host doesn't have all the DBMS extensions you need, you could compile them and load them yourself with dl() http://www.php.net/manual/en/function.dl.php I thought you might want to keep that in mind, in case one particular host has a great price but not all the features you need... -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 8:53 PM To: PHP DB Mailing List Subject: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Any one use or know of a php/mysql/unix-Linux hosting company with PHP database support compiled with all the major DBMS's such as: mSQL MySQL PostgreSQL Sybase Oracle Informix MS-SQL Other ODBC Database I will need to use some or all of these DBMS PHP functions for remote access. thanks,, Ken -- 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] php/mysql/unix-Linux hosting with major DBMS support?
Thanks for the HOT tip..on the dl() function. should the dl() function work an ANY PHP4 host? or do restrictons apply? would I put the dl() at the top of EVERY script page In which I Need the functionality..? or just load it once per session and check and see if it';s already loaded before I Load it,each time because it might already be loaded,, like I Used to do when I used to get loaded? the documentation is kinda skimpy. here's what it says: --- dl (PHP 3, PHP 4 = 4.0b1) dl -- load a PHP extension at runtime Description int dl (string library) Loads the PHP extension defined in library. See also the extension_dir configuration directive. --- thanks, Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 6:01 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Even if a PHP host doesn't have all the DBMS extensions you need, you could compile them and load them yourself with dl() http://www.php.net/manual/en/function.dl.php I thought you might want to keep that in mind, in case one particular host has a great price but not all the features you need... -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 8:53 PM To: PHP DB Mailing List Subject: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Any one use or know of a php/mysql/unix-Linux hosting company with PHP database support compiled with all the major DBMS's such as: mSQL MySQL PostgreSQL Sybase Oracle Informix MS-SQL Other ODBC Database I will need to use some or all of these DBMS PHP functions for remote access. thanks,, Ken -- 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] php/mysql/unix-Linux hosting with major DBMS support?
I'm not sure if dl() can be restricted in php.ini-- Someone else will have to comment on that... I believe you'll have to dl() on every page you create... You could always do the following for portability to other PHP hosts, just in case they have the module already compiled in: if(!extension_loaded(mysql)) dl(mysql.so); That's assuming that the mysql ext. is named mysql.so in a compiled state, of course. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 9:26 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Thanks for the HOT tip..on the dl() function. should the dl() function work an ANY PHP4 host? or do restrictons apply? would I put the dl() at the top of EVERY script page In which I Need the functionality..? or just load it once per session and check and see if it';s already loaded before I Load it,each time because it might already be loaded,, like I Used to do when I used to get loaded? the documentation is kinda skimpy. here's what it says: --- dl (PHP 3, PHP 4 = 4.0b1) dl -- load a PHP extension at runtime Description int dl (string library) Loads the PHP extension defined in library. See also the extension_dir configuration directive. --- thanks, Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 6:01 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Even if a PHP host doesn't have all the DBMS extensions you need, you could compile them and load them yourself with dl() http://www.php.net/manual/en/function.dl.php I thought you might want to keep that in mind, in case one particular host has a great price but not all the features you need... -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 8:53 PM To: PHP DB Mailing List Subject: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Any one use or know of a php/mysql/unix-Linux hosting company with PHP database support compiled with all the major DBMS's such as: mSQL MySQL PostgreSQL Sybase Oracle Informix MS-SQL Other ODBC Database I will need to use some or all of these DBMS PHP functions for remote access. thanks,, Ken -- 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] php/mysql/unix-Linux hosting with major DBMS support?
is this what some of them look like is this the name that would go into the dl() function?? print_r (get_loaded_extensions()); will print a list like: Array ( [0] = xml [1] = wddx [2] = standard [3] = session [4] = posix [5] = pgsql [6] = pcre [7] = gd [8] = ftp [9] = db [10] = Calendar [11] = bcmath ) so would dl(posix); dl(pgsql); work? Ken - Original Message - From: Ken Sommers [EMAIL PROTECTED] To: Matthew Loff [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 7:11 PM Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Help. I just spent the last hour looking for the the PHP extension library to see what the the PHP extension defined in library is to put in dl (string library); to load an extension at run time. has someone seen the library door? I Keep missing it? Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 6:37 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? I'm not sure if dl() can be restricted in php.ini-- Someone else will have to comment on that... I believe you'll have to dl() on every page you create... You could always do the following for portability to other PHP hosts, just in case they have the module already compiled in: if(!extension_loaded(mysql)) dl(mysql.so); That's assuming that the mysql ext. is named mysql.so in a compiled state, of course. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 9:26 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Thanks for the HOT tip..on the dl() function. should the dl() function work an ANY PHP4 host? or do restrictons apply? would I put the dl() at the top of EVERY script page In which I Need the functionality..? or just load it once per session and check and see if it';s already loaded before I Load it,each time because it might already be loaded,, like I Used to do when I used to get loaded? the documentation is kinda skimpy. here's what it says: --- dl (PHP 3, PHP 4 = 4.0b1) dl -- load a PHP extension at runtime Description int dl (string library) Loads the PHP extension defined in library. See also the extension_dir configuration directive. --- thanks, Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 6:01 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Even if a PHP host doesn't have all the DBMS extensions you need, you could compile them and load them yourself with dl() http://www.php.net/manual/en/function.dl.php I thought you might want to keep that in mind, in case one particular host has a great price but not all the features you need... -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 8:53 PM To: PHP DB Mailing List Subject: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Any one use or know of a php/mysql/unix-Linux hosting company with PHP database support compiled with all the major DBMS's such as: mSQL MySQL PostgreSQL Sybase Oracle Informix MS-SQL Other ODBC Database I will need to use some or all of these DBMS PHP functions for remote access. thanks,, Ken -- 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 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] php/mysql/unix-Linux hosting with major DBMS support?
The ext/ directory under the PHP source tree contains the source to the extensions... You're right about the dl() syntax, except the parameter would need to be in quotes, and dl() requires the full filename of the extension. For xml, it would be: dl(xml.so); But compiling those shared modules is another story-- I'm not quite sure how to. Can anyone else help? -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 10:18 PM To: Ken Sommers; Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? is this what some of them look like is this the name that would go into the dl() function?? print_r (get_loaded_extensions()); will print a list like: Array ( [0] = xml [1] = wddx [2] = standard [3] = session [4] = posix [5] = pgsql [6] = pcre [7] = gd [8] = ftp [9] = db [10] = Calendar [11] = bcmath ) so would dl(posix); dl(pgsql); work? Ken - Original Message - From: Ken Sommers [EMAIL PROTECTED] To: Matthew Loff [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 7:11 PM Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Help. I just spent the last hour looking for the the PHP extension library to see what the the PHP extension defined in library is to put in dl (string library); to load an extension at run time. has someone seen the library door? I Keep missing it? Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 6:37 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? I'm not sure if dl() can be restricted in php.ini-- Someone else will have to comment on that... I believe you'll have to dl() on every page you create... You could always do the following for portability to other PHP hosts, just in case they have the module already compiled in: if(!extension_loaded(mysql)) dl(mysql.so); That's assuming that the mysql ext. is named mysql.so in a compiled state, of course. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 9:26 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Thanks for the HOT tip..on the dl() function. should the dl() function work an ANY PHP4 host? or do restrictons apply? would I put the dl() at the top of EVERY script page In which I Need the functionality..? or just load it once per session and check and see if it';s already loaded before I Load it,each time because it might already be loaded,, like I Used to do when I used to get loaded? the documentation is kinda skimpy. here's what it says: --- dl (PHP 3, PHP 4 = 4.0b1) dl -- load a PHP extension at runtime Description int dl (string library) Loads the PHP extension defined in library. See also the extension_dir configuration directive. --- thanks, Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 6:01 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Even if a PHP host doesn't have all the DBMS extensions you need, you could compile them and load them yourself with dl() http://www.php.net/manual/en/function.dl.php I thought you might want to keep that in mind, in case one particular host has a great price but not all the features you need... -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 8:53 PM To: PHP DB Mailing List Subject: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Any one use or know of a php/mysql/unix-Linux hosting company with PHP database support compiled with all the major DBMS's such as: mSQL MySQL PostgreSQL Sybase Oracle Informix MS-SQL Other ODBC Database I will need to use some or all of these DBMS PHP functions for remote access. thanks,, Ken -- 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 Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] remote database exchange
In article 001b01c10e52$0c08e060$3c41500c@zeospantera, [EMAIL PROTECTED] (Ken Sommers) wrote: I ran mysql show variables; to see if my host server has Oracle support,, sighMySQL is a DBMS. Oracle is a DBMS. Different products from different vendors. MySQL doesn't tell you if you have Oracle support. You can use the PHP function phpinfo() to see what options are compiled into your PHP install. But the information show there can look pretty cryptic until you compare it against the manual to find out what each option means. Simpler way: talk to your ISP. Ask them all these questions. I don't see anything about Oracle or any other DBMS,, any way to tell without asking them? Without asking who? And why would you want to avoid asking them? Your ISP should be a resource for you, not something to avoid. And if it's the database owner you don't want to talk to, let me repeat: you need to be granted access to an account on the database. -- CC -- 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] Income on the Net!
Here is an opportunity that you can take up FREE. If you join as an affiliate, we'll teach you how to build a profitable business on the Internet, using our system to create an income stream and earn income globally, 24 hours a day. Don't let this opportunity slip past you - our organization is already well over 1 million strong and growing at around 6,000 each day! Join us and let's work together to get a share of all those members. Just hit: mailto:[EMAIL PROTECTED]?Subject=Opportunity To be removed from this list, hit: mailto:[EMAIL PROTECTED]?Subject=Remove -- 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/mysql/unix-Linux hosting with major DBMS support?
thanks Mat, I found this FAQ: When I try to connect to mysql from php I get this error: Call to unsupported or undefined function mysql_connect(); Updated: 2001-06-01 Either you miss mysql support in the php module or you need to load mysql dynamicly in your scripts by inserting: dl(mysql.so); (on unix) dl(mysql.dll); (on windows); in the top of all the scripts that use mysql. --- end of FAQ I am hoping it is that simple. the dl() does it all.. please say it does..:) ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 8:13 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? The ext/ directory under the PHP source tree contains the source to the extensions... You're right about the dl() syntax, except the parameter would need to be in quotes, and dl() requires the full filename of the extension. For xml, it would be: dl(xml.so); But compiling those shared modules is another story-- I'm not quite sure how to. Can anyone else help? -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 10:18 PM To: Ken Sommers; Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? is this what some of them look like is this the name that would go into the dl() function?? print_r (get_loaded_extensions()); will print a list like: Array ( [0] = xml [1] = wddx [2] = standard [3] = session [4] = posix [5] = pgsql [6] = pcre [7] = gd [8] = ftp [9] = db [10] = Calendar [11] = bcmath ) so would dl(posix); dl(pgsql); work? Ken - Original Message - From: Ken Sommers [EMAIL PROTECTED] To: Matthew Loff [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 7:11 PM Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Help. I just spent the last hour looking for the the PHP extension library to see what the the PHP extension defined in library is to put in dl (string library); to load an extension at run time. has someone seen the library door? I Keep missing it? Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 6:37 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? I'm not sure if dl() can be restricted in php.ini-- Someone else will have to comment on that... I believe you'll have to dl() on every page you create... You could always do the following for portability to other PHP hosts, just in case they have the module already compiled in: if(!extension_loaded(mysql)) dl(mysql.so); That's assuming that the mysql ext. is named mysql.so in a compiled state, of course. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 9:26 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Thanks for the HOT tip..on the dl() function. should the dl() function work an ANY PHP4 host? or do restrictons apply? would I put the dl() at the top of EVERY script page In which I Need the functionality..? or just load it once per session and check and see if it';s already loaded before I Load it,each time because it might already be loaded,, like I Used to do when I used to get loaded? the documentation is kinda skimpy. here's what it says: --- dl (PHP 3, PHP 4 = 4.0b1) dl -- load a PHP extension at runtime Description int dl (string library) Loads the PHP extension defined in library. See also the extension_dir configuration directive. --- thanks, Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 6:01 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Even if a PHP host doesn't have all the DBMS extensions you need, you could compile them and load them yourself with dl() http://www.php.net/manual/en/function.dl.php I thought you might want to keep that in mind, in case one particular host has a great price but not all the features you need... -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 8:53 PM To: PHP DB Mailing List Subject: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Any one use or know of a php/mysql/unix-Linux hosting company with PHP
RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?
That's all there is to it, I'm just not sure how to compile the mysql.so file! I looked through the PHP source tree, but the makefiles don't seem to be able to build the shared libs. Maybe it, along with others, can be downloaded from somewhere. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 11:45 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? thanks Mat, I found this FAQ: When I try to connect to mysql from php I get this error: Call to unsupported or undefined function mysql_connect(); Updated: 2001-06-01 Either you miss mysql support in the php module or you need to load mysql dynamicly in your scripts by inserting: dl(mysql.so); (on unix) dl(mysql.dll); (on windows); in the top of all the scripts that use mysql. --- end of FAQ I am hoping it is that simple. the dl() does it all.. please say it does..:) ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 8:13 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? The ext/ directory under the PHP source tree contains the source to the extensions... You're right about the dl() syntax, except the parameter would need to be in quotes, and dl() requires the full filename of the extension. For xml, it would be: dl(xml.so); But compiling those shared modules is another story-- I'm not quite sure how to. Can anyone else help? -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 10:18 PM To: Ken Sommers; Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? is this what some of them look like is this the name that would go into the dl() function?? print_r (get_loaded_extensions()); will print a list like: Array ( [0] = xml [1] = wddx [2] = standard [3] = session [4] = posix [5] = pgsql [6] = pcre [7] = gd [8] = ftp [9] = db [10] = Calendar [11] = bcmath ) so would dl(posix); dl(pgsql); work? Ken - Original Message - From: Ken Sommers [EMAIL PROTECTED] To: Matthew Loff [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 7:11 PM Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Help. I just spent the last hour looking for the the PHP extension library to see what the the PHP extension defined in library is to put in dl (string library); to load an extension at run time. has someone seen the library door? I Keep missing it? Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 6:37 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? I'm not sure if dl() can be restricted in php.ini-- Someone else will have to comment on that... I believe you'll have to dl() on every page you create... You could always do the following for portability to other PHP hosts, just in case they have the module already compiled in: if(!extension_loaded(mysql)) dl(mysql.so); That's assuming that the mysql ext. is named mysql.so in a compiled state, of course. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 9:26 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Thanks for the HOT tip..on the dl() function. should the dl() function work an ANY PHP4 host? or do restrictons apply? would I put the dl() at the top of EVERY script page In which I Need the functionality..? or just load it once per session and check and see if it';s already loaded before I Load it,each time because it might already be loaded,, like I Used to do when I used to get loaded? the documentation is kinda skimpy. here's what it says: --- dl (PHP 3, PHP 4 = 4.0b1) dl -- load a PHP extension at runtime Description int dl (string library) Loads the PHP extension defined in library. See also the extension_dir configuration directive. --- thanks, Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 6:01 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Even if a PHP host doesn't have all the DBMS extensions you need, you could compile them and load them yourself with dl()
Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?
I'm hoping the dl(mysql.so); compiles it for you. I found this FAQ: http://www.alt-php-faq.org/#id7 When I try to connect to mysql from php I get this error: Call to unsupported or undefined function mysql_connect(); Updated: 2001-06-01 Either you miss mysql support in the php module or you need to load mysql dynamicly in your scripts by inserting: dl(mysql.so); (on unix) dl(mysql.dll); (on windows); in the top of all the scripts that use mysql. --- end of FAQ I hope it is that simple.. Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 8:53 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? That's all there is to it, I'm just not sure how to compile the mysql.so file! I looked through the PHP source tree, but the makefiles don't seem to be able to build the shared libs. Maybe it, along with others, can be downloaded from somewhere. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 11:45 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? thanks Mat, I found this FAQ: When I try to connect to mysql from php I get this error: Call to unsupported or undefined function mysql_connect(); Updated: 2001-06-01 Either you miss mysql support in the php module or you need to load mysql dynamicly in your scripts by inserting: dl(mysql.so); (on unix) dl(mysql.dll); (on windows); in the top of all the scripts that use mysql. --- end of FAQ I am hoping it is that simple. the dl() does it all.. please say it does..:) ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 8:13 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? The ext/ directory under the PHP source tree contains the source to the extensions... You're right about the dl() syntax, except the parameter would need to be in quotes, and dl() requires the full filename of the extension. For xml, it would be: dl(xml.so); But compiling those shared modules is another story-- I'm not quite sure how to. Can anyone else help? -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 10:18 PM To: Ken Sommers; Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? is this what some of them look like is this the name that would go into the dl() function?? print_r (get_loaded_extensions()); will print a list like: Array ( [0] = xml [1] = wddx [2] = standard [3] = session [4] = posix [5] = pgsql [6] = pcre [7] = gd [8] = ftp [9] = db [10] = Calendar [11] = bcmath ) so would dl(posix); dl(pgsql); work? Ken - Original Message - From: Ken Sommers [EMAIL PROTECTED] To: Matthew Loff [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 7:11 PM Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Help. I just spent the last hour looking for the the PHP extension library to see what the the PHP extension defined in library is to put in dl (string library); to load an extension at run time. has someone seen the library door? I Keep missing it? Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 6:37 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? I'm not sure if dl() can be restricted in php.ini-- Someone else will have to comment on that... I believe you'll have to dl() on every page you create... You could always do the following for portability to other PHP hosts, just in case they have the module already compiled in: if(!extension_loaded(mysql)) dl(mysql.so); That's assuming that the mysql ext. is named mysql.so in a compiled state, of course. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 9:26 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? Thanks for the HOT tip..on the dl() function. should the dl() function work an ANY PHP4 host? or do restrictons apply? would I put the dl() at the top of EVERY script page In which I Need the functionality..? or just load it once per session and check and see if it';s already loaded before
Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?
I think and hope it works like this the .so(unix) or .dll(win32) file is already a binary compiled executable (I know for a fact that the Win 32 dll's ARE) I looked at one with my file viewer quick view plus I have php4/mysql/apache on my local host computer (Win95) I am typing into now. so the extension files are already compiled.(Win 32 definalty ARE.executable,,assuming Unix .so files are the same) they just have to be LINKED to the PHP binary by a ;linker like DL() so then PHP will ACT like it has been compiled with the extension.. Hence dynamically linking it. on win32 they are located (by default) in the C:/php/extensions dir under Unix they must be somewhere. phpinfo() has an entry for the php extensions dir my remote server shows: extension_dir ./ under the heading Configuration PHP Core in phpinfo() and the FAQ I showed you sort of substantiates that hypothesis.. Here it is again: I found this FAQ: http://www.alt-php-faq.org/#id7 When I try to connect to mysql from php I get this error: Call to unsupported or undefined function mysql_connect(); Updated: 2001-06-01 Either you miss mysql support in the php module or you need to load mysql dynamicly in your scripts by inserting: dl(mysql.so); (on unix) dl(mysql.dll); (on windows); in the top of all the scripts that use mysql. --- end of FAQ notice the FAQ master tells the troubled soul to just dl() it ? no disturbing talk of compiling the mysql.so file first... Has anyone used the dl() function b4??? tell us how it works.. Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 9:18 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? dl(mysql.so); won't compile it... You need to provide the mysql.so file for it to link to, but I don't know where to obtain it... :( -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 12:12 AM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? I'm hoping the dl(mysql.so); compiles it for you. I found this FAQ: http://www.alt-php-faq.org/#id7 When I try to connect to mysql from php I get this error: Call to unsupported or undefined function mysql_connect(); Updated: 2001-06-01 Either you miss mysql support in the php module or you need to load mysql dynamicly in your scripts by inserting: dl(mysql.so); (on unix) dl(mysql.dll); (on windows); in the top of all the scripts that use mysql. --- end of FAQ I hope it is that simple.. Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 8:53 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? That's all there is to it, I'm just not sure how to compile the mysql.so file! I looked through the PHP source tree, but the makefiles don't seem to be able to build the shared libs. Maybe it, along with others, can be downloaded from somewhere. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 11:45 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? thanks Mat, I found this FAQ: When I try to connect to mysql from php I get this error: Call to unsupported or undefined function mysql_connect(); Updated: 2001-06-01 Either you miss mysql support in the php module or you need to load mysql dynamicly in your scripts by inserting: dl(mysql.so); (on unix) dl(mysql.dll); (on windows); in the top of all the scripts that use mysql. --- end of FAQ I am hoping it is that simple. the dl() does it all.. please say it does..:) ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 8:13 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? The ext/ directory under the PHP source tree contains the source to the extensions... You're right about the dl() syntax, except the parameter would need to be in quotes, and dl() requires the full filename of the extension. For xml, it would be: dl(xml.so); But compiling those shared modules is another story-- I'm not quite sure how to. Can anyone else help? -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 10:18 PM To: Ken Sommers; Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? is this what some of them look like is this the name that would go into
[PHP-DB] password
Hi, Can anyone tell me how to protect my database or else how can i set my password in postgres for every database. -Thanks Sharmad -- Donot rely on the Operating System which don't have any sources for. -Seen somewhere on the Net ___ _ _ _ |_|_||_||_||\/||_|| \ _|| || || \| || ||_/ -- 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/mysql/unix-Linux hosting with major DBMS support?
You're correct that .so files are like Windows' .dll files... However, if the library were already available on the PHP host, it most likely would already be included in the PHP binary... Perhaps (as you suggested) you need to find binary distributions of each individual library (e.g. mysql.so) that you need... I'd check for .rpm files... -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 12:43 AM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? I think and hope it works like this the .so(unix) or .dll(win32) file is already a binary compiled executable (I know for a fact that the Win 32 dll's ARE) I looked at one with my file viewer quick view plus I have php4/mysql/apache on my local host computer (Win95) I am typing into now. so the extension files are already compiled.(Win 32 definalty ARE.executable,,assuming Unix .so files are the same) they just have to be LINKED to the PHP binary by a ;linker like DL() so then PHP will ACT like it has been compiled with the extension.. Hence dynamically linking it. on win32 they are located (by default) in the C:/php/extensions dir under Unix they must be somewhere. phpinfo() has an entry for the php extensions dir my remote server shows: extension_dir ./ under the heading Configuration PHP Core in phpinfo() and the FAQ I showed you sort of substantiates that hypothesis.. Here it is again: I found this FAQ: http://www.alt-php-faq.org/#id7 When I try to connect to mysql from php I get this error: Call to unsupported or undefined function mysql_connect(); Updated: 2001-06-01 Either you miss mysql support in the php module or you need to load mysql dynamicly in your scripts by inserting: dl(mysql.so); (on unix) dl(mysql.dll); (on windows); in the top of all the scripts that use mysql. --- end of FAQ notice the FAQ master tells the troubled soul to just dl() it ? no disturbing talk of compiling the mysql.so file first... Has anyone used the dl() function b4??? tell us how it works.. Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 9:18 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? dl(mysql.so); won't compile it... You need to provide the mysql.so file for it to link to, but I don't know where to obtain it... :( -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 12:12 AM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? I'm hoping the dl(mysql.so); compiles it for you. I found this FAQ: http://www.alt-php-faq.org/#id7 When I try to connect to mysql from php I get this error: Call to unsupported or undefined function mysql_connect(); Updated: 2001-06-01 Either you miss mysql support in the php module or you need to load mysql dynamicly in your scripts by inserting: dl(mysql.so); (on unix) dl(mysql.dll); (on windows); in the top of all the scripts that use mysql. --- end of FAQ I hope it is that simple.. Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 8:53 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? That's all there is to it, I'm just not sure how to compile the mysql.so file! I looked through the PHP source tree, but the makefiles don't seem to be able to build the shared libs. Maybe it, along with others, can be downloaded from somewhere. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 11:45 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? thanks Mat, I found this FAQ: When I try to connect to mysql from php I get this error: Call to unsupported or undefined function mysql_connect(); Updated: 2001-06-01 Either you miss mysql support in the php module or you need to load mysql dynamicly in your scripts by inserting: dl(mysql.so); (on unix) dl(mysql.dll); (on windows); in the top of all the scripts that use mysql. --- end of FAQ I am hoping it is that simple. the dl() does it all.. please say it does..:) ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 8:13 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? The ext/ directory under the PHP source tree contains the source to the extensions... You're right about the dl() syntax, except the parameter
Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support?
Do you mean the hosting company would have compiled PHP with all the extenions available at compile time? I have looked at two different hosting company's phpinfo() the only dbms they build PHP with is mysql..or its' already built in I think the resoning is: IF you want other dbms PHP functions,,just dl() it . Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 9:56 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? You're correct that .so files are like Windows' .dll files... However, if the library were already available on the PHP host, it most likely would already be included in the PHP binary... Perhaps (as you suggested) you need to find binary distributions of each individual library (e.g. mysql.so) that you need... I'd check for .rpm files... -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 12:43 AM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? I think and hope it works like this the .so(unix) or .dll(win32) file is already a binary compiled executable (I know for a fact that the Win 32 dll's ARE) I looked at one with my file viewer quick view plus I have php4/mysql/apache on my local host computer (Win95) I am typing into now. so the extension files are already compiled.(Win 32 definalty ARE.executable,,assuming Unix .so files are the same) they just have to be LINKED to the PHP binary by a ;linker like DL() so then PHP will ACT like it has been compiled with the extension.. Hence dynamically linking it. on win32 they are located (by default) in the C:/php/extensions dir under Unix they must be somewhere. phpinfo() has an entry for the php extensions dir my remote server shows: extension_dir ./ under the heading Configuration PHP Core in phpinfo() and the FAQ I showed you sort of substantiates that hypothesis.. Here it is again: I found this FAQ: http://www.alt-php-faq.org/#id7 When I try to connect to mysql from php I get this error: Call to unsupported or undefined function mysql_connect(); Updated: 2001-06-01 Either you miss mysql support in the php module or you need to load mysql dynamicly in your scripts by inserting: dl(mysql.so); (on unix) dl(mysql.dll); (on windows); in the top of all the scripts that use mysql. --- end of FAQ notice the FAQ master tells the troubled soul to just dl() it ? no disturbing talk of compiling the mysql.so file first... Has anyone used the dl() function b4??? tell us how it works.. Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 9:18 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? dl(mysql.so); won't compile it... You need to provide the mysql.so file for it to link to, but I don't know where to obtain it... :( -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 12:12 AM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? I'm hoping the dl(mysql.so); compiles it for you. I found this FAQ: http://www.alt-php-faq.org/#id7 When I try to connect to mysql from php I get this error: Call to unsupported or undefined function mysql_connect(); Updated: 2001-06-01 Either you miss mysql support in the php module or you need to load mysql dynamicly in your scripts by inserting: dl(mysql.so); (on unix) dl(mysql.dll); (on windows); in the top of all the scripts that use mysql. --- end of FAQ I hope it is that simple.. Ken - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Ken Sommers' [EMAIL PROTECTED]; 'PHP DB Mailing List' [EMAIL PROTECTED] Sent: Monday, July 16, 2001 8:53 PM Subject: RE: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? That's all there is to it, I'm just not sure how to compile the mysql.so file! I looked through the PHP source tree, but the makefiles don't seem to be able to build the shared libs. Maybe it, along with others, can be downloaded from somewhere. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 11:45 PM To: Matthew Loff; 'PHP DB Mailing List' Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS support? thanks Mat, I found this FAQ: When I try to connect to mysql from php I get this error: Call to unsupported or undefined function mysql_connect(); Updated: 2001-06-01 Either you miss mysql support in the php module or you need to load mysql dynamicly in your
[PHP-DB] mysql_query troubles
Hi all', I have a mysql_query that reads: $testResult = mysql_query(SELECT * FROM login_table where Pass = password('$password')) or die (ouch); $num_rows = mysql_num_rows($testResult); the problem is that I keep getting a value of 0 for $num_rows when I know the table has 1 entry for PAss which equals password('$password'). The password I have used is just 'a' (before pasing throught the password function in the insert). I DO have a table named login_table I KNOW that there is an entry that matches 'password('$password)'.. ( i checked using phpMyAdmin) can anyone help?? Thanks in advance, brad -- 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] Lame ODBC Query Engine?
guys and gals, as sad as i am to admit it, i am in the process of converting a php project into ASP. this means i am using an dobc connection to connect to the exact same database as i was using under php (it's a mysql database, so using the myodbc driver on win2k machine) and i am having some problems. the following query works wonderfully on php/mysql, gives me exactly what i want and i'm very happy with it SELECT DISTINCT(Files.fileID),COUNT(Files.fileID) AS counter,Files.title,Files.artist FROM Files,Downloads WHERE Downloads.what=Files.fileID GROUP BY Files.fileID ORDER BY counter DESC,Downloads.time DESC LIMIT 10 when i use the same query on ASP/ODBC-MySQL, i get *nothing* no error, no recordset, nothing :P except for the limit 10 clause, that query returns hundreds of results, so there's heaps there, i don't know if anyone out there knows some ASP (i don't :P just learning!) but everything else seems to be ok, just that the ODBC driver (at least for MySQL) is just ignoring the select statement. i have tried playing with the select and as far as i can tell, the problem is to do with the use of COUNT and GROUP BY - are these allowed in ODBC queries? i have hunted the microsoft site for odbc documentation and the only links to it are all broken :P (thank you microsoft for your endless faux pas) anyhoo - any help would be greatly appreciated as i am getting to the stage where i am going to do some bizzarro select and then filter the results into arrays or soemthing if i can't get it sorted soon :) thanks folx beau === Beau F Lebens, Technical Officer National Key Centre for School Science and Mathematics Science and Mathematics Education Centre Curtin University of Technology, GPO Box U1987 Perth, Western Australia 6845 mailto:[EMAIL PROTECTED] http://learnt.smec.curtin.edu.au/ Univ: Tel +61 8 9266 7297 (v-mail); Fax +61 8 9266-2503 === -- 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]