php-windows Digest 30 Aug 2002 16:20:23 -0000 Issue 1315
Topics (messages 15595 through 15605): Re: .htaccess protection / php 15595 by: Christian Leberfinger MSSQL trouble: ansi_nulls? 15596 by: Matt Kynaston 15600 by: Matt Kynaston Re: PHP / MySQL Guestbook 15597 by: George Nicolae 15598 by: George Nicolae PRINTER LIST 15599 by: Luis Moreira Best environment for PHP on Windows 15601 by: Benjamin Walling 15603 by: Pozzer Franco Trouble with "printer_list" 15602 by: Luis Moreira 15604 by: Rich Gray 15605 by: Rich Gray Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
--- Begin Message ---> i am using the php " md5( ) " function to encrypt > the password. so, when i want to access to the new > user "index.php" the password pop-up window appears > and i type in the username and password, but i can´t > access the user file. Hi, I also wrote a script creating .htaccess-files and I think I might know this problem. What kind of server do you use ? ( Especially the operation system matters - because windows uses another method of crypting data. ) If you want to copy something from my script - here's the URL: http://www.krizleebear.de/phpaccess/dynamisch/ [ by the way: I used the crypt()-method and implement a special-mechanism for windows by using Apache's htpasswd.exe - that's really the only possible way I found ... ] Chris--- End Message ---
--- Begin Message ---Hi there, I tried posting this to the newsgroup yesterday, but it doesn't look like it worked - sorry if it shows up twice. I'm running PHP 4.2.2 under Win2K/IIS and trying to run a stored proc in MSSQL2000 (SP2) on the same server. Exactly the same script works fine from Linux/Apache using FreeTDS, but won't work from the Win2K. I can connect (verified from Profiler), but the mssql_query() returns the following error: Warning: MS SQL message: Cannot insert the value NULL into column 'height', table 'tempdb.dbo.#LimitTable_____________________________________________________ ____________________________________________________000100000014'; column does not allow nulls. INSERT fails. (severity 16) in e:\Inetpub\wwwroot\canaryislands-golf.com\common\classes\etbsqltemplate.inc on line 42. The same stored proc runs fine from Query Analyser. I've noticed a couple of strange things using Profiler. When the Linux box connects (or Query Analyser), it issues the following statements: -- network protocol: TCP/IP set quoted_identifier on set implicit_transactions off set cursor_close_on_commit off set ansi_warnings on set ansi_padding on set ansi_nulls on set concat_null_yields_null on set language us_english set dateformat mdy set datefirst 7 The PHP connection differs, and I think that's what's causing the problems: -- network protocol: TCP/IP set quoted_identifier off set implicit_transactions off set cursor_close_on_commit off set ansi_warnings off set ansi_padding off set ansi_nulls off set concat_null_yields_null off set language us_english set dateformat mdy set datefirst 7 Does anyone know how to change the ansi_* and concat_null_yields_null set statements that are issued when PHP connects? Or am I on the wrong track? Regards, Matt--- End Message ---
--- Begin Message ---OK, to answer my own question... The ansi_* settings were to blame for the sp failing. In Enterprise Manager I went into the Server Properties (Properties > Connections) and made sure 'ANSI null defined on' was checked and the problem has cleared up. Still mystified, though: why do connections from Query Analyser and FreeTDS set these things up properly, and connections from Win PHP not? And is there a way to change the connection setting from within PHP? Matt > -----Original Message----- > From: Matt Kynaston [mailto:[EMAIL PROTECTED]] > Sent: 30 August 2002 10:31 > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] MSSQL trouble: ansi_nulls? > > > Hi there, > > I tried posting this to the newsgroup yesterday, but it > doesn't look like it > worked - sorry if it shows up twice. > > I'm running PHP 4.2.2 under Win2K/IIS and trying to run a > stored proc in > MSSQL2000 (SP2) on the same server. > > Exactly the same script works fine from Linux/Apache using > FreeTDS, but > won't work from the Win2K. > > I can connect (verified from Profiler), but the mssql_query() > returns the > following error: > Warning: MS SQL message: Cannot insert the value NULL into > column 'height', > table > 'tempdb.dbo.#LimitTable_______________________________________ > ______________ > ____________________________________________________0001000000 > 14'; column > does not allow nulls. INSERT fails. (severity 16) in > e:\Inetpub\wwwroot\canaryislands-golf.com\common\classes\etbsq > ltemplate.inc > on line 42. > > The same stored proc runs fine from Query Analyser. I've > noticed a couple of > strange things using Profiler. When the Linux box connects (or Query > Analyser), it issues the following statements: > > -- network protocol: TCP/IP > set quoted_identifier on > set implicit_transactions off > set cursor_close_on_commit off > set ansi_warnings on > set ansi_padding on > set ansi_nulls on > set concat_null_yields_null on > set language us_english > set dateformat mdy > set datefirst 7 > > The PHP connection differs, and I think that's what's causing > the problems: > > -- network protocol: TCP/IP > set quoted_identifier off > set implicit_transactions off > set cursor_close_on_commit off > set ansi_warnings off > set ansi_padding off > set ansi_nulls off > set concat_null_yields_null off > set language us_english > set dateformat mdy > set datefirst 7 > > Does anyone know how to change the ansi_* and > concat_null_yields_null set > statements that are issued when PHP connects? Or am I on the > wrong track? > > Regards, > > Matt >--- End Message ---
--- Begin Message ---Befor insert the message into db try $message=nl2br ($message); Pls tell me if it works. -- Best regards, George Nicolae IT Manager ___________________ PaginiWeb.com - Professional Web Design www.PaginiWeb.com "Andreas Esser" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > hi, > > i have written a php guestbook using a mysql database to store and recall > the entries that where typed in by the visitor. > > there is a formular with several fields like "name", "email" and "message". > > here´s the problem: > > the visitor types some message into the message field, i.e.: > > " hello, > > how are you today? > > yours michael " > > the typed message should now be written into the database and when the > visitor click on the button "see all entries" the message should be > displayed exactly the same than typed in. > > it works, except the wordwrap. i´ve edited my <form> - tag and added the > expression " wrap=physical ". but this doesn´t work. > > how can i manage that the wordwrap information is displayed correctly in my > database request?? > > > i hope that some of you guys can help me with this > > > greetz > > andreas > > > >--- End Message ---
--- Begin Message ---Or... after you make the query echo nl2br(myrow["message"]); I recommend the first solution...(it's more faster) -- Best regards, George Nicolae IT Manager ___________________ PaginiWeb.com - Professional Web Design www.PaginiWeb.com "Andreas Esser" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > hi, > > i have written a php guestbook using a mysql database to store and recall > the entries that where typed in by the visitor. > > there is a formular with several fields like "name", "email" and "message". > > here´s the problem: > > the visitor types some message into the message field, i.e.: > > " hello, > > how are you today? > > yours michael " > > the typed message should now be written into the database and when the > visitor click on the button "see all entries" the message should be > displayed exactly the same than typed in. > > it works, except the wordwrap. i´ve edited my <form> - tag and added the > expression " wrap=physical ". but this doesn´t work. > > how can i manage that the wordwrap information is displayed correctly in my > database request?? > > > i hope that some of you guys can help me with this > > > greetz > > andreas > > > >--- End Message ---
--- Begin Message ------ End Message ---
HiI just entered this list, and would like to ask this :When trying to use the array PRINTER_LIST, I keep getting "undefined function".Does "c:\winnt\php.ini" need to be changed ?Un-commenting he line with "extension=php_printer.dll" gives a different error...ThanksLuis Moreira
O ingrato esquece-se de mil refeições, mas queixa-se de uma que faltou (Provérbio Chinês)
Intranet : http://MoreiraNet
Internet : http://moreiranet.no.sapo.pt
--- Begin Message ---We have a website currently running ASP/IIS/Win2k. It has some problems that get it locked up on a semi regular basis, requiring a reboot or killing of dllhost.exe. I've started porting some of the code to PHP to see if this is a viable alternative. So far, I've been running it on IIS/Win2k as an ISAPI filter. I've found the performance to be subpar running against the same database backend server (MSSQL) as the ASP code. I downloaded a copy of apache, although I've not installed or tested it. I'll grant that the ASP code and the PHP code are running on separate machines, although they have the same hardware configuration (the PHP machine even has a lighter load because I am the only one using it - there are 20-30 people on the ASP machine all day long). What is the optimal configuration for running PHP under Windows? IIS/ISAPI? Apache/CGI? Apache/mod_php? If I'm going to give this a fair run, I'd like to do it under the optimal conditions for PHP. There does not seem to be sufficient support for accessing MSSQL under linux. I've tried freetds, but it doesn't have full support - running stored procedures with mssql_init() mssql_bind() mssql_execute() won't work. We can't get away from MSSQL - our accounting system runs on it, and that's not going to change.--- End Message ---
--- Begin Message ---Apache/CGI. Benjamin Walling wrote: > We have a website currently running ASP/IIS/Win2k. It has some problems > that get it locked up on a semi regular basis, requiring a reboot or killing > of dllhost.exe. > > I've started porting some of the code to PHP to see if this is a viable > alternative. So far, I've been running it on IIS/Win2k as an ISAPI filter. > I've found the performance to be subpar running against the same database > backend server (MSSQL) as the ASP code. I downloaded a copy of apache, > although I've not installed or tested it. I'll grant that the ASP code and > the PHP code are running on separate machines, although they have the same > hardware configuration (the PHP machine even has a lighter load because I am > the only one using it - there are 20-30 people on the ASP machine all day > long). > > What is the optimal configuration for running PHP under Windows? IIS/ISAPI? > Apache/CGI? Apache/mod_php? If I'm going to give this a fair run, I'd like > to do it under the optimal conditions for PHP. > > There does not seem to be sufficient support for accessing MSSQL under > linux. I've tried freetds, but it doesn't have full support - running > stored procedures with mssql_init() mssql_bind() mssql_execute() won't work. > We can't get away from MSSQL - our accounting system runs on it, and that's > not going to change. > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ------ End Message ---
HiI just entered this list, and would like to ask this :When trying to use the array PRINTER_LIST, I keep getting "undefined function".Does "c:\winnt\php.ini" need to be changed ?Un-commenting he line with "extension=php_printer.dll" gives a different error...Thanks
--- Begin Message ---hi Luis Can you post the code you used.... e.g. printer_list(PRINTER_ENUM_LOCAL); What was the different error message you received when you uncommented the extension=... What OS are you running? XP? FYI There is an open bug for php v4.2.1/XP for this function #18408 Rich -----Original Message----- From: Luis Moreira [mailto:[EMAIL PROTECTED]] Sent: 30 August 2002 14:49 To: [EMAIL PROTECTED] Subject: [PHP-WIN] Trouble with "printer_list" Hi I just entered this list, and would like to ask this : When trying to use the array PRINTER_LIST, I keep getting "undefined function". Does "c:\winnt\php.ini" need to be changed ? Un-commenting he line with "extension=php_printer.dll" gives a different error... Thanks--- End Message ---
--- Begin Message ---Luis Is there a php_printer.dll in the extensions subdirectory to your PHP installation? Some zipfile distributions of PHP omitted this library... If no then try downloading the latest zip and installing the missing .dll and re-enabling the extension in your php.ini file or use dl() to load it. Cheers Rich -----Original Message----- From: Luis Moreira [mailto:[EMAIL PROTECTED]] Sent: 30 August 2002 16:41 To: Rich Gray Subject: Re: [PHP-WIN] Trouble with "printer_list" Hi Rich Using just this <?php var_dump( printer_list(PRINTER_ENUM_LOCAL | PRINTER_ENUM_SHARED) ); ?> I get "Fatal error: Call to undefined function: printer_list() in c:\myweb\printers.php on line 3" Taking out the comment in "extension=php_printer.dll" I get "Unable to load dynamic library '.php_printer.dll' - The specified module could not be found As to the OS, I am running Windows 2000 Thanks ----- Original Message ----- From: "Rich Gray" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 30, 2002 3:48 PM Subject: RE: [PHP-WIN] Trouble with "printer_list" > hi Luis > > Can you post the code you used.... e.g. printer_list(PRINTER_ENUM_LOCAL); > What was the different error message you received when you uncommented the > extension=... > What OS are you running? XP? FYI There is an open bug for php v4.2.1/XP for > this function #18408 > > Rich > -----Original Message----- > From: Luis Moreira [mailto:[EMAIL PROTECTED]] > Sent: 30 August 2002 14:49 > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Trouble with "printer_list" > > > Hi > > I just entered this list, and would like to ask this : > > When trying to use the array PRINTER_LIST, I keep getting "undefined > function". > > Does "c:\winnt\php.ini" need to be changed ? > Un-commenting he line with "extension=php_printer.dll" gives a different > error... > > Thanks > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >--- End Message ---