[PHP-CVS] cvs: php4 /ext/midgard preparser.c
emile Fri Mar 30 00:15:05 2001 EDT Modified files: /php4/ext/midgard preparser.c Log: Don't restat the connection, trust mod_midgard Index: php4/ext/midgard/preparser.c diff -u php4/ext/midgard/preparser.c:1.7 php4/ext/midgard/preparser.c:1.8 --- php4/ext/midgard/preparser.c:1.7Tue Feb 27 17:00:32 2001 +++ php4/ext/midgard/preparser.cFri Mar 30 00:15:05 2001 @@ -1,4 +1,4 @@ -/* $Id: preparser.c,v 1.7 2001/02/28 01:00:32 davidg Exp $ +/* $Id: preparser.c,v 1.8 2001/03/30 08:15:05 emile Exp $ Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED] Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED] @@ -296,7 +296,7 @@ /* EEH: if the page database has been defined you will want to include snippets from there too. */ if (rcfg-database.page rcfg-database.page-handle rcfg-database.page-handle-mgd) { - mgd_select_database(php_rqst, rcfg-database.page, rcfg); + mgd_select_database(php_rqst, rcfg-database.page, rcfg, FALSE); db = rcfg-database.page-name; MGD_LOG_START("Midgard: fetching snippet '%s' from database %s") MGD_LOG_ARG((*file)-value.str.val) @@ -338,7 +338,7 @@ MGD_LOG_ARG(name) MGD_LOG_ARG(db) MGD_LOG_END() - mgd_select_database(php_rqst, rcfg-database.main, rcfg); + mgd_select_database(php_rqst, rcfg-database.main, rcfg, FALSE); } RETVAL_STRING(part,1); -- PHP CVS 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]
[PHP] Problem in retreving values from more than one multi select in form
Hello all, I have a problem with the multi select, any body please solve this. In a form there are more than one multi select box, arranged one by one. Following are the way i created it. form trtd input type=text name="user[]" value="user1" select name="mselect[]" option value="vishak"Vishak/option option value="sujith"Sujith/option option value="rajesh"Rajesh/option /select /td/tr trtd input type=text name="user[]" value="user2" select name="mselect[]" option value="vishak"Vishak/option option value="sujith"Sujith/option option value="rajesh"Rajesh/option /select /td/tr /form How coud i get the values of the multi select when I submitted this form. For the text area i had taken the values by $user[0], $user[1] etc. and I got values 'user1', 'user2' etc. And the problem is how could i get the values of multi select, I tried it with $mselect[0],$mselect[1] then I got the last selectd values of the bottom select box. What I want is, If I selected 2 names from first mselect and 2 from second mselect, then the values must get in the manner, first and second name of first select then first and second name of second select Regards Vishak -- PHP General 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]
Re: [PHP] Array in Session-Vars?
I never tried to use arrays in session variables, but i believe if you try to serialize the array first and then register the serialized value as session value it should work. and ofcourse to retrieve it do reverse work by unserializing the variable back to the array and use it. - $a = Array("asdad", "adasd", "123123", "6adas f g"); echo ($s = serialize($a)) . "br"; // you can session_register($s) unset($a); // in file2 you can retrieve $s and make $a back again: $a = unserialize($s); var_dump($a); - -elias ""Thomas Häger"" [EMAIL PROTECTED] wrote in message 9a1e71$eun$[EMAIL PROTECTED]">news:9a1e71$eun$[EMAIL PROTECTED]... Hi all, i need to use an array in a session variable. On a page i fill the Sessionvar : $HTTP_SESSION_VARS["xy"] []=$whatever (The var is registered with session_register("xy")) I mean that the entry would made at the end of the array, is it not so? But evrey time i proove the entries with count($HTTP_SESSION_VARS["xy"]) , there are only one entry. Have somebody an idea? Thanks, Thomas -- PHP General 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] -- PHP General 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]
RE: [PHP] [ANSWER] problem uploading big (50MB) file
Try replacing "100M" with it's byte equivalent. Or maybe it's kilobytes. One on of my systems they had "2M" and it wouldn't upload anything cause it didn't parse it right. In other words, set that value to what you had with say php4.0.1 good luck! replaced 100M by 104857600, and it WORKED ! Further on from this, how do I work out the given byte value for a size in M?? TIA M@ -- PHP General 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]
Re: [PHP] Problem in retreving values from more than one multi select in form
Hi. as you defined the select tag of yours i see that you didn't specify the extra parameter: 'multiple', as: select name="mselect[]" multiple as for reading it's values, as you showed should work. -elias "Vishak Tomy" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello all, I have a problem with the multi select, any body please solve this. In a form there are more than one multi select box, arranged one by one. Following are the way i created it. form trtd input type=text name="user[]" value="user1" select name="mselect[]" option value="vishak"Vishak/option option value="sujith"Sujith/option option value="rajesh"Rajesh/option /select /td/tr trtd input type=text name="user[]" value="user2" select name="mselect[]" option value="vishak"Vishak/option option value="sujith"Sujith/option option value="rajesh"Rajesh/option /select /td/tr /form How coud i get the values of the multi select when I submitted this form. For the text area i had taken the values by $user[0], $user[1] etc. and I got values 'user1', 'user2' etc. And the problem is how could i get the values of multi select, I tried it with $mselect[0],$mselect[1] then I got the last selectd values of the bottom select box. What I want is, If I selected 2 names from first mselect and 2 from second mselect, then the values must get in the manner, first and second name of first select then first and second name of second select Regards Vishak -- PHP General 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] -- PHP General 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]
Re: [PHP] Image Resizing in PHP
On 29 Mar 2001 16:33:48 -0800 AD in php.general, YoBro said: Hello, Is it possible to have PHP resize an image on the server? Example. If I upload a JPG file at about 40KB at 600x480 Resolution, but I only want to display it as a small thumbnail. But if clicking the thumbnail it then opens in a new window the full size version. I have seen a auction site that I use, which is ASP and when I upload an image to sell, i notice that it gives the thumbnail and the full size images. How is this possible? Any links to sites on this subject would excellent. GDLib does this sort of thing, though I haven't tried it -- === Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/ For this reason I kneel before the Father... I pray that out of his glorious riches he may strengthen you with power through his Spirit in your inner being, so that Christ may dwell in your hearts through faith. -- Ephesians 3:16-17 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010329 === Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/ -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
Hmm, I believe if were he host there is no PHP support, you can't work it out. unless: http://www.zend.com/zend/products.php#encoder use the encoder, then try to run throught the Zend Optimizer... ""Marian Vasile"" [EMAIL PROTECTED] wrote in message 9a1cr4$5fr$[EMAIL PROTECTED]">news:9a1cr4$5fr$[EMAIL PROTECTED]... I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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]
Re: [PHP] [ANSWER] problem uploading big (50MB) file
basic algebra: 1k = 1024 bytes 1mb = 1024 kbytes = 1048576 bytes 100mb= 104857600 bytes Xmb = (1048576 * X) bytes -jack Matt Williams wrote: Try replacing "100M" with it's byte equivalent. Or maybe it's kilobytes. One on of my systems they had "2M" and it wouldn't upload anything cause it didn't parse it right. In other words, set that value to what you had with say php4.0.1 good luck! replaced 100M by 104857600, and it WORKED ! Further on from this, how do I work out the given byte value for a size in M?? TIA M@ -- PHP General 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] -- PHP General 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]
[PHP] Need help with file include
hi, I am a newbie to php, so bear with me. I have a directory list script which i admit i didnt make myself, but i did have a lot of help on. What i want to do is, when the page makes the list (into a table, with filename and file size) i want to include a file description and two pieces of information about the file. The file description and the 2 other bits of info are stored as .txt files, for example we have a file called 3000.pdf, which contains a report, 3000.txt contains the file description and other information. Is there a way to include these 3 pieces of info from the .txt file into my directory list? Many thanks in advance, P.stevens -- http://www.berent.dk http://www.berent.de -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
They have PHP support but I don't think they will want to install any other software... There is no other solution... ? There is no other free encoder on the market ? "Marian Vasile" [EMAIL PROTECTED] wrote in message 9a1cr4$5fr$[EMAIL PROTECTED]">news:9a1cr4$5fr$[EMAIL PROTECTED]... I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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]
Re: [PHP] Array in Session-Vars?
elias wrote: I never tried to use arrays in session variables, but i believe if you try to serialize the array first and then register the serialized value as session value it should work. and ofcourse to retrieve it do reverse work by unserializing the variable back to the array and use it. - $a = Array("asdad", "adasd", "123123", "6adas f g"); echo ($s = serialize($a)) . "br"; // you can session_register($s) unset($a); // in file2 you can retrieve $s and make $a back again: $a = unserialize($s); var_dump($a); - -elias Hi, Never tried it either, but from previous postings I remember you should just be able to use array's with no prob's. (4 all I can remember i.e.) * RzE: *** ** Renze Munnik ** ** E: [EMAIL PROTECTED] ** M: +31 6 218 111 43 *** -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
as a follow up: there was an e-mail recently from someone discussing this topic...i believe he wanted to write his own compiler/encoder for php...anyone heard anything about this? i agree about the price...i can't spend that much money for a piece of software; yet, i don't want to distribute source that could be copied and distributed (well, sometimes that's good ;-), but not if this is a system i've been contracted to design ) -jack Marian Vasile wrote: Jack Dempsey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... you can use the zend encoder (www.zend.com) but it costs over $2000, so this may not be viable...but, for right now, i believe that's the only way to compile php code... -jack Marian Vasile wrote: I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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] -- PHP General 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]
Re: [PHP] Need help with file include
"is there a way" i'm sure there is, but you haven't given enough information to get much more of a response... show us some code, explain clearly and concisely what you're trying to do, and we might be able to help more... -jack p.s. and the quick answer is yes, you can read information from text files...read the documentation on fopen and other file manipulating functions at www.php.net Peter Stevens wrote: hi, I am a newbie to php, so bear with me. I have a directory list script which i admit i didnt make myself, but i did have a lot of help on. What i want to do is, when the page makes the list (into a table, with filename and file size) i want to include a file description and two pieces of information about the file. The file description and the 2 other bits of info are stored as .txt files, for example we have a file called 3000.pdf, which contains a report, 3000.txt contains the file description and other information. Is there a way to include these 3 pieces of info from the .txt file into my directory list? Many thanks in advance, P.stevens -- http://www.berent.dk http://www.berent.de -- PHP General 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] -- PHP General 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]
[PHP] Regular expression benchmark?
Has anyone here benched standard regular expression functions (ereg(), etc) against Perl regular expression functions? (preg_match(), etc.) and POSIX extended regular expression functions? (ereg(), etc) If anyone benched regular expression functions already, I would like to know the benchmark data. Thanks. -- Yasuo Ohgaki -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
I heard about something called php-gtk... Is that a php compiler ? Also I heard that is free because is open source project... Jack Dempsey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... as a follow up: there was an e-mail recently from someone discussing this topic...i believe he wanted to write his own compiler/encoder for php...anyone heard anything about this? i agree about the price...i can't spend that much money for a piece of software; yet, i don't want to distribute source that could be copied and distributed (well, sometimes that's good ;-), but not if this is a system i've been contracted to design ) -jack Marian Vasile wrote: Jack Dempsey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... you can use the zend encoder (www.zend.com) but it costs over $2000, so this may not be viable...but, for right now, i believe that's the only way to compile php code... -jack Marian Vasile wrote: I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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] -- PHP General 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] -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
no...gtk=gimp tool kit...(think graphics =P) http://gtk.php-coder.net/ check out that page...Joe Stump threw it together nicely; it has tons of useful info and links if you're so inclined, but no, nothing to do with compiling php... -jack Marian Vasile wrote: I heard about something called php-gtk... Is that a php compiler ? Also I heard that is free because is open source project... Jack Dempsey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... as a follow up: there was an e-mail recently from someone discussing this topic...i believe he wanted to write his own compiler/encoder for php...anyone heard anything about this? i agree about the price...i can't spend that much money for a piece of software; yet, i don't want to distribute source that could be copied and distributed (well, sometimes that's good ;-), but not if this is a system i've been contracted to design ) -jack Marian Vasile wrote: Jack Dempsey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... you can use the zend encoder (www.zend.com) but it costs over $2000, so this may not be viable...but, for right now, i believe that's the only way to compile php code... -jack Marian Vasile wrote: I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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] -- PHP General 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] -- PHP General 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] -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
I can't believe that no one thought on something to compile all those scripts out there... I really can't give a solution based on plain text scripts and in this way php can't be for any use really... Anyone have Zend Encoder Unlimited ? Is there any buyer for this Encoder ? "Marian Vasile" [EMAIL PROTECTED] wrote in message 9a1cr4$5fr$[EMAIL PROTECTED]">news:9a1cr4$5fr$[EMAIL PROTECTED]... I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
"Marian Vasile" [EMAIL PROTECTED] writes: I heard about something called php-gtk... Is that a php compiler ? From the Freshmeat project page: PHP-GTK is a PHP extension that implements language bindings for GTK+. It provides an object-oriented interface to GTK+ classes and functions and greatly simplifies writing client side cross-platform GUI applications. http://freshmeat.net/projects/php-gtk/ and http://gtk.php.net/ Also I heard that is free because is open source project... GTK-PHP is covered by the GNU Lesser General Public License regards, Remco -- Remco B. Brink Norge-iNvest AS Kung foohttp://www.norge-invest.com PGP/GnuPG key at http://remco.xgov.net/rbb.pgp "no amount of Zen contemplation will ever make you at one with a 3c905B ethernet card." --- Alan Cox -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
ok, what exactly do you mean by "php can't be for any use really" better watch that kind of comment on this list ;-) can you not give a solution that's in plain text files because you're worried about people looking at the code, or something like running time, etc... if it's a code issue, there have been discussions of that before in the archives (familiar feeling to that phrase)...http://marc.theaimsgroup.com go to the bottom and find the php-general list and do a search... -jack Marian Vasile wrote: I can't believe that no one thought on something to compile all those scripts out there... I really can't give a solution based on plain text scripts and in this way php can't be for any use really... Anyone have Zend Encoder Unlimited ? Is there any buyer for this Encoder ? "Marian Vasile" [EMAIL PROTECTED] wrote in message 9a1cr4$5fr$[EMAIL PROTECTED]">news:9a1cr4$5fr$[EMAIL PROTECTED]... I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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] -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
i found a way, it's not the best secure thing, and best code obfuscator at all, but it will keep mosta part of the curious nose out of your code, use APC cache, it creates cache files encoded you can then use the encoded files, but you as always need to use they're static object loaded to read the files. About the php compiler, due to a lot of work, that project i intended to do is suspended, but if anyone likes to start thinking about it, all that you need to make a compiler is in the zend engine distributed with the php source, all the parsing etc is there, so all that you need is to make a encoder of the result after being parsed from the zend engine, then a decoder for php. And again, all this is based on 'snooping around' zend engine src code, it may not be that simple, or, it can be even more simple :) On 30-Mar-2001 Jack Dempsey wrote: you can use the zend encoder (www.zend.com) but it costs over $2000, so this may not be viable...but, for right now, i believe that's the only way to compile php code... -jack Marian Vasile wrote: I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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] Rui Barreiros Software Developer WEBSOLUT - Soluções Internet Emailto: [EMAIL PROTECTED] Personal Info: http://websolut.net/people/rui.html As informações contidas neste email são confidenciais e destinam-se apenas à(s) pessoa(s) a quem foi enviado: http://websolut.net/confidencialidade-responsabilidade.html -- PHP General 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]
Re: [PHP] initialize session module
How about http://www.zend.com/zend/tut/ There are several PHP4 tutorials including PHP4 session. The error is most likely that you are specifying invalid session handler. -- Yasuo Ohgaki ""Rol"" [EMAIL PROTECTED] wrote in message 022a01c0b8e4$f1271ae0$[EMAIL PROTECTED]">news:022a01c0b8e4$f1271ae0$[EMAIL PROTECTED]... Hello What causes this error message is there a place to read a bit more about session module? Failed to initialize session module Thank you -- PHP General 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] -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
Search what ? I need to know if there is any way to encode the code... that's it... otherwise you have to agree with me that PHP can't be used for comercial solutions. (probably just when it's total trust between partners which is not a very common thing) Right ? Jack Dempsey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ok, what exactly do you mean by "php can't be for any use really" better watch that kind of comment on this list ;-) can you not give a solution that's in plain text files because you're worried about people looking at the code, or something like running time, etc... if it's a code issue, there have been discussions of that before in the archives (familiar feeling to that phrase)...http://marc.theaimsgroup.com go to the bottom and find the php-general list and do a search... -jack Marian Vasile wrote: I can't believe that no one thought on something to compile all those scripts out there... I really can't give a solution based on plain text scripts and in this way php can't be for any use really... Anyone have Zend Encoder Unlimited ? Is there any buyer for this Encoder ? "Marian Vasile" [EMAIL PROTECTED] wrote in message 9a1cr4$5fr$[EMAIL PROTECTED]">news:9a1cr4$5fr$[EMAIL PROTECTED]... I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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] -- PHP General 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] -- PHP General 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]
RE: [PHP] Array in Session-Vars?
I can't really see a problem with registering arrays as session variables (in PHP4). I use the following in a script and it works fine: while (OCIFetch($rs)) { $n = $n + 1; $ix[$n] = OCIResult($rs,1); } session_register("n"); session_register("ix"); Rudolf Visagie [EMAIL PROTECTED] -Original Message- From: Renze Munnik [mailto:[EMAIL PROTECTED]] Sent: 30 March 2001 10:38 To: [EMAIL PROTECTED] Subject: Re: [PHP] Array in Session-Vars? elias wrote: I never tried to use arrays in session variables, but i believe if you try to serialize the array first and then register the serialized value as session value it should work. and ofcourse to retrieve it do reverse work by unserializing the variable back to the array and use it. - $a = Array("asdad", "adasd", "123123", "6adas f g"); echo ($s = serialize($a)) . "br"; // you can session_register($s) unset($a); // in file2 you can retrieve $s and make $a back again: $a = unserialize($s); var_dump($a); - -elias Hi, Never tried it either, but from previous postings I remember you should just be able to use array's with no prob's. (4 all I can remember i.e.) * RzE: *** ** Renze Munnik ** ** E: [EMAIL PROTECTED] ** M: +31 6 218 111 43 *** -- PHP General 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] -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
"Marian Vasile" [EMAIL PROTECTED] writes: I can't believe that no one thought on something to compile all those scripts out there... I really can't give a solution based on plain text scripts and in this way php can't be for any use really... Maybe I am totally missing something here, but *why* can't PHP be used for anything if the "sourcecode" can't be compiled? Do you honestly think that you're the only one who can do PHP coding? Why the desperate need to obfuscate/compile PHP code if not your only reason would be speed enhancements (which it apparently isn't)? speed regards, Remco -- Remco B. Brink Norge-iNvest AS Kung foohttp://www.norge-invest.com PGP/GnuPG key at http://remco.xgov.net/rbb.pgp "Join the Army, meet interesting people, kill them." -- PHP General 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]
RE: [PHP] Compile .php file is possible ?
How are these kinds of things solved with .ASP and .JSP anyway? Or aren't they? Are they not suitable for commercial use then D. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Remco B. Brink Sent: vrijdag 30 maart 2001 10:05 To: Marian Vasile Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Compile .php file is possible ? "Marian Vasile" [EMAIL PROTECTED] writes: I can't believe that no one thought on something to compile all those scripts out there... I really can't give a solution based on plain text scripts and in this way php can't be for any use really... Maybe I am totally missing something here, but *why* can't PHP be used for anything if the "sourcecode" can't be compiled? Do you honestly think that you're the only one who can do PHP coding? Why the desperate need to obfuscate/compile PHP code if not your only reason would be speed enhancements (which it apparently isn't)? speed regards, Remco -- Remco B. Brink Norge-iNvest AS Kung foohttp://www.norge-invest.com PGP/GnuPG key at http://remco.xgov.net/rbb.pgp "Join the Army, meet interesting people, kill them." -- PHP General 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] -- PHP General 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]
Re: [PHP] Passing by reference deprecated?
FYI Unless you need to modify and return modified contents of variables, pass by reference makes script execution a little slower under PHP4. -- Yasuo Ohgaki ""Neil Kimber"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Pass by reference itself is not deprecated, just call-time pass-by-reference. I believe this means your calling line of code being prevented from specifying that it should be invoked as pass-by-reference. So, function NormalPassByRefence($prmValue) { $prmValue ++; } $numValue=1; NormalPassByRefence($numValue); // This will still work // $numValue =2 at this point function CallTimePassByRefence($prmValue) { $prmValue ++; } $numValue=1; CallTimePassByRefence($numValue); // This will no longer work - it's been deprecated // $numValue =1 at this point -Original Message- From: CC Zona [mailto:[EMAIL PROTECTED]] Sent: 30 March 2001 04:40 To: [EMAIL PROTECTED] Subject: [PHP] Passing by reference deprecated? set_value($variable,$value) { $variable=value; } "Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. " When did passing by reference get deprecated? The documentation at http://php.net/manual/en/language.references.pass.php doesn't suggest what to do instead--in fact, it uses an example like the syntax above. So my next question is: would using a return value or declaring a global be the (only) other options? TIA -- CC -- PHP General 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] -- PHP General 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] -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
yes there is. the encoder. that's it. and no, i don't have to agree with you, there are plenty of people on this list alone who have used php for "commercial" applications...and if you're doing something that big and commercial the you should be able to pay the $2400 for the encoder... -jack Marian Vasile wrote: Search what ? I need to know if there is any way to encode the code... that's it... otherwise you have to agree with me that PHP can't be used for comercial solutions. (probably just when it's total trust between partners which is not a very common thing) Right ? Jack Dempsey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ok, what exactly do you mean by "php can't be for any use really" better watch that kind of comment on this list ;-) can you not give a solution that's in plain text files because you're worried about people looking at the code, or something like running time, etc... if it's a code issue, there have been discussions of that before in the archives (familiar feeling to that phrase)...http://marc.theaimsgroup.com go to the bottom and find the php-general list and do a search... -jack Marian Vasile wrote: I can't believe that no one thought on something to compile all those scripts out there... I really can't give a solution based on plain text scripts and in this way php can't be for any use really... Anyone have Zend Encoder Unlimited ? Is there any buyer for this Encoder ? "Marian Vasile" [EMAIL PROTECTED] wrote in message 9a1cr4$5fr$[EMAIL PROTECTED]">news:9a1cr4$5fr$[EMAIL PROTECTED]... I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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] -- PHP General 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] -- PHP General 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] -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
"Marian Vasile" [EMAIL PROTECTED] writes: Search what ? I need to know if there is any way to encode the code... that's it... Run it on a webserver, don't give out access to the code. If you don't want people to see your code, then don't give it away. Start programming in C++ or build Apache modules or something. otherwise you have to agree with me that PHP can't be used for comercial solutions. I don't. It's a totally ridiculous argument as to whether or not PHP is useful for commercial solutions. (probably just when it's total trust between partners which is not a very common thing) Right ? Wrong. You can just _copyright_ your code. Put it under the GPL (and give other developers the option of using your great code, as long as they credit you for it). That way you can still hunt down people who violate the GPL on your code. Again, why the desperate need to obfuscate your code? regards, Remco -- Remco B. Brink Norge-iNvest AS Kung foohttp://www.norge-invest.com PGP/GnuPG key at http://remco.xgov.net/rbb.pgp "Caution: Cape does not enable user to fly." - Batman Costume warning label -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
I've seen many people talking about Zend compiler... Where is that Zend compiler ? "Marian Vasile" [EMAIL PROTECTED] wrote in message 9a1cr4$5fr$[EMAIL PROTECTED]">news:9a1cr4$5fr$[EMAIL PROTECTED]... I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
Zend Compiler got renamed to Zend Encoder. Pavel - Original Message - From: "Marian Vasile" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 30, 2001 11:19 AM Subject: Re: [PHP] Compile .php file is possible ? I've seen many people talking about Zend compiler... Where is that Zend compiler ? "Marian Vasile" [EMAIL PROTECTED] wrote in message 9a1cr4$5fr$[EMAIL PROTECTED]">news:9a1cr4$5fr$[EMAIL PROTECTED]... I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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] -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
For all who asked why I need this kind of protection: I have a client who wants an web site with registration and everything included, poll, message board, forum etc. The registration system I builded myself. Now the client want's a preview, but he want this preview on his server. The entire solution costs 450 dollars. This price probably is too lower for some of you but I dont' live in US, I live in Romania. (PS: That's why Jack, I can't afford to buy the encoder... probably I will in the future...) Now what I can do ? The client can take the website (because I have to demonstrate that the entire web site fully works) and he will not pay me... How I can protect myself ? Any idea will be highly apreciated. Thanx a lot, "Marian Vasile" [EMAIL PROTECTED] wrote in message 9a1cr4$5fr$[EMAIL PROTECTED]">news:9a1cr4$5fr$[EMAIL PROTECTED]... I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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]
Re: [PHP] Setcookie not working
Someone on this list mentioned, Internet Explorer does not accept cookie that has timeout less than 7200 sec from current time. (PC's clock) How about try longer timeout? PS: Is this information is correct? Anyone? Correct me if it is wrong info. -- Yasuo Ohgaki ""Sean Weissensee"" [EMAIL PROTECTED] wrote in message 011e01c0b845$ad8fa3a0$0200a8c0@Win98">news:011e01c0b845$ad8fa3a0$0200a8c0@Win98... When I use set cookie with an expire value it does not retain the value ? setcookie ("TestCookie2", "test", $value,time()+3600); I am using echo $TestCookie2; or echo $HTTP_COOKIE_VARS["TestCookie2"]; in another page to view the value Sean Weissensee Ion Solutions -- PHP General 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]
Re: [PHP] Need help with file include
Hi, ok, here is the code: ? //starting directory $startDir = "/homepages/24/d11622983/htdocs/Berent/"; //open directory $openDir = opendir($startDir); print "center"; print "table border=0 cellspacing=1 cellpadding=4\ntr\ntd\n"; //starting of table print "fontFiles/font"; print "table border=1 cellspacing=2 cellpadding=4\n"; //another table //loop while there are still things to be read in directory while($path = readdir($openDir)) { //gets the base name of file $file = basename($path); //makes sure we dont we read the . and .. direcotry (current directory and parent directory) if($file!="." $file!="..") { //if its not a directory print out the stats (can be changed for your needs) if(!is_dir($startDir."/".$file)) { $fullDir = $startDir."/".$file; //full directory path of file $statCheck = stat($fullDir); //keeps info on files print "trtd\n"; print "File Name:nbspa href=".$file."".$file."/a\n"; //link to name of file print "/td/tr\n"; print "trtd\n"; print "File Size (bytes): ".$statCheck[7]."\n nbspnbspnbsp"; print "/td/tr\n"; print "trtd\n"; include ('.$file..txt'); print ""; print "/td/tr\n"; } //end if } //end if } //end while ? So, i have a table displaying whats contained inside a directory with file names and file sizes. All the files are pdf files. For each file in the directory i need to display some file info (split up into three parts), the file info is just in a basic txt form, so it can be changed into what ever is needed. How do i display for example the three bits of file information (contained in the corresponding file's txt file) into my table? Can the txt files have the same name as the pdf files i.e. 3000.pdf - 3000.txt? Thanks again for your help P.Stevens Jack Dempsey wrote: "is there a way" i'm sure there is, but you haven't given enough information to get much more of a response... show us some code, explain clearly and concisely what you're trying to do, and we might be able to help more... -jack p.s. and the quick answer is yes, you can read information from text files...read the documentation on fopen and other file manipulating functions at www.php.net Peter Stevens wrote: hi, I am a newbie to php, so bear with me. I have a directory list script which i admit i didnt make myself, but i did have a lot of help on. What i want to do is, when the page makes the list (into a table, with filename and file size) i want to include a file description and two pieces of information about the file. The file description and the 2 other bits of info are stored as .txt files, for example we have a file called 3000.pdf, which contains a report, 3000.txt contains the file description and other information. Is there a way to include these 3 pieces of info from the .txt file into my directory list? Many thanks in advance, P.stevens -- http://www.berent.dk http://www.berent.de -- PHP General 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] -- PHP General 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] -- http://www.berent.dk http://www.berent.de -- PHP General 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]
Re: [PHP] Array in Session-Vars?
Array and Object are serialized by session module. Therefore, PHP4 session can handle both Array and Object seamlessly. (i.e. You don't have to do anything) Make sure you define Class (include class def) before starting session. Don't forget re-initialize resources such as database link also. How about read http://www.zend.com/zend/tut/ There are useful tutorials. -- Yasuo Ohgaki ""Thomas H$BgH(Ber"" [EMAIL PROTECTED] wrote in message 9a1e71$eun$[EMAIL PROTECTED]">news:9a1e71$eun$[EMAIL PROTECTED]... Hi all, i need to use an array in a session variable. On a page i fill the Sessionvar : $HTTP_SESSION_VARS["xy"] []=$whatever (The var is registered with session_register("xy")) I mean that the entry would made at the end of the array, is it not so? But evrey time i proove the entries with count($HTTP_SESSION_VARS["xy"]) , there are only one entry. Have somebody an idea? Thanks, Thomas -- PHP General 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] -- PHP General 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]
[PHP] phpinfo unneeded
HI all, how to compile php without function phpinfo enalbe. so if user call phpinfo() it would be false/error. i would like to build a free web server with php but i don't like if the user know what are the tools in my server 'couse it's a free server. is it possible or it's just a stupid question? -JUANG-
Re: [PHP] Compile .php file is possible ?
enter into a legal contract. if he breaks it, sue him. marian, i do understand your issues. I have the same type of problem (or soon will), but until a free encoder is released, we have to make do with what we can...and why does it have to be on his server?if you feel that the person would try and steal your code, all the more reason for a tight contract... best of luck jack Marian Vasile wrote: For all who asked why I need this kind of protection: I have a client who wants an web site with registration and everything included, poll, message board, forum etc. The registration system I builded myself. Now the client want's a preview, but he want this preview on his server. The entire solution costs 450 dollars. This price probably is too lower for some of you but I dont' live in US, I live in Romania. (PS: That's why Jack, I can't afford to buy the encoder... probably I will in the future...) Now what I can do ? The client can take the website (because I have to demonstrate that the entire web site fully works) and he will not pay me... How I can protect myself ? Any idea will be highly apreciated. Thanx a lot, "Marian Vasile" [EMAIL PROTECTED] wrote in message 9a1cr4$5fr$[EMAIL PROTECTED]">news:9a1cr4$5fr$[EMAIL PROTECTED]... I need a method to compile my php files to give them to a customer. The main problem is that this customer have an account on a shared hosting service and (I think) he can't install a compiler or something new on that server. Is it possible to encrypt my files ? Plz HELP ASAP Yours, Marian -- PHP General 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] -- PHP General 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] -- PHP General 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]
Re: [PHP] phpinfo unneeded
checkout your php.ini file...you can disable functions in it... -jack juang wrote: HI all, how to compile php without function phpinfo enalbe. so if user call phpinfo() it would be false/error. i would like to build a free web server with php but i don't like if the user know what are the tools in my server 'couse it's a free server. is it possible or it's just a stupid question? -JUANG- -- PHP General 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]
Re: [PHP] Pattern Replacing
On Thursday 29 March 2001 22:38, you wrote: H- Thanks to those that emailed. $query = "tree, bird, nest, "; $new = substr($query,0,2); Doesn't seem to work. It returns "tr". $new = substr ($query, 0, strlen ($query) - 2); or $new = preg_replace ('/,.*?$/', '', $query); -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "World domination. Fast." (Linus Torvalds about Linux) -- PHP General 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]
Re: [PHP] phpinfo unneeded
On Fri, Mar 30, 2001 at 04:32:40PM +0700, juang wrote: how to compile php without function phpinfo enalbe. so if user call phpinfo() it would be false/error. take a look at the safe_mode-stuff in php.ini. -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | PGP signature
RE: [PHP] Passing by reference deprecated?
I'm surprised. I would have thought that it would have been the other way around. Passing by reference should have similar implications to reference counting as used the Zend engine. It means that physical memory does not have to be allocated to passed variables (thereby saving resources in physical memory and time used in allocating and copying memory). In fact, because the Zend engine uses reference counting it will in effect use pass by reference for all parameters. In the case of a parameter passed as 'non-reference' it will only be allocated its own memory at a time that the parameter value is changed within the function. You can see a detailed explanation of how reference counting works here: http://www.zend.com/zend/art/ref-count.php I am not familiar with the parser source, so these are purely my thoughts on my understanding of the parser behaviour. I'd be interested to hear of other peoples views. -Original Message- From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]] Sent: 30 March 2001 10:08 To: [EMAIL PROTECTED] Subject: Re: [PHP] Passing by reference deprecated? FYI Unless you need to modify and return modified contents of variables, pass by reference makes script execution a little slower under PHP4. -- Yasuo Ohgaki ""Neil Kimber"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Pass by reference itself is not deprecated, just call-time pass-by-reference. I believe this means your calling line of code being prevented from specifying that it should be invoked as pass-by-reference. So, function NormalPassByRefence($prmValue) { $prmValue ++; } $numValue=1; NormalPassByRefence($numValue); // This will still work // $numValue =2 at this point function CallTimePassByRefence($prmValue) { $prmValue ++; } $numValue=1; CallTimePassByRefence($numValue); // This will no longer work - it's been deprecated // $numValue =1 at this point -Original Message- From: CC Zona [mailto:[EMAIL PROTECTED]] Sent: 30 March 2001 04:40 To: [EMAIL PROTECTED] Subject: [PHP] Passing by reference deprecated? set_value($variable,$value) { $variable=value; } "Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. " When did passing by reference get deprecated? The documentation at http://php.net/manual/en/language.references.pass.php doesn't suggest what to do instead--in fact, it uses an example like the syntax above. So my next question is: would using a return value or declaring a global be the (only) other options? TIA -- CC -- PHP General 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] -- PHP General 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] -- PHP General 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] -- PHP General 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]
Re: [PHP] Image Resizing in PHP
On Friday 30 March 2001 02:46, you wrote: Perhaps i'm not following what you're trying to do, but why not manipulate the height/width img tag attributes to make it look like a thumbnail, but then when displaying it for real, take them out? there Well, people sometimes get upset when it takes five minutes to load a page with, say, only 30 tiny thumbnails... -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "World domination. Fast." (Linus Torvalds about Linux) -- PHP General 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]
Re: [PHP] apache_lookup_uri problem
I haven't use apache_lookup_uri() yet, but I believe it is for getting local server's uri info. I think your PHP script is located web document root, right? Therefore, you get "/" before the string. If you want to get remote URI info, use HEAD request. (Refer to RFC for details) -- Yasuo Ohgaki "Chris Cochella" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am using the apache_lookup_uri function and I am having a problem. I have PHP4 as an Apache module. If I give the command: $link = "http://www.mysite.com/"; $lookup_results = apache_lookup_uri($link); And I output: echo $lookup_results-uri; echo $lookup_results-status; I get: /http://www.mysite.com (that is if the page that has the script is in document root) and a status of: 200 Even if the link is bad I get a status of 200. Why is there a leading "/"? Am I forming the the URI incorrectly and that is causing a prepend to the link? Any help would be great. I have scanned the archives and various script archives with no results. Thanks in advance. Chris -- PHP General 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] -- PHP General 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]
Re: [PHP] regex help...again
On Friday 30 March 2001 06:47, you wrote: Ok, i have a text file with lines that looks like this: 14```value```value2`value3 This would be fine, except...there are sometimes more than in other columns, so id like it to be 14``value``value2``value3 $new = preg_replace ('/`+/', '``', $old); quite simple, eh? -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "World domination. Fast." (Linus Torvalds about Linux) -- PHP General 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]
[PHP] Arrays : Key in Array, True/False
Hi there I have a script with a function that builds a more comprehensive kind of array for parsing arguments given a script in PHP (this is a backup-script I'm currently working on). My problem is in "THE PARSING OF ARGS PART" when I'm asking the array if the key exists in the array it returns 0. The key exists, I know because of the output from the function ( var_dump($array) ), but the function 'in_array()' only returns true if I ask for a value. Does anyone know if I can use anything else to give me the possibility to also ask for the keys, or do I have to write a 'in_array()'-kind of function myself ?? #! /local/bin/php -q ?PHP // -*- C++ -*- function parse_arg( $argv, $argc ) { $array = Array(); for ( $i = 0 ; $i $argc ; $i++ ) { if ( ereg( "-", $argv[ $i ] ) ) { if ( ereg( "-", $argv[ $i + 1 ] ) ) { $array[ "$argv[$i]" ] = ""; } else { $array[ "$argv[$i]" ] = $argv[ $i + 1 ]; $i = $i + 1; } } } var_dump ($array); return $array; } // THE PARSING OF ARGS PART $arr = parse_arg( $argv, $argc ); if ( in_array( "-h", $arr ) ) { // This doesnt work print $usage; exit; } elseif ( in_array( "-b", $arr ) ) { // This doesnt work $backup = 1; } elseif ( in_array( "-d", $arr ) ) { // This doesnt work while ( list ( $key, $val ) = each ( $arr ) ) { if ( $key == "-d" ) { if ( $val == "" ) { print "No PATH to switch \"-d\"\nExiting\n"; exit; } else { $dir = $val; if ( !is_dir( $dir ) ) { print "This directory [$dir] doesnt exist\n"; exit; } else { $run = 1; } } } } } ? -- Knut -- Knut H. Hassel Nielsen Principal Engineer / Avdelingsingenir Norwegian University of Science and Technology / NTNU Department of Computer and Information Science / IDI N-7491 Trondheim, Norway Phone Office / Telefon jobb : (+47) 73 59 18 46 Fax Office / Telefax jobb : (+47) 73 59 17 33 Cell. Phone / Mobiltelefon : 91 59 86 06 -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
On Friday 30 March 2001 11:10, you wrote: Search what ? I need to know if there is any way to encode the code... that's it... otherwise you have to agree with me that PHP can't be used for comercial solutions. I do use it for commercial solutions. No problem. And I consider it part of my service to give my customers full, well-commented source code so that they have a chance to continue working with it / maintaining it should I get hit by a bus or something. Besides - I write code I can be proud of, so I absolutely don't mind others looking through it :) (probably just when it's total trust between partners which is not a very common thing) Right ? Wrong :) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "World domination. Fast." (Linus Torvalds about Linux) -- PHP General 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]
Re: [PHP] Compile .php file is possible ?
On Friday 30 March 2001 11:24, you wrote: Now the client want's a preview, but he want this preview on his server. The entire solution costs 450 dollars. This price probably is too lower for some of you but I dont' live in US, I live in Romania. (PS: That's why Jack, I can't afford to buy the encoder... probably I will in the future...) Now what I can do ? The client can take the website (because I have to demonstrate that the entire web site fully works) and he will not pay me... How I can protect myself ? Make a contract. If he violates it, sue him. Plain and simple. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "World domination. Fast." (Linus Torvalds about Linux) -- PHP General 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]
Re: [PHP] Image Resizing in PHP
On Fri, Mar 30, 2001 at 11:49:45AM +0200, Christian Reiniger wrote: Well, people sometimes get upset when it takes five minutes to load a page with, say, only 30 tiny thumbnails... Image-Resizing withing php is explained pretty well at the php.net-Site. Yust take a look at the manual for these functions: imagecopyresized() imagejpeg() imagepng() and such. -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | PGP signature
Re: [PHP] Compile .php file is possible ?
On Friday 30 March 2001 10:42, you wrote: can't spend that much money for a piece of software; yet, i don't want to distribute source that could be copied and distributed (well, sometimes that's good ;-), but not if this is a system i've been contracted to design ) Little question: If you've been contracted to design it, you get your money anyway - whether it's copied or not. So where's the problem? And: Next time specify in the contract that you own the copyright to the code :) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "World domination. Fast." (Linus Torvalds about Linux) -- PHP General 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]
Re: [PHP] Running a script without flowing
hey, exec("foo /some/file 21 "); or register_shut_down("whatever"); incase it's a C program that does the math, you could make it a daemon like thing: and do that math in the main :-) #include sys/types.h #include sys/time.h #include stdlib.h #include stdio.h #include string.h #include signal.h #include unistd.h // copyright 2001, mukul sabharwal [[EMAIL PROTECTED]] void get_into_background(void) { pid_t pid; // all the familiar kitchenware! pid = fork(); if(pid != 0) exit(0); setsid(); // sets out process and group id as part of the session // but only if the process ain't a leader, hehe close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); // the program shouldn't acquire a terminal signal(SIGHUP, SIG_IGN); // incase we get HUP'd, ignore! pid = fork(); if(pid != 0) exit(0); chdir("/towhere"); umask(0); } void the_actual_exec(void) { char buffer[1024]; char *args[3]; args[0] = "ls"; args[1] = "-F"; args[2] = 0; execv("/bin/ls", args); // 0 terminated array perror("execv"); // as exec dont return nutting // going past exec is an ERROR } int main(int argc, char **argv) { get_into_background(); the_actual_exec(); return 0; } = To find out more about me : http://www.geocities.com/mimodit My bookmarks are available @ http://mukul.free.fr __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text -- PHP General 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]
Re: [PHP] phpinfo unneeded
hello jack and felix, i have been search the string of "phpinfo" in php.ini there was no phpinfo string found and "safe_mode-stuff" didn't found too. do i must "write safe_mode-stuff" if yes any sample on the net thx -JUANG- - Original Message - From: "Jack Dempsey" [EMAIL PROTECTED] To: "juang" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, March 30, 2001 4:40 PM Subject: Re: [PHP] phpinfo unneeded checkout your php.ini file...you can disable functions in it... -jack -- PHP General 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]
Re: [PHP] Better way (if...elseif...else)
"Ashley M. Kirchner" wrote: Is there a better way to write the following snippet: if ($priority == "000") { $fcol="high"; $pstr .= "option value=\"000\" selectedHigh\n"; $pstr .= "option value=\"050\"Medium\n"; $pstr .= "option value=\"100\"Low\n"; } elseif ($priority == "050") { $fcol="med"; $pstr .= "option value=\"000\"High\n"; $pstr .= "option value=\"050\" selectedMedium\n"; $pstr .= "option value=\"100\"Low\n"; } else { $fcol="low"; $pstr .= "option value=\"000\"High\n"; $pstr .= "option value=\"050\"Medium\n"; $pstr .= "option value=\"100\" selectedLow\n"; } $p_arr=array("000","050","100"); $fc_arr=array("high","med","low"); $ptext_arr("High","Medium","Low"); for($x=0;$xcount($p_arr);$x++) { $pstr.="option value=\"$p_arr[$x]\" "; if($priority==$p_arr[$x]) { $pstr.="selected"; $fcol=$fc_arr[$x]; } $pstr.="$ptext_arr[$x]\n"; } You could optimize the code even more if you'd throw $fc_arr away and use $ptext_arr instead. Robert -- PHP General 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]
[PHP] urgent configure-problem, 2'nd
Hi, now the problem is that the configure-tool searches the apache-file "httpd.h". We use the IBM HTTPServer and its installation-base is not /../apache.x.x.x what the configure-tool searches for when using the with-apache-flag but /.../HTTPServer. Therefore we created a link with the name apachex.x.x which pointed to the HTTPServer-directory. But that didn't solve the problem. The output is: configure: error: Invalid Apache directory - unable to find httpd.h under /usr/apache_1.3.12 Thank you again for help, Markus Mattes e-mail: [EMAIL PROTECTED] -- PHP General 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]
[PHP] HTML link to php
Hello world. Using QuickPHP. I have PHP4.03pl1 and Mysql 3.22.34 under WIndows 98 SE. The web server is Apache 1.3. I have a link (in an HTML page) to a php page. In this php page I make a dynamique list( select option like combo list) that pick information from a column table in a Mysql database. So, if i call the php page directlly from browser the list began full with information from database. However, if i accede to the php page from a link in the HTML page, the list stay empty (so i think the php script does not be executed). If someone please can help me about this. gratefuklly. __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text -- PHP General 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]
RE: [PHP] Arrays : Key in Array, True/False
You need a 2 step approach. 1. extract the keys from your array into another array using array_keys() 2. check the result using in_array() to see if you key exists. -Original Message- From: Knut H. Hassel Nielsen [mailto:[EMAIL PROTECTED]] Sent: 30 March 2001 10:56 To: [EMAIL PROTECTED] Subject: [PHP] Arrays : Key in Array, True/False Hi there I have a script with a function that builds a more comprehensive kind of array for parsing arguments given a script in PHP (this is a backup-script I'm currently working on). My problem is in "THE PARSING OF ARGS PART" when I'm asking the array if the key exists in the array it returns 0. The key exists, I know because of the output from the function ( var_dump($array) ), but the function 'in_array()' only returns true if I ask for a value. Does anyone know if I can use anything else to give me the possibility to also ask for the keys, or do I have to write a 'in_array()'-kind of function myself ?? #! /local/bin/php -q ?PHP // -*- C++ -*- function parse_arg( $argv, $argc ) { $array = Array(); for ( $i = 0 ; $i $argc ; $i++ ) { if ( ereg( "-", $argv[ $i ] ) ) { if ( ereg( "-", $argv[ $i + 1 ] ) ) { $array[ "$argv[$i]" ] = ""; } else { $array[ "$argv[$i]" ] = $argv[ $i + 1 ]; $i = $i + 1; } } } var_dump ($array); return $array; } // THE PARSING OF ARGS PART $arr = parse_arg( $argv, $argc ); if ( in_array( "-h", $arr ) ) { // This doesnt work print $usage; exit; } elseif ( in_array( "-b", $arr ) ) { // This doesnt work $backup = 1; } elseif ( in_array( "-d", $arr ) ) { // This doesnt work while ( list ( $key, $val ) = each ( $arr ) ) { if ( $key == "-d" ) { if ( $val == "" ) { print "No PATH to switch \"-d\"\nExiting\n"; exit; } else { $dir = $val; if ( !is_dir( $dir ) ) { print "This directory [$dir] doesnt exist\n"; exit; } else { $run = 1; } } } } } ? -- Knut -- Knut H. Hassel Nielsen Principal Engineer / Avdelingsingenir Norwegian University of Science and Technology / NTNU Department of Computer and Information Science / IDI N-7491 Trondheim, Norway Phone Office / Telefon jobb : (+47) 73 59 18 46 Fax Office / Telefax jobb : (+47) 73 59 17 33 Cell. Phone / Mobiltelefon : 91 59 86 06 -- PHP General 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] -- PHP General 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]
Re: [PHP] phpinfo unneeded
I fetched my PHP.INI file: disable_functions=; This directive allows you to disable certain ; functions for security reasons. It receives ; a comma separated list of function names. ; This directive is *NOT* affected by whether ; Safe Mode is turned on or off. so search for 'disable_functions' -elias ""juang"" [EMAIL PROTECTED] wrote in message 009301c0b8fc$5d6a2280$0c9fbe0a@asp">news:009301c0b8fc$5d6a2280$0c9fbe0a@asp... HI all, how to compile php without function phpinfo enalbe. so if user call phpinfo() it would be false/error. i would like to build a free web server with php but i don't like if the user know what are the tools in my server 'couse it's a free server. is it possible or it's just a stupid question? -JUANG- -- PHP General 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]
Re: [PHP] phpinfo unneeded
On Fri, Mar 30, 2001 at 05:19:48PM +0700, juang wrote: i have been search the string of "phpinfo" in php.ini there was no phpinfo string found and "safe_mode-stuff" didn't found too. I'll paste the part from my php.ini (it *should* be in the default php.ini coming with php) --- ; Safe Mode safe_mode = Off safe_mode_exec_dir = safe_mode_allowed_env_vars = PHP_ ; Setting certain environment variables safe_mode_protected_env_vars = LD_LIBRARY_PATH disable_functions = --- to disable_functions you can add phpinfo(). -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | PGP signature
Re: [PHP-CVS] cvs: php4 /pear ITX.xml IT[X].xml
On Fri, Mar 30, 2001 at 09:16:55AM -, Ulf Wendel wrote: uwFri Mar 30 01:16:55 2001 EDT Added files: /php4/pearITX.xml Removed files: /php4/pearIT[X].xml Log: - Renamed the file following Thies suggestion 100% beginners compatible politics of the PHP core guys: I was (again) allowed to make a mistake without beeing kicked - cool, thanks! i'll do that next time we meet;-) tc -- PHP CVS 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]
Re: [PHP] Maintaining state
Why don't you use session variables? ""David Hynes"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... What is the best method for tracking a user through a website ? I want to assign a username to a user which I can call up at anytime. Should I use htaccess files and the systems environment variables, or cookies ? Cheers, David. --- Fed202 Solutions www.fed202solutions.com Mobile : 07779 293368 --- -- PHP General 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] -- PHP General 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]
Re: [PHP] regex help...again
So as you seem to be good with regexps, can you tell me how i can write a code that will search for next occurence in a string? where pattern is a regexp and a string is long and ofcourse there will be lots of pattern matchs in it...? thanks "Christian Reiniger" [EMAIL PROTECTED] wrote in message 01033011550005.07394@chrisbig">news:01033011550005.07394@chrisbig... On Friday 30 March 2001 06:47, you wrote: Ok, i have a text file with lines that looks like this: 14```value```value2`value3 This would be fine, except...there are sometimes more than in other columns, so id like it to be 14``value``value2``value3 $new = preg_replace ('/`+/', '``', $old); quite simple, eh? -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "World domination. Fast." (Linus Torvalds about Linux) -- PHP General 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] -- PHP General 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]
Re: [PHP] HTML link to php
Hmm, because the .php file that is referenced from the .html file is like: file://c:\myfile.php ? i mean maybe it's beeing accessed as if a normal file beeing browsed and not a php file that is beeing referenced via the web server.. "moud mohamed" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello world. Using QuickPHP. I have PHP4.03pl1 and Mysql 3.22.34 under WIndows 98 SE. The web server is Apache 1.3. I have a link (in an HTML page) to a php page. In this php page I make a dynamique list( select option like combo list) that pick information from a column table in a Mysql database. So, if i call the php page directlly from browser the list began full with information from database. However, if i accede to the php page from a link in the HTML page, the list stay empty (so i think the php script does not be executed). If someone please can help me about this. gratefuklly. __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text -- PHP General 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] -- PHP General 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]
Re: [PHP] Case?
You must be moving from Pascal alike coding to PHP ;) "acleave" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have tried the online documentation and it either errors out on me or cannot find anything when I search on case. Can someone tell me if PHP supports case statements (or do I just need to do a series of ifs?) and if so where I can find them detailed in the online docs? Thnaks, Allan -- PHP General 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] -- PHP General 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]
[PHP-CVS] cvs: php4 /pear/Experimental/XML sql2xml.php
chregu Fri Mar 30 02:36:42 2001 EDT Modified files: /php4/pear/Experimental/XML sql2xml.php Log: - new user_tableInfo option for user-contributed xml-structure - Error checking in doSql2Xml - xml_encode function for correctly parsing of s. Index: php4/pear/Experimental/XML/sql2xml.php diff -u php4/pear/Experimental/XML/sql2xml.php:1.2 php4/pear/Experimental/XML/sql2xml.php:1.3 --- php4/pear/Experimental/XML/sql2xml.php:1.2 Thu Mar 29 13:26:53 2001 +++ php4/pear/Experimental/XML/sql2xml.php Fri Mar 30 02:36:42 2001 @@ -15,7 +15,7 @@ // | Authors: Christian Stocker [EMAIL PROTECTED] | // +--+ // -// $Id: sql2xml.php,v 1.2 2001/03/29 21:26:53 uw Exp $ +// $Id: sql2xml.php,v 1.3 2001/03/30 10:36:42 chregu Exp $ /** * This class takes a PEAR::DB-Result Object (or more than one) @@ -37,7 +37,7 @@ * for the time being * * @author Christian Stocker [EMAIL PROTECTED] -* @version $Id: sql2xml.php,v 1.2 2001/03/29 21:26:53 uw Exp $ +* @version $Id: sql2xml.php,v 1.3 2001/03/30 10:36:42 chregu Exp $ */ class XML_sql2xml { @@ -71,7 +71,14 @@ /** * +* @var boolean +*/ +var $user_tableInfo = False; + + +/** * +* * @param string */ function XML_sql2xml ($root = "root") { @@ -139,6 +146,11 @@ function doSql2Xml($result, $options = False) { +if (DB::IsError($result)) { +print "Error in file ".__FILE__." at line ".__LINE__."br\n"; +new DB_Error($result-code,PEAR_ERROR_DIE); +} + //set options if (is_array($options)) { @@ -191,6 +203,12 @@ } // end initialize + +// if user made some own tableInfo data, merge them here. +if ($this-user_tableInfo) +{ +$tableInfo = $this-array_merge_clobber($tableInfo,$this-user_tableInfo); +} $parent[root] = $this-insertNewResult($tableInfo); while ($FirstFetchDone || $res = $result-FetchRow($fetchmode)) @@ -299,7 +317,7 @@ */ function insertNewElement($parent, $res, $key, $metadata, $subrow) { -return $parent-new_child($metadata[$key]["name"], utf8_encode($res[$key])); +return $parent-new_child($metadata[$key]["name"], +$this-xml_encode($res[$key])); } @@ -313,5 +331,50 @@ function addTableInfo($key, $value, $metadata) { } + +/** +* +* @param +* @abstract +*/ +function xml_encode ($text) { +$text = utf8_encode(ereg_replace("","amp;",$text)); +return $text; +} +//taken from [EMAIL PROTECTED] at +http://www.php.net/manual/en/function.array-merge-recursive.php +/** +* There seemed to be no built in function that would merge two arrays recursively +and clobber +* any existing key/value pairs. Array_Merge() is not recursive, and +array_merge_recursive +* seemed to give unsatisfactory results... it would append duplicate key/values. +* +* So here's a cross between array_merge and array_merge_recursive +**/ + +/** +* +* @param +* @param +* @abstract +*/ +function array_merge_clobber($a1,$a2) +{ +if(!is_array($a1) || !is_array($a2)) return false; +$newarray = $a1; +while (list($key, $val) = each($a2)) +{ +if (is_array($val) is_array($newarray[$key])) +{ +$newarray[$key] = $this-array_merge_clobber($newarray[$key], $val); +} +else +{ +$newarray[$key] = $val; +} +} +return $newarray; +} + } ? + + -- PHP CVS 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]
[PHP-CVS] cvs: php4 /pear/Experimental/XML sql2xml_ext.php
chregu Fri Mar 30 02:37:35 2001 EDT Modified files: /php4/pear/Experimental/XML sql2xml_ext.php Log: a lot of new customizable options too much to be listed here, documentation will follow. Index: php4/pear/Experimental/XML/sql2xml_ext.php diff -u php4/pear/Experimental/XML/sql2xml_ext.php:1.2 php4/pear/Experimental/XML/sql2xml_ext.php:1.3 --- php4/pear/Experimental/XML/sql2xml_ext.php:1.2 Thu Mar 29 13:26:53 2001 +++ php4/pear/Experimental/XML/sql2xml_ext.php Fri Mar 30 02:37:35 2001 @@ -15,7 +15,7 @@ // | Authors: Christian Stocker [EMAIL PROTECTED] | // +--+ // -// $Id: sql2xml_ext.php,v 1.2 2001/03/29 21:26:53 uw Exp $ +// $Id: sql2xml_ext.php,v 1.3 2001/03/30 10:37:35 chregu Exp $ require_once ("XML/sql2xml.php"); @@ -41,7 +41,7 @@ * for the time being * * @author Christian Stocker [EMAIL PROTECTED] - * @version $Id: sql2xml_ext.php,v 1.2 2001/03/29 21:26:53 uw Exp $ + * @version $Id: sql2xml_ext.php,v 1.3 2001/03/30 10:37:35 chregu Exp $ */ class XML_sql2xml_ext extends XML_sql2xml { @@ -49,11 +49,12 @@ function insertNewRow($parent_row, $res, $key, $tableInfo) { -$new_row = $parent_row-new_child("row", NULL); +$new_row= $parent_row-new_child($tableInfo[$key]["table"],Null); /* make an unique ID attribute in the row element with tablename.id if there's an id otherwise just make an unique id with the php-function, just that there's a unique id for this row. CAUTION: This ID changes every time ;) (if no id from db-table) */ +$new_row-set_attribute("type","row"); if ($res[$tableInfo["id"][$tableInfo[$key]["table"]]]) { if ($res[$tableInfo["id"][$tableInfo[$key]["table"]]] == $this-user_options[id]) @@ -64,7 +65,9 @@ } else { -$new_row-set_attribute("ID", uniqid($tableInfo[$key]["table"])); +$this-IDcounter[$tableInfo[$key]["table"]]++; +$new_row-set_attribute("ID", +$tableInfo[$key]["table"].$this-IDcounter[$tableInfo[$key]["table"]]); + } return $new_row; @@ -72,21 +75,27 @@ function insertNewResult($tableInfo) { - + +if ($this-user_options["result_root"]) +$result_root = $this-user_options["result_root"]; +else +$result_root = $tableInfo[0]["table"]; + if ($this-xmlroot) -$xmlroot=$this-xmlroot-new_child($tableInfo[0]["table"], NULL); +$xmlroot=$this-xmlroot-new_child($result_root,Null); else -$xmlroot= $this-xmldoc-add_root($tableInfo[0]["table"]); - -$xmlroot-set_attribute("type", "Database"); - +$xmlroot= $this-xmldoc-add_root($result_root); +$xmlroot-set_attribute("type","resultset"); return $xmlroot; } function insertNewElement($parent, $res, $key, $tableInfo, $subrow) { -if ($this-user_options["xml_seperator"]) +if (is_array($this-user_options["attributes"]) +in_array($tableInfo[$key]["name"],$this-user_options["attributes"])) { + +$subrow=$parent-set_attribute($tableInfo[$key]["name"],$this-xml_encode($res[$key])); +} +elseif ($this-user_options["xml_seperator"]) { //the preg should be only done once $i = 0; @@ -100,24 +109,23 @@ $subrow[$regs[1][$i]] = $subrow[$regs[1][$i - 1]]-new_child($regs[1][$i], NULL); } } -$subrows = $subrow[$regs[1][$i - 1]]-new_child($regs[1][$i], utf8_encode($res[$key])); +$subrows = $subrow[$regs[1][$i - 1]]-new_child($regs[1][$i], +$this-xml_encode($res[$key])); } else { -$regs[1][0] = $tableInfo[$key]["name"]; -$i = 0; -$subrow=$parent-new_child($regs[1][$i], utf8_encode($res[$key])); +$subrow=$parent-new_child($tableInfo[$key]["name"], +$this-xml_encode($res[$key])); } } function addTableinfo($key, $value, $tableInfo) { - -if (!$metdata["id"][$value[table]] $value[name] == $this-user_options["element_id"] ) +if (!$tableInfo[id][$value["table"]] $value["name"] == +$this-user_options["element_id"] ) { -$tableInfo["id"][$value["table"]] = $key; +$tableInfo[id][$value["table"]]= $key; } - +if ($this-user_options["field_translate"][$value["name"]]) { +$tableInfo[$key]["name"] = +$this-user_options["field_translate"][$value["name"]]; +} } } ? -- PHP CVS 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]
Re: [PHP] Case?
The 'Switch' Statement is what you are looking for. Andy Woolley www.databasewatch.com "elias" [EMAIL PROTECTED] wrote in message 9a1pfp$v4n$[EMAIL PROTECTED]">news:9a1pfp$v4n$[EMAIL PROTECTED]... You must be moving from Pascal alike coding to PHP ;) "acleave" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have tried the online documentation and it either errors out on me or cannot find anything when I search on case. Can someone tell me if PHP supports case statements (or do I just need to do a series of ifs?) and if so where I can find them detailed in the online docs? Thnaks, Allan -- PHP General 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] -- PHP General 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] -- PHP General 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]
[PHP] Delete Problem
Hi, Can anyone see a problem with this? ? $dbase="Failed_Signups"; // Connect to MySQL $Connect=mysql_connect("", "", ""); $www_domain="select Failed_Signups.EmailAddress.Email from Failed_Signups.EmailAddress left join www_domain_net.Members on Failed_Signups.EmailAddress.Email=www_domain_net.Members.EmailAddress where www_domain_net.Members.EmailAddress is null"; $www_domainRESULT=mysql_query($www_domain); $www_domain_rows=mysql_num_rows($www_domainRESULT); for ($a=0; $a$www_domain_rows; $a++) { $www_domain_Array = mysql_fetch_array($www_domainRESULT); printf("%s", $www_domain_Array['Email']); $inlist .= sprintf("%s", $www_domain_Array['Email']); if($a $www_domain_rows - 1) { $inlist .= ", "; } } echo"$inlist"; $query="DELETE FROM EmailAddress WHERE Email NOT IN $inlist"; $query1=mysql_db_query($dbase, $query) or die("Problem1"); // Close MySQL Connection mysql_close($Connect); ? It keeps stopping on $query1 thanks Ade -- PHP General 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]
[PHP] Catagory list
I am trying to make a catagory list that displays a distinct catagory, and then listing titles under that catagory. Unfortunatly all the data is in one table, and the catagory field is not set catagories, so there is duplicates in that field. The code so far is (but I am probably going about it the wrong way, if you can see whats wrong with my code plase help, or point me in some direction), $query = mysql_query("SELECT DISTINCT catagory from article order by catagory"); $query2 = mysql_query ("SELECT * from article ORDER BY catagory"); for ($index = 0; $index mysql_num_rows($query); $index++) { $Catagory = mysql_fetch_row ($query) or die (mysql_error()); $name1 = mysql_fetch_row ($query2) or die (mysql_error()); $x = $name1; $result1 = array_unique($Catagory); $result = array_merge($Catagory, $name1); print ("$result1[0]BR"); for ($x=0; $x == $result1[0]; $x++) { print ("nbsp;nbsp;nbsp;nbsp;a href='update.php?passed=$name1[0]'$name1[2]/abr\n"); } } I am trying everything to get it do just print the following: Catagory title1 title2 Catagory1 title3 title4 Please help me out thanks -- PHP General 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]
Re[2]: [PHP-CVS] cvs: php4 /ext/midgard config.m4 config.m4.session
Hello James, Thursday, March 29, 2001, 2:09:17 PM, you wrote: On Thu, Mar 29, 2001 at 11:50:29AM +0100, James Moore wrote: abThu Mar 29 02:35:33 2001 EDT Modified files: /php4/ext/midgard config.m4 config.m4.session Log: - Typo fixed - config.m4.session updated to config.m4 What does this fix do?? does it need to be included in 4.0.5?? or will ming work without it?? 1) It is not ming but midgard 2) It does add libmidgard.so into the list of linked libraries. Yes, it need to be included into 4.0.5 Hmm.. we dont really want another RC if we can avoid it.. whats the best thing to do here people? Alex, what happens if its not in 4.0.5?? is it related to somthing that has been changed in midgard recently (IE isnt in the RC Branch?) or is it a long term issue that has needed fixing? If It is not related to Midgard itself but it was an error caused by porting PHP module for Midgard to PHP4. I assume that it is general way to add libraries with path in to steps: 1. AC_ADD_LIBRARY_WITH_PATH(library, path, FOO_SHARED_LIBADD) 2. PHP_SUBST(FOO_SHARED_LIBADD) In past second step wasn't done correctly in revision 1.6 (if memory serves me) of config.m4. This commit fixes following error: extension uses functions provided by libmidgard.so but was not linked against it. midgard doesnt work without this change then I suppose it will have to go into 4.0.5 and we will probably need another (quick) RC otherwise I think it can probably wait until 4.0.6. Also can some of you midgard guys build and check the latest RC[4] to make sure midgard works etc as I dont think anyone else is. I think this should be in 4.0.5 or Midgard PHP4 extension will be unusable for masses. I'll do test rebuild with RC4 tonight but could somebody point me to tarball with it on the php.net site? My connection works faster with HTTP traffic than with CVS checkouts. -- Best regards, Alexandermailto:[EMAIL PROTECTED] -- PHP CVS 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]
RE: [PHP] Better way (if...elseif...else)
$fcol = ($priority == "000") ? "high" : (($prioridy == "050") ? "med" : "low"); $pstr .= sprintf( "option value=\"000\" %sHigh\n". "option value=\"050\" %sMedium\n". "option value=\"100\" %sLow\n", ($priority == "000") ? "selected" : "", ($priority == "050") ? "selected" : "", ($priority == "100") ? "selected" : ""); That should do the trick!! Dean -Original Message- From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 3:56 PM To: PHP-General List Subject: [PHP] Better way (if...elseif...else) Is there a better way to write the following snippet: if ($priority == "000") { $fcol="high"; $pstr .= "option value=\"000\" selectedHigh\n"; $pstr .= "option value=\"050\"Medium\n"; $pstr .= "option value=\"100\"Low\n"; } elseif ($priority == "050") { $fcol="med"; $pstr .= "option value=\"000\"High\n"; $pstr .= "option value=\"050\" selectedMedium\n"; $pstr .= "option value=\"100\"Low\n"; } else { $fcol="low"; $pstr .= "option value=\"000\"High\n"; $pstr .= "option value=\"050\"Medium\n"; $pstr .= "option value=\"100\" selectedLow\n"; } I just hate having to repeat pieces of code. This piece here just generates a drop down list of items, with the current one being the selected one. AMK4 -- W | | I haven't lost my mind; it's backed up on tape somewhere. | ~ Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. .eFax 248.671.0909 http://www.pcraft.com . 3550 Arapahoe Ave #6 .. . . . . Boulder, CO 80303, USA -- PHP General 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] -- PHP General 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]
Re: [PHP] Problems getting php to restart samba
So is nobody game to help me on this one, nobody understands the problem or has nobody read this??? hmmm ... I don't quite know how to explain it any better. Simply, using php to restart samba makes php stop responding when the browser tries to call another php page from that server. If anyone thinks they can help but needs better details ask me some specific questions and I'll try and answer them as best I can. Thank, -Tim Churchward -- PHP General 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]
RE: [PHP] Better way (if...elseif...else)
$selected = array(); $selected[$priority] = 'selected'; $pstr .= 'option value="000" '.$selected['000'].'High'."\n"; $pstr .= 'option value="050" '.$selected['050'].'Medium'."\n"; $pstr .= 'option value="100" '.$selected['100'].'Low'."\n"; Is one way of doing that sort of thing, the example below looks a bit difficult to read, but that may just be me seeing as I never use the ternary operator. This solution can also be easily be written as a lopp. I didn't do anything with your $fcol, but that can be solved in a simliar fashion... Andr Nss -Original Message- From: Grimes, Dean [mailto:[EMAIL PROTECTED]] Sent: 30. mars 2001 15:17 To: 'Ashley M. Kirchner'; PHP-General List Subject: RE: [PHP] Better way (if...elseif...else) $fcol = ($priority == "000") ? "high" : (($prioridy == "050") ? "med" : "low"); $pstr .= sprintf( "option value=\"000\" %sHigh\n". "option value=\"050\" %sMedium\n". "option value=\"100\" %sLow\n", ($priority == "000") ? "selected" : "", ($priority == "050") ? "selected" : "", ($priority == "100") ? "selected" : ""); That should do the trick!! Dean -Original Message- From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 3:56 PM To: PHP-General List Subject: [PHP] Better way (if...elseif...else) Is there a better way to write the following snippet: if ($priority == "000") { $fcol="high"; $pstr .= "option value=\"000\" selectedHigh\n"; $pstr .= "option value=\"050\"Medium\n"; $pstr .= "option value=\"100\"Low\n"; } elseif ($priority == "050") { $fcol="med"; $pstr .= "option value=\"000\"High\n"; $pstr .= "option value=\"050\" selectedMedium\n"; $pstr .= "option value=\"100\"Low\n"; } else { $fcol="low"; $pstr .= "option value=\"000\"High\n"; $pstr .= "option value=\"050\"Medium\n"; $pstr .= "option value=\"100\" selectedLow\n"; } I just hate having to repeat pieces of code. This piece here just generates a drop down list of items, with the current one being the selected one. -- PHP General 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]
[PHP-CVS] cvs: php4 /pear/Experimental/XML fo2pdf.php
chregu Fri Mar 30 04:55:07 2001 EDT Modified files: /php4/pear/Experimental/XML fo2pdf.php Log: printPDF() din't print out the correct header, if no pdf was specified Index: php4/pear/Experimental/XML/fo2pdf.php diff -u php4/pear/Experimental/XML/fo2pdf.php:1.4 php4/pear/Experimental/XML/fo2pdf.php:1.5 --- php4/pear/Experimental/XML/fo2pdf.php:1.4 Thu Mar 29 13:26:53 2001 +++ php4/pear/Experimental/XML/fo2pdf.php Fri Mar 30 04:55:07 2001 @@ -15,7 +15,7 @@ // | Authors: Christian Stocker [EMAIL PROTECTED] | // +--+ // -// $Id: fo2pdf.php,v 1.4 2001/03/29 21:26:53 uw Exp $ +// $Id: fo2pdf.php,v 1.5 2001/03/30 12:55:07 chregu Exp $ /** @@ -84,7 +84,7 @@ *print $cache-end("+30"); * * @author Christian Stocker [EMAIL PROTECTED] -* @version $Id: fo2pdf.php,v 1.4 2001/03/29 21:26:53 uw Exp $ +* @version $Id: fo2pdf.php,v 1.5 2001/03/30 12:55:07 chregu Exp $ * @package XML */ @@ -246,8 +246,9 @@ */ function printPDF($pdf = "") { + $pdf = $this-returnPDF($pdf); Header("Content-type: application/pdf\nContent-Length: " . strlen($pdf)); - print $this-returnPDF($pdf); + print $pdf; } /** @@ -260,7 +261,7 @@ * @see run() */ function returnPDF($pdf = "") -{ + { if (!$pdf) $pdf = $this-pdf; @@ -271,4 +272,4 @@ } } -? \ No newline at end of file +? -- PHP CVS 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]
[PHP-CVS] cvs: php4 /pear/Experimental/XML sql2xml.php
chregu Fri Mar 30 04:55:30 2001 EDT Modified files: /php4/pear/Experimental/XML sql2xml.php Log: too much whitespaces after ? Index: php4/pear/Experimental/XML/sql2xml.php diff -u php4/pear/Experimental/XML/sql2xml.php:1.4 php4/pear/Experimental/XML/sql2xml.php:1.5 --- php4/pear/Experimental/XML/sql2xml.php:1.4 Fri Mar 30 03:03:11 2001 +++ php4/pear/Experimental/XML/sql2xml.php Fri Mar 30 04:55:30 2001 @@ -15,7 +15,7 @@ // | Authors: Christian Stocker [EMAIL PROTECTED] | // +--+ // -// $Id: sql2xml.php,v 1.4 2001/03/30 11:03:11 chregu Exp $ +// $Id: sql2xml.php,v 1.5 2001/03/30 12:55:30 chregu Exp $ /** * This class takes a PEAR::DB-Result Object (or more than one) @@ -37,7 +37,7 @@ * for the time being * * @author Christian Stocker [EMAIL PROTECTED] -* @version $Id: sql2xml.php,v 1.4 2001/03/30 11:03:11 chregu Exp $ +* @version $Id: sql2xml.php,v 1.5 2001/03/30 12:55:30 chregu Exp $ */ class XML_sql2xml { @@ -376,5 +376,3 @@ } ? - - -- PHP CVS 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]
[PHP] GZip: NS or HTTP/1.0
Okay guys I've got a new idea I just found out that NS5 uses HTTP/1.0 and not HTTP/1.1. Well, okay, but that's not _to_ exciting is it?! But... (there's always a 'but') IE=5 uses HTTP/1.1. Now, looking back at the subject being discussed in this thread, I'm wondering if that might be the problem that arises when using the gzhandler. Example On our server we use the multi-views: no extensions required! So, instead of calling 'page.php' I just call 'page'. Nothing wrong with that, not even for NS. But... (there it is again!) I made the following (test) page: HTML HEAD TITLEPHP Info/TITLE STYLE type="text/css" BODY { background-color: #ff; } /STYLE /HEAD BODY ? phpinfo(); ? /BODY /HTML I've named this file 'php-info.php'. So... Now I call this page from IE (5) calling 'php-info'. Guess what? Nothing wrong; works perfectly! And now the big NS test. S*cks!!! Calling 'php-info' from NS provides me the next error: ..."no acceptable variant: "... This error is server-side and only occurs when using HTTP/1.0. So I was wondering if the HTTP/1.0 can also be the cause of the printing problem concering the gzhandler? If that's the case I should disable the compression for each and every browser that uses HTTP/1.0 instead of only disabling it for NS. -- * RzE: *** ** Renze Munnik ** ** E: [EMAIL PROTECTED] ** M: +31 6 218 111 43 *** -- PHP General 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]
Re: [PHP] php error code.
Whoa Whoa! Wait a minute! There is a couple of webservers here that use PHP. Some of them when it display the error message or warning message, it never display the "include_path='.:/usr/local/lib/php.ini'". Some of the other, it did display the "include_path'.:/usr/local/lib/php.ini'". So, something definitely is going on that I don't know about. So, I wanted to know how to turn off the display "include_path'.:/usr/local/lib/php.ini' when there is a error message. That's all. Scott ""Scott Fletcher"" [EMAIL PROTECTED] wrote in message 9a04nt$5bi$[EMAIL PROTECTED]">news:9a04nt$5bi$[EMAIL PROTECTED]... Hi! When the website have a script error, it display the error message (sort of a debugging error). What I don't like about that error message is that it display the include_path comments. Warning: Failed opening '../dp_banner_menu_final1_support.php' for inclusion (include_path='.:/usr/local/lib/php.ini') in /home/website/test_knowledge_base/support/tech_support.php on line 10 The comment with "(include_path='.:/usr/local/lib/php.ini')". It would tell people where the the php.ini file is and would encourage somebody to hack into it. What can I do about it? Would I be better off with using the PHP x.xx.xx pl1 instead of PHP x.xx.xx? Thanks, Scott -- PHP General 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] -- PHP General 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]
Re: [PHP] version????
One more question! Why does some PHP 4.0 up does not have the php.ini file? I noticed for the UNIX, there isn't one. For Caldera, there is one. For Windows, there is one. So, what's up with that Scott ""Scott Fletcher"" [EMAIL PROTECTED] wrote in message 9a04gk$116$[EMAIL PROTECTED]">news:9a04gk$116$[EMAIL PROTECTED]... Hi! Can anyone tell me what the difference with those PHP version? I see the version, "PHP 4.0.4pl1" with a "pl1" and some other version, "PHP 4.0.4" without a "pl1". Does either of these version had to do with php.ini file? Thanks, Scott -- PHP General 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] -- PHP General 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]
Re: [PHP] Problems getting php to restart samba
Don't have the foggiest idea how to help, but I can ask questions 1. What code are you using? 2. Have you tried all of the system calls? and, out of curiosity, 3. Why? Samba strikes me as the sort of thing you would want to manage with a SSH login if you have to do it remotely. Miles At 11:33 PM 3/30/01 +1000, Tim Churchward wrote: So is nobody game to help me on this one, nobody understands the problem or has nobody read this??? hmmm ... I don't quite know how to explain it any better. Simply, using php to restart samba makes php stop responding when the browser tries to call another php page from that server. If anyone thinks they can help but needs better details ask me some specific questions and I'll try and answer them as best I can. Thank, -Tim Churchward -- PHP General 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] -- PHP General 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]
Re: [PHP] Catagory list
please try this: - I didn't really get what you mean, but i can see that you have a table such: Table fields: category, fieldx, fieldy, fieldz, title and you want to display it's data as: category 1 title1 (belonging to cat1) title2 (...) title3 () title4 (...) cat2 titlex titley titlez that what you said, right? okay, try this: ** $result = mysql_query ("SELECT * from article ORDER BY catagory"); $temp = ""; while ($r = mysql_fetch_array($result)) { if (empty($temp)) // will be fired only once! { $temp = $r["category"]; // get category name echo "This is category $temp, and it's titles are as following:br"; // display it } if ($temp != $r["category"]) // because it's sorted by category, this method will work! echo "This is category $temp, and it's titles are as following:br"; // display it // update last category name $temp = $r["category"]; echo "this is title " . $r["title"] . "br"; } ** - ""Mark Bayfield"" [EMAIL PROTECTED] wrote in message 9a1u3q$k81$[EMAIL PROTECTED]">news:9a1u3q$k81$[EMAIL PROTECTED]... I am trying to make a catagory list that displays a distinct catagory, and then listing titles under that catagory. Unfortunatly all the data is in one table, and the catagory field is not set catagories, so there is duplicates in that field. The code so far is (but I am probably going about it the wrong way, if you can see whats wrong with my code plase help, or point me in some direction), $query = mysql_query("SELECT DISTINCT catagory from article order by catagory"); $query2 = mysql_query ("SELECT * from article ORDER BY catagory"); for ($index = 0; $index mysql_num_rows($query); $index++) { $Catagory = mysql_fetch_row ($query) or die (mysql_error()); $name1 = mysql_fetch_row ($query2) or die (mysql_error()); $x = $name1; $result1 = array_unique($Catagory); $result = array_merge($Catagory, $name1); print ("$result1[0]BR"); for ($x=0; $x == $result1[0]; $x++) { print ("nbsp;nbsp;nbsp;nbsp;a href='update.php?passed=$name1[0]'$name1[2]/abr\n"); } } I am trying everything to get it do just print the following: Catagory title1 title2 Catagory1 title3 title4 Please help me out thanks -- PHP General 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] -- PHP General 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]
RE: [PHP] RE: [PHP-DB] Best way to check if a query succeeded
Wouldn't doing it like this however be ok: if ($result = mysql_query($query)) { I could be wrong, but I do not believe so. The above would evaluate as _true_ 100% of the time because irregardless of success of the query, $result is getting a value. It's just like doing: $i = "joe"; if( $i = "bob" ) { // this will always run. } Again, I could be wrong but don't think I am. Chris
Re: [PHP] version????
as for the pl{x} notation, i ask what is the rc{x} notation ? ""Scott Fletcher"" [EMAIL PROTECTED] wrote in message 9a04gk$116$[EMAIL PROTECTED]">news:9a04gk$116$[EMAIL PROTECTED]... Hi! Can anyone tell me what the difference with those PHP version? I see the version, "PHP 4.0.4pl1" with a "pl1" and some other version, "PHP 4.0.4" without a "pl1". Does either of these version had to do with php.ini file? Thanks, Scott -- PHP General 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] -- PHP General 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]
Re: [PHP] Delete Problem
On Friday 30 March 2001 14:14, you wrote: echo"$inlist"; $query="DELETE FROM EmailAddress WHERE Email NOT IN $inlist"; $query="DELETE FROM EmailAddress WHERE Email NOT IN ($inlist)"; -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Even idiots can handle computers, and many do. -- PHP General 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]
Re: [PHP] How do I disable show_source and highlight file?
Hi, are you using PHP for windows? well, i know that there is a key in the php.ini: disable_functions=; This directive allows you to disable certain ; functions for security reasons. It receives ; a comma separated list of function names. ; This directive is *NOT* affected by whether ; Safe Mode is turned on or off. ""Sam Goin"" [EMAIL PROTECTED] wrote in message 00c301c0b7e6$e5000a00$6801a8c0@sam">news:00c301c0b7e6$e5000a00$6801a8c0@sam... How to I disable the functions show_source and highlight_file? I can't find any documentation anywhere on how to disable it or secure against it. What is there to prevent a user on my server from seeing my password file or database connection scripts? Thanks, Sam -- PHP General 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]
[PHP-CVS] cvs: php4 /build genif.sh print_include.awk
sas Fri Mar 30 06:02:20 2001 EDT Modified files: /php4/build genif.sh print_include.awk Log: Replace the incomprehensible newline escaping with @NEWLINE@ Fixes the build on Darwin 1.2 Index: php4/build/genif.sh diff -u php4/build/genif.sh:1.1 php4/build/genif.sh:1.2 --- php4/build/genif.sh:1.1 Wed Dec 20 09:21:37 2000 +++ php4/build/genif.sh Fri Mar 30 06:02:20 2001 @@ -1,6 +1,6 @@ #! /bin/sh -# $Id: genif.sh,v 1.1 2000/12/20 17:21:37 sas Exp $ +# $Id: genif.sh,v 1.2 2001/03/30 14:02:20 sas Exp $ # replacement for genif.pl infile="$1" @@ -23,7 +23,7 @@ cd $srcdir for ext in ${1+"$@"} ; do - module_ptrs=" phpext_${ext}_ptr,\\\n$module_ptrs" + module_ptrs=" phpext_${ext}_ptr,@NEWLINE@$module_ptrs" header_list="$header_list ext/$ext/*.h" done @@ -35,7 +35,7 @@ sed \ -e "s'@EXT_INCLUDE_CODE@'$includes'" \ -e "s'@EXT_MODULE_PTRS@'$module_ptrs'" \ - -e 's/[\]n/\ + -e 's/@NEWLINE@/\ /g' Index: php4/build/print_include.awk diff -u php4/build/print_include.awk:1.1 php4/build/print_include.awk:1.2 --- php4/build/print_include.awk:1.1Wed Dec 20 08:29:07 2000 +++ php4/build/print_include.awkFri Mar 30 06:02:20 2001 @@ -1,6 +1,6 @@ /phpext_/ { if (old_filename != FILENAME) { - printf "#include \"" FILENAME "\"n" + printf "#include \"" FILENAME "\"@NEWLINE@" old_filename = FILENAME } } -- PHP CVS 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]
[PHP] perl: use strict
does php have an equivalent to perl's 'use strict' to help catch variable misspellings?? Thanks, Morgan -- PHP General 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]
Re: [PHP] GZip: NS or HTTP/1.0
On Fri, Mar 30, 2001 at 08:06:21AM -0600, Brad S. Jackson wrote: I've tested the ob_gzhandler with PHP 4.0.4pl1 and Netscape 4.76 and it works fine for me. I don't know why some people have problems. I doubt it has anything to do with HTTP 1.1 and this can be tested by disabling 1.1 support in the IE advanced options. I think compression is controlled entirely by the browser sending an Accept-Encoding: gzip header and the server responding with a Content-Encoding: gzip header. It's possible that the server is compressing with the deflate method, which I think Netscape doesn't support. Well I never said that NS doesn't support compression. Using the gzhandler works just fine with NS. The problem hower is a different one. The page is shown perfectly, but when you try to print it, NS 'forgets'(?) to decompress it. _That's_ what's wrong. Another thing is 'view source'. Then (I think) NS doesn't decompress either, 'cause NS then says that the document is 'Untitled' and no code is shown _at all_. And for the HTTP-thing I started You're exactly right! Painful to see the answer on a question and notice that the answer is _SO SIMPLE_. "Just go to Tools, go to Internet Options, go to Advanced, disabled 'Use HTTP/1.1'". G, and then knowing that I've been developping and testing for years now. Something so extremely simple, and I just _DID NOT THINK ABOUT IT_. Anyway... I disabled it and it makes no difference. Conclusion (for now...): HTTP/1.0 is not the problem, NS is. Another lovely bug from the NS-services. So This was a pretty useless try from me. Thanks for attending me to the very basics of IE-testing (...) -- * RzE: *** ** Renze Munnik ** ** E: [EMAIL PROTECTED] ** M: +31 6 218 111 43 *** -- PHP General 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]
Re: [PHP] php error code.
On Friday 30 March 2001 15:54, you wrote: Warning: Failed opening '../dp_banner_menu_final1_support.php' for inclusion (include_path='.:/usr/local/lib/php.ini') in /home/website/test_knowledge_base/support/tech_support.php on line 10 The comment with "(include_path='.:/usr/local/lib/php.ini')". It would tell people where the the php.ini file is and would encourage somebody to hack into it. Don't worry about that. if someone can get enough rights on your server to edit php.ini, then he can also execute "find" to, well, find it in the first place. So it absolutely doesn't matter whether that info is displayed or not. btw - No user should get a warning on your pages anyway :) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Even idiots can handle computers, and many do. -- PHP General 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]
Re: [PHP] Good Free PHP Editor - And it's not Edit Plus!
btw, since when EditPlus was for free? ""James Crowley"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dear All, Given the recent discussion regarding a PHP editor, I thought you would like to know that VB Web Development have finally released Developers Pad BETA 2. This program is open source, and free. It's features include syntax highlighting (fully customizable), powerful project view, auto-indent, quick HTML tag insert, open linked file and more. It is available for download at http://developerspad.vbdiamond.com/download/ and you can talk to me (and everyone else) about it at http://developerspad.vbdiamond.com/forum/ If you have any problems with the new release, don't have any hestitation in contacting me. New Features for BETA 2: - Enhanced Project View * Virtual folders * Saved in XML Format * Can open VB, VC++ and .NET Project Files - Enhanced Editor Window * Open Linked File Shortcut * Jump-To Procedure List * Quick HTML Tag Insert - Extended Language Support * Now includes support for SQL, VB.NET and C# - Less Bugs! - Improved Add-In Support * New Add-In Object Model We are currently looking for sponsors! If there is a company out there interested in sponsoring Developers Pad and its site, please e-mail me. Regards, - James Editor, VB Web == Web - http://www.vbweb.co.uk Email - [EMAIL PROTECTED] ICQ# - 60612011 == -- PHP General 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] -- PHP General 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]
Re: [PHP] RE: [PHP-DB] Best way to check if a query succeeded
On Friday 30 March 2001 16:25, you wrote: Wouldn't doing it like this however be ok: if ($result = mysql_query($query)) { I could be wrong, but I do not believe so. The You are wrong :) ($result = mysql_query(...)) assigns a value to result, and the entire expression evaluates to that value (i.e. the return value of mysql_query). if( $i = "bob" ) { // this will always run. yes, because "bob" evaluates to true :) } -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Even idiots can handle computers, and many do. -- PHP General 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]
[PHP] HELP WITH SHIPPING MODULE
Hi, Im wondering if anyone knows of a shipping module I can use to integrate with my shopping cart solution. Thanks, Craig
Re: [PHP] GZip: NS or HTTP/1.0
I don't think it's anything to do with HTTP 1.0 or 1.1. It's simply the fact that NS gets a copy of the website for everything, all the time. Resized the window? OOPS! Guess I need a new copy of the file I just got 5 seconds ago! Stupid stupid stupid. I think it's simply down to the fact that no one ever thought someone would print out a compressed web page, and they never tested it. Seeing how long it takes the mozilla project to do anything, my guess is confirmed more and more as I see no good bug checking or testing before releases are made. Couple that with the feature bloat and mission creep, you can see why something as trivial as PRINTING never got thoroughly tested. But MathML. Wow! We sure need that... I'm not dogging all open source stuff. Apache is still chugging away just nicely, making good progress, imo. Linux? Of course. And PHP. In the time since mozilla was announced, PHP went from 3 to 4, had numerous upgrades, had a company formed around it(!) and has created a new industry and standard around it. All because of a relative handful of dedicated people with a common goal. Stopping my rant now... Renze Munnik wrote: Okay guys I've got a new idea I just found out that NS5 uses HTTP/1.0 and not HTTP/1.1. Well, okay, but that's not _to_ exciting is it?! But... (there's always a 'but') IE=5 uses HTTP/1.1. Now, looking back at the subject being discussed in this thread, I'm wondering if that might be the problem that arises when using the gzhandler. Example On our server we use the multi-views: no extensions required! So, instead of calling 'page.php' I just call 'page'. Nothing wrong with that, not even for NS. But... (there it is again!) I made the following (test) page: HTML HEAD TITLEPHP Info/TITLE STYLE type="text/css" BODY { background-color: #ff; } /STYLE /HEAD BODY ? phpinfo(); ? /BODY /HTML I've named this file 'php-info.php'. So... Now I call this page from IE (5) calling 'php-info'. Guess what? Nothing wrong; works perfectly! And now the big NS test. S*cks!!! Calling 'php-info' from NS provides me the next error: ..."no acceptable variant: "... This error is server-side and only occurs when using HTTP/1.0. So I was wondering if the HTTP/1.0 can also be the cause of the printing problem concering the gzhandler? If that's the case I should disable the compression for each and every browser that uses HTTP/1.0 instead of only disabling it for NS. -- PHP General 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]
Re: [PHP] regex help...again
On Saturday 31 March 2001 00:07, you wrote: So as you seem to be good with regexps, can you tell me how i can write a code that will search for next occurence in a string? where pattern is a regexp and a string is long and ofcourse there will be lots of pattern matchs in it...? What about simply using preg_match_all() ? Or do you specifically need the positions of the matches (instead of the values)? -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Even idiots can handle computers, and many do. -- PHP General 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]
[PHP] MS SQL error handling...
isn't there a better way to handle MS SQL error messages? I can't even fetch them... look at these warnings... they only show in development side, I don't want warnings on the production site, so I turn them off with error_reporting()... Warning: MS SQL message: There is already an object named 'FK_genre_genre' in the database. (severity 16) in S:\Inetpub\wwwroot\liquid\liquid_catalog_update.php on line 607 Warning: MS SQL message: Could not create constraint. See previous errors. (severity 16) in S:\Inetpub\wwwroot\liquid\liquid_catalog_update.php on line 607 Warning: MS SQL: Query failed in S:\Inetpub\wwwroot\liquid\liquid_catalog_update.php on line 607 Could not create constraint. See previous errors. -- this is what I get from mssql_get_last_message() MS SQL: Query failed -- this is the content of $php_errormsg you guys have to agree with me, that neither of them help me at all why can't I fetch the first Warning, the one with the really interesting content???
Re: [PHP] version????
On Saturday 31 March 2001 03:34, you wrote: as for the pl{x} notation, i ask what is the rc{x} notation ? Release Candidate -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Even idiots can handle computers, and many do. -- PHP General 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]
[PHP] PHP Editor for Linux
Hi there! I use bluefish for HTML and PHP coding, but I'm not too happy with it. Do you know a good PHP Editor for Linux, besides Emacs and xjed...? TIA -- PHP General 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]
[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/pgsql pgsql.c
zeevFri Mar 30 06:57:02 2001 EDT Modified files: (Branch: PHP_4_0_5) /php4/ext/pgsql pgsql.c Log: Revert all PostgreSQL patches that were in the branch... Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.93.2.2 php4/ext/pgsql/pgsql.c:1.93.2.3 --- php4/ext/pgsql/pgsql.c:1.93.2.2 Thu Mar 29 23:36:21 2001 +++ php4/ext/pgsql/pgsql.c Fri Mar 30 06:57:02 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.93.2.2 2001/03/30 07:36:21 romolo Exp $ */ +/* $Id: pgsql.c,v 1.93.2.3 2001/03/30 14:57:02 zeev Exp $ */ #include stdlib.h @@ -531,9 +531,7 @@ if (id!=-1 || (pgsql_link Z_RESVAL_PP(pgsql_link)==PGG(default_link))) { - if (id!=-1) { - zend_list_delete(PGG(default_link)); - } + zend_list_delete(PGG(default_link)); PGG(default_link) = -1; } -- PHP CVS 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]
Re: [PHP] GZip: NS or HTTP/1.0
On Fri, Mar 30, 2001 at 09:53:53AM -0500, Michael Kimsal wrote: You REALLY don't want to specifically ignore Netscape users, do you? :) Any browser that can accept gzipped stuff sends a content-accept header. Netscape tells the server it can handle gzipped stuff, so the server can send it. Other browsers (HTTP 1.0, 1.1, or whatever) can choose to tell the server what they can accept, regardless of HTTP version. Netscape can handle the gzipped stuff just fine - they prove it by rendering it. It's simply their printing logic which is messed up. Face it - just disable gzipping for Netscape users. JUST DO IT! Anyone else who can't handle gzipped stuff will have the good sense to not announce that it can accept it in the headers. Renze Munnik wrote: This error is server-side and only occurs when using HTTP/1.0. So I was wondering if the HTTP/1.0 can also be the cause of the printing problem concering the gzhandler? If that's the case I should disable the compression for each and every browser that uses HTTP/1.0 instead of only disabling it for NS. Hi there Michael, Eh... No! 'Course I'm not gon' ignore all NS users. I'm just gon' disable compress'n f'r 'm. I nev'r had ( nev'r will have) the intens'n of blocking 'm out. But I explicitly off'r the poss. of print'n out the page, so it must always work. As long as I enable compress'n, NS-us'rs can't print the page. So... no compress'n for 'm. Or someone sh'ld have a bett'r idea. I mean... NS s'nds the head'r tellin' my serv'r that it supp'rts gzip - my serv'r then s'nds the compress'd page - then NS rememb'rs it doesn't want to decompr'ss it and prints the compr'ss'd sh!t. And bring'n up the whole HTTP-thin' was a stupid idea from my side. Just forg't to t'st my "theory" prop'rly. Sorry!! So... f'r n'w I'm g'nna disable compr'ssion f'r NS-us'rs, 'till someone has anoth'r solut'n. [sorry 'bout all them '-s, but I'm working to long today] -- * RzE: *** ** Renze Munnik ** ** E: [EMAIL PROTECTED] ** M: +31 6 218 111 43 *** -- PHP General 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]
Re: [PHP] Array in Session-Vars?
Simply registering the array works for me. I don't have to monkey with any serializing or anything. Mike elias wrote: I never tried to use arrays in session variables, but i believe if you try to serialize the array first and then register the serialized value as session value it should work. and ofcourse to retrieve it do reverse work by unserializing the variable back to the array and use it. - $a = Array("asdad", "adasd", "123123", "6adas f g"); echo ($s = serialize($a)) . "br"; // you can session_register($s) unset($a); // in file2 you can retrieve $s and make $a back again: $a = unserialize($s); var_dump($a); - -elias Hi, Never tried it either, but from previous postings I remember you should just be able to use array's with no prob's. (4 all I can remember i.e.) * RzE: *** ** Renze Munnik ** ** E: [EMAIL PROTECTED] ** M: +31 6 218 111 43 *** -- Michael Champagne, Software Engineer Capital Institutional Services, Inc. wk: [EMAIL PROTECTED] hm: [EMAIL PROTECTED] ** This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction, unless specifically agreed otherwise. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect the views or opinions of Capital Institutional Services, Inc. Capital Institutional Services, Inc. accepts no liability for any errors or omissions arising as a result of transmission. Use of this communication by other than intended recipients is prohibited. ** -- PHP General 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]
Re: [PHP] PHP Editor for Linux
What about the greatness of VIM? Hi there! I use bluefish for HTML and PHP coding, but I'm not too happy with it. Do you know a good PHP Editor for Linux, besides Emacs and xjed...? TIA -- Michael Champagne, Software Engineer Capital Institutional Services, Inc. wk: [EMAIL PROTECTED] hm: [EMAIL PROTECTED] ** This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction, unless specifically agreed otherwise. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect the views or opinions of Capital Institutional Services, Inc. Capital Institutional Services, Inc. accepts no liability for any errors or omissions arising as a result of transmission. Use of this communication by other than intended recipients is prohibited. ** -- PHP General 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]
RE: [PHP] PHP Editor for Linux
VIM? No thanks :-) :wq - Original Message - From: Michael Champagne [EMAIL PROTECTED] To: Martin Cabrera Diaubalick [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, March 30, 2001 5:13 PM Subject: Re: [PHP] PHP Editor for Linux What about the greatness of VIM? Hi there! I use bluefish for HTML and PHP coding, but I'm not too happy with it. Do you know a good PHP Editor for Linux, besides Emacs and xjed...? TIA -- Michael Champagne, Software Engineer Capital Institutional Services, Inc. wk: [EMAIL PROTECTED] hm: [EMAIL PROTECTED] ** This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction, unless specifically agreed otherwise. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect the views or opinions of Capital Institutional Services, Inc. Capital Institutional Services, Inc. accepts no liability for any errors or omissions arising as a result of transmission. Use of this communication by other than intended recipients is prohibited. ** -- PHP General 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]
[PHP] urgent configure-problem, 2'nd
Hi, now the problem is that the configure-tool searches the apache-file "httpd.h". We use the IBM HTTPServer and its installation-base is not /../apache.x.x.x what the configure-tool searches for when using the with-apache-flag but /.../HTTPServer. Therefore we created a link with the name apachex.x.x which pointed to the HTTPServer-directory. But that didn't solve the problem. The output is: configure: error: Invalid Apache directory - unable to find httpd.h under /usr/apache_1.3.12 Thank you again for help, Markus Mattes e-mail: [EMAIL PROTECTED] -- PHP General 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]
Re: [PHP] PHP Editor for Linux
Read back a couple of days and you'll probably see multiple answers to this question. -- phill ""Martin Cabrera Diaubalick"" [EMAIL PROTECTED] wrote in message 005b01c0b92c$8bd3ff80$[EMAIL PROTECTED]">news:005b01c0b92c$8bd3ff80$[EMAIL PROTECTED]... VIM? No thanks :-) :wq - Original Message - From: Michael Champagne [EMAIL PROTECTED] To: Martin Cabrera Diaubalick [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, March 30, 2001 5:13 PM Subject: Re: [PHP] PHP Editor for Linux What about the greatness of VIM? Hi there! I use bluefish for HTML and PHP coding, but I'm not too happy with it. Do you know a good PHP Editor for Linux, besides Emacs and xjed...? TIA -- Michael Champagne, Software Engineer Capital Institutional Services, Inc. wk: [EMAIL PROTECTED] hm: [EMAIL PROTECTED] ** This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction, unless specifically agreed otherwise. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect the views or opinions of Capital Institutional Services, Inc. Capital Institutional Services, Inc. accepts no liability for any errors or omissions arising as a result of transmission. Use of this communication by other than intended recipients is prohibited. ** -- PHP General 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] -- PHP General 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]