Re: [PHP-DB] character problem with mssql
opps! i didn't read your question properly! i'm so so sorry.. i have not used mssql before, so many someone out there would be a better help to you.. by the way, your english is okay! i can understand it.. but i'm afraid i can't be much of a help to you =( - Original Message - From: Gamze Baaran [EMAIL PROTECTED] To: Ng Hwee Hwee [EMAIL PROTECTED] Sent: Thursday, December 04, 2003 3:17 PM Subject: RE: [PHP-DB] character problem with mssql Hi; First of all thanks for your concern. No I'm not use an turkish application. I write a program with php,phplib and my database must be mssql. Our webserver is linux. (Debian) When I connect to mssql and insert a data I haven't got any turkish chracter problem. I select them in my program and they seen normal. But when I want to add a record from my program with an insert centence it isn't add do database true. My turkish characetrs go to bad like ???. I look my sql centence with echo it likes INSERT INTO (Banks Bank-name, Used_limit) values (' BANKASI',123456); But in the database it add like '?? BANKASI' I hope I can explain my problem with my bad english :)) -Original Message- From: Ng Hwee Hwee [mailto:[EMAIL PROTECTED] Sent: 04 Aralk 2003 Perembe 03:22 To: Gamze Baaran; [EMAIL PROTECTED] Subject: Re: [PHP-DB] character problem with mssql hi, i had the same problem a while ago with japanese characters. are you using a turkish OS or turkish application to insert your data? for me, what happened was i was given a file from a colleague who was using japanese OS and japanese version of excel. when he passed me the data, i opened it in Win2000 english version and edited the data with Excel2000 english version. when i save the file in a .csv format, i think the japanese characters got corrupted cos when i uploaded the file to PHPMyAdmin, i get ?? instead of my jap characters. but when my colleague tried on his machine with all the japanese settings, it worked well and good.. once the data is inside, any one can read it with the characters .. reading has never been a prob.. to what i experienced, the OS and the application may solve your prob. hth hwee - Original Message - From: Gamze Baaran [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 9:38 PM Subject: [PHP-DB] character problem with mssql Hi; I use php and mssql. I have got a character problem. I must use turkish chracters. When I select datas from database it works true and I can see turkish characters but when I want to insert new datas to database it set wrong character. For example characetrs look like ? How can I solve this problem? My data type is char 100. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Addslashes
hi, thanx! my magic_quotes_runtime is set to off. actually, i managed to do a double stripslashes to my form fields eg. stripslashes(stripslashes($field1)).. this worked well but still if the input box is a textbox and i have a value that has a double quote ( ) as part of it, anything after the double quote gets cut off.. i looked at the php.net site and tried things like htmlspecialchars and urlendecode but all to no avail. will appreciate advice! thanx thanx.. hwee - Original Message - From: Justin Patrin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 04, 2003 2:26 PM Subject: [PHP-DB] Re: Addslashes It's the magic quotes setting. Try setting magic_quote_gpc to off. Also, try turning magic_quotes_runtime off. Ng Hwee Hwee wrote: hi all, i'm really buffled by what i got and would appreciate any help possible! although i addslashes and stripslashes, i still get a backslash ( \ ) character infront of a single inverted comma ( ' ) and also whenever an amberscend ( ) appears... please help! thanx thanx.. for example: in my form (form.php), i have something like that: input type=text name=field1 value=? if ($form[field1]) echo stripslashes($form[field1]); ? upon submitting the form, the verification file (verify.php) will be executed, and it has lines like that: ? session_register(form); foreach($_POST as $varname = $value) $form[$varname] = addslashes(trim(EscapeShellCmd($value))); ? ... and then i'll check for the validity of field1. if there is an error, the user will be redirected back to form.php with the value that the user entered echoed with a stripslash. if there is no error, the whole script runs well, but if the user has to be brought back to form.php, it'll print backslashes infront of characters like ( ) ' etc.. also, instead of having a blank text field, i have a text field with contents retrieved from the database.. the database data does not have the slashes and when the first time they appear on the screen, there is no slashes attached too.. the problem is always when the user has an error and needs to be brought back to form.php that the slashes appear and the number of slashes doubles everytime the user has to be brought back to form.php. i have my magic_quotes_gpc set to ON in my phpinfo() and my version of php is 4.1.2. thank you soo soo much!! look forward to your replies. hwee -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] cookies
Let's assume that we have an html page where we plant a call to cookie registering php script. This is done by the following html line which is placed on that page we would like to have cookies stats for: html ... body .. img nocache border=0 width=2 height=1 src=http://www.cookiedomain.com/cookies/cookies.php .. /body /html Php cookie registering script has the following cookie set operation: setcookie(test, 1, time() + 3600, /, ); The problem is that when executing HTML above, everything works fine as long as page and php script are on the same domain But as soon as page is for example www.pagedomain.com and cookie script is still on www.cookiedomain.com No cookies are set no more. My understanding is that with line img nocache border=0 width=2 height=1 src=http://www.synchrodat.com/sdcookies/cookies.php we simply execute php script the same way as it would be typed in url line and executed, why there's a difference? Could you share with your experience and point out where is the problem here. I tried different variations for domain parameter in setcookie command but it didnt help Is this construction usable in this case with different domains at all? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Dumping database/restoring
I use Mascon from scibit to view my database. It has a dump facility to dump to another database or to a local file. I am afraid of the first option lest it overwrites tables already on the other server. When I dump to a local file it is a text file and I can't work out how I would restore from this file. The support desk isn't answering and the notes don't cover restoring. That's the background. The question is how do people out there back up their database residing on a server to a local file? Ideally I would download the database and save on a CD, and be able to restore from this if the worst happened. http://www.cantor.com CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). For further important information, please read the Important Legal Information and Legal Statement at http://www.cantor.com/legal_information.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Dumping database/restoring
Hello John, Thursday, December 4, 2003, 11:01:20 AM, you wrote: DJ The question is how do people out there DJ back up their database residing on a server to a local file? Ideally I would DJ download the database and save on a CD, and be able to restore from this if DJ the worst happened. Personally, I use mysqldump! Free and works :) Creates a .sql file which mysqlimport can re-create your DB from. .sql file is plain text so can be viewed in a text editor, burnt to CD, zipped, etc. -- Best regards, Richardmailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Dreamweaver as PHP editor
On 1 Dec 2003, at 21:11, [EMAIL PROTECTED] wrote: I'm just getting into PHP, and have found that as a PHP code editor, Dreamweaver works pretty well (with the extension I installed). My question is this, whenever I save an include file with the .inc extension, all of the color coding goes away, as does the PHP tab on the tool bar. Is there any way to make Dreamweaver see a .inc file as a PHP file? I looked on all the menus and in the preferences, but I couldn't find an obvious way to do this. I just name my files filename.inc.php. That way dreamweaver sees them as php files and also prevents malicious users of my sites from seeing the content of my include files should they guess the name of them. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] cookies
Hello Maris, Thursday, December 4, 2003, 10:40:33 AM, you wrote: MK Could you share with your experience and point out where MK is the problem here. I tried different variations for MK domain parameter in setcookie command but it didnt help It's a security mechanism built into cookies. They cannot be cross-domain. They can cross sub-domains (i.e. *.launchcode.co.uk) but a cookie set for one domain cannot be read by another. Think of the anarchy that would happen if they could (being able to read and mess with say Hotmail cookies from your own site for example). -- Best regards, Richardmailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re[2]: [PHP-DB] Dumping database/restoring
Hi Richard, I simply login to my server and issue a command like: I think that's the bit I missed. I've managed to create the database-d web site (and live happily) without ever logging in to a shell-type area. I've begun to use Putty/SSH as Leech doesn't show me a shell to type commands to. Thanks, John http://www.cantor.com CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). For further important information, please read the Important Legal Information and Legal Statement at http://www.cantor.com/legal_information.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re[2]: [PHP-DB] Dumping database/restoring
Hi Richard, I simply login to my server and issue a command like: mysqldump -hmysqlserverhost.com -utheusername -p dbname dbname.sql It will then prompt me for my password and dump the database (dbname) into dbname.sql -h = the sql host (often localhost) -u = a mysql account that has permissions to do this -p = prompt you to enter the password This file I then copy to another machine and do the reverse with mysqlimport (same syntax, instead of at the end). I am proposing to back up the database using the following command, using putty/ssh: mysqldump -opt --allow-keywords -hSERVERADDRESS -uUSER -p DATABASE-NAME c:\localpath.sql [from a post by Jon Benson on http://www.mysql.com/doc/en/mysqldump.html] It worries me that --opt includes a add-drop-table command. Since it is creating a new file, how does this affect anything. I just don't want to delete anything. Is it relevant on restoring only? Do you think the above command is OK to try? I'm allowing keywords as I made the mistake of calling one of my fields 'key' and haven't changed it yet. Thanks, John http://www.cantor.com CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). For further important information, please read the Important Legal Information and Legal Statement at http://www.cantor.com/legal_information.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] cookies
Right, but in my example HTML line img nocache border=0 width=2 height=1 src=http://www.cookiedomain.com/cookies/cookies.php isnt it refering and setting cookie for www.cookiedomain.com even if this HTML file is on another domain? Maris Richard Davey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello Maris, Thursday, December 4, 2003, 10:40:33 AM, you wrote: MK Could you share with your experience and point out where MK is the problem here. I tried different variations for MK domain parameter in setcookie command but it didnt help It's a security mechanism built into cookies. They cannot be cross-domain. They can cross sub-domains (i.e. *.launchcode.co.uk) but a cookie set for one domain cannot be read by another. Think of the anarchy that would happen if they could (being able to read and mess with say Hotmail cookies from your own site for example). -- Best regards, Richardmailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP-DB] cookies
Hello Maris, Thursday, December 4, 2003, 12:24:10 PM, you wrote: MK img nocache border=0 width=2 height=1 MK src=http://www.cookiedomain.com/cookies/cookies.php MK isnt it refering and setting cookie for www.cookiedomain.com MK even if this HTML file is on another domain? No, because by that point the Header has already been sent. You can't issue a cookie after a header has gone and use it in the same page session. As the PHP manual so elegantly puts it - this is a protocol restriction. Your browser will look for cookies at the start of the page request, not in the middle of it (where your image is). At that point, the header is already sent. -- Best regards, Richardmailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP-DB] cookies
thanks a lot Richard, now it's completely clear for me! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PhpmyAdmin from external computers
However, when i connect to that computer from my windows computer and go to the phpmyadmin url it wont let me do anything. Ive set all the priveleges to allow full access in every way, but it still wont let me access it What error do you get? -- Mike Karthauser Managing Director - Brightstorm Ltd Email[EMAIL PROTECTED] Web http://www.brightstorm.co.uk Tel 0117 9426653 (office) 07939 252144 (mobile) SnailmailUnit 8, 14 King Square, Bristol BS2 8JJ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP-DB] PhpmyAdmin from external computers
I do not get an error message as such. I goto http://serverIP/phpmyadmin/index.php - and it logs me inautomatically as localhost, i can see the database lists on the side panel etc. I click on a database or create a new database and the login screen comes up. I try entering the root password and username, but it just comes up with : #1045 - Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) and ive tried with a blank password as well. I have the auth_type in config.inc.php (PhpMyAdmin) set to 'config' and the username and password for mysql is in their respective places. - Original Message - From: mike karthauser [EMAIL PROTECTED] To: Sent: Thursday, December 04, 2003 2:34 PM Subject: Re: [PHP-DB] PhpmyAdmin from external computers However, when i connect to that computer from my windows computer and go to the phpmyadmin url it wont let me do anything. Ive set all the priveleges to allow full access in every way, but it still wont let me access it What error do you get? -- Mike Karthauser Managing Director - Brightstorm Ltd Email[EMAIL PROTECTED] Web http://www.brightstorm.co.uk Tel 0117 9426653 (office) 07939 252144 (mobile) SnailmailUnit 8, 14 King Square, Bristol BS2 8JJ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP-DB] PhpmyAdmin from external computers
Im afraid ive already tried that. - Original Message - From: mike karthauser [EMAIL PROTECTED] To: Sent: Thursday, December 04, 2003 3:10 PM Subject: Re: [PHP-DB] PhpmyAdmin from external computers I goto http://serverIP/phpmyadmin/index.php - and it logs me inautomatically as localhost, i can see the database lists on the side panel etc. I click on a database or create a new database and the login screen comes up. I try entering the root password and username, but it just comes up with : #1045 - Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) and ive tried with a blank password as well. I have the auth_type in config.inc.php (PhpMyAdmin) set to 'config' and the username and password for mysql is in their respective places. Logging in as root with no password remotely is not good. Try making another user logged in locally with user and password, then try that from remote. -- Mike Karthauser Managing Director - Brightstorm Ltd Email[EMAIL PROTECTED] Web http://www.brightstorm.co.uk Tel 0117 9426653 (office) 07939 252144 (mobile) SnailmailUnit 8, 14 King Square, Bristol BS2 8JJ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PhpmyAdmin from external computers
Hi I have phpMyAdmin installed on my red hat 8 box with mysql 3. It works fine on that computer and phpmyadmin gives me full access to the database. However, when i connect to that computer from my windows computer and go to the phpmyadmin url it wont let me do anything. Ive set all the priveleges to allow full access in every way, but it still wont let me access it Any clue ? Andrew -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] International Addresses and Telephones
I have a form which captures US addresses ( address, city, state ) and telephone numbers ( 10 digit ) and am writing this data to a MySQL table. I need to expand this to capture non-US info, so I was hoping for some guidance on forms and table structures. I have googled this to death and still haven't come up with anything.
Re: [PHP-DB] PhpmyAdmin from external computers
Hello!! You need change your Usernames' host to your IP or simply change it to % (Any host). This is all changed in MYSQL. Good Luck!! Dan On Dec 4, 2003, at 9:36 AM, [EMAIL PROTECTED] wrote: Hello Andy, Thursday, December 4, 2003, 3:27:11 PM, you wrote: AL Im afraid ive already tried that. Are you sure your MySQL server is actually configured to ALLOW someone to login remotely? I know most of the ones I work with aren't. This isn't a setting you'll find in phpMyAdmin btw. Most MySQL servers are locked down in this way for (very good) security reasons, to the point that it wouldn't surprise me if this wasn't the default after installation (I don't know for sure it is though). -- Best regards, Richardmailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] postgresql and unicode
Hi, I would like to connect to a postgres server which is configured in unicode with php. In java, when I do the connexion, I specify the charset at the connexion. Apparently I have no option in pg_connect() function to specify this. How can I do this ? By the pg_set_client_encoding() function ? Regards. -- .. .^. | Didier Bretin, France | [EMAIL PROTECTED]| /V\ |---| www.informactis.com| // \\| `| /( )\ | Visit: http://www.vim.org/ | ^^-^^`' -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Fw: [PHP-DB] PhpmyAdmin from external computers
Hello Andy, Thursday, December 4, 2003, 3:27:11 PM, you wrote: AL Im afraid ive already tried that. Are you sure your MySQL server is actually configured to ALLOW someone to login remotely? I know most of the ones I work with aren't. This isn't a setting you'll find in phpMyAdmin btw. Most MySQL servers are locked down in this way for (very good) security reasons, to the point that it wouldn't surprise me if this wasn't the default after installation (I don't know for sure it is though). -- Best regards, Richardmailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PhpmyAdmin from external computers
I goto http://serverIP/phpmyadmin/index.php - and it logs me inautomatically as localhost, i can see the database lists on the side panel etc. I click on a database or create a new database and the login screen comes up. I try entering the root password and username, but it just comes up with : #1045 - Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) and ive tried with a blank password as well. I have the auth_type in config.inc.php (PhpMyAdmin) set to 'config' and the username and password for mysql is in their respective places. Logging in as root with no password remotely is not good. Try making another user logged in locally with user and password, then try that from remote. -- Mike Karthauser Managing Director - Brightstorm Ltd Email[EMAIL PROTECTED] Web http://www.brightstorm.co.uk Tel 0117 9426653 (office) 07939 252144 (mobile) SnailmailUnit 8, 14 King Square, Bristol BS2 8JJ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Dumping database/restoring
Dillon, John wrote: [from a post by Jon Benson on http://www.mysql.com/doc/en/mysqldump.html] It worries me that --opt includes a add-drop-table command. Since it is creating a new file, how does this affect anything. I just don't want to delete anything. Is it relevant on restoring only? Do you think the above command is OK to try? I'm allowing keywords as I made the mistake of calling one of my fields 'key' and haven't changed it yet. The DROP TABLE only applies when you're restoring this file. It will drop the old table if it exists and then create and load the the table from the information in the file. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Problem with mail()
I have an if statement which includes two mail() functions. Curiously, the second one works, in that it results in e-mails being received. But the first doesn't - and I cannot for the life of me figure out why. The code is below. It is part of the final sequence for registering for an on-line brainstorming session. $email is a session variable and I know it is working (as it is in the from field of the second e-mail). code if ($sequencer == 3){ $email_message=Dear $name $surname: \n\n Your BrainStorm session has been set up. Once payment has been received, you can access your session at http://www.jpb.com/sylvia/brainstorm.php?brainstorm_id=$brainstorm_id. \n\n Alternatively, you can go to http://www.jpb.com/sylvia/, click on the BrainStorm link and enter the BrainStorm session number: $brainstorm_id. \n\n You may invite up to $invites participants to join you. If they have not BrainStormed with Sylvia before, recommend they visit at least ten minutes prior to the session in order to register and read the instructions. \n\n Also be sure you forward the URL and/or BrainStorm session number to participants so that they can join you. \n\n If you have any comments, please feel free to send them to us by replying to this e-mail. \n\n Sylvia Automatic Reply; mail($email,Your Sylvia BrainStorm session information,$email_message,From: [EMAIL PROTECTED]); if ($invite == yes){ foreach($bs_email as $key = $emailgetter){ $mail_message=Dear $bs_name[$key] $bs_surname[$key]: \n $name $surname has invited you to participate in a brainstorming session on: \n $issue (BrainStorm session number: $brainstorm_id) on $bs_date at $bs_time. \n Please confirm via e-mail or telephone your ability to participate. If you have not used Sylvia BrainStorm before, please visit http://www.jpb.com/sylvia/ to familiarise yourself with the system. On the day of the BrainStorm session, please log on to Sylvia, click on \BrainStorm\ and enter the BrainStorm session number above.\n This is an automatic message generated by Sylvia web based BrainStorming software for $name $surname. \n\n; mail($emailgetter,Invitation to participate in web based BrainStorm session,$mail_message,From: $email); } } etc... } /code Many thanks, Jeffrey Baumgartner -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Nevermind [was: [PHP-DB] Problem with mail()]
Forget my post of a few moments ago - sudenly, it is working. Must be gremlins in the server. Sorry for the wasted bandwidth. Jeffrey Baumgartner From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date sent: Thu, 04 Dec 2003 20:34:26 +0100 Priority: normal Subject:[PHP-DB] Problem with mail() I have an if statement which includes two mail() functions. Curiously, the second one works, in that it results in e-mails being received. But the first doesn't - and I cannot for the life of me figure out why. The code is below. It is part of the final sequence for registering for an on-line brainstorming session. $email is a session variable and I know it is working (as it is in the from field of the second e-mail). code if ($sequencer == 3){ $email_message=Dear $name $surname: \n\n Your BrainStorm session has been set up. Once payment has been received, you can access your session at http://www.jpb.com/sylvia/brainstorm.php?brainstorm_id=$brainstorm_id. \n\n Alternatively, you can go to http://www.jpb.com/sylvia/, click on the BrainStorm link and enter the BrainStorm session number: $brainstorm_id. \n\n You may invite up to $invites participants to join you. If they have not BrainStormed with Sylvia before, recommend they visit at least ten minutes prior to the session in order to register and read the instructions. \n\n Also be sure you forward the URL and/or BrainStorm session number to participants so that they can join you. \n\n If you have any comments, please feel free to send them to us by replying to this e-mail. \n\n Sylvia Automatic Reply; mail($email,Your Sylvia BrainStorm session information,$email_message,From: [EMAIL PROTECTED]); if ($invite == yes){ foreach($bs_email as $key = $emailgetter){ $mail_message=Dear $bs_name[$key] $bs_surname[$key]: \n $name $surname has invited you to participate in a brainstorming session on: \n $issue (BrainStorm session number: $brainstorm_id) on $bs_date at $bs_time. \n Please confirm via e-mail or telephone your ability to participate. If you have not used Sylvia BrainStorm before, please visit http://www.jpb.com/sylvia/ to familiarise yourself with the system. On the day of the BrainStorm session, please log on to Sylvia, click on \BrainStorm\ and enter the BrainStorm session number above.\n This is an automatic message generated by Sylvia web based BrainStorming software for $name $surname. \n\n; mail($emailgetter,Invitation to participate in web based BrainStorm session,$mail_message,From: $email); } } etc... } /code Many thanks, Jeffrey Baumgartner -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] International Addresses and Telephones
I have a form which captures US addresses ( address, city, state ) and telephone numbers ( 10 digit ) and am writing this data to a MySQL table. I need to expand this to capture non-US info, so I was hoping for some guidance on forms and table structures. I have googled this to death and still haven't come up with anything. Ummm ... did you try e-commerce sites in the target country/ies ? E.g. alapage.com for France, bol.it ... bol.de ... safe bet: try amazon.com in appropriate country. (amazon.fr, etc.) Hans smime.p7s Description: S/MIME Cryptographic Signature
[PHP-DB] Oracle/PHP Issue
Hello, I am having a strange issue with Oracle and PHP. I am running PHP Version 4.3.4 on Red Hat AS 2.3 and trying to connect to Oracle 9i also on Red Hat AS 2.3. I compiled PHP successfully with OCI and oracle. My script uses the ocilogon($user, $password, $db); or ora_logon($user.'@'.$db, $password); depending on what interface I want to use in my abstraction layer. Note: All oracle failures (*** some error ***) are when I use the ora_logon, ocilogon, or the ocinlogon. Info about what works: - PHP can at lease partially talk to the remote Oracle DB. - If I give a bad username or password, PHP returns *** Oracle: Connection Failed: ORA-01017: invalid username/password; logon denied.*** So I know PHP is able to validate the username against the remote Oracle database. - If I give an unspecified TNS name, BDB1_broken, instead of BDB1 which is in the tnsnames.ora file, I get the following Oracle message though PHP: *** Oracle: Connection Failed: ORA-12154: TNS:could not resolve service name ***. So I know that the TNS name is being verified against the remote database. - When I try to logon to the remote DB with SQLPlus using the same tnsnames.ora file used by PHP, I can logon just fine. Also, a plsql stored procedure running off a DAD on the server works. THE PROBLEM: When I use the correct username, password and ORACLE_SID, I get the following error: *** Oracle: Connection Failed: ORA-12545: Connect failed because target host or object does not exist *** I have: - Tried specifying the DB connection in the PHP code $DATABASE = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.2)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = BDB1.world) ) ); - Tried using the IP address 192.168.2.2 and the host name both in the PHP and the tnsnames file. - Added apache and nobody to the oracle and the dbs groups. - Setting different environment vars in the PHP code putenv(ORACLE_HOME=/opt/ora9/product/9201); putenv(ORACLE_SID=BDB1) - Recompiling PHP - Using BDB1 and BDB1.PROD_DATABASE.MY_DOMAIN.COM in the putenv and the database name in the connection function. - Checked the Apache config ##ORACLE ENVIRONMENT ORACLE_HOME=/opt/ora9/product/9201 ORACLE_BASE=/opt/ora9/ export ORACLE_HOME ORACLE_BASE ORACLE_TERM=vt100 LD_LIBRARY_PATH=$ORACLE_HOME/lib PATH=$ORACLE_HOME/bin:$PATH export PATH LD_LIBRARY_PATH ORACLE_DOC=$ORACLE_BASE/doc ORACLE_SID=BDB1 TNS_ADMIN=/opt/ora9/product/9201/network/admin export ORACLE_DOC ORACLE_SID TNS_ADMIN Does anyone have any thoughts Thanks for any help, Paul ___ Paul Miller System-Wise pmillerATsystemDASHwiseDOTcom AT = @ DASH = - DOT = .
[PHP-DB] Re: Oracle/PHP Issue
I'm using the descriptor type of connection and it looks a bit different than yours. Try changing your CONNECT_DATA setion to: (CONNECT_DATA = (SID = BDB1) (GLOBAL_NAME = BDB1.world)) Paul Miller wrote: Hello, I am having a strange issue with Oracle and PHP. I am running PHP Version 4.3.4 on Red Hat AS 2.3 and trying to connect to Oracle 9i also on Red Hat AS 2.3. I compiled PHP successfully with OCI and oracle. My script uses the ocilogon($user, $password, $db); or ora_logon($user.'@'.$db, $password); depending on what interface I want to use in my abstraction layer. Note: All oracle failures (*** some error ***) are when I use the ora_logon, ocilogon, or the ocinlogon. Info about what works: - PHP can at lease partially talk to the remote Oracle DB. - If I give a bad username or password, PHP returns *** Oracle: Connection Failed: ORA-01017: invalid username/password; logon denied.*** So I know PHP is able to validate the username against the remote Oracle database. - If I give an unspecified TNS name, BDB1_broken, instead of BDB1 which is in the tnsnames.ora file, I get the following Oracle message though PHP: *** Oracle: Connection Failed: ORA-12154: TNS:could not resolve service name ***. So I know that the TNS name is being verified against the remote database. - When I try to logon to the remote DB with SQLPlus using the same tnsnames.ora file used by PHP, I can logon just fine. Also, a plsql stored procedure running off a DAD on the server works. THE PROBLEM: When I use the correct username, password and ORACLE_SID, I get the following error: *** Oracle: Connection Failed: ORA-12545: Connect failed because target host or object does not exist *** I have: - Tried specifying the DB connection in the PHP code $DATABASE = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.2)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = BDB1.world) ) ); - Tried using the IP address 192.168.2.2 and the host name both in the PHP and the tnsnames file. - Added apache and nobody to the oracle and the dbs groups. - Setting different environment vars in the PHP code putenv(ORACLE_HOME=/opt/ora9/product/9201); putenv(ORACLE_SID=BDB1) - Recompiling PHP - Using BDB1 and BDB1.PROD_DATABASE.MY_DOMAIN.COM in the putenv and the database name in the connection function. - Checked the Apache config ##ORACLE ENVIRONMENT ORACLE_HOME=/opt/ora9/product/9201 ORACLE_BASE=/opt/ora9/ export ORACLE_HOME ORACLE_BASE ORACLE_TERM=vt100 LD_LIBRARY_PATH=$ORACLE_HOME/lib PATH=$ORACLE_HOME/bin:$PATH export PATH LD_LIBRARY_PATH ORACLE_DOC=$ORACLE_BASE/doc ORACLE_SID=BDB1 TNS_ADMIN=/opt/ora9/product/9201/network/admin export ORACLE_DOC ORACLE_SID TNS_ADMIN Does anyone have any thoughts Thanks for any help, Paul ___ Paul Miller System-Wise pmillerATsystemDASHwiseDOTcom AT = @ DASH = - DOT = . -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php