OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general-digest-help_at_lists.php.net
Date: Tue Aug 13 2002 - 16:39:33 CDT

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

    php-general Digest 13 Aug 2002 21:39:33 -0000 Issue 1523

    Topics (messages 112283 through 112439):

    fruity arrays
            112283 by: Roger Thomas
            112284 by: Richard Black

    Re: Scheduler, Staff Directory, Work tracker
            112285 by: Paul Dionne

    Re: Php lib?
            112286 by: John Wards
            112287 by: Andrey Hristov
            112289 by: John Wards

    Re: Help with output from system() or backticks
            112288 by: Shawn Sellars

    Re: HTML issue... spaces in between images
            112290 by: Ford, Mike [LSS]
            112294 by: James Green
            112306 by: Brent Baisley

    controls "list menu"
            112291 by: kale
            112292 by: Justin French
            112293 by: Peter Bottenberg
            112297 by: James Green
            112318 by: kale

    Re: include & require directive
            112295 by: James Green
            112343 by: Huy
            112379 by: Miles Thompson

    Re: PHP files can't "show source"
            112296 by: James Green

    Session variable problem
            112298 by: Christian Ista
            112299 by: Mika Tuupola
            112301 by: Christian Ista

    PHP lib again
            112300 by: John Wards

    PHP and Memory...
            112302 by: MyBox

    A kind of array (hashtable)
            112303 by: Christian Ista
            112320 by: lallous

    Win NT & 2000
            112304 by: Roman Duriancik

    Creating a zip file using php
            112305 by: Rahul
            112307 by: Matt Schroebel
            112309 by: Rudolf Visagie

    radio value
            112308 by: adi
            112363 by: Mike Mannakee

    question concerning php parsing
            112310 by: Randy Johnson
            112326 by: Analysis & Solutions

    Re: $HTTP_SESSION_VARS vs $_SESSION - cont.
            112311 by: Petre Agenbag
            112324 by: Analysis & Solutions
            112336 by: Rasmus Lerdorf
            112375 by: Rasmus Lerdorf

    PHP, XML and HTML-Tags
            112312 by: Bernard
            112325 by: Analysis & Solutions

    PHP 4.2.2 and Apache 2
            112313 by: MET
            112327 by: Aaron Gould
            112341 by: Rasmus Lerdorf
            112345 by: Aaron Gould

    Variable naming standards???
            112314 by: Gerard Samuel
            112315 by: Jay Blanchard
            112385 by: Nicholas Mercier
            112389 by: Pushkar Pradhan

    Re: Credit Card suggestions
            112316 by: César Aracena
            112332 by: Sascha Braun
            112335 by: Jim Dam
            112355 by: Robert Parker
            112356 by: Adam Voigt
            112360 by: Robert Parker
            112362 by: Adam Voigt
            112369 by: John S. Huggins
            112370 by: Adam Voigt
            112371 by: Richard Black
            112372 by: John S. Huggins
            112373 by: Analysis & Solutions
            112378 by: Robert Parker

    Sessions in a database?
            112317 by: Randy Johnson
            112374 by: Rasmus Lerdorf

    parse URL good syntaxe please
            112319 by: Christian Ista
            112321 by: lallous
            112322 by: Jim Dam
            112323 by: Christian Ista
            112328 by: Christian Ista
            112329 by: Jim Dam

    Extensions?
            112330 by: Php
            112334 by: Neil Freeman

    Re: Performance of ZLib
            112331 by: Sascha Braun
            112340 by: Sascha Braun
            112407 by: David T-G

    Re: image function
            112333 by: Sascha Braun
            112376 by: NoWhErEMan
            112411 by: Nicholas Mercier

    mailing list managers
            112337 by: Justin French
            112342 by: Miles Thompson
            112381 by: Manuel Lemos

    image creation class
            112338 by: Sascha Braun

    xls or csv files
            112339 by: M.E. Suliman

    DPHPEdit users - FORUM available
            112344 by: Davor Pleskina

    switch statement question
            112346 by: Alexander Ross
            112348 by: Jay Blanchard
            112358 by: DL Neil

    relocation
            112347 by: Christian Ista
            112350 by: Justin French
            112351 by: Daniel Kushner
            112352 by: [-^-!-%-
            112353 by: Richard Black

    PHP-Ebay Interface
            112349 by: Adam Voigt
            112361 by: Andrew Brampton

    Passing array to function
            112354 by: Bill Hudspeth
            112357 by: Ford, Mike [LSS]
            112368 by: Mike Mannakee

    requesting sites running OS X
            112359 by: Michael Geary
            112366 by: Andrew Brampton
            112391 by: Brent Baisley

    MD5 and Password Security?
            112364 by: John S. Huggins

    session.use_trans_sid question
            112365 by: Sean Brown
            112367 by: Rasmus Lerdorf

    PHP & Interbase 6.5
            112377 by: Jeroen Geusebroek

    Template and Replacement
            112380 by: Alex Shi
            112384 by: Bas Jobsen

    Bussiness Logic Date Problem
            112382 by: Collins, Robert
            112383 by: Rasmus Lerdorf

    Writing to a file that's not PHP_SELF
            112386 by: Kondwani Spike Mkandawire
            112397 by: Mike Dunlop

    I can't Install php with postgres!
            112387 by: Andrea Hernandez Alfaro

    Pls Help: Quickie: set_time_limit
            112388 by: Shane
            112390 by: Daniel Kushner

    Fixing timezone issues
            112392 by: H. Wade Minter
            112395 by: Rasmus Lerdorf
            112400 by: H. Wade Minter
            112402 by: Brian V Bonini
            112408 by: Rasmus Lerdorf

    cutting up a string
            112393 by: Hans
            112396 by: Rasmus Lerdorf

    count link clicks
            112394 by: victor.argilent.com
            112398 by: Rasmus Lerdorf
            112405 by: vic
            112409 by: Rasmus Lerdorf
            112412 by: vic
            112414 by: Rasmus Lerdorf
            112415 by: victor.argilent.com
            112416 by: Mike Dunlop
            112428 by: Dave at Sinewaves.net
            112429 by: vic
            112431 by: victor.argilent.com

    newbie array question
            112399 by: Alexander Ross
            112403 by: S.P. Telgenhof Oude Koehorst
            112406 by: Rasmus Lerdorf
            112413 by: S.P. Telgenhof Oude Koehorst
            112426 by: Bas Jobsen

    ini_set()
            112401 by: jacob.keystreams.com

    upgrading
            112404 by: Alex Shi

    [Followup] Exploding Zip Codes! (Using PHP's explode function)
            112410 by: Keith Posehn
            112419 by: Michael Geier

    Form Posting from script
            112417 by: GeneralX
            112418 by: Kevin Stone

    Need a Web Host for php/mySQl
            112420 by: Thomas Edison Jr.
            112421 by: Jim Jagielski
            112422 by: Alex Shi
            112425 by: Kevin Stone

    SQL datetime ERROR !
            112423 by: Djurovski Dejan
            112424 by: Djurovski Dejan
            112430 by: DL Neil

    Mysql connect through proxy
            112427 by: Daniel Masson

    File Upload size limit
            112432 by: Oliver Schönrock
            112436 by: Rasmus Lerdorf
            112439 by: Oliver Schönrock

    Web host withdraws support for PHP extensions - supposed secuity risks
            112433 by: Alan Hale
            112434 by: Rasmus Lerdorf

    Troubles with Classes
            112435 by: Jadiel Flores

    Storing objects in a session
            112437 by: Ron Dyck
            112438 by: Rasmus Lerdorf

    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:


    i have these arrays:

    $A_fruit_list = array('A1' => 'Fruit A1',
                          'A2' => 'Fruit A2',
                         );

    $B_fruit_list = array('B1' => 'Fruit B1',
                          'B2' => 'Fruit B2',
                         );

    then i do these:

    $var = "B";
    $var_list = $var."_fruit_list";

    //Note: variable variable below
    $fruit_array_of_choice = ${$var_list};
    $FRUIT_code => array_keys($fruit_array),
    $FRUIT_name => array_values($fruit_array),

    which generates these warnings:
    Warning: First argument to array_keys() should be an array in
    /home/httpd/vhost/home/fruits.php on line 14

    Warning: Argument to array_values() should be an array in
    /home/httpd/vhost/home/ureg/fruits.php on line 15

    how do i script around that ?

    --
    roger
    

    __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com

    attached mail follows:


    <snip> $A_fruit_list = array('A1' => 'Fruit A1', 'A2' => 'Fruit A2', );

    $B_fruit_list = array('B1' => 'Fruit B1', 'B2' => 'Fruit B2', );

    then i do these:

    $var = "B"; $var_list = $var."_fruit_list";

    //Note: variable variable below $fruit_array_of_choice = ${$var_list}; $FRUIT_code => array_keys($fruit_array), $FRUIT_name => array_values($fruit_array), </snip>

    Shouldn't the parameter to array_keys (and obviously array_values too) be $fruit_array_of_choice, and not just $fruit_array???

    That might stop the warnings...

    HTH,

    Richy ========================================== Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: rblackdatavisibility.co.uk

    attached mail follows:


    Um yes, well the issue is not learning it is time. I am on an assignment here for only 4 more months and I have another project to do. There is no point in starting from scratch.

    I will check the web sites you suggested.

    Paul

    Justin French wrote:

    > on 12/08/02 5:59 PM, Paul Dionne (PDionneSpeakeasy.net) wrote: > >> Good morning everyone! >> >> Our organization is in need of a Scheduling program for meeting rooms. >> The program doesn't need to be very complicated...five or six rooms, >> outputs a >> list of rooms available for the time the user enters. We would put it on >> our intranet. > > see below > >> We could also use a basic staff directory program: Outputs Name, >> Extension, >> email, position... maybe even a picture. We would put it on our web >> site. > > This is just a modification of a contact database. Nearly every PHP & > MySQL beginners tutorial starts with a simple contact database which you > can modify to suit. > > I'd really advise actually learning a bit of this stuff, rather than > grabbing something pre-built. End of the day, nothing will have *exactly* > the features you need (now, or the future), and learning a little about > the two languages will help you build the meeting room program, which no > harder to build than the contact database. > > I think phpbuilder.net, sitepoint.com, phpbeginner.com and a few others > are bound to have something you should use as a starting point. > > >> Lastly, we could use something to keep track of our workflow program >> otherwise referred to as a strategic plan. > > Workflow IS a more complex application. > > > Have a look around at places like sourceforge.net for simular > applications. Again, having a little bit of knowledge from your work with > contact database and meeting room schedules will help you to modify these > apps to suit.

    attached mail follows:


    Thanks for that rather handy!

    Does anyone know what the function set_var() does in template.inc in phplib? I persume it has something to do with the template system.....but thats as much as I have figured out!!

    I am going to replace the phplib template system with Smarty there is not a converter for this(wishful thinking! anything for an easy life)

    My boss set me this task before he went on holiday...I am sure he is bloody laghing his socks off right now! I wondered why he never bothered porting this for PHP4!

    Arrrrrrrrrrgh!

    John > > Anyone got any handy hints on how to convert scripts running > > on PHP3 and > > PHPlib? > > 1. Roughly speaking, page_open() goes to session_start(): > > Old: > page_open(array("sess" => "my_web_Session")); > > New: > session_start(); > > 2. page_close() goes away; if you don't have time to remove all those calls, > write your own page_close() function that simply returns true. > > 3. Use functions instead of methods for managing the session variables. For > example, for the object $sess created in step 1 above: > > Old: > $sess->register('firstName'); > > New: > session_register('firstName'); > > Brings back fond memories - not! ;) > > Kirk > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Hi, sets the value of the var to be parsed later.

    HTH

    Andrey

    ----- Original Message ----- From: "John Wards" <j.wardssportnetwork.net> To: <php-generallists.php.net> Sent: Tuesday, August 13, 2002 12:58 PM Subject: Re: [PHP] Php lib?

    > Thanks for that rather handy! > > Does anyone know what the function set_var() does in template.inc in phplib? > I persume it has something to do with the template system.....but thats as > much as I have figured out!! > > I am going to replace the phplib template system with Smarty there is not a > converter for this(wishful thinking! anything for an easy life) > > My boss set me this task before he went on holiday...I am sure he is bloody > laghing his socks off right now! I wondered why he never bothered porting > this for PHP4! > > Arrrrrrrrrrgh! > > John > > > Anyone got any handy hints on how to convert scripts running > > > on PHP3 and > > > PHPlib? > > > > 1. Roughly speaking, page_open() goes to session_start(): > > > > Old: > > page_open(array("sess" => "my_web_Session")); > > > > New: > > session_start(); > > > > 2. page_close() goes away; if you don't have time to remove all those > calls, > > write your own page_close() function that simply returns true. > > > > 3. Use functions instead of methods for managing the session variables. > For > > example, for the object $sess created in step 1 above: > > > > Old: > > $sess->register('firstName'); > > > > New: > > session_register('firstName'); > > > > Brings back fond memories - not! ;) > > > > Kirk > > > > -- > > 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:


    Again ta!

    I had sort of figured it out while waiting for someone to get back to me.....

    Mental note..must learn objects.....nooooooooo argh....

    John

    > Hi, > sets the value of the var to be parsed later. > > HTH > > Andrey > > ----- Original Message ----- > From: "John Wards" <j.wardssportnetwork.net> > To: <php-generallists.php.net> > Sent: Tuesday, August 13, 2002 12:58 PM > Subject: Re: [PHP] Php lib? > > > > Thanks for that rather handy! > > > > Does anyone know what the function set_var() does in template.inc in > phplib? > > I persume it has something to do with the template system.....but thats as > > much as I have figured out!! > > > > I am going to replace the phplib template system with Smarty there is not > a > > converter for this(wishful thinking! anything for an easy life) > > > > My boss set me this task before he went on holiday...I am sure he is > bloody > > laghing his socks off right now! I wondered why he never bothered porting > > this for PHP4! > > > > Arrrrrrrrrrgh! > > > > John > > > > Anyone got any handy hints on how to convert scripts running > > > > on PHP3 and > > > > PHPlib? > > > > > > 1. Roughly speaking, page_open() goes to session_start(): > > > > > > Old: > > > page_open(array("sess" => "my_web_Session")); > > > > > > New: > > > session_start(); > > > > > > 2. page_close() goes away; if you don't have time to remove all those > > calls, > > > write your own page_close() function that simply returns true. > > > > > > 3. Use functions instead of methods for managing the session variables. > > For > > > example, for the object $sess created in step 1 above: > > > > > > Old: > > > $sess->register('firstName'); > > > > > > New: > > > session_register('firstName'); > > > > > > Brings back fond memories - not! ;) > > > > > > Kirk > > > > > > -- > > > 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:


    Have you tried it like this?

    $output = `$executable $param`; $output = explode("\n",$output); print_r($output);

    It works for me! I get the same weird response as you when I try to create the array directly off of the system call.

    Good Luck, Shawn Sellars

    -----Original Message----- Essentially: $output = array (system("$executable $param")); print_r($output);

    attached mail follows:


    > -----Original Message----- > From: Michael Zornek [mailto:mikezornekmikezornek.com] > Sent: 13 August 2002 02:26 > > Ok so in my HTML I have: > > <img src="img/tab_1l.gif" width="9" height="24"> > <img src="img/home_on.gif" width="80" height="24"> > <img src="img/tab_10.gif" width="15" height="24">

    [....]

    > anyone know of a way to tell html to ignore these spaces?

    Well, the obvious one is HTML comments, since that's the way to tell HTML to ignore anything:

    <img src="img/tab_1l.gif" width="9" height="24"><!-- --><img src="img/home_on.gif" width="80" height="24"><!-- --><img src="img/tab_10.gif" width="15" height="24">

    Another technique I use quite a bit is newlines *inside* the HTML tags, thus:

    <img src="img/tab_1l.gif" width="9" height="24"><img src="img/home_on.gif" width="80" height="24"><img src="img/tab_10.gif" width="15" height="24">

    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:


    On Tue, 2002-08-13 at 02:29, Matt Babineau wrote: > <TABLE> > <TR> > <TD><IMG SRC="/images/image.gif"></TD> > <TD><IMG SRC="/images/image.gif"></TD> > <TD><IMG SRC="/images/image.gif"></TD> > <TD><IMG SRC="/images/image.gif"></TD> > </TR> > </TABLE>

    Which leads to other "mysterious" gaps (that are again part of the HTML spec), the fix is provided here:

    http://developer.netscape.com/evangelism/docs/articles/img-table/

    James

    attached mail follows:


    Try adding border="0" to each one. Some browsers would render your code as is without spaces, some will not. They are all supposed render it without spaces, and I think all the latest versions of the browser do. It's the older ones you have to worry about. Also, do you have a DOCTYPE declaration as your first line in all your documents? If you don't, then even the newer browsers will fall back into compatible mode, which usually means "supporting" the bugs that existed in older versions.

    Check out www.alistapart.com, www.webmonkey.com, or www.webreference.com for info on DOCTYPE and style sheets. I do remember reading an article specifically discussing the problem you are experiencing.

    On Monday, August 12, 2002, at 09:26 PM, Michael Zornek wrote:

    > Ok so in my HTML I have: > > <img src="img/tab_1l.gif" width="9" height="24"> > <img src="img/home_on.gif" width="80" height="24"> > <img src="img/tab_10.gif" width="15" height="24"> > > but because they are on separate lines with spaces, I get spaces > rendered on > the screen. If I write the code like: > > <img src="img/tab_1l.gif" width="9" height="24"><img > src="img/home_on.gif" > width="80" height="24"><img src="img/tab_10.gif" width="15" height="24"> > > I get no spaces but it's harder to read .... > > anyone know of a way to tell html to ignore these spaces? > > I could in theory do something like this in PHP: > > $buffer .= ' > <img src="img/tab_1l.gif" width="9" height="24"> > <img src="img/home_on.gif" width="80" height="24"> > <img src="img/tab_10.gif" width="15" height="24"> > '; > > $buffer = someFunction($buffer); > // this function kills all spaces and new lines in between ">" and "<" > chars > > but it seems like kind of a hassle for readability. > > Please help. > > ~ Mike > -- > Mike Zornek | Project Leader > Apple Student Developers > The Insanely Great Site with the Insanely Long URL > http://www.applestudentdevelopers.org > > Personal Site: > http://www.mikezornek.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    --
    Brent Baisley
    Systems Architect
    Landover Associates, Inc.
    Search & Advisory Services for Advanced Technology Environments
    p: 212.759.6400/800.759.0577
    

    attached mail follows:


    hy, I have a list menu:

    <select name="select"> <option value="one">one</option> <option value="two">two</option> <option value="three">three</option> </select>

    I want when I select value "two" my page reloads and it prints "You selected value TWO". How can I do this?

    thx kale.

    attached mail follows:


    It's a javascript thing. Try the newsgroup comp.lang.javascript

    Justin French

    on 13/08/02 8:13 PM, kale (kaleonardohome.ro) wrote:

    > hy, > I have a list menu: > > <select name="select"> > <option value="one">one</option> > <option value="two">two</option> > <option value="three">three</option> > </select> > > I want when I select value "two" my page reloads and > it prints "You selected value TWO". > How can I do this? > > thx > kale. >

    attached mail follows:


    Hy,

    Save this script as select.php

    <?PHP

    if (!isset($action)) { $action = "select"; }

    if ($action == "select" ) { ?> <form method="post" action="select.php"> <select name="select" onChange="this.form.submit()"> <option value="one">one</option> <option value="two">two</option> <option value="three">three</option> </select> <input type="hidden" name="action" value="display"> </form> <? }

    if ($action == "display") { ?> You selected value <?=$select?> <? }

    ?>

    Greetings Peter

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

    "Kale" <kaleonardohome.ro> schreef in bericht news:00aa01c242b2$1dc496b0$7800a8c0leonard... hy, I have a list menu:

    <select name="select"> <option value="one">one</option> <option value="two">two</option> <option value="three">three</option> </select>

    I want when I select value "two" my page reloads and it prints "You selected value TWO". How can I do this?

    thx kale.

    attached mail follows:


    On Tue, 2002-08-13 at 11:35, Peter Bottenberg wrote: > Hy, > > Save this script as select.php > > <?PHP

    -> $action = $_POST["action"];

    > if (!isset($action)) > { > $action = "select"; > }

    [ snip rest ]

    Sorry, but the PHP irc channel is full of people asking why form variables can't be seen by PHP for this reason.

    James

    attached mail follows:


    hy, I have next lines of code: 1. <form method="post" action="leadview.php"> <select name="viewleads" onChange="this.form.submit(viewleads)"> <option value="AOL">All Open Leads</option> <option value="MUL">My Unread Leads</option> <option value="RVL">Recently Viewed Leads</option> <option value="TL">Today's Leads</option> </select> </form> 2. <form method="post" action="<?"$PHP_SELF"?>"> <div align="right"><font face="Tahoma" size="1">Select One:</font> <select name="keyleads" onChange="this.form.submit()"> <option value="My Unread Leads"<?if($keyleads=="My Unread Leads"){ print "selected";}?>>My Unread Leads</option> <option value="Recently Created"<?if($keyleads=="Recently Created"){ print "selected";}?>>Recently Created</option> <option value="Recently Viewed"<?if($keyleads=="Recently Viewed"){ print "selected";}?>>Recently Viewed</option> </select> </div> </form>

    both forms are in same page. second form it works fine without problems. first form it works with one exception. If select "All Open Leads" don't happend anything For rest of values it works. For example if select "My Unread Leads" I see page leadview.php. What is it wrong?

    kale

    ----- Original Message ----- From: "Peter Bottenberg" <petere-factory.nl> To: <php-generallists.php.net> Sent: Tuesday, August 13, 2002 1:35 PM Subject: [PHP] Re: controls "list menu"

    > Hy, > > Save this script as select.php > > <?PHP > > if (!isset($action)) > { > $action = "select"; > } > > if ($action == "select" ) > { > ?> > <form method="post" action="select.php"> > <select name="select" onChange="this.form.submit()"> > <option value="one">one</option> > <option value="two">two</option> > <option value="three">three</option> > </select> > <input type="hidden" name="action" value="display"> > </form> > <? > } > > if ($action == "display") > { > ?> > You selected value <?=$select?> > <? > } > > ?> > > Greetings > Peter

    attached mail follows:


    On Tue, 2002-08-13 at 02:55, Huy wrote: > But I do... > > If I left out the require statement.... all is well.. or I copy the whole > content of the included file.. it works fine. The problem is the require > statement.

    Check the file for whitespace, anything outside ?>..<?php or spaces/blank lines above your first <?php in any of your files.

    James.

    attached mail follows:


    Thanks,

    I thought I checked that already. Obviously, I use notepad in Win2000 to edit the files, and save them as Unicode file, which Notepad put some characters at the beginning of the file. Only when I use another editor was I able to see those strange characters. After deleting them, the require statement works fine. Again, thanks for the help. :)

    "James Green" <jgcyberstorm.demon.co.uk> wrote in message news:1029235214.5787.5.camelcyberstorm.jmkg.claranet.co.uk... > On Tue, 2002-08-13 at 02:55, Huy wrote: > > But I do... > > > > If I left out the require statement.... all is well.. or I copy the whole > > content of the included file.. it works fine. The problem is the require > > statement. > > Check the file for whitespace, anything outside ?>..<?php or > spaces/blank lines above your first <?php in any of your files. > > James. > >

    attached mail follows:


    Huy,

    Use Editplus, or something similar, not Notepad. Costs $45 and makes your work *much* easier.

    Miles

    At 08:41 AM 8/13/2002 -0700, Huy wrote: >Thanks, > >I thought I checked that already. Obviously, I use notepad in Win2000 to >edit the files, and save them as Unicode file, which Notepad put some >characters at the beginning of the file. Only when I use another editor was >I able to see those strange characters. After deleting them, the require >statement works fine. Again, thanks for the help. :) > >"James Green" <jgcyberstorm.demon.co.uk> wrote in message >news:1029235214.5787.5.camelcyberstorm.jmkg.claranet.co.uk... > > On Tue, 2002-08-13 at 02:55, Huy wrote: > > > But I do... > > > > > > If I left out the require statement.... all is well.. or I copy the >whole > > > content of the included file.. it works fine. The problem is the require > > > statement. > > > > Check the file for whitespace, anything outside ?>..<?php or > > spaces/blank lines above your first <?php in any of your files. > > > > James. > > > > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    On Tue, 2002-08-13 at 05:04, Jean-Christian Imbeault wrote: > I'm using Netscape 6.2 and whenever I load one of my .php files I can't > get Netscape to "show source". I don't have that problem with IE. > > Can anyone tell me how to configure Netscape so that I can view the HTML > output of my PHP files?

    You may be seeing a problem that affected Mozilla prior to 1.0 release. When it got a page as a result of a POST it wouldn't cache the result to disk, which is where the View Source got it's data from. Something like this may be affecting you.

    Try it with Netscape 7 or Mozilla 1.0.

    James

    attached mail follows:


    Hello,

    I'd like to use session variable.

    I do that (see below) but I receive an error. Other question, how can I do to know if a session variable is already defined ?

    <?php session_start()?> <?php$_SESSION["LG"] = 'EN';?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title><title> </head> <body> </body> </html>

    But I receive this error : Parse error: parse error, unexpected T_VARIABLE in d:\inetpub\wwwroot\test\index.php on line 2

    thanks, Christian,

    attached mail follows:


    On Tue, 13 Aug 2002, Christian Ista wrote:

    > <?php$_SESSION["LG"] = 'EN';?>

    Add a missing space.

    <?php $_SESSION["LG"] = 'EN';?>

    -- 
    Mika Tuupola                      http://www.appelsiini.net/~tuupola/
    

    attached mail follows:


    > Add a missing space. > ok thanks :)

    How use this variable in a query (mysql_query) ?

    Is it possible if a session variable is already defined ?

    Bye

    attached mail follows:


    Sorry to bother folks again but I have a few phplib questions again.

    set_file() what does this do and would this be display() in smarty?

    set_block() this one is baffeling me...can't think what it woudl be in smarty!

    parse() now is this display in smarty...oh me head...

    p() argh is this display()!!

    Thanks for any help!

    John

    attached mail follows:


    Hello!

    I have a question:

    In my PHP-script i have created a function with many calculation and variables in the function.

    example: function testfunc($var1,$var2) { ...many calculation and variables return $result; }

    When i call the function they will work correktly - no errors, no warnings.

    Just when i call the function 15 times in serial

    example: echo testfunc(100,200); echo testfunc(100,200); echo testfunc(100,200); . . . echo testfunc(100,200);

    then on call number 12 the script exits whith error-message: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 257 bytes) in /home/www/linkdir/oslib.php on line 203

    And now my question: When i call a function and the function come to an end - is PHP not giving free the allocated memorie for this funktion?

    Must i giving free the memory at hand?

    When i in the function before its end give all vars free with unset(); then the error also comes on the same place.

    How can i find out on which place i must modify my code that the error not appear?

    Can i "unset()" a complete function on his end?

    What can i do?

    Greethings Oliver Gehring Germany (please sorry for my bad english)

    attached mail follows:


    Hello,

    In some language (like Java, C#, ...) you can find a hashtable.

    I execute query, this query return some records, each records are composed by 2 fields. I'd like to put these records in a 2 dimensions array (or something like that) and find easily the records I want.

    An example, the query return (field1/field2):

    mytext1 / "text for my text 1" mytext2 / "text for my text 2" mytext3 / "text for my text 3" mytext4 / "text for my text 4"

    I'd like to put that in an array, but not find the text by myarray[2], myarray[4] but by myarray['mytext2'], ['mytext2'] have to return "text for my text 2"

    Possible to do that ?

    Bye

    attached mail follows:


    Yes, PHP support indexing by strings and not only numbers/indexes.

    $myarray['elias'] = 'PHP rulez!';

    echo $myarray['elias'];

    "Christian Ista" <christian.istateledisnet.be> wrote in message news:20020813120929.33453.qmailpb1.pair.com... > Hello, > > In some language (like Java, C#, ...) you can find a hashtable. > > I execute query, this query return some records, each records are composed > by 2 fields. I'd like to put these records in a 2 dimensions array (or > something like that) and find easily the records I want. > > An example, the query return (field1/field2): > > mytext1 / "text for my text 1" > mytext2 / "text for my text 2" > mytext3 / "text for my text 3" > mytext4 / "text for my text 4" > > I'd like to put that in an array, but not find the text by myarray[2], > myarray[4] but by myarray['mytext2'], ['mytext2'] have to return "text for > my text 2" > > Possible to do that ? > > Bye > > >

    attached mail follows:


    This is offtopic guestion but i need help.

    Please help me, does anyone know how to export shares folders and files and his permissions in Windows NT4.0 or Windows 2000 to txt files automaticaly

    Thank you very much

    Roman

    attached mail follows:


    Hi

    I want to create a zip file using php. Can this be done?

    If anybody has a code snippet, for this, or any guidelines, please send it to me.

    Rahul

    attached mail follows:


    > From: Rahul [mailto:rahuljcybage.com] > Sent: Tuesday, August 13, 2002 8:41 AM > To: php-generallists.php.net > Subject: [PHP] Creating a zip file using php > > > Hi > > I want to create a zip file using php. Can this be done? > > If anybody has a code snippet, for this, or any guidelines, > please send it > to me.

    Try reading the manual about zip files, especially the user notes.

    attached mail follows:


    The following zip creation class by Eric Mueller works well:

    <?php

    /*

    Zip file creation class makes zip files...

    use the functions add_dir() and add_file() to build the zip file; see example code below

    by Eric Mueller, ericthemepark.com, http://www.themepark.com

    BASED ON "zip file creation class" FOUND AT http://www.zend.com/codex.php?id=470&single=1 BY denis125 (webmasteratlant.ru)

    */

    // official ZIP file format: http://www.pkware.com/appnote.txt

    class zipfile {

    var $datasec = array(); // array to store compressed data var $ctrl_dir = array(); // central directory var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00"; //end of Central directory record var $old_offset = 0;

    function add_dir($name)

    // adds "directory" to archive - do this before putting any files in directory! // $name - name of directory... like this: "path/" // ...then you can add files using add_file with names like "path/file.txt" { $name = str_replace("\\", "/", $name);

    $fr = "\x50\x4b\x03\x04"; $fr .= "\x0a\x00"; // ver needed to extract $fr .= "\x00\x00"; // gen purpose bit flag $fr .= "\x00\x00"; // compression method $fr .= "\x00\x00\x00\x00"; // last mod time and date

    $fr .= pack("V",0); // crc32 $fr .= pack("V",0); //compressed filesize $fr .= pack("V",0); //uncompressed filesize $fr .= pack("v", strlen($name) ); //length of pathname $fr .= pack("v", 0 ); //extra field length $fr .= $name; // end of "local file header" segment

    // no "file data" segment for path

    // "data descriptor" segment (optional but necessary if archive is not served as file) $fr .= pack("V",$crc); //crc32 $fr .= pack("V",$c_len); //compressed filesize $fr .= pack("V",$unc_len); //uncompressed filesize

    // add this entry to array $this -> datasec[] = $fr;

    $new_offset = strlen(implode("", $this->datasec));

    // ext. file attributes mirrors MS-DOS directory attr byte, detailed

    // at http://support.microsoft.com/support/kb/articles/Q125/0/19.asp

    // now add to central record $cdrec = "\x50\x4b\x01\x02"; $cdrec .="\x00\x00"; // version made by $cdrec .="\x0a\x00"; // version needed to extract $cdrec .="\x00\x00"; // gen purpose bit flag $cdrec .="\x00\x00"; // compression method $cdrec .="\x00\x00\x00\x00"; // last mod time & date $cdrec .= pack("V",0); // crc32 $cdrec .= pack("V",0); //compressed filesize $cdrec .= pack("V",0); //uncompressed filesize $cdrec .= pack("v", strlen($name) ); //length of filename $cdrec .= pack("v", 0 ); //extra field length $cdrec .= pack("v", 0 ); //file comment length $cdrec .= pack("v", 0 ); //disk number start $cdrec .= pack("v", 0 ); //internal file attributes $ext = "\x00\x00\x10\x00"; $ext = "\xff\xff\xff\xff"; $cdrec .= pack("V", 16 ); //external file attributes - 'directory' bit set

    $cdrec .= pack("V", $this -> old_offset ); //relative offset of local header $this -> old_offset = $new_offset;

    $cdrec .= $name; // optional extra field, file comment goes here // save to array $this -> ctrl_dir[] = $cdrec;

    }

    function add_file($data, $name)

    // adds "file" to archive // $data - file contents // $name - name of file in archive. Add path if your want

    { $name = str_replace("\\", "/", $name); //$name = str_replace("\\", "\\\\", $name);

    $fr = "\x50\x4b\x03\x04"; $fr .= "\x14\x00"; // ver needed to extract $fr .= "\x00\x00"; // gen purpose bit flag $fr .= "\x08\x00"; // compression method $fr .= "\x00\x00\x00\x00"; // last mod time and date

    $unc_len = strlen($data); $crc = crc32($data); $zdata = gzcompress($data); $zdata = substr( substr($zdata, 0, strlen($zdata) - 4), 2); // fix crc bug $c_len = strlen($zdata); $fr .= pack("V",$crc); // crc32 $fr .= pack("V",$c_len); //compressed filesize $fr .= pack("V",$unc_len); //uncompressed filesize $fr .= pack("v", strlen($name) ); //length of filename $fr .= pack("v", 0 ); //extra field length $fr .= $name; // end of "local file header" segment // "file data" segment $fr .= $zdata;

    // "data descriptor" segment (optional but necessary if archive is not served as file) $fr .= pack("V",$crc); //crc32 $fr .= pack("V",$c_len); //compressed filesize $fr .= pack("V",$unc_len); //uncompressed filesize

    // add this entry to array $this -> datasec[] = $fr;

    $new_offset = strlen(implode("", $this->datasec));

    // now add to central directory record $cdrec = "\x50\x4b\x01\x02"; $cdrec .="\x00\x00"; // version made by $cdrec .="\x14\x00"; // version needed to extract $cdrec .="\x00\x00"; // gen purpose bit flag $cdrec .="\x08\x00"; // compression method $cdrec .="\x00\x00\x00\x00"; // last mod time & date $cdrec .= pack("V",$crc); // crc32 $cdrec .= pack("V",$c_len); //compressed filesize $cdrec .= pack("V",$unc_len); //uncompressed filesize $cdrec .= pack("v", strlen($name) ); //length of filename $cdrec .= pack("v", 0 ); //extra field length $cdrec .= pack("v", 0 ); //file comment length $cdrec .= pack("v", 0 ); //disk number start $cdrec .= pack("v", 0 ); //internal file attributes $cdrec .= pack("V", 32 ); //external file attributes - 'archive' bit set

    $cdrec .= pack("V", $this -> old_offset ); //relative offset of local header // echo "old offset is ".$this->old_offset.", new offset is $new_offset<br>"; $this -> old_offset = $new_offset;

    $cdrec .= $name; // optional extra field, file comment goes here // save to central directory $this -> ctrl_dir[] = $cdrec; }

    function file() { // dump out file $data = implode("", $this -> datasec); $ctrldir = implode("", $this -> ctrl_dir);

    return $data. $ctrldir. $this -> eof_ctrl_dir. pack("v", sizeof($this -> ctrl_dir)). // total # of entries "on this disk" pack("v", sizeof($this -> ctrl_dir)). // total # of entries overall pack("V", strlen($ctrldir)). // size of central dir pack("V", strlen($data)). // offset to start of central dir "\x00\x00"; // .zip file comment length } }

    ?> Example <?php $zipfile = new zipfile();

    $zipfile -> add_dir("dir/");

    $filedata = "read your file into filedata"; $zipfile -> add_file($filedata, "dir/file.txt");

    header("Content-type: application/octet-stream"); header("Content-disposition: attachment; filename=test.zip"); echo $zipfile -> file();

    // note that instead of doing header/echo, you could use fopen/fwrite/fclose to write the .zip file to disk...

    ?>

    -----Original Message----- From: Rahul [mailto:rahuljcybage.com] Sent: Tuesday, August 13, 2002 2:41 PM To: php-generallists.php.net Subject: [PHP] Creating a zip file using php

    Hi

    I want to create a zip file using php. Can this be done?

    If anybody has a code snippet, for this, or any guidelines, please send it to me.

    Rahul

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

    attached mail follows:


    hi: i have 2 file: file1.php, file2.php in file2.php i have: .... echo "<form name='popupform' > echo "<input type=text name=cod value='$cod'>&nbsp"; echo "Alege sistemul: <input type=button name=choice value='alege' onClick=window.open('file1.php','popuppage','width=450, height=400,top=100,left=100,scrollbars=yes');><br>"; echo "</form>"; .....

    in file1.php: ..... <!-- Begin function sendValue(s){ //var selvalue = s.options[s.selectedIndex].value; var selvalue = s; window.opener.document.popupform.cod.value = selvalue; window.close(); } // End --> </script> </HEAD> <BODY>

    <center> <form name=selectform> echo "<input type='radio' value='1' name='selectmenu'>"; echo "<input type='radio' value='2' name='selectmenu'>"; echo "<input type='radio' value='3' name='selectmenu'>"; <input type=button value="select" onClick="sendValue(this.form.selectmenu.value);"> </form> ......

    Problem is with radio group value. I select an item in radiogroup box, and when i click on select button, value passed to "cod" textbox is undefined. How to make "cod.value" to take selected radio value? tx in adv for any help adi

    attached mail follows:


    Your problem is a JavaScript one, not php. Your variable - 'selvalue' is only defined within the function. Define it globally outside the function. Trouble is it currently looks like the variable doesn't exist by the time the function exits. See if that works.

    Mike

    "Adi" <adipublichome.ro> wrote in message news:003001c242c7$d0df85b0$9600a8c0adi... hi: i have 2 file: file1.php, file2.php in file2.php i have: .... echo "<form name='popupform' > echo "<input type=text name d value='$cod'>&nbsp"; echo "Alege sistemul: <input type tton name oice value='alege' onClick=window.open('file1.php','popuppage','widthE0, height0,top0,left0,scrollbars=yes');><br>"; echo "</form>"; .....

    in file1.php: ..... <!-- Begin function sendValue(s){ file://var selvalue = s.options[s.selectedIndex].value; var selvalue = s; window.opener.document.popupform.cod.value = selvalue; window.close(); } // End --> </script> </HEAD> <BODY>

    <center> <form name=selectform> echo "<input type='radio' value='1' name='selectmenu'>"; echo "<input type='radio' value='2' name='selectmenu'>"; echo "<input type='radio' value='3' name='selectmenu'>"; <input type tton value="select" onClick="sendValue(this.form.selectmenu.value);"> </form> ......

    Problem is with radio group value. I select an item in radiogroup box, and when i click on select button, value passed to "cod" textbox is undefined. How to make "cod.value" to take selected radio value? tx in adv for any help adi

    attached mail follows:


    if i have functions.php with 10 functions in it and include the file in my main php file and call 1 of the 10 functions in my program does the whole functions.php have to be parsed or does it just include the function that is needed.

    I am just curious as I plan to use the phpa on my scripts and if I don't need all those functions to be in memory just the function that i call.

    Hope i did not confuse anybody.

    Randy

    attached mail follows:


    On Tue, Aug 13, 2002 at 09:22:47AM -0400, Randy Johnson wrote: > if i have functions.php with 10 functions in it and include the file in my > main php file and call 1 of the 10 functions in my program does the whole > functions.php have to be parsed or does it just include the function that is > needed.

    The entire included file is parsed into memory.

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


    Rasmus OK, I think I understand the principle now, yet, when I implement id, my app still fails. I have register_golbals = on, BUT, I want to find a way to code that I know will always work, regardless of register_globals or cookies, so that I am only dependant on the trans-sid ( but If I could rule that out too, it would be even better)

    How do you write your apps so you know that they will work on most configurations? I have a bunch of older apps that will definately break if I upgrade the server and turn register_globals off, and I want to prevent it from happening with new apps I write now.

    With what you said below, can I assume that: 1) If I know all the variables that I will need to be session variables, I can session_register() them all on the first page, and then simply give them values during the normal flow of the app?

    I have tried to implement what you said below in my app as follow, basically the route is: Login form --> action page: action page links to another form page form page --> action page

    All these pages are supposed to be part of the session, but between the last two pages, the session disappears, and the form doesn't pass variables...

    I'm so utterly fed-up with myself for not being able to get this right. Can you see ANYTHING that might cause this?

    index.php <?php session_start(); ?>

    <form name="form1" method="post" action="admin_select.php"> <table border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#CFCFCF"> <td colspan="2">Admin Login </td> </tr> <tr> <td>Username: </td> <td><input type="text" name="user_name" > </td> </tr> <tr> <td>Password: </td> <td><input type="text" name="pass_word" > </td> </tr> <tr> <td> <input type="submit" name="Submit4" value="Submit"> </td> </tr> </table> </form>

    Then: admin_select.php

    <?php session_start(); if ((!$HTTP_SESSION_VARS["username"]) && (!$HTTP_SESSION_VARS["password"])) { session_register("username","password"); } if (($HTTP_POST_VARS["user_name"]) && ($HTTP_POST_VARS["pass_word"])) {

    $username = $HTTP_POST_VARS["user_name"]; $password = $HTTP_POST_VARS["pass_word"];

    } /* Not sure if my logic above works, trying to check if the person is coming back via a link or from the from for the first time; I'm not sure what could happen if you session_register a variable twice??? */

    $link = mysql_connect("localhost",$username,$password) or die ('Could not connect!'); mysql_select_db("mafisa",$link); $sql = "select * from project_table order by id"; $result = mysql_query($sql); ?> <form action="admin_select_document.php" method="POST" enctype="multipart/form-data"> <table border="1"> <tr> <td colspan="2" bgcolor="CFCFCF">Admin Interface</td> </tr> <tr> <td colspan="2">Please select Project to work with</td> </tr> <tr> <td colspan ="2"> <?php if (mysql_num_rows($result)) { echo "<select name=\"sess_id_project\">"; while ($myrow = mysql_fetch_assoc($result)) { $sess_project_name = $myrow["project_name"]; $sess_project_id = $myrow["id"]; echo '<option value="'.$sess_project_id.'">'.$sess_project_name; } echo '</select>'; echo '</td>'; echo '</tr>'; echo '<tr>'; echo '<td colspan="2"><input type="submit" name="submit" value="Go!"></td>'; echo '</tr>'; echo '</form>'; } else { echo '<b><i>There are currently no Projects on the system,'; echo 'please use the section below to add one</i></b>'; echo '</td>'; echo '</tr>'; echo '</form>'; }

    echo '<tr><td colspan="2" bgcolor="000000"></td></tr>

    <tr> <td colspan="2" bgcolor="CFCFCF"><a href="admin_add_project.php">Add a new Project</a></td> </tr>

    </table>';

    ?>

    This second page has two routes to go, either you select the document from the drop_down, or you can "add a new project", It is with the second route that I pick up further problems:

    admin_add_project.php

    <?php session_start(); echo ' <form action="admin_add_project_do.php" method="POST" enctype="multipart/form-data"> <table> <tr> <td colspan="2" bgcolor="CFCFCF">Mafisa Admin Interface</td> </tr> <tr> <td>New Project Name</td> <td><input type="text" name="project_name_add"></td> </tr> <tr> <td>Project Descriptions</td> <td><textarea name="project_description_add"></textarea></td> </tr> <tr> <td colspan="2"><input type="submit" name="submit" value="Save"></td> </tr> </table> </form> '; ?>

    Now, on this last page that is supposed to insert the form data into the db, there is simply no form data, or session variables!!!!!

    admin_add_project_do.php <?php session_start(); $date = date('Y-m-d'); $link = mysql_connect('localhost',$HTTP_SESSION_VARS["username"],$HTTP_SESSION_VARS["password"]) or die ('Could not connect!'); mysql_select_db('mafisa',$link); $project_name_db = addslashes($HTTP_POST_VARS["project_name_add"]); $project_description_db = addslashes($HTTP_POST_VARS["project_description_add"]); $sql = "insert into project_table (project_name,project_description,date) values ('$project_name_db','$project_description_db','$date')"; $result = mysql_query($sql); echo 'Thank you, new project :: <b><i>'.$project_name_db.'</i></b> was added to the system. <br> <a href="admin_select.php">Back</a><br>'; ?>

    I really appreciate your time, and thanks in advance for your help.

    On Mon, 2002-08-12 at 22:44, Rasmus Lerdorf wrote: > No, you don't need to use HTTP_SESSION_VARS for anything if > register_globals is on. Sessions are very simple. You start a session, > and you register variables to be part of that session. Like this: > > session_start(); > session_register('a'); > session_register('b'); > > If you have that at the top of the first page, then whatever values $a and > $b have by the time the script finishes is what will be written to the > session backend. > > So, on a subsequent page you just do: > > session_start(); > > This will see the session ID that the browser passed to it either via a > cookie or in the URL and it will go and restore the variables from the > session backend. That means that at this point you can just do: > > echo $a; > echo $b; > > At no point is there any need for $HTTP_SESSION_VARS nor $_SESSION if you > are sure that register_globals will always be on. > > Now, if you want it to work with register_globals off, you still don't > need to use $HTTP_SESSION_VARS when setting the variables, you only need > to use it when retrieving them. So, instead of echo $a and echo $b you > would have: > > echo $HTTP_SESSION_VARS['a']; > echo $HTTP_SESSION_VARS['b']; > > Or, of course in newer PHP's you can use $_SESSION['a']. > > Your stuff probably didn't work because you were setting the session vars > via the $HTTP_SESSION_VARS array. That works now, but it probably didn't > use to as it is a bit of a weird way to do it. > > -Rasmus > > On 12 Aug 2002, Petre Agenbag wrote: > > > You lost me there... > > Are you saying I don't need to access those variable in that way? > > Can I simply use $variable in successive pages then? > > Surely I MUST use that notation to assign values then right?, specially > > to the session vars, right? > > > > But, just out of curiosity, why does it work fine on my newer system? > > > > Thanks > > > > On Mon, 2002-08-12 at 21:17, Rasmus Lerdorf wrote: > > > If register_globals is known to be on, why are you worrying about > > > the $HTTP_* arrays? > > > > > > On 12 Aug 2002, Petre Agenbag wrote: > > > > > > > Hi > > > > Me again > > > > > > > > Still having problems with forms not sending variables, and session > > > > variables dissapearing. > > > > > > > > I have 2 systems, one older 4.0.3 PHP which is my main webserver, so all > > > > scripts must comply with it... > > > > And the other my development server with the latest 4.1.2 > > > > > > > > So, I'm trying to write scripts that will happily work on both, and I > > > > understand that I must use HTTP_POST_VARS and HTTP_SESSION_VARS in order > > > > to comply with 4.0.3. > > > > > > > > register_globals and track_vars as well as trans_sid are enabled on > > > > both. > > > > > > > > Now, take a look at the example below: > > > > index.php > > > > > > > > <form action="page2.php" method="POST" > > > > > <input type="text" name="test"><input type="submit" name="submit"> > > > > </form> > > > > > > > > > > > > page2.php > > > > > > > > <?php > > > > session_start(); > > > > echo ' HTTP_POST_VARS :'.$HTTP_POST_VARS["test"].'<br>'; > > > > echo ' POST_VARS: '.$_POST["test"].'<br>'; > > > > echo ' normal test :'.$test.'<br>'; > > > > echo 'Session Value (only for > > > > re-entry):'.$HTTP_SESSION_VARS["testing"].'<br>'; > > > > > > > > if ($HTTP_POST_VARS["test"]) { > > > > $HTTP_SESSION_VARS["testing"] = $HTTP_POST_VARS["test"]; > > > > } > > > > echo '<a href="page3.php">Click</a>'; > > > > ?> > > > > > > > > page3.php > > > > > > > > <?php > > > > session_start(); > > > > echo 'Session Variable:'.$HTTP_SESSION_VARS["testing"].'<br>'; > > > > echo '<a href="page4.php">Forward to test sess var further</a><br>'; > > > > echo '<a href="page2.php">Back to test sess var</a><br>'; > > > > ?> > > > > > > > > page4.php > > > > > > > > <?php > > > > session_start(); > > > > echo 'Session Variable:'.$HTTP_SESSION_VARS["testing"].'<br>'; > > > > echo '<a href="page3.php">Back to page 3 to test sess var > > > > further</a><br>'; > > > > echo '<a href="page2.php">Back to page 2 to test sess var</a><br>'; > > > > ?> > > > > > > > > This small test works 100% on my newer system, and I was under the > > > > impression that I coded it to be backwards compatible with my older > > > > system, BUT, > > > > > > > > look here: http://www.linuxhelp.co.za/session_test to see what it does > > > > on my working server. The scripts are identical. > > > > > > > > Please can you point out my mistakes in reasoning? > > > > > > > > Also, I want these scripts to work regardless of cookies, so if you see > > > > something that might cause problems when ppl disable cookies, plz > > > > advise. > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > >

    attached mail follows:


    Petre:

    On Tue, Aug 13, 2002 at 03:18:42PM +0200, Petre Agenbag wrote: > > I have register_golbals = on, BUT, I want to find a way to code that I > know will always work, regardless of register_globals or cookies, so > that I am only dependant on the trans-sid ( but If I could rule that out > too, it would be even better)

    This example assumes the machine is running PHP >= 4.1.0 allowing use of $_SESSION rather than $HTTP_SESSION_VARS. Adjust as needed.

    session_start();

    if ( !isset($SessionID) ) { # This likely means that register globals is off. # So, loop through the session vars and create regular vars. while ( list($Key, $Val) = each($_SESSION) ) { $$Key = $Val; } }

    Enjoy,

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


    No real reason to start the session in index.php. You are not registering any session vars, nor are you accessing any.

    > index.php > <?php > session_start(); > ?> > > <form name="form1" method="post" action="admin_select.php"> > <table border="0" cellspacing="0" cellpadding="0"> > <tr bgcolor="#CFCFCF"> > <td colspan="2">Admin Login > </td> > </tr> > <tr> > <td>Username: > </td> > <td><input type="text" name="user_name" > > </td> > </tr> > <tr> > <td>Password: > </td> > <td><input type="text" name="pass_word" > > </td> > </tr> > <tr> > <td> > <input type="submit" name="Submit4" value="Submit"> > </td> > </tr> > </table> > </form>

    Ok, now that we are in admin_select.php you can start the session, which you do.

    > Then: > admin_select.php > > <?php > session_start(); > if ((!$HTTP_SESSION_VARS["username"]) && > (!$HTTP_SESSION_VARS["password"])) { > session_register("username","password"); > } > if (($HTTP_POST_VARS["user_name"]) && ($HTTP_POST_VARS["pass_word"])) { > > $username = $HTTP_POST_VARS["user_name"]; > $password = $HTTP_POST_VARS["pass_word"]; > }

    Looks ok so far. Although I am not sure session_register() was able to take multiple args in 4.0.3. But you don't need the check. Nothing bad happens if you session_register() the same var twice.

    > $link = mysql_connect("localhost",$username,$password) or die > ('Could not connect!'); > mysql_select_db("mafisa",$link); > $sql = "select * from project_table order by id"; > $result = mysql_query($sql); > ?> > <form action="admin_select_document.php" method="POST" > enctype="multipart/form-data"> > <table border="1"> > <tr> > <td colspan="2" bgcolor="CFCFCF">Admin Interface</td> > </tr> > <tr> > <td colspan="2">Please select Project to work with</td> > </tr> > <tr> > <td colspan ="2"> > <?php > if (mysql_num_rows($result)) { > echo "<select name=\"sess_id_project\">"; > while ($myrow = mysql_fetch_assoc($result)) { > $sess_project_name = $myrow["project_name"]; > $sess_project_id = $myrow["id"]; > echo '<option > value="'.$sess_project_id.'">'.$sess_project_name; > } > echo '</select>'; > echo '</td>'; > echo '</tr>'; > echo '<tr>'; > echo '<td colspan="2"><input type="submit" name="submit" > value="Go!"></td>'; > echo '</tr>'; > echo '</form>'; > } else { > echo '<b><i>There are currently no Projects on the system,'; > echo 'please use the section below to add one</i></b>'; > echo '</td>'; > echo '</tr>'; > echo '</form>'; > } > > > echo '<tr><td colspan="2" bgcolor="000000"></td></tr> > > <tr> > <td colspan="2" bgcolor="CFCFCF"><a href="admin_add_project.php">Add > a new Project</a></td> > </tr> > > </table>'; > > ?>

    ok

    > This second page has two routes to go, either you select the document > from the drop_down, or you can "add a new project", It is with the > second route that I pick up further problems: > > admin_add_project.php > > <?php > session_start(); > echo ' > <form action="admin_add_project_do.php" method="POST" > enctype="multipart/form-data"> > <table> > <tr> > <td colspan="2" bgcolor="CFCFCF">Mafisa Admin Interface</td> > </tr> > <tr> > <td>New Project Name</td> > <td><input type="text" name="project_name_add"></td> > </tr> > <tr> > <td>Project Descriptions</td> > <td><textarea name="project_description_add"></textarea></td> > </tr> > <tr> > <td colspan="2"><input type="submit" name="submit" > value="Save"></td> > </tr> > </table> > </form> > '; > ?>

    Again, you don't register nor do you use any session vars in admin_add_project.php so there is no need to start the session.

    > Now, on this last page that is supposed to insert the form data into the > db, there is simply no form data, or session variables!!!!! > > admin_add_project_do.php > <?php > session_start(); > $date = date('Y-m-d'); > $link = > mysql_connect('localhost',$HTTP_SESSION_VARS["username"],$HTTP_SESSION_VARS["password"]) or die ('Could not connect!'); > mysql_select_db('mafisa',$link); > $project_name_db = > addslashes($HTTP_POST_VARS["project_name_add"]); > $project_description_db = > addslashes($HTTP_POST_VARS["project_description_add"]); > $sql = "insert into project_table > (project_name,project_description,date) values > ('$project_name_db','$project_description_db','$date')"; > $result = mysql_query($sql); > echo 'Thank you, new project :: > <b><i>'.$project_name_db.'</i></b> was added to the system. <br> > <a href="admin_select.php">Back</a><br>'; > ?>

    Looks ok. Is it only on 4.0.3 that this isn't working?

    Why don't you do this instead at the top of each page where you want to use the session vars:

    if(!ini_get('register_globals')) { extract($HTTP_SESSION_VARS); }

    Then just use plain $username and $password. See if that makes a difference. But you really should get your provider to upgrade to something a lot more recent than 4.0.3. Do you realize that 4.0.3 is almost 2 years old now? That's an eternity on the Web.

    -Rasmus

    attached mail follows:


    > while ( list($Key, $Val) = each($_SESSION) ) { > $$Key = $Val; > }

    extract($_SESSION) is a better way to do that.

    -Rasmus

    attached mail follows:


    Hi,

    I am using successfully the PHP XML-parser. But I have one problem. I like to include html tags into the texts and I don't want them to be interpreted by the parser. But I can't prevent it. It tried &lt; and &rt;, but they get interpreted as "<" and ">", and so I get an error message by the parser. I tried including the html stuff in comments, but then they are completely lost, which is of course normal behaviour. I tried quoting with backslash, e.g. \<p\>, but in vain as well.

    I would be very happy and thankful, if anybody could help me.

    Best wishes

    Bernard

    attached mail follows:


    On Tue, Aug 13, 2002 at 03:22:03PM +0200, Bernard wrote: > > I am using successfully the PHP XML-parser. But I have one problem. > I like to include html tags into the texts and I don't want them to be > interpreted by the parser.

    Have you tried putting the XML in CDATA sections? That's really where such things should be.

    http://www.w3.org/TR/2000/REC-xml-20001006#sec-cdata-sect

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


    So how stable are they? I'm not running a production server, but a development server. Everything coming off of this box goes directly to a production server.

    ~ Matthew

    /************************************************************** Matthew Metnetsky metuberstats.com **************************************************************/

    attached mail follows:


    We have been using PHP 4.2.1/4.2.2 with Apache 2.0.39 for a month on a development server with absolutely no problems at all.

    The PHP group has deemed Apache 2 support in 4.2.x as "experimental", but judging by its stability, a non-experimental release can't be more than a couple months away.

    --
    Aaron Gould
    agouldpartscanada.com
    Web Developer
    

    ----- Original Message ----- From: "MET" <metuberstats.com> To: "PHP-GENERAL" <php-generallists.php.net> Sent: Tuesday, August 13, 2002 9:55 AM Subject: [PHP] PHP 4.2.2 and Apache 2

    > So how stable are they? I'm not running a production server, but a > development server. Everything coming off of this box goes directly to > a production server. > > ~ Matthew > > > /************************************************************** > > Matthew Metnetsky > > metuberstats.com > > **************************************************************/ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Which OS, which extensions and how much load have you put it under? There are known thread safety issues in various libraries that you can link PHP against. And some of them are subtle.

    Did you know, for example, that libpq (the PostgreSQL client library) is threadsafe except for the case where you use CRYPT() in an SQL query. Good luck debugging that one.

    Personally I would not touch Apache 2, at least not with a threaded mpm, for quite a while.

    -Rasmus

    On Tue, 13 Aug 2002, Aaron Gould wrote:

    > We have been using PHP 4.2.1/4.2.2 with Apache 2.0.39 for a month on a > development server with absolutely no problems at all. > > The PHP group has deemed Apache 2 support in 4.2.x as "experimental", but > judging by its stability, a non-experimental release can't be more than a > couple months away. > > -- > Aaron Gould > agouldpartscanada.com > Web Developer > > > ----- Original Message ----- > From: "MET" <metuberstats.com> > To: "PHP-GENERAL" <php-generallists.php.net> > Sent: Tuesday, August 13, 2002 9:55 AM > Subject: [PHP] PHP 4.2.2 and Apache 2 > > > > So how stable are they? I'm not running a production server, but a > > development server. Everything coming off of this box goes directly to > > a production server. > > > > ~ Matthew > > > > > > /************************************************************** > > > > Matthew Metnetsky > > > > metuberstats.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:


    These are the command line parameters I used when compiling Apache on our development server:

    --prefix=/usr/local/apache --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr --with-mcrypt=../mcrypt-2.6.2 --with-imap --with-imap-ssl --enable-ftp --with-gettext --with-xml --with-kerberos

    Granted, this isn't as complex as many servers out there, but for our purposes, it works. We are a small company, and as such, will not get nearly the traffic that Google gets. We've only had a peak of about 10 simultaneous users on the server, each of them manipulating data in a MySQL database of our products.

    Obviously we can't say what the result of replacing our current production server would be. (Our production server runs Apache 1.3.26 + PHP 4.0.6, and gets about 250,000 hits/month.)

    --
    Aaron Gould
    agouldpartscanada.com
    Web Developer
    

    ----- Original Message ----- From: "Rasmus Lerdorf" <rasmusphp.net> To: "Aaron Gould" <webdevelpartscanada.com> Cc: "MET" <metuberstats.com>; "PHP-GENERAL" <php-generallists.php.net> Sent: Tuesday, August 13, 2002 11:32 AM Subject: Re: [PHP] PHP 4.2.2 and Apache 2

    > Which OS, which extensions and how much load have you put it under? There > are known thread safety issues in various libraries that you can link PHP > against. And some of them are subtle. > > Did you know, for example, that libpq (the PostgreSQL client library) is > threadsafe except for the case where you use CRYPT() in an SQL query. > Good luck debugging that one. > > Personally I would not touch Apache 2, at least not with a threaded mpm, > for quite a while. > > -Rasmus > > On Tue, 13 Aug 2002, Aaron Gould wrote: > > > We have been using PHP 4.2.1/4.2.2 with Apache 2.0.39 for a month on a > > development server with absolutely no problems at all. > > > > The PHP group has deemed Apache 2 support in 4.2.x as "experimental", but > > judging by its stability, a non-experimental release can't be more than a > > couple months away. > > > > -- > > Aaron Gould > > agouldpartscanada.com > > Web Developer > > > > > > ----- Original Message ----- > > From: "MET" <metuberstats.com> > > To: "PHP-GENERAL" <php-generallists.php.net> > > Sent: Tuesday, August 13, 2002 9:55 AM > > Subject: [PHP] PHP 4.2.2 and Apache 2 > > > > > > > So how stable are they? I'm not running a production server, but a > > > development server. Everything coming off of this box goes directly to > > > a production server. > > > > > > ~ Matthew > > > > > > > > > /************************************************************** > > > > > > Matthew Metnetsky > > > > > > metuberstats.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:


    A philosophical question.... Are there any standards to naming variables?? I was told that one should include a letter or combination of letters to describe a variable i.e. $sfoo = 'string'; // string $bfoo = true; // bool $nfoo = 10; // interger

    etc....

    Thanks

    -- 
    Gerard Samuel
    http://www.trini0.org:81/
    http://dev.trini0.org:81/
    

    attached mail follows:


    [snip] A philosophical question.... Are there any standards to naming variables?? I was told that one should include a letter or combination of letters to describe a variable i.e. $sfoo = 'string'; // string $bfoo = true; // bool $nfoo = 10; // interger [/snip]

    http://ootips.org/hungarian-notation.html

    Hungarian notation was conceived so that variable types would be easily identifiable in code. YMMV

    Jay

    attached mail follows:


    My two cents,

    I think if you are working on a personal product you use what works for you. If working in a group find out or decide as a group what standards to use. The hungarian standards are well designed, but I've seen others that work as well.

    When posting data from a from to another script I've see F used... as in $f_username $f_userpass. As well as many others.

    The best advise I could give with my (VERY) limited experience, chose a constant method for yourself and stick to it. That way it will become second nature to you.

    Nick

    At 09:52 AM 8/13/2002 -0400, Gerard Samuel wrote: >A philosophical question.... >Are there any standards to naming variables?? >I was told that one should include a letter or combination of letters to >describe a variable >i.e. >$sfoo = 'string'; // string >$bfoo = true; // bool >$nfoo = 10; // interger > >etc.... > >Thanks > >-- >Gerard Samuel

    attached mail follows:


    Samuel this is what you can use as a standard (at least for yourself): http://www.cs.msstate.edu/~cs1314/global/guide

    It describes how to name variables, functions, scripts etc. In short the variable names must tell the programmer what it is being used for, e.g. $countHits = 0; // initialize counter to count no. of hits on the page or use _ to separate words - $count_hits = 0; On Tue, 13 Aug 2002, Nicholas Mercier wrote:

    > My two cents, > > I think if you are working on a personal product you use what works for > you. If working in a group find out or decide as a group what standards to > use. The hungarian standards are well designed, but I've seen others that > work as well. > > When posting data from a from to another script I've see F used... as in > $f_username $f_userpass. > As well as many others. > > The best advise I could give with my (VERY) limited experience, chose a > constant method for yourself and stick to it. That way it will become > second nature to you. > > Nick > > At 09:52 AM 8/13/2002 -0400, Gerard Samuel wrote: > >A philosophical question.... > >Are there any standards to naming variables?? > >I was told that one should include a letter or combination of letters to > >describe a variable > >i.e. > >$sfoo = 'string'; // string > >$bfoo = true; // bool > >$nfoo = 10; // interger > > > >etc.... > > > >Thanks > > > >-- > >Gerard Samuel > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    -Pushkar S. Pradhan

    attached mail follows:


    Mike,

    I agree with the things that Geoff is telling you. What I have seen in the past and even in some free PHP programs that I downloaded for learning purposes, is the CC number stored in your database but not entirely. I mean like 1234........789 so the customer can verify that the transaction will be made using the right CC and not an old one or even someone else CC.

    HTH, C.

    > -----Original Message----- > From: Geoff Caplan [mailto:geoffadvantae.com] > Sent: Tuesday, August 13, 2002 5:20 AM > To: Mike Mannakee; php-generallists.php.net > Subject: Re[2]: [PHP] Credit Card suggestions > > Mike, > > >>Does anyone have any suggested method of scrambling a user's credit card > >>number before I stick it in a mysql database? > > With respect, if you have to ask the question, you don't have the > technical skills to do this safely. In particular, there is no way to > keep the numbers secure if you are storing them on a machine which can > be accessed directly from the internet. Both your encryption keys and > your card numbers would have to be stored on a back-end machine > protected by a sophisticated firewall. > > Payment gateway providers have to meet challenging standards and > undergo rigorous audits from the banks before they are allowed to > store numbers. Much your best solution is to use one of these > providers, who will store the card numbers for you. You can then do > all the transactions you require, such as repeats, refunds etc without > ever having to store the card number. Many providers offer the options > of using forms on their servers, or using your own SSL forms and > posting them the data using the SSL. With the CURL library, writing an > interface for this is relatively trivial. > > Many countries (such as the UK where we operate) have laws about the > storage of credit cards on computer networks, so what you are planning > may even be illegal! > > -- > Geoff Caplan > Advantae Ltd > > mailto:geoffadvantae.com > http://www.advantae.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    If there is no secure way to store creditcards on webservers, please tell me about how secure it is to encrypt passwords with md5 encryption.

    I want a password secured area in my website where I store some company concepts I invented. I'm searching for people who got enough money to make these concepts happen in true life, but I don't want these people to look at the concepts before I don't have there Personal Data.

    If someone is interestet and German speaking you may look at www.weitsicht.org, but the site isn't finished yet. some things don't work on other browsers than IE.

    Thanks

    Schura

    -----Ursprungliche Nachricht----- Von: Geoff Caplan [mailto:geoffadvantae.com] Gesendet: Dienstag, 13. August 2002 10:20 An: Mike Mannakee; php-generallists.php.net Betreff: Re[2]: [PHP] Credit Card suggestions

    Mike,

    >>Does anyone have any suggested method of scrambling a user's credit card >>number before I stick it in a mysql database?

    With respect, if you have to ask the question, you don't have the technical skills to do this safely. In particular, there is no way to keep the numbers secure if you are storing them on a machine which can be accessed directly from the internet. Both your encryption keys and your card numbers would have to be stored on a back-end machine protected by a sophisticated firewall.

    Payment gateway providers have to meet challenging standards and undergo rigorous audits from the banks before they are allowed to store numbers. Much your best solution is to use one of these providers, who will store the card numbers for you. You can then do all the transactions you require, such as repeats, refunds etc without ever having to store the card number. Many providers offer the options of using forms on their servers, or using your own SSL forms and posting them the data using the SSL. With the CURL library, writing an interface for this is relatively trivial.

    Many countries (such as the UK where we operate) have laws about the storage of credit cards on computer networks, so what you are planning may even be illegal!

    --
    Geoff Caplan
    Advantae Ltd
    

    mailto:geoffadvantae.com http://www.advantae.com

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

    attached mail follows:


    MD5 encryption of passwords is secure since you do not need to decrypt the password ever (in fact you can't). You just encrypt the password that the user entered and check if the MD5 of each password is the same, then the user most likely entered the correct password.

    ----- Original Message ----- From: "Sascha Braun" <saschabraungmx.de> To: "PHP Mailingliste" <php-generallists.php.net> Sent: Tuesday, August 13, 2002 10:52 AM Subject: AW: Re[2]: [PHP] Credit Card suggestions

    > If there is no secure way to store creditcards on webservers, please tell me > about how secure it is to encrypt passwords with md5 encryption. > > I want a password secured area in my website where I store some company > concepts I invented. I'm searching for people who got enough money to make > these concepts happen in true life, but I don't want these people to look at > the concepts before I don't have there Personal Data. > > If someone is interestet and German speaking you may look at > www.weitsicht.org, but the site isn't finished yet. some things don't work > on other browsers than IE. > > Thanks > > Schura > > > > -----Ursprungliche Nachricht----- > Von: Geoff Caplan [mailto:geoffadvantae.com] > Gesendet: Dienstag, 13. August 2002 10:20 > An: Mike Mannakee; php-generallists.php.net > Betreff: Re[2]: [PHP] Credit Card suggestions > > > Mike, > > >>Does anyone have any suggested method of scrambling a user's credit card > >>number before I stick it in a mysql database? > > With respect, if you have to ask the question, you don't have the > technical skills to do this safely. In particular, there is no way to > keep the numbers secure if you are storing them on a machine which can > be accessed directly from the internet. Both your encryption keys and > your card numbers would have to be stored on a back-end machine > protected by a sophisticated firewall. > > Payment gateway providers have to meet challenging standards and > undergo rigorous audits from the banks before they are allowed to > store numbers. Much your best solution is to use one of these > providers, who will store the card numbers for you. You can then do > all the transactions you require, such as repeats, refunds etc without > ever having to store the card number. Many providers offer the options > of using forms on their servers, or using your own SSL forms and > posting them the data using the SSL. With the CURL library, writing an > interface for this is relatively trivial. > > Many countries (such as the UK where we operate) have laws about the > storage of credit cards on computer networks, so what you are planning > may even be illegal! > > -- > Geoff Caplan > Advantae Ltd > > mailto:geoffadvantae.com > http://www.advantae.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:


    On Tuesday 13 August 2002 10:57 am, you wrote: > MD5 encryption of passwords is secure since you do not need to decrypt the > password ever (in fact you can't). You just encrypt the password that the > user entered and check if the MD5 of each password is the same, then the > user most likely entered the correct password.

    I don't remember where I read this but it only takes the crackers about 1 - 2 seconds to crack your average MD5 encrypted password. This is quite logical because all they had to do is make a database of all of the MD5 sums of all the passwords in the various dictionaries. The only Linux distro in my (limited) experience that gave the option of MD5 encryption of passwords was Debian 2. Even then you had the option of shadow password files instead. Debian 2 is quite old. Later distros such as Mandrake 8.0 and up simply use shadow password files without other option.

    Regards Bob Parker

    attached mail follows:


    Makes sense, except if you use upper and lowercase characters, numbers, and symbols (as you should for secure passwords). I would think that with these kind of passwords, storing the sheer number of posibilites would get slightly large. And I mean even if it is easy to break, it's more secure then storing them clear text.

    Adam Voigt adam.voigtcryptocomm.com

    On Wed, 2002-08-14 at 02:20, Robert Parker wrote: > On Tuesday 13 August 2002 10:57 am, you wrote: > > MD5 encryption of passwords is secure since you do not need to decrypt the > > password ever (in fact you can't). You just encrypt the password that the > > user entered and check if the MD5 of each password is the same, then the > > user most likely entered the correct password. > > I don't remember where I read this but it only takes the crackers about 1 - 2 > seconds to crack your average MD5 encrypted password. This is quite logical > because all they had to do is make a database of all of the MD5 sums of all > the passwords in the various dictionaries. > The only Linux distro in my (limited) experience that gave the option of MD5 > encryption of passwords was Debian 2. Even then you had the option of shadow > password files instead. Debian 2 is quite old. Later distros such as Mandrake > 8.0 and up simply use shadow password files without other option. > > Regards > Bob Parker > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    On Tuesday 13 August 2002 12:20 pm, you wrote: > Makes sense, except if you use upper and lowercase characters, > numbers, and symbols (as you should for secure passwords). I > would think that with these kind of passwords, storing the sheer > number of posibilites would get slightly large. And I mean even > if it is easy to break, it's more secure then storing them clear > text. > > Adam Voigt > adam.voigtcryptocomm.com

    Thing that really scares me about MD5 being used anywhere that's easily accessible is what happens if 'pussycat' maps on to the same hash as 'H&3ph!3s09Zw'. The crackers don't need the original password just something that generates the same hash.

    Bob Parker

    attached mail follows:


    If I could find the link I would send it, but I read about 6 months back on RSA Data Security's website that a study was being done by mathemetician's and at the time they were theorizing that they highly doubted any overlap in keysums but if such did exist they believed that the key you would have to MD5 to get the same sum would have to be several "chapters" worth of characters. Point of the story is, it's highly, highly, highly unlikely.

    Adam Voigt adam.voigtcryptocomm.com

    On Wed, 2002-08-14 at 02:36, Robert Parker wrote: > On Tuesday 13 August 2002 12:20 pm, you wrote: > > Makes sense, except if you use upper and lowercase characters, > > numbers, and symbols (as you should for secure passwords). I > > would think that with these kind of passwords, storing the sheer > > number of posibilites would get slightly large. And I mean even > > if it is easy to break, it's more secure then storing them clear > > text. > > > > Adam Voigt > > adam.voigtcryptocomm.com > > Thing that really scares me about MD5 being used anywhere that's easily > accessible is what happens if 'pussycat' maps on to the same hash as > 'H&3ph!3s09Zw'. The crackers don't need the original password just something > that generates the same hash. > > Bob Parker

    attached mail follows:


    On Wed, 14 Aug 2002, Robert Parker wrote:

    >-On Tuesday 13 August 2002 12:20 pm, you wrote: >-> Makes sense, except if you use upper and lowercase characters, >-> numbers, and symbols (as you should for secure passwords). I >-> would think that with these kind of passwords, storing the sheer >-> number of posibilites would get slightly large. And I mean even >-> if it is easy to break, it's more secure then storing them clear >-> text. >-> >-> Adam Voigt >-> adam.voigtcryptocomm.com >- >-Thing that really scares me about MD5 being used anywhere that's easily >-accessible is what happens if 'pussycat' maps on to the same hash as >-'H&3ph!3s09Zw'. The crackers don't need the original password just something >-that generates the same hash.

    Sure this is possible and I agree a concern. With MD5 there is some mathematically small chance this will happen. With SHA even smaller. However, where do we draw the line?

    I suppose requiring users to use long passphrases instead of passwords and MD5 that result would help with this issue.

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

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

    John Huggins VANet

    jhugginsva.net http://www.va.net/

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

    attached mail follows:


    True, and there's always the MCRYPT library.

    Adam Voigt adam.voigtcryptocomm.com

    On Tue, 2002-08-13 at 12:48, John S. Huggins wrote: > On Wed, 14 Aug 2002, Robert Parker wrote: > > >-On Tuesday 13 August 2002 12:20 pm, you wrote: > >-> Makes sense, except if you use upper and lowercase characters, > >-> numbers, and symbols (as you should for secure passwords). I > >-> would think that with these kind of passwords, storing the sheer > >-> number of posibilites would get slightly large. And I mean even > >-> if it is easy to break, it's more secure then storing them clear > >-> text. > >-> > >-> Adam Voigt > >-> adam.voigtcryptocomm.com > >- > >-Thing that really scares me about MD5 being used anywhere that's easily > >-accessible is what happens if 'pussycat' maps on to the same hash as > >-'H&3ph!3s09Zw'. The crackers don't need the original password just something > >-that generates the same hash. > > Sure this is possible and I agree a concern. With MD5 there is some > mathematically small chance this will happen. With SHA even smaller. > However, where do we draw the line? > > I suppose requiring users to use long passphrases instead of passwords and > MD5 that result would help with this issue. > > >- > >-Bob Parker > >- > >--- > >-PHP General Mailing List (http://www.php.net/) > >-To unsubscribe, visit: http://www.php.net/unsub.php > >- > > ************************************** > > John Huggins > VANet > > jhugginsva.net > http://www.va.net/ > > ************************************** >

    attached mail follows:


    Doesn't md5 generate a 128 bit binary number???

    That means there are 3.4028236692093846346337460743177e+38 possible combinations which can be generated. So surely the odds of 2 strings producing the same md5 code are 1 in 3.4028236692093846346337460743177e+38???

    Having said that, I guess dictionary based attacks could break in fairly easily. That's why I always make my users have numbers and mixed case in their passwords.

    -----Original Message----- From: John S. Huggins [mailto:jhugginsva.net] Sent: 13 August 2002 17:48 To: Robert Parker Cc: php-generallists.php.net; Adam Voigt Subject: Re: Re[2]: [PHP] Credit Card suggestions

    On Wed, 14 Aug 2002, Robert Parker wrote:

    >-On Tuesday 13 August 2002 12:20 pm, you wrote: >-> Makes sense, except if you use upper and lowercase characters, >-> numbers, and symbols (as you should for secure passwords). I would >-> think that with these kind of passwords, storing the sheer number of

    >-> posibilites would get slightly large. And I mean even if it is easy >-> to break, it's more secure then storing them clear text. >-> >-> Adam Voigt >-> adam.voigtcryptocomm.com >- >-Thing that really scares me about MD5 being used anywhere that's >easily -accessible is what happens if 'pussycat' maps on to the same >hash as -'H&3ph!3s09Zw'. The crackers don't need the original password >just something -that generates the same hash.

    Sure this is possible and I agree a concern. With MD5 there is some mathematically small chance this will happen. With SHA even smaller. However, where do we draw the line?

    I suppose requiring users to use long passphrases instead of passwords and MD5 that result would help with this issue.

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

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

    John Huggins VANet

    jhugginsva.net http://www.va.net/

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

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

    attached mail follows:


    On Wed, 14 Aug 2002, Robert Parker wrote:

    >-On Tuesday 13 August 2002 12:20 pm, you wrote: >-> Makes sense, except if you use upper and lowercase characters, >-> numbers, and symbols (as you should for secure passwords). I >-> would think that with these kind of passwords, storing the sheer >-> number of posibilites would get slightly large. And I mean even >-> if it is easy to break, it's more secure then storing them clear >-> text. >-> >-> Adam Voigt >-> adam.voigtcryptocomm.com >- >-Thing that really scares me about MD5 being used anywhere that's easily >-accessible is what happens if 'pussycat' maps on to the same hash as >-'H&3ph!3s09Zw'. The crackers don't need the original password just something >-that generates the same hash. >- >-Bob Parker

    Whoa, I thought Bob was saying he found two strings that generate the same hash.

    md5(pussycat) = fd316a211a7178c6fbf09c4c2ac6fa05 md5(H&3ph!3s09Zw) = 4172a5caff5b7878144c8aae11f3de17

    Guess not. WHEW!

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

    John Huggins VANet

    jhugginsva.net http://www.va.net/

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

    attached mail follows:


    On Wed, Aug 14, 2002 at 02:20:07AM -0400, Robert Parker wrote: > > I don't remember where I read this but it only takes the crackers about 1 - 2 > seconds to crack your average MD5 encrypted password. This is quite logical > because all they had to do is make a database of all of the MD5 sums of all > the passwords in the various dictionaries.

    Of course, that would necessitate access to the machine. A brute force dictionary attack is much more likely. To thwart both, enforce strong passwords.

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


    On Tuesday 13 August 2002 01:01 pm, you wrote: > On Wed, Aug 14, 2002 at 02:20:07AM -0400, Robert Parker wrote: > > I don't remember where I read this but it only takes the crackers about 1 > > - 2 seconds to crack your average MD5 encrypted password. This is quite > > logical because all they had to do is make a database of all of the MD5 > > sums of all the passwords in the various dictionaries. > > Of course, that would necessitate access to the machine. A brute force > dictionary attack is much more likely. To thwart both, enforce strong > passwords. > > --Dan Yes I am assuming possible access to the machine, it is far from rare. Agree with enforcing strong passwords when that is possible. Just that extra steps may be needed, beyond the encryption method. Bob

    attached mail follows:


    When i started to learn php there was talk of storing session information in a database rather than in a particular directory like /tmp

    Is it better to store the session data in a database rather than a directory? Is it faster if it is stored in the database?

    Randy

    attached mail follows:


    The main reason to store it in a database is to allow you to share that session data across multiple web servers. In a load-balanced architecture, this is essential.

    -Rasmus

    On Tue, 13 Aug 2002, Randy Johnson wrote:

    > When i started to learn php there was talk of storing session information in > a database rather than in a particular directory like /tmp > > Is it better to store the session data in a database rather than a > directory? Is it faster if it is stored in the database? > > Randy > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Hello,

    Could you tell me why on PHP 4.2.2 this code work

    <?php switch ($_GET['fuseaction']) { case 0: print "i equals 0"; break; default: print "i is not equal to 0, 1 or 2"; } ?>

    and this one not :

    <?php switch ($fuseaction) { case 0: print "i equals 0"; break; default: print "i is not equal to 0, 1 or 2"; } ?>

    In both cases when fuseaction is not defined, I receive an error. Could you tell me how to know if the variable is defined in the URL. In coldfusion you can do <cfif isDefined("URL.fuseaction")>

    but in php ?

    Bye

    attached mail follows:


    you can use isset()

    better grab a PHP starter document or tutorial.

    Elias

    "Christian Ista" <christian.istateledisnet.be> wrote in message news:20020813141833.36492.qmailpb1.pair.com... > Hello, > > Could you tell me why on PHP 4.2.2 this code work > > <?php > switch ($_GET['fuseaction']) > { > case 0: > print "i equals 0"; > break; > default: > print "i is not equal to 0, 1 or 2"; > } > ?> > > and this one not : > > <?php > switch ($fuseaction) > { > case 0: > print "i equals 0"; > break; > default: > print "i is not equal to 0, 1 or 2"; > } > ?> > > In both cases when fuseaction is not defined, I receive an error. Could you > tell me how to know if the variable is defined in the URL. In coldfusion you > can do <cfif isDefined("URL.fuseaction")> > > but in php ? > > Bye > >

    attached mail follows:


    First of all, you need to use the $_* superglobals if register_globals is off. That is, to access get variables, you use $_GET['variable_name']

    To check if the variable is set, use the isset function.

    if (IsSet($_GET['variable']) { // code } else { //error }

    ----- Original Message ----- From: "Christian Ista" <christian.istateledisnet.be> To: <php-generallists.php.net> Sent: Tuesday, August 13, 2002 10:16 AM Subject: [PHP] parse URL good syntaxe please

    > Hello, > > Could you tell me why on PHP 4.2.2 this code work > > <?php > switch ($_GET['fuseaction']) > { > case 0: > print "i equals 0"; > break; > default: > print "i is not equal to 0, 1 or 2"; > } > ?> > > and this one not : > > <?php > switch ($fuseaction) > { > case 0: > print "i equals 0"; > break; > default: > print "i is not equal to 0, 1 or 2"; > } > ?> > > In both cases when fuseaction is not defined, I receive an error. Could you > tell me how to know if the variable is defined in the URL. In coldfusion you > can do <cfif isDefined("URL.fuseaction")> > > but in php ? > > Bye > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    > Could you tell me why on PHP 4.2.2 this code work

    My previous mail it was for my development machine, IIS, windows 2000 and PHP4.2.2.

    My host use PHP4.2.2 on linux and that's work.

    Could you tell me why this difference ?

    Bye

    attached mail follows:


    > First of all, you need to use the $_* superglobals if register_globals is > off. That is, to access get variables, you use $_GET['variable_name']

    What do you mean by that ? (I'm newbie in PHP)

    Bye

    attached mail follows:


    Try taking a look at this tutorial for PHP. http://www.php.net/manual/en/tutorial.php ----- Original Message ----- From: "Christian Ista" <christian.istateledisnet.be> To: "'php list'" <php-generallists.php.net> Sent: Tuesday, August 13, 2002 10:32 AM Subject: RE: [PHP] parse URL good syntaxe please

    > > First of all, you need to use the $_* superglobals if register_globals > is > > off. That is, to access get variables, you use $_GET['variable_name'] > > What do you mean by that ? (I'm newbie in PHP) > > Bye > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    I'm trying to configure my php.ini file on my local Windows 2000 system so I can use the extensions such as GD, etc. I have changed the line:

    extension_dir = C:\php\extensions ; (which is where php_gd.dll resides)

    and uncommented:

    extension=php_gd.dll

    and when I restart the web service and hit a page, I get the error:

    Unable to load dynamic library ..... the specified procedure could not be found.

    Any ideas?

    Thanks!

    attached mail follows:


    Try this instead...

    extension_dir = "C:/PHP/extensions/"

    and ensure that the GD section is present in phpinfo() output.

    Neil

    Php wrote: > ************************************************************************** > This Message Was Virus Checked With : SAVI 3.60 May 2002 > Last Updated 8th August 2002 > ************************************************************************** > > I'm trying to configure my php.ini file on my local Windows 2000 system so I > can use the extensions such as GD, etc. I have changed the line: > > extension_dir = C:\php\extensions ; (which is where php_gd.dll resides) > > and uncommented: > > extension=php_gd.dll > > and when I restart the web service and hit a page, I get the error: > > Unable to load dynamic library ..... the specified procedure could not be > found. > > Any ideas? > > Thanks! > > >

    -- 
    ----------------------
      www.curvedvision.com
    ----------------------
    

    attached mail follows:


    Do you know another possibility to store multiple files in one package? - And most users in the web can use it, without getting special programms. I know tar can, but there either I don't know how fast it is. Maybe there is an freeware programm for all plattforms wich can untar, but a i don't know?

    But if you know?

    Schura

    -----Ursprüngliche Nachricht----- Von: Jason Wong [mailto:php-generalgremlins.com.hk] Gesendet: Dienstag, 13. August 2002 05:48 An: php-generallists.php.net Betreff: Re: [PHP] Performance of ZLib

    On Tuesday 13 August 2002 09:46, Sascha Braun wrote:

    > The funktionality is: > > Customer puts an 300 DPI High quality JPEG image into his shopping cart, > after he checks out the Image or the images are getting compressed via Zlib > Library.

    Have you tried doing a few test runs to see

    1) By how much the files are compressed -- jpegs are already compressed and usually compressing again will only shave a few percent off the size. In some cases the file size can actually increase when "compressed".

    2) The average time taken to compress a file.

    > So what about performance?

    That is determined by your server -- CPU speed, amount of memory, speed of HDDs.

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

    /* QOTD: "East is east... and let's keep it that way." */

    -- 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, but is tar scriptable via PHP?

    Schura

    -----Ursprungliche Nachricht----- Von: Gareth Ardron [mailto:gazfission.org.uk] Gesendet: Dienstag, 13. August 2002 17:10 An: Sascha Braun Betreff: Re: AW: [PHP] Performance of ZLib

    At 16:46 13/08/2002 +0200, you wrote: >Do you know another possibility to store multiple files in one package? - >And most users in the web can use it, without getting special programms. I >know tar can, but there either I don't know how fast it is. Maybe there is >an freeware programm for all plattforms wich can untar, but a i don't know? > >But if you know?

    stuffit expander will untar files on mac os9 and osX tar will (obviously) untar on *nix boxes winzip will untar files on windows machines

    as for tar's speed, it's bloody fast.

    attached mail follows:


    Sascha --

    ...and then Sascha Braun said... % % Thanks for the quick answer, but is tar scriptable via PHP?

    You can drive tar, zip, gzip, lharc, arj, bzip2, or just about any other archive program from the command line, and that means you can do it from a php script with a system() call.

    Note that zip with no compression is just as fast as tar or anything else. Yes, it stores the directory at the end of the archive, but it's a fine way to go and perhaps more recognizable to more surfers out there.

    % % Schura

    HTH & HAND

    :-D

    -- 
    David T-G                      * It's easier to fight for one's principles
    (play) davidtgjustpickone.org * than to live up to them. -- fortune cookie
    (work) davidtgworkjustpickone.org
    http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
    

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD)

    iD8DBQE9WVfrGb7uCXufRwARApBnAJ9oJta1xsiJLkgaI7DXTilcOTaLHACghGTs moem6s8U9C9Y7GfsQg0JJiY= =/eCF -----END PGP SIGNATURE-----

    attached mail follows:


    I believe the jpeg funnktions don't work on a windows system. The Gifs don't do either because they aren't implemeted too.

    Please look at this Library. It's very nice but I don't get it working and the guy who made it don't know either, why it's not working on my system. Must be something about jpeg librarys and so on.

    Schura

    PS.: Examples at the end of the file.

    -----Ursprüngliche Nachricht----- Von: Nicholas Mercier [mailto:mercie96potsdam.edu] Gesendet: Dienstag, 13. August 2002 10:35 An: php-generallists.php.net Betreff: Re: [PHP] image function

    At 09:50 PM 8/12/2002 +0800, you wrote: Jay,

    I would recommend uncommenting the php_gd2.dll extension.

    Gd2 contains some functions that GD lacks and is over all better in my opinion. However, they are correct that you do NOT need to recompile when running PHP on a Windows Platform. Simply change php.ini to include the added extension and then restart your apache server.

    Nick

    >Thank you Jay, Yup my apache is on Windows : ) >Let's me try first. >"Jay Blanchard" <jay.blanchardniicommunications.com> ¼¶¼g©ó¶l¥ó·s»D >:002301c24201$b28caf00$8102a8c0000347D72515... > > [snip] > > I known i need to install a lot of staffs to get all the functions >works(GD > > Lib, FreeType Lib, libjpeg, libpng, zlib........etc etc). > > But i only need a few of them, so if i just load the php_gd.dll, what > > functions included?? I canr found any information about that. > > And one more, does php_gd2.dll also a GD lib? > > [/snip] > > > > The DLL is a Windows library AFAIR, and contains the GD functions when > > included on a Windows server. You do not have to enable this extension on >an > > Apache server (unless it is Apache on Windows). You just have to make sure > > that PHP is compiled with all of the proper libraries for your use of GD. > > > > As for the second DLL, I am not sure. I haven't done a lot of Windows GD > > installations, it does not look familiar. > > > > HTH! > > > > Jay > > > > > > > >-- >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:


    I can resize the jpeg file with below script, i.e. jpeg function works on my machine. I am using Apache 2.0.3.9 with PHP 4.2.2, i forget which dll i uncommented. either php_gd or php_gd2. ------------------------------------------------- <? $imgsize = getimagesize("10.jpg"); //Initialize the image. $image = imagecreatefrompng("10.jpg");

    $newimage = imagecreate(100, 100);

    //Allocate some nice black space.

    $black = imagecolorallocate($image, 0,0,0);

    //Resize the old image into the new image, //specifying starting points and dimensions.

    imagecopyresized($newimage, $image, 0, 0, 0, 0, 100, 100, 200, 200);

    //Get rid of the old image.

    imagedestroy($image);

    //Now, the message -- the second argument, //a number from 1-5, specifies a built-in font. //Or you can load your own with ImageLoadFont(). //We'll put it in the upper right with coordinates of 10,10.

    imagestring($newimage, 2, 10, 10, "Copyright 2001", $black);

    //All righty, let's wrap things up here.

    header("Content-type: image/jpeg"); imagepng($newimage); imagedestroy($newimage); ?> ---------------------------------------------------------- "Sascha Braun" <saschabraungmx.de> ¼¶¼g©ó¶l¥ó·s»D :IHEDJCLOKIGIAOGIBDFFOEDDCAAA.saschabraungmx.de... > I believe the jpeg funnktions don't work on a windows system. The Gifs don't > do either because they aren't implemeted too. > > Please look at this Library. It's very nice but I don't get it working and > the guy who made it don't know either, why it's not working on my system. > Must be something about jpeg librarys and so on. > > Schura > > PS.: Examples at the end of the file. > > -----Ursprüngliche Nachricht----- > Von: Nicholas Mercier [mailto:mercie96potsdam.edu] > Gesendet: Dienstag, 13. August 2002 10:35 > An: php-generallists.php.net > Betreff: Re: [PHP] image function > > > At 09:50 PM 8/12/2002 +0800, you wrote: > Jay, > > I would recommend uncommenting the php_gd2.dll extension. > > Gd2 contains some functions that GD lacks and is over all better in my > opinion. > However, they are correct that you do NOT need to recompile when running > PHP on a Windows Platform. Simply change php.ini to include the added > extension and then restart your apache server. > > Nick > > > >Thank you Jay, Yup my apache is on Windows : ) > >Let's me try first. > >"Jay Blanchard" <jay.blanchardniicommunications.com> ¼¶¼g©ó¶l¥ó·s»D > >:002301c24201$b28caf00$8102a8c0000347D72515... > > > [snip] > > > I known i need to install a lot of staffs to get all the functions > >works(GD > > > Lib, FreeType Lib, libjpeg, libpng, zlib........etc etc). > > > But i only need a few of them, so if i just load the php_gd.dll, what > > > functions included?? I canr found any information about that. > > > And one more, does php_gd2.dll also a GD lib? > > > [/snip] > > > > > > The DLL is a Windows library AFAIR, and contains the GD functions when > > > included on a Windows server. You do not have to enable this extension > on > >an > > > Apache server (unless it is Apache on Windows). You just have to make > sure > > > that PHP is compiled with all of the proper libraries for your use of > GD. > > > > > > As for the second DLL, I am not sure. I haven't done a lot of Windows GD > > > installations, it does not look familiar. > > > > > > HTH! > > > > > > Jay > > > > > > > > > > > > > >-- > >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:


    At 04:52 PM 8/13/2002 +0200, Sascha Braun wrote: Okay... I've looked at that library and felt as if I was looking into the ark of the Covenant.

    I'm really not that good at programing and looking at that script made my eyes bleed.

    This is a script I've used to save an image and then dynamically resize it proportionately until it is within 200x180. It also renames the file and creates a mysql database entry for the file so my image collection can later be searched.

    <? //Query Database to get the next sequential image number db_secure_open(); $lastnumQry = "SELECT imageID FROM images ORDER BY imageID DESC"; $lastnumRslt = mysql_query($lastnumQry, $conn); $lastnum = mysql_fetch_array($lastnumRslt); $newnum = $lastnum['imageID']+1;

    //Set image directory root $image_root = $DOCUMENT_ROOT.'/images/';

    //Create a temp image file from uploaded jpeg $tempimage = imagecreatefromjpeg("$f_image");

    //Get dimensions of image $temp_h = ImageSY($tempimage); $temp_w = ImageSX($tempimage);

    //Checks that the image is not too small (less than 50x50)

    if($temp_h < 50 && $temp_w <50) { echo "ERROR: Image is less then 50x50."; exit; } //set file name $filename = $newnum.'.jpg';

    //save image if(!ImageJpeg($tempimage, $image_root.$filename)) { echo "ERROR: Image unable to save file. Try again later."; exit; } //set file name for thumbnail $smallfilename = $newnum.'_t.jpg';

    //Check to see if the image is already within the 200x180 range if($temp_h < 200 && $temp_w <180) { //Save thumbnail if(!ImageJpeg($tempimage, $image_root.$smallfilename)) { echo "ERROR: Thumbnail Image unable to upload!"; exit; } } else {

    /* This section of the script uses the math that to resize an image in proportion You must cross multiply the dimensions with their ratios... I use 1.8 and 2.0 but I could of as easily used 180 and 200. The math works, I don't know how to really explain it, but it works. */

    echo "Resize beginning.<BR>"; if(($temp_h*1.8) > ($temp_w*2)) { $ratio = $temp_w/$temp_h; $dest_w = 200*$ratio; $dest_h = 200; } if(($temp_h*1.8) < ($temp_w*2)) { $ratio = $temp_h/$temp_w; echo "Ratio - $ratio <br>"; $dest_w = 180; $dest_h = 180*$ratio; } //On the off chance that the image is proportionate to 200x180 already we just set the height and width. if(($temp_h*1.8) == ($temp_w*2)) { $dest_w = 180; $dest_h = 200; }

    //Create the canvas. To use imagecreatetruecolor you need php_gd2.dll listed as an extension $image_t = imagecreatetruecolor($dest_w, $dest_h);

    //Resize (technically resample) the image to the new canvas imagecopyresampled($image_t, $tempimage, 0, 0, 0, 0, $dest_w, $dest_h, $temp_w, $temp_h);

    //Save the Thumbnail if(!ImageJpeg($image_t, $image_root.$smallfilename)) { echo "ERROR: Thumbnail Image unable to Upload!"; exit; } } //Clean up imagedestroy($tempimage); imagedestroy($image_t);

    //Insert File info into MySQL database $imageUpdate = "insert into images (catID, caption, descr, systemID, genreID, game) values ('$f_imageCat', '$f_caption', '$f_descr', '$f_system', '$f_genre', '$f_game')";

    if(!mysql_query($imageUpdate, $conn)) { echo "ERROR: Unable to Submit information to Database, try Upload later."; exit; } echo "<BR><BR><font size=3>Image Upload Successful! Image ID is: $newnum"; ?> <Head> <META HTTP-EQUIV=REFRESH CONTENT="5;URL=image_form.php"> </HEAD> </HTML>

    I am running a windows system, so I know that the JPEG functions do work. Gif functions will NOT WORK as the compression algorithm is now copyrighted. If this script (once tweaked for your system needs) does not work and your php.ini file is included the proper extension I don't know what to say.

    Nick

    >I believe the jpeg funnktions don't work on a windows system. The Gifs don't >do either because they aren't implemeted too. > >Please look at this Library. It's very nice but I don't get it working and >the guy who made it don't know either, why it's not working on my system. >Must be something about jpeg librarys and so on. > >Schura > >PS.: Examples at the end of the file. > >-----Ursprüngliche Nachricht----- >Von: Nicholas Mercier [mailto:mercie96potsdam.edu] >Gesendet: Dienstag, 13. August 2002 10:35 >An: php-generallists.php.net >Betreff: Re: [PHP] image function

    attached mail follows:


    Hi all,

    Just a quick note to see if anyone has any experience with mailing list managers.

    I've currently got a DB of subscribers, and basic PHP scripts are not going to be a good long-term solution.

    I was hoping that maybe there's an opensource or commercial product out there that I can install in my doc root (ie, PHP + MySQL support) which will handle this in a more effective manner (ie, space the mailout across an hour or so, etc etc).

    Or alternatively, somebody might recommend a service such as sparklist.com (but cheaper, since they're targeting a list with greater numbers a minimum of $50/month).

    TIA,

    Justin French

    attached mail follows:


    Justin,

    Have a look at PostMyMail, although it's designed to work with PostNuke. Have no idea if it can run stanadalone.

    I also wrote a clunky one in Python - it grabbed the addresses from a database and sent each individually. Python has a very nice SMTP module. By "clunky" I mean it didn't have an interface, I edited the source for the script every time I sent a mail. No problem, as it was a "proof of concept".

    Mightn't there be something at Hotscripts?

    HTH - Miles Thompson

    At 01:09 AM 8/14/2002 +1000, Justin French wrote: >Hi all, > >Just a quick note to see if anyone has any experience with mailing list >managers. > >I've currently got a DB of subscribers, and basic PHP scripts are not going >to be a good long-term solution. > >I was hoping that maybe there's an opensource or commercial product out >there that I can install in my doc root (ie, PHP + MySQL support) which will >handle this in a more effective manner (ie, space the mailout across an hour >or so, etc etc). > >Or alternatively, somebody might recommend a service such as sparklist.com >(but cheaper, since they're targeting a list with greater numbers a >minimum of $50/month). > >TIA, > >Justin French > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Hello,

    On 08/13/2002 12:09 PM, Justin French wrote: > Just a quick note to see if anyone has any experience with mailing list > managers. > > I've currently got a DB of subscribers, and basic PHP scripts are not going > to be a good long-term solution. > > I was hoping that maybe there's an opensource or commercial product out > there that I can install in my doc root (ie, PHP + MySQL support) which will > handle this in a more effective manner (ie, space the mailout across an hour > or so, etc etc).

    You can do all in PHP if you do things more efficiently. One thing that you should avoid at all costs is personalization. Once you do that, you can just queue a single message to all subscribers, instead one per subscriber.

    Another point is to have a DBM like database just to cache the subscribers addresses. Such databases are much faster to query than MySQL.

    -- 
    

    Regards, Manuel Lemos

    attached mail follows:


    Maybe there went something wrong with the attachment in my last mail.

    This is my second try bring the class for creating thumbs to you.

    <? //Images Wrapper for thumbs and other stuffs, require GDLib //Riccardo Pasquini, 04/04/2001, v0.1 //morphy6deex.net

    /* Finally the class review, 09/08/2002, v1.0a this source is of course under GPL, and ill be glad if u notify me any change

    Documentation (im sorry for my english)

    *public properties* none

    *public methods* DynaPic(string pic, string format) -> class constructor ***parameters string pic -> full pic name, including the path (absolute or relative) string format -> the format of the input file, be sure that GDLib handle it!

    destroy() -> free the resources

    bool create() -> initialize the handling of the pic, thats not required after the constructor but could be required after some method calls like setPicName($pic), i.e.

    setPicName(string pic) -> change the handled pic, the class require a call to create() after this ***parameters string pic -> full pic name, including the path (absolute or relative)

    string getPicName() -> returns the name of the handled pic

    setThumbDimension(float pctg) -> initialize the dimensions of the default thumbnail ***parameters float pctg -> float number (0<pctg<=1) which specifies the resize factor of the default thumb, i.e. pctg=1 means that the thumb is like the original picture, pctg=0.5 means that the thumb is half of the original, and so on...

    getThumbDimension(float &w,float &h) -> return as referenced parameters the default dimension on the thumbnail

    setPicFormat(string format) -> set a new output format for the loaded pic, require a call to create() after this ***parameters string format -> the format of the input file, be sure that GDLib handle it!

    string getPicFormat() -> returns the format of the output

    thumb() -> output the default thumbnail

    full() -> output the original image

    view(float width, float height) -> output a thumbnail, the dimension is specified in the parameters of the methodù ***parameters float width -> width of the output pic float height -> height of the output pic */ class DynaPic { var $m_sPicName; //file name with path var $m_sFormat; //file format, check m_asAllowedFormat var $m_hPic; //image handle var $m_bHandled; //flag to check if the pic is well loaded var $m_nThumbX; //width of the thumbnail var $m_nThumbY; //height of the thumbnail

    //possible pic formats var $m_asAllowedFormat = array("GIF","PNG","JPEG"); //and related headers var $m_aHeaders = array("GIF"=>"Content-type: image/gif","PNG"=>"Content-type: image/png","JPEG"=>"Content-type: image/jpeg");

    function DynaPic() { die("Constructor requires parameters: string pic_path, string "); }

    function DynaPic($pic,$format) { $this->m_sFormat = strtoupper($format); //check if valid format if(!in_array($this->m_sFormat,$this->m_asAllowedFormat)) { die("Invalid format: ".stripslashes(htmlentities($this->m_sFormat))); }

    //initialize $this->m_sPicName=$pic;

    //thumb default resize 50% $this->setThumbDimension(0.5); if(!$this->create()) die("Unable to create ".stripslashes(htmlentities($this->m_sPicName))." as ".stripslashes(htmlentities($this->m_sFormat))); }

    function destroy() { if($this->m_bHandled) { imagedestroy($this->m_hPic); $this->m_bHandled=false; } }

    function create() { $this->destroy();

    eval("\$this->m_hPic=imagecreatefrom".$this->m_sFormat."('".$this->m_sPicNa me."');");

    //check if init succeded if(!$this->m_hPic) { $this->m_bHandled=false; return false; } else { $this->m_bHandled=true; return true; } }

    function setPicName($pic) { $this->m_sPicName=$pic; $this->m_bHandled=false; }

    function getPicName() { return $this->m_sPicName; }

    function setThumbDimension($pctg) { if($pctg<=0 || $pctg>1) die("Not a valid resize factor");

    $size = GetImageSize($this->m_sPicName);

    $this->m_nThumbX=$size[0]*$pctg; $this->m_nThumbY=$size[1]*$pctg; }

    function getThumbDimension(&$w,&$h) { $w=$this->m_nThumbX; $h=$this->m_nThumbY; }

    function setPicFormat($format) { //check if valid format if(!in_array($format,$this->m_asAllowedFormat)) { die("Invalid format: ".stripslashes(htmlentities($this->m_sFormat))); } else { $this->m_sFormat=strtoupper($format); $this->m_bHandled=false; } }

    function getPicFormat() { return $this->m_sFormat; }

    //display functions function thumb() { if($this->m_bHandled) { $size = GetImageSize($this->m_sPicName); $picTmp=imagecreate($this->m_nThumbX,$this->m_nThumbY); imagecopyresized($picTmp, $this->m_hPic, 0, 0, 0, 0, $this->m_nThumbX, $this->m_nThumbY, $size[0], $size[1]); header($this->m_aHeaders[$this->m_sFormat]); switch($this->m_sFormat) { case 'JPEG': imagejpeg($picTmp); break; case 'GIF': imagegif($picTmp); break; case 'PNG': imagepng($picTmp); break; } imagedestroy($picTmp); } }

    function full() { if($this->m_bHandled) { header($this->m_aHeaders[$this->m_sFormat]); switch($this->m_sFormat) { case 'JPEG': imagejpeg($this->m_hPic); break; case 'GIF': imagegif($this->m_hPic); break; case 'PNG': imagepng($this->m_hPic); break; } } }

    function view($width, $height) { if($this->m_bHandled) { $size = GetImageSize($this->m_sPicName); $picTmp=imagecreate($width,$height); imagecopyresized($picTmp, $this->m_hPic, 0, 0, 0, 0, $width, $height, $size[0], $size[1]); header($this->m_aHeaders[$this->m_sFormat]); switch($this->m_sFormat) { case 'JPEG': imagejpeg($picTmp); break; case 'GIF': imagegif($picTmp); break; case 'PNG': imagepng($picTmp); break; } imagedestroy($picTmp); } } }

    /* sample use, view folder content in thumbs

    <script1.php> $handle=opendir($dirname); while ($file = readdir($handle)) { if($file=='.'||$file=='..' || is_dir($dirname.$file)) continue;

    //i suppose that only gif images r in that directory echo "<img border=\"0\" src=\"thumb.php?pic=".urlencode($dirname.$file)."&zoom=25&ext=gif\"><br>\n"; } closedir($handle);

    <thumb.php> include("dynapic.class.inc.php"); $hThumb = new DynaPic(urldecode($HTTP_GET_VARS["pic"]),$HTTP_GET_VARS["ext"]); $hThumb->setThumbDimension($HTTP_GET_VARS["zoom"]/100); $hThumb->thumb(); $hThumb->destroy(); //*/ ?>

    attached mail follows:


    Hi

    Once data is collected from a form is it possible for that to be emailed as an xls or csv. I have the form and email part but have no idea in getting the result into xls or csv.

    Any help would be appreciated.

    Thanks

    Mohamed

    attached mail follows:


    Dear DPHPEdit users,

    You can now report bugs, request features or discuss functionality of DPHPEdit using a newly created forum.

    The forum is accessible through DPHPEdit Home Page - http://www.pleskina.com/dphped or directly: http://www.pleskina.com/dphped/forum_login.php

    Keep looking for new coming versions!

    Greetings to all PHP coders,

    Davor Pleskina

    attached mail follows:


    Say i have a variable $string_var = "Once upon a time";

    is there a way to do this:

    Switch($string_var) { case(contains "Once"): doSomething(); break; case(contains "the end.") doOtherThing(); break; case(contains "time") doNothing(); break; default: echo "ERROR" }

    Thanks Alex

    attached mail follows:


    [snip] Say i have a variable $string_var = "Once upon a time";

    is there a way to do this:

    Switch($string_var) { case(contains "Once"): doSomething(); break; case(contains "the end.") doOtherThing(); break; case(contains "time") doNothing(); break; default: echo "ERROR" } [/snip]

    http://www.php.net/manual/en/control-structures.switch.php

    Yes Virginia, there is a PHP function :^]. You can explode your $string_var into an array, loop through the array and test each word for a match.

    HTH!

    Jay

    attached mail follows:


    Alternatively Alexander, take a look at the string functions eg strstr(), stristr(), and strpos() all of which can be used to make a condition within the case() criteria. Regards, =dn

    > [snip] > Say i have a variable $string_var = "Once upon a time"; > > is there a way to do this: > > Switch($string_var) > { > case(contains "Once"): > doSomething(); > break; > case(contains "the end.") > doOtherThing(); > break; > case(contains "time") > doNothing(); > break; > default: > echo "ERROR" > } > [/snip] > > http://www.php.net/manual/en/control-structures.switch.php > > Yes Virginia, there is a PHP function :^]. You can explode your $string_var > into an array, loop through the array and test each word for a match. > > HTH! > > Jay > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Hello,

    Is there a possibility to call (jump not include) with some parameters (index.php?var1=tttt&var2=pppp) a php page without click.

    For example : case "todo": call here index.php?var1=tttt&var2=pppp <--- jump to this page break;

    bye

    Christian,

    attached mail follows:


    header("Location: index.php?var1=tttt&var2=pppp");

    make sure you send this before outputting anything to the browser.

    Justin French

    on 14/08/02 1:49 AM, Christian Ista (christian.istateledisnet.be) wrote:

    > Hello, > > Is there a possibility to call (jump not include) with some parameters > (index.php?var1=tttt&var2=pppp) a php page without click. > > For example : > case "todo": > call here index.php?var1=tttt&var2=pppp <--- jump to this page > break; > > bye > > Christian, >

    attached mail follows:


    case "todo": header('Location: index.php?var1=tttt&var2=pppp'); exit; case 'aaa': header('Location: index.php?var1=asddt&var2=ppapp'); exit;

    Regards, Daniel Kushner danielwebsapp.com ______________________________________________ Need hosting? http://www.thehostingcompany.us/

    > -----Original Message----- > From: Christian Ista [mailto:christian.istateledisnet.be] > Sent: Tuesday, August 13, 2002 11:50 AM > To: php-generallists.php.net > Subject: [PHP] relocation > > > Hello, > > Is there a possibility to call (jump not include) with some parameters > (index.php?var1=tttt&var2=pppp) a php page without click. > > For example : > case "todo": > call here index.php?var1=tttt&var2=pppp <--- jump to this page > break; > > bye > > Christian, > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Perhaps with a HEADER statement.

    i.e. headers("index.php?var=value&var2=value2");

    =P e p i e D e s i g n s www.pepiedesigns.com Providing Solutions That Increase Productivity

    Web Developement. Database. Hosting. Multimedia.

    On Tue, 13 Aug 2002, Christian Ista wrote:

    > Hello, > > Is there a possibility to call (jump not include) with some parameters > (index.php?var1=tttt&var2=pppp) a php page without click. > > For example : > case "todo": > call here index.php?var1=tttt&var2=pppp <--- jump to this page > break; > > bye > > Christian, > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Or even

    header("Location: index.php?var=value&var2=value2");

    And you would probably want to follow that with

    exit;

    Rather than

    break;

    HTH,

    Richy ========================================== Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: rblackdatavisibility.co.uk

    -----Original Message----- From: [-^-!-%- [mailto:monfortkahuna.sdsu.edu] Sent: 13 August 2002 16:55 To: Christian Ista Cc: php-generallists.php.net Subject: Re: [PHP] relocation

    Perhaps with a HEADER statement.

    i.e. headers("index.php?var=value&var2=value2");

    =P e p i e D e s i g n s www.pepiedesigns.com Providing Solutions That Increase Productivity

    Web Developement. Database. Hosting. Multimedia.

    On Tue, 13 Aug 2002, Christian Ista wrote:

    > Hello, > > Is there a possibility to call (jump not include) with some parameters > (index.php?var1=tttt&var2=pppp) a php page without click. > > For example : > case "todo": > call here index.php?var1=tttt&var2=pppp <--- jump to this page > break; > > bye > > Christian, > > > -- > 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:


    Anyone have any idea how to easily interface with the Ebay engine other then with the expensive developer subscription?

    Adam Voigt adam.voigtcryptocomm.com

    attached mail follows:


    Well not a legal idea no :)

    Andrew ----- Original Message ----- From: "Adam Voigt" <adam.voigtcryptocomm.com> To: <php-generallists.php.net> Sent: Tuesday, August 13, 2002 4:52 PM Subject: [PHP] PHP-Ebay Interface

    > Anyone have any idea how to easily > interface with the Ebay engine other > then with the expensive developer > subscription? > > Adam Voigt > adam.voigtcryptocomm.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    I am trying to write a function that builds a multiple-choice drop down list. As such, I need to specify an array in the name attribute of the <select> tag. I am trying to pass a parameter to the function which gets used as this name attribute, but seem to be having problems with the square brackets. In the example below, I would like to submit the $elementname variable to a function, but can't get it to take the '[' and ']' characters. My resultant $_POST[] variable is empty. Any hints?

    HARD-CODED VERSION

    echo "<select name='cgroup_1[]' multiple size='5'>";

    echo "<option value = '$chon_group_a[1]' selected>$chon_group_a[1]</option>";

    echo "<option value = '$chon_group_a[2]'>$chon_group_a[2]</option>";

    echo "<option value = '$chon_group_a[3]'>$chon_group_a[3]</option>";

    echo "<option value = '$chon_group_a[4]'>$chon_group_a[4]</option>";

    echo "</select>";

    //the $chon_group_a is a locally defined array that does not seem to be causing any problems

    DESIRED FUNCTION VERSION

    $elementname="cgroup_1[]";

    $elementsarray=$chon_group_a;

    PrintOptionBox($elementname,$elementsarray);

    attached mail follows:


    > -----Original Message----- > From: Bill Hudspeth [mailto:wbhkunm.edu] > Sent: 13 August 2002 17:10

    [....]

    > DESIRED FUNCTION VERSION > > > > $elementname="cgroup_1[]"; > > $elementsarray=$chon_group_a; > > PrintOptionBox($elementname,$elementsarray);

    Well, looks ok-ish so far -- what's in the PrintOptionBox function, and how exactly does it fail (intended vs actual results)?

    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:


    You'll find the values accessible in $_POST as $_POST['cgroup_1']['0'], $_POST['cgroup_1']['1'], etc.

    $_POST itself is an array, and so is your variable.

    HTH

    Mike

    "Bill Hudspeth" <wbhkunm.edu> wrote in message news:20020813161220.75407.qmailpb1.pair.com... > I am trying to write a function that builds a multiple-choice drop down > list. As such, I need to specify an array in the name attribute of the > <select> tag. I am trying to pass a parameter to the function which gets > used as this name attribute, but seem to be having problems with the square > brackets. In the example below, I would like to submit the $elementname > variable to a function, but can't get it to take the '[' and ']' characters. > My resultant $_POST[] variable is empty. Any hints? > > > > > > HARD-CODED VERSION > > > > echo "<select name='cgroup_1[]' multiple size='5'>"; > > echo "<option value = '$chon_group_a[1]' > selected>$chon_group_a[1]</option>"; > > echo "<option value = '$chon_group_a[2]'>$chon_group_a[2]</option>"; > > echo "<option value = '$chon_group_a[3]'>$chon_group_a[3]</option>"; > > echo "<option value = '$chon_group_a[4]'>$chon_group_a[4]</option>"; > > echo "</select>"; > > > > file://the $chon_group_a is a locally defined array that does not seem to be > causing any problems > > > > DESIRED FUNCTION VERSION > > > > $elementname="cgroup_1[]"; > > $elementsarray=$chon_group_a; > > PrintOptionBox($elementname,$elementsarray); > > >

    attached mail follows:


    Hi All,

    I have been asked by a rep at a large software dev company about any websites live-to-the-world running OS X. We are, but we're not exactly huge (max hits/day = approx. 1000, mostly internal).

    So, what sites are you aware of? They don't even have to be running PHP. Please let me know.

    -michael

    attached mail follows:


    A good reference I can point you to is Netcraft.com, they record what OS/Webserver 1000s of sites are using, you can type in a website name and it will tell you all sorts of stats... Usally it will also tell you other similar sites running on the same OS and or Server... but for some reason it doesn't show other MacOSX websites... But if you want to guess a few than you can check...

    I know that apple.com is MacOSX :)

    Andrew ----- Original Message ----- From: "Michael Geary" <listmailgearyweb.com> To: <php-generallists.php.net> Sent: Tuesday, August 13, 2002 5:28 PM Subject: [PHP] requesting sites running OS X

    > Hi All, > > I have been asked by a rep at a large software dev company about any > websites live-to-the-world running OS X. We are, but we're not exactly > huge (max hits/day = approx. 1000, mostly internal). > > So, what sites are you aware of? They don't even have to be running PHP. > Please let me know. > > -michael > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    I read somewhere that MacOSX servers are showing up/being grouped as as Unix/BSD.

    On Tuesday, August 13, 2002, at 12:43 PM, Andrew Brampton wrote:

    > ... but for some reason it > doesn't show other MacOSX websites...

    --
    Brent Baisley
    Systems Architect
    Landover Associates, Inc.
    Search & Advisory Services for Advanced Technology Environments
    p: 212.759.6400/800.759.0577
    

    attached mail follows:


    On Wed, 14 Aug 2002, Robert Parker wrote:

    >-On Tuesday 13 August 2002 10:57 am, you wrote: >-> MD5 encryption of passwords is secure since you do not need to decrypt the >-> password ever (in fact you can't). You just encrypt the password that the >-> user entered and check if the MD5 of each password is the same, then the >-> user most likely entered the correct password. >- >-I don't remember where I read this but it only takes the crackers about 1 - 2 >-seconds to crack your average MD5 encrypted password. This is quite logical >-because all they had to do is make a database of all of the MD5 sums of all >-the passwords in the various dictionaries. >-The only Linux distro in my (limited) experience that gave the option of MD5 >-encryption of passwords was Debian 2. Even then you had the option of shadow >-password files instead. Debian 2 is quite old. Later distros such as Mandrake >-8.0 and up simply use shadow password files without other option. >- >-Regards >-Bob Parker

    Bob, this is an excellent point.

    Your statement seems to assume the crackers have made off with the list of MD5 hashes for the passwords. One way to foil their attempts at "guessing" the original strings from the MD5 hashes is to incorporate code that prepends or appends a system string known only to the webmaster when creating the MD5 hash. Of cource if they have made their way into your system deep enough to get the MD5 info, then they might also have the system string. Oh well.

    MD5 is pretty much impractical to decrypt, but if the passwords that create the MD5 sums are easy to guess, then dictionary attacks are still useful are are a bigger problem that MD5, SHA or any other hash generator.

    I see the only way around this is to regularly require your users to reverify several answers to several questions on each login or, perhaps, every month or so.

    So instead of requesting: username: password:

    One could ask: username: password: pet's name: mother maidenname: etc.: etc.:

    As always, the question remains - How much security is too much security?

    John

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

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

    John Huggins VANet

    jhugginsva.net http://www.va.net/

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

    attached mail follows:


    After reading other posts, I have found that there are two ways to disable use_trans_sid at runtime. I do NOT have the ability to change the php.ini file, so I am stuck with handling this at runtime.

    1. in code: ini_set("session.use_trans_sid","0");

    2. in an .htaccess file: <IfModule mod_php4.c> php_value session.use_trans_sid 0 </IfModule>

    I have found that using the htaccess method work very well, however it affects an entire directory. If I want to only disable use_trans_sid on certain pages, I need to use the code method. However, I have yet to be able to get it to work. Here's a sample of the code I'm using:

    <?php $something = ini_set("session.use_trans_sid","0");

    include... ?>

    and so on. That code snippet is the first thing in my file, before any other HTML or PHP code, yet I still get PHPSESSIONID in my URLs when cookies are turn off. Any ideas?

    php4.2.1 apache1.3.22 linux

    Thanks,

    Sean

    attached mail follows:


    You cannot do it inside the script as the trans-sid stuff happens before your script is executed. The setting is changed, so ini_set() is doing its job, it's just that it sets it too late.

    In your .htacess file, just do it per-location:

    <Location foo.php> php_value session.use_trans_sid 0 </Location>

    -Rasmus

    On Tue, 13 Aug 2002, Sean Brown wrote:

    > After reading other posts, I have found that there are two ways to disable > use_trans_sid at runtime. I do NOT have the ability to change the php.ini > file, so I am stuck with handling this at runtime. > > 1. in code: > ini_set("session.use_trans_sid","0"); > > 2. in an .htaccess file: > <IfModule mod_php4.c> > php_value session.use_trans_sid 0 > </IfModule> > > I have found that using the htaccess method work very well, however it > affects an entire directory. If I want to only disable use_trans_sid on > certain pages, I need to use the code method. However, I have yet to be > able to get it to work. Here's a sample of the code I'm using: > > <?php > $something = ini_set("session.use_trans_sid","0"); > > include... > ?> > > and so on. That code snippet is the first thing in my file, before any > other HTML or PHP code, yet I still get PHPSESSIONID in my URLs when cookies > are turn off. Any ideas? > > php4.2.1 > apache1.3.22 > linux > > Thanks, > > Sean > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Hello, We have ordered Interbase 6.5 last week, but I was wondering if it is even supported by PHP at this moment since the 6.5 version is not open source. Does anyone have experience with this version? Kind regards, Jeroen Geusebroek

    attached mail follows:


    Hello,

    Currently I am using following method to generate dynamic page content:

    1. Create a page template, in which the places where substitution is supposed to take place are marked by a key bracketed with '{' and '}'. For example: {news}, {date}, {headlines}, {article_content}..

    2. in php script: - prepare all the content and assign them to varialbes which have exactly the same name as the keys in the template. for example: $news = "..."; $headlines = "..."; ....

    - create a array using all the keys in the template. in this example it is: $keys = array (news, date, headlines, article_content);

    - dump the template into a buffer: $page = file ($template_file_path);

    - do replacement: foreach ($keys as $key ){ $page = str_replace ('{'.$key.'}', $$key, $page); }

    - send out the page: print $page;

    OKay, this process works perfect. However I am thinking that this might not be a effective way do to replacement because for each key replacement the whole template has to be scanned. No, this is too expensive. What I am currently thinking is, just use one scan but do all replacements. Here is my proposed solution:

    1. create an associcate array using the keys and their values: $pattern = array ( news => "..."; date => "...", headlines => "...", .... );

    2. scan the template and, when found something matched with '{[what_ever_a_key]}', replace it with $pattern[what_ever_a_key].

    I would assume that with step 2 just one scan all replacements can be done. However I don't know with what php function and regex this solution can be implemented. Any suggestion, advice are highly appreciated!

    alex

    -- 
    ---------------------------
    TrafficBuilder Network: 
    http://www.bestadv.net/index.cfm?ref=7029
    

    attached mail follows:


    http://www.php.net/manual/en/function.str-replace.php In PHP 4.0.5 and later, every parameter to str_replace() can be an array.

    attached mail follows:


    I have some bussiness logic that states a specific piece of info be displayed on a specific day and then replaced by another piece of info when the date roll arround. The problem is that it isn't a fixed date. The logic is like:

    First Sunday in January display info 1 Last Sunday in May display info2 Last Sunday in August display info3

    Has anyone worked out this type of scinerio to find the dates?

    Thanks

    Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Fax: (504) 248-3866 Email : rcollinsnorta.com < <mailto:rcollinsnorta.com> mailto:rcollinsnorta.com>

    attached mail follows:


    Yes, the Date/Calc.php class in PEAR can do this.

    -Rasmus

    On Tue, 13 Aug 2002, Collins, Robert wrote:

    > I have some bussiness logic that states a specific piece of info be > displayed on a specific day and then replaced by another piece of info when > the date roll arround. The problem is that it isn't a fixed date. The logic > is like: > > First Sunday in January display info 1 > Last Sunday in May display info2 > Last Sunday in August display info3 > > Has anyone worked out this type of scinerio to find the dates? > > Thanks > > Robert W. Collins II > Webmaster > New Orleans Regional Transit Authority > Phone : (504) 248-3826 > Fax: (504) 248-3866 > Email : rcollinsnorta.com < <mailto:rcollinsnorta.com> > mailto:rcollinsnorta.com> > >

    attached mail follows:


    Any idea why this is not working...

    $file = fopen("Counter.txt", "r+");

    $counter = fread($file, filesize("Counter.txt")); fwrite($file, "$counter", strlen($counter));

    echo '<form name="studVer" action = "ThisSameFile.php" method="post">';

    if(empty($SomeVariable...)){ $counter++;

    // Here counter indicates that it has been incremented... echo "counter = $counter";

    // For some reason the updated value is not written // to Counter.txt fwrite($file, "$counter", strlen($counter)); fclose($file);

    // Again this indicates that the value of $counter // has actually gone up... echo "counter = $counter";

    I submit here...

    The String in Counter.txt is always 0 why is this...

    attached mail follows:


    > $file = fopen("Counter.txt", "r+");

    You need to open the file with write access and PHP must have write permission....

    e.g. $file = fopen("Counter.txt", "w+");

    Mike D...

    -- 
    Mike Dunlop
    Webmaster
    Animation World Network
    webmasterawn.com
    http://www.awn.com
    (323) 606-4238 office
    (323) 466-6619 fax
    6525 Sunset Blvd.  GS10 Los Angeles, CA  90028
    USA
    

    attached mail follows:


    Hello, I'm trying to install php 4.2.2 + apache 1.3.26 + pgsql 7.2

    In my installation I do this:

    in apache: ./configure cd ../php-4.2.2 ./configure --with-pgsql=/usr/local/pgsql/ --with-apache=../apache_1.3.26/ cd ../apache_1.3.26 ./configure --prefix=/usr/local/apache --enable-module=src/modules/php4/libphp4.a make make install cd ../php-4.2.2 make make install

    and when I saw phpinfo(); the Configure Command appears like this './configure' '--with-apache=../apache_1.3.26'

    and I can't use postgresql

    please I need some help!

    attached mail follows:


    Question friends...Sorry to bug, but the documentation wasn't too clear.

    When using set_time_limit() to override the default PHP time limit. Is this syntax tacked on to the end of a QUERY?

    ALA.... mysql_select_db("files", $db, set_time_limit("0"));

    I have an upload page that is farting out when the 30 second time limit is reached. I am using a mySQL query to store my binary files in a DB. Is the above code snippet the proper syntax to use set_time_limit()?

    Or am I just high on crack? Thanks for your help gang. - NorthBayShane

    attached mail follows:


    set_time_limit(0); mysql_select_db("files", $db);

    Daniel Kushner danielwebsapp.com ______________________________________________ Need hosting? http://www.thehostingcompany.us/

    > -----Original Message----- > From: Shane [mailto:shanedelaplaine.com] > Sent: Tuesday, August 13, 2002 2:38 PM > To: php-gen > Subject: [PHP] Pls Help: Quickie: set_time_limit > > > Question friends...Sorry to bug, but the documentation wasn't too clear. > > When using set_time_limit() to override the default PHP time > limit. Is this syntax tacked on to the end of a QUERY? > > ALA.... > mysql_select_db("files", $db, set_time_limit("0")); > > I have an upload page that is farting out when the 30 second time > limit is reached. I am using a mySQL query to store my binary > files in a DB. Is the above code snippet the proper syntax to use > set_time_limit()? > > Or am I just high on crack? > Thanks for your help gang. > - NorthBayShane > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    At some point recently, PHP/Apache running on FreeBSD decided that i'm on GMT, instead of EST5EDT. The system date is correct:

    bash-2.05a# date Tue Aug 13 14:39:37 EDT 2002

    But phpinfo() shows me:

    _ENV["TZ"] GMT

    What's the best way to get PHP thinking I'm in eastern time again?

    Thanks, Wade

    -- 
    If you have a VCR or MP3 player, you need to read these links:
    

    http://www.digitalconsumer.org/ http://digitalspeech.org/ http://www.libertyboard.org/

    attached mail follows:


    Fix your Apache startup environment so TZ is set correctly.

    On Tue, 13 Aug 2002, H. Wade Minter wrote:

    > At some point recently, PHP/Apache running on FreeBSD decided that i'm on > GMT, instead of EST5EDT. The system date is correct: > > bash-2.05a# date > Tue Aug 13 14:39:37 EDT 2002 > > But phpinfo() shows me: > > _ENV["TZ"] GMT > > What's the best way to get PHP thinking I'm in eastern time again? > > Thanks, > Wade > > > > -- > If you have a VCR or MP3 player, you need to read these links: > > http://www.digitalconsumer.org/ > http://digitalspeech.org/ > http://www.libertyboard.org/ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    On Tue, 13 Aug 2002, Rasmus Lerdorf wrote:

    > Fix your Apache startup environment so TZ is set correctly.

    I've got this in the apache startup script, but it's still on GMT:

    bash-2.05a# head /usr/local/etc/rc.d/apache.sh #!/bin/sh

    TZ="EST5EDT"; export TZ

    case "$1" in start) [ -x /usr/local/sbin/apachectl ] && /usr/local/sbin/apachectl startssl > /dev/null && echo -n ' apache' ;; stop) [ -r /var/run/httpd.pid ] && /usr/local/sbin/apachectl stop > /dev/null && echo -n ' apache'

    -- 
    If you have a VCR or MP3 player, you need to read these links:
    

    http://www.digitalconsumer.org/ http://digitalspeech.org/ http://www.libertyboard.org/

    attached mail follows:


    You should really fix it at the core of the issue but... putenv("TZ=EST5EDT"); will work..

    -Brian

    > -----Original Message----- > From: H. Wade Minter [mailto:minterlunenburg.org] > Sent: Tuesday, August 13, 2002 2:44 PM > To: php-generallists.php.net > Subject: [PHP] Fixing timezone issues > > > At some point recently, PHP/Apache running on FreeBSD decided that i'm on > GMT, instead of EST5EDT. The system date is correct: > > bash-2.05a# date > Tue Aug 13 14:39:37 EDT 2002 > > But phpinfo() shows me: > > _ENV["TZ"] GMT > > What's the best way to get PHP thinking I'm in eastern time again? > > Thanks, > Wade > > > > -- > If you have a VCR or MP3 player, you need to read these links: > > http://www.digitalconsumer.org/ > http://digitalspeech.org/ > http://www.libertyboard.org/ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

    attached mail follows:


    Well, now you are getting into system configuration issues. You need to figure out why your TZ is getting ignored and where GMT is coming from in your environment. I don't think this has anything to do with PHP.

    -Rasmus

    On Tue, 13 Aug 2002, H. Wade Minter wrote:

    > On Tue, 13 Aug 2002, Rasmus Lerdorf wrote: > > > Fix your Apache startup environment so TZ is set correctly. > > I've got this in the apache startup script, but it's still on GMT: > > > bash-2.05a# head /usr/local/etc/rc.d/apache.sh > #!/bin/sh > > TZ="EST5EDT"; export TZ > > case "$1" in > start) > [ -x /usr/local/sbin/apachectl ] && /usr/local/sbin/apachectl > startssl > /dev/null && echo -n ' apache' > ;; > stop) > [ -r /var/run/httpd.pid ] && /usr/local/sbin/apachectl stop > > /dev/null && echo -n ' apache' > > -- > If you have a VCR or MP3 player, you need to read these links: > > http://www.digitalconsumer.org/ > http://digitalspeech.org/ > http://www.libertyboard.org/ >

    attached mail follows:


    hello :-)

    I have a string of 50 characters in length, including numbers and letters. I want to cut of the first 20 characters. Can anyone help me as to how I can achieve this?

    Thank you, regards Hans

    attached mail follows:


    php.net/substr

    On Tue, 13 Aug 2002, Hans wrote:

    > hello :-) > > I have a string of 50 characters in length, including numbers and letters. I > want to cut of the first 20 characters. Can anyone help me as to how I can > achieve this? > > Thank you, > regards Hans > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    How do I count how many times a user clicks on a certain link? (and put it into and array or variable I guess).

    I want to be able to repeat a certain action on the same page as many times as the user clicks on the link($PHP_SELF).

    Thanks,

    - Vic

    ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca

    attached mail follows:


    Write a link wrapper that you would use like this:

    <a href="wrap.php/www.domain.com/path/file.html">

    Then in wrap.php:

    <?php $link = substr($PATH_INFO,1); ... increment counter in database for $link ... header('Location: $link'); ?>

    -Rasmus

    On Tue, 13 Aug 2002 victorargilent.com wrote:

    > How do I count how many times a user clicks on a certain link? (and put > it into and array or variable I guess). > > I want to be able to repeat a certain action on the same page as many > times as the user clicks on the link($PHP_SELF). > > Thanks, > > - Vic > > > > ______________________________________________________________________ > Post your ad for free now! http://personals.yahoo.ca > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Really? That sounds more complicated than I think I need it to be, can't I use something like:

    '<a href="'.$PHP_SELF.'?add_form='.$value.'">'

    and somehow (this is what I need to know) get $value to increase in value as the user clicks on the link again and again...

    What I want to do in the final product is to display a text imput form onece and if the user clicks on the link the form (same) will be displayed again under the first one.

    - Vic

    -----Original Message----- From: Rasmus Lerdorf [mailto:rasmusphp.net] Sent: Tuesday, August 13, 2002 2:49 PM To: victorargilent.com Cc: php-generallists.php.net Subject: Re: [PHP] count link clicks

    Write a link wrapper that you would use like this:

    <a href="wrap.php/www.domain.com/path/file.html">

    Then in wrap.php:

    <?php $link = substr($PATH_INFO,1); ... increment counter in database for $link ... header('Location: $link'); ?>

    -Rasmus

    On Tue, 13 Aug 2002 victorargilent.com wrote:

    > How do I count how many times a user clicks on a certain link? (and put > it into and array or variable I guess). > > I want to be able to repeat a certain action on the same page as many > times as the user clicks on the link($PHP_SELF). > > Thanks, > > - Vic > > > > ______________________________________________________________________ > Post your ad for free now! http://personals.yahoo.ca > > -- > 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
    

    ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca

    attached mail follows:


    > Really? That sounds more complicated than I think I need it to be, can't > I use something like: > > '<a href="'.$PHP_SELF.'?add_form='.$value.'">' > > and somehow (this is what I need to know) get $value to increase in > value as the user clicks on the link again and again...

    Nope, you would be fighting race conditions forever with an approach like that. You need an atomic way to increment a counter. The best way to do that is to use the builtin atomicity of a database engine.

    -Rasmus

    attached mail follows:


    I have no database, this has to be done in PHP

    - Vic

    -----Original Message----- From: Rasmus Lerdorf [mailto:rasmusphp.net] Sent: Tuesday, August 13, 2002 3:05 PM To: vic Cc: victorargilent.com; php-generallists.php.net Subject: RE: [PHP] count link clicks

    > Really? That sounds more complicated than I think I need it to be, can't > I use something like: > > '<a href="'.$PHP_SELF.'?add_form='.$value.'">' > > and somehow (this is what I need to know) get $value to increase in > value as the user clicks on the link again and again...

    Nope, you would be fighting race conditions forever with an approach like that. You need an atomic way to increment a counter. The best way to do that is to use the builtin atomicity of a database engine.

    -Rasmus

    ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca

    attached mail follows:


    Then you are going to have to lock a text file, but chances are you will end up deadlocking things. I'd rethink the whole thing if I were you.

    -Rasmus

    On Tue, 13 Aug 2002, vic wrote:

    > I have no database, this has to be done in PHP > > - Vic > > > -----Original Message----- > From: Rasmus Lerdorf [mailto:rasmusphp.net] > Sent: Tuesday, August 13, 2002 3:05 PM > To: vic > Cc: victorargilent.com; php-generallists.php.net > Subject: RE: [PHP] count link clicks > > > Really? That sounds more complicated than I think I need it to be, > can't > > I use something like: > > > > '<a href="'.$PHP_SELF.'?add_form='.$value.'">' > > > > and somehow (this is what I need to know) get $value to increase in > > value as the user clicks on the link again and again... > > Nope, you would be fighting race conditions forever with an approach > like > that. You need an atomic way to increment a counter. The best way to > do > that is to use the builtin atomicity of a database engine. > > -Rasmus > > ______________________________________________________________________ > Post your ad for free now! http://personals.yahoo.ca >

    attached mail follows:


    I think I'm on the right track with:

    <?php

    $i = $value++;

    // Show first link echo '<a href="'.$PHP_SELF.'?add_form='.$value.'"> New paragraph </a> </font>'; // Isert form html into $data_fields variable $data_fields = '<html html blah blah> <a href="'.$PHP_SELF.'?add_form='.$value.'"> New paragraph </a>';

    while ($i = $value) { echo $data_fields; }

    ?>

    The only problem is that it runs for an infinite number of times, I want it to run for as many times as the http://domain.com?add_form=1 (IE: 1 in this case) defines.

    - Vic

    ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca

    attached mail follows:


    You need to use a javascript (client side language) if you want to accomplish this without reloading the page.

    Something like thike this but you would need to do some more R&D at a javascript form or something cuz I know PHP a lot better than javascript =======================================================================================================================

    The functions:

    <script language="Javascript"> var count; function addForm() { if(!count) { count=0; } writeForm(count); count++; }

    function writeForm(num) { var link = '<a href="javascript:void(0);" onMouseDown="addForm('+num+');">' }

    </script>

    You're link:

    <a href=\"javascript:void(0);\" onMouseDown=\"addForm();\">

    More stuff here...

    >Really? That sounds more complicated than I think I need it to be, can't >I use something like: > >'<a href="'.$PHP_SELF.'?add_form='.$value.'">' > >and somehow (this is what I need to know) get $value to increase in >value as the user clicks on the link again and again... > >What I want to do in the final product is to display a text imput form >onece and if the user clicks on the link the form (same) will be >displayed again under the first one. > >- Vic > > >-----Original Message----- >From: Rasmus Lerdorf [mailto:rasmusphp.net] >Sent: Tuesday, August 13, 2002 2:49 PM >To: victorargilent.com >Cc: php-generallists.php.net >Subject: Re: [PHP] count link clicks > >Write a link wrapper that you would use like this: > > <a href="wrap.php/www.domain.com/path/file.html"> > >Then in wrap.php: > > <?php > $link = substr($PATH_INFO,1); > ... increment counter in database for $link ... > header('Location: $link'); > ?> > >-Rasmus > >On Tue, 13 Aug 2002 victorargilent.com wrote: > >> How do I count how many times a user clicks on a certain link? (and >put >> it into and array or variable I guess). >> >> I want to be able to repeat a certain action on the same page as many >> times as the user clicks on the link($PHP_SELF). >> >> Thanks, >> >> - Vic >> >> >> >> ______________________________________________________________________ >> Post your ad for free now! http://personals.yahoo.ca >> >> -- >> 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 > >______________________________________________________________________ >Post your ad for free now! http://personals.yahoo.ca > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php

    -- 
    Mike Dunlop
    Webmaster
    Animation World Network
    webmasterawn.com
    http://www.awn.com
    (323) 606-4238 office
    (323) 466-6619 fax
    6525 Sunset Blvd.  GS10 Los Angeles, CA  90028
    USA
    

    attached mail follows:


    -----Original Message----- From: victorargilent.com [mailto:victorargilent.com] Sent: Tuesday, August 13, 2002 12:23 PM To: 'Rasmus Lerdorf'; 'vic' Cc: php-generallists.php.net Subject: RE: [PHP] count link clicks

    I think I'm on the right track with:

    <?php ////////////////////////////// // CHANGE THIS: // // $i = $value++; // /////////////////////////////// // TO THIS: $value = $add_form + 1;

    // Show first link echo '<a href="'.$PHP_SELF.'?add_form='.$value.'"> New paragraph </a> </font>'; // Isert form html into $data_fields variable $data_fields = '<html html blah blah> <a href="'.$PHP_SELF.'?add_form='.$value.'"> New paragraph </a>';

    //////////////////////////////////// // CHANGE THIS: // // while ($i = $value) { // echo $data_fields; // } // //////////////////////////////////// // TO THIS: for($i=0; $i<$add_form; $i++) { echo $data_fields; }

    ?>

    The only problem is that it runs for an infinite number of times, I want it to run for as many times as the http://domain.com?add_form=1 (IE: 1 in this case) defines.

    - Vic

    ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca

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

    attached mail follows:


    Can someone tell me how I can make an array increase its index? (ie a script that pushes values into an array)

    I figured if in the link:

    <a href="'.$PHP_SELF.'?add_form='.$value.'">

    instead of $value (or if value was an array) I could do something like:

    for ($i=0; $i<count($myarray); i++) {

    }

    or something like:

    foreach($array as $num) {

    }

    I really wish I knew how to make something like:

    If isset blah blah increase the values in this array and then echo this variable as many times as array has values;

    - Vic

    -----Original Message----- From: victorargilent.com [mailto:victorargilent.com] Sent: Tuesday, August 13, 2002 3:23 PM To: 'Rasmus Lerdorf'; 'vic' Cc: php-generallists.php.net Subject: RE: [PHP] count link clicks

    I think I'm on the right track with:

    <?php

    $i = $value++;

    // Show first link echo '<a href="'.$PHP_SELF.'?add_form='.$value.'"> New paragraph </a> </font>'; // Isert form html into $data_fields variable $data_fields = '<html html blah blah> <a href="'.$PHP_SELF.'?add_form='.$value.'"> New paragraph </a>';

    while ($i = $value) { echo $data_fields; }

    ?>

    The only problem is that it runs for an infinite number of times, I want it to run for as many times as the http://domain.com?add_form=1 (IE: 1 in this case) defines.

    - Vic

    ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca

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

    ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca

    attached mail follows:


    THANK YOU! THANK YOU! This does exactly what I need it to! I wish they thought me how to count at PHP kindergarten.

    - Vic

    -----Original Message----- From: Dave at Sinewaves.net [mailto:eightrackearthlink.net] Sent: Tuesday, August 13, 2002 3:20 PM To: victorargilent.com; 'Rasmus Lerdorf'; 'vic' Cc: php-generallists.php.net Subject: RE: [PHP] count link clicks

    -----Original Message----- From: victorargilent.com [mailto:victorargilent.com] Sent: Tuesday, August 13, 2002 12:23 PM To: 'Rasmus Lerdorf'; 'vic' Cc: php-generallists.php.net Subject: RE: [PHP] count link clicks

    I think I'm on the right track with:

    <?php ////////////////////////////// // CHANGE THIS: // // $i = $value++; // /////////////////////////////// // TO THIS: $value = $add_form + 1;

    // Show first link echo '<a href="'.$PHP_SELF.'?add_form='.$value.'"> New paragraph </a> </font>'; // Isert form html into $data_fields variable $data_fields = '<html html blah blah> <a href="'.$PHP_SELF.'?add_form='.$value.'"> New paragraph </a>';

    //////////////////////////////////// // CHANGE THIS: // // while ($i = $value) { // echo $data_fields; // } // //////////////////////////////////// // TO THIS: for($i=0; $i<$add_form; $i++) { echo $data_fields; }

    ?>

    The only problem is that it runs for an infinite number of times, I want it to run for as many times as the http://domain.com?add_form=1 (IE: 1 in this case) defines.

    - Vic

    ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca

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

    ______________________________________________________________________ Post your ad for free now! http://personals.yahoo.ca

    attached mail follows:


    If I have a string variable that is already of the form ('item','item2','item3') [including the parens and quotes in the string], is there an easy way to change that variable into an array?? Array($var) doesn't work. Thanks

    attached mail follows:


    Hi Alexander,

    Have a look at the 'explode'-function (http://www.php.net/manual/en/function.explode.php). That should do the trick.

    Success!

    Sacha Telgenhof

    "Alexander Ross" <alexrossbleen.net> wrote in message news:20020813185039.42016.qmailpb1.pair.com... > If I have a string variable that is already of the form > ('item','item2','item3') [including the parens and quotes in the string], > is there an easy way to change that variable into an array?? > Array($var) doesn't work. Thanks > >

    attached mail follows:


    Two ways I can think of off the top of my head:

    $s = "('item','item2','item3')"; preg_match_all("/'(.*?)'/",$s,$regs); $result = $regs[1];

    or

    $s = "('item','item2','item3')"; eval('$result = array'.$s.';');

    Neither is very efficient though. eval() is particularly ugly.

    -Rasmus

    On Tue, 13 Aug 2002, Alexander Ross wrote:

    > If I have a string variable that is already of the form > ('item','item2','item3') [including the parens and quotes in the string], > is there an easy way to change that variable into an array?? > Array($var) doesn't work. Thanks > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Ignore my first reply. I didn't read the question properly.

    Sorry.

    Greetz, Sacha Telgenhof

    "Alexander Ross" <alexrossbleen.net> wrote in message news:20020813185039.42016.qmailpb1.pair.com... > If I have a string variable that is already of the form > ('item','item2','item3') [including the parens and quotes in the string], > is there an easy way to change that variable into an array?? > Array($var) doesn't work. Thanks > >

    attached mail follows:


    Op dinsdag 13 augustus 2002 20:50, schreef Alexander Ross: > If I have a string variable that is already of the form > ('item','item2','item3') [including the parens and quotes in the string], > is there an easy way to change that variable into an array?? > Array($var) doesn't work. Thanks <? $var="('item1','item2','item3')"; $array=explode(',',str_replace(array('(',')','\''),'',$var)); ?>

    attached mail follows:


    Hello,

    I was doing some fooling around with the ini_set() function and noticed that my scripts stopped functioning altogether (produced blank output). Furthermore, I checked to make sure we actually used a php.ini file and found that we do not. My question is: When using ini_set() without a php.ini file being present does it set all the wouldbe php.ini settings to nothing, making previously relied upon settings non-existent? Some of things I was trying are below:

    ini_set('include_path', '.:..:../..:' . DIR_WS_INCLUDES); tug_error_reporting(PHP_ERROR_REPORTING_LEVEL); tug_ini_set('error_log', FILENAME_PHP_ERROR_LOG); tug_ini_set('log_errors', PHP_LOG_ERRORS); tug_ini_set('display_errors', PHP_DISPLAY_ERRORS); tug_ini_set('track_errors', PHP_TRACK_ERRORS);

    Please CC to my email address as I only receive this list in digest. Thanks! Jacob

    attached mail follows:


    Hi,

    I am currently have PHP 4.0.4p11 and Apache 1.3.19 running on RH Linux 7.1. Now I am thinking of upgrade my PHP to 4.1.2-7 (the version come with RH 7.3). I have downloaded all 4.1.2-7 rpm packages altogether 10 files. I will stay with RH 7.1 but upgrade PHP to 4.1.2-7. I am going to do upgrading later today, but hope to know any advice if any one out there have such experience and has something to say abou this. Thanks in advance!

    Alex

    ----------------------------- TrafficBuilder Network: http://www.bestadv.net/index.cfm?ref=7029

    attached mail follows:


    Final question on this (I hope).

    I have the code together now to put it all the zip codes into and array--but now I need to add those zip codes to a sql statement for the WHERE clause. Example:

    SELECT * FROM [table] WHERE zip="[all the darn zips listed here]"

    (or something like that)

    How would I set it to loop all the zip codes into this statement? I'm not worried about the SQL syntax, I can figure that out without a problem, but the php code is the question. This is in MySQL btw, and I have looked through the docs there and at php for this, but need some help from all you guru's out there.

    Thanks for the help!

    (Previous message here)

    > I have a huge block of zip codes I need to seperate into their constituent > parts for a query of a database. The block looks like this (in part): > > | 36310 ABBEVILLE | > | 35440 ABERNANT | > | 35005 ADAMSVILLE | > | 35540 ADDISON | > | 35006 ADGER | > | 35441 AKRON | > > I need to use eplode (probably) to seperate this all out into two arrays, > one of codes, the other of names--presumably named $zips[] and $cities[] > with the rest of the data dumped. > > I have gone and looked at the various functions docs at php.net, but they > haven't really helped to answer my question as much as I would like. Any > information is appreciated. > > Thanks

    attached mail follows:


    are you trying to insert into MySQL DB? Or select out of the DB?

    insert: table structure: zip city etc...

    connect to db; loop through your array { //while ($array = array_shift($data)) create $sql from array parts ($sql = "insert into table (zip,city) values ('".$array[0]."','".$array[1]."'); $result = mysql_exec($sql,$db); }

    select: connect to db; $sql = "select from table where zip = '".[insert query here]."'"; $result = mysql_exec($sql,$db);

    .m

    > -----Original Message----- > From: Keith Posehn [mailto:kposehnleadingresources.com] > Sent: Tuesday, August 13, 2002 2:14 PM > To: php-generallists.php.net > Subject: [PHP] [Followup] Exploding Zip Codes! (Using PHP's explode > function) > > > Final question on this (I hope). > > I have the code together now to put it all the zip codes into and > array--but > now I need to add those zip codes to a sql statement for the WHERE clause. > Example: > > SELECT * FROM [table] > WHERE zip="[all the darn zips listed here]" > > (or something like that) > > How would I set it to loop all the zip codes into this statement? I'm not > worried about the SQL syntax, I can figure that out without a problem, but > the php code is the question. This is in MySQL btw, and I have looked > through the docs there and at php for this, but need some help > from all you > guru's out there. > > Thanks for the help! > > (Previous message here) > > > I have a huge block of zip codes I need to seperate into their > constituent > > parts for a query of a database. The block looks like this (in part): > > > > | 36310 ABBEVILLE | > > | 35440 ABERNANT | > > | 35005 ADAMSVILLE | > > | 35540 ADDISON | > > | 35006 ADGER | > > | 35441 AKRON | > > > > I need to use eplode (probably) to seperate this all out into > two arrays, > > one of codes, the other of names--presumably named $zips[] and $cities[] > > with the rest of the data dumped. > > > > I have gone and looked at the various functions docs at > php.net, but they > > haven't really helped to answer my question as much as I would like. Any > > information is appreciated. > > > > Thanks > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    How do you post a form without actually waiting for submit button to be pressed? Got a CGI expecting a form post, all the fields are already available as hidden type in a form, and just need to be send it.

    I know you can use Java as such:

    <form method="post" action="CGI.php"> <input type="hidden" name="FName" value="myFirstName"> </form>

    <script type="text/javascript"> document.forms[0].submit(); </script>

    attached mail follows:


    It's pretty easy but can be confusing if you're looking at this stuff for the first time. Look into fsocketopen() and fputs(). You can use Rasmus's posttohost() function if you're not comfortable writing your own. Do a search on www.php.net. Hope this helps. -Kevin

    ----- Original Message ----- From: "GeneralX" <mbsisotsbcglobal.net> To: <php-generallists.php.net> Sent: Tuesday, August 13, 2002 11:53 AM Subject: [PHP] Form Posting from script

    How do you post a form without actually waiting for submit button to be pressed? Got a CGI expecting a form post, all the fields are already available as hidden type in a form, and just need to be send it.

    I know you can use Java as such:

    <form method="post" action="CGI.php"> <input type="hidden" name="FName" value="myFirstName"> </form>

    <script type="text/javascript"> document.forms[0].submit(); </script>

    attached mail follows:


    Glory,

    I'm looking for a new Web Hosting company, to host my sites. I had been with Aletia, but i'm experiencing some technical flaws with them, so i need a new one. Aletia is very economical, with $7.95 a month for 200 MB, 10 GB Bandwidth, sub-domains, dbs, and a hell a lot of goodies. so i would prefer someone like them or better then them. I'd really appreciate if someone can find me a better Host.

    Thanks, T. Edison Jr.

    __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com

    attached mail follows:


    Thomas Edison Jr. wrote: > > Glory, > > I'm looking for a new Web Hosting company, to host my > sites. I had been with Aletia, but i'm experiencing > some technical flaws with them, so i need a new one. > Aletia is very economical, with $7.95 a month for 200 > MB, 10 GB Bandwidth, sub-domains, dbs, and a hell a > lot of goodies. so i would prefer someone like them or > better then them. I'd really appreciate if someone can > find me a better Host. >

    Do you see any correlation between the price and the possible reason for "some technical flaws"? I'm still amused by such statements... :)

    -- 
    ===========================================================================
       Jim Jagielski   [|]   jimjaguNET.com   [|]   http://www.jaguNET.com/
          "A society that will trade a little liberty for a little order
                 will lose both and deserve neither" - T.Jefferson
    

    attached mail follows:


    "Thomas Edison Jr." <thomasedisonjryahoo.com> wrote in message news:20020813200925.59237.qmailweb14104.mail.yahoo.com... > Glory, > > I'm looking for a new Web Hosting company, to host my > sites. I had been with Aletia, but i'm experiencing > some technical flaws with them, so i need a new one. > Aletia is very economical, with $7.95 a month for 200 > MB, 10 GB Bandwidth, sub-domains, dbs, and a hell a > lot of goodies. so i would prefer someone like them or > better then them. I'd really appreciate if someone can > find me a better Host. > > Thanks, > T. Edison Jr. >

    It's hard to obtain a better one considering the price and services.

    Alex

    attached mail follows:


    I've been mostly satisfied with HostRocket.com $15/mo 350Megs, 20Gigs/mo. They have a great control panel.. better than others I've used. The servers are fast and service has been adequate. On the downside they charge $2 extra/mo to host an additional domain on the same account which is.. needless to say.. really lame. It's just one of the ways the big hosts soak you for all you're worth. On the upside they have a really good habit of keeping PHP up-to-date and have no qualms about you installing any special services you need through SSH command line. Something to look into anyway. Good luck with your search. -Kevin

    ----- Original Message ----- From: "Thomas Edison Jr." <thomasedisonjryahoo.com> To: <php-generallists.php.net> Sent: Tuesday, August 13, 2002 2:09 PM Subject: [PHP] Need a Web Host for php/mySQl

    > Glory, > > I'm looking for a new Web Hosting company, to host my > sites. I had been with Aletia, but i'm experiencing > some technical flaws with them, so i need a new one. > Aletia is very economical, with $7.95 a month for 200 > MB, 10 GB Bandwidth, sub-domains, dbs, and a hell a > lot of goodies. so i would prefer someone like them or > better then them. I'd really appreciate if someone can > find me a better Host. > > Thanks, > T. Edison Jr. > > > > __________________________________________________ > Do You Yahoo!? > HotJobs - Search Thousands of New Jobs > http://www.hotjobs.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Hi, I use this query to input data into MySQL DB. EXPIRE is Expire Date! My script allways inputs "1.1.0001" into database (as value of expire). what is wrong?

    My table:

    CREATE TABLE korpa ( idnarudzbeukorpi int(255) DEFAULT '0' NOT NULL auto_increment, mernaj varchar(255) NOT NULL, nazivproizvoda varchar(255) NOT NULL, ip_adresa_narucioca varchar(255) NOT NULL, id_proizvoda varchar(255) NOT NULL, kolicina_proizvoda decimal(255,2) DEFAULT '1.00' NOT NULL, cena decimal(255,2), datum datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, expire datetime, PRIMARY KEY (idnarudzbeukorpi) );

    MySQL query:

    $aSQL2="insert into korpa (mernaj, nazivproizvoda, ip_adresa_narucioca, id_proizvoda, cena, datum, expire) values ('$mernaj', '$naziv', '$ip', '$id', '$cena', now(), now()+3000)";

    Please help me!

    ---------------------- ---------------------- Djurovski Dejan dejanyueunet.yu

    attached mail follows:


    Hi, I use this query to input data into MySQL DB. EXPIRE is Expire Date! My script allways inputs "1.1.0001" into database (as value of expire). what is wrong?

    My table:

    CREATE TABLE korpa ( idnarudzbeukorpi int(255) DEFAULT '0' NOT NULL auto_increment, mernaj varchar(255) NOT NULL, nazivproizvoda varchar(255) NOT NULL, ip_adresa_narucioca varchar(255) NOT NULL, id_proizvoda varchar(255) NOT NULL, kolicina_proizvoda decimal(255,2) DEFAULT '1.00' NOT NULL, cena decimal(255,2), datum datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, expire datetime, PRIMARY KEY (idnarudzbeukorpi) );

    MySQL query:

    $aSQL2="insert into korpa (mernaj, nazivproizvoda, ip_adresa_narucioca, id_proizvoda, cena, datum, expire) values ('$mernaj', '$naziv', '$ip', '$id', '$cena', now(), now()+3000)";

    Please help me!

    ---------------------- ---------------------- Djurovski Dejan dejanyueunet.yu

    attached mail follows:


    Hi Djurovski,

    > I use this query to input data into MySQL DB. > EXPIRE is Expire Date! > My script allways inputs "1.1.0001" into database (as value of expire). > what is wrong? > > My table: > > CREATE TABLE korpa ( > idnarudzbeukorpi int(255) DEFAULT '0' NOT NULL auto_increment, > mernaj varchar(255) NOT NULL, > nazivproizvoda varchar(255) NOT NULL, > ip_adresa_narucioca varchar(255) NOT NULL, > id_proizvoda varchar(255) NOT NULL, > kolicina_proizvoda decimal(255,2) DEFAULT '1.00' NOT NULL, > cena decimal(255,2), > datum datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, > expire datetime, > PRIMARY KEY (idnarudzbeukorpi) > ); > > MySQL query: > > $aSQL2="insert into korpa (mernaj, nazivproizvoda, ip_adresa_narucioca, > id_proizvoda, cena, datum, expire) values ('$mernaj', '$naziv', '$ip', > '$id', '$cena', now(), now()+3000)";

    Adding apples to oranges? expire is a datetime column. what format does now() produce its result in? can an integer (3,000) be added to that? =dn

    attached mail follows:


    Hello everyone id like to know if theres a way to connect to mysql via proxy ... I really need to !! .... Any tip or help would be very useful !!

    attached mail follows:


    Sorry for bringing up an old problem, (there seem to be many articles in the archives already) but I couldn't find the solution there so here is my version of the problem ;-)

    I am running php 4.2.2 on a virtual host, so I have no access to php.ini. But I can use the apache directives in .htaccess which has worked well for me so far. So i have the following directives in the .htaccess in the directory where the relevant upload script is located:

    php_value memory_limit 34M php_value post_max_size 33M php_value upload_max_filesize 32M php_value max_execution_time 600

    So I have memory_limit > post_max_size > upload_max_filesize

    experimentation shows that uploads greater than 8M bomb out. So I check phpinfo() and guess what? It reports post_max_size = 8M. The other 3 config settings have been changed correctly from their master (default) values. but for some reason the post_max_size 33M has been ignored.

    I know that some priviledges are required to be able to change these settings via .htaccess (namely "AllowOverride Options" or "AllowOverride All" privileges) but i thought that these applied to all the settings. So since I can change the first three why not the last one?

    Can my host stop me from changing a single config? If so how, and what do they need to change so I can get post_max_size = 33M?

    Or have i missed something really really stupid?

    Thanks very much in advance

    Oliver

    attached mail follows:


    post_max_size and upload_max_filesize could not be set in your .htaccess file until recently. It was changed about 3 weeks ago, so unless your provider is running a recent snapshot, you won't be able to get this to work.

    Ask your provider to add those lines to your virtualhost block in the httpd.conf file.

    -Rasmus

    On Tue, 13 Aug 2002, [ISO-8859-1] Oliver Schönrock wrote:

    > Sorry for bringing up an old problem, (there seem to be many articles in > the archives already) but I couldn't find the solution there so here is my > version of the problem ;-) > > I am running php 4.2.2 on a virtual host, so I have no access to php.ini. > But I can use the apache directives in .htaccess which has worked well for > me so far. So i have the following directives in the .htaccess in the > directory where the relevant upload script is located: > > php_value memory_limit 34M > php_value post_max_size 33M > php_value upload_max_filesize 32M > php_value max_execution_time 600 > > So I have memory_limit > post_max_size > upload_max_filesize > > experimentation shows that uploads greater than 8M bomb out. So I check > phpinfo() and guess what? It reports post_max_size = 8M. The other 3 config > settings have been changed correctly from their master (default) values. > but for some reason the post_max_size 33M has been ignored. > > I know that some priviledges are required to be able to change these > settings via .htaccess (namely "AllowOverride Options" or "AllowOverride > All" privileges) but i thought that these applied to all the settings. So > since I can change the first three why not the last one? > > Can my host stop me from changing a single config? If so how, and what do > they need to change so I can get post_max_size = 33M? > > Or have i missed something really really stupid? > > Thanks very much in advance > > > Oliver > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Thanks for quick response. Just a couple of silly questions:

    - changed where? in php or apache? My host is running the "three week old" v 4.2.2 of php so I guess you mean apache?

    - If I can in fact get them to change it in http.conf for my virtual host block then I will have these huge (!) settings for my whole site rather than just the necessary scripts. Is there any downside to this (other than misbehaved scripts being really misbehaved)?

    Cheers

    Oliver

    --On 13 August 2002 14:21 -0700 Rasmus Lerdorf <rasmusphp.net> wrote:

    > post_max_size and upload_max_filesize could not be set in your .htaccess > file until recently. It was changed about 3 weeks ago, so unless your > provider is running a recent snapshot, you won't be able to get this to > work. > > Ask your provider to add those lines to your virtualhost block in the > httpd.conf file. > > -Rasmus > > On Tue, 13 Aug 2002, [ISO-8859-1] Oliver Schönrock wrote: > >> Sorry for bringing up an old problem, (there seem to be many articles in >> the archives already) but I couldn't find the solution there so here is >> my version of the problem ;-) >> >> I am running php 4.2.2 on a virtual host, so I have no access to php.ini. >> But I can use the apache directives in .htaccess which has worked well >> for me so far. So i have the following directives in the .htaccess in the >> directory where the relevant upload script is located: >> >> php_value memory_limit 34M >> php_value post_max_size 33M >> php_value upload_max_filesize 32M >> php_value max_execution_time 600 >> >> So I have memory_limit > post_max_size > upload_max_filesize >> >> experimentation shows that uploads greater than 8M bomb out. So I check >> phpinfo() and guess what? It reports post_max_size = 8M. The other 3 >> config settings have been changed correctly from their master (default) >> values. but for some reason the post_max_size 33M has been ignored. >> >> I know that some priviledges are required to be able to change these >> settings via .htaccess (namely "AllowOverride Options" or "AllowOverride >> All" privileges) but i thought that these applied to all the settings. So >> since I can change the first three why not the last one? >> >> Can my host stop me from changing a single config? If so how, and what do >> they need to change so I can get post_max_size = 33M? >> >> Or have i missed something really really stupid? >> >> Thanks very much in advance >> >> >> Oliver >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >>

    Oliver Schönrock

    20 The Gables Old Town, Clapham London SW4 0JX United Kingdom

    Mobile : +44 7880 617 446 Fax : +44 870 706 5749 email : mailto:oliverschonrocks.com

    attached mail follows:


    My Web hosting company has just withdrawn (with no notice) support for PHP extensions on the grounds they represent security risks and they don't wish to spend time and effort in evaluating and compensating for those risks.

    I'd welcome views on how reasonable this is.

    The extension I'm mainly concerned about is GD, which I rely on for interactive mapping functionality. I find it hard to see how this is a security risk, but I'm no expert and prepared to be enlightened.

    Many thanks

    Alan Hale

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.381 / Virus Database: 214 - Release Date: 02/08/2002
    

    attached mail follows:


    It's not, your provider is simply lazy.

    -Rasmus

    On Tue, 13 Aug 2002, Alan Hale wrote:

    > My Web hosting company has just withdrawn (with no notice) support for PHP > extensions on the grounds they represent security risks and they don't wish > to spend time and effort in evaluating and compensating for those risks. > > I'd welcome views on how reasonable this is. > > The extension I'm mainly concerned about is GD, which I rely on for > interactive mapping functionality. I find it hard to see how this is a > security risk, but I'm no expert and prepared to be enlightened. > > Many thanks > > Alan Hale > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.381 / Virus Database: 214 - Release Date: 02/08/2002 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Hey guys, I have a little problem here, I have one class to create queries to a mysql database, this class works fine, but, now I want to create an instance of this class inside another class but I'm receiving the error:

    Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in D:\InetPub\hispanicroot\includes\database.php on line 134

    This is my code:

    class SubMenu { var $attrib = array("level"=>"", "page"=>"", "section"=>""); $DBQuery = new DBQueries; <--------------------------- this is line 134 $DBQuery->attrib["type"] = "select"; $DBQuery->attrib["query"] = "SELECT ID_Secpage, PageType, Title, PageURL FROM inf_secpages WHERE ID_Page = " . $attrib['page'] . " ORDER BY Slot ASC"; $GetData = $DBQuery->RunQuery(); bla bla bla .......... }

    If I use: var $DBQuery = new DBQueries; then I receive the error: Parse error: parse error, unexpected T_NEW in D:\InetPub\hispanicroot\includes\database.php on line 134

    Thanks

    Jadiel Flores ------------------------- http://www.abargon.com jfloresabargon.com (52-55) 52-29-80-34

    attached mail follows:


    Having trouble storing objects in a session. When I do this:

    if (!isset($_SESSION['auth'])) { $auth = new Auth(); $_SESSION['auth'] =& $auth; } else { $auth =& $_SESSION['auth']; }

    I end up getting the following errors when I refresh the page.

    __PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] => auth

    I'm using php-4.2.2.

    ron

    attached mail follows:


    You have to load the class definition for your Auth class before calling session_start()

    -Rasmus

    On Tue, 13 Aug 2002, Ron Dyck wrote:

    > Having trouble storing objects in a session. When I do this: > > if (!isset($_SESSION['auth'])) { > $auth = new Auth(); > $_SESSION['auth'] =& $auth; > } else { > $auth =& $_SESSION['auth']; > } > > I end up getting the following errors when I refresh the page. > > __PHP_Incomplete_Class Object > ( > [__PHP_Incomplete_Class_Name] => auth > > > I'm using php-4.2.2. > > ron > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >