php-windows Digest 19 Jul 2001 02:10:06 -0000 Issue 658 Topics (messages 8374 through 8384): IIS4 doesn't start - Event Error 14 8374 by: t.stocker.freytelecom.ch 8377 by: Phil Driscoll Re: mysql_fetch_array 8375 by: Paul Smith 8378 by: Andrew.Martin Re: Printing text on a printer in PHP4 Using PRINTER function 8376 by: Frank M. Kromann Send array from php to dll make in vb 6 8379 by: Luiz Fernando \(Tuca\) newbie question: stripslashes vs. changing the php.ini file 8380 by: Matt Cahill Using cpdf 8381 by: Steen Rabøl Yeah, you are right 8382 by: tttk Password Protection 8383 by: Nintendoodle 8384 by: Julie Meloni 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] ----------------------------------------------------------------------
Hi there We have a strange problem. On an WinNT Box (SP6a, all hotfixes) I get this error: The HTTP Filter DLL C:\WINNT\php4isapi.dll failed to load. The data is the error. (NT Event 14) 0000: 7e 00 00 00 I copied the dll into the %systemdir%, now the IIS starts at least. But every time with the error above. But, the php4isapi.dll is not needed by any of the webs running on the server. I configured it once running as ISAPI, but I removed this config. I installed PHP 4.06 (using the installer, overwriting the old installation). Do I need to reinstall the PHP Interpreter? How can I uninstall the whole php? there is no entry in 'installed software' ... simply delete c:\php, and kill the MIME mappings? Any help would be appreciated TIA an nervous junior - admin Tom ........................................ FREY + CIE TELECOM NWS Thomas Stocker Netzwerktechniker / Webmaster Hirschmattstrasse 32 CH - 6003 Luzern Switzerland phone : ++41 (0)41 228 28 82 direct : ++41 (0)41 228 29 70 fax : ++41 (0)41 228 29 85 [EMAIL PROTECTED] URL: http://www.freytelecom.ch ........................................
On Wednesday 18 July 2001 15:21, [EMAIL PROTECTED] wrote: > Hi there > > We have a strange problem. On an WinNT Box (SP6a, all hotfixes) > I get this error: > > The HTTP Filter DLL C:\WINNT\php4isapi.dll failed to load. > The data is the error. (NT Event 14) Are you sure you removed php4isapi.dll from the list of isapi filters? Cheers -- Phil Driscoll
So you have all these values stored in $variable_row[id], right? Assuming that's what you're saying, do this: for ($i=0; $i<count($variable_row); $i++) { $temp="variable_".$i; $$temp=$variable_row[$i]; } Now you will have $variable_1, $variable_2 and so forth. I hope I got what you were trying to do. Lemme know if that works. "Andrew.Martin" wrote: > > I'm using this function to check the value of specific fileds per row in the > database. > such as.... > $query = "SELECT * FROM $dbn WHERE status = 4"; > $result = mysql_query($query) or die("failed to connect to DB"); > > while ($row = mysql_fetch_array ($result)) { > print "row id = $row[id]"; > print "decription in row = $row[description]"; > } > > this works fine, it checks the DB for values with status = 4 and prints row > id and row description > > My problem occurs when I want to creat variables based on these results. > > I would ideally like to create dynamic variables based on row_id number e.g. > > variable_row[id] = $row[description] > > so later in the dynamically created page I could enter $variable_1 (1 being > the row[id] value) and the correct value would be selected. Is there anyway > of doing this? I tried using $$variable etc but no luck. > > Any ideas appriciated. > Andrew -- Paul Smith [EMAIL PROTECTED] http://www.dostuff.net
Thats it, I used the array solution which means I can directly call the specific variable outside the while loop. thanks again. Andrew -----Original Message----- From: Michael Rudel [mailto:[EMAIL PROTECTED]] Sent: 18 July 2001 16:15 To: 'Andrew.Martin' Subject: RE: [PHP-WIN] mysql_fetch_array Hi Martin. ... why don't you use an array ?? $variable_row[$row['id']] = $row['description']; So you can access it with: $variable_row[1] // and it gives you the description. OR (to answer you question =8) try this one: $varname = "variable_row".$row['id']; $$varname = $row['description']; Now you can access the vars as you described before. Hope this helps. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 _______________________________________________________________ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de _______________________________________________________________ > -----Original Message----- > From: Andrew.Martin [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 18, 2001 4:02 PM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] mysql_fetch_array > > > I'm using this function to check the value of specific fileds > per row in the > database. > such as.... > $query = "SELECT * FROM $dbn WHERE status = 4"; > $result = mysql_query($query) or die("failed to connect to DB"); > > while ($row = mysql_fetch_array ($result)) { > print "row id = $row[id]"; > print "decription in row = $row[description]"; > } > > this works fine, it checks the DB for values with status = 4 > and prints row > id and row description > > My problem occurs when I want to creat variables based on > these results. > > I would ideally like to create dynamic variables based on > row_id number e.g. > > variable_row[id] = $row[description] > > so later in the dynamically created page I could enter > $variable_1 (1 being > the row[id] value) and the correct value would be selected. > Is there anyway > of doing this? I tried using $$variable etc but no luck. > > Any ideas appriciated. > Andrew > > >
Hi, The php_printer.dll can only be used to print on a printer attached to the server (or a network printer known by the server). Remember that PHP is a server based scripting language. The content you are sending to the client (HTML documents) are handled by the client alone. If your client is a browser you have to use the prowsers priinting functions. For security resons these functions can not be accessed from the server. Could you imaging your local printer printing ad's each time you visited a web site ? - Frank > Does anybody has a script that will print basic text to a printer that is on > the client side. In PHP4 it must be possible to write text to the printer. > I'm working with EasyPHP. Do i have to include the file 'php_printer.dll' in > the extensions dir and what lines do i have to add in the php.ini file? I > just want to print text. Can anybody help me please. > I can't find it anywhere. > > William Schipper > [EMAIL PROTECTED] > > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > >
I make a dll in Vb6 and it have a funcition that have a variable of type VARIANT like parameter. In the program php I call this dll and your method and send a array make in php. Occurs a error : Invoke Failed : "Occured a exception", but if I pass a variable of type integer or string to other method of dll, it's OK. Thanks Luiz Fernando
Hello, This is my first post to this mailing list, so I hope this is clear enough... What are the consequences of turning off 'magic_quotes_gpc' (ignore quotes)in the php.ini file to avoid / marks in my comment form, vs. inserting the line 'stripslashes($var);' in the page itself? Is this something that's going to haunt me later on if I continue to develop my site using PHP? Cheers, Matt Cahill
Hi Have anyone used the cpdf functions with success ?? I gave it a try a few day ago, but for some reasons I was not able to create a simple pdf file. The sample from the manual simply generates a empty pdf - well the file is not empty but if you try to read it in Acrobat reader it's empty. Then I tried to install the latest version of Acobat reader on the server - BIG MISTAKE, every til I try to run the sample from the php-manual, Apache crashes with an access violation ,-( Anyone have a clue on how to solve this ? Thanks in advance. Steen
Oh, yeah, you are right. PHP can do it by array_splice(). I tested it, and it worked well. However, I can't realize it through javascript on IE, though it offers a function named splice(). But, I always meet a error report about "object not support the function". So...
I am trying to get a content management system up and running on my site. I want to have the thing password protected, and this was how I was going about it, passing on name and password variables in the urls of the management system. However, this doesnt work, it just says your password in correct, even when it is not. Any help ? <?php $code = mysql_query("SELECT password FROM newsauthors WHERE $name = author"); ?> <?php if ($code = $password) { ?> //Content manager stuff goes here <? } else { echo( "You have entered an incorrect password, or you do not have access to this part of the Staff area. Please press back on your browser and re-enter details." ); } ?> Thanks in advance
N> <?php N> $code = mysql_query("SELECT password FROM newsauthors WHERE $name = author"); ?>> You're not extracting a result here, just executing the query (assuming you have succesfully created the connection to the db at some other point in your code). Look up mysql_result() (and others in the family) in the PHP Manual. N> <?php N> if ($code = $password) { When you do extract a result, and you're trying to compare it, you'll want == and not = to do the comparison. If you need more information, look under "Operators" in the PHP Manual. You might also want to think about not storing plaintext passwords in your db, but instead hashing the passwords using the password() function in MySQL, then comparing the hashed input password against the hash stored in the table. Mmm...hash. - Julie Julie Meloni [EMAIL PROTECTED] "PHP Essentials" & "PHP Fast & Easy" --- www.thickbook.com ---