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: Thu Mar 08 2001 - 05:43:55 CST

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

    php-general Digest 8 Mar 2001 11:43:55 -0000 Issue 554

    Topics (messages 42959 through 43025):

    Re: on the list yesterday regarding mysql time
            42959 by: Jerry Lake
            42960 by: John Huggins
            42967 by: Jerry Lake

    Oracle Function Calls
            42961 by: Richard S. Crawford

    Re: are sessions single threaded?
            42962 by: Bill Rausch

    String indexing with braces
            42963 by: Toby Butzon
            42979 by: php3.developersdesk.com

    do..while(0) not staying true
            42964 by: David Minor
            42966 by: Jim Winstead
            42971 by: ..s.c.o.t.t.. [gts]

    database
            42965 by: Pat

    Dynamic Links..
            42968 by: Ashwin Kutty
            42972 by: Richard S. Crawford

    Re: exec as another user
            42969 by: Jon Snell
            42970 by: Jason Brooke
            42973 by: Henrik Hansen

    Microtime math and display
            42974 by: Todd Cary
            42981 by: Chris Lee

    populate select box with contents of a file?
            42975 by: Jerry Lake
            42976 by: Andrew Halliday
            42977 by: David Robley
            42978 by: Sean R. Bright

    ldap_search()
            42980 by: Mike Tuller
            43009 by: Nick Talbott

    php vs php3 weirdness
            42982 by: Darren Ward

    Problems with dynamic HTML tables on large pages
            42983 by: Eric Nielsen

    Announcement: Smarty template engine 1.3.1 released
            42984 by: Monte Ohrt

    Error in www.php.net (To site admin)
            42985 by: Yasuo Ohgaki

    new php.net look
            42986 by: Michael Kimsal
            42990 by: Jason Murray

    Re: Auto Prepend/Append
            42987 by: chris.improbable.org

    mysql_fetch_array()
            42988 by: Deependra B. Tandukar
            42991 by: Tyler Longren
            42992 by: David Robley

    Oracle CLOB and PHP
            42989 by: Bob Kakalec

    Twin Cities User Group
            42993 by: Chris Moewes-Bystrom

    The coolest function in the world
            42994 by: Thomas Deliduka

    News Server (news.php.net)
            42995 by: Yasuo Ohgaki
            42996 by: Philip Olson
            42997 by: David Robley

    Changing urls
            42998 by: Todd Heim

    File uploads cease to function
            42999 by: Cody Caughlan

    Re: last inserted record
            43000 by: John Meyer
            43010 by: Christian Reiniger
            43012 by: Soeren Staun-Pedersen
            43014 by: Christian Reiniger

    test - can someone please reply?
            43001 by: matth.usaexpress.net
            43002 by: David Robley
            43003 by: David Robley
            43004 by: Maxim Maletsky
            43005 by: Jacky.lilst

    to however designed PHP.NET - che.e.e.e.ers!
            43006 by: Maxim Maletsky

    Regex Masters: Please inspect this regex- Pulling urls out of page
            43007 by: Matt Friedman
            43013 by: Christian Reiniger

    Re: [PHP-QA] Error in www.php.net (To site admin)
            43008 by: Zak Greant

    Re: parsing html / xml (more)
            43011 by: Bruin, Bolke de

    Fixed session prob with Netscape
            43015 by: Robert Fischler, Ph.D. ABD

    Re: sending SMS messages via PHP
            43016 by: Greig, Euan

    Re: PHP dll on NT - more reliable with Apache than IIS?
            43017 by: Greig, Euan
            43019 by: Greig, Euan

    Max Number of require_once()ed files? [BUG or SPEC?]
            43018 by: Yasuo Ohgaki

    Sessions, and timeout
            43020 by: Bård Farstad
            43022 by: Yasuo Ohgaki
            43024 by: Bård Farstad
            43025 by: Yasuo Ohgaki

    Re: explode question
            43021 by: Tim Ward

    Re: Value of if(isset(X)) problem
            43023 by: Tim Ward

    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:


    never mind anything below my signature
    I forgot to erase it, damn non-thread
    capable email...

    Jerry Lake - jerryleuropa.com
    Web Designer
    Europa Communications - http://www.europa.com
    Pacifier Online - http://www.pacifier.com

    attached mail follows:


    Forget about the PHP functions and do this:

    $query = "INSERT INTO tablename ";
    $query .= "SET field1 = '$field1', ";
    $query .= "field2 = '$field2', ";
    $query .= "datesubmitted = NOW();

    Let MySQL simply do this for you with the NOW() SQL command.

    > -----Original Message-----
    > From: Jerry Lake [mailto:jerryleuropa.com]
    > Sent: Wednesday, March 07, 2001 5:41 PM
    > To: php-generallists.php.net
    > Subject: [PHP] on the list yesterday regarding mysql time
    >
    >
    > I know this was on the list yesterday,
    > but I for some reason erased it.
    >
    > I have an online form that I would like
    > to have record the time submitted and
    > recorded into a MySQL date field, how
    > the hell do I use the date and mktime
    > functions to make the date compatible
    > with the MySQL 0000-00-00 format?
    >
    > Jerry Lake - jerryleuropa.com
    > Web Designer
    > Europa Communications - http://www.europa.com
    > Pacifier Online - http://www.pacifier.com
    >
    >
    > -----Original Message-----
    > From: george [mailto:chiefmonkeywisemonkeydesign.co.k]
    > Sent: Wednesday, March 07, 2001 1:51 PM
    > To: php-generallists.php.net
    > Subject: Re: [PHP] passing variables again
    >
    >
    >
    > not really sure I understand,
    >
    > but what I want to do is take the HTML generated in step 3 and place it
    > between the <form> tags in the last page where the code is displayed
    >
    > ie
    >
    > <td>Title</td><td> mr</strong><input type=radio name=title
    > value=mr checked>
    >
    > mrs</strong><input type=radio name=title value=mrs>
    >
    > Miss</strong><input type=radio name=title
    > value=miss><br></td></tr><td>name</td><td><input type=text
    > name=name></td></tr><tr><td>address</td><td><input type=text
    > name=address></td></tr><td>address2</td><td><input type=text
    > name=address2></td></tr><td valign="top">message</td><td><textarea
    > name="message" cols= rows=></textarea></td></tr>
    >
    > that is the code from step 3 how do I get that to display on the
    > next page.
    >
    >
    >
    > TIA
    >
    >
    > george
    >
    >
    >
    >
    > --
    > 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:


    Thanks, that worked great.

    Jerry Lake - jerryleuropa.com
    Web Designer
    Europa Communications - http://www.europa.com
    Pacifier Online - http://www.pacifier.com

    -----Original Message-----
    From: John Huggins [mailto:hugginstls2000.com]
    Sent: Wednesday, March 07, 2001 2:49 PM
    To: Jerry Lake; php-generallists.php.net
    Subject: RE: [PHP] on the list yesterday regarding mysql time

    Forget about the PHP functions and do this:

    $query = "INSERT INTO tablename ";
    $query .= "SET field1 = '$field1', ";
    $query .= "field2 = '$field2', ";
    $query .= "datesubmitted = NOW();

    Let MySQL simply do this for you with the NOW() SQL command.

    > -----Original Message-----
    > From: Jerry Lake [mailto:jerryleuropa.com]
    > Sent: Wednesday, March 07, 2001 5:41 PM
    > To: php-generallists.php.net
    > Subject: [PHP] on the list yesterday regarding mysql time
    >
    >
    > I know this was on the list yesterday,
    > but I for some reason erased it.
    >
    > I have an online form that I would like
    > to have record the time submitted and
    > recorded into a MySQL date field, how
    > the hell do I use the date and mktime
    > functions to make the date compatible
    > with the MySQL 0000-00-00 format?
    >
    > Jerry Lake - jerryleuropa.com
    > Web Designer
    > Europa Communications - http://www.europa.com
    > Pacifier Online - http://www.pacifier.com

    attached mail follows:


    Ah! My bad! I sent this question out with the wrong subject line. My
    apologies to everyone that I confused.

    At 01:07 PM 3/7/01 -0800, Richard S. Crawford wrote:

    >I desperately need to know whether it is possible to call an Oracle
    >function in PHP. For example...
    >
    >$functionResult=hubins($name,$commit_yn)
    >
    >where hubins is a stored procedure in our Oracle database.
    >
    >Can this be done? My first thought was to do something like this:
    >
    >$functionCall="hubins($name,$commit_yen)";
    >
    >then then do
    >
    >ociexecute($functionCall);
    >
    >...but that, of course didn't work.
    >
    >Any thoughts?
    >
    >
    >--
    >PHP Database Mailing List (http://www.php.net/)
    >To unsubscribe, e-mail: php-db-unsubscribelists.php.net
    >For additional commands, e-mail: php-db-helplists.php.net
    >To contact the list administrators, e-mail: php-list-adminlists.php.net

    --
    http://www.mossroot.com/index.php
    AIM Handle: Buffalo2K
    e-mail: rscrawfordmossroot.com
    "When you lose the power to laugh at yourself, you lose the power to think 
    straight." --Clarence Darrow
    

    attached mail follows:


    At 4:04 PM -0800 3/6/01, Ernest E Vogelsinger wrote: >At 00:56 07.03.2001, Bill Rausch said: >--------------------[snip]-------------------- >>What I mean is, if a user is connected to a php page that uses sessions and >>that is involved in a time consuming operation (say 20 seconds or more) >>before returning an answer, and the user also opens a second window in the >>same browser to connect to another page in the same site that uses sessions >>the second window will hang till the first operation is complete. >> >>While testing, I was able to show that if I don't use sessions this doesn't >>happen. >> >>I need to use sessions and would like to allow users to have multiple >>windows connected to my site (it is an intranet application). >--------------------[snip]-------------------- > >try not to use cookies - use session keys via URL/hidden form fields. This >way multiple browser connects can have multiple session keys, and you won't >"hang"

    Thanks for the answer. Help me to understand please. Is this a limitation of PHP somehow or is it a limitation of the browsers. Why does not using cookies make a difference? Where would I go to find more information on this issue?

    ---
     Bill Rausch, Software Development, Unix, Mac, Windows
     Numerical Applications, Inc.  509-943-0861   billnumerical.com
    

    attached mail follows:


    Greetings,

    I know there's been some discussion of adding support for string indexing (that would be exclusive to strings [because it wouldn't apply to arrays] and therefore more efficient) using curly braces ($someStr{0}, $someStr{1}, etc.).

    Has this been implemented, and, if so, in what version did this first appear?

    Thanks,

    --Toby Butzon

    attached mail follows:


    Addressed to: Toby Butzon <php-listsimawebdesigner.com> php-generallists.php.net

    ** Reply to note from Toby Butzon <php-listsimawebdesigner.com> Wed, 07 Mar 2001 18:07:29 -0500 > > Greetings, > > I know there's been some discussion of adding support for string > indexing (that would be exclusive to strings [because it wouldn't apply > to arrays] and therefore more efficient) using curly braces > ($someStr{0}, $someStr{1}, etc.). > > Has this been implemented, and, if so, in what version did this first > appear?

    Yes. I am using 4.0.2 and it is supported. I am not sure how long it has been available. Currently $SomeStr[0] and $SomeStr{0} are the same thing, but someday the [] notation will go away. Maybe php 5.

    Rick Widmer Internet Marketing Specialists http://www.developersdesk.com

    attached mail follows:


    Maybe I'm just reading the documentation incorrectly, but when I set up a:

    do { // loop until the test condition is satisfied then break [code] if ($i > 1) break; [code] } while(0);

    it just goes through once. I got around it by creating a true statement to test at the end "while ($i = $i);" and everything worked fine. What am I doing wrong?

    Thanks, David Minor

    attached mail follows:


    trick question, right? 0 is false. you want do { ... } while(1);

    jim

    attached mail follows:


    or

    do .. while (0==0);

    > -----Original Message----- > From: Jim Winstead [mailto:jimwapache.org] > Sent: Wednesday, March 07, 2001 2:23 AM > To: php-generallists.php.net > Subject: Re: [PHP] do..while(0) not staying true > > > trick question, right? 0 is false. you want do { ... } while(1); > > jim > > -- > 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

    I need some scripts written in PHP to interface with a mySQL database. There will be a need for a high level of security.

    Anyone interested in making some money ?

    Call me

    Regards

    Pat

    attached mail follows:


    No, not the URL and therefore not HTTP_REFERER..

    This is how it is..

    My_Script.php redirects to Someone_Elses_Dynamically_Generated_Page.html Someone_Elses_Dynamically_Generated_Page.html has 'link' to another Page. I want My_Script.php to grab the <a href="contents"> of the 'link' and redirect to it, right after.

    The reason I want to do the above is, the first page dynamically creates a session id and attaches it to the 'link'.. I need that session id to continue on, and since this page is not on my server I cant control it..

    Thanks..

    attached mail follows:


    At our company we solve this problem by including the second page in a frameset. That's what I would recommend for you.

    At 07:39 PM 3/7/01 -0400, Ashwin Kutty wrote:

    >No, not the URL and therefore not HTTP_REFERER.. > >This is how it is.. > >My_Script.php redirects to Someone_Elses_Dynamically_Generated_Page.html >Someone_Elses_Dynamically_Generated_Page.html has 'link' to another Page. >I want My_Script.php to grab the <a href="contents"> of the 'link' and >redirect to it, right after. > >The reason I want to do the above is, the first page dynamically creates a >session id and attaches it to the 'link'.. I need that session id to >continue on, and since this page is not on my server I cant control it.. > >Thanks.. > > > > >-- >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.mossroot.com/index.php
    AIM Handle: Buffalo2K
    e-mail: rscrawfordmossroot.com
    "When you lose the power to laugh at yourself, you lose the power to think 
    straight."  --Clarence Darrow
    

    attached mail follows:


    It would be a much better idea to set the +s flag on the executable you are trying to run, and make sure it's owned by the other user.

    -----Original Message----- From: Henrik Hansen [mailto:hhmailserver.dk] Sent: Wednesday, March 07, 2001 1:10 PM To: php general Subject: Re: [PHP] exec as another user

    > Hi, > > This may be a stupid question but how can I execute programs as another > user under php? > I'm using Linux with Apache 1.3.12 and PHP 4.

    The only way i can figure out would be by using the sudo command without a password (don't do that with root), do a 'man sudo' on your linux box

    --
    Henrik Hansen
    

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


    Or install the cgi version and use it in conjunction with suExec alongside the module version.

    jason

    ----- Original Message ----- From: "Jon Snell" <jsnellnetworkninja.com> To: "php general" <php-generallists.php.net> Sent: Thursday, March 08, 2001 9:44 AM Subject: RE: [PHP] exec as another user

    > It would be a much better idea to set the +s flag on the executable you are > trying to run, and make sure it's owned by the other user. > > -----Original Message----- > From: Henrik Hansen [mailto:hhmailserver.dk] > Sent: Wednesday, March 07, 2001 1:10 PM > To: php general > Subject: Re: [PHP] exec as another user > > > > Hi, > > > > This may be a stupid question but how can I execute programs as another > > user under php? > > I'm using Linux with Apache 1.3.12 and PHP 4. > > The only way i can figure out would be by using the sudo command without a > password > (don't do that with root), do a 'man sudo' on your linux box > > -- > Henrik Hansen > > > -- > 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:


    And be careful what you put a +s on, so it can't be exploited

    --
    Henrik Hansen
    ----- Original Message -----
    From: "Jon Snell" <jsnellnetworkninja.com>
    To: "php general" <php-generallists.php.net>
    Sent: Thursday, March 08, 2001 12:44 AM
    Subject: RE: [PHP] exec as another user
    

    > It would be a much better idea to set the +s flag on the executable you are > trying to run, and make sure it's owned by the other user. > > -----Original Message----- > From: Henrik Hansen [mailto:hhmailserver.dk] > Sent: Wednesday, March 07, 2001 1:10 PM > To: php general > Subject: Re: [PHP] exec as another user > > > > Hi, > > > > This may be a stupid question but how can I execute programs as another > > user under php? > > I'm using Linux with Apache 1.3.12 and PHP 4. > > The only way i can figure out would be by using the sudo command without a > password > (don't do that with root), do a 'man sudo' on your linux box > > -- > Henrik Hansen > > > -- > 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 want to check the time for queries. I have

    $starttime = getmicrotime(); $endtime = getmicrotime(); $delta = $endtime - $starttime;

    How do I display the seconds/milliseconds?

    Many thanks..........

    Todd

    --
    Todd Cary
    Ariste Software
    toddaristesoftware.com
    

    attached mail follows:


    <?php

    function mtime() { $mtime = microtime(); $mtime = str_replace('.', '', $mtime); $mtime = explode(' ', $mtime); $mtime = $mtime[1] . $mtime[0];

    return($mtime); }

    class debug {

    function debug() { $this->start = mtime(); }

    function reset() { $all_vars = get_object_vars($this); foreach($all_vars as $pos => $val) if ($pos != 'error') unset($this->$pos); }

    function time($text = '') { $this->break = mtime(); $time = ($this->break - $this->start) / 1000000000; echo number_format($time, 4) .' '. $text ."<br>\n"; $this->start = $this->break; } }

    $debug = new debug;

    //-------------------------------------------------------------------

    $debug->time('start');

    // code snippit

    $debug->time('end');

    ?>

    -- 
    

    Chris Lee Mediawaveonline.com

    ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120

    leemediawaveonline.com

    "Todd Cary" <toddaristesoftware.com> wrote in message news:3AA6D172.41E61B8Caristesoftware.com... I want to check the time for queries. I have

    $starttime = getmicrotime(); $endtime = getmicrotime(); $delta = $endtime - $starttime;

    How do I display the seconds/milliseconds?

    Many thanks..........

    Todd

    -- Todd Cary Ariste Software toddaristesoftware.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

    attached mail follows:


    I would like to be able to populate the options of a select box with the contents of my images directory online so I can select the image I want to go with the form I am filling out. what functions do I need to look into to figure this one out?

    Jerry Lake - jerryleuropa.com Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com

    attached mail follows:


    Check out XVI. Directory functions and XX. Filesystem functions of the PHP manual.

    ----- Original Message ----- From: "Jerry Lake" <jerryleuropa.com> To: "Henrik Hansen" <hhmailserver.dk>; "php general" <php-generallists.php.net> Sent: Thursday, March 08, 2001 11:10 AM Subject: [PHP] populate select box with contents of a file?

    > I would like to be able to populate > the options of a select box with the > contents of my images directory online > so I can select the image I want to > go with the form I am filling out. > what functions do I need to look into > to figure this one out? > > Jerry Lake - jerryleuropa.com > Web Designer > Europa Communications - http://www.europa.com > Pacifier Online - http://www.pacifier.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 >

    attached mail follows:


    On Thu, 8 Mar 2001 11:10, Jerry Lake wrote: > I would like to be able to populate > the options of a select box with the > contents of my images directory online > so I can select the image I want to > go with the form I am filling out. > what functions do I need to look into > to figure this one out?

    The directory functions - there are some simple samples in readdir() - and is_file and is_dir may be useful

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

    attached mail follows:


    Take a look at dir() and readdir(). Those along with echo() should help you out.

    Sean

    > -----Original Message----- > From: Jerry Lake [mailto:jerryleuropa.com] > Sent: Wednesday, March 07, 2001 7:40 PM > To: Henrik Hansen; php general > Subject: [PHP] populate select box with contents of a file? > > > I would like to be able to populate > the options of a select box with the > contents of my images directory online > so I can select the image I want to > go with the form I am filling out. > what functions do I need to look into > to figure this one out? > > Jerry Lake - jerryleuropa.com > Web Designer > Europa Communications - http://www.europa.com > Pacifier Online - http://www.pacifier.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 >

    attached mail follows:


    Sorry about this, but I don't know much about LDAP, and the book I have doesn't tell me much.

    I was shown the following script to grab information from an LDAP server and display the results in a phonebook type format.

    <HTML> <BODY> <?php $ldapserver = "ldap.something.com"; $basedn = "dc=something, dc=com";

    $dir =ldap_connect($ldapserver); // Connect to server

    if ($dir) { ldap_bind($dir); // Bind to the server $result = ldap_search($dir, $basedn, "sn=*"); // query connection, set the base and look for any sn

    $info = ldap_get_entries($dir, $result); // The results get sent to the $info object

    for ($i=0; $i<$info["count"]; $i++) { // Count is a ldap feature that contains the length of the resultset echo $info[$i]["cn"][0]; // choose any parameter you want see here }

    ldap_close($dir); } ?> </BODY> </HTML>

    The problem I am running into I think is that I work for a school district, and I don't have a .com address. I have anoka.k12.mn.us. I tried to put in $basedn = "dc=anoka, dc=k12, dc=mn, dc=us"; but I still receive an error on ldap_search. Am I doing this correctly?

    Mike

    attached mail follows:


    Mike

    The purpose of setting the basedn is to say "search in this branch of the directory".

    The only person who can really tell you what basedn to use is whoever designed or manages the structure of your LDAP server. Having said that, a base dn is commony something like ... o=Your Organisation,c=US

    Some LDAP managers also make consistent use of the "ou" or "organizationalUnit" attribute to provide a further logical division of the directory. If your directory is organised this way, and you want to restrict your search to just one ou in the organisation, you might set the basedn for the search to be ou=Whatever Section,o=Your Organisation,c=US

    HTH

    Nick Talbott IT Policy and Strategy Manager, Powys County Council, UK

    email nicktpowys.gov.uk FAX +44 (0) 1597 824781 web http://www.powys.gov.uk and http://www.powysweb.co.uk

    -----Original Message----- From: Mike Tuller <mitull01willy.wsc.edu> To: php mailing list <php-generallists.php.net> Date: 08 March 2001 01:03 Subject: [PHP] ldap_search()

    >Sorry about this, but I don't know much about LDAP, and the book I have >doesn't tell me much. > >I was shown the following script to grab information from an LDAP server and >display the results in a phonebook type format. > ><HTML> ><BODY> ><?php >$ldapserver = "ldap.something.com"; >$basedn = "dc=something, dc=com"; > >$dir =ldap_connect($ldapserver); // Connect to server > >if ($dir) { > ldap_bind($dir); // Bind to the server > $result = ldap_search($dir, $basedn, "sn=*"); // query connection, set >the base and look for any sn > > $info = ldap_get_entries($dir, $result); // The results get sent to the >$info object > > for ($i=0; $i<$info["count"]; $i++) { // Count is a ldap feature that >contains the length of the resultset > echo $info[$i]["cn"][0]; // choose any parameter you want see here > } > > ldap_close($dir); >} >?> ></BODY> ></HTML> > > >The problem I am running into I think is that I work for a school district, >and I don't have a .com address. I have anoka.k12.mn.us. I tried to put in >$basedn = "dc=anoka, dc=k12, dc=mn, dc=us"; but I still receive an error on >ldap_search. Am I doing this correctly? > >Mike > > >-- >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 All,

    Can anyone think of a reason that php files would work but anything named php3 would attempt to download?

    Another wierd thing is that test.php3?mode=phpinfo works but test.php3 does not (but should) If you rename test.php3 to test.php it does work.

    httpd.conf section:

    AddType application/x-httpd-php-source .phps AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php .phtml

    Darren

    attached mail follows:


    This is follow up to two earlier postings by me. I would have replied to the thread(s) but my digest does not seem to be arriving. The earlier links are http://marc.theaimsgroup.com/?l=php-general&m=98399367205538&w=2 http://marc.theaimsgroup.com/?l=php-general&m=98391734022011&w=2

    I believe I have tracked down the nasty heisenbug, but do not know how to squash it.

    I initially had a table with ~60 rows and five columns. Two of the columns are simple, the other three are forms with 4 hidden variables and a submit button. Initially the table was one long string and about 2/3 the way through it, the string would terminate prematurely. I split the string to an array placing each row of the table in a separate cell. This changed where the errors occurred, but did not fix the problem. I then split the table into multiple smaller tables with each table containing 5 rows. Once again it changes the location of the errors, but does not fix anything. Throughout all this the page is about 45Kb. If the row where the error occurred is echo'd with htmlspecialshars the row looks correct(and the error moved to the line before). When I echo'd the line before the initially observed error I can view both the source html and the rendered version. The row of the array is correct, but the sent source is truncated.

    The error does not occur on a development machine (PIII700 w/ 128MB) running RH7/php4/apache, but does occur on the production server PI133 w/ 64 MB) RH5.2/php4/AOLServer.

    Can anyone suggest the cause of this bug and a possible fix? Has anyone heard of a AOLServer truncating data from php? Does HTTP sometimes truncate packets in weird ways?

    Eric Nielsen

    attached mail follows:


    Homepage: http://www.phpinsider.com/php/code/Smarty/

    ChangeLog for 1.3.1: - document first, last, index_prev, index_next (Monte) - added 'first' and 'last' section properties. (Andrei) - split out compiling code to separate class for faster template execution time (Monte) - fixed a couple of minor PHP warnings (Monte) - added and documented unregister_modifier() and unregister_function() API calls. (Monte) - added and documented 'fetch' and 'math' functions. (Monte) - added ability to index looped variables by section properties, e.g. $foo.index_prev/bar. (Andrei) - added index_prev and index_next section properties. (Andrei) - fixed issue with php executing in literal blocks. (Monte)

    attached mail follows:


    There is a error on www.php.net

    http://www.php.net/manual/browse-errata.php

    Fatal error: Call to undefined function: spc() in /local/Web/sites/phpweb/manual/browse-errata.php on line 39

    I don't know where to report.... I hope www.php.net admin read this post.

    Regards, Yasuo Ohgaki

    attached mail follows:


    To the PHP.net design person/people:

    THANK YOU! I'm tempted to send this as an HTML mail with THANK YOU in big bold flashing letters. :)

    The older look was neat to show off to people re: pop up menus, etc., but this is a real speed demon, and will be much more useful for searching around.

    Thanks again!

    attached mail follows:


    > The older look was neat to show off to people re: pop up menus, etc., > but this is a real speed demon, and will be much more useful for > searching around.

    I agree. Very smart, smooth and clean!

    Jason

    -- 
    Jason Murray
    jasonmmelbourneit.com.au
    Web Design Team, Melbourne IT
    Fetch the comfy chair!
    

    attached mail follows:


    On Tue, Mar 06, 2001 at 12:28:33PM -0600, Boget, Chris wrote: > > >Is it possible to use the auto prepend/append directives to > > >prepend/append particular files only to files with a particular > > >extension? > > I don't believe you can do this directly with PHP but you > > probably can with > > Apache: > > <Files *.html> > > php_value prepend_file "foo.php" > > </Files> > > Where do you put this? > We've tried everywhere, but's not picking up. Are you doing this? > And it's working?

    I just did a simple test using a .htaccess file. foo.php echos "foo"; bar.php echos "bar".

    Without anything in .htaccess, loading foo.php returns "foo" and bar.php returns "bar".

    With php_value auto_prepend_file "bar.php", foo.php returns "barfoo" and bar.php returns "barbar".

    With this: <Files *.php> php_value auto_prepend_file "bar.php" </Files>

    foo.php returns "barfoo" and bar.php returns "barbar".

    With this: <Files f*.php> php_value auto_prepend_file "bar.php" </Files>

    foo.php returns "barfoo" and bar.php returns "bar".

    Switching from the .htaccess file to my Apache config file, this produces the same effect as that last <Files...> directive: <Location /prep/f*.php> php_value auto_prepend_file "bar.php" </Location>

    foo.php returns "barfoo", bar.php returns "bar".

    Doing the same thing with a <Directory> did not work.

    attached mail follows:


    Greetings!

    I am using PHP and MySQL in RedHat 6.0. I have used mysql_fetch_array() to display the datas in web page but all the columns are printed twice. What can be the wrong with my code: <?php $connection=mysql_connection(...............); $db=mysql_select_db(.....................); $sql="select * from my db"; $sql_result=$mysql_query($sql,$connection); print "<table>"; while ($row=mysql_fetch_array($sql_result)) { print "<tr>"; foreach ($row as $field) print "<td>$field</td>"; print "<td><a href=\"search.php?ID=$row[ID]\">"; print "Get it"; print "</a></td>"; print "</tr>"; } print "</table>"; ?>

    But it works fine with mysql_fetch_row() however it does not pass the pass the variable ID.

    Looking forward to hearing from you.

    Warm regards, DT

    attached mail follows:


    <?php $connection=mysql_connection(...............); $db=mysql_select_db(.....................); $sql="select * from my db"; $sql_result=mysql_query($sql,$connection); print "<table>"; while ($row=mysql_fetch_array($sql_result)) { print "<tr>"; foreach ($row as $field) print "<td>$field</td>"; print "<td><a href=\"search.php?ID=$row[ID]\">"; print "Get it"; print "</a></td>"; print "</tr>"; } print "</table>"; ?>

    Try that, you tried to call $mysql_query, when you needed to call mysql_query. In your code, $mysql_query isn't a variable, it's a function in PHP. -----Original Message----- From: Deependra B. Tandukar [mailto:deepndraicimod.org.np] Sent: Wednesday, March 07, 2001 9:34 PM To: php-generallists.php.net Subject: [PHP] mysql_fetch_array()

    Greetings!

    I am using PHP and MySQL in RedHat 6.0. I have used mysql_fetch_array() to display the datas in web page but all the columns are printed twice. What can be the wrong with my code: <?php $connection=mysql_connection(...............); $db=mysql_select_db(.....................); $sql="select * from my db"; $sql_result=$mysql_query($sql,$connection); print "<table>"; while ($row=mysql_fetch_array($sql_result)) { print "<tr>"; foreach ($row as $field) print "<td>$field</td>"; print "<td><a href=\"search.php?ID=$row[ID]\">"; print "Get it"; print "</a></td>"; print "</tr>"; } print "</table>"; ?>

    But it works fine with mysql_fetch_row() however it does not pass the pass the variable ID.

    Looking forward to hearing from you.

    Warm regards, DT

    --
    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 Thu, 8 Mar 2001 14:03, Deependra B. Tandukar wrote: > Greetings! > > I am using PHP and MySQL in RedHat 6.0. > I have used mysql_fetch_array() to display the datas in web page but > all the columns are printed twice. What can be the wrong with my code: > <?php > $connection=mysql_connection(...............); > $db=mysql_select_db(.....................); > $sql="select * from my db"; > $sql_result=$mysql_query($sql,$connection); > print "<table>"; > while ($row=mysql_fetch_array($sql_result)) > { > print "<tr>"; > foreach ($row as $field) > print "<td>$field</td>"; > print "<td><a href=\"search.php?ID=$row[ID]\">"; > print "Get it"; > print "</a></td>"; > print "</tr>"; > } > print "</table>"; > ?> > > But it works fine with mysql_fetch_row() however it does not pass the > pass the variable ID. > > Looking forward to hearing from you. > > Warm regards,

    First up, shouldn't you have {} to delineate what is actually the foreach procedure(s)?

    I would suggest using extract within your While loop to make the table fields available as variables.

    while ($row=mysql_fetch_array($sql_result)) { extract($row); echo "<tr>"; echo "<td>$field</td>"; \\ or whatever the field is called echo "<td><a href=\"search.php?ID=$ID\">"; echo "Get it"; echo "</a></td>"; echo "</tr>"; }

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

    attached mail follows:


    Hello,

    I am trying to execute a simple SELECT from Oracle 8.1.6 in a php4.0.3pl1 page.....

    $sql_get_info="SELECT ID, Title, CLOB FROM Employee WHERE ID=37";

    if ($cursor = ora_do($connection, $sql_get_info)) { $valid_opp_title = ora_getcolumn($cursor, 0); //id $valid_opp_text = ora_getcolumn($cursor, 1); //title $valid_opp_sort_flag = ora_getcolumn($cursor, 2); //CLOB }

    ....and I get the following error:

    Warning: Ora_Do failed (ORA-00932: inconsistent datatypes -- while processing OCI function OEXFET) in /direcotry/file.php

    If I take out the reference to the clob field, my page works fine. Once I add it, it blows-up.

    Here is how I configured Apache 1.3.12 './configure' '--with-apxs=/staples/apache/bin/apxs' '--with-config-file-path=/shoes/httpd' '--with-oracle=/bob/bobagain/bobapp/oracle/product/8.1.6'

    Any idea what I am doing wrong? I am using the clob field because I need to store text documents that may be longer than 4000 characters.

    Thanks,

    Bob K

    attached mail follows:


    Please pardon the intrusion, but I wanted to drop a not eto the Twin Cities PHP User Group member to let them know that aloing with the move of PHPUserGroups.org to a hosting service, that mailin glist was moved also. Unfortuneately in the move, all the members addresses were lost. So please email tcphpug-subscribephpusergroups.org

    Also, any PHP User Group who are having trouble find hosting for their group pages can email me at cmoewesmoewes.com for limited space under the groups.phpusergroups.org domain.

    I am also looking for a decent web based "secure" file editor to give people access to edit pages (see above paragraph), any leade would be great as I don't have time to write it myself.

    Thanks..

    Chris Moewes http://www.phpusergroups.org http://www.linuxnovice.org

    attached mail follows:


    I knew PHP was awesome, and I have seen some awesome functions. I've been doing PHP for a few years now and I didn't even know this existed:

    extract(): http://www.php.net/manual/en/function.extract.php

    This is SO COOL. I just had to share my joy.

    -- 
    

    Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/

    attached mail follows:


    FYI For those who do not know about news server. (I didn't know there is a news server for mailing lists.)

    news://news.php.net

    I think it is better to be mentioned in www.php.net support or any other appropriate places.

    Yasuo Ohgaki

    attached mail follows:


    Options are great! Btw, this information can be found here :

    http://www.php.net/support.php

    Regards,

    Philip

    On Thu, 8 Mar 2001, Yasuo Ohgaki wrote:

    > FYI > For those who do not know about news server. > (I didn't know there is a news server for mailing lists.) > > news://news.php.net > > I think it is better to be mentioned in www.php.net support or any other > appropriate places. > > Yasuo Ohgaki > > > -- > 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 Thu, 8 Mar 2001 15:43, Yasuo Ohgaki wrote: > FYI > For those who do not know about news server. > (I didn't know there is a news server for mailing lists.) > > news://news.php.net > > I think it is better to be mentioned in www.php.net support or any > other appropriate places. > > Yasuo Ohgaki

    It _is_ mentioned on the support page, just below the mailing list information - at least on the new site and I'm sure it was there before.

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

    attached mail follows:


    Trying to make a script that gets another and resends it.

    Begin proxy.php <?php

    $scriptpath = "http://".getenv(SERVER_NAME).getenv(SCRIPT_NAME);

    // Log the request $fp = fopen("/www/htdocs/heim/test/heim/test/log.txt", "a"); if ($fp){ fputs($fp, "$REMOTE_ADDR - GET $url\n"); fclose($fp); }

    if ((substr($url, 0, 7) == "http://") && (substr_count($url, "http://") == 1)){

    $pagedata = implode("", file($url));

    //try to make absolute links go through the proxy script

    $pagedata = str_replace("href=\"http://", "href=" $scriptpath "?url="$url, $pagedata);

    echo $pagedata;

    } else{ echo "something went wrong"; }

    ?>

    The script works great, as long as the line beginning $pagedata is commented out. But, I would like to use that line to convert all absolute links in the page to also go through the proxy.php

    Also, any ideas of how to process relative links and make them into absolute links?

    Ex. (lets say $scriptpath is http://www.host.com/proxy.php)

    <a href="about.html"> which is actually www.abc123.com/about.html

    Becomes:

    <a href="http://www.host.com/proxy.php?url=http://www.abc123.com/about.html

    Any help on converting these links would be very much appreciated

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

    attached mail follows:


    Hello,

    I have been using the PHP 4.0.3 file upload mechanism for about 9 months now. The other day it ceased to work. In the location where I copy the uploaded file too, a file is created with the appropriate name, but its file size is 0. All file functions, return true on it

    is_uploaded_file() move_uploaded_file($userfile, $my_dir); file_exists($userfile) and file_exists($my_new_name)

    It seems that the content of the file is not being sent, or maybe it is, but getting lost somewhere

    Can anyone help? None of the code was modified at all, as I am the only one with access to the machine.

    Thanks in advance /Cody Caughlan

    attached mail follows:


    Assuming that you do have a primary key, how can you grab the last record you inserted? Can you use IDENTITY, or something like that? "Christian Reiniger" <creinigmayn.de> wrote in message news:01030310383101.00589chrisbig... On Saturday 03 March 2001 05:16, you wrote:

    > i'm having a little bit of problems with a little mysql table i'm > using. the table has no primary key nor index nor nothing. > > i was wondering if it's possible to select the last inserted record of > a table with this characteristics.

    Add a primary key. now. Accesses without that will be painfully slow.

    --
    Christian Reiniger
    LGDC Webmaster (http://sunsite.dk/lgdc/)
    

    "These are the people who proudly call themselves "hackers" -- not as the term is now abused by journalists to mean a computer criminal, but in its true and original sense of an enthusiast, an artist, a tinkerer, a problem solver, an expert."

    - ESR

    -- 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 Thursday 08 March 2001 06:42, you wrote: > Assuming that you do have a primary key, how can you grab the last > record you inserted? Can you use IDENTITY, or something like that?

    For that I'd add another field - type "timestamp". In MySQL, timestamp fields are automatically set to NOW() on each insert and update *if* they are not set to something else in it (the insert or update)

    Or simply add some timestamp or datetime field that you "manually" set to NOW() on each insert (if you don't want the date to be changed on an UPDATE).

    > On Saturday 03 March 2001 05:16, you wrote: > > i'm having a little bit of problems with a little mysql table i'm > > using. the table has no primary key nor index nor nothing. > > > > i was wondering if it's possible to select the last inserted record > > of a table with this characteristics. > > Add a primary key. now. Accesses without that will be painfully slow.

    -- 
    Christian Reiniger
    LGDC Webmaster (http://sunsite.dk/lgdc/)
    

    Very funny, Scotty! Now beam up my clothes...

    attached mail follows:


    > On Thursday 08 March 2001 06:42, you wrote: > > Assuming that you do have a primary key, how can you grab the last > > record you inserted? Can you use IDENTITY, or something like that? > > For that I'd add another field - type "timestamp". > In MySQL, timestamp fields are automatically set to NOW() on each insert > and update *if* they are not set to something else in it (the insert or > update)

    I would prefer using mysql_insert_id() if possible. http://www.php.net/manual/en/function.mysql-insert-id.php

    Regards,

    Søren

    attached mail follows:


    On Thursday 08 March 2001 10:31, you wrote:

    > > On Thursday 08 March 2001 06:42, you wrote: > > > Assuming that you do have a primary key, how can you grab the last > > > record you inserted? Can you use IDENTITY, or something like > > > that? > > > > For that I'd add another field - type "timestamp". > > In MySQL, timestamp fields are automatically set to NOW() on each > > insert and update *if* they are not set to something else in it (the > > insert or update) > > I would prefer using mysql_insert_id() if possible. > http://www.php.net/manual/en/function.mysql-insert-id.php

    Which however only works (1) with autoincrement keys and (2) for the last insert you did using the same mysql connection, i.e. if you do an insert in foo.php, mysql_insert_id () won't show anything in bar.php

    -- 
    Christian Reiniger
    LGDC Webmaster (http://sunsite.dk/lgdc/)
    

    Very funny, Scotty! Now beam up my clothes...

    attached mail follows:


    this is a test for echo.

    attached mail follows:


    On Thu, 8 Mar 2001 16:32, matthusaexpress.net wrote: > this is a test for echo. this is a test for echo. .ohce rof tset a si siht

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

    attached mail follows:


    On Thu, 8 Mar 2001 16:32, matthusaexpress.net wrote: > this is a test for echo.

    Heh. If you read this, Matt, your email address is wrong :-( His address responded with

    Hi. This is the qmail-send program at usaexpress.net. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out.

    <matthusaexpress.net>: Sorry, no mailbox here by that name. (#5.1.1)

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

    attached mail follows:


    ha ha ha .....

    Maxim Maletsky

    -----Original Message----- From: David Robley [mailto:huntsmanwww.nisu.flinders.edu.au] Sent: Thursday, March 08, 2001 3:13 PM To: matthusaexpress.net; php-generallists.php.net Subject: Re: [PHP] test - can someone please reply?

    On Thu, 8 Mar 2001 16:32, matthusaexpress.net wrote: > this is a test for echo. this is a test for echo. .ohce rof tset a si siht

    -- 
    David Robley                        | WEBMASTER & Mail List Admin
    RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
    AusEinet                            | http://auseinet.flinders.edu.au/
                Flinders University, ADELAIDE, SOUTH AUSTRALIA
    

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


    okay I do reply here Jack jackyactivelifestyle.com "There is nothing more rewarding than reaching the goal you set for yourself" ----- Original Message ----- From: Maxim Maletsky <maxim.maletskyjapaninc.net> To: <huntsmanwww.nisu.flinders.edu.au>; <matthusaexpress.net>; <php-generallists.php.net> Sent: Thursday, March 08, 2001 1:29 AM Subject: RE: [PHP] test - can someone please reply?

    > ha ha ha ..... > > > > Maxim Maletsky > > > > -----Original Message----- > From: David Robley [mailto:huntsmanwww.nisu.flinders.edu.au] > Sent: Thursday, March 08, 2001 3:13 PM > To: matthusaexpress.net; php-generallists.php.net > Subject: Re: [PHP] test - can someone please reply? > > > On Thu, 8 Mar 2001 16:32, matthusaexpress.net wrote: > > this is a test for echo. > this is a test for echo. .ohce rof tset a si siht > -- > David Robley | WEBMASTER & Mail List Admin > RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ > AusEinet | http://auseinet.flinders.edu.au/ > Flinders University, ADELAIDE, SOUTH AUSTRALIA > > -- > 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:


    Hi over there! I have just started up my Opera browser and my lovely home page wasn't there, it has completely disappeared from it... I've seen some light - it was the new PHP.NET design!!! Whoever made it has done a great job, it was some time I wished this change, it became so speedy and the usability has improved immensely... very cool. Great job guys! And, if anyone on the list finds any bugs there - please contribute!

    Maxim Maletsky - maximj-door.com <mailto:maximj-door.com> Webmaster, J-Door.com / Jpan Inc. LINC Media, Inc. TEL: 03-3499-2175 x 1271 FAX: 03-3499-3109

    http://www.j-door.com <http://www.j-door.com/> http://www.japaninc.net <http://www.japaninc.net/> http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/>

    attached mail follows:


    I'm putting together a regex to pull all of the urls out of a web page. Not the href tag, but just the url part of that tag.

    Here's what I've come up with:

    preg_match_all('/<.*href\s*=\s*(\"|\')?(.*?)(\s|\"|\'|>)/i', $html, $matches); foreach($matches[2] as $m) print "<P>$m\n";

    All regex masters please tell me if I'm missing something. It's working well, but I'm still learning about perl regex and I'd like any input if at all possible.

    What's a good way to exclude things like javascript: urls and other non URI info? I guess what I'm really looking for is all the http urls, no ftp, mms etc... or anything like that.

    If it's right, then hopefully someone can use it!

    Matt Friedman

    attached mail follows:


    On Thursday 08 March 2001 09:19, you wrote: > I'm putting together a regex to pull all of the urls out of a web page. > Not the href tag, but just the url part of that tag. > > Here's what I've come up with: > > preg_match_all('/<.*href\s*=\s*(\"|\')?(.*?)(\s|\"|\'|>)/i', $html, > $matches); > foreach($matches[2] as $m) print "<P>$m\n"; > > All regex masters please tell me if I'm missing something. It's working > well, but I'm still learning about perl regex and I'd like any input if > at all possible.

    Pretty good. Some minor things: (1) "<.*href" will also match <a name='foo'><h2> example of href="hello"</h2>

    (2) You're pretty lax on the tag syntax - you don't require quotes to match, don't require quotes at all etc

    I'd rewrite it to '/<\s*a\s*href\s*=\s*("|\')(.*?)\\1\s*>/i'

    > What's a good way to exclude things like javascript: urls and other non > URI info? I guess what I'm really looking for is all the http urls, no > ftp, mms etc... or anything like that.

    Use the following regexes on your result to get only the types you want:

    $HostName = '([a-zA-Z][\w-]*(\.[a-zA-Z][\w-]*)+)'; $HostIP = '(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})'; $Host = '(' . $HostName . '|' . $HostIP . ')'; $HTTPPath = '(([\w\.\/~\?%=\-]|&amp;)+)'; $FTPPath = '(\/[^\/\s]*)*\/?'; $Port = '(:\d+)?'; $HTTPURL = 'http:\/\/' . $Host . $Port . $HTTPPath; $WWWAddress = 'www\.' . $HostName . $Port . $HTTPPath; $FTPURL = 'ftp:\/\/' . $Host . $FTPPath;

    -- 
    Christian Reiniger
    LGDC Webmaster (http://sunsite.dk/lgdc/)
    

    Very funny, Scotty! Now beam up my clothes...

    attached mail follows:


    Are you still encountering the error? I don't see it.

    --zak

    ----- Original Message ----- From: "Yasuo Ohgaki" <yohgakihotmail.com> To: <php-generallists.php.net>; <php-qalists.php.net> Sent: Wednesday, March 07, 2001 8:06 PM Subject: [PHP-QA] Error in www.php.net (To site admin)

    > There is a error on www.php.net > > http://www.php.net/manual/browse-errata.php > > Fatal error: Call to undefined function: spc() in > /local/Web/sites/phpweb/manual/browse-errata.php on line 39 > > I don't know where to report.... > I hope www.php.net admin read this post. > > Regards, > Yasuo Ohgaki >

    attached mail follows:


    Hi,

    I wrote php-lib-htmlparse doesn't do they arguments stuff, but should be easily added (code is there already although not functioning)

    go to www.phpbuilder.com for the code snippets

    Bolke

    -----Oorspronkelijk bericht----- Van: Nathaniel Hekman [mailto:NHekmangeo-slope.com] Verzonden: Wednesday, March 07, 2001 9:39 PM Aan: 'php-generallists.php.net' Onderwerp: RE: [PHP] parsing html / xml (more)

    Matt McClanahan wrote: [...] > You're not going to find an XML parser that allows for most HTML, > because if such a parser did exist, it would be a broken XML parser. :) [...]

    Fair enough, and that's as I expected. So that brings me to the second part of my question: is there any php library that allows parsing of html?

    Perhaps I'll have to write one myself. All I want really is something that parses a bunch of text and calls handlers whenever tags are encountered. Just like xml_parse, except I don't care if tags are out of order, I don't care about case, and I don't care if there is a close tag for every open. If anyone knows of a package that does this, please advise. If anyone else would be interested in this, let me know and I could post my code when I'm done (if I have to do this myself).

    Nate

    -- 
    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 fixed the problem I had with Netscape not working well with sessions (whereas MSIE worked fine for me). Apparently, Netscape works well with cookies (and ironically, MSIE doesn't). Of course, many would probably disagree, but I'm ONLY speaking from MY recent experience and specifically on the Mac platform. So, anyway, my solution was to set both sessions and cookies at the same time, wherever needed, and do my authentication (etc) by seeing if either one or the other is set (e.g., if $session = logged or $cookie = bitten then...).

    Hope this helps someone.

    Best,

    -- 
    Robert Fischler, PhD ABD
    IUB Campus Manager
    CampCampus.com
    

    > From: "Robert Fischler, Ph.D. ABD" <fischlercampcampus.com> > Date: Fri, 02 Mar 2001 17:59:52 -0600 > To: <php-generallists.php.net> > Subject: [PHP] Netscape problems with PHP > > Hello all (first post for me!): > > I've been running into problems when testing PHP scripts on Netscape (when > MSIE works fine). > > First problem (SOLVED) was that Netscape does something funny with the > $PHP_SELF environmental variable, so I've learned to circumvent the problem > by just hard-coding the page name instead of relying on the $PHP_SELF trick. > > Second problem (UNSOLVED, SO FAR) is that Netscape (...and I'm talking about > Communicator 4.75 for the Mac, at least) doesn't carry my session variables > over from page to page. Has anyone else ran into this problem and found a > solution? > > Thanks!!! > P.S. Things seem to work fine in the new Netscape 6, but most Mac users > are still at 4.75. > > -- > Robert Fischler, PhD ABD > IUB Campus Manager > CampCampus.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 > >

    attached mail follows:


    We send SMS messages from Oracle, but the method could be used in php I think. We use www.quios.com. They accept SMS messages as XML documents which you simply post to their site using http. The response, also by http, is an xml document. It is very easy to build your outgoing xml document, and the response document is so simple in structure that you could probably get by without an xml parser to interpret it.

    HTH

    -----Original Message----- From: Michael Smith [mailto:msmithexchange.wcities.com] Sent: 07 March 2001 17:00 To: php-generallists.php.net Subject: sending SMS messages via PHP

    I can easily send standard email messages via PHP. Does anyone know how to send SMS messages?

    --
    Michael A. Smith <msmithwcities.com>
    Director of Data Systems, wcities.com
    ICQ: 35884415
    :wq
    

    ************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.

    **************************************************************************

    attached mail follows:


    Thanks Lance. The file is there, though I didn't put it there!

    -----Original Message----- From: Lance Koh [mailto:memoriespost1.com] Sent: 07 March 2001 14:20 To: Greig, Euan Cc: php-generallists.php.net Subject: Re: [PHP] PHP dll on NT - more reliable with Apache than IIS?

    did you copy this file "php4ts.dll" into your winnt/system32 folder?

    i believe you need that in order for the isapi to work

    --lance

    ----- Original Message ----- From: "Greig, Euan" <Euan.Greigbrann.com> To: <php-generallists.php.net> Sent: Wednesday, March 07, 2001 5:44 PM Subject: [PHP] PHP dll on NT - more reliable with Apache than IIS?

    I have been having problems using the PHP 4 ISAPI module with IIS 4 on NT4 (The most common problem is HTTP 500 internal server error which disappears if page is refreshed). This is apparently not too surprising given the current status of the ISAPI module. So I have switched to using CGI, which seems absolutely fine, but is noticeably slower.

    I was wondering if it is worth trying the Apache module. Will it be more reliable? And are there any notable gotchas to watch out for in installing this combination?

    Euan Greig Technical Consultant BRANN DATA euan.greigbrann.com 01285 645997

    ************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.

    **************************************************************************

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

    ************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.

    **************************************************************************

    attached mail follows:


    Thanks Paulo, that is very interesting and useful. I will give apache a try.

    Euan

    -----Original Message----- From: Paulo Parola [mailto:phpbrazilinfo.com] Sent: 07 March 2001 20:18 To: php-generallists.php.net Subject: Re: [PHP] PHP dll on NT - more reliable with Apache than IIS?

    We have started using PHP on NT over Apache, but since our ISP used IIS we switched to it. Anyway, we just started having real problems after our application got really big, so that I cannot really compare Apache x IIS on NT very well (our errors started happening on IIS if I recall correctly).

    And you are right, CGI version is much more stable: our application has even crashed IIS on our ISP (and thus all other clients websites as well went down...) when running PHP as ISAPI. We asked the ISP to configure PHP as CGI for our virtual host only, did the same test and got an error but all the sites still were running fine, ours as well.

    I believe you should do some tests over apache, it is really easy to install. And relating to IIS, CGI is definetly more stable. You could anyway consider moving to Linux or UNIX. The developers of PHP seem also to be much more prolific in relation to this world, for obious reasons... But in my opinion, as a commercial product in a production environment I would say that PHP over Windows is definetly not the better choice.

    Paulo

    ----- Original Message ----- From: Greig, Euan <Euan.Greigbrann.com> To: <php-generallists.php.net> Sent: Wednesday, March 07, 2001 6:44 AM Subject: [PHP] PHP dll on NT - more reliable with Apache than IIS?

    > I have been having problems using the PHP 4 ISAPI module with IIS 4 on NT4 (The most common problem is HTTP 500 internal server error which disappears if page is refreshed). This is apparently not too surprising given the current status of the ISAPI module. So I have switched to using CGI, which seems absolutely fine, but is noticeably slower. > > I was wondering if it is worth trying the Apache module. Will it be more reliable? And are there any notable gotchas to watch out for in installing this combination? > > Euan Greig > Technical Consultant > BRANN DATA > euan.greigbrann.com > 01285 645997 > > > > > > ************************************************************************** > Any opinions expressed in this email are those of the individual and > not necessarily the Company. This email and any files transmitted with > it, including replies and forwarded copies (which may contain alterations) > subsequently transmitted from the Company, are confidential and solely for > the use of the intended recipient. If you are not the intended recipient > or the person responsible for delivering to the intended recipient, be > advised that you have received this email in error and that any use is > strictly prohibited. > > ************************************************************************** > > -- > 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 > >

    ************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.

    **************************************************************************

    attached mail follows:


    I included definition files using require_once(), I noticed the last definition file is not included w/o any error messages.

    I tested with include() and require(), it worked fine but not with require_once() or include_once(). Require_once() and include_once() silently fails to include files.

    I've checked with get_required_files() and get_included_files(), there are 20 files included where it should be 21 files. It seems 20 files for max number of include_once()/require_once() is too few. (Usually I don't include this many files unless I have to)

    I think PHP should warn or raise error if it cannot include files.

    First of all, is this a spec? If so, I'm fine with this restriction. (More than 20 included files are too many anyway)

    If this is a problem, I would like to know other people have the problem. If it is the case, I will post new bug report to bug DB. (Searched with require as keyword in Scripting Engine section, no matched record. Or is this reported?? or even better will it be fixed in 4.0.5?)

    If no one has the same problem, I'm going to update my glibc to see if it fix other strange PHP behavior also. (I have code that loops as if there is "goto" statement under my environment.)

    OS: RedHat7 (w/o glibc update) Apache: 1.3.17 PHP: 4.0.4pl1 (module)

    Thanks for your info.

    --
    Yasuo Ohgaki
    

    attached mail follows:


    Hi all,

    I have a timeout problem with sessions. I use the PHP session handling (4.0.4pl1). It works, but it times to fast out.

    I've set: ini_alter("session.gc_maxlifetime", "172800");

    and

    phpinfo() says: session.cache_expire: local=172800, global=180 session.gc_maxlifetime: local=172800, global=1440

    It times out really quick, mabye 10-20 minutes.

    Any hints on why that might be?

    I used to just use cookies, but I want the url backup system of PHP.

    Also the setting in phpinfo(): url_rewriter.tags : a=href,area=href,frame=src,form=fakeentry

    Is it possible to have a variable other that the PHPSESSION variable be appended to the URL automatically. I.e. I want to use cookies, but if cookies are not accepted then I want to use url variables? And I really don't need the session functionality cause I handle that myself.. (timeout etc.)

    That is just use the feature PHP has to append variables to links and forms. To use it as a cookie backup system, without using PHP sessions..

    So I want a variable MyVAR which is appended to urls and forms automatically ( trans-sid is enabled ).

    If I can do that I also need to know how I can check if cookies are accepted or not, so I can append the variables only if cookies are not accepted.

    ( Using redhat linux 6.2 with the latest PHP version, 4.0.4pl1 )

    Cheers,

    -- 
    Bård Farstad
    Systems developer
    ez.no | developer.ez.no | zez.org
    

    attached mail follows:


    I guess your clients PC's clock is not accurate. How about set timeout to 0? Then session cookie will not timeout until browser is closed.

    You can compile PHP with trans-sid to add session id automatically. http://www.php.net/manual/en/ref.session.php

    I've posted PHP session helper HTML file that checks JavaScript and cookie is enabled. You can find at http://www.zend.com/codex.php?id=458&single=1

    Regards,

    Yasuo Ohgaki

    > Hi all, > > I have a timeout problem with sessions. I use the PHP session handling > (4.0.4pl1). It works, but it times to fast out. > > I've set: > ini_alter("session.gc_maxlifetime", "172800"); > > and > > phpinfo() says: > session.cache_expire: local=172800, global=180 > session.gc_maxlifetime: local=172800, global=1440 > > It times out really quick, mabye 10-20 minutes. > > Any hints on why that might be? > > I used to just use cookies, but I want the url backup system of PHP. > > > Also the setting in phpinfo(): > url_rewriter.tags : a=href,area=href,frame=src,form=fakeentry > > Is it possible to have a variable other that the PHPSESSION variable be > appended to the URL automatically. I.e. I want to use cookies, but if cookies > are not accepted then I want to use url variables? And I really don't need > the session functionality cause I handle that myself.. (timeout etc.) > > That is just use the feature PHP has to append variables to links and forms. > To use it as a cookie backup system, without using PHP sessions.. > > So I want a variable MyVAR which is appended to urls and forms automatically > ( trans-sid is enabled ). > > If I can do that I also need to know how I can check if cookies are accepted > or not, so I can append the variables only if cookies are not accepted. > > ( Using redhat linux 6.2 with the latest PHP version, 4.0.4pl1 ) > > Cheers, > > -- > Bård Farstad > Systems developer > ez.no | developer.ez.no | zez.org > > -- > 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 Thursday 08 March 2001 11:14, Yasuo Ohgaki wrote: > I guess your clients PC's clock is not accurate. How about set timeout to > 0? Then session cookie will not timeout until browser is closed.

    Actually the server and client clock only differs with about 1 minute.

    The 0 timeout will not work. I want the session to be remember for several days, I had no problems with pure cookies while doing this.

    The timeout value that PHP reports suggests that the timeout should be several days.. but it does not seem to work.

    > You can compile PHP with trans-sid to add session id automatically. > http://www.php.net/manual/en/ref.session.php

    I have that and PHP does append the PHPSESSID variable to urls. Works great.

    My question is: can I manually tell PHP to append e.g. MyVAR=foo to all URL's and forms.

    BTW: if you use header( "Location: ..." ); to redirect PHP does not append the session id to the header information (cookie less that is). You have to append it to the Location manually. ( Bug in PHP )

    > I've posted PHP session helper HTML file that checks JavaScript and cookie > is enabled. You can find at > http://www.zend.com/codex.php?id=458&single=1

    I'll check, but I prefer not using javascript.

    cheers,

    -- 
    Bård Farstad
    Systems developer
    ez.no | developer.ez.no | zez.org
    

    attached mail follows:


    > On Thursday 08 March 2001 11:14, Yasuo Ohgaki wrote: > > I guess your clients PC's clock is not accurate. How about set timeout to > > 0? Then session cookie will not timeout until browser is closed. > > Actually the server and client clock only differs with about 1 minute.

    Then how about check the server's response headers that sent to client? You can view headers using wget or like. PHP might be sending global ini var(which is set to small number) to client for some reason.

    > > The 0 timeout will not work. I want the session to be remember for several > days, I had no problems with pure cookies while doing this.

    It might be browser specific problem, if server is sending correct headers. Is it happen all browsers you have? or just a few of them?

    > The timeout value that PHP reports suggests that the timeout should be > several days.. but it does not seem to work. > > > You can compile PHP with trans-sid to add session id automatically. > > http://www.php.net/manual/en/ref.session.php > > I have that and PHP does append the PHPSESSID variable to urls. Works great. > > My question is: can I manually tell PHP to append e.g. MyVAR=foo to all URL's > and forms.

    Do you mean just like trans-sid? I think you cannot as far as I know. PHP Programmers/HTML designer have to write code manually to add query string. Anyone??

    > > BTW: if you use header( "Location: ..." ); to redirect PHP does not append > the session id to the header information (cookie less that is). You have to > append it to the Location manually. ( Bug in PHP ) > > > I've posted PHP session helper HTML file that checks JavaScript and cookie > > is enabled. You can find at > > http://www.zend.com/codex.php?id=458&single=1 > > I'll check, but I prefer not using javascript.

    You also can find very simple PHP code to check cookie is enabled or not at code exchange.

    Regards, Yasuo Ohgaki

    attached mail follows:


    in what way did the previous responses not answer this?

    if you really want a loop then foreach($arrLoginName as $element) or for($x = 0; $x < sizeof($arrLoginName); $x++) will do, but why not just use if(in_array())? Are you really holding all of your user names in a single "" delimited string?

    Tim Ward Senior Systems Engineer

    Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html

    > -----Original Message----- > From: Rol [mailto:rolandblueline.digicomp.ch] > Sent: 07 March 2001 19:09 > To: php-generallists.php.net > Subject: explode question > > > Hello again, > > I'd better explain better. > > I have logon screen Header("WWW-Authenticate: Basic > realm=\"whatever\""); > where I would like the compare the user name $PHP_AUTH_USER > with the one in > my database > All names like Mike or mike are seperated strings > > How can I check the names from this array $arrLoginName = explode("", > $row->usr_loginName) > > and return true if a name in the var $arrLoginName == $PHP_AUTH_USER > > How can I construct a loop which stops and returns true if a > match is found? > > Any hints would be great. > > Many thanks > > Roland > > > >

    attached mail follows:


    I honestly can't remember when and where I found this happening, but since then I've decided not to rely on submit buttons being posted so I haven't seen them working or not working.

    Tim Ward Senior Systems Engineer

    Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html

    > -----Original Message----- > From: Johnson, Kirk [mailto:kjohnsonzootweb.com] > Sent: 07 March 2001 17:46 > To: 'php-generallists.php.net' > Subject: RE: [PHP] RE: Value of if(isset(X)) problem > > > Tim, I just tried this in IE 5.0, and the submit button > name-value pair was > posted along with the other form variables, even though I > submitted the form > by hitting return on another field. Is the behavior you > described specific > to a certain browser version? > > Kirk > > -----Original Message----- > From: Tim Ward [mailto:tim.wardstivesdirect.com] > Sent: Wednesday, March 07, 2001 7:48 AM > To: 'Martin Skjöldebrand'; php-generallists.php.net > Subject: [PHP] RE: Value of if(isset(X)) problem > > > I think you'll find that cmdFinish is only passed through if > the form is > submitted by pressing the button. Hitting return on any other > field will > submit the form without sending cmdFinish. > > > > -----Original Message----- > > From: Martin Skjöldebrand [mailto:chimbisskjoldebrand.org] > > Sent: 07 March 2001 05:34 > > To: php-generallists.php.net > > Subject: Value of if(isset(X)) problem > > > <input type="submit" value="Modify client" name="cmdFinish"> >