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: Tue Apr 03 2001 - 17:17:51 CDT

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

    php-general Digest 3 Apr 2001 22:17:51 -0000 Issue 606

    Topics (messages 46794 through 46900):

    Global Variables
            46794 by: Jon
            46797 by: Renze Munnik

    Re: redirecting without headers or meta tags or javascript
            46795 by: Christian Reiniger
            46806 by: Justin French
            46837 by: Chris Adams
            46860 by: Christian Reiniger

    cant get php_imap4r2.dll :(
            46796 by: Nilesh Parmar

    PHP sending email contents as an attachment, not in the body
            46798 by: Tom Pinder
            46842 by: Lindsay Adams

    Re: nl2br
            46799 by: James Moore

    Re: Page Counter
            46800 by: Tim Ward

    Re: freetype info required
            46801 by: Grimes, Dean

    Informix a PHP
            46802 by: Roman
            46811 by: Mark Roedel

    Re: Safety with PHP.
            46803 by: Grimes, Dean

    Re: Validation Email in PHP programs
            46804 by: Johannes Janson
            46809 by: Renze Munnik
            46829 by: Steve Werby
            46830 by: Renze Munnik
            46875 by: Steve Werby

    Re: Can php read and than print file like it is
            46805 by: Daniel B I

    Re: using system() on NT/2K
            46807 by: Michael Kimsal

    upgrade question
            46808 by: Walgamotte, David
            46827 by: Steve Werby

    Re: Why does it work this way?
            46810 by: Mark Roedel
            46841 by: Yasuo Ohgaki

    Linux: 1 machine, 2 installs?
            46812 by: Matthias Krehl
            46820 by: Rasmus Lerdorf

    QSI Payments
            46813 by: Mark Robinson
            46814 by: Jason Brooke

    Problem with unset($PHP_AUTH_USER );
            46815 by: Adrian Murphy
            46822 by: Rasmus Lerdorf

    Security Issue
            46816 by: Scott Novinger
            46823 by: Rasmus Lerdorf
            46832 by: Michael Kimsal

    mysql_insert_id() & CGI
            46817 by: bill
            46821 by: Rasmus Lerdorf

    register_globals on or off?
            46818 by: hi
            46824 by: Rasmus Lerdorf
            46826 by: Hardy Merrill

    sql looping problem??
            46819 by: Wade Halsey

    Re: Cobalt RaQ XTR(slightly OT)
            46825 by: Steve Werby

    Re: working with jpegs
            46828 by: Rasmus Lerdorf

    Shell Programming with PHP, but where is the PHP?
            46831 by: Brandon Orther
            46833 by: Renze Munnik
            46836 by: Brandon Orther
            46839 by: Stewart Taylor
            46840 by: Lindsay Adams
            46845 by: Nuno Silva
            46849 by: Brandon Orther
            46856 by: Lindsay Adams

    array in Session-Vars?
            46834 by: Thomas Häger

    Re: FLASH AND PHP
            46835 by: Richard Kirk
            46877 by: Godd

    mysql
            46838 by: Glenda Robalino
            46855 by: Lindsay Adams

    New buzz SOAP?
            46843 by: Paulson, Joseph V. \"Jay\"
            46847 by: Neil Kimber
            46850 by: David VanHorn
            46853 by: Neil Kimber
            46858 by: Pierre-Yves Lemaire

    UltraEdit - some useful function regexes
            46844 by: Geoff Caplan
            46852 by: Sebastian Bergmann

    UltraEdit regexes - the right version!!
            46846 by: Geoff Caplan

    Re: Warning: 1 is not a valid File-Handle resource
            46848 by: Jerry Lake

    file upload
            46851 by: Augusto Cesar Castoldi
            46892 by: Augusto Cesar Castoldi
            46893 by: Augusto Cesar Castoldi

    Automatic Output Buffering Compression level with ob_gzhandler
            46854 by: Steven Roussey
            46863 by: Christian Reiniger

    stripping tags with regex ?
            46857 by: Chris Lee
            46862 by: Christian Reiniger
            46881 by: Chris Lee
            46886 by: Christian Reiniger

    Can I use a function within an ereg_replace?
            46859 by: Dan Wilson
            46861 by: Lindsay Adams
            46864 by: Christian Reiniger
            46865 by: Lindsay Adams

    Re: Metabase Opinions
            46866 by: John Lim

    Change in date() in php4.0.4...
            46867 by: Boget, Chris
            46870 by: John Lim
            46873 by: Boget, Chris

    How can i sent an html e-mail using mail()?
            46868 by: jorge

    Bug in date() in version 4.0.4?
            46869 by: Boget, Chris

    iODBC Mac OS X HOWTO
            46871 by: Andrew
            46872 by: Andrew Hill

    Re: [PHP-DB] iODBC Mac OS X HOWTO
            46874 by: Andrew Hill

    Change the filename sent via html header
            46876 by: Spunk S. Spunk III
            46880 by: Lindsay Adams

    Quick one...
            46878 by: Brandon Orther
            46879 by: Boget, Chris
            46883 by: Mike King
            46884 by: Lindsay Adams

    OT Regular Expression [grep]
            46882 by: Thomas Deliduka
            46888 by: Christian Reiniger
            46890 by: Christian Reiniger
            46894 by: Thomas Deliduka

    PHP & cURL Tutorial
            46885 by: Boget, Chris

    Java applet can't read PHP output !!
            46887 by: Peter Choynowski
            46889 by: Lindsay Adams
            46897 by: Andrew Braund

    url_rewriter.tags what's this config directive for?
            46891 by: Krznaric Michael

    File create permissions
            46895 by: Chris Mason

    MySQL info...
            46896 by: Brandon Orther

    column names
            46898 by: Mauricio Junqueira

    Form Request Validation - what do you do?
            46899 by: Boget, Chris

    query 2 databases from one script
            46900 by: Michael Roark

    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:


    Hi,

    I need to retrieve some information from a database, asociated with the user
    session so I could query this information whenever I want through the user
    session. I am searching for something similar to ASPs global variables if
    there is anything equivalent with PHP.

    Thanks

    attached mail follows:


    Jon wrote:
    >
    > Hi,
    >
    > I need to retrieve some information from a database, asociated with the user
    > session so I could query this information whenever I want through the user
    > session. I am searching for something similar to ASPs global variables if
    > there is anything equivalent with PHP.
    >
    > 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

    Aren't you looking for session-handling?

    Look at:
    http://www.php.net/manual/en/ref.session.php

    or (Spain):
    http://www.php.net/manual/es/ref.session.php

    -- 
    

    * R&zE:

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

    attached mail follows:


    On Tuesday 03 April 2001 08:22, you wrote: > hi, i'm in the body of a html page, and I'd like to > redirect to a new URL in an if() statement. > > I *could* re-write the whole page so that the test > is in the head, and use meta tags to refresh, but > i'd rather not... the code will be heaps cleaner > without it.

    Three solutions:

    (1) Open a telepatic connection to the users browser and appeal to its sense of duty to go to the new page

    (2) Rewrite the thing

    (3) Use output buffering

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

    "Never doubt that a small group of thoughtful, committed people can change the world... Indeed, it's the only thing that ever has."

    - Margaret Mead

    attached mail follows:


    Christian Reiniger wrote:

    > (1) Open a telepatic connection to the users browser and appeal to its > sense of duty to go to the new page

    that sounds about as reliable as javascript :P

    > (2) Rewrite the thing

    looks like that'll be the case

    > (3) Use output buffering

    huh? appreciate mroe on this...

    Justin French

    attached mail follows:


    On 3 Apr 2001 06:26:47 -0700, Justin French <justinindent.com.au> wrote: >> (3) Use output buffering > >huh? appreciate mroe on this...

    put ob_start() at the top of your page and ob_end_flush() at the bottom. PHP will store all of the output instead of sending it to the browser. If you put a header("Location: foo"); exit; somewhere, that output will never be set.

    (Take a look at the ob_* functions in the manual when you have a spare moment - there's some pretty cool things you can do with them, particularly if you use the gz handler to compress pages on the fly.)

    attached mail follows:


    On Tuesday 03 April 2001 14:39, you wrote: > Christian Reiniger wrote: > > (1) Open a telepatic connection to the users browser and appeal to > > its sense of duty to go to the new page > > that sounds about as reliable as javascript :P > > > (2) Rewrite the thing > > looks like that'll be the case > > > (3) Use output buffering > > huh? appreciate mroe on this...

    try reading the manual :) Also zend.com has a nice tutorial on it.

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

    CPU not found. retry, abort, ignore?

    attached mail follows:


    Hello Everyone I have a php 4.0.4 installed on my windows-98 machine and apache with the server. I had a problem with the imap_open() function . Later I discovered that I have to have the php_imap4r2.dll . But i dont have this file there.Can anyone tell me where can i get this file !!.It is not with the zip file which i have downloaded the whole php. i would be happy if anyone helped me !! Bye Nilesh

    attached mail follows:


    I'm using PHP to send emails. The problem I have is that when the emails reach a certain length, the emails are sent with the email contents as an attachment, not as part of the body.

    I've looked thru all the mailing lists, but I can't find a reference to a similar problem. Has anyone come across this before?

    Is there is any way to control this behaviour? Is there a way of forcing mail() or imap_mail() to include the contents in the email body?

    imap_mail ($testAddress, $title, $emailContents, "from:userdomain.org.uk"); mail ($testAddress, $title, $emailContents, "from:userdomain.org.uk");

    Many thanks,

    Tom Pinder

    attached mail follows:


    According to the headers in your email, you are using Outlook Express.

    I think it is a microsoft issue. Because when I write a long email in OE, and send it to myself, I get it as an attachment.

    If I write it in Eudora, and pick up my mail with Eudora, it comes as one message, no attachment, but if I check mail in OE, it suddenly adds the message as an attachment.

    So, I don't think you can get around this with PHP functions, because I doubt the issue lies there.

    On 4/3/01 3:50 AM, "Tom Pinder" <php_generalrenewable.co.uk> wrote:

    > I'm using PHP to send emails. The problem I have is that when the emails > reach a certain length, the emails are sent with the email contents as an > attachment, not as part of the body. > > I've looked thru all the mailing lists, but I can't find a reference to a > similar problem. Has anyone come across this before? > > Is there is any way to control this behaviour? Is there a way of forcing > mail() or imap_mail() to include the contents in the email body? > > imap_mail ($testAddress, $title, $emailContents, "from:userdomain.org.uk"); > mail ($testAddress, $title, $emailContents, "from:userdomain.org.uk"); > > Many thanks, > > Tom Pinder >

    attached mail follows:


    > On Tuesday 03 April 2001 01:42, you wrote: > > Hello > > > > In PHP there is an instruction : nl2br . > > Does anybody know if there is something similar in Perl??? > > Well, you'd think Perl experts would know this a bit better that PHP > experts, hm?

    $string =~ s/\n/<br>\n/g

    -James -- James Moore jmoorephp.net PHP Web Scripting: http://www.php.net/ PHP QA Team: http://qa.php.net/ PHP-GTK: http://gtk.php.net/ VL-SRM: http://www.vl-srm.net/

    attached mail follows:


    i have a file with something like this which I include at the top of every page ...

    <?php // php function to increment the counter for the current page ... if ($hchandle = mysql_connect("server_name","username")) { $result = mysql_db_query("dbname","INSERT INTO hits SET page = '$PHP_SELF', hit_date = NOW(), ipaddress = '$REMOTE_ADDR', browser = '$HTTP_USER_AGENT'"); mysql_close($hchandle); };

    ?>

    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: Wen Ni [mailto:wnleongmail.tke.po.my] > Sent: 02 April 2001 11:33 > To: php-generallists.php.net > Subject: Page Counter > > > Dear Friends, > > I want to do page counter for my web site and I wonder whether PHP can > do it or not. I am new in PHP so can you all please give me some idea > how to solve my problem. > > Thank a lot. > > regards, > Wendy >

    attached mail follows:


    http://freetype.sourceforge.net/old_index.html

    Freetype is a freeware font engine. It works great for adding ttf to graphic images generated on the fly and such. Do you absolutely have to have ttf to create graphic images? No...but it sure makes things a lot prettier to look at. I think you will find most of the information you want through the link above.

    Dean

    -----Original Message----- From: Robert Vetter [mailto:robert.vetterppo.de] Sent: Monday, April 02, 2001 12:04 PM To: php-generallists.php.net Subject: [PHP] freetype info required

    Could someone please supply me with a little information about freetype fonts concerning the following points of interest: 1/ A good description of what it actually is. 2/ How to actually use it in a practical sense hopefully in conjunction with php. 3/ Supply of some small code snippets showing real world examples. 4/ Any freetype library functions.

    I thank you all in advance for any help that you can grtant to me.

    Joe :)

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


    What's the problem with connect to the informix database ?

    When I write this line for connect do the informix

    $connect = ifx_connect("inv","roman","romanpwd");

    i don't connect and i have these result : Warning: ifx_connect : E [SQLSTATE=IX 001 SQLCODE=-1829] in e:\programovanie\php\informix\infpo.php on line 1

    Thanx

    roman

    attached mail follows:


    > -----Original Message----- > From: Roman [mailto:rduriancikindprop.gov.sk] > Sent: Tuesday, April 03, 2001 6:58 AM > To: Php-General > Subject: [PHP] Informix a PHP > > > What's the problem with connect to the informix database ? > > When I write this line for connect do the informix > > $connect = ifx_connect("inv","roman","romanpwd"); > > i don't connect and i have these result : > Warning: ifx_connect : E [SQLSTATE=IX 001 SQLCODE=-1829] in > e:\programovanie\php\informix\infpo.php on line 1

    That looks suspiciously like the error code I get when I haven't properly set my INFORMIXDIR and INFORMIXSERVER environment variables.

    ---
    Mark Roedel (roedelmletu.edu)  ||  "There cannot be a crisis next week.
    Systems Programmer / WebMaster  ||   My schedule is already full."
         LeTourneau University      ||                    -- Henry Kissinger
    

    attached mail follows:


    Marthe,

    How was the script executed and under what user privileges? Was it executed by a client from a browser or was it executed directly from the command line?

    PHP is a server-side scripting language (that can also be configured to execute as a standalone language). Your clients should not be able to create PHP scripts and execute them. Only programmers of the system should be able to create scripts. PHPs ability to access existing files and create new files on the system is a good thing; but you, as the programmer, must ensure that file permissions are set correct and that passwords to privileged accounts are protected.

    One of the biggest "pitfalls" or "gotchas" are misconfigured systems and applications. For example, what user/group is your web server running as? The web page creation and presentation are only one aspect of designing a secure site. Even some of the "Big" sites can have problems...Apache.org comes to mind, which was compromised not by bugs in any system, but by a simple misconfiguration of MySQL.

    Learn your OS and all of the applications on your system to the extent that you understand what security issues each bring to the mix.

    As always...Have Fun!

    Dean

    > Well, since I'm a newbie and also Norwegian it ain't that easy to explain > very simple. > What he did was that he entered a file that showed all the users of the > server, as I said, and he told me this was kindof insecure. > To prevent it he showed me a code that would help a bit. > > $filename=str_replace("..","",$filename); > $filename=str_replace("/","",$filename); > $filename=str_replace("%20","",$filename); > > He used /, .. and %20 to reach this file on my server. > > /Marthe

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

    this is the regular expression from a PHP book.

    ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*([a-zA-Z0-9-]+\.)+([a-zA-z]{2,3})$, $formfield"); looks horrible but works.

    "Sharat Hegde" <shahsonata-software.com> schrieb im Newsbeitrag news:30402B4CB8C7D311A3C600C04F1513BC3BDAE4bg2ipmail... > Hello, > > I am trying to validate the email address in my PHP program using the ereg > function. I have different combinations of regular expressions to get the > chunks of the email substring before and after the symbol and the dot (.) > character. However, this does not seem to work. > > Can anyone suggest a method using ereg or otherwise to validate the email > address in a PHP program? > > Regards, > Sharat Hegde > > > > -- > 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:


    Johannes Janson wrote: > > Hi, > > this is the regular expression from a PHP book. > > ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*([a-zA-Z0-9-]+\.)+([a-zA-z]{2,3})$, > $formfield"); > looks horrible but works. >

    Besides the RE you might wanna take a look at these functions:

    http://www.php.net/manual/en/function.getmxrr.php and http://www.php.net/manual/en/function.checkdnsrr.php

    Using (one of) those you can check the email-address better. I.e. the domain. Extract the domainname from the given email-address and feed it to either one of these and you'll get a result whether or not the domain has an MX-record. Only thing left is whether or not the user exists on the given mailserver. But for as far as I know you can't automatically check that.

    -- 
    

    * R&zE:

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

    attached mail follows:


    "Renze Munnik" <renzedatalink.nl> wrote: > Besides the RE you might wanna take a look at these functions: > > http://www.php.net/manual/en/function.getmxrr.php > and > http://www.php.net/manual/en/function.checkdnsrr.php > > Using (one of) those you can check the email-address better. I.e. > the domain. Extract the domainname from the given email-address and > feed it to either one of these and you'll get a result whether or > not the domain has an MX-record.

    Here's some personal insight to consider. This will work and I toyed with it in the past. There are a few gotchas:

    1. For a valid host, if DNS is slow it may add several seconds to the script. 2. If it's not a valid host, the script will run until the lookup times out. 3. If the host is temporarily down or inaccessible it will falsely report that it doesn't exist.

    So it really depends what you're trying to do.

    > Only thing left is whether or not > the user exists on the given mailserver. But for as far as I know > you can't automatically check that.

    Renze is correct. Unless you're checking local email addresses which you control, there's no way to check down to that level. And be happy there isn't. Otherwise the amount of spam you get right now will increase ten fold.

    --
    Steve Werby
    President, Befriend Internet Services LLC
    http://www.befriend.com/
    

    attached mail follows:


    Yep.... Steve is a smart man. The solutions I gave are good but can ruin your own performance totaly without it being your mistake. The bad performance of a different server (which you probably don't even know!) can ruin the speed of your site. Depending on the importance of the check you'll have to decide yourself what to do.

    If you _do_ want to check the email-adresses using the mx-checks, but you don't want to take the chance of slowing down your site, you can always consider batch-processing. Accept the addresses based on the RE and store them (e.g. in a db). Then at night (or whenever) you can start a script that iterates through the list, checking all mx-entries.

    And for the usernames that you can't track. It's the nicest feature a mailserver has! You wouldn't be able to do anything normal anymore if the users could be tracked. Every spam-"service" would be scanning your mailserver and spamming it to death!! So... you'll just have to accept the username...

    -- 
    

    * R&zE:

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

    attached mail follows:


    "Steve Werby" <steve-listsbefriend.com> wrote > Renze is correct. Unless you're checking local email addresses which you > control, there's no way to check down to that level. And be happy there > isn't. Otherwise the amount of spam you get right now will increase ten > fold.

    I should have said there's no *reliable* way to check whether an email address on an external server is valid. Mail servers that have the SMTP VRFY command (and to a lesser extent the EXPN command) enabled may be able to tell whether an email address is valid. Since many (probably most) have these turned off and many domains have catchall email accounts installed connecting to an SMTP server to check would not reliably tell you whether the user supplied email address is asociated with an email account used by a human being.

    --
    Steve Werby
    President, Befriend Internet Services LLC
    http://www.befriend.com/
    

    attached mail follows:


    try readfile()

    Daniel BI

    attached mail follows:


    I thought there was something in the manual that it didn't work on IIS. I had the same problem, and had to give up. There was definitely someone else on the mailing list who mentioned this months ago.

    Christian Dechery wrote:

    > Why does system() - or any of its cousins, I've tried them all: exec(), > passthru(), backtick operator, etc - doesn't output anything when running > on a Win2k/IIS5 machine? > > I ran the exact same script on a WinME/Apache, and the output was perfect.... > ____________________________

    attached mail follows:


    I want to upgrade to 4.04pl1 PHP, I just downloaded the source from their website. One problem I have had in the past, is when I recompile PHP with different support options the phpinfo() still displays the old information. Could anyone help me to find out where phpinfo() is pulling it's information or direct me to an upgrade "how to" for PHP ?

    David Walgamotte

    attached mail follows:


    "Walgamotte, David" <davidwild.net> wrote: > I want to upgrade to 4.04pl1 PHP, I just downloaded the source from their > website. One problem I have had in the past, is when I recompile PHP with > different support options the phpinfo() still displays the old information. > Could anyone help me to find out where phpinfo() is pulling it's information > or direct me to an upgrade "how to" > for PHP ?

    Perhaps you should try deleting the old install first. locate php, then rm -rf [DIRECTORIES_HERE] or rpm -e [PHP_PKG_HERE].

    --
    Steve Werby
    President, Befriend Internet Services LLC
    http://www.befriend.com/
    

    attached mail follows:


    > -----Original Message----- > From: Yasuo Ohgaki [mailto:yohgakihotmail.com] > Sent: Monday, April 02, 2001 8:00 PM > To: php-generallists.php.net > Subject: Re: [PHP] Why does it work this way? > > > I guess PHP is doing this > > $str = "a"; > $str++; > > as > > $str = "a"; > $str = $str + $str; // $str now stores "aa"

    On my installation of PHP (4.0.4pl1, Apache 1.3.17, FreeBSD 4.2-STABLE), the above snippet results in $str storing a zero value. (Which makes sense. The numerical value of "a" is zero.)

    However

    $str = "a"; $str++; results in $str storing the value "b".

    It's

    $str = "z"; $str++;

    that results in "aa" being stored in $str.

    (This behavior was, in fact, what started the thread you replied into.)

    ---
    Mark Roedel (roedelmletu.edu)  ||  "There cannot be a crisis next week.
    Systems Programmer / WebMaster  ||   My schedule is already full."
         LeTourneau University      ||                    -- Henry Kissinger
    

    attached mail follows:


    I didn't read carefully yours and original post. Sorry.

    Anyway, warn_plus_overloading = On ; warn if the + operator is used with strings does not raise warnings on my PHP4.0.4pl1 for some reason.

    I think incrementing strings should results in 1 if type juggling works as documented.

    --
    Yasuo Ohgaki
    

    ""Mark Roedel"" <MarkRoedelletu.edu> wrote in message news:E162F01D7D84F645924A046DA1FE60F30E982Drachael.letnet.net... > -----Original Message----- > From: Yasuo Ohgaki [mailto:yohgakihotmail.com] > Sent: Monday, April 02, 2001 8:00 PM > To: php-generallists.php.net > Subject: Re: [PHP] Why does it work this way? > > > I guess PHP is doing this > > $str = "a"; > $str++; > > as > > $str = "a"; > $str = $str + $str; // $str now stores "aa"

    On my installation of PHP (4.0.4pl1, Apache 1.3.17, FreeBSD 4.2-STABLE), the above snippet results in $str storing a zero value. (Which makes sense. The numerical value of "a" is zero.)

    However

    $str = "a"; $str++;

    results in $str storing the value "b".

    It's

    $str = "z"; $str++;

    that results in "aa" being stored in $str.

    (This behavior was, in fact, what started the thread you replied into.)

    --- Mark Roedel (roedelmletu.edu) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University || -- Henry Kissinger

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

    attached mail follows:


    Hi there,

    any hints on how to install two versions of PHP on one linux machine? Is it possible?

    I want to have a 'normal' installation working together with apache and a 'command-line' version for running cron jobs (#!/usr/local/bin/php ...).

    bye Matthias

    Matthias Krehl matthias.krehlkey-work.de

    attached mail follows:


    Just compile it twice. Once using --with-apxs and once without.

    -Rasmus

    On Tue, 3 Apr 2001, Matthias Krehl wrote:

    > Hi there, > > any hints on how to install two versions of PHP > on one linux machine? Is it possible? > > I want to have a 'normal' installation > working together with apache > and a 'command-line' version > for running cron jobs (#!/usr/local/bin/php ...). > > bye Matthias > > > Matthias Krehl > matthias.krehlkey-work.de > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hi all,

    Has anyone had any experience in using the QSI payments software with PHP4?

    Mark

    attached mail follows:


    Yes

    > Hi all, > > Has anyone had any experience in using the QSI payments software with > PHP4? > > Mark

    attached mail follows:


    I use a login script with the header() function and $PHP_AUTH_USER etc. the problem is once i've logged in once ,i refresh the page i stay logged in. i want to do testing with different privileges so i want to be asked for a username and password each time i've refreshed the page.I thought unset($PHP_AUTH_USER) right after i check the db would work but it doesn't.I've also tried varieties of ways to avoid caching the page as well but nothing seems to work.this i know is a damn simple problem. but it's driving me a bit nuts.i even tried emptying my temp internet files but to no avail. what's going on? thanx a

    attached mail follows:


    You can't unset $PHP_AUTH_USER. Well, you can, but your browser sends it on each connection and it gets re-established. There is no way to effectively log out using http authentication unless you change the realm or otherwise force a 403 again.

    -Rasmus

    On Tue, 3 Apr 2001, Adrian Murphy wrote:

    > I use a login script with the header() function and $PHP_AUTH_USER etc. > the problem is once i've logged in once ,i refresh the page i stay logged > in. > i want to do testing with different privileges so i want to be asked for a > username > and password each time i've refreshed the page.I thought > unset($PHP_AUTH_USER) > right after i check the db would work but it doesn't.I've also tried > varieties of ways > to avoid caching the page as well but nothing seems to work.this i know is a > damn simple problem. > but it's driving me a bit nuts.i even tried emptying my temp internet files > but to no avail. > what's going on? > thanx > a > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hello,

    Would someone please offer some specific suggestions for the following?:

    1. I have several static web pages ready to be published on the internet.

    2. We have chosed PHP, MySQL and Apache as part of our development system.

    3. I would like to incorporate a PHP script into each static web page that queries a MySQL database. This script will determine whether or not the person trying to view the page has the proper security privledges.

    If I need to explain this problem in more detail, please let me know. Any help or suggestions are greatly appreciated.

    Thank you,

    Scott Scott.Novingerairborne.com

    attached mail follows:


    > 1. I have several static web pages ready to be published on the > internet.

    Great

    > 2. We have chosed PHP, MySQL and Apache as part of our development > system.

    Ok

    > 3. I would like to incorporate a PHP script into each static web page > that queries a MySQL database. This script will determine whether or > not the person trying to view the page has the proper security > privledges.

    Cool, do it. It's trivial.

    -Rasmus

    attached mail follows:


    Not really sure what you need suggestions on. There are tons of examples for querying MySQL databases from PHP out there around the net, not to mention the php.net mysql area itself.

    Scott Novinger wrote:

    > Hello, > > Would someone please offer some specific suggestions for the following?: > > 1. I have several static web pages ready to be published on the > internet. > > 2. We have chosed PHP, MySQL and Apache as part of our development > system. > > 3. I would like to incorporate a PHP script into each static web page > that queries a MySQL database. This script will determine whether or > not the person trying to view the page has the proper security > privledges. > > If I need to explain this problem in more detail, please let me know. > Any help or suggestions are greatly appreciated.

    Unfortunately, you've not really given any amount of detail at all, beyond describing about every web-based application out there (aside from the PHP aspect of it).

    You need to determine what the criteria are for determining security privileges. Translate those criteria into fields in a database. Also translate the logic into PHP code.

    That's about it.

    attached mail follows:


    When I go from using mysql_insert_id() with the module to using it with PHP as CGI it fails because I always provide a link identifier as the argument.

    When I remove the link identifier it works again.

    But that seems risky to me. If I have concurrent users couldn't one user finish a query, another user do another query, and then the first user's mysql_insert_id function produce the wrong result?

    kind regards,

    bill hollett

    attached mail follows:


    > When I go from using mysql_insert_id() with the module to using it with > PHP as CGI it fails because I always provide a link identifier as the > argument. > > When I remove the link identifier it works again. > > But that seems risky to me. If I have concurrent users couldn't one > user finish a query, another user do another query, and then the first > user's mysql_insert_id function produce the wrong result?

    No

    -Rasmus

    attached mail follows:


    Hi,

    Could someone explain what the following passage in php.ini means:

    You should do your best to write your scripts so that they do not require ; register_globals to be on; Using form variables as globals can easily lead ; to possible security problems, if the code is not very well thought of.

    If register_globals is off, does that mean you cannot access form variables by just referring to their name? And, if that is so, how do you pass information from forms to your action script?

    attached mail follows:


    > Could someone explain what the following passage in php.ini means: > > You should do your best to write your scripts so that they do not require > ; register_globals to be on; Using form variables as globals can easily > lead > ; to possible security problems, if the code is not very well thought of. > > If register_globals is off, does that mean you cannot access form variables > by just referring to their name?

    Correct

    > And, if that is so, how do you pass > information from forms to your action script?

    They will be in the $HTTP_POST_VARS array. However, as long as you watch what you are doing, leaving register_globals on is fine. Don't use undefined variables and never pass stuff directly to any system() or file operation functions without carefully checking your data.

    Turning off register_globals and simply using $HTTP_POST_VARS everywhere really doesn't help that much in this respect. POST vars are easily spoofed, so don't think that just turning off register_globals will suddenly make your scripts secure. It won't. Never trust user-supplied data.

    -Rasmus

    attached mail follows:


    hi [noneofyourbusinessnone.com] wrote: > Hi, > > Could someone explain what the following passage in php.ini means: > > You should do your best to write your scripts so that they do not require > ; register_globals to be on; Using form variables as globals can easily > lead > ; to possible security problems, if the code is not very well thought of. > > If register_globals is off, does that mean you cannot access form variables > by just referring to their name? And, if that is so, how do you pass > information from forms to your action script?

    If you had register_globals Off *AND* track_vars On, you could change:

    from: $frmCompanyName to: $HTTP_GET_VARS["frmCompanyName"] or $HTTP_POST_VARS["frmCompanyName"]

    depending on your action method.

    HTH.

    -- 
    Hardy Merrill
    Mission Critical Linux, Inc.
    http://www.missioncriticallinux.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:


    Hi

    I have the following code

    /*number of times to run*/ $NumCases = $HTTP_POST_VARS['txtNumCases']; /*execute the sql*/ $sqlLargeRequest = sqlexecute($LargeRequest);

    for ($val = 0; $val < $NumCases; ++$val){ if ($val < $NumCases) {

    $details = sqlFetchObject( $sqlLargeRequest );

    $AccNo = $details ->ACCNO; etc etc

    It executes the correct number of times but doesnt move to the next record.Im using an Interbase DB. Any ideas??

    TIA Wade

    attached mail follows:


    "Phil Driscoll" <phildialsolutions.co.uk> wrote: > I have a number of php4/mysql sites running from various NT boxes. I have > the opportunity to move a lot of stuff across from one of the NT boxes onto > a new Cobalt RaQ XTR. This job will have to be done in a hurry. If anyone > can prewarn me of any problems, or better still, tell me it will all run > like a dream, I'd be most grateful.

    I administer a few RaQs and have done a lot of work for clients with RaQs (no XTRs yet). You may have to go through the web files and make sure paths are correct and you'll need to chown and chmod the files to the proper values. Of course you'll need to recreate entries in the MySQL 'mysql' database. If you're migrating any of the sites to a newer version of PHP or from a much older version you may have some compatibility problems with some functions and may need to go through some code. And if the new and old versions are configured differently (like having differences in whether magic quotes is on/off and short PHP tags are on/off) you may have to make some code changes. Otherwise it should be a pretty smooth transition.

    --
    Steve Werby
    President, Befriend Internet Services LLC
    http://www.befriend.com/
    

    attached mail follows:


    Have a look at the imlib2 extension. It doesn't have the 8-bit colour limit GD does. See http://mmcc.cx/php_imlib/

    -Rasmus

    On Tue, 3 Apr 2001, J.R. Lillard wrote:

    > i've only been using the php image functions for about a week now. i > understand that jpegs have their own custom color pallette. so whenever i > want to add something to an existing jpeg, the only colors i have to work > with are the ones that are already defined. hence the purpose of > imagecolorclosest(). at least this is how i understand things. so, for > example, if i'm working with a jpeg that mostly uses dark colors, attempting > to add white text to it doesn't always come out as bright as i'd like. is > there any way around this without switching to a different image format or > making system calls to something more advance like imagemagick? is it not > possible to expand the color pallette after doing an imagecreatefromjpeg()? > > -jr > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Hello,

    I am looking for the path to my php so I can put it on the top of my php script. Like this: #!/path/to/php

    All I can find that looks like this is libphp4.so Does anyone know where to look for the binary?

    Thanks Brandon

    attached mail follows:


    Brandon Orther wrote: > > Hello, > > I am looking for the path to my php so I can put it on the top of my php > script. Like this: #!/path/to/php > > All I can find that looks like this is libphp4.so Does anyone know where to > look for the binary? > > Thanks > Brandon > > -- > 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

    Try locate and/or whereis. And you should make sure PHP isn't installed as module.

    -- 
    

    * R&zE:

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

    attached mail follows:


    Hello,

    It is installed as a module, Is there a way I can keep it installed as a module but install it so I can use it to shell script also?

    Thanks Ahead Of Time Brandon

    -----Original Message----- From: Renze Munnik [mailto:renzedatalink.nl] Sent: Tuesday, April 03, 2001 8:32 AM To: php-generallists.php.net Subject: Re: [PHP] Shell Programming with PHP, but where is the PHP?

    Brandon Orther wrote: > > Hello, > > I am looking for the path to my php so I can put it on the top of my php > script. Like this: #!/path/to/php > > All I can find that looks like this is libphp4.so Does anyone know where to > look for the binary? > > Thanks > Brandon > > -- > 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

    Try locate and/or whereis. And you should make sure PHP isn't installed as module.

    --
    

    * R&zE:

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

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

    attached mail follows:


    Under linux you can use lynx to run php scripts under the shell. e.g. Assuming lynx is setup correctly

    lynx -source your.server.com/devel/newtrlkit/test.php?param=whatever>test.txt

    -Stewart

    -----Original Message----- From: Brandon Orther [mailto:ortherwebintellects.com] Sent: 03 April 2001 17:02 To: PHP User Group Subject: RE: [PHP] Shell Programming with PHP, but where is the PHP?

    Hello,

    It is installed as a module, Is there a way I can keep it installed as a module but install it so I can use it to shell script also?

    Thanks Ahead Of Time Brandon

    -----Original Message----- From: Renze Munnik [mailto:renzedatalink.nl] Sent: Tuesday, April 03, 2001 8:32 AM To: php-generallists.php.net Subject: Re: [PHP] Shell Programming with PHP, but where is the PHP?

    Brandon Orther wrote: > > Hello, > > I am looking for the path to my php so I can put it on the top of my php > script. Like this: #!/path/to/php > > All I can find that looks like this is libphp4.so Does anyone know where to > look for the binary? > > Thanks > Brandon > > -- > 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

    Try locate and/or whereis. And you should make sure PHP isn't installed as module.

    --
    

    * R&zE:

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

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

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

    attached mail follows:


    Yes, download the source and compile it.

    Do not turn on the module options in ./configure.

    I was able to compile my own standalone cgi version of PHP on my ISP without issue.

    If you download it, unpack it Do ./configure Make

    And look in the bin directory of the source directory for your cgi version. Try it out, move it, whatever, then go back and recompile in other options you might want.

    If your ISP has development tools available, you should not have a problem. Since you are not installing it as a module, you won't need root access to compile it and make it work.

    On 4/3/01 9:02 AM, "Brandon Orther" <ortherwebintellects.com> wrote:

    > Hello, > > It is installed as a module, Is there a way I can keep it installed as a > module but install it so I can use it to shell script also? > > Thanks Ahead Of Time > Brandon > > -----Original Message----- > From: Renze Munnik [mailto:renzedatalink.nl] > Sent: Tuesday, April 03, 2001 8:32 AM > To: php-generallists.php.net > Subject: Re: [PHP] Shell Programming with PHP, but where is the PHP? > > > Brandon Orther wrote: >> >> Hello, >> >> I am looking for the path to my php so I can put it on the top of > my php >> script. Like this: #!/path/to/php >> >> All I can find that looks like this is libphp4.so Does anyone know where > to >> look for the binary? >> >> Thanks >> Brandon >> >> -- >> 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 > > Try locate and/or whereis. > And you should make sure PHP isn't installed as module. > -- > > * R&zE: > > *************************** > ** Renze Munnik > ** > ** E: renzedatalink.nl > ** M: +31 6 218 111 43 > *************************** > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    :) yes,

    just ./configure (don't use --with-apache or --with-apxs) [other options] make cp php /usr/local/bin (or whatever)

    regards, Nuno Silva

    Brandon Orther wrote:

    > Hello, > > It is installed as a module, Is there a way I can keep it installed as a > module but install it so I can use it to shell script also? > > Thanks Ahead Of Time > Brandon > > -----Original Message----- > From: Renze Munnik [mailto:renzedatalink.nl] > Sent: Tuesday, April 03, 2001 8:32 AM > To: php-generallists.php.net > Subject: Re: [PHP] Shell Programming with PHP, but where is the PHP? > > > Brandon Orther wrote: > >> Hello, >> >> I am looking for the path to my php so I can put it on the top of > > my php > >> script. Like this: #!/path/to/php >> >> All I can find that looks like this is libphp4.so Does anyone know where > > to > >> look for the binary? >> >> Thanks >> Brandon >> >> -- >> 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 > > > Try locate and/or whereis. > And you should make sure PHP isn't installed as module. > -- > > * R&zE: > > *************************** > ** Renze Munnik > ** > ** E: renzedatalink.nl > ** M: +31 6 218 111 43 > *************************** > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    When I type: make it does nothing??? What am I supposed to be typing?

    -----Original Message----- From: Nuno Silva [mailto:nuno_silvawebsolut.net] Sent: Tuesday, April 03, 2001 9:19 AM To: Brandon Orther Cc: PHP User Group Subject: Re: [PHP] Shell Programming with PHP, but where is the PHP?

    :) yes,

    just ./configure (don't use --with-apache or --with-apxs) [other options] make cp php /usr/local/bin (or whatever)

    regards, Nuno Silva

    Brandon Orther wrote:

    > Hello, > > It is installed as a module, Is there a way I can keep it installed as a > module but install it so I can use it to shell script also? > > Thanks Ahead Of Time > Brandon > > -----Original Message----- > From: Renze Munnik [mailto:renzedatalink.nl] > Sent: Tuesday, April 03, 2001 8:32 AM > To: php-generallists.php.net > Subject: Re: [PHP] Shell Programming with PHP, but where is the PHP? > > > Brandon Orther wrote: > >> Hello, >> >> I am looking for the path to my php so I can put it on the top of > > my php > >> script. Like this: #!/path/to/php >> >> All I can find that looks like this is libphp4.so Does anyone know where > > to > >> look for the binary? >> >> Thanks >> Brandon >> >> -- >> 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 > > > Try locate and/or whereis. > And you should make sure PHP isn't installed as module. > -- > > * R&zE: > > *************************** > ** Renze Munnik > ** > ** E: renzedatalink.nl > ** M: +31 6 218 111 43 > *************************** > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

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


    What happens when you type ./configure?

    If the answer is nothing, or it ends with an error, then your ISP does not provide you with dev tools. And you are sort of out of luck.

    If you can find out for certain, what platform your isp is running, you may be able to install a binary. But a wouldn't count on it.

    Might have to find another ISP

    On 4/3/01 10:02 AM, "Brandon Orther" <ortherwebintellects.com> wrote:

    > When I type: make it does nothing??? What am I supposed to be typing? > > -----Original Message----- > From: Nuno Silva [mailto:nuno_silvawebsolut.net] > Sent: Tuesday, April 03, 2001 9:19 AM > To: Brandon Orther > Cc: PHP User Group > Subject: Re: [PHP] Shell Programming with PHP, but where is the PHP? > > > > :) > yes, > > just > ./configure (don't use --with-apache or --with-apxs) [other options] > make > cp php /usr/local/bin (or whatever) > > regards, > Nuno Silva > > Brandon Orther wrote: > >> Hello, >> >> It is installed as a module, Is there a way I can keep it installed as a >> module but install it so I can use it to shell script also? >> >> Thanks Ahead Of Time >> Brandon >> >> -----Original Message----- >> From: Renze Munnik [mailto:renzedatalink.nl] >> Sent: Tuesday, April 03, 2001 8:32 AM >> To: php-generallists.php.net >> Subject: Re: [PHP] Shell Programming with PHP, but where is the PHP? >> >> >> Brandon Orther wrote: >> >>> Hello, >>> >>> I am looking for the path to my php so I can put it on the top of >> >> my php >> >>> script. Like this: #!/path/to/php >>> >>> All I can find that looks like this is libphp4.so Does anyone know where >> >> to >> >>> look for the binary? >>> >>> Thanks >>> Brandon >>> >>> -- >>> 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 >> >> >> Try locate and/or whereis. >> And you should make sure PHP isn't installed as module. >> -- >> >> * R&zE: >> >> *************************** >> ** Renze Munnik >> ** >> ** E: renzedatalink.nl >> ** M: +31 6 218 111 43 >> *************************** >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: php-general-unsubscribelists.php.net >> For additional commands, e-mail: php-general-helplists.php.net >> To contact the list administrators, e-mail: php-list-adminlists.php.net > > > -- > 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,

    i need to use an array in a session variable. On a page i fill the Sessionvar : $HTTP_SESSION_VARS["xy"] []=$whatever (The var is registered with session_register("xy")) I mean that the entry would made at the end of the array, is it not so?

    But evrey time i proove the entries with count($HTTP_SESSION_VARS["xy"]) , there are only one entry.

    Have somebody an idea?

    Thank,

    Thomas

    attached mail follows:


    Or alternatively use the xml object to send an xml (flash 5) document to php which then waits for an xml response.

    Cheers

    > -----Original Message----- > From: Lindsay Adams [mailto:lindsaydingos.net] > Sent: Monday, April 02, 2001 10:00 PM > To: PHP > Subject: Re: [PHP] FLASH AND PHP > > > If you are wanting to use pregenerated FLASH scripts ( and not > build them on > the fly with libswf or ming) then what you want to do, without > having to buy > Generator for your server is... > > In the beginning of you falsh file, do a load variables from a PHP page, > that queries a database or whatever, gets the data, and echoes it > out to the > FLASH file in the format expected by load variables. Tack on a variable at > the end called loadDone and set it to 1 (or true) > In flash, you have to put in a loop in the second frame, or after the > loadvariables command, that checks to see if loadDone==1, to make > sure that > all the variables have loaded. > > You cannot assume that the variables will load within a certain > time period. > If they don't, the rest of your scripts will break. > > That, is how you can pass a lot of dynamic information into your > flash file, > without the use of server side generator install from macromedia. > > > > On 4/2/01 11:14 AM, "Godd" <godd_mapphotmail.com> wrote: > > > Now VRML and PHP may be possible but if you can get Flash to > get in the mix > > that will be so bad. > > > > What I really want to do is to get a flash file that will use > the pictures > > that I send to it via php and let it use that picture to do the > animation. > > > > Now what I am looking at is a flash file that displays info on > a product. > > now given the picture of the product and the information on the > product, I > > want flash to use that info with the events that I will place > in the flash > > file and let it do its thing. > > > > now that will be good. I am not sure what macromedia has along > this line. > > > > > > > -- > 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:


    EXPLAIN !!!!!!

    I am not an XML expert

    Please explain. I have only now begun to read up on XML

    ""Richard Kirk"" <rkirkrkirk.com> wrote in message news:000d01c0bc55$6db38ee0$7200000aproj00014... > Or alternatively use the xml object to send an xml (flash 5) document to php > which then waits for an xml response. > > Cheers > > > -----Original Message----- > > From: Lindsay Adams [mailto:lindsaydingos.net] > > Sent: Monday, April 02, 2001 10:00 PM > > To: PHP > > Subject: Re: [PHP] FLASH AND PHP > > > > > > If you are wanting to use pregenerated FLASH scripts ( and not > > build them on > > the fly with libswf or ming) then what you want to do, without > > having to buy > > Generator for your server is... > > > > In the beginning of you falsh file, do a load variables from a PHP page, > > that queries a database or whatever, gets the data, and echoes it > > out to the > > FLASH file in the format expected by load variables. Tack on a variable at > > the end called loadDone and set it to 1 (or true) > > In flash, you have to put in a loop in the second frame, or after the > > loadvariables command, that checks to see if loadDone==1, to make > > sure that > > all the variables have loaded. > > > > You cannot assume that the variables will load within a certain > > time period. > > If they don't, the rest of your scripts will break. > > > > That, is how you can pass a lot of dynamic information into your > > flash file, > > without the use of server side generator install from macromedia. > > > > > > > > On 4/2/01 11:14 AM, "Godd" <godd_mapphotmail.com> wrote: > > > > > Now VRML and PHP may be possible but if you can get Flash to > > get in the mix > > > that will be so bad. > > > > > > What I really want to do is to get a flash file that will use > > the pictures > > > that I send to it via php and let it use that picture to do the > > animation. > > > > > > Now what I am looking at is a flash file that displays info on > > a product. > > > now given the picture of the product and the information on the > > product, I > > > want flash to use that info with the events that I will place > > in the flash > > > file and let it do its thing. > > > > > > now that will be good. I am not sure what macromedia has along > > this line. > > > > > > > > > > > > -- > > 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 I have created my database in mysql in linux, but i nedd my aplication, including the database in windows, I tryied to copy, but i had problems with the database... all the tables are copie.. i could see the tables, but i cant make selects, inserts....

    what could i do to copy well the database??

    thanks ciao _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

    attached mail follows:


    This is a question that is better directed to the mysql mailing list, not php. It is also self evident in the manual. But, here is the short answer.

    Standard mysql tables are in ISAM format (pre 3.23 versions of mysql) which is not directly portable between machines. MyISAM tables are. On linux, in mysql ALTER TABLE tablename TYPE MYISAM; // do this foreach table in the database you are moving.

    Then try copying the tables over. If that still doesn't work. Then from the command line: Mysqldump databasename > mydatabase.sql

    Which will dump to text, the database structure and all the data.

    Then, on windows, you simply: Mysqladmin create databasename Mysql -u user -p password < mydatabase.sql

    And database will be recreated. You should really buy a good book on mysql and learn about backing up your databases.

    On 4/3/01 9:07 AM, "Glenda Robalino" <g_robalinohotmail.com> wrote:

    > Hi > I have created my database in mysql in linux, but i nedd my aplication, > including the database in windows, I tryied to copy, but i had problems with > the database... > all the tables are copie.. i could see the tables, but i cant make selects, > inserts.... > > what could i do to copy well the database?? > > thanks ciao > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. >

    attached mail follows:


    Hello everyone- Here at work I'm hearing this new buzz word about SOAP and people are asking me if PHP can work with SOAP. Well first of all if any of you know the answer to this please let me know because I am clueless. Thanks, Jay

    attached mail follows:


    SOAP stands for Simple Object Access Protocol. It's the XML version of RPC/RMI. It's actually a specification that describes how interfaces from different systems can communicate with each other. It's called an IDL (Interface Definition Language).

    This is going to be big because it is a very large part of the new Microsoft .NET strategy. In essence it will enable everyone and everything to talk together without worrying about hardware, software or OS's incompatibilities (well, that's the theory, anyway). Of course, I'm sure that MS will make their own non-open extensions and tie everyone into their World<grin>.

    The best thing about SOAP is the sense of humour of the designers. Part of the SOAP toolkit is called the Remote Object Proxy Engine, this is responsible for the consumption of dispatching of SOAP messages. So, you get SOAP on a ROPE!

    -----Original Message----- From: Paulson, Joseph V. "Jay" [mailto:jay.paulsonviatel.com] Sent: 03 April 2001 17:29 To: 'Stewart Taylor'; 'Brandon Orther'; 'php-generallists.php.net' Subject: [PHP] New buzz SOAP?

    Hello everyone- Here at work I'm hearing this new buzz word about SOAP and people are asking me if PHP can work with SOAP. Well first of all if any of you know the answer to this please let me know because I am clueless. Thanks, Jay

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


    > >This is going to be big because it is a very large part of the new Microsoft >.NET strategy. In essence it will enable everyone and everything to talk >together without worrying about hardware, software or OS's incompatibilities >(well, that's the theory, anyway). Of course, I'm sure that MS will make >their own non-open extensions and tie everyone into their World<grin>.

    I can't count the number of times I've heard this promise.. Anyone remember how Java was supposed to take over the world?

    >The best thing about SOAP is the sense of humour of the designers. Part of >the SOAP toolkit is called the Remote Object Proxy Engine, this is >responsible for the consumption of dispatching of SOAP messages. So, you get >SOAP on a ROPE!

    Don't drop the SOAP! :)

    --
    Dave's Engineering Page: http://www.dvanhorn.org
    Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9
    

    attached mail follows:


    Java rocks. Personally I'm not a fan of MS. However, I saw a sneak preview of .NET in action last July and was astonished by the possible potential for this. There are many aspects of .NET, SOAP being just one of them. I saw code being written in a single GUI development environment where VB called C# called COBOL(??!? I'm serious here). The code was debugged in a single debugger and jumped seamlessly from line to line across different languages. Calling a function/method in a different language was as simple as scrolling through MS's intellisense dropdowns, you don't even need to know what language the relevant function is written in. ASP has been converted to run with the .NET common language runtime(CLR), meaning that you can write ASP in any language compatible with the CLR (i.e. VB, C#, COBOL, umpteen other languages currently being converted).

    Most cool was the way in which you can create web services. This is where SOAP comes into play. By tagging a function in a CLR compatible language with a 'web service' tag the function becomes exposed and available across the net to anyone else using SOAP development environments (admittedly only .NET at the moment).

    There were many, many oohs and aahs at the conference, from my position they were well deserved. I'm not a fan of MS but don't write them off. As a developer I haven't such a potential for a revolution since Windows 2.0 first came out.

    -----Original Message----- From: David VanHorn [mailto:dvanhorncedar.net] Sent: 03 April 2001 17:59 To: Neil Kimber; Paulson, Joseph V. "Jay"; 'Stewart Taylor'; 'Brandon Orther'; php-generallists.php.net Subject: RE: [PHP] New buzz SOAP?

    > >This is going to be big because it is a very large part of the new Microsoft >.NET strategy. In essence it will enable everyone and everything to talk >together without worrying about hardware, software or OS's incompatibilities >(well, that's the theory, anyway). Of course, I'm sure that MS will make >their own non-open extensions and tie everyone into their World<grin>.

    I can't count the number of times I've heard this promise.. Anyone remember how Java was supposed to take over the world?

    >The best thing about SOAP is the sense of humour of the designers. Part of >the SOAP toolkit is called the Remote Object Proxy Engine, this is >responsible for the consumption of dispatching of SOAP messages. So, you get >SOAP on a ROPE!

    Don't drop the SOAP! :)

    --
    Dave's Engineering Page: http://www.dvanhorn.org
    Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9
    

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

    attached mail follows:


    Yes, maybe, but it means that your old stuff in ASP has to be modified. It's cool, but it's a path of no return, just like any ms stuff, be careful...

    py Some links: http://xml.apache.org/soap/ http://sourceforge.net/projects/soapphpclient/

    At 06:32 PM 4/3/01 +0100, you wrote: >Java rocks. Personally I'm not a fan of MS. However, I saw a sneak preview >of .NET in action last July and was astonished by the possible potential for >this. There are many aspects of .NET, SOAP being just one of them. I saw >code being written in a single GUI development environment where VB called >C# called COBOL(??!? I'm serious here). The code was debugged in a single >debugger and jumped seamlessly from line to line across different languages. >Calling a function/method in a different language was as simple as scrolling >through MS's intellisense dropdowns, you don't even need to know what >language the relevant function is written in. ASP has been converted to run >with the .NET common language runtime(CLR), meaning that you can write ASP >in any language compatible with the CLR (i.e. VB, C#, COBOL, umpteen other >languages currently being converted). > >Most cool was the way in which you can create web services. This is where >SOAP comes into play. By tagging a function in a CLR compatible language >with a 'web service' tag the function becomes exposed and available across >the net to anyone else using SOAP development environments (admittedly only >.NET at the moment). > >There were many, many oohs and aahs at the conference, from my position they >were well deserved. I'm not a fan of MS but don't write them off. As a >developer I haven't such a potential for a revolution since Windows 2.0 >first came out. > > > >-----Original Message----- >From: David VanHorn [mailto:dvanhorncedar.net] >Sent: 03 April 2001 17:59 >To: Neil Kimber; Paulson, Joseph V. "Jay"; 'Stewart Taylor'; 'Brandon >Orther'; php-generallists.php.net >Subject: RE: [PHP] New buzz SOAP? > > > > > > >This is going to be big because it is a very large part of the new >Microsoft > >.NET strategy. In essence it will enable everyone and everything to talk > >together without worrying about hardware, software or OS's >incompatibilities > >(well, that's the theory, anyway). Of course, I'm sure that MS will make > >their own non-open extensions and tie everyone into their World<grin>. > > >I can't count the number of times I've heard this promise.. >Anyone remember how Java was supposed to take over the world? > > > >The best thing about SOAP is the sense of humour of the designers. Part of > >the SOAP toolkit is called the Remote Object Proxy Engine, this is > >responsible for the consumption of dispatching of SOAP messages. So, you >get > >SOAP on a ROPE! > >Don't drop the SOAP! :) > >-- >Dave's Engineering Page: http://www.dvanhorn.org >Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9 > > > >-- >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

    + ====================== + Pierre-Yves Lemire + E-MedHosting.com + (514) 729-8100 + pylemsympatico.ca + ======================

    attached mail follows:


    Hi

    Thanks to Sebastian Bergmann's recent wordfile, I got turned on the the potential of the function list in UltraEdit.

    Here are some PHP regexes which UltraEditers may find useful. If you use all three, your function list will list all the constants, class vars and functions in the script like this:

    "CONSTANT" "ANOTHER_CONSTANT" $class_var_one $some_more_var_declarations function_1 function_2 etc...

    Here are the goodies...

    /Function String = "%[ ^t;]++function[ ]+^(*^)(*" /Function String 1 = "%[ ^t;]++var[ ]+^([$][a-z,A-Z,1-0,_]+^)+[ ^t]+=*" /Function String 2 = "%[ ^t;]++define[ ]++[(][ ]++^([A-Z,1-0,_"']+^)*"

    Also, here is a regex for an sql file that will list everything you CREATE

    /Function String = "%[ ^t;]++CREATE[ ]+[a-z,A_Z,1-0,_]+[ ]+^([0-9,a-z_]+^)*"

    I'm no regex expert, but these work for me. Hope someone finds them useful.

    Sebastian - if you like them, you might want to add them to your "Open Source" wordfile...

    Geoff Caplan

    attached mail follows:


    Geoff Caplan wrote: > Sebastian - if you like them, you might want to add them to your > "Open Source" wordfile...

    I'll have a look at your stuff tomorrow. The current wordfile.txt in the CVS is buggy somehow and I'm going to sort out some of those bugs tomorrow.

    -- 
     sebastian bergmann                            sbsebastian-bergmann.de
                                           http://www.sebastian-bergmann.de
    

    bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de

    attached mail follows:


    Sorry folks -

    I included the wrong version of the regexes in my last post! (Well - it's been a long day...

    Here is the debugged version - should work better I hope...

    /Function String = "%[ ^t;]++CREATE[ ]+[a-zA-Z0-9_]+[ ]+^([0-9a-z_]+^)*"

    /Function String = "%[ ^t;]++function[ ]+^(*^)(*" /Function String 1 = "%[ ^t;]++var[ ]+^([$][a-zA-Z0-9_]+^)+[ ^t]+=*" /Function String 2 = "%[ ^t;]++define[ ]++[(][ ]++^([A-Z0-9_"']+^)*"

    Geoff Caplan

    attached mail follows:


    I had that same warning the other day and the problem was a slight syntax error in my query statement.

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

    -----Original Message----- From: WK [mailto:andrewl36hotmail.com] Sent: Monday, April 02, 2001 8:35 PM To: php-generallists.php.net Subject: Re: [PHP] Warning: 1 is not a valid File-Handle resource

    ""WK"" <andrewl36hotmail.com> wrote in message news:9abfvp$v4$1toye.p.sourceforge.net... > $fp2=fopen ("userdata","r")or die("unable to open file ($userdata)"); > $fp2 is getting a value 1 or 0 > > if ($fp2=fopen ("userdata","r") ) { > lock file > write some stuff unlock file <--------------forgot this > } > else { > echo ("file would not open"); > } > > wk > > ""Richard Kurth"" <rkurthpacifier.com> wrote in message > news:FGEPLIKKFNGPGLDMFDCLGEOFDBAA.rkurthpacifier.com... > > I am using the newest ver of PHP and newest ver of apache on win98 > > just installed new php and apache yesterday set php up as a module > > > > > Don't know. Code looks good, what version of PHP are you using? Module > or > > > cgi? What version of windows? These are the things the PHP/Zend guys > > > probably need to know. > > > > > > On 4/2/01 4:59 PM, "Richard Kurth" <rkurthpacifier.com> wrote: > > > > > > > What is causing this error > > > > > > > > > > > > Warning: 1 is not a valid File-Handle resource in > > > > c:/httpd/htdocs/autosetup/auto/createaccount.php on line 88 > > > > > > > > This is the cod in question > > > > > > > > $tab = chr(9); // define tabulator > > > > if(file_exists("userdata")) { > > > > $fp2=fopen ("userdata","r")or die("unable to open file ($userdata)"); > > > > flock($fp2, 2); //unless ($use_flock == 0); > > > > while ($data = fgetcsv ($fp2, 1000, $tab)) { <---this is line 88 > > > > $num = count ($data); > > > > $row++; > > > > for ($c=0; $c<$num; $c++) { > > > > > > > > } > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

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

    attached mail follows:


    I'm having a problem with file upload.

    I have "<INPUT NAME="arqcliente" TYPE="file">" in the HTML file. The action of the form is "upload.php",

    and in the upload.php3 I have this line "<INPUT NAME="arqcliente" TYPE="file">

    attached mail follows:


    hehe, I forgot.

    I'm getting this error messagem: --------------------- Warning: Unable to open 'F:\\Augusto\\Augusto.wri' for reading: No such file or directory in /home/httpd/html/admin/upload.php3 on line 5 ----------------------

    regards,

    Augusto Cesar Castoldi

    On Tue, 3 Apr 2001, Delbono wrote:

    > And the problem is? > > > ----- Original Message ----- > From: "Augusto Cesar Castoldi" <castoldiinf.ufsc.br> > To: <php-generallists.php.net> > Sent: Tuesday, April 03, 2001 7:04 PM > Subject: [PHP] file upload > > > > I'm having a problem with file upload. > > > > I have "<INPUT NAME="arqcliente" TYPE="file">" in the HTML file. The > > action of the form is "upload.php", > > > > and in the upload.php3 I have this line "<INPUT NAME="arqcliente" > > TYPE="file"> > > > > > > -- > > 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 get this error message:

    Warning: Unable to open 'F:\\Augusto\\Ws_ftp.log' for reading: No such file or directory in /home/httpd/html/admin/upload.php3 on line 5

    regards,

    augusto

    On Tue, 3 Apr 2001, Andrew Rush wrote:

    > on 4/3/01 1:04 PM, castoldiinf.ufsc.br splat open and thusly melted: > > > I'm having a problem with file upload. > > > > I have "<INPUT NAME="arqcliente" TYPE="file">" in the HTML file. The > > action of the form is "upload.php", > > > > and in the upload.php3 I have this line "<INPUT NAME="arqcliente" > > TYPE="file"> > > need more info: what actually happens when the code runs? what do you expect > to happen that doesn't? why do you HTML in your form handler? > > -- > :: Andrew Rush :: Lead Systems Developer :: MaineToday.com :: > ************************************************************************** > "Crippled but free, blind all the time, i was learning to see" > > - J. Garcia / R. Hunter > ************************************************************************** > > The views expressed herein are not necessarily those of my employer, but > they let me have them anyway. >

    attached mail follows:


    Hi,

    Is there a way to set the compression level for the automatic compression output buffering with ob_gzhandler? Both gzcompress() and gzdeflate() have an optional compression level. We would like to use the highest setting by default.

    Sincerely,

    Steven Roussey Network54.com http://network54.com/?pp=e

    attached mail follows:


    On Tuesday 03 April 2001 19:34, you wrote: > Hi, > > Is there a way to set the compression level for the automatic > compression output buffering with ob_gzhandler? Both gzcompress() and > gzdeflate() have an optional compression level. We would like to use > the highest setting by default.

    Don't worry about that. The difference won't be noticeable anyway (well, perhaps the difference in required processing power could be seen...)

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

    CPU not found. retry, abort, ignore?

    attached mail follows:


    I have this

    <image>...</image> or <image left>...</image> or <image right>...</image> or <image top>...</image>

    I want to strip the all that out of my text. I havent a clue about regex, I wish I did. could I get some insight, even a site to learn a little more. ? thanks

    -- 
    

    Chris Lee leemediawaveonline.com

    attached mail follows:


    On Tuesday 03 April 2001 17:57, you wrote: > I have this > > <image>...</image> > or > <image left>...</image> > or > <image right>...</image> > or > <image top>...</image> > > I want to strip the all that out of my text. I havent a clue about > regex, I wish I did. could I get some insight, even a site to learn a > little more. ? thanks

    use strip_tags()

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

    CPU not found. retry, abort, ignore?

    attached mail follows:


    I was interested in stripping the content between the tags too though. the content between the tags is allways 18 char so I did this.

    $article_body = ereg_replace("<image+>.{18}</image> ", '', $article_body);

    that seemed to work. oi, regex is bad stuff, haha.

    -- 
    

    Chris Lee leemediawaveonline.com

    "Christian Reiniger" <creinigmayn.de> wrote in message news:01040320291201.00590chrisbig... On Tuesday 03 April 2001 17:57, you wrote: > I have this > > <image>...</image> > or > <image left>...</image> > or > <image right>...</image> > or > <image top>...</image> > > I want to strip the all that out of my text. I havent a clue about > regex, I wish I did. could I get some insight, even a site to learn a > little more. ? thanks

    use strip_tags()

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

    CPU not found. retry, abort, ignore?

    -- 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 Tuesday 03 April 2001 19:57, you wrote: > I was interested in stripping the content between the tags too though. > the content between the tags is allways 18 char so I did this. > > $article_body = ereg_replace("<image+>.{18}</image> ", '', > $article_body); > > that seemed to work. oi, regex is bad stuff, haha.

    $body = preg_replace ('/<image[^>]*>.*?</image>/i', '', $body);

    is a bit more robust.

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

    CPU not found. retry, abort, ignore?

    attached mail follows:


    Hey all,

    I'm trying to mangle email addresses to pass to an email sending form and want to use a custom hashing function within an eregi_replace.

    Example:

    $text = eregi_replace("[my big email regex]", "send.php?addr=" . hash_func("\\1\\2.\\3"), $text);

    I can't seem to get this to work... it is just hashing the static text within the function, not the replaced values.

    Can this just not be done?

    -Dan

    attached mail follows:


    On 4/3/01 11:06 AM, "Dan Wilson" <danacucore.com> wrote:

    > Hey all, > > I'm trying to mangle email addresses to pass to an email sending form and > want to use a custom hashing function within an eregi_replace. > > Example: > > $text = eregi_replace("[my big email regex]", "send.php?addr=" . > hash_func("\\1\\2.\\3"), $text); > > I can't seem to get this to work... it is just hashing the static text > within the function, not the replaced values. > > Can this just not be done? > > -Dan > If you set the value of a temporary variable to the result of hash_func(), does it return what you expect? If so, do that before the eregi_replace, add "send.php?addr=" to the beginning, and pass the temp var to eregi_replace. I know, it's a whole extra line of code, but at least you can test and make sure hash_func() is doing the right thing.

    Maybe you could try enclosing "send.php?addr=" . hash_func("\\1\\2.\\3")

    In another set of () to enforce operator precedence? Ie. ( "send.php?addr=" . hash_func("\\1\\2.\\3")) Just a thought.

    attached mail follows:


    On Tuesday 03 April 2001 20:06, you wrote: > Hey all, > > I'm trying to mangle email addresses to pass to an email sending form > and want to use a custom hashing function within an eregi_replace. > > Example: > > $text = eregi_replace("[my big email regex]", "send.php?addr=" . > hash_func("\\1\\2.\\3"), $text); > > I can't seem to get this to work... it is just hashing the static text > within the function, not the replaced values. > > Can this just not be done?

    It can. But only with preg_replace.

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

    CPU not found. retry, abort, ignore?

    attached mail follows:


    > On 4/3/01 11:06 AM, "Dan Wilson" <danacucore.com> wrote: > >> Hey all, >> >> I'm trying to mangle email addresses to pass to an email sending form and >> want to use a custom hashing function within an eregi_replace. >> >> Example: >> >> $text = eregi_replace("[my big email regex]", "send.php?addr=" . >> hash_func("\\1\\2.\\3"), $text); >> >> I can't seem to get this to work... it is just hashing the static text >> within the function, not the replaced values. >> >> Can this just not be done? >> >> -Dan >> And after more carefully reading your code...

    I think you are going to have to get your matches before the replace, then pass the matches to hash_func, then do the replace.

    Am I reading that right? Your [big email regex] contains 3 groupings that you want \1,\2,\3 to be, and you want those values passed to hash_func()?

    ereg([big email regex],$text,$match) // $match[1] = \1 // $match[2] = \2 // etc // // $match[0] is the entire matched string, not the first sub group in the regex

    // Then $text = eregi_replace("[my big email regex]", "send.php?addr=". hash_func("$match[1]$match[2].$match[3]"), $text);

    attached mail follows:


    Hi Jason,

    Metabase is a library that tries to hide 99% of the differences between all databases. In that sense it is a thick abstraction layer.

    The other school of thought is to provide a thin layer that doesn't do very much so that it runs fast. I am the author of another database abstraction library, ADODB (http://php.weblogs.com/adodb) that leans more towards that school. PEAR's DB is a similar thin layer.

    You have to decide on your needs based on

    1. What do you want: speed or flexibility -- remember flexibility also means increased complexity.

    2. Are you using a database abstraction layer as an insurance policy (changing databases)? If so then just choose the one that provides you an easier upgrade path.

    John Lim

    PS: ADODB is modelled on Microsoft's ADO, so it's popular among converted ASP programmers. If you one of these people, ADODB might be attractive to you.

    "Jason Lotito" <JasonLehighWeb.com> wrote in message news:JGECJMDPBKLDPBIJBAJDMEEDCCAA.JasonLehighWeb.com... > Looking into Database Abstraction, and I was recommended to Metabase. I > have looked over it, and found that I like it. However, I was looking to > gain further insight as to other people using Metabase, and their > experiences with it, good, bad, problems, no problems, etc. > > Thank you > > Jason Lotito > www.NewbieNetwork.net > Where those who can, teach; > and those who can, learn. > > > -- > 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:


    In the previous version we had (4.0.3), the following worked:

    echo date( "m/d/Y <br> h:ia" );

    to display the date on the first line and the hours:minutes am/pm on the second line.

    Now, looking at the date function, it looks like the "r" character has been added as a formatting specifier. Is there any way I can make the above work as it did? Or am I going to have to use 2 seperate date() calls?

    Chris

    attached mail follows:


    I haven't checked date( ) in the manual, but could <bR> work?

    "Boget, Chris" <Chris.Bogetwild.net> wrote in message news:4040BBE81A9AD411BD27009027887A7C042C1Atiger.wild.net... > In the previous version we had (4.0.3), the following > worked: > > echo date( "m/d/Y <br> h:ia" ); > > to display the date on the first line and the hours:minutes > am/pm on the second line. > > Now, looking at the date function, it looks like the "r" > character has been added as a formatting specifier. Is there > any way I can make the above work as it did? Or am I > going to have to use 2 seperate date() calls? > > Chris >

    attached mail follows:


    > I haven't checked date( ) in the manual, but could <bR> work?

    Sometimes, I am *such* a retard... My humble apologies for my previous post.

    Chris

    attached mail follows:


    The subject explains all. I need to send html emails unsing php Thanks

    attached mail follows:


    echo date( "r h:ia" );

    returns:

    Tue, 3 Apr 2001 13:45:46 +0500 12:875903540pm

    What's up with the minutes? Does anyone else get this problem? It seems the minutes are only screwed up with the "r" format specifier is used...

    Chris

    attached mail follows:


    Hi all,

    In the past couple of weeks, many people have asked me about compiling PHP / Apache under Mac OS X, so I've updated my iODBC HOWTO specifically for Mac OS X.

    This walks through the process of enabling ODBC support in PHP, so your Mac OS X PHP applications can pull data from any relational database. I'll be uploading it to the www.iodbc.org site, but if anyone would like to comment on the initial draft, it's attached to the post.

    Any and all feedback is welcome - tell me anything is not clear!

    Best regards, Andrew -------------------------------------- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com

    attached mail follows:


    Hi all,

    In the past couple of weeks, many people have asked me about compiling PHP / Apache under Mac OS X, so I've updated my iODBC HOWTO specifically for Mac OS X.

    This walks through the process of enabling ODBC support in PHP, so your Mac OS X PHP applications can pull data from any relational database. I'll be uploading it to the www.iodbc.org site, but if anyone would like to comment on the initial draft, it's attached to the post.

    Any and all feedback is welcome - tell me anything is not clear!

    Best regards, Andrew -------------------------------------- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com

    attached mail follows:


    Okay, so no attachments to the lists :) Here is the HOWTO: http://www.iodbc.org/osxphp_iodbc.htm

    Best regards, Andrew -------------------------------------- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com office:781.273.0900 x 27 mobile:781.608.4217 > > > Hi all, > > In the past couple of weeks, many people have asked me about > compiling PHP / > Apache under Mac OS X, so I've updated my iODBC HOWTO specifically for Mac > OS X. > > This walks through the process of enabling ODBC support in PHP, > so your Mac > OS X PHP applications can pull data from any relational database. I'll be > uploading it to the www.iodbc.org site, but if anyone would like > to comment > on the initial draft, it's attached to the post. > > Any and all feedback is welcome - tell me anything is not clear!

    attached mail follows:


    I've got a script that returns a smil file in a header but I'd like to change the name of the file. The file is sent as blah.php (even though it is a smil file) but I'd like to be able to name it something like blah.sml. Is there a way to do this?

    Spunk

    attached mail follows:


    On 4/3/01 12:34 PM, "Spunk S. Spunk III" <spunkmac.com> wrote:

    > I've got a script that returns a smil file in a header but I'd like to > change the name of the file. The file is sent as blah.php (even though it is > a smil file) but I'd like to be able to name it something like blah.sml. Is > there a way to do this? > > Spunk > If you are using include() to send the file in the header, then it doesn't matter WHAT the extension is. All files sent through include() are parsed as if they were PHP, with or without the php extension. So, as long as nothing in your smil file looks like php, then it will just get passed through (as if it were html).

    attached mail follows:


    Hello,

    How do I alphabetize the out put of my data base?

    The field would be LastName

    Brandon

    attached mail follows:


    > How do I alphabetize the out put of my data base? > The field would be LastName

    "SELECT * FROM MyTable ORDER BY LastName"

    Then loop through the result set.

    Chris

    attached mail follows:


    SELECT.....ORDER BY LastName;

    Brandon Orther wrote: > > Hello, > > How do I alphabetize the out put of my data base? > > The field would be LastName > > Brandon > > -- > 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:


    Do it in your sql SELECT statement. Mysql uses ORDER BY field_name

    I think that is standard SQL.

    On 4/3/01 12:54 PM, "Brandon Orther" <ortherwebintellects.com> wrote:

    > Hello, > > How do I alphabetize the out put of my data base? > > The field would be LastName > > Brandon

    attached mail follows:


    I know this is off-topic but what I'm using it for will be in a PHP script!

    All you who are grep-masters I have a question.

    I would like to find all processes by a given user on a linux box and kill them. I know this much:

    ps -u username

    Now, do I then pipe that to grep somehow and get just the PID's?

    How can I do this quickly and easily?

    -- 
    

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

    attached mail follows:


    On Tuesday 03 April 2001 21:59, you wrote:

    > I would like to find all processes by a given user on a linux box and > kill them. I know this much: > > ps -u username > > Now, do I then pipe that to grep somehow and get just the PID's?

    (1) look up system / backtick operator / ... to get the output of the grep call as array, one line per entry

    (2) do a

    foreach ($TheOutput as $Line) { if (preg_match ('/^\s*(\d+)/', $Line, $Matches)) { $PID = $Matches [1]; // kill it } }

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

    CPU not found. retry, abort, ignore?

    attached mail follows:


    On Tuesday 03 April 2001 22:41, you wrote: > (1) look up system / backtick operator / ... to get the output of the > grep call as array, one line per entry

    "... output of the ps call" of course

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

    CPU not found. retry, abort, ignore?

    attached mail follows:


    Thanks!

    On 4/3/2001 4:41 PM this was written:

    > On Tuesday 03 April 2001 21:59, you wrote: > >> I would like to find all processes by a given user on a linux box and >> kill them. I know this much: >> >> ps -u username >> >> Now, do I then pipe that to grep somehow and get just the PID's? > > (1) look up system / backtick operator / ... to get the output of the > grep call as array, one line per entry > > (2) do a > > foreach ($TheOutput as $Line) { > if (preg_match ('/^\s*(\d+)/', $Line, $Matches)) { > $PID = $Matches [1]; > // kill it > } > }

    -- 
    

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

    attached mail follows:


    Is there something along these lines somewhere out there? If so, could someone point me in the right direction?

    Chris

    attached mail follows:


    I am using php4 as an Apache module. The problem is that when a Java applet makes a connection to a CGI script written in php, it can't read the result of php output, but the same applet works fine with Perl or plain sh CGI script - since the only difference between the the CGIs is the language used ie. php, perl,... I am speculating that the problem is somewhere in the Apache-php interface ( the strange thing is that the php script works if connected to with a browser :-( )

    Here is some simple code ( working sh code )

    in sh #! /bin/sh echo "Content-type: text/plain" echo "" echo "some text..."

    The following output displays with a browser, but can't be read by a Java applet <?php print "some text ..." ?>

    Applet code in question: URL u=new URL("http://www/test.php"); URLConnection uc=u.openConnection(); DataInputStream d=new DataInputStrea