[PHP-DB] WAMP server Problem and Correct way to install PHP and MySQL???
Hello everyone, I have installed WAMP server on my PC. Then I have installed the MySQL and PHP software by downloading them from the site. The PHP programs I have written used to work fine but when I tried to connect to the MySQL database or create a new database using the PHP programming nothing happens in the browser. I do not know what happened. After several attempts I finally uninstalled the MySQL and PHP programs and then when I tried to connect to the MySQL usin PHP it worked fine I do not know the reason for this. Can anyone tell me what the reason is? Further more I would like to install PHP and MySQL along with a server like APACHE. But I do not know where to download the APACHE server from. Also When I install PHP and MySQL how do I link PHP and MySQL so that they work in tandem. Would be great if anyone can clear these doubts. I know that these are very basic questions but I am a starter. Thanks, Sashi -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] MySQL query executes outside of PHP, but not in PHP
Hi, I am running: PHP 5.2.8, Apache 2.2.11, MySQL 5.1.30 on Win32/XP. I have a number of queries on my page which are very similar in structure, and they all work except for the following one. $mysql['process'] = $client2-real_escape_string($clean['process']); $sql = SELECT f.name, f.description FROM files f, file_mapping m, processes p WHERE m.file_id = f.id AND p.name = '{$mysql['process']}' AND m.process_id = p.id AND m.io_flag = 'I'; if ($client2-multi_query($sql)) { echo 'h3 class=H3-OTMSMain Input Files/h3'; do { if ($result = $client2-use_result()) { while ($input = $result-fetch_row()) { $filename = $input[0]; $descr = $input[1]; echo 'pspan class=FileName'.$filename.'/span'.' '.$descr.'/p'; } $result-close(); } } while ($client2-next_result()); } If I echo the $sql, and then run it in MySQL directly, it works fine. I have tried replacing the variable in the WHERE clause with a hardcoded value and and have tried replacing this query with a very basic query with no variable, but nothing has worked. No error message is returned. Any suggestions as to what I might check? Here's an example of an echo of the following $sql that runs OK in MySQL Query Browser: SELECT f.name, f.description FROM files f, file_mapping m, processes p WHERE m.file_id = f.id AND p.name = 'BCOM1AC' AND m.process_id = p.id AND m.io_flag = 'I' Thanks, Dave -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Authenticating user using a web service
Well, I have asked this question before but it seems people don`t understood me, my intension is to have a second login option like, user may choose to login with they facebook/myspace/etc id or the local id (my site) on my site, I want a situation whereby anyone can choose to register or use an existing social network id and password to login, so I am thinking of using facebook, but i don`t really understand something about facebook application, the application always, first go to facebook then redirect back to the site (callback url), I want all this process done under the hood. Can someone give me another idea? I will just love any simple idea that will help.
Re: [PHP-DB] MySQL query executes outside of PHP, but not in PHP
On Fri, 23 Jan 2009, dave.mcgov...@sungard.com wrote: Hi, I am running: PHP 5.2.8, Apache 2.2.11, MySQL 5.1.30 on Win32/XP. I have a number of queries on my page which are very similar in structure, and they all work except for the following one. $mysql['process'] = $client2-real_escape_string($clean['process']); $sql = SELECT f.name, f.description FROM files f, file_mapping m, processes p WHERE m.file_id = f.id AND p.name = '{$mysql['process']}' AND m.process_id = p.id AND m.io_flag = 'I'; if ($client2-multi_query($sql)) { echo 'h3 class=H3-OTMSMain Input Files/h3'; do { if ($result = $client2-use_result()) { while ($input = $result-fetch_row()) { $filename = $input[0]; $descr = $input[1]; echo 'pspan class=FileName'.$filename.'/span'.' '.$descr.'/p'; } $result-close(); } } while ($client2-next_result()); } If I echo the $sql, and then run it in MySQL directly, it works fine. I have tried replacing the variable in the WHERE clause with a hardcoded value and and have tried replacing this query with a very basic query with no variable, but nothing has worked. No error message is returned. Any suggestions as to what I might check? Here's an example of an echo of the following $sql that runs OK in MySQL Query Browser: SELECT f.name, f.description FROM files f, file_mapping m, processes p WHERE m.file_id = f.id AND p.name = 'BCOM1AC' AND m.process_id = p.id AND m.io_flag = 'I' error_log(Hey, the SQL is: $sql); Then look in your php error log (you do have error logging enabled, right?) If that SQL in the error log is fine, then your problem is $client2-multi_query($sql) -- what does THAT return? What SHOULD it return? What are you expecting it to return? Does it return what you thought it did? When you do if ($var) it can sometimes have unexpected results. If $var is an empty string, it's still true, and executes. I don't know that multi_query SHOULD return, or how to determine if it throws an error, but that's one place to start. Next, if multi_query worked, then this line is suspect: if ($result = $client2-use_result()) { This will always result in TRUE, as the assignment will always succeed. Change it to: if (($result = $client2-use_result())) { (added parenthesis) What DB library are you using? --- Peter Beckman Internet Guy beck...@angryox.com http://www.angryox.com/ --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Authenticating user using a web service
Your first problem is that your question is so general and vague, nobody wants to try and guess at what you are talking about. Not only that, but you are throwing out some theoretical ideas about 3rd party interfaces that, IMO, aren't on topic for this mailing list. If you have a PHP + Database specific question, this is your list. General application development questions are not really on point. On Fri, 23 Jan 2009, Abah Joseph wrote: Well, I have asked this question before but it seems people don`t understood me, my intension is to have a second login option like, user may choose to login with they facebook/myspace/etc id or the local id (my site) on my site, I want a situation whereby anyone can choose to register or use an existing social network id and password to login, so I am thinking of using facebook, but i don`t really understand something about facebook application, the application always, first go to facebook then redirect back to the site (callback url), I want all this process done under the hood. Can someone give me another idea? I will just love any simple idea that will help. --- Peter Beckman Internet Guy beck...@angryox.com http://www.angryox.com/ --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php