OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: php-general-digest-helplists.php.net
Date: Thu Apr 11 2002 - 05:29:41 CDT

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

    php-general Digest 11 Apr 2002 10:29:41 -0000 Issue 1280

    Topics (messages 92468 through 92540):

    disable global variables
            92468 by: Norman Zhang
            92511 by: Jason Wong

    session variables between http and https servers.
            92469 by: Keith Posehn
            92512 by: heinisch.creaction.de

    ImageTTFtext Bug
            92470 by: The Walters

    Re: PHP/ASP/Siteminder
            92471 by: Martin Towell

    Re: OO-PHP Style question
            92472 by: Martin Towell

    image dimentions
            92473 by: Steve Klugherz
            92475 by: Martin Towell

    Re: Convert number into percentage????
            92474 by: Alok K. Dhir

    Re: unsetting an instance from within its class
            92476 by: Ian
            92477 by: Maxim Maletsky
            92527 by: Michael Virnstein

    Re: Free PHP Hosting
            92478 by: Michael Andersson

    editors
            92479 by: Steve Klugherz
            92481 by: Martin Towell
            92483 by: Phillip S. Baker
            92484 by: Matthew Walker
            92485 by: Justin French
            92493 by: David Robley
            92518 by: TV Karthick Kumar

    PHP and localhost (newbie!!)
            92480 by: Tiago Simões
            92482 by: Martin Towell
            92496 by: phplists.woodenpickle.com

    GMT / TimeZone modifications
            92486 by: Richard KS
            92487 by: Rasmus Lerdorf
            92489 by: Richard KS

    Clicking Once -- buttons?
            92488 by: Jason Caldwell
            92490 by: Martin Towell

    Re: templates and listbox
            92491 by: Analysis & Solutions

    ini_set doesn't work
            92492 by: Hiroshi Ayukawa
            92494 by: Martin Towell
            92497 by: CC Zona
            92501 by: Hiroshi Ayukawa
            92502 by: Hiroshi Ayukawa
            92503 by: Martin Towell
            92504 by: Hiroshi Ayukawa

    4.1.2 Issues: ldap & $PHP_SELF help!
            92495 by: John Steele

    A Details Popup
            92498 by: Robbie Newton
            92499 by: Martin Towell
            92500 by: Justin French

    seeking help on html anchors
            92505 by: Venkateshwar B
            92508 by: Analysis & Solutions

    Re: Adding "a" in "try.jpg"! SOLVED!!
            92506 by: Mike Gohlke

    Image Uploading not taking place
            92507 by: Manisha
            92509 by: Richard Archer
            92510 by: Manisha
            92519 by: Richard Archer
            92520 by: The_RadiX

    Re: arguments against php / mysql?
            92513 by: Mallen Baker
            92523 by: Jack E. Ambrose
            92528 by: Rasmus Lerdorf
            92531 by: Mallen Baker

    How can the Surfer download without any button
            92514 by: J.F.Kishor

    String termination with \0 ?
            92515 by: Marco Laponder
            92537 by: David Robley

    Sending HTML from PHP with 'mail' as a cron job
            92516 by: Stefen Lars

    Upload problem
            92517 by: Frédéric Mériot

    Temporary off...
            92521 by: Vasoczki Ferenc
            92539 by: David Robley

    Re: mysql
            92522 by: Tim Ward

    Assigning the contents of a file to a variable
            92524 by: Edward R. Bailey
            92533 by: CC Zona

    passing array to another php file
            92525 by: Hirono Tanaka
            92529 by: Edward van Bilderbeek - Bean IT
            92530 by: Richard Baskett
            92536 by: Michael Virnstein

    best postgreSQl host
            92526 by: Hirono Tanaka

    Re: Is While needed in MySQL Result with a Limit of 1
            92532 by: Tim Ward

    Re: simple function question.
            92534 by: Ford, Mike [LSS]

    Request Headers
            92535 by: José León Serna

    Re: String?
            92538 by: Michael Virnstein

    PEAR libraries
            92540 by: Luke van Blerk

    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,

    phpinfo() indicates that register_globals = On by default. How do I set it
    to register_globals = Off?

    Thanks and Regards,
    Norman

    attached mail follows:


    On Thursday 11 April 2002 06:47, Norman Zhang wrote:
    > Hi,
    >
    > phpinfo() indicates that register_globals = On by default. How do I set it
    > to register_globals = Off?

    edit php.ini

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* UNIX is hot. It's more than hot. It's steaming. It's quicksilver lightning with a laserbeam kicker. -- Michael Jay Tucker */

    attached mail follows:


    Okay, here is my dilemma:

    I have one page, (non-secure), which sets session variables for the users address, items, prices, etc. I have the next page which is secure, and cannot get the session variables from the previous page. Is there a way to pass the variables between the secure and non-secure servers? I cannot send the information in my session variables in the url (that information needs to remain in the session).

    I have searched the php mailing lists about this and have not found anything that will answer this question.

    Any and all help, verbose if possible, is appreciated.

    Thanks!

    Keith

    attached mail follows:


    At 10.04.2002 15:56, you wrote: >Okay, here is my dilemma: > >I have one page, (non-secure), which sets session variables for the users >address, items, prices, etc. I have the next page which is secure, and >cannot get the session variables from the previous page. Is there a way to >pass the variables between the secure and non-secure servers? I cannot send >the information in my session variables in the url (that information needs >to remain in the session). > >I have searched the php mailing lists about this and have not found anything >that will answer this question. > >Any and all help, verbose if possible, is appreciated. > >Thanks! > >Keith

    Chris had a similar question on Monday, here´s my reply again

    At 08.04.2002 13:12, you wrote: >Hi, > >I have two servers with Apache PHP - carrying out different tasks. > >However, I have got a task that requires one application to use both >servers. One of the units holds a bunch of session vars - which I would like >to transfer to the other unit, when scripts on this second unit are called. > >What is the best way to do this? > >Clearly, I don't want to do this as a list of vars in the URL - some of the >vars are sensitive. > >I would appreciate any comments. >Chris I hope both machines are linux, unix the scp-command (secure copy) will be your friend. So you save your vars in a file, scp this file from server1 to server2 and read the file, if it appears and is the correct one, read it in your script on the server2. To learn more about scp, see "man scp" HTH Oliver

    attached mail follows:


    I finally found other people with the same problem I am having as addressed here:

    http://bugs.php.net/bug.php?id=14876

    I am wondering when this will be addressed however because in the bug report it lists no solutions to this problem.

    Anyone?

    -Brandon

    attached mail follows:


    throw in a phpinfo() on the page you want to access that variable on, go down to the bottom and have a look at was variables are set.

    HTH Martin

    -----Original Message----- From: peter ferrigan [mailto:peter.ferriganwcom.com] Sent: Thursday, April 11, 2002 4:08 AM To: php-generallists.php.net Subject: [PHP] PHP/ASP/Siteminder

    Hi there.

    I am rather new to PHP and I am trying to implement the following on a Solaris 8, Apache 1.3.24 Server.

    We use siteminder here as our authentication method for the website. Siteminder passes back certain user information that I can then display on the website to customize it for the user. I've gotten this working with ASP on Windows nt server with IIS, but I cannot seem to make it work on Apache. The command that I use in ASP to retrieve the data is this:

    <%=Request.ServerVariables("HTTP_NAME")%>

    This command returns the user's full name.

    I've tried some echo commands without any luck.

    Any ideas?

    Thanks!

    - pete

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    attached mail follows:


    Re: about referencing A from B You're exactly right - to make a reference, you'll need to either 1) make A global, or 2) pass A as a parameter to B's constructor.

    Re: (un)serialising maintaining reference, not copy Sorry, haven't tried serialising an object with references in it before - I guess the easiest way to find out is to do a simple test. Something like (in pseudocode) 1. define classes A and B 2. instantiate A and B 3. serialise A and B 4. unset() objects A and B 5. unserialise A and B 6. change something in A 7. see if changes are shown in B

    -----Original Message----- From: Alok K. Dhir [mailto:alokdhir.net] Sent: Thursday, April 11, 2002 6:52 AM To: php-generallists.php.net Subject: [PHP] OO-PHP Style question

    (sent this to the wrong list the first time - apologies in advance)

    Given an app with the following overall class structure:

    Base.class { function Base() { ##initialize stuff } }

    A.class extends Base { var $var; var $b; function A() { $var="x"; $b=new B.class(); } }

    B.class extends Base { var $y; function B() { $y="something"; ##How do I refer to $var in A } }

    Now, how would/could an instance of B get to a variable in A (i.e. the calling class). One (seemingly rather ugly) way is to declare the A instance global and refer to that from within B. I.e.

    <? global $x $x=new A; ## now we can say something like "$x->var" from within B ?>

    Or, another way is to pass a reference to A in with the call to B - so we'd change the class defs for A and B to look like:

    A.class extends Base { var $var; var $b; function A() { $var="x"; $b=new B.class($this); //pass a ref to myself } }

    B.class extends Base { var $a; var $y; function B(&$a) { //always take this arg as a reference $y="something"; // now $a contains a ref to the calling object echo $a->var; } }

    Am I thinking about this correctly? Am I missing some obvious language contruct which would obviate the need for A to pass itself as an arg to the instantiation of B? Is my object structure completely naive?

    In the second case, what happens after you serialize and unserialize an A object as in a session? Will The instance of B called $b in the A object still contain a _reference_ to the A object in it's $a var, or will it now have a _copy_?

    I'm trying to get an idea of best practices for these types of issues. Any comments/discussion is very much appreciated.

    Al

    -- 
    PHP Install Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Is there anyway to gather image dimentions from a gif or a jpg file? I need to gather this information from user uploaded files and can not trust the user to enter them correctly. Any ideas?

    attached mail follows:


    getimagesize()

    -----Original Message----- From: Steve Klugherz [mailto:stevetommiehouse.com] Sent: Wednesday, April 10, 2002 3:11 PM To: php-generallists.php.net Subject: [PHP] image dimentions

    Is there anyway to gather image dimentions from a gif or a jpg file? I need to gather this information from user uploaded files and can not trust the user to enter them correctly. Any ideas?

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    attached mail follows:


    What is a "percentage"? I.e. what do you want as output? The way I read this, you could want one of two things:

    Assuming $x="040" -

    1. string "40%"

    $percent=intval($x)."%";

    2. float 0.40

    $percent=round($x/100,2);

    > -----Original Message----- > From: > php-general-return-92464-adhir=govshops.comlists.php.net > [mailto:php-general-return-92464-adhir=govshops.comlists.php. net] On Behalf Of Scott Fletcher > Sent: Wednesday, April 10, 2002 6:13 PM > To: php-generallists.php.net > Subject: [PHP] Convert number into percentage???? > > > Hi! > > Excuse me if I seem a bit stump on how to convert the > number to a percentage. I looked up on the function, > printf() and sprintf() and I'm still a bit stump on that. Is > there such a php function that would convert this number, > "040" to a percentage? I hope there is one. > > Thanks, > Scott > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    $this

    "Erik Price" <priceehhbrown.com> wrote in message news:A0632096-4C9C-11D6-BC9F-0050E4857868hhbrown.com... > Is there a way to unset or destroy an object instance from a method > within its class? I'm trying to write a method that destroys its > instance but I'm not sure how to refer to the object itself from within > the class. > > > Erik > > > > > > ---- > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > priceehhbrown.com >

    attached mail follows:


    Class foo {

    Var $bar = 'bar';

    function baz() { echo '$this->bar once used to be ' . $this->bar; unset($this->bar); echo "<br> ...and not it's not : {$this->bar}"; } }

    $foo = new foo(); unset($foo);

    // kill the instance outside the class

    Cheers,

    Maxim Maletsky Founder, Chief Developer

    PHPBeginner.com (Where PHP Begins) maximphpbeginner.com www.phpbeginner.com

    > -----Original Message----- > From: Ian [mailto:ian.fergersolveris.com] > Sent: Thursday, April 11, 2002 2:27 AM > To: php-generallists.php.net > Subject: [PHP] Re: unsetting an instance from within its class > > $this > > "Erik Price" <priceehhbrown.com> wrote in message > news:A0632096-4C9C-11D6-BC9F-0050E4857868hhbrown.com... > > Is there a way to unset or destroy an object instance from a method > > within its class? I'm trying to write a method that destroys its > > instance but I'm not sure how to refer to the object itself from within > > the class. > > > > > > Erik > > > > > > > > > > > > ---- > > > > Erik Price > > Web Developer Temp > > Media Lab, H.H. Brown > > priceehhbrown.com > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    you can use unset($this), but it'll only work if there are no other variables referencing to this object. unset only unsets the reference to value, not the value itself. PHP will unset the value totally, if there are no references to it anymore. so using $this = null; , is perhaps the better solution.

    example for unset not unsetting the value but the reference:

    <?php class test { var $test1 = ""; function test($str) { $this->test1 = $str; } function kill() { unset($this); } }

    $new =& new test("hallo");

    $test = &$new;

    $new->kill();

    echo $test->test1; ?>

    this will output hallo, although you called unset($this).

    "Erik Price" <priceehhbrown.com> schrieb im Newsbeitrag news:A0632096-4C9C-11D6-BC9F-0050E4857868hhbrown.com... > Is there a way to unset or destroy an object instance from a method > within its class? I'm trying to write a method that destroys its > instance but I'm not sure how to refer to the object itself from within > the class. > > > Erik > > > > > > ---- > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > priceehhbrown.com >

    attached mail follows:


    Try http://www.spaceports.com/ and sign up for a cgi-bin account

    "Php" <tabarryemail.com> skrev i meddelandet news:8heamp$3b5$1cvs.php.net... > Does anyone know a free PHP hosting company who is also offering any > database? > >

    attached mail follows:


    Does anyone know of any text editors that understand the syntax of php? I have finally got the company I work for convinced that php is the way to go for the web based portion of our product. I would like to find an editor that does context highlighting (like visual cafe) to keep grumblings to a minimum. The editors I have found either highlight php like C++ or as HTML. It can be for either Linux or Windows, we run both.

    Thanks.

    attached mail follows:


    emacs, editplus, phpedit, etc, etc. have a look on google

    -----Original Message----- From: Steve Klugherz [mailto:stevetommiehouse.com] Sent: Thursday, April 11, 2002 12:07 PM To: php-generallists.php.net Subject: [PHP] editors

    Does anyone know of any text editors that understand the syntax of php? I have finally got the company I work for convinced that php is the way to go for the web based portion of our product. I would like to find an editor that does context highlighting (like visual cafe) to keep grumblings to a minimum. The editors I have found either highlight php like C++ or as HTML. It can be for either Linux or Windows, we run both.

    Thanks.

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    attached mail follows:


    At 07:06 PM 4/10/2002 Wednesday, Steve Klugherz wrote: >Does anyone know of any text editors that understand the syntax of php? I >have finally got the company I work for convinced that php is the way to go >for the web based portion of our product. I would like to find an editor >that does context highlighting (like visual cafe) to keep grumblings to a >minimum. The editors I have found either highlight php like C++ or as HTML. >It can be for either Linux or Windows, we run both.

    Homesite by Macromedia. It also handles HTML and an bunch of other web code.

    Phillip

    attached mail follows:


    EditPlus is a great editor, with the added benefit of a built in FTP client.

    Matthew Walker Senior Software Engineer ePliant Marketing

    -----Original Message----- From: Steve Klugherz [mailto:stevetommiehouse.com] Sent: Wednesday, April 10, 2002 8:07 PM To: php-generallists.php.net Subject: [PHP] editors

    Does anyone know of any text editors that understand the syntax of php? I have finally got the company I work for convinced that php is the way to go for the web based portion of our product. I would like to find an editor that does context highlighting (like visual cafe) to keep grumblings to a minimum. The editors I have found either highlight php like C++ or as HTML. It can be for either Linux or Windows, we run both.

    Thanks.

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002

    attached mail follows:


    Hi,

    a quick search on php.net resulted in this page: http://www.php.net/links.php

    which has a link to a list of editors: http://www.itworks.demon.co.uk/phpeditors.htm

    similarly, a quick search at google.com resulted in around 249,000 pages :)

    this question's also been asked on this list about 249,000 times, so a quick search of the archives resulted in plenty of results as well: http://marc.theaimsgroup.com/?l=php-general&w=2&r=1&s=php+text+editors&q=b

    Justin French -------------------- Creative Director http://Indent.com.au --------------------

    on 11/04/02 12:06 PM, Steve Klugherz (stevetommiehouse.com) wrote:

    > Does anyone know of any text editors that understand the syntax of php? I > have finally got the company I work for convinced that php is the way to go > for the web based portion of our product. I would like to find an editor > that does context highlighting (like visual cafe) to keep grumblings to a > minimum. The editors I have found either highlight php like C++ or as HTML. > It can be for either Linux or Windows, we run both. > > Thanks. > >

    attached mail follows:


    In article <20020411014145.18795.qmailpb1.pair.com>, stevetommiehouse.com says... > Does anyone know of any text editors that understand the syntax of php? I > have finally got the company I work for convinced that php is the way to go > for the web based portion of our product. I would like to find an editor > that does context highlighting (like visual cafe) to keep grumblings to a > minimum. The editors I have found either highlight php like C++ or as HTML. > It can be for either Linux or Windows, we run both. > > Thanks.

    NEdit is one for linux http://www.nedit.org/

    -- 
    David Robley
    Temporary Kiwi!
    

    Quod subigo farinam

    attached mail follows:


    I am happy TEXTPAD !.

    Karthick

    ----- Original Message ----- From: "Matthew Walker" <mwalkermountaintopherbs.com> To: "Steve Klugherz" <stevetommiehouse.com>; <php-generallists.php.net> Sent: Thursday, April 11, 2002 4:32 AM Subject: RE: [PHP] editors

    EditPlus is a great editor, with the added benefit of a built in FTP client.

    Matthew Walker Senior Software Engineer ePliant Marketing

    ----Original Message----- From: Steve Klugherz [mailto:stevetommiehouse.com] Sent: Wednesday, April 10, 2002 8:07 PM To: php-generallists.php.net Subject: [PHP] editors

    Does anyone know of any text editors that understand the syntax of php? I have finally got the company I work for convinced that php is the way to go for the web based portion of our product. I would like to find an editor that does context highlighting (like visual cafe) to keep grumblings to a minimum. The editors I have found either highlight php like C++ or as HTML. It can be for either Linux or Windows, we run both.

    Thanks.

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

    attached mail follows:


    Hello everybody!

    I'm just entering the wonderful world of PHP and i already have a doubt. I installed the apache server on my Windows ME :-p, to use for local tests. I have to acess it manually (meaning i have to click the apache startup everytime i want to do something...). Anyway i proceded to install PHP (on c:\php\, and everything went ok. I test my first php file ( a simple echo command) at the http://localhost directory (or c:\program files\apache group\apache\htdocs). It all went ok. So i started wondering if it detected a php outside of that path, like in the desktop or some other folder (since i'm very keen on having my sites in specif folders). Unfortunately it didn't, it just showed the php as a txt file. Is there anyway to make the files readable everywhere?

    Thanks in advance, Tiago Simões

    attached mail follows:


    you could set up c:\ as your web root :P

    -----Original Message----- From: Tiago Simões [mailto:kaosnetcabo.pt] Sent: Thursday, April 11, 2002 11:04 AM To: php-generallists.php.net Subject: [PHP] PHP and localhost (newbie!!)

    Hello everybody!

    I'm just entering the wonderful world of PHP and i already have a doubt. I installed the apache server on my Windows ME :-p, to use for local tests. I have to acess it manually (meaning i have to click the apache startup everytime i want to do something...). Anyway i proceded to install PHP (on c:\php\, and everything went ok. I test my first php file ( a simple echo command) at the http://localhost directory (or c:\program files\apache group\apache\htdocs). It all went ok. So i started wondering if it detected a php outside of that path, like in the desktop or some other folder (since i'm very keen on having my sites in specif folders). Unfortunately it didn't, it just showed the php as a txt file. Is there anyway to make the files readable everywhere?

    Thanks in advance, Tiago Simões

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    attached mail follows:


    Yeah, basically, in your httpd.conf file you specify the DocumentRoot for your Apache installation. Then whatever dirs are below that inherit the AddType(s) and such of the parent. You can add different dirs individually if you want. Just add the following to your httpd.conf file (you can put them anywhere in the file, bottom is ok):

    <Directory "C:\WINDOWS\Desktop\work"> AddType application/x-httpd-php .php .phtml .php3 #Next line is optional (for viewing source) AddType application/x-httpd-php-source .phps </Directory>

    Anyway, you can create a Directory section for any dir on the system that you want to be able to parse php files in.

    Hope it helps,

    Bob Weaver

    "Tiago SimõEs" <kaosnetcabo.pt> wrote in message news:20020411010255.6474.qmailpb1.pair.com... > Hello everybody! > > I'm just entering the wonderful world of PHP and i already have a doubt. I > installed the apache server on my Windows ME :-p, to use for local tests. I > have to acess it manually (meaning i have to click the apache startup > everytime i want to do something...). Anyway i proceded to install PHP (on > c:\php\, and everything went ok. I test my first php file ( a simple echo > command) at the http://localhost directory (or c:\program files\apache > group\apache\htdocs). It all went ok. So i started wondering if it detected > a php outside of that path, like in the desktop or some other folder (since > i'm very keen on having my sites in specif folders). Unfortunately it > didn't, it just showed the php as a txt file. Is there anyway to make the > files readable everywhere? > > Thanks in advance, > Tiago Simões > > > >

    attached mail follows:


    Greetings.

    I was wondering if there are any good ways of converting a date into another time zone? For instance, from GMT+8 to GMT+1, is this possible in some way?

    Like if I have a date written 09.04.2002 14:11, I would like to format it into GMT+1.. Any solutions?

    Thanks alot

    --
    Richard,
      oblivion creations
      http://oblivion.lunamorena.net
      oblivionlunamorena.net
      +46 (0) 736 849 531 for sure contact..
    

    attached mail follows:


    setenv() the appropriate timezone, then use strtotime() or mktime() to create a timestamp. Then setenv() to the other timezone and use date() or strftime() to convert back into a legible format.

    -Rasmus

    On Thu, 11 Apr 2002, Richard KS wrote:

    > Greetings. > > I was wondering if there are any good ways of converting a date into another > time zone? For instance, from GMT+8 to GMT+1, is this possible in some way? > > Like if I have a date written 09.04.2002 14:11, I would like to format it > into GMT+1.. Any solutions? > > Thanks alot > > -- > Richard, > oblivion creations > http://oblivion.lunamorena.net > oblivionlunamorena.net > +46 (0) 736 849 531 for sure contact.. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Thanks for the quick answer! Perhaps you have a smaller code snippet for this?

    NOTE It wouldn't mind if the entire website would go after one timezone, in this case from GMT+8 to GMT+1.

    --
    Richard,
      oblivion creations
      http://oblivion.lunamorena.net
      oblivionlunamorena.net
      +46 (0) 736 849 531 for sure contact..
    

    "Rasmus Lerdorf" <rasmuslerdorf.ca> wrote in message news:Pine.LNX.4.44.0204101903420.22264-100000christine.ca... > setenv() the appropriate timezone, then use strtotime() or mktime() to > create a timestamp. Then setenv() to the other timezone and use date() or > strftime() to convert back into a legible format. > > -Rasmus > > On Thu, 11 Apr 2002, Richard KS wrote: > > > Greetings. > > > > I was wondering if there are any good ways of converting a date into another > > time zone? For instance, from GMT+8 to GMT+1, is this possible in some way? > > > > Like if I have a date written 09.04.2002 14:11, I would like to format it > > into GMT+1.. Any solutions? > > > > Thanks alot > > > > -- > > Richard, > > oblivion creations > > http://oblivion.lunamorena.net > > oblivionlunamorena.net > > +46 (0) 736 849 531 for sure contact.. > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > >

    attached mail follows:


    Is there a way I can ensure the end user clicks the submit button on a given form, *once* ? Can PHP help me with this, or would this be a job for Java?

    Thanks. Jason

    attached mail follows:


    use javascript onClick="this.disabled=true;" I think that's correct

    -----Original Message----- From: Jason Caldwell [mailto:jasonthinkingman.org] Sent: Thursday, April 11, 2002 1:09 PM To: php-generallists.php.net Subject: [PHP] Clicking Once -- buttons?

    Is there a way I can ensure the end user clicks the submit button on a given form, *once* ? Can PHP help me with this, or would this be a job for Java?

    Thanks. Jason

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    attached mail follows:


    On Wed, Apr 10, 2002 at 06:32:18PM -0300, Javier wrote: > Does templates (eg php-templates or Smarty) fill automatically listboxes? > Or do I need to code it?

    If your list boxes are coming from data in a MySQL or ODBC database, check out my SQL Solution: http://www.sqlsolution.info/. One of the things it does is generate form elements (ie text, checkbox, radio and option lists) automatically from your query results.

    --Dan

    -- 
                   PHP classes that make web design easier
            SQL Solution  |   Layout Solution   |  Form Solution
        sqlsolution.info  | layoutsolution.info |  formsolution.info
     T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
     4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
    

    attached mail follows:


    Hello,

    I wnat to set auto_append_file in my own php script not in php.ini. So I used

    ini_set("auto_append_file","hello.html"); But it doesn't work. Does anyone know about this?

    environment: Apache + Windows2000 + PHP4.1.2 Apache + TurboLinuxServer7 + PHP4.1.2

    Regards, Hiroshi Ayukawa

    attached mail follows:


    why don't you just do an include "hello.html"; at the end of the file?

    -----Original Message----- From: Hiroshi Ayukawa [mailto:ayue-fukuoka.co.jp] Sent: Thursday, April 11, 2002 2:04 PM To: php-generallists.php.net Subject: [PHP] ini_set doesn't work

    Hello,

    I wnat to set auto_append_file in my own php script not in php.ini. So I used

    ini_set("auto_append_file","hello.html"); But it doesn't work. Does anyone know about this?

    environment: Apache + Windows2000 + PHP4.1.2 Apache + TurboLinuxServer7 + PHP4.1.2

    Regards, Hiroshi Ayukawa

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    attached mail follows:


    In article <78C1E10DE5C995.ayue-fukuoka.co.jp>, ayue-fukuoka.co.jp (Hiroshi Ayukawa) wrote:

    > I wnat to set auto_append_file in my own php script not in php.ini. > So I used > > ini_set("auto_append_file","hello.html"); > > But it doesn't work.

    What error message do you get under error_reporting(E_ALL)?

    (Meantime, make sure that the web server's user has permission to read the file, and perhaps try substituting in the full pathname.)

    -- 
    CC
    

    attached mail follows:


    >What error message do you get under error_reporting(E_ALL)? > >(Meantime, make sure that the web server's user has permission to read the >file, and perhaps try substituting in the full pathname.)

    No error is displayed.And there is no problem around permission. thanks.

    Hiroshi Ayukawa http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php

    attached mail follows:


    Hello,

    >why don't you just do an include "hello.html"; at the end of the file?

    Because, there are so many files. thanks.

    Hiroshi Ayukawa http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php

    attached mail follows:


    > [snip mail header info] > > Hello, > > >why don't you just do an include "hello.html"; at the end of the file? > > Because, there are so many files. > thanks. > > [snip mail footer info]

    but you'd have to put set_ini() in each of your files (unless you're putting it in an auto prepended file)

    attached mail follows:


    >but you'd have to put set_ini() in each of your files (unless you're putting >it in an auto prepended file) Thanks.I haven't explained enough. I have one file included at the beginning of all files. So I only have to write ini_set in that file only once. I really appreciate your answer. thanks.

    Hiroshi Ayukawa http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php

    attached mail follows:


    Hello all,

    I've just installed 4.1.2 on two different windows machines, and have different problems on each:

    1. NT4/SP6/IIS - can't load php_ldap.dll - does this require another dll first? 2. 98/Xitami - $PHP_SELF is set, but empty? - 4.0.2 works, everything else since doesn't

    I've tried search engines and the archives, but no luck so far. Anyone have suggestions?

    Thanks, John

    --
    /* SteeleSoft Consulting     John Steele - Systems Analyst/Programmer
     *  We also walk dogs...  Dynamic Web Design  PHP/MySQL/Linux/Hosting
     *  www.steelesoftconsulting.com     jsteelesteelesoftconsulting.com
     */
    

    attached mail follows:


    Hi everyone,

    I have a listed result from the MySQL table but I want the user to be able to get more information without having to use the back button a lot after they finish viewing details. So when the user clicks on one of the records then it will open a new window to view the detailed information. So it would need to pass the serial number for the table to the new window. I would like for the window to be as restricted as possible. (no resize, no menu options, etc...) really just a close [x] is all it should have. When the user clicks on one record and the new window opens with the detailed info, then if they do not close that new window before clicking on another record, then the new details for that record should just reload in the second window. (Since it is still open) Know what I mean? I can see it in my head, but I am not very fluent with php and or Javascript. Can anyone help me on this?

    System--- Apache 1.3.22 + MySQL + PHP 4.1 on Win2K

    Thanks -Robbie

    attached mail follows:


    use javascript window.open() - call the window some unique name, that way it'll reuse the window if it's already open in the page for that window, use window.focus() to bring it to the front look at http://developer.netscape.com/ and hunt around for the javascript manual (I haven't been there for a while so I don't know how easy it is to find now, I've downloaded the pdf version a while ago and use that)

    -----Original Message----- From: Robbie Newton [mailto:phpsqllistshotmail.com] Sent: Thursday, April 11, 2002 2:39 PM To: php-generallists.php.net Subject: [PHP] A Details Popup

    Hi everyone,

    I have a listed result from the MySQL table but I want the user to be able to get more information without having to use the back button a lot after they finish viewing details. So when the user clicks on one of the records then it will open a new window to view the detailed information. So it would need to pass the serial number for the table to the new window. I would like for the window to be as restricted as possible. (no resize, no menu options, etc...) really just a close [x] is all it should have. When the user clicks on one record and the new window opens with the detailed info, then if they do not close that new window before clicking on another record, then the new details for that record should just reload in the second window. (Since it is still open) Know what I mean? I can see it in my head, but I am not very fluent with php and or Javascript. Can anyone help me on this?

    System--- Apache 1.3.22 + MySQL + PHP 4.1 on Win2K

    Thanks -Robbie

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    attached mail follows:


    Try this code... this is the originating page, with a link for each person, which passes a user id to the function.

    The function opens a new window, with all sorts of chrome turned off or on (my defaults are pretty close to what you want) with the url details.php?id=<the id you passed>.

    details.php can then use the value of $id to look up a db and print stuff to the screen.

    <HTML> <HEAD> <TITLE>foo</TITLE> <SCRIPT language="JavaScript"> <!-- function popMeUp(id) { var prefix = "details.php?id="; var script = eval("prefix + id"); window.open(script, "details", "toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes, resizable=no,width=350,height=350"); } // --> </SCRIPT> </HEAD> <BODY> <A HREF="javascript:popMeUp('4');">view person number 4</a> </BODY> </HTML>

    You will have problems with the user leaving the window open and going back to where they were (main window). Since it's still open, new details open in this same small window, which is now in the background.

    To bring details.php (the small window, possibly in the background) to the front each time it loads, you'll need to include this in your body tag:

    <BODY onload="javascript:window.focus();">

    Hope this helps -- it's a trimmed down version of what I use for help topics, profiles, etc etc.

    Of course, I need to remind you that the links will fail on non-javascript browsers. A more complete solution would involve <NOSCRIPT></NOSCRIPT> tags and perhaps javascript writeln, in order to have non JS browser just go to an full page.

    However, for the vast number of your users, this will work out fine.

    Justin French -------------------- Creative Director http://Indent.com.au --------------------

    on 11/04/02 2:38 PM, Robbie Newton (phpsqllistshotmail.com) wrote:

    > Hi everyone, > > I have a listed result from the MySQL table but I want the user to be able > to get more information without having to use the back button a lot after > they finish viewing details. So when the user clicks on one of the records > then it will open a new window to view the detailed information. So it would > need to pass the serial number for the table to the new window. I would like > for the window to be as restricted as possible. (no resize, no menu options, > etc...) really just a close [x] is all it should have. When the user clicks > on one record and the new window opens with the detailed info, then if they > do not close that new window before clicking on another record, then the new > details for that record should just reload in the second window. (Since it > is still open) Know what I mean? I can see it in my head, but I am not very > fluent with php and or Javascript. Can anyone help me on this? > > > System--- > Apache 1.3.22 + MySQL + PHP 4.1 on Win2K > > Thanks > -Robbie

    attached mail follows:


    Dear sir,

    I have a problem. I want to transfer form data to an anchor within the same php3 file. But it does'nt seem to work. My code is something like this ...........

    file name is get.php3

    <?php some php code . . . echo " <form method = post action = 'get.php3#update'>"; . . . . ?>

    <a name = "update">this is where we want to come </a>

    can somebody help?

    B.Venkateshwar

    attached mail follows:


    Yo B:

    On Thu, Apr 11, 2002 at 11:12:40AM +0530, Venkateshwar B wrote: > > echo " <form method = post action = 'get.php3#update'>";

    That's not valid HTML. This is: echo '<form method="post" action="get.php3#update">';

    But, I suspect that's not your problem. I'm guessing that the browser, or even HTML, doesn't support anchors in POST action statements. You could try "get" as the method and it'll probably work.

    --Dan

    -- 
                   PHP classes that make web design easier
            SQL Solution  |   Layout Solution   |  Form Solution
        sqlsolution.info  | layoutsolution.info |  formsolution.info
     T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
     4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
    

    attached mail follows:


    T., Here's what you want in one simple line. It works with multiple periods, spaces, whatever (I've tested it). It's best to use the PCRE functions since they are binary safe, but eregi_replace also works fine (but preg_replace would be better).

    preg_replace("/(.*)(\..*)/","$1a$2",$your_search_var_here)

    Mike...

    attached mail follows:


    Image file uploading is not taking place.

    This is the html code : <html> <body> <FORM ENCTYPE="multipart/form-data" ACTION="uploadtest.php" METHOD=POST> Send this file: <INPUT NAME="userfile" TYPE="file"> <INPUT TYPE="submit" VALUE="Send File"> </FORM> </body> </html>

    This is the php file - uploadtest.php

    <? if (is_uploaded_file($userfile)) { echo "inside if "; copy($userfile, "/img"); } else { echo "Possible file upload attack: filename '$userfile'."; }

    //move_uploaded_file($userfile, "/img"); echo "file upload over"; ?>

    When I run the html and submit it - I get messages "Inside if " and at the end "file upload over" But when I check the directory /img - there is nothing inside. i.e. no file is getting uploaded.

    What is missing ?

    thanks in advance,

    manisha

    attached mail follows:


    At 1:52 PM +0800 11/4/02, Manisha wrote:

    >Image file uploading is not taking place.

    A 5 second glance at the manual page for file uploads would have shown you what you're doing wrong *and* given you a cut-and-paste example of how to do it right.

    http://www.php.net/manual/en/features.file-upload.php

    ...R.

    attached mail follows:


    yes, I have copied example from there itself, it is the max size which I forgot to copy in email but which is actually in a program.

    My html do contain max size tag. Still it is not working.

    ----------------html code ----------------

    <html> <body> <FORM ENCTYPE="multipart/form-data" ACTION="uploadtest.php" METHOD=POST> <input type="hidden" name="MAX_FILE_SIZE" value="1000"> Send this file: <INPUT NAME="userfile" TYPE="file"> <INPUT TYPE="submit" VALUE="Send File"> </FORM> </body></html> -------------------------------------------------

    Following php file also have tried (with HTTP_POST....)

    --------------------Php code--------- <? if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) { copy($HTTP_POST_FILES['userfile']['tmp_name'], "/img"); } else { echo "Possible file upload attack. Filename: " . $HTTP_POST_FILES['userfile']['name']; } // move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], "/img");

    echo "haha - file upload over"; ?>

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

    STILL NOT GETTING LOADED. ANYTHING ELSE ?

    At 04:01 PM 4/11/02 +1000, you wrote: >At 1:52 PM +0800 11/4/02, Manisha wrote: > > >Image file uploading is not taking place. > >A 5 second glance at the manual page for file uploads would have shown >you what you're doing wrong *and* given you a cut-and-paste example of >how to do it right. > >http://www.php.net/manual/en/features.file-upload.php > > ...R. > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    At 2:28 PM +0800 11/4/02, Manisha wrote:

    ><input type="hidden" name="MAX_FILE_SIZE" value="1000">

    That's a mighty small limit on file size. Especially if it's an image being uploaded. Are you sure the file you're testing with is smaller than 1000 bytes?

    Also, be aware that this field is advisory only. Many browsers ignore it.

    >if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) { > copy($HTTP_POST_FILES['userfile']['tmp_name'], "/img");

    Check to see whether that "copy" function completed successfully. I'd be surprised if you really want to move the file to /img. And if you're on a Unix system the web server certainly won't have write access to the / directory.

    >STILL NOT GETTING LOADED. ANYTHING ELSE ?

    Please don't shout.

    ...R.

    attached mail follows:


    yes.. well from a quick glance the problem lies not in the MAX_FILE_SIZE or not using the HTTP_POST_FILES

    but more in the improper usage of the "copy" function

    I saw it briefly and thought.. hmmm never used it.. but's it's param's look wonky..

    so yes I was right after a quick lookup on the function..

    therefore point of story:

    try this line instead:

    copy($HTTP_POST_FILES['userfile']['tmp_name'], "/img/".$HTTP_POST_FILES['userfile']['tmp_name'], );

    and I strongly believe your problem will be fixed...

    tell me if not..

    good luck..

    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Julien Bonastre [The-Spectrum.org CEO] A.K.A. The_RadiX the_radixhotkey.net.au ABN: 64 235 749 494 Mobile: 0407 122 268 QUT Student #: 04475739 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

    ----- Original Message ----- From: "Manisha" <manishaaurica.com> To: "php-general" <php-generallists.php.net> Sent: Thursday, April 11, 2002 4:28 PM Subject: Re: [PHP] Image Uploading not taking place

    > yes, I have copied example from there itself, it is the max size which I > forgot to copy in email but which is actually in a program. > > My html do contain max size tag. Still it is not working. > > ----------------html code ---------------- > > <html> > <body> > <FORM ENCTYPE="multipart/form-data" ACTION="uploadtest.php" METHOD=POST> > <input type="hidden" name="MAX_FILE_SIZE" value="1000"> > Send this file: <INPUT NAME="userfile" TYPE="file"> > <INPUT TYPE="submit" VALUE="Send File"> > </FORM> > </body></html> > ------------------------------------------------- > > Following php file also have tried (with HTTP_POST....) > > --------------------Php code--------- > <? > if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) { > copy($HTTP_POST_FILES['userfile']['tmp_name'], "/img"); > } > else { > echo "Possible file upload attack. Filename: " . > $HTTP_POST_FILES['userfile']['name']; } > // move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], "/img"); > > echo "haha - file upload over"; > ?> > > --------------------------------------------------- > > > STILL NOT GETTING LOADED. ANYTHING ELSE ? > > > > > > At 04:01 PM 4/11/02 +1000, you wrote: > >At 1:52 PM +0800 11/4/02, Manisha wrote: > > > > >Image file uploading is not taking place. > > > >A 5 second glance at the manual page for file uploads would have shown > >you what you're doing wrong *and* given you a cut-and-paste example of > >how to do it right. > > > >http://www.php.net/manual/en/features.file-upload.php > > > > ...R. > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Thanks to Michael, Barry, Steve, Cal and Rasmus for replies.

    We have just taken a contract for a dedicated server, and I tried rather hard to get it to be a Linux server. The killer for that was that we have a significantly complex site that will need to be migrated to the server which has been coded in asp - which leaves us rather stuck with Windows and IIS. I stared this hard in the face and asked questions about the cost of recoding before being reluctantly persuaded this had to be.

    So that being the case, am I picking up the message that the criticisms are basically correct? ie. no-one ought to start from here, but if you're forced to use IIS (because asp won't work with anything else) then php / mysql is not going to be the way to go (xxx are proposing coldfusion / sqlserver).

    Thanks - Mallen

    >>> Michael Kimsal <michaeltapinternet.com> 04/10/02 08:59pm >>> Barry C. Hawkins wrote: > Mallen, It sounds like you might have some non-technical or > open-source execs to talk to, and that a non-MS platform is not an > option (yet :^) ). If so, here are some more "managerial"-type > arrows for your quiver: > > 1.) MySQL was one of the top 2 databases in a Ziff-Davis major vendor > "shootout" recently, ranking alongside Oracle 9i. See > > http://www.mysql.com/news/index.html > > under the heading "MySQL a winner in server database clash". They > like products more if they're mentioned in the same sentence as > Oracle. Oracle was on the SuperBowl, you know. :^) > > 2.) Actually, PHP doesn't officially say that CGI is the recommended > install for IIS. They simply issue a few caveats regarding SAPI. > Check it out at: > > http://www.php.net/manual/en/install.windows.php

    "Officially" perhaps but I think the overwhelming consensus has been that ISAPI under Windows just didn't work. It *does* work now, as long as you don't use any third party DLLs (like MySQL, GD, etc) rendering it pretty useless.

    Sorry, it's just anecdotal evidence, but you'll notice that no one in the PHP camp will unequivocally say that PHP under ISAPI is solid. The silence on ISAPI speaks volumes right now.

    > 3.) I have nothing to offer on the search engine issue. > > Now, I know that some of what I just said will incense some folks, > because yes, ideally this poor fellow would be able to use *nix with > Apache, MySQL, and PHP. But, since he may not have that luxury, > these items might put enough "spin" on things for him to get the Open > Source items in the door. Once that initial "yes" has been given, > the subsequent steps might come more easily.

    If the only way to get "open source" products in the door is to have them running half-crippled (running on OSes they weren't designed for) you're giving "open source" products a bad image. No one expects ASP to run on anything but IIS (chilisoft notwithstanding). If the server HAS to be Windows, use ActiveState's Perl or something else with a company behind it and just go down that road.

    Having PHP run poorly under Windows will just make PHP look bad, even if it's Windows' fault.

    Michael Kimsal http://www.phphelpdesk.com 734-480-9961

    ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________

    ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________

    attached mail follows:


    Have you looked into Chilli Soft? It's an ASP interpreter for Apache and a number of other platforms. Fairly good from what I've heard, and owned by Sun now it appears.

    http://www.chillisoft.com/

    Jack

    -----Original Message----- From: Mallen Baker [mailto:MBAKERBITC.ORG.UK] Sent: Thursday, April 11, 2002 12:34 AM To: barry.hawkinsallthingscomputed.com; calcalevans.com; rasmuslerdorf.ca; michaeltapinternet.com; > Cc: php-generallists.php.net Subject: Re: [PHP] Re: arguments against php / mysql?

    Thanks to Michael, Barry, Steve, Cal and Rasmus for replies.

    We have just taken a contract for a dedicated server, and I tried rather hard to get it to be a Linux server. The killer for that was that we have a significantly complex site that will need to be migrated to the server which has been coded in asp - which leaves us rather stuck with Windows and IIS. I stared this hard in the face and asked questions about the cost of recoding before being reluctantly persuaded this had to be.

    So that being the case, am I picking up the message that the criticisms are basically correct? ie. no-one ought to start from here, but if you're forced to use IIS (because asp won't work with anything else) then php / mysql is not going to be the way to go (xxx are proposing coldfusion / sqlserver).

    Thanks - Mallen

    >>> Michael Kimsal <michaeltapinternet.com> 04/10/02 08:59pm >>> Barry C. Hawkins wrote: > Mallen, It sounds like you might have some non-technical or > open-source execs to talk to, and that a non-MS platform is not an > option (yet :^) ). If so, here are some more "managerial"-type > arrows for your quiver: > > 1.) MySQL was one of the top 2 databases in a Ziff-Davis major vendor > "shootout" recently, ranking alongside Oracle 9i. See > > http://www.mysql.com/news/index.html > > under the heading "MySQL a winner in server database clash". They > like products more if they're mentioned in the same sentence as > Oracle. Oracle was on the SuperBowl, you know. :^) > > 2.) Actually, PHP doesn't officially say that CGI is the recommended > install for IIS. They simply issue a few caveats regarding SAPI. > Check it out at: > > http://www.php.net/manual/en/install.windows.php

    "Officially" perhaps but I think the overwhelming consensus has been that ISAPI under Windows just didn't work. It *does* work now, as long as you don't use any third party DLLs (like MySQL, GD, etc) rendering it pretty useless.

    Sorry, it's just anecdotal evidence, but you'll notice that no one in the PHP camp will unequivocally say that PHP under ISAPI is solid. The silence on ISAPI speaks volumes right now.

    > 3.) I have nothing to offer on the search engine issue. > > Now, I know that some of what I just said will incense some folks, > because yes, ideally this poor fellow would be able to use *nix with > Apache, MySQL, and PHP. But, since he may not have that luxury, > these items might put enough "spin" on things for him to get the Open > Source items in the door. Once that initial "yes" has been given, > the subsequent steps might come more easily.

    If the only way to get "open source" products in the door is to have them running half-crippled (running on OSes they weren't designed for) you're giving "open source" products a bad image. No one expects ASP to run on anything but IIS (chilisoft notwithstanding). If the server HAS to be Windows, use ActiveState's Perl or something else with a company behind it and just go down that road.

    Having PHP run poorly under Windows will just make PHP look bad, even if it's Windows' fault.

    Michael Kimsal http://www.phphelpdesk.com 734-480-9961

    ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________

    ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________

    --
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    attached mail follows:


    > We have just taken a contract for a dedicated server, and I tried rather > hard to get it to be a Linux server. The killer for that was that we > have a significantly complex site that will need to be migrated to the > server which has been coded in asp - which leaves us rather stuck with > Windows and IIS. I stared this hard in the face and asked questions > about the cost of recoding before being reluctantly persuaded this had > to be. > > So that being the case, am I picking up the message that the criticisms > are basically correct? ie. no-one ought to start from here, but if > you're forced to use IIS (because asp won't work with anything else) > then php / mysql is not going to be the way to go (xxx are proposing > coldfusion / sqlserver).

    But there is really no point in switching from ASP to CF. What are you hoping to gain? Going from one dead-end proprietary system to another which both try to lock you into their technologies seems pointless to me. Is ASP not working? Why not just stick with that?

    Why not get a low-cost Linux server as well and slowly start migrating things?

    -Rasmus

    attached mail follows:


    Sorry - I'm being clear as mud! We have an existing site which will need to live on the server - I'm looking at new development. The two don't need to work on the same thing - there's no question of recoding that site as coldfusion.

    - M

    >>> Rasmus Lerdorf <rasmuslerdorf.ca> 04/11/02 08:37am >>> >But there is really no point in switching from ASP to CF. What are you hoping to gain? Going from one dead-end proprietary system to another which both try to lock you into their technologies seems pointless to me. Is ASP not working? Why not just stick with that?

    Why not get a low-cost Linux server as well and slowly start migrating things?

    -Rasmus

    ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________

    ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________

    attached mail follows:


    Hello,

    I have a doubt, Is there way to download a file as soon as an URL is entered.

    (i.e) the surfer should be able to downloaded a file as soon as he/she type's the URL and press enter key.

    If it is possible please send a sample script.

    Thanks in advance Arun

    E-mail ID : arunooty.tenet.res.in

    attached mail follows:


    Hi All,

    I have the following question. I have been developing with C for a

    while and I was used that the \0 indicated the end of a string. So if

    I had a variable containing 1234\056789 and the variable was printed,

    only 1234 was printed.

    As I can see in PHP (version 4.0.6 ), when I echo such a variable

    also the characters are printed, even the characters after \0. Is this

    the case PHP should work or is it a bug ? Isn't \0 really a string

    termination character in PHP ?

    I have been searching for documentation on this matter so if anyone

    could help me...

    Kind Regards,

    Marco Laponder

    mlrinterchain.nl

    attached mail follows:


    In article <B9B3C86867A9D211A6400008C7334883784B12scania.interchain.nl>, mlrinterchain.nl says... > Hi All, > > I have the following question. I have been developing with C for a > while and I was used that the \0 indicated the end of a string. So if > I had a variable containing 1234\056789 and the variable was printed, > only 1234 was printed. > > As I can see in PHP (version 4.0.6 ), when I echo such a variable > also the characters are printed, even the characters after \0. Is this > the case PHP should work or is it a bug ? Isn't \0 really a string > termination character in PHP ? > > I have been searching for documentation on this matter so if anyone > could help me...

    In this respect, PHP is not like C. Strings are defines within quotes, single or double depending on the circumstances. So \0 does not define the end of a string.

    -- 
    David Robley
    Temporary Kiwi!
    

    Quod subigo farinam

    attached mail follows:


    Hello all

    I have a script called ‘report.php’ that generates a report in HTML. This report must be created at regular intervals; hence I have set up a cron job to call that script. The output of ‘report.php’ must be sent by e-mail. I use the following command:

    /usr/bin/lynx -source http://server.com/report.php | mail -s "Report" foobar.com

    This works fine. The result of report.php is sent to foobar.com.

    However, the results do not appear as HTML in the e-mail client, but as text. This is due to the fact that the headers saying ‘This is HTML’ are missing from the e-mail message sent.

    Does anyone know how it is possible to get 'mail' to add suitable headers to the above command, so that the receiving e-mail client knows that it is getting an HTML and not a text message?

    Any help would be gratefully received. TIA.

    S.

    _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com

    attached mail follows:


    Hi All, it's my first post here.

    I've got a problem with the upload. I want to upload a 4Mo file on the server but it refuses to work. I modified the max_upload_size in the php.ini but it continues to refuse the transfer. If I upload a smaller file it works fine.

    Someone told me to modify the MAX_FILE_SIZE constant but I don't find it.

    I need help, Thanks

    Fred from Paris

    attached mail follows:


    Hi!

    Is there any way to turn the list mails off temporary ? I do not want to signoff, just now i wouldn't like to get 200 mails a day... But maybe tomarrow i wanna...

    Thx

    Vaso

    attached mail follows:


    In article <B3FA9A1AF684264EBB3D9AE1E73944A432B99Afwhungary>, ferenc_vasoczkigallup.hu says... > Hi! > > Is there any way to turn the list mails off temporary ? > I do not want to signoff, just now i wouldn't like to get 200 mails a day... > But maybe tomarrow i wanna... > > Thx > > Vaso > Nope - unsubscribe and use the newsgroup at news.php.net might be an option.

    -- 
    David Robley
    Temporary Kiwi!
    

    Quod subigo farinam

    attached mail follows:


    That's not quite right,

    if (!$result = mysql_query($sql, $db)) { echo "Query failed"; } else { if (!$row = mysql_fetch_row($result)) { echo "No records found."; } }

    Tim Ward Internet Chess www.chessish.com <http://www.chessish.com>

    ---------- From: Erik Price [SMTP:priceehhbrown.com] Sent: 10 April 2002 15:00 To: php-generallists.php.net Subject: Re: [PHP] Re: mysql

    ... Someone did suggest that you use an if statement, however, in the event that no records are retrieved --

    if (!$result = mysql_query($sql, $db)) { echo "No records found."; } else { $row = mysql_fetch_row($result); }

    Erik

    ----

    Erik Price Web Developer Temp Media Lab, H.H. Brown priceehhbrown.com

    attached mail follows:


    Hi,

    I am trying to create an html automatic response email to users that fill out a form.

    Workflow -

    1. User fills out form and selects submit 2. The contents of the form are then mailed to a secretary for record keeping 3. (Where the problem is) An html based email is sent to the email address that the user entered into the form. 4. The user is redirected to a confirmation page

    Ok - steps one and two work fine so on to step three.

    After the code that mails the form then my code --

    if ("PHP_MAIL_FORM=true") { $to = "$address_email"; $subject = "Uncharted Outposts Newsletter"; $message = <html><p>Test Email</p></html>; $headers = "To: $name_first <$address_email>\nFrom: <My Company>\nReply-To: <My Company>\nMIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\n"; mail($to, $subject, $message, $headers); }

    Where $address_email and $name_first are variables from the form

    The script as is works fine, but I want to assign the contents of a separate file (a web page) to $message instead of inserting the contents of the file as a string in the actual script. I want the body of the email to come from a separate file to help make changing the body of the email easier too. I tried using -

    readfile("includes/news.html")

    But that did not work and instead inserted file into the actual webpage instead of the email.

    Does anyone have an idea or suggestion?

    Thanks for your help,

    Ed

    attached mail follows:


    In article <00bc01c1e131$7a7bb7e0$1301a8c0doghouse.ed>, ebaileydoghouseconsulting.com (Edward R. Bailey) wrote:

    > I want to assign the contents of a separate file (a web page) to > $message instead of inserting the contents of the file as a string in > the actual script. I want the body of the email to come from a separate > file to help make changing the body of the email easier too. I tried > using - > > readfile("includes/news.html") > > But that did not work and instead inserted file into the actual webpage > instead of the email. > > Does anyone have an idea or suggestion?

    <http://php.net/file> or <http://php.net/fread>

    -- 
    CC
    

    attached mail follows:


    Hi, does anyone know how to pass an array to different php file?

    Let's assume I have an array $array[] in sample1.php. I want to pass the array to a different php files by doing something like:

    <a href=\"sample2.php?array=".$array[]."\">...</a>

    This didn't work actually. I can't think of any other wayto do this. Please help. Thanks.

    _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com

    attached mail follows:


    two possibilities: - put your array in a form with hidden fields - use sessions

    I would prefer the second option (check manual for sessions)

    Greets,

    Edward

    ----- Original Message ----- From: "Hirono Tanaka" <php_hunterhotmail.com> To: <php-generallists.php.net> Sent: Thursday, April 11, 2002 10:33 AM Subject: [PHP] passing array to another php file

    > Hi, does anyone know how to pass an array to different php file? > > Let's assume I have an array $array[] in sample1.php. I want to pass the > array to a different php files by doing something like: > > <a href=\"sample2.php?array=".$array[]."\">...</a> > > This didn't work actually. I can't think of any other wayto do this. > Please help. Thanks. > > > > _________________________________________________________________ > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Actually if you really want to pass it through the URL you can do it this way:

    <a href="sample2.php?<? for ($I=0, $I<count($array); $I++) echo "array[]={$array[$I]}&"; ?>">

    There are other ways of doing it, but basically you want a URL that looks like this:

    <a href="sample2.php?array[]=var1&array[]=var2&array[]=var3">

    This tells php that that variable through the url is to be parsed as an array.

    You can also, like Edward said, use hidden fields in a form, use sessions. You can also use cookies with serialize to pass them, which since most people accept them it is usually ok. There are ways of checking for cookies also. Hmm.. What else probably lots of other ways, but if you don¹t mind the url mess then you might as well do the above example. I've used all of the above examples it just depends on what you are using it for in my opinion :) I hope it helps!

    Cheers!

    Rick

    "And God shall wipe away all tears from their eyes; and there shall be no more death, neither sorrow, nor crying, neither shall there be any more pain: for the former things are passed away." - Revelation 21:4

    > From: "Edward van Bilderbeek - Bean IT" <edwardbean-it.nl> > Date: Thu, 11 Apr 2002 10:37:44 +0200 > To: "Hirono Tanaka" <php_hunterhotmail.com>, <php-generallists.php.net> > Subject: Re: [PHP] passing array to another php file > > two possibilities: > - put your array in a form with hidden fields > - use sessions > > I would prefer the second option (check manual for sessions) > > Greets, > > Edward > > > ----- Original Message ----- > From: "Hirono Tanaka" <php_hunterhotmail.com> > To: <php-generallists.php.net> > Sent: Thursday, April 11, 2002 10:33 AM > Subject: [PHP] passing array to another php file > > >> Hi, does anyone know how to pass an array to different php file? >> >> Let's assume I have an array $array[] in sample1.php. I want to pass the >> array to a different php files by doing something like: >> >> <a href=\"sample2.php?array=".$array[]."\">...</a> >> >> This didn't work actually. I can't think of any other wayto do this. >> Please help. Thanks. >> >> >> >> _________________________________________________________________ >> Chat with friends online, try MSN Messenger: http://messenger.msn.com >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    first serialize and then base64encode your array. send this encoded string to the next page and base64decode it there first and then unserialize it.

    <a href=\"sample2.php?array=".base64_encode(serialize($array))."\">...</a>

    and sample2.php:

    <?php

    $array = unserialize(base64_decode($array)); print_r($array); ?>

    "Hirono Tanaka" <php_hunterhotmail.com> schrieb im Newsbeitrag news:F190h331DPrZjuy0RhP00002ff6hotmail.com... > Hi, does anyone know how to pass an array to different php file? > > Let's assume I have an array $array[] in sample1.php. I want to pass the > array to a different php files by doing something like: > > <a href=\"sample2.php?array=".$array[]."\">...</a> > > This didn't work actually. I can't think of any other wayto do this. > Please help. Thanks. > > > > _________________________________________________________________ > Chat with friends online, try MSN Messenger: http://messenger.msn.com >

    attached mail follows:


    Hi, I am looking for Web host that offers the best deal plus postgreSQL support. Could anyone come up with the best one? The best deal would include Telnet access and cost as low as round $15/per month. Thanks.

    _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx

    attached mail follows:


    Why not just use an if instead of a while? This way you test for a result and get it at the same time

    If ($array = mysql_fetch_array($result)) { foreach($array as $key=?$value) echo("$key=?$value<br>"); } else echo("sorry didn't get anything");

    Tim Ward Internet Chess www.chessish.com <http://www.chessish.com>

    ---------- From: Alexander Skwar [SMTP:lists.ASkwarDigitalProjects.com] Sent: 10 April 2002 16:50 To: Php-GeneralLists. Php. Net Subject: Re: [PHP] Is While needed in MySQL Result with a Limit of 1

    »Brian Drexler« sagte am 2002-04-10 um 07:58:59 -0400 : > My question is this....is the while statement needed when I'm only returning > one record?

    No, it's not. Since you know that you'll either get 0 or 1 row, you don't need the while loop. Instead I'd call mysql_num_rows to see if there was 1 row.

    Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.iso-top.de | Jabber: askwarcharente.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 21 hours 45 minutes

    attached mail follows:


    > -----Original Message----- > From: Jeff Bearer [mailto:jbearerpittsburghlive.com] > Sent: 10 April 2002 15:13 > [snip] > > but If it's possible I'd like to do it with one line > something that I'd > think it would be like this. > > my_function($bob,if($a=='H') return 'Y'; );

    I think the nearest you can get to this would be something like:

    my_function($bob, $a=='H'?'Y':NULL);

    but then my_function has got to know to expect a NULL instead of a missing parameter...!

    Cheers!

    Mike

    --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.fordlmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

    attached mail follows:


    Hello: I would like to know the http request sent to the server, to determine if is a GET, POST, etc. What function/variable I have to use?

    Best Regards. ---------------------------------------------------- QaDRAM Studio, RAD Development for the WEB http://studio.qadram.com

    attached mail follows:


    see what's wrong here: ereg('(^[0-1231]$).jpg$',$file_name)

    [] meens a group of characters, so in your case 0,1,2 and 3 are valid characters. you haven't defined any modifer like ?,*,+ or{}, so one of this characters has to be found exactly one time. you're using ^ outside the [] so it meens the beginning of the string. in your case none of these characters inside the [] can be found at the beginning of the string. then you use $ after the []. $ meens the end of the string. none of the characters in the [] matches at the end of the string. so this would be right:

    ereg('_[0-9]{4}\.jpg$', $file_name);

    so this meens: the beginning of the string doesn't matter, because we have not specified ^ at the beginning. there has to be an underscore, followed by 4 characters between 0 and 9, followed by an dot, followed by j, followd by p, followed by g. g has to be at the end of the string, because of the $. or you can use: ereg('^\.*_[0-9]{4}\.jpg$', $file_name);

    this will meen : any characters at the beginning between 0 and unlimited times, then followed by an underscore, followed by 4 characters between 0 and 9, followed by a dot, followed by jpg. same as above though. But the * is a real performance eater so it could be slightly faster if you're using the first example.

    "Jas" <jlgerfenhotmail.com> schrieb im Newsbeitrag news:20020410222934.89594.qmailpb1.pair.com... > I hate to say it but that didn't work, I have been trying different > variations of the same ereg('_(^90-9{4}$).jpg$',$file_names) and nothing > seems to work for me, I have also been looking at the ereg and preg_ereg > functions but they don't seem to make sense to me, here is the code as a > whole if this helps: > // query directory and place results in select box > $dir_name = "/path/to/images/directory/on/server/"; // path to directory on > server > $dir = opendir($dir_name); // open the directory in question > $file_lost .= "<p><FORM METHOD=\"post\" ACTION=\"done.php3\" NAME=\"ad01\"> > <SELECT NAME=\"image_path\">"; > while ($file_names = readdir($dir)) { > if ($file_names != "." && $file_names !=".." && ereg('_(^[0-9]{4}.jpg$)', > $file_names)) // filter my contents > { > $file_lost .= "<OPTION VALUE=\"$file_names\" > NAME=\"$file_names\">$file_names</OPTION>"; > } > } > $file_lost .= "</SELECT><br><br><INPUT TYPE=\"submit\" NAME=\"submit\" > VALUE=\"select\"></FORM></p>"; > closedir($dir); > What I am trying to accomplish is to list the contents of a directory in > select box but I want to filter out any files that dont meet this criteria > *_4444.jpg and nothing is working for me, any help or good tutorials on > strings would be great. > Jas > "Erik Price" <priceehhbrown.com> wrote in message > news:3484EF79-4CD0-11D6-BC9F-0050E4857868hhbrown.com... > > > > On Thursday, April 11, 2002, at 05:59 AM, jas wrote: > > > > > Is this a correct string to show only files that look like so: > > > *_2222.jpg > > > if ($file_names != "." && $file_names !=".." && > > > ereg('(^[0-1231]$).jpg$',$file_name)) > > > Any help would be great. > > > > preg_match(/^_[0-9]{4,4}\.jpg$/, $file_name) should match any string > > that starts with an underscore, is followed by exactly four digits, and > > then a ".jpg". It will not match anything but this exact string. > > > > > > Erik > > > > > > > > > > ---- > > > > Erik Price > > Web Developer Temp > > Media Lab, H.H. Brown > > priceehhbrown.com > > > >

    attached mail follows:


    Hi

    How do I go about downloading the PEAR libraries and making use of them? I'm new to PHP and am looking for some high-quality libraries to make use of to help me write applications. I looked at PHPLib but I was put off because it uses PHP3. And would you recommend using PEAR or perhaps any other libraries?

    Thanks Luke

    P.s I sent this to the PEAR mailing list but got no reply.