Re: [PHP-DB] RE: Help for a beginner
Adam, What is at Line 4 in your test.asp? The error you provided said that there was a problem where it could not find the default driver to use. Also when you get the connection failed you were trying to connect to MYSQL from the system running MYSQL correct? On Wed, Dec 23, 2009 at 7:50 AM, Adam Sonzogni asonzo...@setfocus.comwrote: Giff, Not sure what you mean, and I suspect this is because of my confusion around PMA (as mentioned originally) SO let me elaborate... In my config.inc.php I changed pma to root and the pma password to the root password for mysql When I browse to the phpmyadmin page I neter root and the root password for mysql Thanks, Adam -Original Message- From: Giff Hammar [mailto:gham...@sv-phoenix.com] Sent: Wednesday, December 23, 2009 10:41 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] RE: Help for a beginner It looks like you are not connecting because of a user name/password combination. Typically, Windows does not use root as a valid login as do most other operating systems. Try using your login information to see if you can connect to mySQL using the GUI. I suspect you'll succeed. The other option would be to use the mySQL admin user name and password. One of those should work. Once you can connect to your database with the GUI, you can then use PHP to call the mySQL database connect strings and manipulate your data as necessary. The DBD/DBI is a more generic solution that allows you to use a standard coding structure in PHP (or perl) and easily change databases underneath. For a small implementation, this isn't necessary. There are other database abstraction layers that perform the same function. Giff On Wed, 2009-12-23 at 20:46 +0530, Chaitanya Yanamadala wrote: why dont u install the xampp On Wed, Dec 23, 2009 at 8:38 PM, Adam Sonzogni asonzo...@setfocus.com wrote: Mr. Brookhouse, Thanks for the quick reply. I am guessing it is not relevant to my case because I am not using PERL. I cannot find anything that says PHP requires PERL so I suspect Iam ok in this regard. Thank You, Adam -Original Message- From: Edward Brookhouse [mailto:eb...@healthydirections.com] Sent: Wednesday, December 23, 2009 9:59 AM To: Adam Sonzogni; php-db@lists.php.net Subject: RE: Help for a beginner Just a guess, as I have not tried a full stack in windows, but in any unix if you are connecting php and mysql, you need something in the middle like DBD::mysql See if this helps: http://forums.mysql.com/read.php?51,189692,189856 -Original Message- From: Adam Sonzogni [mailto:asonzo...@setfocus.com] Sent: Wednesday, December 23, 2009 9:52 AM To: php-db@lists.php.net Subject: [PHP-DB] Help for a beginner Hi everyone, first thank you for ALL help and the understanding that I am new to PHP and MySQL. This is a long email and for that I apologize but I am trying to provide as much detail as possible. If this is the wrong list to ask for help, kindly direct me to the proper authority. I am trying to learn and I have built the following environment. Windows Server 2008 Standard 32bit service Pack 2 with IIS7 mysql-essential-5.1.41-win32 php-5.3.1-nts-Win32-VC9-x86.msi phpMyAdmin-3.2.4-english.zip I followed the steps as detailed below (I already had IIS7 and CGI installed) 1. Install CGI PHP http://www.trainsignaltraining.com/iis-7-install-fastcgi-php/2008-09-04/ 2. Install MySQL http://www.trainsignaltraining.com/install-mysql-on-iis7/2008-09-10/ 3. Install PHPMyAdmin http://www.trainsignaltraining.com/install-phpmyadmin-on-iis7-and-server-2008/2008-09-16/ After I completed the installations 1. If I navigate to the PHP directory and type php -info it spews a ton of data at me AND I created info.php which contains: ?php phpinfo(); ? When I browse this, it correctly produces a page with all the info about my PHP server. Although I do not understand much of it I believe this confirms PHP is working correctly with IIS 2. I open the MySQL CLI and perform the commands outlined in Step 23 at this page http://www.bicubica.com/apache-php-mysql/index.php This returns the expected results, confirming MySQL is working 3. PHP is configured to work with php_mysql.dll as per the steps in the trainsignal links above so I begin! I go to the phpmyadmin page, enter root and my password and after a long time I get a FastCGI error. I am not ready to believe it because, in classic MS form, it has several VERY different potential causes, and I have covered all of those. Plus the error code is 0x which is like saying nothing... I start thinking maybe it is not connecting to the mYSQL server right, the instructions re: pma and the password made no sense to me so I fiddle with that
Re: [PHP-DB] RE: Help for a beginner
Well I am not familiar with ASP. You might want to check to make sure that you didn't make any typos in your mysql_test.php page. I would suggest seeing if you can connect through phpMyAdmin. That might give you a better idea of where the problem lies. On Wed, Dec 23, 2009 at 8:31 AM, Adam Sonzogni asonzo...@setfocus.comwrote: Barry, Yes this is all installed ona single system. The code was in the original message % set conn=Server.CreateObject(ADODB.Connection) conn.ConnectionString=Driver={mySQL};Server=localhost;Database=test;User Id=root;Password=youwish conn.open Response.write(Connected) conn.close % So line 4 is: conn.open Thanks, Adam -Original Message- From: Barry Stear [mailto:bst...@gmail.com] Sent: Wednesday, December 23, 2009 11:28 AM To: PHP DB Posts Subject: Re: [PHP-DB] RE: Help for a beginner Adam, What is at Line 4 in your test.asp? The error you provided said that there was a problem where it could not find the default driver to use. Also when you get the connection failed you were trying to connect to MYSQL from the system running MYSQL correct? On Wed, Dec 23, 2009 at 7:50 AM, Adam Sonzogni asonzo...@setfocus.com wrote: Giff, Not sure what you mean, and I suspect this is because of my confusion around PMA (as mentioned originally) SO let me elaborate... In my config.inc.php I changed pma to root and the pma password to the root password for mysql When I browse to the phpmyadmin page I neter root and the root password for mysql Thanks, Adam -Original Message- From: Giff Hammar [mailto:gham...@sv-phoenix.com] Sent: Wednesday, December 23, 2009 10:41 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] RE: Help for a beginner It looks like you are not connecting because of a user name/password combination. Typically, Windows does not use root as a valid login as do most other operating systems. Try using your login information to see if you can connect to mySQL using the GUI. I suspect you'll succeed. The other option would be to use the mySQL admin user name and password. One of those should work. Once you can connect to your database with the GUI, you can then use PHP to call the mySQL database connect strings and manipulate your data as necessary. The DBD/DBI is a more generic solution that allows you to use a standard coding structure in PHP (or perl) and easily change databases underneath. For a small implementation, this isn't necessary. There are other database abstraction layers that perform the same function. Giff On Wed, 2009-12-23 at 20:46 +0530, Chaitanya Yanamadala wrote: why dont u install the xampp On Wed, Dec 23, 2009 at 8:38 PM, Adam Sonzogni asonzo...@setfocus.com wrote: Mr. Brookhouse, Thanks for the quick reply. I am guessing it is not relevant to my case because I am not using PERL. I cannot find anything that says PHP requires PERL so I suspect Iam ok in this regard. Thank You, Adam -Original Message- From: Edward Brookhouse [mailto:eb...@healthydirections.com] Sent: Wednesday, December 23, 2009 9:59 AM To: Adam Sonzogni; php-db@lists.php.net Subject: RE: Help for a beginner Just a guess, as I have not tried a full stack in windows, but in any unix if you are connecting php and mysql, you need something in the middle like DBD::mysql See if this helps: http://forums.mysql.com/read.php?51,189692,189856 -Original Message- From: Adam Sonzogni [mailto:asonzo...@setfocus.com] Sent: Wednesday, December 23, 2009 9:52 AM To: php-db@lists.php.net Subject: [PHP-DB] Help for a beginner Hi everyone, first thank you for ALL help and the understanding that I am new to PHP and MySQL. This is a long email and for that I apologize but I am trying to provide as much detail as possible. If this is the wrong list to ask for help, kindly direct me to the proper authority. I am trying to learn and I have built the following environment. Windows Server 2008 Standard 32bit service Pack 2 with IIS7 mysql-essential-5.1.41-win32 php-5.3.1-nts-Win32-VC9-x86.msi phpMyAdmin-3.2.4-english.zip I followed the steps as detailed below (I already had IIS7 and CGI installed) 1. Install CGI PHP http://www.trainsignaltraining.com/iis-7-install-fastcgi-php/2008-09-04/ 2. Install MySQL http://www.trainsignaltraining.com/install-mysql-on-iis7/2008-09-10/ 3. Install PHPMyAdmin http://www.trainsignaltraining.com/install-phpmyadmin-on-iis7-and-server-2008/2008-09-16/ After I completed the installations 1. If I navigate to the PHP directory and type php -info it spews a ton of data at me AND I created info.php which contains: ?php phpinfo
Re: [PHP-DB] RE: Help for a beginner
I apologize I do see that you tried using phpmyadmin and received the FastCGI error. This might help you : http://www.php.net/manual/en/install.windows.iis7.php . Let me know what happens after you try those steps.. I am hoping for the best.. On Wed, Dec 23, 2009 at 9:21 AM, Adam Sonzogni asonzo...@setfocus.comwrote: If you read the thread I useda php page totest mysql connectivity after phpmyadmin did not work… At this point I am willing to pay someone to troubleshoot this as I am baffled there is no definitive troubleshooting documentation for Windows installs. *From:* Barry Stear [mailto:bst...@gmail.com] *Sent:* Wednesday, December 23, 2009 12:04 PM *To:* Adam Sonzogni *Cc:* PHP DB Posts *Subject:* Re: [PHP-DB] RE: Help for a beginner Well I am not familiar with ASP. You might want to check to make sure that you didn't make any typos in your mysql_test.php page. I would suggest seeing if you can connect through phpMyAdmin. That might give you a better idea of where the problem lies. On Wed, Dec 23, 2009 at 8:31 AM, Adam Sonzogni asonzo...@setfocus.com wrote: Barry, Yes this is all installed ona single system. The code was in the original message % set conn=Server.CreateObject(ADODB.Connection) conn.ConnectionString=Driver={mySQL};Server=localhost;Database=test;User Id=root;Password=youwish conn.open Response.write(Connected) conn.close % So line 4 is: conn.open Thanks, Adam -Original Message- From: Barry Stear [mailto:bst...@gmail.com] Sent: Wednesday, December 23, 2009 11:28 AM To: PHP DB Posts Subject: Re: [PHP-DB] RE: Help for a beginner Adam, What is at Line 4 in your test.asp? The error you provided said that there was a problem where it could not find the default driver to use. Also when you get the connection failed you were trying to connect to MYSQL from the system running MYSQL correct? On Wed, Dec 23, 2009 at 7:50 AM, Adam Sonzogni asonzo...@setfocus.com wrote: Giff, Not sure what you mean, and I suspect this is because of my confusion around PMA (as mentioned originally) SO let me elaborate... In my config.inc.php I changed pma to root and the pma password to the root password for mysql When I browse to the phpmyadmin page I neter root and the root password for mysql Thanks, Adam -Original Message- From: Giff Hammar [mailto:gham...@sv-phoenix.com] Sent: Wednesday, December 23, 2009 10:41 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] RE: Help for a beginner It looks like you are not connecting because of a user name/password combination. Typically, Windows does not use root as a valid login as do most other operating systems. Try using your login information to see if you can connect to mySQL using the GUI. I suspect you'll succeed. The other option would be to use the mySQL admin user name and password. One of those should work. Once you can connect to your database with the GUI, you can then use PHP to call the mySQL database connect strings and manipulate your data as necessary. The DBD/DBI is a more generic solution that allows you to use a standard coding structure in PHP (or perl) and easily change databases underneath. For a small implementation, this isn't necessary. There are other database abstraction layers that perform the same function. Giff On Wed, 2009-12-23 at 20:46 +0530, Chaitanya Yanamadala wrote: why dont u install the xampp On Wed, Dec 23, 2009 at 8:38 PM, Adam Sonzogni asonzo...@setfocus.com wrote: Mr. Brookhouse, Thanks for the quick reply. I am guessing it is not relevant to my case because I am not using PERL. I cannot find anything that says PHP requires PERL so I suspect Iam ok in this regard. Thank You, Adam -Original Message- From: Edward Brookhouse [mailto:eb...@healthydirections.com] Sent: Wednesday, December 23, 2009 9:59 AM To: Adam Sonzogni; php-db@lists.php.net Subject: RE: Help for a beginner Just a guess, as I have not tried a full stack in windows, but in any unix if you are connecting php and mysql, you need something in the middle like DBD::mysql See if this helps: http://forums.mysql.com/read.php?51,189692,189856 -Original Message- From: Adam Sonzogni [mailto:asonzo...@setfocus.com] Sent: Wednesday, December 23, 2009 9:52 AM To: php-db@lists.php.net Subject: [PHP-DB] Help for a beginner Hi everyone, first thank you for ALL help and the understanding that I am new to PHP and MySQL. This is a long email and for that I apologize but I am trying to provide as much detail as possible. If this is the wrong list to ask for help, kindly direct me to the proper authority. I am trying to learn and I have built the following environment. Windows Server 2008 Standard 32bit
Re: [PHP-DB] RE: Help for a beginner
I am glad that it worked for you. I knew that there was information out there for configuring PHP under IIS. I just wasn't sure if it was on MYSQL or PHP's site. You can go ahead and make a check out to my name for the amount you were willing to pay to get this resolved.. Just email me privately for my address :-).. On Wed, Dec 23, 2009 at 11:24 AM, Adam Sonzogni asonzo...@setfocus.comwrote: Barry, You sir saved the day, the very last item on that page was the ticket, I disabled IPV6 but never thought to removed the localhost entry for ipv6 in hosts... That said I google'd dozens of times with a variety of keyword combinations all including iis7 and PHP, and not once did that page pop up :( The default installation of Windows Vista, Windows 7 and Windows Server 2008 adds a line to the Windows/System32/drivers/etc/hosts which causes network functions (database connect functions too, like mysql_connect) to timeout when connecting to localhost. To resolve this problem, remove the entry from the hosts file: ::1 localhost or connect using the IP address, 127.0.0.1 or another domain name. This behavior change is due to IPv6 being enabled by default in Vista or other recent Windows version. From: Barry Stear [mailto:bst...@gmail.com] Sent: Wednesday, December 23, 2009 1:54 PM To: Adam Sonzogni; PHP DB Posts Subject: Re: [PHP-DB] RE: Help for a beginner I apologize I do see that you tried using phpmyadmin and received the FastCGI error. This might help you : http://www.php.net/manual/en/install.windows.iis7.php . Let me know what happens after you try those steps.. I am hoping for the best.. On Wed, Dec 23, 2009 at 9:21 AM, Adam Sonzogni asonzo...@setfocus.com mailto:asonzo...@setfocus.com wrote: If you read the thread I useda php page totest mysql connectivity after phpmyadmin did not work... At this point I am willing to pay someone to troubleshoot this as I am baffled there is no definitive troubleshooting documentation for Windows installs. From: Barry Stear [mailto:bst...@gmail.commailto:bst...@gmail.com] Sent: Wednesday, December 23, 2009 12:04 PM To: Adam Sonzogni Cc: PHP DB Posts Subject: Re: [PHP-DB] RE: Help for a beginner Well I am not familiar with ASP. You might want to check to make sure that you didn't make any typos in your mysql_test.php page. I would suggest seeing if you can connect through phpMyAdmin. That might give you a better idea of where the problem lies. On Wed, Dec 23, 2009 at 8:31 AM, Adam Sonzogni asonzo...@setfocus.com mailto:asonzo...@setfocus.com wrote: Barry, Yes this is all installed ona single system. The code was in the original message % set conn=Server.CreateObject(ADODB.Connection) conn.ConnectionString=Driver={mySQL};Server=localhost;Database=test;User Id=root;Password=youwish conn.open Response.write(Connected) conn.close % So line 4 is: conn.open Thanks, Adam -Original Message- From: Barry Stear [mailto:bst...@gmail.commailto:bst...@gmail.com] Sent: Wednesday, December 23, 2009 11:28 AM To: PHP DB Posts Subject: Re: [PHP-DB] RE: Help for a beginner Adam, What is at Line 4 in your test.asp? The error you provided said that there was a problem where it could not find the default driver to use. Also when you get the connection failed you were trying to connect to MYSQL from the system running MYSQL correct? On Wed, Dec 23, 2009 at 7:50 AM, Adam Sonzogni asonzo...@setfocus.com mailto:asonzo...@setfocus.comwrote: Giff, Not sure what you mean, and I suspect this is because of my confusion around PMA (as mentioned originally) SO let me elaborate... In my config.inc.php I changed pma to root and the pma password to the root password for mysql When I browse to the phpmyadmin page I neter root and the root password for mysql Thanks, Adam -Original Message- From: Giff Hammar [mailto:gham...@sv-phoenix.commailto: gham...@sv-phoenix.com] Sent: Wednesday, December 23, 2009 10:41 AM To: php-db@lists.php.netmailto:php-db@lists.php.net Subject: Re: [PHP-DB] RE: Help for a beginner It looks like you are not connecting because of a user name/password combination. Typically, Windows does not use root as a valid login as do most other operating systems. Try using your login information to see if you can connect to mySQL using the GUI. I suspect you'll succeed. The other option would be to use the mySQL admin user name and password. One of those should work. Once you can connect to your database with the GUI, you can then use PHP to call the mySQL database connect strings and manipulate your data as necessary. The DBD/DBI is a more generic solution that allows you to use a standard coding structure in PHP (or perl) and easily change databases underneath. For a small implementation, this isn't necessary. There are other database abstraction layers that perform the same
Re: [PHP-DB] auto creation of email IDs
When the users register are you wanting to create a email account for them on your server or are you wanting to use a email address that they already have? It is possible to create a temporary email id but I am not sure how you would be able to tie this back to the person so they would actually receive replies back to this topic if you have no information for them and they are just creating a topic. The best thing would be to require them to register in order to post a topic. Thats my thoughts on it...
Re: [PHP-DB] Group by
Also you may not see a difference because your not even using 'History_field' anywhere in your SELECT statement. I am a little surprised that you didn't receive a error. On Wed, Dec 9, 2009 at 9:31 AM, Juan Pablo Ramirez ramirez.juanpa...@gmail.com wrote: Hi i recommend always use indexes when programming. developers tend not to.. and when the databases grows it's difficult to modify or make them modify the code. El mié, 09-12-2009 a las 14:22 -0300, Julio Araya escribió: On Wed, Dec 9, 2009 at 12:52 PM, Philip Thompson philthath...@gmail.com wrote: Hi. In a mysql query, it is recommended that GROUP BY fields be indexed? Using EXPLAIN on one of my queries, I noticed no change between having indexed by GROUP BY field and not indexing it. Any thoughts would be appreciated. In this example, should `history_field` be indexed...? SELECT MAX(`timestamp`) AS `max_ts` FROM `history` WHERE `req_id` = 17 AND `history_record_id` = 35 GROUP BY `history_field` always depends on how many records you have, if you have 100-1000 records is very diferent to 10-50 Thanks, ~Philip -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Julio Araya C.Linux User #386141 Memorista de Ingeniería Civil Informática Ubuntu User #14778 Universidd Técnica Federico Santa María Valparaíso - Chile -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- a href=http://www.c28.com/?adid=stiid=19467; img src=http://www.c28.com/images/banner_88x31.gif; border=0 width=88 height=31/a