Re: [PHP-DB] nl2br()
Look for "nl2br()" on the php manual. There is more information there. Any way you can store text fields as the user has typed it in, when you are about to show them what they wrote you get text from database and apply the function on the result before put it in a html tag. select * ... ... $text_ready = nl2br($row["text"]) ; HTH. Jayme. -Mensagem Original- De: Matthew Cothier [EMAIL PROTECTED] Para: [EMAIL PROTECTED] Enviada em: quarta-feira, 21 de fevereiro de 2001 18:11 Assunto: [PHP-DB] nl2br() Where exactly do I need to insert this? _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] ORA-12154: TNS:could not resolve service name in XXX
Hello All I have some problems connecting ORACLe from my php script. connection string: $conn = OCILogon("asu", "asu", "asu"); failed with ORA-12154: TNS:could not resolve service name in XXX Regards, Vlad e-mail: [EMAIL PROTECTED] IóQ: 1042225964 -- 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] ORA-12154: TNS:could not resolve service name in XXX
I appears that PHP does not know about the paths for Oracle. I am only guessing at this because I haven't installed Oracle on a Linux/Apache box but I think Apache is not aware of the Oracle paths that are required. You might need to recompile Apache with the appropriate configuration parameters. -Original Message- From: Vlad [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, February 22, 2001 7:40 AM Subject: Re: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX Hi All Oracle is installed on SCO UnixWare Client that I use to connect on Windows 98 env variables ORACLE_HOME, TNS_ADMIN for client is correctly defined by the way I created ODBC source for my ORACLE connection and tested it. Then I tryed to connect using PHP's odbc_connect and have the same problem... Is there any solution? Thanks, Vlad Make sure your tnsnames.ora file is setup correctly and that your environment variables are setup correctly. What OS are you using on the machine that Oracle is installed on? Peter J. Krawetzky -Original Message- From: Vlad [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, February 22, 2001 3:25 AM Subject: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX Hello All I have some problems connecting ORACLe from my php script. connection string: $conn = OCILogon("asu", "asu", "asu"); failed with ORA-12154: TNS:could not resolve service name in XXX Regards, Vlad e-mail: [EMAIL PROTECTED] IóQ: 1042225964 -- 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
On Wed, Feb 21, 2001 at 10:58:27PM +0100, Ramiro Radjiman wrote: the following code repeats saying ERORR : cannot execute query. if i delete the text IF NOT EXISTS al goes good. I don't understand why. Check the version of mysql you are using. From the manual: In MySQL Version 3.23 or later, you can use the keywords IF NOT EXISTS so that an error does not occur if the table already exists. http://www.mysql.com/doc/C/R/CREATE_TABLE.html -- Jason Stechschulte [EMAIL PROTECTED] -- The way these things go, there are probably 6 or 8 kludgey ways to do it, and a better way that involves rethinking something that hasn't been rethunk yet. -- Larry Wall in [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] Can PHP read View in stead of Table?
Peter. It is not a bug in OpenLink's driver but in PHP - odbc_connect is setting a cursor by default when you connect. This is usually fine, but a cursor needs a primary key. If no primary key exists, there will be a problem. This of course will always be a problem with views, as running a cursor against a view makes very little sense. There is a workaround to prevent odbc_connect from automatically selecting a cursor type when connecting - edit php_odbc.h and comment out: #define HAVE_SQL_EXTENDED_FETCH 1 and recompile your php/apache setup. Hope this helps! Best regards, Andrew -- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com -Original Message- From: WC Ip [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 11:22 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Can PHP read View in stead of Table? Dear all, I have install PHP on Linux and use Openlink ODBC Driver to link to MS SQL server on Windows NT. Just now I can read data from Table on SQL server. However, when I make View on the same database, I can't use PHP to extract data from this View. When I do query on the View, error message shown: Warning: SQL error: [OpenLink][ODBC][Driver]No key columns found for table referenced by keyset driven cursor., SQL state IM909 in SQLExecDirect in /usr/local/apache_1.3.12/htdocs/internet.php on line 42 The possible problem may due to primary key of table. As testing, I found the table with primary i can access easily. However, when i remove primary key from the same table, error has shown and cannot show data. May I solve this problem or this is the bugs of openlink ODBC driver? Thanks for your help!!! Peter -- 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] MySQL execution order...
I sent this message to the "general" list yesterday, and have yet to get an answer (except for that Spanish "Snow White" virus attempt from Peru). I'm trying to download info from a table as a tab-delimted text file. This part works fine. (By disabling the UPDATE statement in the code sample below, I can get the same data file sent time after time.) I need to keep the data in the table for future reference, and only want to download each new record once, so I added a DateTime field that gets updated after downloading. Then searching on that field gives me just the records that haven't been downloaded yet. The weird part is that it seems like the LAST MySQL command (UPDATE) gets executed before the FIRST one (SELECT), because the SELECT statement comes up with 0 rows. Here's some selected (modified) parts of the PHP code: First, I perform the SQL: SELECT * from db_table WHERE (DownloadedDateTime = '-00-00 00:00:00') Then, it parses and sends the info: while ($row = mysql_fetch_row($result)) { while (list($key, $val) = each($row)) { $val = ereg_replace("[\n\r\t]"," ",$val); $val = ereg_replace(" {2,}"," ",$val); echo $val . "\t"; } //end of line echo "\r"; } Then I perform the SQL: UPDATE LOW_PRIORITY db_table SET DownloadedDateTime=CURRENT_TIMESTAMP WHERE (DownloadedDateTime = '-00-00 00:00:00') -- Any ideas why the rows are getting the DownloadedDateTime field updated before they get SELECTed? Thanks, Don Johnson [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]
FW: [PHP-DB] next previous record
Check this link out... http://www.oreillynet.com/pub/a/php/2000/11/02/next_previous.html?page =1 It's about Next/previous links... It does work, but I've yet to get to get it to work completely with displaying the records (rows) and the links at the same time... It just takes some time to find how to use the mysql_query variable to print out the rows, with every click of the link.. If you get any head way let me know... It's great code Dan -- From: Dreamvale Sent: Thursday, February 22, 2001 9:55 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] next previous record hi all, need to implement record scrolling, one at a time -either forward or backward, on MySQL. The key is a char (32) containing part numbers. anyone has done this before? thanks in advance. dreamvale -- 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] ORA-12154: TNS:could not resolve service name in XXX
I had a similar problem. Worked up a tnsnames.ora file on windoz machines. Thought it would be no big deal if it was copied over to linux and used. But there is a big deal.. Oracle can't handle the CRNL character sequence, in a unix environment. Go figure... There used to be a dos2unix program lying around my linux box. A couple of distributions later, I find none.. vi works well though.. $ vi tnsnames.ora :set ff=unix :w! Did the trick for me, HTH. -Joe ""Peter J. Krawetzky"" [EMAIL PROTECTED] wrote in message 001801c09cce$8c530160$[EMAIL PROTECTED]">news:001801c09cce$8c530160$[EMAIL PROTECTED]... I appears that PHP does not know about the paths for Oracle. I am only guessing at this because I haven't installed Oracle on a Linux/Apache box but I think Apache is not aware of the Oracle paths that are required. You might need to recompile Apache with the appropriate configuration parameters. -Original Message- From: Vlad [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, February 22, 2001 7:40 AM Subject: Re: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX Hi All Oracle is installed on SCO UnixWare Client that I use to connect on Windows 98 env variables ORACLE_HOME, TNS_ADMIN for client is correctly defined by the way I created ODBC source for my ORACLE connection and tested it. Then I tryed to connect using PHP's odbc_connect and have the same problem... Is there any solution? Thanks, Vlad Make sure your tnsnames.ora file is setup correctly and that your environment variables are setup correctly. What OS are you using on the machine that Oracle is installed on? Peter J. Krawetzky -Original Message- From: Vlad [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, February 22, 2001 3:25 AM Subject: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX Hello All I have some problems connecting ORACLe from my php script. connection string: $conn = OCILogon("asu", "asu", "asu"); failed with ORA-12154: TNS:could not resolve service name in XXX Regards, Vlad e-mail: [EMAIL PROTECTED] IóQ: 1042225964 -- 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] -- 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] pgsql performance
Hi Cameron, One thing you may want to try is the -F tag on startup this disables disk syncs but is mostly benificial for writes, versus reads. Also remember that alot of PgSQL's speed benefits become aparent with large numbers of concurrent users. Jeff On Tue, 6 Feb 2001, Cameron wrote: whilst i know that mysql is generally faster than pgsql i just tried to convert another of my mysql projects to pgsql, in mysql the list takes about 1 second (SELECT * FROM email LIMIT 0,300 on 18 records), the same query in pgsql is taking around 5 seconds, i know i have tweaked mysql a little and played with things to make it faster, i was wondering if there are any tips to pgsql? i didnt think pgsql was that slow :( Cameron Jeff MacDonald, - PostgreSQL Inc | Hub.Org Networking Services [EMAIL PROTECTED] | [EMAIL PROTECTED] www.pgsql.com | www.hub.org 1-902-542-0713 | 1-902-542-3657 - Facsimile : 1 902 542 5386 IRC Nick : bignose PGP Public Key : http://bignose.hub.org/public.txt -- 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] ORA-12154: TNS:could not resolve service name in XXX
If you ftp'ed your file as binary, then the CRLF would not work correctly. Try ftp'ing as ascii next time and you shouldn't have to go through the extra steps on unix. Peter J. Krawetzky -Original Message- From: Joe Brown [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, February 22, 2001 12:08 PM Subject: Re: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX I had a similar problem. Worked up a tnsnames.ora file on windoz machines. Thought it would be no big deal if it was copied over to linux and used. But there is a big deal.. Oracle can't handle the CRNL character sequence, in a unix environment. Go figure... There used to be a dos2unix program lying around my linux box. A couple of distributions later, I find none.. vi works well though.. $ vi tnsnames.ora :set ff=unix :w! Did the trick for me, HTH. -Joe ""Peter J. Krawetzky"" [EMAIL PROTECTED] wrote in message 001801c09cce$8c530160$[EMAIL PROTECTED]">news:001801c09cce$8c530160$[EMAIL PROTECTED]... I appears that PHP does not know about the paths for Oracle. I am only guessing at this because I haven't installed Oracle on a Linux/Apache box but I think Apache is not aware of the Oracle paths that are required. You might need to recompile Apache with the appropriate configuration parameters. -Original Message- From: Vlad [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, February 22, 2001 7:40 AM Subject: Re: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX Hi All Oracle is installed on SCO UnixWare Client that I use to connect on Windows 98 env variables ORACLE_HOME, TNS_ADMIN for client is correctly defined by the way I created ODBC source for my ORACLE connection and tested it. Then I tryed to connect using PHP's odbc_connect and have the same problem... Is there any solution? Thanks, Vlad Make sure your tnsnames.ora file is setup correctly and that your environment variables are setup correctly. What OS are you using on the machine that Oracle is installed on? Peter J. Krawetzky -Original Message- From: Vlad [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, February 22, 2001 3:25 AM Subject: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX Hello All I have some problems connecting ORACLe from my php script. connection string: $conn = OCILogon("asu", "asu", "asu"); failed with ORA-12154: TNS:could not resolve service name in XXX Regards, Vlad e-mail: [EMAIL PROTECTED] IQ: 1042225964 -- 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] -- 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] Most Occurring
you mean the "mode". I'm afraid you'll have to do it by hand. Other databases do have functions for a couple of statistics measures( though not sure the mode is included), but MYSQL doesn't. Lennin Arriola [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: Re: [PHP-DB] Most Occurring
BDY.RTF -- 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] next previous record
Keep a counter of the rows you have fetched. so when you want to go back call mysql_data_seek ($Result, Counter-1); then mysql_fetch and you've got the previous row. Lennin Arriola [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] HELP!!! Troubles with Oracle
Please, I´m having a big problem to bring cursor from Oracle. I have no troubles using statics queries, but when i use dynamic queries (dbms_sql) with array occurs the follow error mensage: Warning: failed to rollback outstanding transactions!: ORA-01041: internal error. hostdef extension doesn't exist in Unknown on line 0 If anyone know anything about this, please just notice me! Thanks, ravage -- 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] next previous record
I don't know about "Cursors" but I think you can use the same approach we discussed on navigate record by record, " retrieval of NEXT, PREV records" was the subject. If set an order by clause and search for the first record you can use a where clause like this : ... $current = $row["field"] ; // for next row $query = "select * from table where field_name '$current' limit 1"; // for previous row $query = "select * from table where field_name '$current' limit 1"; HTH Jayme. www.conex.com.br/jjeffman/antispam.html -Mensagem Original- De: Andrew Hill [EMAIL PROTECTED] Para: Dreamvale [EMAIL PROTECTED]; [EMAIL PROTECTED] Enviada em: quinta-feira, 22 de fevereiro de 2001 14:10 Assunto: RE: [PHP-DB] next previous record You want to use Cursors, and I don't believe MySQL supports cursors yet, although I could be wrong. Best regards, Andrew -- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com -Original Message- From: Dreamvale [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 11:42 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] next previous record I was not refering pagination. suppossing there are these 3 records ABC DEF GHI LJK now a search is done by entering D, which using like %, and limit would return the record DEF. The "next" would forward to GHI and "previous" would backward to ABC. any idea? thanks. - Original Message - From: "Brunner, Daniel" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 23, 2001 12:12 AM Subject: FW: [PHP-DB] next previous record Check this link out... http://www.oreillynet.com/pub/a/php/2000/11/02/next_previous.html?page =1 It's about Next/previous links... It does work, but I've yet to get to get it to work completely with displaying the records (rows) and the links at the same time... It just takes some time to find how to use the mysql_query variable to print out the rows, with every click of the link.. If you get any head way let me know... It's great code Dan -- From: Dreamvale Sent: Thursday, February 22, 2001 9:55 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] next previous record hi all, need to implement record scrolling, one at a time -either forward or backward, on MySQL. The key is a char (32) containing part numbers. anyone has done this before? thanks in advance. dreamvale -- 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] -- 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] How can I use Oracle V8 on PHP for Win NT version 4?
Hi, I've followed all the indications contained in section 10.51 of PHP official manual but I did not succeed. This is the message I have: Fatal error: Call to undefined function: ocilogon() in C:\InetPub\wwwroot\php\helloworld.php on line 24 In the mean time, every thing is going perfectly for MySql (bundle with PHP Version 4), and the same problem I have with Oracle is the same that I have with Interbase. So I need some help to may be configure better than what I did the PHP.INI file located in C:\WINNT or any other file concerned with this installation. Best Regards and thanks for your help. ___ To get your own FREE ZDNet Onebox - FREE voicemail, email, and fax, all in one place - sign up today at http://www.zdnetonebox.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: All mysql.sock error help requests
I just made a php module with mysql support and had the couldn't connect to /var/lib/mysql/mysql.sock problem. Not looking at the basics as the RedHat 7 did the mysql install I figured it was more in mysql or php config. I checked out the archive for this list and found a fair number of people with the same ailment, but no solution. However, one person who made a link to /tmp/mysql.sock shed the light I needed. Back to the basics. A number of helpful people pointed out that you need to make sure that mysql.sock is there. But that's just a small piece of it. Not only must it exist, but it must be usable by the user trying to connect to it, and therefore must be findable by that user. The apache owner (whomever you have it configured to) is probably different than the mysqld (and mysql.sock) owner. In my RedHat 7 setup the user mysql owns mysql.sock. So first issue is is mysql.sock readable by the apache owner. In my case the answer was yes - it's a socket. The next issue is is mysql.sock findable by the apache user. No! /var/lib/mysql was set to 700. My apache user had no execute privilege on that directory so it couldn't "get into" the directory to use the socket. You'll notice that almost all other directories in /var/lib are 755. Change /var/lib/mysql to 755 and you're good to go. The reason the link from /tmp worked is that /tmp is executable (searchable since it's a directory) by world. ___W__i__l__l__i__a__m_D__a__n_T__e__r__r__y___ How do we acquire wisdom along with all these shiny things? -David Brin PGP public key: http://www.knotworks.com/wdt_pgp_pubkey.asc fingerprint: DC 80 E4 18 E2 CB AC F4 8C 59 9B 9C BB A2 D7 4B -- 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] SELECT problem
Hi-- What's wrong with this line of code? echo("SELECT onChange=\"window.location=\"$PHP_SELF?campus+=\"this.value\"\"\" NAME='campus'"); Julio Cuz, Jr. Riverside Community College [EMAIL PROTECTED]
[PHP-DB] SELECT problem (2)
Hi-- Sorry, I forgot to finish the previous e-mail: What's wrong with this line? echo("SELECT onChange=\"window.location=\"$PHP_SELF?campus+=\"this.value\"\"\" NAME='campus'"); I'm trying to RELOAD the current page with the new value of "$campus" after the user selects a campus from a drop-down menu. But I can't get the "this.value" line to pass the value of "$campus" to the new loaded page. Help! Julio Cuz, Jr. Riverside Community College [EMAIL PROTECTED]
RE: [PHP-DB] SELECT problem (2)
You probably want this.options[this.selectedIndex].value -Original Message- From: Julio Cuz, Jr. [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 2:36 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] SELECT problem (2) Hi-- Sorry, I forgot to finish the previous e-mail: What's wrong with this line? echo("SELECT onChange=\"window.location=\"$PHP_SELF?campus+=\"this.value\"\"\" NAME='campus'"); I'm trying to RELOAD the current page with the new value of "$campus" after the user selects a campus from a drop-down menu. But I can't get the "this.value" line to pass the value of "$campus" to the new loaded page. Help! Julio Cuz, Jr. Riverside Community College [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] Redirect command?
header ("Location: http://www.php.net"); /* Redirect browser -Original Message- From: Julio Cuz, Jr. [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 4:23 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Redirect command? Hi-- I've been looking for a "redirect" command (basically redirect from page a to page b if something happens)... Julio Cuz, Jr. Riverside Community College [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] Redirect command?
if ( $x==true) { print "script language='javascript'\n"; print "window.open('b.php','_self');\n"; print "/script\n"; die; } -Original Message- From: Julio Cuz, Jr. [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 3:23 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Redirect command? Hi-- I've been looking for a "redirect" command (basically redirect from page a to page b if something happens)... Julio Cuz, Jr. Riverside Community College [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] Variables
Hi-- I know there is a tutorial out there that shows you how NOT TO LOSE any variable values if your browser does a refresh or a reload. Please assist. For example, if a user fills out fields 1, 2, and 3, but on field 4 the browser is forced to do a reload, data for fields 1-3 should be there, including field 4 this time. Julio Cuz, Jr. Riverside Community College [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] CLEAR screen command
Hi-- Is there a CLEAR SCREEN command in PHP? Julio Cuz, Jr. Riverside Community College [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] RedHat 7 vs. Windows 98
Thanks a bunch, (sorry that I'm an amateur at this.) How do I set the error level? -Original Message- From: Ron Brogden [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 5:46 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] RedHat 7 vs. Windows 98 At 05:23 PM 2/22/2001 -0700, you wrote: I've resolved a similar error by using isset() for if ($id) but when I do the same for if (!$id) I get a parse error. Sounds like you placed the ! in the wrong spot maybe? "if(!isset($foobar)) {}" is fine syntactically as far as I am aware. Second error. I'm getting an undefined variable error when I have a blank form to make an insert. If I pull up a record to update in the form, there is no error, only when I pull up a blank one. Linux seems to have place holders in the forms and I don't get the error. Here is a part of the code referred to in the error. My guess is that you are not getting *errors* but spurious *warnings* because your error_level() is set too high. Set it to 7 and you should only get meaningful errors and warnings. if (isset($id)) { $sql="SELECT * FROM tblpeople WHERE id=$id"; Don't do stuff like this *ever* with user defined variables. Bad bad bad. =) You cannot trust people to not slip in things other than what you expect into "$id": foobar.php?id=1+OR+id!=0 This will match everything in your database which could be bad. Also, MySQL has stated that they are eventually going to allow multiple queries per call which means that in the above case you can add on a "drop database" call which is understandably serious. Always perform sanity checking on user supplied ("tainted") data. I'll stop preaching now. =) Cheers - Island Net AMT Solutions Group Inc. Telephone: 250 383-0096 1412 Quadra Toll Free:1 800 331-3055 Victoria, B.C. Fax:250 383-6698 V8W 2L1 E-Mail: [EMAIL PROTECTED] Canada WWW: http://www.islandnet.com/ - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] mysql_version or mysql_status($varname) for fast rand
I'd need one of those functions. I would want to use the much faster "SELECT ... ORDER BY RAND() LIMIT 1" but at least one server of mine doesn't support RAND(). I want to detect that dynamically. no way? for this old mysql I must use: $res = mysql_query("select xx from xx", $dbi); $rows = mysql_num_rows($res); return mysql_result($res, rand(1,rand($rows))); please CC to me also because i'm not subscribed to this list. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ -- 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] Know any sites where a PHP programmer can find job?
Check out : http://www.weberdev.com/index.php3?GoTo=jobs/Jobs.php3 Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Grishick [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 7:37 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Know any sites where a PHP programmer can find job? Anyone know any sites where a PHP programmer can find job? Specially in US. Thank you. Grigoriy Solovyev. [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] Re: [PHP] passing variables in javascript
H ... is there anyway to do this without requiring the page with the link to use PHP? You have to encode each part of the query string on the URL correctly: a href="#" onClick="MM_openBrWindow('../email/popup.php??php echo "title=" . urlencode("B2B Antitrust: Opening Moves in the Game") . "url=" . urlencode("http://www.domain.com/biz/pubs.html#antitrust"); ?', 'email','width=410,height=435')"Emailthis/a Cheers Simon Garner -- 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]