RE: [PHP] Can't Get PHP to work
Morning, Check the extension path in the php.ini file in your c:\winnt directory. I can remember that I had to change that when setting up php5 because the directory was c:\php\extension and the path in the php.ini was c:\php\ext. hth C. -Original Message- From: Subscriber [mailto:[EMAIL PROTECTED] Sent: 30 May 2005 00:30 To: php-general@lists.php.net Subject: [PHP] Can't Get PHP to work Hi, I sure hope someone here can help me. I spent the entire day yesterday and most of the evening setting up a webserver on my Windows 2000 Pro system. I've got PHP 5.04, MySQL 4.1.12, ActivePerl 5.8.6, Java Runtime Environment, Tomcat 5.5.9, ZendOptimizer 2.5.10, MyODBC 3.5.11 and phpMyAdmin 2.6.2 all installed. From what I can tell, all is working well except PHP and phpMyAdmin. I added PHP to my path like this: C:\Perl\bin\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C: \php;C:\Apache2\bin;C:\mysql\bin;C:\php\dlls;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\Zone Labs\ZoneAlarm\MailFrontier I've got a copy of php.ini in both my c:/php directory and in c://winnt. I've listed my user directory as c:/apache/apache2/htdocs and I've placed phpmyadmin in htdocs. But when I try to view a php page I get an error or page cannot be displayed. On a couple of occassions I viewed the raw php data in my browser. Also, when I try to add a php extension using LoadModule in my httd.conf file I get an error loading Apache telling me that the file cannot be found (but I've verified it exists - like php5apache.dll and php5ts.dll). Can someone please help me figure out where I'm screwing up at? Thanks in advance! Edited to say I'm getting Closer!!! Now when I go to [url=http://localhost/phpmyadmin]http://localhost/phpmyadmin[/url] I get the following info: cannot load mysqli extension; please check PHP configuration [u]Documentation[/u] And the documentation says: [b][1.20] I receive the error cannot load MySQL extension, please check PHP Configuration. [/b]To connect to a MySQL server, PHP needs a set of MySQL functions called MySQL extension. This extension may be part of the PHP distribution (compiled-in), otherwise it needs to be loaded dynamically. Its name is probably mysql.so or php_mysql.dll. phpMyAdmin tried to load the extension but failed. Usually, the problem is solved by installing a software package called PHP-MySQL or something similar. I have tried using both mysql and mysqli in config.inc.php (phpmyadmin config file) and either way I get the same error message. And in php.ini I have enabled the following extensions: extension=php_mysql.dll extension=php_mysqli.dll This message has been delivered to the Internet by the Revenue Internet e-mail service * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't get upload to work and I wonder...
On Wednesday 05 March 2003 13:37, Hugh Danaher wrote: Help, I've moved my upload script from one host to another, and what worked once, isn't working now. In the new site's phpinfo file I see that file_uploads is set to no value and in the old it was on. What do I tell my system administrator to do to get this feature enabled? Thanks for any help. php.ini file_uploads = On -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* We'll try to cooperate fully with the IRS, because, as citizens, we feel a strong patriotic duty not to go to jail. -- Dave Barry */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't get upload to work and I wonder...
Thanks Jason, Sounds simple. I'll let the SA know what I want and see if I get it. Hugh - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 10:19 PM Subject: Re: [PHP] Can't get upload to work and I wonder... On Wednesday 05 March 2003 13:37, Hugh Danaher wrote: Help, I've moved my upload script from one host to another, and what worked once, isn't working now. In the new site's phpinfo file I see that file_uploads is set to no value and in the old it was on. What do I tell my system administrator to do to get this feature enabled? Thanks for any help. php.ini file_uploads = On -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* We'll try to cooperate fully with the IRS, because, as citizens, we feel a strong patriotic duty not to go to jail. -- Dave Barry */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] can't get it to work
Have you tried BETWEEN $query = SELECT * FROM table where date BETWEEN '$month_1/$day_1/$year_1' AND '$month_2/$day_2/$year_2'; Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: Alex [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 12:19 PM To: [EMAIL PROTECTED] Subject: [PHP] can't get it to work I'm trying to write code that will return all records found between certain dates(e.g. 2001-01-30 through 2002-01-30). I created a html form with pull down menus for both dates but when I try to run it I get a parse error and can't figure out what's wrong. Thanks, Alex Here is the php code: $month_1 = addslashes($date_month_1); $day_1 = addslashes($date_day_1); $year_1 = addslashes($date_year_1); $month_2 = addslashes($date_month_2); $day_2 = addslashes($date_day_2); $year_2 = addslashes($date_year_2); $query = SELECT * FROM table where date = '$month_1/$day_1/$year_1' AND date = '$month_2/$day_2/$year_2'; $result = mysql_query($query); $num_results = mysql_num_rows($result); echo pNumber of records found: .$num_results./p; for ($i=0; $i $num_results; $i++) { $row = mysql_fetch_array($result); echo pstrong.($i+1).. ID: ; echo stripslashes($row[id]); echo /strongbrFirst name: ; echo stripslashes($row[fname]); echo brLast name: ; echo stripslashes($row[lname]); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can't get it to work
On Wed, 3 Apr 2002, Alex wrote: I'm trying to write code that will return all records found between certain dates(e.g. 2001-01-30 through 2002-01-30). I created a html form with pull down menus for both dates but when I try to run it I get a parse error and can't figure out what's wrong. It should tell you on which line the parse error occurred. That's generally a helpful piece of information. If the parse error is at the end of the file, you probably have an unclosed quote or brace. $query = SELECT * FROM table where date = '$month_1/$day_1/$year_1' AND date = '$month_2/$day_2/$year_2'; Does MySQL understand dates in that weird order? I would imagine they have to be in ascending or descending order of unit size (year-month-day or day-month-year). miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can't get it to work
On Wed, 3 Apr 2002, Alex wrote: I'm trying to write code that will return all records found between certain dates(e.g. 2001-01-30 through 2002-01-30). I created a html form with pull down menus for both dates but when I try to run it I get a parse error and can't figure out what's wrong. $query = SELECT * FROM table where date = '$month_1/$day_1/$year_1' AND date = '$month_2/$day_2/$year_2'; By the way, here's your parse error. You need to quote strings. $query = SELECT ... ; miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] can't get it to work
Of course that's a mysql parse error!! Mysql dates are -MM-DD. Do NOT use slashes $query = SELECT * FROM table where date = \$year_1-$month_1-$day_1/$year_1\ AND date = \$year_2-$month_2-$day_2\; Read the mysql manual concerning dates, formats, functions -Original Message- From: Alex [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 12:19 PM To: [EMAIL PROTECTED] Subject: [PHP] can't get it to work I'm trying to write code that will return all records found between certain dates(e.g. 2001-01-30 through 2002-01-30). I created a html form with pull down menus for both dates but when I try to run it I get a parse error and can't figure out what's wrong. Thanks, Alex Here is the php code: $month_1 = addslashes($date_month_1); $day_1 = addslashes($date_day_1); $year_1 = addslashes($date_year_1); $month_2 = addslashes($date_month_2); $day_2 = addslashes($date_day_2); $year_2 = addslashes($date_year_2); $query = SELECT * FROM table where date = '$month_1/$day_1/$year_1' AND date = '$month_2/$day_2/$year_2'; $result = mysql_query($query); $num_results = mysql_num_rows($result); echo pNumber of records found: .$num_results./p; for ($i=0; $i $num_results; $i++) { $row = mysql_fetch_array($result); echo pstrong.($i+1).. ID: ; echo stripslashes($row[id]); echo /strongbrFirst name: ; echo stripslashes($row[fname]); echo brLast name: ; echo stripslashes($row[lname]); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] can't get it to work
Need one more quote (se below) Of course that's a mysql parse error!! Mysql dates are -MM-DD. Do NOT use slashes $query = SELECT * FROM table where date = \$year_1-$month_1-$day_1/$year_1\ AND date = \$year_2-$month_2-$day_2\; Read the mysql manual concerning dates, formats, functions -Original Message- From: Alex [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 12:19 PM To: [EMAIL PROTECTED] Subject: [PHP] can't get it to work I'm trying to write code that will return all records found between certain dates(e.g. 2001-01-30 through 2002-01-30). I created a html form with pull down menus for both dates but when I try to run it I get a parse error and can't figure out what's wrong. Thanks, Alex Here is the php code: $month_1 = addslashes($date_month_1); $day_1 = addslashes($date_day_1); $year_1 = addslashes($date_year_1); $month_2 = addslashes($date_month_2); $day_2 = addslashes($date_day_2); $year_2 = addslashes($date_year_2); $query = SELECT * FROM table where date = '$month_1/$day_1/$year_1' AND date = '$month_2/$day_2/$year_2'; $result = mysql_query($query); $num_results = mysql_num_rows($result); echo pNumber of records found: .$num_results./p; for ($i=0; $i $num_results; $i++) { $row = mysql_fetch_array($result); echo pstrong.($i+1).. ID: ; echo stripslashes($row[id]); echo /strongbrFirst name: ; echo stripslashes($row[fname]); echo brLast name: ; echo stripslashes($row[lname]); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can't get it to work
That did the trick. Thank you Miguel Cruz [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Wed, 3 Apr 2002, Alex wrote: I'm trying to write code that will return all records found between certain dates(e.g. 2001-01-30 through 2002-01-30). I created a html form with pull down menus for both dates but when I try to run it I get a parse error and can't figure out what's wrong. $query = SELECT * FROM table where date = '$month_1/$day_1/$year_1' AND date = '$month_2/$day_2/$year_2'; By the way, here's your parse error. You need to quote strings. $query = SELECT ... ; miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] can't get it to work
Why not SELECT WHERE date_field$max_date and date_field$min_date ? A very god advice for everyone of you who tries to implement PHP for the where selects: You can VERY OFTEN leave this job to the DB itself. SQL don't only have SELECT, UPDATE etc... they all have lots of functions for the data comparisons and output formatting. Take some time reading the manuals and you will discover a whole new world on the RDBMS use. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Alex [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 8:19 PM To: [EMAIL PROTECTED] Subject: [PHP] can't get it to work I'm trying to write code that will return all records found between certain dates(e.g. 2001-01-30 through 2002-01-30). I created a html form with pull down menus for both dates but when I try to run it I get a parse error and can't figure out what's wrong. Thanks, Alex Here is the php code: $month_1 = addslashes($date_month_1); $day_1 = addslashes($date_day_1); $year_1 = addslashes($date_year_1); $month_2 = addslashes($date_month_2); $day_2 = addslashes($date_day_2); $year_2 = addslashes($date_year_2); $query = SELECT * FROM table where date = '$month_1/$day_1/$year_1' AND date = '$month_2/$day_2/$year_2'; $result = mysql_query($query); $num_results = mysql_num_rows($result); echo pNumber of records found: .$num_results./p; for ($i=0; $i $num_results; $i++) { $row = mysql_fetch_array($result); echo pstrong.($i+1).. ID: ; echo stripslashes($row[id]); echo /strongbrFirst name: ; echo stripslashes($row[fname]); echo brLast name: ; echo stripslashes($row[lname]); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php