Re: [PHP] PHP: User Authentication Script
Thank you for the reply Farianto. Exactly where in the httpd.conf file should I insert that line? If you could copy and paste the line *above* and *below* in the httpd.conf file that already exists so I know the location I would appreciate it. Thanks again. TR for example: # blahblah1 Load Module PHP4_Module c:/Apache/php/sapi/php4apache.dll // insert this line # blahblah2 .. - Original Message - From: Farianto Kurniawan [EMAIL PROTECTED] To: Anthony Ritter [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, August 26, 2002 10:36 PM Subject: Re: [PHP] PHP: User Authentication Script ...hello .. Mr.Anthony Ritter .. Actually I have faced the same problem with you but right now I can fix it . What you must do is : 1. Turn off your Apache Web Server 2. Edit your httpd.conf file from folder conf under Apache folder. 3. Please add this sentence -- LoadModule php4_module c:/Apache/php/sapi/php4apache.dll -- in it. (the important thing that php4apache.dll is in that directory , if itsn't change it to the right position. 4. Save it 5. Turn Your Apache Web Server on. I hope it can work know... Regards, Farianto.K PT.Yosibara Inti Corpora Phone: 62-21-5267645/46 Indonesia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: User Authentication Script
You can insert the line at the very end of your httpd.conf file... I'm sure you can find more info here... http://www.php.net/manual/en/install.windows.php - E Thank you for the reply Farianto. Exactly where in the httpd.conf file should I insert that line? If you could copy and paste the line *above* and *below* in the httpd.conf file that already exists so I know the location I would appreciate it. Thanks again. TR for example: # blahblah1 Load Module PHP4_Module c:/Apache/php/sapi/php4apache.dll // insert this line # blahblah2 .. - Original Message - From: Farianto Kurniawan [EMAIL PROTECTED] To: Anthony Ritter [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, August 26, 2002 10:36 PM Subject: Re: [PHP] PHP: User Authentication Script ...hello .. Mr.Anthony Ritter .. Actually I have faced the same problem with you but right now I can fix it . What you must do is : 1. Turn off your Apache Web Server 2. Edit your httpd.conf file from folder conf under Apache folder. 3. Please add this sentence -- LoadModule php4_module c:/Apache/php/sapi/php4apache.dll -- in it. (the important thing that php4apache.dll is in that directory , if itsn't change it to the right position. 4. Save it 5. Turn Your Apache Web Server on. I hope it can work know... Regards, Farianto.K PT.Yosibara Inti Corpora Phone: 62-21-5267645/46 Indonesia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ $B2q0wEPO?$OL5NA!&=<<B$7$?=PIJ%"%$%F%`$J$i(B MSN $B%*!<%/%7%g%s(B http://auction.msn.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP: User Authentication Script
Sounds like you've identified your problem. I have never installed a module but you can check out http://www.apache.org/ for some help installing modules on the Apache server. I believe it involves compiling the server, for Windows platforms I believe you need Visual C++ 6.0. If that is to technically demanding you can checkout several pre-packaged distributions of Apache, PHP, MySQL, Perl and the like, looking for one where PHP is installed as a Mod (don't personally know of any). For a fairly complete list of packages check out; http://www.hotscripts.com/PHP/Software_and_Servers/Installation_Kits/ Sooner, or later, you will probably reach a point where it will become more expedient for you to write your own authentication, which is what most application developers do. This has the advantage of allowing you to set up your application security independent of your server or database security. hope this helps, Warren Vail Tools, Metrics Quality Processes -Original Message- From: Anthony Ritter [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 8:02 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP: User Authentication Script In my phpinfo() I get: php version 4.0.0 Server_APICGI .. Is this why it is not working? If so, how does one install PHP as a module? Please advise. Thank you. TR ... Warren Vail wrote in message: http://www.php.net/manual/en/features.http-auth.php also mentions that http auth does not work when running php as a CGI, which may also give these symptoms. -- 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] PHP: User Authentication Script
Using Apache / Windows 98 / PHP / mySQL The following script is from Julie Meloni's book PHP Essentials (PrimaTech) on page 138. I've copied the script from her site and tried to run it and get the following: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. -- Apache/1.3.12 Server at localhost Port 80 --- The following is the script: ? if (!isset($PHP_AUTH_USER)) header('WWW-Authenticate: Basic realm=My Private Stuff'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else if (($PHP_AUTH_USER == jane) ($PHP_AUTH_PW == mypassword)) echo PYou have entered this username: $PHP_AUTH_USERbr; echo You have entered this password: $PHP_AUTH_PWbr; echo The authorization type is: $PHP_AUTH_TYPE./p; } else echo You are not authorized!; } } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP: User Authentication Script
What does your apache server log say? Warren Vail Tools, Metrics Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 -Original Message- From: Anthony Ritter [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 6:51 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP: User Authentication Script Using Apache / Windows 98 / PHP / mySQL The following script is from Julie Meloni's book PHP Essentials (PrimaTech) on page 138. I've copied the script from her site and tried to run it and get the following: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. -- Apache/1.3.12 Server at localhost Port 80 --- The following is the script: ? if (!isset($PHP_AUTH_USER)) header('WWW-Authenticate: Basic realm=My Private Stuff'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else if (($PHP_AUTH_USER == jane) ($PHP_AUTH_PW == mypassword)) echo PYou have entered this username: $PHP_AUTH_USERbr; echo You have entered this password: $PHP_AUTH_PWbr; echo The authorization type is: $PHP_AUTH_TYPE./p; } else echo You are not authorized!; } } ? -- 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] PHP: User Authentication Script
Thanks for the reply Warren. It says... [Mon Aug 26 20:46:13 2002] [error] [client 127.0.0.1] malformed header from script. Bad header=HTTP/1.0 401 Unauthorized: c:/php4/php.exe ... - Original Message - From: Vail, Warren [EMAIL PROTECTED] To: 'Anthony Ritter' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, August 26, 2002 7:49 PM Subject: RE: [PHP] PHP: User Authentication Script What does your apache server log say? Warren Vail Tools, Metrics Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 . -Original Message- From: Anthony Ritter [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 6:51 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP: User Authentication Script Using Apache / Windows 98 / PHP / mySQL The following script is from Julie Meloni's book PHP Essentials (PrimaTech) on page 138. I've copied the script from her site and tried to run it and get the following: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. -- Apache/1.3.12 Server at localhost Port 80 --- The following is the script: ? if (!isset($PHP_AUTH_USER)) header('WWW-Authenticate: Basic realm=My Private Stuff'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else if (($PHP_AUTH_USER == jane) ($PHP_AUTH_PW == mypassword)) echo PYou have entered this username: $PHP_AUTH_USERbr; echo You have entered this password: $PHP_AUTH_PWbr; echo The authorization type is: $PHP_AUTH_TYPE./p; } else echo You are not authorized!; } } ? Warren Vail [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... What does your apache server log say? Warren Vail Tools, Metrics Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 -Original Message- From: Anthony Ritter [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 6:51 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP: User Authentication Script Using Apache / Windows 98 / PHP / mySQL The following script is from Julie Meloni's book PHP Essentials (PrimaTech) on page 138. I've copied the script from her site and tried to run it and get the following: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. -- Apache/1.3.12 Server at localhost Port 80 --- The following is the script: ? if (!isset($PHP_AUTH_USER)) header('WWW-Authenticate: Basic realm=My Private Stuff'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else if (($PHP_AUTH_USER == jane) ($PHP_AUTH_PW == mypassword)) echo PYou have entered this username: $PHP_AUTH_USERbr; echo You have entered this password: $PHP_AUTH_PWbr; echo The authorization type is: $PHP_AUTH_TYPE./p; } else echo You are not authorized!; } } ? -- 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] PHP: User Authentication Script
Was this before supplying the password or after? I believe this log entry may be normal when authentication fails. I also believe the message you got on your browser means that the 401 error page is missing from your apache installation. http://www.php.net/manual/en/features.http-auth.php also mentions that http auth does not work when running php as a CGI, which may also give these symptoms. Warren Vail Tools, Metrics Quality Processes -Original Message- From: Anthony Ritter [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 7:27 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP: User Authentication Script Thanks for the reply Warren. It says... [Mon Aug 26 20:46:13 2002] [error] [client 127.0.0.1] malformed header from script. Bad header=HTTP/1.0 401 Unauthorized: c:/php4/php.exe ... - Original Message - From: Vail, Warren [EMAIL PROTECTED] To: 'Anthony Ritter' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, August 26, 2002 7:49 PM Subject: RE: [PHP] PHP: User Authentication Script What does your apache server log say? Warren Vail Tools, Metrics Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 . -Original Message- From: Anthony Ritter [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 6:51 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP: User Authentication Script Using Apache / Windows 98 / PHP / mySQL The following script is from Julie Meloni's book PHP Essentials (PrimaTech) on page 138. I've copied the script from her site and tried to run it and get the following: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. -- Apache/1.3.12 Server at localhost Port 80 --- The following is the script: ? if (!isset($PHP_AUTH_USER)) header('WWW-Authenticate: Basic realm=My Private Stuff'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else if (($PHP_AUTH_USER == jane) ($PHP_AUTH_PW == mypassword)) echo PYou have entered this username: $PHP_AUTH_USERbr; echo You have entered this password: $PHP_AUTH_PWbr; echo The authorization type is: $PHP_AUTH_TYPE./p; } else echo You are not authorized!; } } ? Warren Vail [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... What does your apache server log say? Warren Vail Tools, Metrics Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 -Original Message- From: Anthony Ritter [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 6:51 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP: User Authentication Script Using Apache / Windows 98 / PHP / mySQL The following script is from Julie Meloni's book PHP Essentials (PrimaTech) on page 138. I've copied the script from her site and tried to run it and get the following: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. -- Apache/1.3.12 Server at localhost Port 80 --- The following is the script: ? if (!isset($PHP_AUTH_USER)) header('WWW-Authenticate: Basic realm=My Private Stuff'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else if (($PHP_AUTH_USER == jane) ($PHP_AUTH_PW == mypassword)) echo PYou have entered this username: $PHP_AUTH_USERbr; echo You have entered this password: $PHP_AUTH_PWbr; echo The authorization type is: $PHP_AUTH_TYPE./p; } else echo You are not authorized!; } } ? -- 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] PHP: User Authentication Script
In my phpinfo() I get: php version 4.0.0 Server_APICGI .. Is this why it is not working? If so, how does one install PHP as a module? Please advise. Thank you. TR ... Warren Vail wrote in message: http://www.php.net/manual/en/features.http-auth.php also mentions that http auth does not work when running php as a CGI, which may also give these symptoms. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: User Authentication Script
...hello .. Mr.Anthony Ritter .. Actually I have faced the same problem with you but right now I can fix it . What you must do is : 1. Turn off your Apache Web Server 2. Edit your httpd.conf file from folder conf under Apache folder. 3. Please add this sentence -- LoadModule php4_module c:/Apache/php/sapi/php4apache.dll -- in it. (the important thing that php4apache.dll is in that directory , if itsn't change it to the right position. 4. Save it 5. Turn Your Apache Web Server on. I hope it can work know... Regards, Farianto.K PT.Yosibara Inti Corpora Phone: 62-21-5267645/46 Indonesia - Original Message - From: Anthony Ritter [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 27, 2002 10:01 AM Subject: Re: [PHP] PHP: User Authentication Script In my phpinfo() I get: php version 4.0.0 Server_APICGI .. Is this why it is not working? If so, how does one install PHP as a module? Please advise. Thank you. TR ... Warren Vail wrote in message: http://www.php.net/manual/en/features.http-auth.php also mentions that http auth does not work when running php as a CGI, which may also give these symptoms. -- 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