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: Sat Jun 23 2001 - 16:43:19 CDT

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

    php-general Digest 23 Jun 2001 21:43:19 -0000 Issue 716

    Topics (messages 54968 through 54993):

    PHP 4.0.6 Released!
            54968 by: Zeev Suraski

    Re: SubDomain Redirect
            54969 by: Henrik Hansen

    Re: good chat script?
            54970 by: Henrik Hansen
            54976 by: Alexander Wagner

    Re: math question
            54971 by: George Alexander

    Re: mysql_free_result() question
            54972 by: Kristian Duske

    Re: [PHP-DB] Design conundrum...
            54973 by: Kristian Duske

    readfile() question
            54974 by: Kristian Duske

    Re: Which is more expensive: concatenation or embedding?
            54975 by: Gyozo Papp

    file upload: $userfile is never none
            54977 by: Matthias Bendel

    Problems with include directory which falls under .htaccess protection
            54978 by: Tom Carter

    Setup Question
            54979 by: Patrick Smith

    Making a string title case ?
            54980 by: Jason Katz-Brown
            54982 by: Data Driven Design

    loading extension fails
            54981 by: Joe Stump

    php 4.06 as an apache DSO Error
            54983 by: Daniel Guerrier
            54987 by: Julia A. Case

    Re: newbie algorithm help!!!!!
            54984 by: McShen
            54989 by: Zak Greant
            54993 by: Maamiin

    OOP
            54985 by: Andrew Kirilenko

    gd library on win2k?
            54986 by: Noah Spitzer-Williams

    Re: newbie algorithm help!!!!
            54988 by: Jon Yaggie

    Practical flock() implementation
            54990 by: CC Zona
            54992 by: Manuel Lemos

    Get the value of a <input type=image...>
            54991 by: Augusto Cesar Castoldi

    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:


    PHP 4.0.6 has been released. Like 4.0.5, this is a maintenance release
    which mostly includes fixes to bugs and issues found in earlier
    versions. Those of you who decided not to upgrade to 4.0.5, may now wish
    to jump directly to 4.0.6 to get all the new fixes of both versions.

    One very important addition is the Japanese support through the new
    multibyte extension, that was ported from the PHP 3.0-jp code and improved
    by Rui Hirokawa. This makes PHP 4.0.6 the first version of PHP to have
    integrated support for Japanese in the standard distribution package, which
    is significantly better than the old solution of having a different version
    especially for Japanaese users. We hope that additional far-eastern
    languages will be supported in the future.

    Another major feature in 4.0.6 is the reduced memory requirements, thanks
    to a patch from Andi (andizend.com) that reduced memory fragmentation very
    significantly.

    Finally, the MySQL module now features the ability to use unbuffered
    queries, for reduced memory consumption when having large result
    sets. Look at mysql_unbuffered_query() for further details.

    A full list of changes is available below, and at
    http://www.php.net/ChangeLog-4.php.

    As with 4.0.5, we waited until the Windows binaries are built before
    announcing the availability of the new version. Thanks goes to Phil
    Driscoll (phildialsolutions.co.uk) and Daniel Beulshausen
    (danielphp4win.de) for providing the Win32 builds. To go on, point your
    browsers at http://www.php.net/downloads.php.

    Zeev

    23 Jun 2001, Version 4.0.6
    - Fixed memory fragmention problem which could lead to web server processes
       growing much more than they should. (Andi, Zend Engine)
    - Made $HTTP_SESSION_VARS['foo'] and $foo be references to the same value
       when register_globals is on. (Andrei)
    - Fixed disk_free_space() and disk_total_space() under FreeBSD. (Jon)
    - Fixed readfile/passthru losing resources during connection abort (Sascha)
    - Fixed bug in the mcrypt extension that caused segfaults when using a key
       that is too large for the used algorithm, and a bug that caused
       mcrypt_generic() to segfault PHP (Derick)
    - Fixed getopt so that it accepts command line arguments in the form
       -<opt><arg> and -<opt> <arg>. (Jmoore)
    - Fixed race in writing session files (Sascha)
    - Fixed a possible crash in the PHP CGI when no input file is
       specified (Zeev)
    - Added is_callable() function that can be used to find out whether
       its argument is a valid callable construct. (Andrei)
    - Fixed a rare possible crash when generating extended information. (Dmitri
       Dmitrienko, Zend Engine)
    - Improved virtual() to support PHP-enabled URIs. (Zeev)
    - Fixed undefined behavior when using floating point keys in array()
       expressions. (Zeev, Zend Engine)
    - Fixed a possible crash in case of parse errors in include files or eval
       statements. (Zeev, Zend Engine)
    - Added --with-layout configure option. (Stig)
    - Improved interactive mode - supports function calls, and works in
       multithreaded builds. (Zeev, Zend Engine)
    - Fixed a crash bug in interactive mode. (Zeev, Zend Engine)
    - Added pg_last_notice() function. (Rasmus from suggestion by
    Dirkrackspace.com)
    - Fixed a bug in preg_split() that would incorrectly limit the number of
       results when used along with PREG_SPLIT_NO_EMPTY flag. (Andrei)
    - Added connection error support to mysql_error() and mysql_errno(). (Jason)
    - Added support to getimagesize to return dimensions of BMP and PSD
       files. (Derick)
    - Added heuristic to kill stale IRC connections, message scanner caching, and
       nickname escaping to IRCG, suppress option to ircg_msg(), and statistics to
       IRCG phpinfo() output. (Sascha)
    - Added Japanese multibyte string functions support. (Rui)
    - Added Mac OS X "\r" line ending support. (Andi, Zend Engine)
    - Fixed a bug regarding the $PHP_SELF being incorrectly registered when
       force-cgi-redirect was not enabled. (Sterling)
    - pfpro extension now supports version 3 of the Verisign SDK. (John Donagher)
    - Udm_Cat_List and Udm_Cat_Path functions has been added.
    - Added key_exists() to check if a given key or index exists in an
       array or object. (David Croft)
    - Modify the cURL extension to compile only with the latest cURL release.
       Backwards compatibility with regards to the extension api has not been
       broken. (Sterling)
    - Added the ability to use user-defined callbacks with cURL. (Sterling)
    - Added the SSL_VERIFYPEER, CAINFO, MAXREDIRS, FILETIME, RANDOM_FILE, EGDSOCKET
       and CONNECTTIMEOUT options to curl_setopt(). (Sterling)
    - Added support for persistent connections with cURL. (Sterling)
    - Fixed a problem in cURL with file descriptors being allocated, but never
       closed. (Sterling)
    - Fixed interactive mode (-a). It works again with the same limitations it
       has always had. (Andi, Zend Engine)
    - Improved memory manager to use less memory and provide better memory overflow
       detection abilities in debug mode. (Andi, Zend Engine)
    - Fixed resource leaks when resources were being cast to numbers. (Zeev, Zend
       Engine)
    - Fixed foreach() to not crash when being sent an invalid argument. (Andi, Zend
       Engine)
    - Fixed a bug in opendir() under Windows when trying to open a non-exisiting
       directory. (Andi)
    - Fixed popen() and the exec family under Win32 (Unable to fork issue).
    (Daniel)
    - Make the printf family of functions binary clean. (Rasmus)
    - Fixed WDDX serialization to HTML-escape key/variable names so as not to
       break the XML packet. (Andrei)
    - Made WDDX extension enabled by default. (Andrei)
    - Added -C command-line option to avoid chdir to the script's directory. (Stig)
    - Fixed a bug with /e modifier in preg_replace(), that would not correctly
       replace two-digit references if single digit references were present
       before them. This fixed bug #10218. (Andrei)
    - Added temporary LOB support in OCI8. (Patch by David Benson)
    - Fixed crash in pathinfo()
    - OCI8 now supports binding of collections. (Patch by Andy Sautins
       <asautinsveripost.net>)
    - Added GD 2.0.1 support for truecolor and alpha channels, plus some other gd
       functions, both old and new - see docs for more info. (Wez)
    - Added S/MIME sign/verify encrypt/decrypt functions to openssl extension,
       along with some other certificate manipulation and interrogation functions.
       See docs for more info. (Wez)
    - printf argnum (parameter swapping) support. (Morten Poulsen, Rasmus)
    - Add DIRECTORY_SEPARATOR constant ('/' on UNIX, '\' on Windows). (Stig)
    - Added small change to php_odbc module, to check for failed SQLDisconnects
       and to close any outstanding transactions if the call fails, then disconnect
       again. (lurcher)
    - Modified get_parent_class() and get_class_methods() to accept a class name as
       well as a class instance. (Andrei, Zend Engine)
    - Added support for UNC style paths. (\\server\share\file,
       //server/share/file). (Daniel, TSRM)
    - Added dbx module (database abstraction) to the repository. (Marc)
    - Using ITypeInfo instead of IDispatch if possible. This makes DCOM calls
       and even COM calls much faster.
       All ini settings are now prefixed by 'com.'.
       Now you need not provide a path to the file containing the typelib, you can
       also provide the GUID of the TypeLib - entry or an IID for preloading
       type - information. (phanto)
    - Rewrite of domxml. It's now mostly DOM Level 2 conform. (Uwe)
    - Added array_map() function that applies a callback to the elements
       of given arrays and returns the result. It can also be used with a
       null callback to transpose arrays. (Andrei)
    - Added array_filter(), which allows filtering of array elements via
       the specified callback. (Andrei)
    - Fixed all relevant array functions to avoid moving the internal array
       pointer during operations. (Andrei)
    - Added mysql_unbuffered_query(), which is useful for very large result sets.
       (Zeev)

    --
    zeevzend.com
    PHP Group
    

    attached mail follows:


    "Jon Shoberg" <jshobergcbd.net> wrote:

    > Using Apache ... > > Any thoughts no how I can create a link: > > http://cars.mydomain.com and have it redirect to > http://www.mydomain.com/index.php?id=cars > > and > > http://www.mydomain.com/cars and have it redirect to > http://www.mydomain.com/jump.php?id=cars without messing up my default

    in the top of your index page write something like:

    switch(StrToUpper($HTTP_HOST)){ case "WWW.CARS.MYDOMAIN.COM"; case "CARS.MYDOMAIN.COM"; header("Location: http://www.mydomain.com/index.php?id=cars"); break; }

    and so on

    -- 
    Henrik Hansen
    

    attached mail follows:


    "Daniel Goldin \(E-mail\)" <danielblue-lamp.com> wrote:

    > Anybody know of a good chat script? I'm hoping for the chat equivalent of > phorum. Thanks for any help.

    http://phpwizard.net/projects/phpChat/ - might give that one a go.

    -- 
    Henrik Hansen
    

    attached mail follows:


    Daniel Goldin (E-mail) wrote: > Anybody know of a good chat script? I'm hoping for the chat equivalent of > phorum. Thanks for any help.

    If you can live with the hassle of rebuilding PHP, you might try ircg from Sascha Schumann (http://www.schumann.cx). This is by FAR the most performant chat for PHP out there. It can easily handle thousands of clients even on medium machines.

    regards Wagner

    -- 
    "Isn't it strange? The same people who laugh at gypsy fortune tellers take 
    economists seriously."
     - Cincinnati Enquirer   
    

    attached mail follows:


    If u don't want to use the pi() function. Try M_PI. This is a pi constant its value is 3.14159265358979323846

    $theta=15*M_PI/360;

    ----- Original Message ----- From: Anon Y Mous <dropboxcoeus-group.com> To: <php-generallists.php.net> Sent: Saturday, June 23, 2001 2:21 PM Subject: Re: [PHP] math question

    > pi is a function. Try this: > > $theta = 15*pi()/360; > > It should return 0.13089969389957 > > > -Evan Nemerson > > > > $theta = 15*pi/360; > > gives a value of 0 for $theta... it should be something like 0.131... > > > Julia > > > -- > 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

    _________________________________________________________ Do You Yahoo!? Get your free yahoo.com address at http://mail.yahoo.com

    attached mail follows:


    > Do I mysql_free_result the $Query or the $Result? If it's $Result, would > this be the same as just going unset($Result)?

    mysql_free_result() frees the ressources that the MySQL server allocated for the results of your query. This is in the memory space of the MySQL server, while if you unset($Result), it only frees the MySQL result id (an integer if I remember corretly) in the memory space of your script. So, no, calling unset() is not the same to call mysql_free_result().

    Hope this helps. Kristian

    attached mail follows:


    > The problem involves 2 tables, one of editors and one of categories, both > have unique ID numbers. Each editor can have authority over an arbitrary > number of categories, and conversely, each category can have an arbitrary > number of editors. So what is the best way to represent this in the DB? > (Which is PostgreSQL 7 BTW)

    This is a so-called N:N relation, and this usually calls for a third table to store the cross-relations:

    table editors id, name, email

    table categories id, name

    table ediors_categories editor (id of editor) category (id of category)

    Now if you want to give an editor authority over a category, you would insert a new record into editors_categories with the respective ids of the editor and the category. If you want to select all categories that belong to a certain author, you would do this: SELECT c.* FROM categories c LEFT JOIN editors_categories ed ON c.id = ed.category WHERE ed.editor = '" . $editor_id . "'"

    This selects all category records and joins them with the editors_categories table, then filtering the resulting recordset by the editor id stored in the editors_categories table.

    Hope this helps Kristian

    attached mail follows:


    Hi there,

    I was wondering what happens if you call the readfile function to output a large binary file to a client with a slow connection. Does the script run until the whole file is sent to the client (leading to timeout errors on servers with a low max execution time) or does it fill some sort of buffer on the web server which then takes over and sends the file to the client?

    Thanks a lot Kristian

    attached mail follows:


    Hello,

    and for those who came from the realm of C:

    printf('This is a string and my variable $x is %s',$x);

    I've made a little test with the mentioned three methods and the difference is less than minor. Choose what you can read and understand easier.

    ----- Original Message ----- From: "Jason Lustig" <lustigacsu.buffalo.edu> To: "Php-GeneralLists. Php. Net" <php-generallists.php.net> Sent: 2001. június 22. 23:04 Subject: [PHP] Which is more expensive: concatenation or embedding?

    > There are two ways to get your variables into a string -- concatenation with > single-quoted strings, or embedding in evaluated double-quoted strings. > Which is more expensive to the server? > > For example: > > <?php > > $x = 10; > echo "This is a string and my variable \$x is $x.\n"; > echo 'This is a string and my variablke $x is '.$x."\n"; > > ?> > > Now, which is more expensive? Is it more expensive to concatenate them, or > to evaluate the whole string since it would be in double-quotes? I see lots > of people do things in double-quotes, but it would seem to me that > single-quoted strings concatenated with variables would be less expensive > because you are only evaluating the variables. > > --Jason > > > -- > 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:


    sice i installed php 3.0.18 html forms whith blank file-input never returns 'none'. $userfile is always unset.

    with php 3.0.12 my file-upload scripts worked perfectly. i know i could do samething like:

    if ($userfile != 'none' && strlen($userfile)) { ... }

    but i have alot of scripts to change. is there a possibilty to configure php 3.0.18 returning $userfile = 'none' if the input-tag in the form left blank.

    thx matthias

    attached mail follows:


    Hi all,

    I have a .htaccess file with the following in it order allow,deny allow from all require user pilot Authname MySite Authtype Basic

    The page itselfs prompts for and accepts username/password correctly, however on that page are a number of included files.. The included files are in a subdirectory of the root of the site and hence fall under the jursidiction of the .htaccess. PHP cannot however access these.. I guess because it also needs to be authenticated...

    Oh, I checked the PHP code etc... and everything works fine...

    Thanks in Advance..

    Tom Carter Web Architect roundcorners ltd.

    attached mail follows:


    I'm installing PHP 4.0.5, I have Apache 1.3.20 installed currently and I'm also using a built in module of mod_perl 1.25. Here's my apache mod list [grumster]:12:38pm:/usr/local/apache/bin:(raq)-> ./httpd -l Compiled-in modules: http_core.c mod_env.c mod_log_config.c mod_mime.c mod_negotiation.c mod_status.c mod_include.c mod_autoindex.c mod_dir.c mod_cgi.c mod_asis.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_access.c mod_auth.c mod_so.c mod_setenvif.c mod_perl.c suexec: disabled; invalid wrapper /usr/local/apache/bin/suexec I've added LoadModule php4_module libexec/libphp4.so to my httpd.conf file after doing the DSO compile for PHP. Whenever I try to load a webpage with PHP, I'm getting errors like Document Contains no Data. When I do a gdb I get the following..: bash-2.04# gdb /usr/local/apache/bin/httpd (gdb) run -X Starting program: /usr/local/apache/bin/httpd -X warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. Program received signal SIGSEGV, Segmentation fault. 0x401fa9d0 in ?? () (gdb) bt #0 0x401fa9d0 in ?? () #1 0x401fab24 in ?? () #2 0x8098103 in ap_invoke_handler () #3 0x80abac9 in process_request_internal () #4 0x80abb28 in ap_process_request () #5 0x80a31e5 in child_main () #6 0x80a3378 in make_child () #7 0x80a34d3 in startup_children () #8 0x80a3b08 in standalone_main () #9 0x80a4287 in main () #10 0x400cf577 in __libc_start_main () from /lib/libc.so.6 (gdb) ANY HELP would be appreciated, I wasn't able to find anything in the archives.

    --
     
    Regards,
     
    Patrick Smith
    

    attached mail follows:


    Hi

    Whats the best way to make $string title case? In other words, turn "this is a string" into "This Is A String" ?

    Thanks a bunch

    Jason

    attached mail follows:


    Use the ucwords() function

    http://www.php.net/manual/en/function.ucwords.php

    Data Driven Design P.O. Box 1084 Holly Hill, Florida 32125-1084

    http://www.datadrivendesign.com http://www.rossidesigns.net ----- Original Message ----- From: Jason Katz-Brown <jasonkatzbrown.com> To: <php-generallists.php.net> Sent: Saturday, June 23, 2001 1:46 PM Subject: [PHP] Making a string title case ?

    > Hi > > Whats the best way to make $string title case? In other words, turn "this is > a string" into "This Is A String" ? > > Thanks a bunch > > Jason > > -- > 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've successfully compiled an extension for my php builder (pgsql.so) by doing the following:

    phpize ./configure make

    I then copied my shiny new extension to /usr/lib/php4/extensions/no-debug-non-zts-20001222 - which is where all my other php extensions are (mysql.so, gd.so, imap.so, etc). Then I head off to restart apache so I can start using my shiny new extension. To my surprise I get the following error:

    PHP Warning: Invalid library (maybe not a PHP library) 'pgsql.so' in Unknown on line 0

    Am I missing something?

    --Joe

    Joe Stump <joejoestump.net> ------------------------------------------------------------------------ "NT is the only OS that has caused me to beat a piece of hardware to death with my bare hands."

    attached mail follows:


    I'm trying to install PHP 4.06 as a DSO with apache 1.3.20 on redhat 7.1 and it produces this error. No of which are the problem. What else can it be??

    Configuring SAPI modules

    checking for Apache module support via DSO through APXS... ./configure: /software/apache/bin: is a directory Sorry, I was not able to successfully run APXS. Possible reasons:

    1. Perl is not installed; 2. Apache was not compiled with DSO support (--enable-module=so); 3. 'apxs' is not in your path.

    __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/

    attached mail follows:


    Make sure your configure statement contains something like this

    --with-apxs=/path/to/apxs

    Julia

    Quoting Daniel Guerrier (dan_guerrieryahoo.com): > I'm trying to install PHP 4.06 as a DSO with apache > 1.3.20 on redhat 7.1 and it produces this error. No > of which are the problem. What else can it be?? > > Configuring SAPI modules > > checking for Apache module support via DSO through > APXS... > ./configure: /software/apache/bin: is a directory > Sorry, I was not able to successfully run APXS. > Possible reasons: > > 1. Perl is not installed; > 2. Apache was not compiled with DSO support > (--enable-module=so); > 3. 'apxs' is not in your path. > > > __________________________________________________ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail > http://personal.mail.yahoo.com/ > > -- > 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

    -- 
    [  Julia Anne Case  ] [        Ships are safe inside the harbor,       ]
    [Programmer at large] [      but is that what ships are really for.    ]  
    [   Admining Linux  ] [           To thine own self be true.           ]
    [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ]
              
    

    attached mail follows:


    please share if you know hwo to di it. thanks you

    ""McShen"" <webmasterceleritieszones.com> wrote in message news:9gqm6o$g6n$1w153.z064000151.sjc-ca.dsl.cnc.net... > hi > i have a mysql table with approx. 30 entries. > > I wanna get them(i know how to do that) and list them in a 2-column table. I > have been trying to use a loop to do it. But it will only produce a 1-column > table. it's like > > entry 1 > entey 2 > entry 3 > entry 4 > etc > > Please help me so that i can get this : > > entry1 entry2 > entry3 entry4 > > Thanks in advanced. > > > > -- > 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:


    McShen wrote: > > hi > > i have a mysql table with approx. 30 entries. > > > > I wanna get them(i know how to do that) and list them in a 2-column table. > I > > have been trying to use a loop to do it. But it will only produce a > 1-column > > table. it's like > > > > entry 1 > > entey 2 > > entry 3 > > entry 4 > > etc > > > > Please help me so that i can get this : > > > > entry1 entry2 > > entry3 entry4

    The code is easier to understand than the explanation! :)

    $query = "SELECT * FROM table";

    $result = mysql_query ($query) or die ("Query <b>$query</b> failed. The error message was " . mysql_error ());

    // Initialize a value to stored the table rows $table = '';

    // Initialize a counter for the column number $column = 0;

    // Loop through the query results while ($rows = mysql_fetch_row ($result)) {

    // Put the contents of the field into a cell $cell = "<td>$rows[0]</td>";

    // If we are in column 0 if (0 == $column) { // Start the row $table .= "<tr>$cell"; } else { // End the row $table .= "$cell</tr>\n"; }

    // Make the column number equal to // The whole number remainder left over // from dividing the value of $column // plus one by two

    $column = ($column + 1) % 2; }

    // Handle dangling rows if (1 == $column) { $table .= "<td></td></tr>\n"; }

    echo "<table>$table</table>";

    Good Luck!

    --zak

    attached mail follows:


    I use this code to do this kind stuff: ----------------- BEGIN ----------------------- $result=mysql_query(...); $columns=2; //Count of columns

    $table="<TABLE>\n"; $table.='<TR>';

    $col=0; //current column

    //Draw table content while ($row=mysql_fetch_row($result)){ $table.='<TD>'.$row[0].'</TD>'; $col++; if ($col>=$columns) { $table.="</TR>\n<TR>"; $col=0;} // Next row }

    //Correct last row, add or remove empty cells. if ($col) { $table.=str_repeat('<TD>&nbsp;</TD>',$columns-$col); //Add empty cells }else{ $table=substr($table,0,strlen($table)-10); //Remove empty row } $table.="</TR>\n"; $table.='</TABLE>';

    echo $table;

    ----------------- END -----------------------

    X

    attached mail follows:


    Hello!

    Is it possible to do normal inheritance on PHP? I've following code:

    --->

    class one { function one() { echo "one "; } }

    class two extends one { function two() { echo "two "; } }

    class three extends two { function three() { echo "three"; } }

    $foo = new three();

    <---

    And the output of this programm is "three", but not "one two three" :(

    Best regards, Andrew Kirilenko, Seniour Programmer / System Administrator, Internet Service.

    attached mail follows:


    how can i install the gd library for php on win2k using iis5?

    - Noah

    attached mail follows:


    is this what you want? there must be an easier way. i am sure some one else knows it be i would -

    <?php $result = mysql_query("select * from table"); ?> <table>

    $i = 0; while($my_array = mysql_fetch_array($result)) { if($i%2) { print"<td>{$my_array[0]</td></tr>"; } else { print"<tr><td>{$my_array[0]}</td>"; } $i++:

    } </table>

    or am i completely off on what you need?

    please share if you know hwo to di it. thanks you

    ""McShen"" <webmasterceleritieszones.com> wrote in message news:9gqm6o$g6n$1w153.z064000151.sjc-ca.dsl.cnc.net... > hi > i have a mysql table with approx. 30 entries. > > I wanna get them(i know how to do that) and list them in a 2-column table. I > have been trying to use a loop to do it. But it will only produce a 1-column > table. it's like > > entry 1 > entey 2 > entry 3 > entry 4 > etc > > Please help me so that i can get this : > > entry1 entry2 > entry3 entry4 > > Thanks in advanced. > Thank You, Jon Yaggie www.design-monster.com And they were singing . . . '100 little bugs in the code 100 bugs in the code fix one bug, compile it again 101 little bugs in the code 101 little bugs in the code . . .' And it continued until they reached 0

    attached mail follows:


    I'm having trouble understanding the docs and annotations on flock(). I've got a script that needs to overwrite a data file's contents without letting Instance B of that script truncate the data file while Instance A is still writing new content to it. How do other people do this? It seems to me that if I fopen() in "w" or "w+" mode, then the file will be truncated before it can be determined whether there's a lock already in effect or the current instance can acquire a lock; but flock() requires a filepointer argument, so don't I *have* to fopen the file before going to flock()? Or should I fopen first in "r" mode, acquire the lock, then re-open in "w" mode, counting on the lock to stay in effect even though it's a different file pointer?

    I'd also be grateful if someone could clarify the difference between blocking and locking (i.e. "If you don't want flock() to block while locking, add LOCK_NB (4 prior to PHP 4.0.1) to operation.").

    TIA

    -- 
    CC
    

    attached mail follows:


    Hello CC,

    On 23-Jun-01 17:25:54, you wrote:

    >I'm having trouble understanding the docs and annotations on flock(). I've >got a script that needs to overwrite a data file's contents without letting >Instance B of that script truncate the data file while Instance A is still >writing new content to it. How do other people do this? It seems to me

    Let me guess: you are developing a cache system, right? :-)

    >that if I fopen() in "w" or "w+" mode, then the file will be truncated >before it can be determined whether there's a lock already in effect or the >current instance can acquire a lock; but flock() requires a filepointer >argument, so don't I *have* to fopen the file before going to flock()? Or >should I fopen first in "r" mode, acquire the lock, then re-open in "w" >mode, counting on the lock to stay in effect even though it's a different >file pointer?

    I know that second solution works, but I don't know about its portability.

    >I'd also be grateful if someone could clarify the difference between >blocking and locking (i.e. "If you don't want flock() to block while >locking, add LOCK_NB (4 prior to PHP 4.0.1) to operation.").

    If you don't want to wait in case it is not possible to obtain the lock right away, using non-blocking locks.

    Regards, Manuel Lemos

    Web Programming Components using PHP Classes. Look at: acm.org">http://phpclasses.UpperDesign.com/?user=mlemosacm.org

    --
    E-mail: mlemosacm.org
    URL: http://www.mlemos.e-na.net/
    PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
    --
    

    attached mail follows:


    I always use "InputImageName_x > 0" to know if a button was clicked.

    How can I get the value on my input type=image?

    Like: <input type=image name=contatc value="002545645">

    how can I get "002545645" with "$contatc"?

    thanks,

    Augusto