RE: [PHP-WIN] How to Show my Own Error Message Instead of Mysql Error?

2002-06-20 Thread Ross Fleming
One additional point to clarify: the @ sign in front of the mysql_query _suppresses any error/warning that may be generated by PHP. It can be useful on many occasions in PHP (the example that usually springs to my mind it opening files, to ensure that a warning is not displayed if the file couldn

RE: [PHP-WIN] crypt() on windows

2002-06-20 Thread Christian Leberfinger
I know about this solution, but I'm not very happy with it. The idea of my script is, that it's one single script-file. This makes it easy to install and to handle for the users. I hope, you understand me... Christian Leberfinger PS: I think, Apache didn't recognize your .htaccess-file, becau

RE: [PHP-WIN] How to Show my Own Error Message Instead of Mysql Error?

2002-06-20 Thread Christian Leberfinger
Here is a simple solution. if (!($SQLresult = @mysql_query($SQLquery, $DBresource))) { echo "Errormessage..."; } //endif Of course you could also check the Errortype [mysql_errno()] to be sure, whether it is a duplicate-key-errror. The cleanest solution is to use an ID-key, such as:

[PHP-WIN] RE: [PHP] How to Show my Own Error Message Instead of Mysql Error?

2002-06-20 Thread Martin Towell
what about doing a "select count(*) from table where username = 'foobar'" then, if ($cnt > 0) { /* display error */ } else { /* insert new username */ } -Original Message- From: Jack [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 2:07 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [

php-windows Digest 21 Jun 2002 04:07:23 -0000 Issue 1203

2002-06-20 Thread php-windows-digest-help
php-windows Digest 21 Jun 2002 04:07:23 - Issue 1203 Topics (messages 14317 through 14323): Re: Eh?? RE: [PHP-WIN] Guidelines for installing PHP on Apache Win32 - comments please 14317 by: Ross Fleming 14318 by: Ross Fleming crypt() on windows 14319 by: Christian

[PHP-WIN] How to Show my Own Error Message Instead of Mysql Error?

2002-06-20 Thread Jack
Dear all i made a Registration Form for user to input their Data, but i also had some Field Check before the data can be insert to the Mysql_Database! I had a question here, sometime the mysql shows the error : "Duplicate Key for xxx" I know what is this about, reguarding to my Registration Form,

Re: [PHP-WIN] crypt() on windows

2002-06-20 Thread Ben Davis
I actually remember reading a tutorial on using the htpasswd.exe that comes with apache to emulate its *nix twin. It is supposed to let you create htpasswd files on Windows and it works well. I got it to work and encrypt strings, but for some reason, I could never get Apache to recognize the .ht

RE: [PHP-WIN] crypt() on windows

2002-06-20 Thread Dash McElroy
Doesn't Apache come with a version of htpasswd.exe that might be possible for you to exec() (or other applicable function)? I haven't tried this at all, so I may be speaking out of . -Dash -Original Message- From: Christian Leberfinger [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20

RE: [PHP-WIN] crypt() on windows

2002-06-20 Thread Christian Leberfinger
Crypt() is supported by windows systems, but it uses other encryption mechanisms than crypt() on unix-systems...that means it returns other encrypted strings. So when Apache compares the crypt()ed string with the one stored in the .htpasswd, it fails and you can't gain access... Is there no way

[PHP-WIN] crypt() on windows

2002-06-20 Thread Christian Leberfinger
Does anyone have a solution for crypt()-support on windows-based webserver-systems? I'm the developer of PHPAccess - the admin tool for htaccess-security on Apache-servers and I don't get it to create a crypted password that is recognized by Apache's htaccess. Help! Christian Leberfinger [htt