OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: php-general-digest-helplists.php.net
Date: Fri Mar 30 2001 - 13:37:41 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    php-general Digest 30 Mar 2001 19:37:41 -0000 Issue 598

    Topics (messages 46238 through 46368):

    Re: regex help...again
            46238 by: elias
            46284 by: Christian Reiniger
            46299 by: elias
            46324 by: Christian Reiniger

    Array in Session-Vars?
            46239 by: Thomas Häger
            46243 by: elias
            46252 by: Renze Munnik
            46264 by: Rudolf Visagie
            46275 by: Yasuo Ohgaki
            46329 by: Michael Champagne

    IMAGES IN NETSCAPE SSL NOT SHOWING UP
            46240 by: Craig Cameron

    Re: Passing by reference deprecated?
            46241 by: Neil Kimber
            46267 by: Yasuo Ohgaki
            46281 by: Neil Kimber

    Problem in retreving values from more than one multi select in form
            46242 by: Vishak Tomy
            46245 by: elias

    Re: [ANSWER] problem uploading big (50MB) file
            46244 by: Matt Williams
            46249 by: Jack Dempsey

    Re: Compile .php file is possible ?
            46246 by: Jack Dempsey
            46248 by: elias
            46251 by: Marian Vasile
            46253 by: Jack Dempsey
            46256 by: Marian Vasile
            46257 by: Jack Dempsey
            46258 by: Marian Vasile
            46259 by: Remco B. Brink
            46260 by: Jack Dempsey
            46261 by: rui.websolut.net
            46263 by: Marian Vasile
            46265 by: Remco B. Brink
            46266 by: Dominick Vansevenant
            46268 by: Jack Dempsey
            46269 by: Remco B. Brink
            46270 by: Marian Vasile
            46271 by: Pavel Kalian
            46272 by: Marian Vasile
            46277 by: Jack Dempsey
            46286 by: Christian Reiniger
            46287 by: Christian Reiniger
            46289 by: Christian Reiniger

    Re: Image Resizing in PHP
            46247 by: Patrick Dunford
            46282 by: Christian Reiniger
            46288 by: Felix Kronlage

    Need help with file include
            46250 by: Peter Stevens
            46254 by: Jack Dempsey
            46274 by: Peter Stevens

    Regular expression benchmark?
            46255 by: Yasuo Ohgaki

    Re: initialize session module
            46262 by: Yasuo Ohgaki

    Re: Setcookie not working
            46273 by: Yasuo Ohgaki

    phpinfo unneeded
            46276 by: juang
            46278 by: Jack Dempsey
            46280 by: Felix Kronlage
            46291 by: juang
            46296 by: elias
            46297 by: Felix Kronlage
            46357 by: Matt McClanahan
            46360 by: James Moore

    Re: Pattern Replacing
            46279 by: Christian Reiniger

    Re: apache_lookup_uri problem
            46283 by: Yasuo Ohgaki

    Arrays : Key in Array, True/False
            46285 by: Knut H. Hassel Nielsen
            46295 by: Neil Kimber

    Re: Running a script without flowing
            46290 by: Mukul Sabharwal

    Re: Better way (if...elseif...else)
            46292 by: Robert Vetter
            46305 by: Grimes, Dean
            46307 by: André Næss

    urgent configure-problem, 2'nd
            46293 by: MMATTES.de.ibm.com
            46332 by: MMATTES.de.ibm.com

    HTML link to php
            46294 by: moud mohamed
            46300 by: elias

    Re: Maintaining state
            46298 by: elias

    Re: Case?
            46301 by: elias
            46302 by: Andy Woolley

    Delete Problem
            46303 by: KPortsmout.aol.com
            46315 by: Christian Reiniger
            46350 by: Sam Masiello
            46352 by: KPortsmout.aol.com

    Catagory list
            46304 by: Mark Bayfield
            46312 by: elias

    Re: Problems getting php to restart samba
            46306 by: Tim Churchward
            46311 by: Miles Thompson

    Re: NS or HTTP/1.0
            46308 by: Renze Munnik
            46318 by: Renze Munnik
            46323 by: Michael Kimsal
            46328 by: Renze Munnik

    Re: php error code.
            46309 by: Scott Fletcher
            46319 by: Christian Reiniger

    Re: version????
            46310 by: Scott Fletcher
            46314 by: elias
            46326 by: Christian Reiniger
            46341 by: Michael Kimsal

    Re: [PHP-DB] Best way to check if a query succeeded
            46313 by: Boget, Chris
            46321 by: Christian Reiniger

    Re: How do I disable show_source and highlight file?
            46316 by: elias

    Re: use strict
            46317 by: Morgan Curley
            46334 by: Johnson, Kirk

    Re: Good Free PHP Editor - And it's not Edit Plus!
            46320 by: elias

    HELP WITH SHIPPING MODULE
            46322 by: Craig Cameron
            46355 by: David Pieper

    MS SQL error handling...
            46325 by: Christian Dechery
            46339 by: Morgan Curley

    PHP Editor for Linux
            46327 by: Martin Cabrera Diaubalick
            46330 by: Michael Champagne
            46331 by: Martin Cabrera Diaubalick
            46333 by: Phillip Bow
            46336 by: Robert Vetter

    Re: PHP takes over UltraEdit
            46335 by: Sebastian Bergmann

    PHP SITE REDESIGN - What happened to older source files?
            46337 by: Krznaric Michael
            46353 by: James Moore

    PHP SITE SUGGESTION
            46338 by: Michael Kimsal

    pdf question?
            46340 by: Fai

    login without database
            46342 by: Jan Grafström
            46343 by: Jon Rosenberg
            46344 by: Romeo Manzur
            46345 by: Godd
            46349 by: Jan Grafström
            46361 by: W.D.

    Re: Instalation
            46346 by: Romeo Manzur
            46347 by: Romeo Manzur

    header() vs HTTP_REFERER (Netscape 6)
            46348 by: Scott Fletcher

    Re: word docs
            46351 by: Vinay

    Session
            46354 by: David Tandberg-Johansen
            46356 by: Cal Evans

    Install
            46358 by: Chris

    php editors
            46359 by: James Crowley

    Re: Installation
            46362 by: Clayton Dukes

    BSD/GD/PHP/APACHE/SOS
            46363 by: Louis Grenzebach

    Question using chop :-)
            46364 by: Marcus Ouimet

    constatnts and case sensitivity
            46365 by: almir
            46366 by: almir

    Commercial PHP job contract or fulltime
            46367 by: Avron Anstey

    constants and case sensitivity
            46368 by: almir

    Administrivia:

    To subscribe to the digest, e-mail:
            php-general-digest-subscribelists.php.net

    To unsubscribe from the digest, e-mail:
            php-general-digest-unsubscribelists.php.net

    To post to the list, e-mail:
            php-generallists.php.net

    ----------------------------------------------------------------------

    attached mail follows:


    It's a lame way, but it works,
    I sure hope that someone can tell me how to do it in pure regexp.
    like how can i 'search for next occurence' in ereg or any regexp() in PHP

    -
    <?
      $str = "14```value```value2`````value3``hehe!``hohoho";
      while ( ereg("[^`]+", $str, $result) )
      {
        $match = $result[0];
        $pos = strpos($str, $match);
        for ($i = $pos; $i < strlen($match)+$pos; $i++)
          $str[$i] = "`";
    // echo "pos=$pos, matched: $match, str=$str<br>";
        echo "matched: $match<br>\n";
      }
    ?>
    -
    ""David Balatero"" <dbicegaming.com> wrote in message
    news:LHEJIKDFKMHLGMPILEDFMEGACAAA.dbicegaming.com...
    > 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
    >
    > So I can explode() it into a mysql database. Can anyone offer a regexp for
    > this?
    >
    > Thanks!
    > David Balatero
    >
    >
    > --
    > PHP General Mailing List (http://www.php.net/)
    > To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    > For additional commands, e-mail: php-general-helplists.php.net
    > To contact the list administrators, e-mail: php-list-adminlists.php.net
    >

    attached mail follows:


    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)

    attached mail follows:


    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" <creinigmayn.de> wrote in message news:01033011550005.07394chrisbig... 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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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.

    attached mail follows:


    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

    attached mail follows:


    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"" <thomas.haegeronsoft.de> wrote in message news:9a1e71$eun$1toye.p.sourceforge.net... > 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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.)

    * R&zE:

    *************************** ** Renze Munnik ** ** E: renzedatalink.nl ** M: +31 6 218 111 43 ***************************

    attached mail follows:


    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 rudolfqedi.co.za

    -----Original Message----- From: Renze Munnik [mailto:renzedatalink.nl] Sent: 30 March 2001 10:38 To: php-generallists.php.net 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.)

    * R&zE:

    *************************** ** Renze Munnik ** ** E: renzedatalink.nl ** M: +31 6 218 111 43 ***************************

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net
    To contact the list administrators, e-mail: php-list-adminlists.php.net
    

    attached mail follows:


    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"" <thomas.haegeronsoft.de> wrote in message news:9a1e71$eun$1toye.p.sourceforge.net... > 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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.) > > * R&zE: > > *************************** > ** Renze Munnik > ** > ** E: renzedatalink.nl > ** M: +31 6 218 111 43 > *************************** > >

    -- 
    Michael Champagne, Software Engineer
    Capital Institutional Services, Inc.
    wk: mchampagnecapis.com
    hm: mchamptexas.net
    

    ****************************************************************** 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. ******************************************************************

    attached mail follows:


    Hello, We have a shopping cart developed in php and when the cart goes to SSL the images do not show up in Netscape, only IE. The only way around this is for me to copy all images into the ssl directory. This is very inefficient. I know there is a way to have php read the files in SSL. Any help would be appreciated. Thanks,

    Craig:

    attached mail follows:


    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:cczonanospam.invalid] Sent: 30 March 2001 04:40 To: php-generallists.php.net 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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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"" <neil.kimberflytxt.com> wrote in message news:OAEEKIKEIHKOPGHNDHJJIEJACOAA.neil.kimberflytxt.com... > 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:cczonanospam.invalid] > Sent: 30 March 2001 04:40 > To: php-generallists.php.net > 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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:yohgakihotmail.com] Sent: 30 March 2001 10:08 To: php-generallists.php.net 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"" <neil.kimberflytxt.com> wrote in message news:OAEEKIKEIHKOPGHNDHJJIEJACOAA.neil.kimberflytxt.com... > 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:cczonanospam.invalid] > Sent: 30 March 2001 04:40 > To: php-generallists.php.net > 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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 ....> <tr><td> <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> <tr><td> <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

    attached mail follows:


    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" <vishakvishak.com> wrote in message news:3AC44231.340Dvishak.com... > 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 ....> > <tr><td> > <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> > <tr><td> > <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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    > > 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

    attached mail follows:


    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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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"" <marianinvestments.ro> wrote in message news:9a1cr4$5fr$1toye.p.sourceforge.net... > 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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" <marianinvestments.ro> wrote in message news:9a1cr4$5fr$1toye.p.sourceforge.net... > 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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 <dempsejngeorgetown.edu> wrote in message > news:<3AC444DD.5C6ADF30georgetown.edu>... > > 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: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    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 <dempsejngeorgetown.edu> wrote in message news:3AC44713.73916609georgetown.edu... > 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 <dempsejngeorgetown.edu> wrote in message > > news:<3AC444DD.5C6ADF30georgetown.edu>... > > > 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: php-general-unsubscribelists.php.net > > > > For additional commands, e-mail: php-general-helplists.php.net > > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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 <dempsejngeorgetown.edu> wrote in message > news:3AC44713.73916609georgetown.edu... > > 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 <dempsejngeorgetown.edu> wrote in message > > > news:<3AC444DD.5C6ADF30georgetown.edu>... > > > > 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: php-general-unsubscribelists.php.net > > > > > For additional commands, e-mail: php-general-helplists.php.net > > > > > To contact the list administrators, e-mail: > php-list-adminlists.php.net > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > > For additional commands, e-mail: php-general-helplists.php.net > > > > To contact the list administrators, e-mail: > php-list-adminlists.php.net > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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" <marianinvestments.ro> wrote in message news:9a1cr4$5fr$1toye.p.sourceforge.net... > 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    "Marian Vasile" <marianinvestments.ro> 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 foo                            http://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

    attached mail follows:


    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" <marianinvestments.ro> wrote in message > news:9a1cr4$5fr$1toye.p.sourceforge.net... > > 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: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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: php-general-unsubscribelists.php.net >> For additional commands, e-mail: php-general-helplists.php.net >> To contact the list administrators, e-mail: php-list-adminlists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    Rui Barreiros Software Developer

    WEBSOLUT - Soluções Internet Emailto: ruiwebsolut.net 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

    attached mail follows:


    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 <dempsejngeorgetown.edu> wrote in message news:3AC44AC6.49FCBDD4georgetown.edu... > 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" <marianinvestments.ro> wrote in message > > news:9a1cr4$5fr$1toye.p.sourceforge.net... > > > 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: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    "Marian Vasile" <marianinvestments.ro> 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 foo                            http://www.norge-invest.com
            PGP/GnuPG key at http://remco.xgov.net/rbb.pgp
    

    "Join the Army, meet interesting people, kill them."

    attached mail follows:


    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: remcolocalhost.localdomain [mailto:remcolocalhost.localdomain]On Behalf Of Remco B. Brink Sent: vrijdag 30 maart 2001 10:05 To: Marian Vasile Cc: php-generallists.php.net Subject: Re: [PHP] Compile .php file is possible ?

    "Marian Vasile" <marianinvestments.ro> 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 foo                            http://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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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 <dempsejngeorgetown.edu> wrote in message > news:3AC44AC6.49FCBDD4georgetown.edu... > > 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" <marianinvestments.ro> wrote in message > > > news:9a1cr4$5fr$1toye.p.sourceforge.net... > > > > 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: php-general-unsubscribelists.php.net > > > > For additional commands, e-mail: php-general-helplists.php.net > > > > To contact the list administrators, e-mail: > php-list-adminlists.php.net > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    "Marian Vasile" <marianinvestments.ro> 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 foo                            http://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

    attached mail follows:


    I've seen many people talking about Zend compiler... Where is that Zend compiler ?

    "Marian Vasile" <marianinvestments.ro> wrote in message news:9a1cr4$5fr$1toye.p.sourceforge.net... > 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Zend Compiler got renamed to Zend Encoder.

    Pavel

    ----- Original Message ----- From: "Marian Vasile" <marianinvestments.ro> To: <php-generallists.php.net> 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" <marianinvestments.ro> wrote in message > news:9a1cr4$5fr$1toye.p.sourceforge.net... > > 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: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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" <marianinvestments.ro> wrote in message news:9a1cr4$5fr$1toye.p.sourceforge.net... > 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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" <marianinvestments.ro> wrote in message > news:9a1cr4$5fr$1toye.p.sourceforge.net... > > 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: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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)

    attached mail follows:


    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)

    attached mail follows:


    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)

    attached mail follows:


    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/

    attached mail follows:


    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)

    attached mail follows:


    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  | fkrIRCnet | 
    

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.3 (OpenBSD) Comment: For info see http://www.gnupg.org

    iD8DBQE6xFpIDTGb09msdNARAh2xAJ0U4S7T/s70n6ZS7vwawW+deyfy/wCfYEcw kdDglwBHhLaYMH5SF3yPmJc= =V97v -----END PGP SIGNATURE-----

    attached mail follows:


    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
    

    attached mail follows:


    "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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    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>\n<tr>\n<td>\n"; //starting of table print "<font>Files</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 "<tr><td>\n"; print "File Name:&nbsp<a href=".$file.">".$file."</a>\n"; //link to name of file print "</td></tr>\n"; print "<tr><td>\n"; print "File Size (bytes): ".$statCheck[7]."\n &nbsp&nbsp&nbsp"; print "</td></tr>\n"; print "<tr><td>\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: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    --
    http://www.berent.dk
    http://www.berent.de
    

    attached mail follows:


    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
    

    attached mail follows:


    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"" <rolandblueline.digicomp.ch> wrote in message news:022a01c0b8e4$f1271ae0$6ade10acwbt.net... > 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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"" <phpinfoweissystems.com> wrote in message news:011e01c0b845$ad8fa3a0$0200a8c0Win98... 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

    attached mail follows:


    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-

    attached mail follows:


    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-

    attached mail follows:


    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  | fkrIRCnet | 
    

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.3 (OpenBSD) Comment: For info see http://www.gnupg.org

    iD4DBQE6xFVtDTGb09msdNARAi1PAJ4rJMPslGCHcW0Ft5koTolZ4QV5ZACYjgyH 1i1fzfPRPj93UMY3Qn+uvg== =WnwT -----END PGP SIGNATURE-----

    attached mail follows:


    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" <dempsejngeorgetown.edu> To: "juang" <juanginfoasia.net> Cc: <php-generallists.php.net> 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 >

    attached mail follows:


    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"" <juanginfoasia.net> wrote in message news:009301c0b8fc$5d6a2280$0c9fbe0aasp... 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-

    attached mail follows:


    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 | fkrIRCnet |

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.3 (OpenBSD) Comment: For info see http://www.gnupg.org

    iD8DBQE6xGK4DTGb09msdNARAvF4AJ0T0433nazW8q+LU7IbeoZQM5emhgCcDOWA yM0krQR5RlJVyILv/06wOFk= =8mPt -----END PGP SIGNATURE-----

    attached mail follows:


    On Fri, Mar 30, 2001 at 04:32:40PM +0700, 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?

    I imagine it's possible, but out of curiousity, what harm is there in allowing phpinfo() to be run? It presents the PHP configuration settings, many of which may be important to your users when developing their apps (Is magic_quotes on? Is '.' in the include path? Is register_globals on?) and info on which PHP modules are available. (Which version, if any, of GD, XML, etc)

    I suppose it may be undesireable to reveal some of the environment variables (PATH, perhaps), but the solution there isn't to disable phpinfo(), it's to run the web server from a specifically tailored environment.

    Matt

    attached mail follows:


    > > 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? >

    just disable it via the php.ini settings using disable_functions=

    James

    attached mail follows:


    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)

    attached mail follows:


    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" <chriscochella.com> wrote in message news:B6E9579F.4598%chriscochella.com... > 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: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    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 / Avdelingsingeniør
    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
    

    attached mail follows:


    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:Knut.H.Hassel.Nielsenidi.ntnu.no] Sent: 30 March 2001 10:56 To: php-generallists.php.net 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 / Avdelingsingeniør
    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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    hey,

    exec("foo > /some/file 2>&1 &"); 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 [mukuldevhome.net]

    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

    attached mail follows:


    "Ashley M. Kirchner" wrote: > > Is there a better way to write the following snippet: > > if ($priority == "000") { > $fcol="high"; > $pstr .= "<option value=\"000\" selected>High\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\" selected>Medium\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\" selected>Low\n"; > }

    $p_arr=array("000","050","100"); $fc_arr=array("high","med","low"); $ptext_arr("High","Medium","Low"); for($x=0;$x<count($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

    attached mail follows:


    $fcol = ($priority == "000") ? "high" : (($prioridy == "050") ? "med" : "low"); $pstr .= sprintf( "<option value=\"000\" %s>High\n". "<option value=\"050\" %s>Medium\n". "<option value=\"100\" %s>Low\n", ($priority == "000") ? "selected" : "", ($priority == "050") ? "selected" : "", ($priority == "100") ? "selected" : "");

    That should do the trick!!

    Dean

    -----Original Message----- From: Ashley M. Kirchner [mailto:ashleypcraft.com] 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\" selected>High\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\" selected>Medium\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\" selected>Low\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:ashleypcraft.com>   .   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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    $selected = array(); $selected[$priority] = 'selected'; $pstr .= '<option value="000" '.$selected['000'].'>High'."\n&qu