OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: php-general-digest-helplists.php.net
Date: Fri Aug 24 2001 - 14:18:23 CDT

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

    php-general Digest 24 Aug 2001 19:18:23 -0000 Issue 835

    Topics (messages 64210 through 64300):

    Re: Session Problem
            64210 by: Lawrence.Sheed.dfait-maeci.gc.ca

    Header
            64211 by: Roman
            64212 by: Jason Murray

    PHP / MySQL Hosting Charges
            64213 by: Chris Aitken
            64214 by: Raphael Pirker
            64238 by: Alnisa Allgood
            64293 by: ERISEN, Mehmet Kamil

    Re: [PHP-DEV] Re: Re: sysvsem extention question
            64215 by: Sascha Schumann
            64252 by: Jason Greene
            64289 by: Chris Chabot
            64297 by: Jason Greene

    text wrap in table
            64216 by: Adrian D'Costa
            64222 by: Navid Yar
            64232 by: Miles Thompson

    Reading files from a directory
            64217 by: Niklas Lampén

    PHP 2 MySQL over the network
            64218 by: Boaz Yahav

    Re: Sorting and foreach of MultiDimensional Array failing
            64219 by: Tim Ward

    Re: Array's in classes
            64220 by: Tim Ward

    Useful function. Better than print_r
            64221 by: Andrey Hristov

    Timestamps operations
            64223 by: Alberto
            64225 by: Nick Davies
            64277 by: Hugh Bothwell

    help needed
            64224 by: steven.raucher.com
            64230 by: Boaz Yahav
            64247 by: Sheridan Saint-Michel

    How to download a picture thru http://?
            64226 by: Tamas Bucsu
            64273 by: Hugh Bothwell

    Re: strange error
            64227 by: Elias Santiago

    Re: konquerer and php
            64228 by: Martín Marqués
            64235 by: Steve Brett
            64237 by: * R&zE:

    Re: Informix - ifx_num_rows
            64229 by: Leila

    PHP/MySQl Consultation
            64231 by: Randy Johnson

    Re: The future of PHP - object orientation
            64233 by: Manuel Lemos

    problem with constants
            64234 by: Wolfgang Schneider
            64239 by: Pavel Jartsev

    PHP & sendmail
            64236 by: Juraj Hasko
            64241 by: Jon Haworth
            64242 by: Pavel Jartsev
            64243 by: Juraj Hasko

    ODBC Driver for UniVerse Database
            64240 by: Justin Farnsworth

    wget
            64244 by: Augusto Cesar Castoldi
            64251 by: Sean C. McCarthy

    comparing 2 mysql tables
            64245 by: Tom Churm
            64250 by: Sheridan Saint-Michel

    Problems with PHP calling PGP
            64246 by: CO Group Support

    GET / POST strange error
            64248 by: Mike
            64260 by: Johnson, Kirk

    PHP with RSA/Java
            64249 by: Martin Gunther

    source code of c/c++
            64253 by: nafiseh saberi
            64258 by: Jorge Amaya
            64259 by: J Smith

    PHP and RSA/Java (Repost with correct e-mail!)
            64254 by: Martin Gunther
            64267 by: Jon Farmer
            64274 by: Gregor Maier
            64279 by: Jon Farmer

    redirect
            64255 by: Wilbert Enserink
            64256 by: Nick Davies
            64268 by: Jon Farmer

    PHP vs CGI Search ?
            64257 by: KPortsmout.aol.com
            64266 by: Thomas Deliduka

    \n
            64261 by: Jeremy Morano
            64262 by: Nick Davies
            64263 by: ReDucTor
            64264 by: Daniel Adams

    Re: functions returning arrays
            64265 by: Frank Loewenthal
            64269 by: Johnson, Kirk
            64270 by: Nick Davies

    fatal input in flex scanner
            64271 by: Jaxon

    functions returning arrays II
            64272 by: Frank Loewenthal

    Outlook Express and Miltiple send to Addresses
            64275 by: Godd

    functions returning arrays II ... Umpf....!**x#
            64276 by: Frank Loewenthal

    File Upload and NT...
            64278 by: Joseph Koenig
            64280 by: Rasmus Lerdorf
            64281 by: Erik H. Mathy
            64286 by: Joseph Koenig

    Re: force download in IE
            64282 by: Ralph Deffke
            64283 by: Ralph Deffke

    php chats? or better use cgi?
            64284 by: Wolfgang Schneider
            64287 by: Augusto Cesar Castoldi
            64290 by: Wolfgang Schneider

    Re: PHP based authentification -----------
            64285 by: Ralph Deffke

    how can i cache php scripts enterpretet
            64288 by: Ralph Deffke

    Maintaining a session without cookies
            64291 by: Saurabh Kapoor
            64292 by: Julio Nobrega Trabalhando
            64298 by: Egan

    Re: Please Help - getting a hightlight depending on selected page
            64294 by: Martin Hughes

    PHP secure
            64295 by: Peter Allum
            64296 by: Julio Nobrega Trabalhando
            64299 by: Erik H. Mathy

    Re: The future of PHP
            64300 by: Manuel Lemos

    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:


    The simple things...

    Now I feel stupid.

    Baaie dankie Rudolf.
    (I'm an ex Capetownian now in Shanghai,China)

    Note to self, read manual * C A R E F U L L Y *
    -----Original Message-----
    From: Rudolf Visagie [mailto:Rudolfqedi.co.za]
    Sent: August 24, 2001 1:43 PM
    To: Lawrence.Sheeddfait-maeci.gc.ca
    Cc: php-generallists.php.net
    Subject: RE: [PHP] Session Problem

    Try

    session_register("count");

    Rudolf Visagie
    rudolfqedi.co.za

    -----Original Message-----
    From: Lawrence.Sheeddfait-maeci.gc.ca
    [mailto:Lawrence.Sheeddfait-maeci.gc.ca]
    Sent: 24 August 2001 04:42
    To: php-generallists.php.net
    Subject: [PHP] Session Problem

    I can't get session variables to work

    I know this has been done to death in the past, but I've looked on php.net,
    and google for a solution, have tried the suggestions, and seem to fix it.

    My php session settings are as follows:

    Name Local Global settings
    session.auto_start Off Off
    session.cache_expire 180 180
    session.cache_limiter nocache nocache
    session.cookie_domain no value no value
    session.cookie_lifetime 0 0
    session.cookie_path / /
    session.entropy_file no value no value
    session.entropy_length 0 0
    session.gc_maxlifetime 1440 1440
    session.gc_probability 1 1
    session.name PHPSESSID PHPSESSID
    session.referer_check no value no value
    session.save_handler files files
    session.save_path /tmp /tmp
    session.serialize_handler php php
    session.use_cookies On On

    The code I'm using to test is as follows:

    <?php
    session_start();

    echo "COUNT{$count}";
    if (!isset($count)) {
            echo "registering session";
            session_register($count);
            $count=1;
    }
    else {
            $count++;
            echo $count;
    }
    ?>

    The output is as follows:

    COUNTregistering session

    Refreshing shows the same output

    My /tmp directory exists and has the following permissions.
    drwxrwxrwt 3 root root 4096 Aug 24 10:40 tmp

    What should I be looking for?

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

    attached mail follows:


    I want to open some html page from php in if..else..endif condition but i dont't know how or which command I must use. Please help me

    if i uses this in IF section :

    $path = "/route/index.htm"; Header("Location: http://$SERVER_NAME$path");

    result in browser is : Warning: Cannot add header information - headers already sent by (output started at e:\programovanie\php\patenty\query.php:8) in e:\server\route\query.php on line 20

    and line 20 is : Header("Location: http://$SERVER_NAME$path");

    <? Header("Expires: ".GMDate("D, d M Y H:i:s")." GMT");

    if (condition) :

    open other html page else database commands endif; ?>

    roman

    attached mail follows:


    > I want to open some html page from php in if..else..endif > condition but i dont't know how or which command I must use. > Please help me > > if i uses this in IF section : > > $path = "/route/index.htm"; > Header("Location: http://$SERVER_NAME$path"); > > result in browser is : Warning: Cannot add header information > - headers > already sent by (output started at > e:\programovanie\php\patenty\query.php:8) > in e:\server\route\query.php on line 20

    It looks like you've already started output in the script (on line 8).

    You can't send a header once you've started to send web page content. That's why headers and body contents exist :)

    Jason

    --
    Jason Murray
    jasonmmelbourneit.com.au
    Web Developer, Melbourne IT
    "Work now, freak later!"
    

    attached mail follows:


    Hi All,

    Just a quick non-technical question.

    I live in Australia and a friend of mine has a website hosted here in Oz, and he pays his set amount per month which simply is for Hosting, cgi-bin and log file access for his website.

    Hes wanting to have the ability to use PHP and MySQL on his site and his provider has quoted him the cost to add to his current monthly charges to give him a MySQL username/password/database and PHP ability.

    Both he and I feel its a bit pricey for what they want to charge so I figured I would ask the list to see what other people consider a reasonable price to add PHP and MySQL access to his current www/cgi-bin/logs website.

    I wont mention the prices hes been quoted yet because I want to see some uninfluenced posts.

    Cheers in advance.

    Chris

    --
         Chris Aitken - Administration/Database Designer - IDEAL Internet
      email: chrisideal.net.au  phone: +61 2 4628 8888  fax: +61 2 4628 8890
                  __-----------------------------------------__
                               *** Big Brother ***
    It just shows that the dull will rule the world. And we will be watching it.
    

    attached mail follows:


    You can see hosts offer the package for around $10/month, so if it's inside a package they shouldn't charge more than US$2-US$4/month. If it's an extra feature, however, they may well charge around $5/month for the add-on and possibly also a setup fee, because it's not in their actual product list. anything above that could possibly be considered as expensive. For example I get

    350MB mySQL/PHP/Python/CGI Logs etc 100x POP, unlimited forwards 1x Domain + lots more

    for around $20/month

    HTH,

    Raphael

    attached mail follows:


    At 4:09 PM +1000 8/24/01, Chris Aitken wrote: >Hi All, > > >Just a quick non-technical question. > >I live in Australia and a friend of mine has a website hosted here >in Oz, and he pays his set amount per month which simply is for >Hosting, cgi-bin and log file access for his website. > >Hes wanting to have the ability to use PHP and MySQL on his site and >his provider has quoted him the cost to add to his current monthly >charges to give him a MySQL username/password/database and PHP >ability. > >Both he and I feel its a bit pricey for what they want to charge so >I figured I would ask the list to see what other people consider a >reasonable price to add PHP and MySQL access to his current >www/cgi-bin/logs website.

    Personally, I've always dealt with ISPs that offer PHP and MySQL as part of the basic monthly web hosting cost, which I generally expect to run between $20-$50 per month, depending on amount of space provided, backbone of the provider, and other variables.

    Can PHP be offered as an add-on, I thought it was either or not, but anyway... I've seen others pay separately for MySQL access. I would expect to pay between $5-$15 more per month, if it was a separate item.

    Alnisa

    -- 
       .........................................
        Alnisa  Allgood
        Executive Director
        Nonprofit Tech
        (ph) 415.337.7412  (fx) 415.337.7927
        (url)  http://www.nonprofit-techworld.org
        (url)  http://www.nonprofit-tech.org
        (url)  http://www.tech-library.org
       .........................................
        Nonprofit Tech E-Update
        mailto:nonprofit-tech-subscribeegroups.com
       .........................................
        applying technology to transform
       .........................................
    

    attached mail follows:


    Hello All, I think for a thin page with PHP+mySQL you can go as low as $3 a month (35MB) I have seen decent packages, with Vserver privileges at around $18/mnt.

    --- Alnisa Allgood <allgood2slip.net> wrote: > At 4:09 PM +1000 8/24/01, Chris Aitken wrote: > >Hi All, > > > > > >Just a quick non-technical question. > > > >I live in Australia and a friend of mine has a website > hosted here > >in Oz, and he pays his set amount per month which simply > is for > >Hosting, cgi-bin and log file access for his website. > > > >Hes wanting to have the ability to use PHP and MySQL on > his site and > >his provider has quoted him the cost to add to his > current monthly > >charges to give him a MySQL username/password/database > and PHP > >ability. > > > >Both he and I feel its a bit pricey for what they want > to charge so > >I figured I would ask the list to see what other people > consider a > >reasonable price to add PHP and MySQL access to his > current > >www/cgi-bin/logs website. > > > Personally, I've always dealt with ISPs that offer PHP > and MySQL as > part of the basic monthly web hosting cost, which I > generally expect > to run between $20-$50 per month, depending on amount of > space > provided, backbone of the provider, and other variables. > > Can PHP be offered as an add-on, I thought it was either > or not, but > anyway... I've seen others pay separately for MySQL > access. I would > expect to pay between $5-$15 more per month, if it was a > separate > item. > > Alnisa > -- > ......................................... > Alnisa Allgood > Executive Director > Nonprofit Tech > (ph) 415.337.7412 (fx) 415.337.7927 > (url) http://www.nonprofit-techworld.org > (url) http://www.nonprofit-tech.org > (url) http://www.tech-library.org > ......................................... > Nonprofit Tech E-Update > mailto:nonprofit-tech-subscribeegroups.com > ......................................... > applying technology to transform > ......................................... > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-general-unsubscribelists.php.net > For additional commands, e-mail: > php-general-helplists.php.net > To contact the list administrators, e-mail: > php-list-adminlists.php.net >

    ===== Mehmet Erisen http://www.erisen.com

    __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/

    attached mail follows:


    > parent process right before fork. There is no parent > initializer for a php module author

    MINIT() is called from the parent process in forking servers. The mm storage handler uses this hook to instantiate a shared memory segment and propagate the handle to all child processes.

    - Sascha Experience IRCG http://schumann.cx/ http://schumann.cx/ircg

    attached mail follows:


    ----- Original Message ----- From: "Sascha Schumann" <saschaschumann.cx> To: "Jason T.Greene" <jasoninetgurus.net> Cc: "Tom May" <tom.mayinfospace.com>; "Chris Chabot" <chabotcreviewboard.com>; <php-devlists.php.net>; <php-generallists.php.net> Sent: Friday, August 24, 2001 1:49 AM Subject: Re: [PHP-DEV] Re: Re: sysvsem extention question

    > > parent process right before fork. There is no parent > > initializer for a php module author > > MINIT() is called from the parent process in forking servers. > The mm storage handler uses this hook to instantiate a shared > memory segment and propagate the handle to all child > processes. Sascha is right... Allow me to reword.. There is no way to allow a php file author the ability to execute php source during module startup of a forking web server. The module would have to allocate and initialize all semaphores before the php source is parsed. This defeats the purpose of a semaphore extension in a forking webserver environment, becuase the php source author would be limited to just the semaphors allocated by the php module.

    -Jason

    > - Sascha Experience IRCG > http://schumann.cx/ http://schumann.cx/ircg >

    attached mail follows:


    Hey Jason, i do see your point.

    However, something still illudes me in my reasoning i think..

    In a web envirioment, you are most likely to be in one of two situations when using semaphores.

    - Plain standard lock (with ability of doing resource count) - All web servers connect to a external process that handles a service (like printer) - The web processes them selves are the 'external resource' which handle the decreasing of lock-count

    The notes in the original source code of the php extention explained that the second+third lock were used for: - Resource count - Be able to set initial max-resource count

    However, when i follow this reasoning, two things come to mind - Resource count is a API provided by the sysvsem implimentation via semctl (# waiting, etc) - if you try to set the semaphore's resource count, and it fails (other process connected to it and locked it?) then wouldnt it be safe to assume that that 'other process' is another web process, which sets the same resource counters... so we end up with an good situation anyways...

    So if you would do a semget with IPC_CREATE + IPC_EXCL. If this succeeds, do the SETALL/SETVAL routine via semctl, if it fails on EEXISTS, do a second semget without create+excl and attach to it..

    Donno if it would work, or how-much overhead it would add, but it sounds like it could ;-)

    -- Chris

    Jason Greene wrote:

    > ----- Original Message ----- > From: "Sascha Schumann" <saschaschumann.cx> > To: "Jason T.Greene" <jasoninetgurus.net> > Cc: "Tom May" <tom.mayinfospace.com>; "Chris Chabot" <chabotcreviewboard.com>; <php-devlists.php.net>; > <php-generallists.php.net> > Sent: Friday, August 24, 2001 1:49 AM > Subject: Re: [PHP-DEV] Re: Re: sysvsem extention question > > > > parent process right before fork. There is no parent > > > initializer for a php module author > > > > MINIT() is called from the parent process in forking servers. > > The mm storage handler uses this hook to instantiate a shared > > memory segment and propagate the handle to all child > > processes. > Sascha is right... > Allow me to reword.. > There is no way to allow a php file author the ability to execute php source during > module startup of a forking web server. The module would have to allocate and > initialize all semaphores before the php source is parsed. This defeats the purpose > of a semaphore extension in a forking webserver environment, becuase the php source > author would be limited to just the semaphors allocated by the php module. > > -Jason > > > - Sascha Experience IRCG > > http://schumann.cx/ http://schumann.cx/ircg > >

    attached mail follows:


    ----- Original Message ----- From: "Chris Chabot" <chabotcreviewboard.com> To: "Jason Greene" <jasoninetgurus.net> Cc: "Sascha Schumann" <saschaschumann.cx>; "Tom May" <tom.mayinfospace.com>; <php-devlists.php.net>; <php-generallists.php.net> Sent: Friday, August 24, 2001 11:30 AM Subject: Re: [PHP-DEV] Re: Re: sysvsem extention question

    > Hey Jason, i do see your point. > > However, something still illudes me in my reasoning i think.. > > In a web envirioment, you are most likely to be in one of two situations when using semaphores. > > - Plain standard lock (with ability of doing resource count) > - All web servers connect to a external process that handles a service (like printer) > - The web processes them selves are the 'external resource' which handle the decreasing of lock-count > > The notes in the original source code of the php extention explained that the second+third lock were used > for: > - Resource count > - Be able to set initial max-resource count > > However, when i follow this reasoning, two things come to mind > - Resource count is a API provided by the sysvsem implimentation via semctl (# waiting, etc) > - if you try to set the semaphore's resource count, and it fails (other process connected to it and locked > it?) then wouldnt it be safe to assume that that 'other process' is another web process, which sets the same > resource counters... so we end up with an good situation anyways... > > So if you would do a semget with IPC_CREATE + IPC_EXCL. If this succeeds, do the SETALL/SETVAL routine via > semctl, if it fails on EEXISTS, do a second semget without create+excl and attach to it.. That should work the same as the 3 semaphore method. The thing I wonder is if the module should do this, or if this should be left up to the php programmer. I would suggest getting as close to the C API as possible, with the possibility of adding some easier to use functions. I am starting to think that any other method would be very unflexable.

    -Jason

    > Donno if it would work, or how-much overhead it would add, but it sounds like it could ;-) > > -- Chris > > > Jason Greene wrote: > > > ----- Original Message ----- > > From: "Sascha Schumann" <saschaschumann.cx> > > To: "Jason T.Greene" <jasoninetgurus.net> > > Cc: "Tom May" <tom.mayinfospace.com>; "Chris Chabot" <chabotcreviewboard.com>; <php-devlists.php.net>; > > <php-generallists.php.net> > > Sent: Friday, August 24, 2001 1:49 AM > > Subject: Re: [PHP-DEV] Re: Re: sysvsem extention question > > > > > > parent process right before fork. There is no parent > > > > initializer for a php module author > > > > > > MINIT() is called from the parent process in forking servers. > > > The mm storage handler uses this hook to instantiate a shared > > > memory segment and propagate the handle to all child > > > processes. > > Sascha is right... > > Allow me to reword.. > > There is no way to allow a php file author the ability to execute php source during > > module startup of a forking web server. The module would have to allocate and > > initialize all semaphores before the php source is parsed. This defeats the purpose > > of a semaphore extension in a forking webserver environment, becuase the php source > > author would be limited to just the semaphors allocated by the php module. > > > > -Jason > > > > > - Sascha Experience IRCG > > > http://schumann.cx/ http://schumann.cx/ircg > > > >

    attached mail follows:


    Hi,

    I am creating a program for a newspaper to publish their article online. There is a form what allows them to cut and past from their editors (word, pagemaker, staroffice). The data is being entered correctly.

    The problem is when I try and get the data from the table the whole matter scrolls off the screen. I need it to be formatted as the client cut and pastes it (headings, paras, etc). Below is my table and part of my program.

    mysql> desc newsarticles; +----------+--------------+------+-----+------------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+-----+------------+----------------+ | id | int(5) | | PRI | NULL | auto_increment | | nid | int(5) | | MUL | 0 | | | headline | varchar(100) | | | | | | article | mediumtext | | | | | | date | date | | | 0000-00-00 | | | imgpath | varchar(200) | YES | | NULL | | +----------+--------------+------+-----+------------+----------------+

    <html> <head> <title><? echo $row->headline; ?></title> </head>

    <body bgcolor="white"> <h1 align="center"><? echo $row->headline; ?></h1> <h3 align="center"><? echo $row->description; ?></h3> <table width="600" border="1"> <tr> <td valign="top" width="70%"><font face="Arial" size="2" color="blue"><strong><? echo $sd ."-". $sm ."-". $sy; ?></strong><br><pre><? echo $row->article; ?></pre></font></td> <td valign="top" width="30%"><img src="<? echo $row->imgpath; ?>" <? echo $iwh[3]; ?> ></td> </tr> </table> </body> </html>

    I use the <pre></pre> to display with the line breaks. If I take of the <pre> it does not wrap but does not give the breaks. To my thinking maybe while entering the data we should give break the lines physically. This is part of my entry form.

    <tr> <td><font face="Arial" size="2">HeadLine</font></td> <td><input type="text" name="headline" size="30"> </tr>

    <tr> <td><font face="Arial" size="2">Article</font></td> <td><textarea name="article" cols="60" rows="10"></textarea></td> </tr>

    <tr> <td><font face="Arial" size="2">Upload Image</font></td> <td><input type="file" name="userfile" size="30" wrap=ON></td> </tr> <tr align="center"> <td colspan="2"><input type="submit" value="Submit"></td> </tr>

    How do I get the text not to wrap and to preserve the formatting given by the client.

    Adrian

    attached mail follows:


    Have you tried using the <nobr> tag along with the <pre> tag? The <nobr> tag will not allow the text to wrap. You can use it outside the <pre> tags and see what you come up with. It sounds simple, but it may provide you with the solution that you need.

    Navid

    -----Original Message----- From: Adrian D'Costa [mailto:adrianpcsadvt.com] Sent: Thursday, August 23, 2001 11:36 PM To: php general list Subject: [PHP] text wrap in table

    Hi,

    I am creating a program for a newspaper to publish their article online. There is a form what allows them to cut and past from their editors (word, pagemaker, staroffice). The data is being entered correctly.

    The problem is when I try and get the data from the table the whole matter scrolls off the screen. I need it to be formatted as the client cut and pastes it (headings, paras, etc). Below is my table and part of my program.

    mysql> desc newsarticles; +----------+--------------+------+-----+------------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+-----+------------+----------------+ | id | int(5) | | PRI | NULL | auto_increment | | nid | int(5) | | MUL | 0 | | | headline | varchar(100) | | | | | | article | mediumtext | | | | | | date | date | | | 0000-00-00 | | | imgpath | varchar(200) | YES | | NULL | | +----------+--------------+------+-----+------------+----------------+

    <html> <head> <title><? echo $row->headline; ?></title> </head>

    <body bgcolor="white"> <h1 align="center"><? echo $row->headline; ?></h1> <h3 align="center"><? echo $row->description; ?></h3> <table width="600" border="1"> <tr> <td valign="top" width="70%"><font face="Arial" size="2" color="blue"><strong><? echo $sd ."-". $sm ."-". $sy; ?></strong><br><pre><? echo $row->article; ?></pre></font></td> <td valign="top" width="30%"><img src="<? echo $row->imgpath; ?>" <? echo $iwh[3]; ?> ></td> </tr> </table> </body> </html>

    I use the <pre></pre> to display with the line breaks. If I take of the <pre> it does not wrap but does not give the breaks. To my thinking maybe while entering the data we should give break the lines physically. This is part of my entry form.

    <tr> <td><font face="Arial" size="2">HeadLine</font></td> <td><input type="text" name="headline" size="30"> </tr>

    <tr> <td><font face="Arial" size="2">Article</font></td> <td><textarea name="article" cols="60" rows="10"></textarea></td> </tr>

    <tr> <td><font face="Arial" size="2">Upload Image</font></td> <td><input type="file" name="userfile" size="30" wrap=ON></td> </tr> <tr align="center"> <td colspan="2"><input type="submit" value="Submit"></td> </tr>

    How do I get the text not to wrap and to preserve the formatting given by the client.

    Adrian

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

    attached mail follows:


    <rant on>

    Please, DO NOT USE the <pre> tag, or fonts fixed in point size. You have no control over the device which will display the page, let the web function the way it's supposed to. Users run screens at various resolutions, in Windows maybe large fonts or small fonts. If the user wants bigger type, then let her kick up the font size in the browser.

    Why? I'm 53 years old, my father is 84, and my oldest child is 16. Our visual acuity varies greatly.

    <rant off>

    Direct the client to sites like salon, which are elegantly done with the goal of readability and clarity on the screen. Or LinuxToday. For the opposite, kick your monitor to high resolution, then go to some of the dipstick sites linked from msn.com, e.g.www.bcentral.com/resource/articles/homeoffice/101.asp, and then try the "Print-friendly" version. It still displays and prints in about 9 pt type.

    Persuade the client that the web is a different medium, and presentation has to change. If they resist, then generate PDF's and call by reference from the database.

    Regards - Miles Thompson

    At 03:47 AM 8/24/01 -0500, Navid Yar wrote: >Have you tried using the <nobr> tag along with the <pre> tag? The <nobr> tag >will not allow the text to wrap. You can use it outside the <pre> tags and >see what you come up with. It sounds simple, but it may provide you with the >solution that you need. > >Navid > >-----Original Message----- >From: Adrian D'Costa [mailto:adrianpcsadvt.com] >Sent: Thursday, August 23, 2001 11:36 PM >To: php general list >Subject: [PHP] text wrap in table > > >Hi, > >I am creating a program for a newspaper to publish their article >online. There is a form what allows them to cut and past from their >editors (word, pagemaker, staroffice). The data is being entered >correctly. > >The problem is when I try and get the data from the table the whole matter >scrolls off the screen. I need it to be formatted as the client cut and >pastes it (headings, paras, etc). Below is my table and part of my >program. > >mysql> desc newsarticles; >+----------+--------------+------+-----+------------+----------------+ >| Field | Type | Null | Key | Default | Extra | >+----------+--------------+------+-----+------------+----------------+ >| id | int(5) | | PRI | NULL | auto_increment | >| nid | int(5) | | MUL | 0 | | >| headline | varchar(100) | | | | | >| article | mediumtext | | | | | >| date | date | | | 0000-00-00 | | >| imgpath | varchar(200) | YES | | NULL | | >+----------+--------------+------+-----+------------+----------------+ > > <html> > <head> > <title><? echo $row->headline; ?></title> > </head> > > <body bgcolor="white"> > <h1 align="center"><? echo $row->headline; ?></h1> > <h3 align="center"><? echo $row->description; ?></h3> > <table width="600" border="1"> > <tr> > <td valign="top" width="70%"><font >face="Arial" size="2" color="blue"><strong><? echo $sd ."-". $sm >."-". $sy; ?></strong><br><pre><? echo $row->article; ?></pre></font></td> > <td valign="top" width="30%"><img src="<? echo >$row->imgpath; ?>" <? echo $iwh[3]; ?> ></td> > </tr> > </table> > </body> > </html> > > >I use the <pre></pre> to display with the line breaks. If I take of the ><pre> it does not wrap but does not give the breaks. To my thinking maybe >while entering the data we should give break the lines physically. This >is part of my entry form. > ><tr> > <td><font face="Arial" size="2">HeadLine</font></td> > <td><input type="text" name="headline" size="30"> ></tr> > ><tr> > <td><font face="Arial" size="2">Article</font></td> > <td><textarea name="article" cols="60" rows="10"></textarea></td> ></tr> > ><tr> > <td><font face="Arial" size="2">Upload Image</font></td> > <td><input type="file" name="userfile" size="30" wrap=ON></td> ></tr> ><tr align="center"> > <td colspan="2"><input type="submit" value="Submit"></td> ></tr> > > >How do I get the text not to wrap and to preserve the formatting given by >the client. > >Adrian > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribelists.php.net >For additional commands, e-mail: php-general-helplists.php.net >To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    I have problem with reading files from directory.

    This is the code:

    <? $Handle = opendir('/www/publico2/docs/map');

    while ($file = readdir($Handle)) { print "$file<br>\n"; }; ?>

    That is ALL code on a script file. These are the file in directory:

    . .. array_maker.php4 map.php4 renamer.php4 border_bl.gif border_bm.gif border_br.gif border_ml.gif border_mr.gif border_ul.gif border_um.gif border_ur.gif grid.gif map_config.php4 map_dot.php4 handle.php4 map_dot.gif core md_998634933_071758800998634933.gif md_998634937_060465500998634937.gif md_998634941_025996400998634941.gif

    If I have more than five of the files named like "md_123456789_12345.....gif" page returns Internal Server Error (500). What can cause this? Is there a solution?

    Niklas

    attached mail follows:


    Hi

    Till recently, out MySQL DB and our Apache/PHP/Solaris were on the same machine. We moved to front end / back end configuration and all of the queries are now done over the network (Switch). I was wondering if anyone has any experience in optimizing such a configuration from the System / MySQL / PHP side?

    Issues like packet sizes, connect vs. pconect etc...

    Sincerely

    berber

    attached mail follows:


    You haven't reset $numbercount, so on the second iteration you never enter the while loop and so $num_array[2] is never actually created. Remember $num_array[2] is simply an element of the top level array. It isn't an array until you make it one, regardless of what the previous elements are. Remember ... there are no multi-dimensional arrays in php, just arrays that can contain arrays (that can contain arrays, etc.)

    Tim Ward

    ---------- From: Montz, James C. (James Tower) [SMTP:JCMontzjamestower.com] Sent: 23 August 2001 22:48 To: Php-General (E-mail) Subject: Sorting and foreach of MultiDimensional Array failing

    In the following code, I'm reading a variable set of random numbers into a multi-dimensional array.

    The first iteration runs properly, but when I get to my 2nd+ iteration, I get the following errors; Warning: Wrong datatype in sort() call in /home/usrlinux/WWW/pballs.php on line 18 Warning: Invalid argument supplied for foreach() in /home/usrlinux/WWW/pballs.php on line 19

    Is there a specific function for sorting and foreach statements of multidimensional arrays? If so, why does it work properly for the first interation,i.e. sort($num_array[1]) then subsequently fail on sort($num_array[2])

    Thank you in advance!

    <? srand ((double) microtime() * 1000000); $totnum = 5; $min = 1; $max = 49; $tickcount=1; $num_array = array(); array_push($num_array, array()); echo "Now Generating $tickets Tickets!<br>\n"; while ($tickcount <= $tickets) { while ( $numbercount < $totnum) { $num_array[$tickcount][] = rand($min,$max); $numbers = array_unique($num_array[$tickcount]); $numbercount = count($num_array[$tickcount]); } sort($num_array[$tickcount]); foreach($num_array[$tickcount] as $val) { echo "<img src=ball.php?text=$val&color=grey>&nbsp;&nbsp"; } $pb[$tickcount] = rand(1,42); print "<img src=ball.php?text=$pb[$tickcount]&color=red>"; $tickcount++; } ?>

    ___________________________ James C. Montz James Tower http://www.jamestower.com jcmontzjamestower.com

    attached mail follows:


    Can't help too much without more code, but the diagnostics I'd use would be foreach() and count() to find out what is there rather than seeing if what I expect to be there actually is.

    Tim Ward

    ---------- From: Scott Mebberson [SMTP:scottredbluedesign.com] Sent: 24 August 2001 00:52 To: php-generallists.php.net Subject: Array's in classes

    Hi Guys,

    I have written a class in which it uses the global command to get the value of a variable from outside of this class which I use within the class.

    I have recently changed this variable to an array and added 5 extra keys to this array. It is a string indexed array. In now seems as though PHP wont import the array. It is really weird though because if I access the key of an array such as $database["hostname"] is just echo's nothing at all to the browser. It also echo's nothing to the browser if I use $database[0]. But, if I echo just $database to the browser it returns "Array" ?

    Does anybody have any idea of why this is happening?

    Thanks

    Scott.

    attached mail follows:


    <?php function print_rrr($name, $element, $level){ // Returns $element as if you have to declare it using PHP syntaxis. if (is_array($element)) { $res = str_repeat("\t",$level).($level? "\t\"".$name.'" => ':'$'.$name.' = ').'array('; $counter = 1; reset($element); while(list($key, $val) = each($element)){ $res .= "\n".print_rrr($key,$val,$level+1); $res .= ($counter==count($element)? '':','); $counter++; } $res .= "\n".str_repeat("\t",$level).($level? "\t)":');'); } else { $res = str_repeat("\t",$level+1).(is_numeric($name)? $name:"'".addslashes(stripslashes($name))."'"). ' => '.(is_numeric($element)? $element:"'".addslashes(stripslashes($element))."'"); }

    return $res; } // Usage $a1 = array(1=>"dd","ff"=>array(1,2,3)); echo print_rrr("a1",$a1,0);

    ?> The output is: $a1 = array( 1 => 'dd', "ff" => array( 0 => 1, 1 => 2, 2 => 3 ) ); Hope this help someone. It is useful when in a script you modify an array and have to save changes. Just preg_replace in the file content with the new definition.

    Andrey Hristov IcyGEN Corporation http://www.icygen.com 99%

    ----- Original Message ----- From: "Philip Olson" <philipcornado.com> To: "james" <jamesscgdev.com> Cc: <php-generallists.php.net> Sent: Friday, August 24, 2001 12:23 AM Subject: Re: [PHP] print_r question

    > About the simplest way to accomplish what you want is : > > <pre> > <?php print_r($var) ?> > </pre> > > \newlines don't show up in browser but will in the source, check your html > source and see how pretty it is (full of newlines). > > Here's an example : > > $string = "a\nb\nc\n"; > > print $string; (newlines in source) > print nl2br($string); (newlines and <br>'s in source) > > Regarding print_r(), use <pre> as suggested above or you _could_ do other > things but we'll worry about later :) > > Regards, > Philip > > On Thu, 23 Aug 2001, james wrote: > > > When I print an array out with print_r (php 4.06 on IIS 4.0) it does not > > print newlines even if newlines are embedded in the array element. I must > > embed <br>, instead. > > > > The manual examples use \n and the output shows that newlines are created. > > > > Am I missing something? > > > > Newbie, here. Hope this is the right thread for such question. > > > > Thanx, > > James > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > For additional commands, e-mail: php-general-helplists.php.net > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    I have 2 timestamps like mktime(0,0,0,10,10,2001) and mktime(0,0,0,9,9,2001), I want to know how many days are from timestamp1 to timestamp2 or how many hours, or how many seconds, thnx

    attached mail follows:


    Erm..

    date1 - date2 = seconds (date1 - date2)/60 = mins (((date1 -date2)/60)/60)/24 = days

    Nick.

    On Fri, 24 Aug 2001, Alberto wrote:

    > I have 2 timestamps like mktime(0,0,0,10,10,2001) and > mktime(0,0,0,9,9,2001), I want to know how many days are from timestamp1 to > timestamp2 or how many hours, or how many seconds, thnx > > > >

    attached mail follows:


    "Alberto" <albertosdrsl.com> wrote in message news:20010824104242.86203.qmailpb1.pair.com... > I have 2 timestamps like mktime(0,0,0,10,10,2001) and > mktime(0,0,0,9,9,2001), I want to know how many days are from timestamp1 to > timestamp2 or how many hours, or how many seconds, thnx

    define("SECONDS_PER_DAY", 86400); define("SECONDS_PER_HOUR", 3600); define("SECONDS_PER_MINUTE", 60);

    $seconds = abs($time2 - $time1);

    $days = (int) ($seconds / SECONDS_PER_DAY); $seconds -= $days * SECONDS_PER_DAY;

    $hours = (int) ($seconds / SECONDS_PER_HOUR); $seconds -= $hours * SECONDS_PER_HOUR;

    $minutes = (int) ($seconds / SECONDS_PER_MINUTE); $seconds -= $minutes * SECONDS_PER_MINUTE;

    printf("Total time elapsed was %d d %d:%02d:%02d", $days, $hours, $minutes, $seconds);

    attached mail follows:


    PLEASE REPLY DIRECTLY TO THIS EMAIL ADDRESS, I AM NOT SUBSCRIBED TO THE LIST

    hi there I am trying to insert this code into my pages to dynamically add backwards and forwards links to my pages but the code keeps giving me errors.

    below is the code, if someone could please tell me what I am doing wrong I would really apprectiate it.

    thanks

    steve

    <? //list previous if found using desc results array

    echo "<p align='center'>";

    $sql= "select id from travel where id < '$id' and visible = 'checked' order by id desc"; $result = mysql_query($sql) or die("Invalid Query"); $row = mysql_fetch_array($result)

    if ($row[article] != "") { echo " &laquo; <a href='viewlog.php?id="; echo $row[id], "'>"; echo Previous; echo "</a> &raquo;"; echo "</font></font></p>\n"; } else { echo <a href='travelog/"<FONT COLOR="#666699"><b><u>Home</u></b></a> }

    ?>

    echo " | "

    <? //list NEXT if possible using ascending results array $sql = "select id from travel where id > '$id' and visible = 'checked' order by id asc"; $result = mysql_query($sql) or die("Invalid Query"); $row = mysql_fetch_array($result)

    if ($row[article] != "") { echo " &laquo; <a href='viewlog.php?id="; echo $row[id], "'>"; echo Next; echo "</a> &raquo;"; echo "</font></font></p>\n"; } else { echo <a href='travelog/"<FONT COLOR="#666699"><b><u>Home</u></b></a> }

    ?>

    echo "</p>";

    ***************************************************** CURRENTLY IN THAILAND Steven Raucher The Karma Tourer www.RaucherTour.com mailto:stevenraucher.com yahoo messenger: stevenraucher *****************************************************

    attached mail follows:


    checkout http://www.weberdev.com

    there are several scripts ready made for this.

    Sincerely

    berber

    Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow.

    -----Original Message----- From: stevenraucher.com [mailto:stevenraucher.com] Sent: Friday, August 24, 2001 11:39 AM To: php-generallists.php.net Subject: [PHP] help needed

    PLEASE REPLY DIRECTLY TO THIS EMAIL ADDRESS, I AM NOT SUBSCRIBED TO THE LIST

    hi there I am trying to insert this code into my pages to dynamically add backwards and forwards links to my pages but the code keeps giving me errors.

    below is the code, if someone could please tell me what I am doing wrong I would really apprectiate it.

    thanks

    steve

    <? //list previous if found using desc results array

    echo "<p align='center'>";

    $sql= "select id from travel where id < '$id' and visible = 'checked' order by id desc"; $result = mysql_query($sql) or die("Invalid Query"); $row = mysql_fetch_array($result)

    if ($row[article] != "") { echo " &laquo; <a href='viewlog.php?id="; echo $row[id], "'>"; echo Previous; echo "</a> &raquo;"; echo "</font></font></p>\n"; } else { echo <a href='travelog/"<FONT COLOR="#666699"><b><u>Home</u></b></a> }

    ?>

    echo " | "

    <? //list NEXT if possible using ascending results array $sql = "select id from travel where id > '$id' and visible = 'checked' order by id asc"; $result = mysql_query($sql) or die("Invalid Query"); $row = mysql_fetch_array($result)

    if ($row[article] != "") { echo " &laquo; <a href='viewlog.php?id="; echo $row[id], "'>"; echo Next; echo "</a> &raquo;"; echo "</font></font></p>\n"; } else { echo <a href='travelog/"<FONT COLOR="#666699"><b><u>Home</u></b></a> }

    ?>

    echo "</p>";

    ***************************************************** CURRENTLY IN THAILAND Steven Raucher The Karma Tourer www.RaucherTour.com mailto:stevenraucher.com yahoo messenger: stevenraucher *****************************************************

    attached mail follows:


    It looks to me like you are trying to use a result your DB query isn't set to generate.

    You have $sql= "select id from travel where id < '$id' and visible = 'checked' order by id desc";

    then

    if ($row[article] != "") {

    Your select only returned id, so the above if should always fail.

    try $sql= "select id,article from travel where id < '$id' and visible = 'checked' order by id desc";

    and see if that works. If not, let me know what kind of error you are getting.

    Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com

    ----- Original Message ----- From: <stevenraucher.com> To: < > Sent: Friday, August 24, 2001 4:38 AM Subject: [PHP] help needed

    > PLEASE REPLY DIRECTLY TO THIS EMAIL ADDRESS, I AM NOT SUBSCRIBED TO THE LIST > > hi there I am trying to insert this code into my pages to dynamically add > backwards and forwards links to my pages but the code keeps giving me > errors. > > below is the code, if someone could please tell me what I am doing wrong I > would really apprectiate it. > > thanks > > steve > > > > > <? //list previous if found using desc results array > > > echo "<p align='center'>"; > > $sql= "select id from travel where id < '$id' and visible = 'checked' order > by id desc"; > $result = mysql_query($sql) or die("Invalid Query"); > $row = mysql_fetch_array($result) > > > if ($row[article] != "") { > echo " &laquo; <a href='viewlog.php?id="; > echo $row[id], "'>"; > echo Previous; > echo "</a> &raquo;"; > echo "</font></font></p>\n"; > } > else > { > echo <a href='travelog/"<FONT COLOR="#666699"><b><u>Home</u></b></a> > } > > ?> > > echo " | " > > <? //list NEXT if possible using ascending results array > $sql = "select id from travel where id > '$id' and visible = 'checked' order > by id asc"; > $result = mysql_query($sql) or die("Invalid Query"); > $row = mysql_fetch_array($result) > > > if ($row[article] != "") { > echo " &laquo; <a href='viewlog.php?id="; > echo $row[id], "'>"; > echo Next; > echo "</a> &raquo;"; > echo "</font></font></p>\n"; > } > else > { > echo <a href='travelog/"<FONT COLOR="#666699"><b><u>Home</u></b></a> > } > > ?> > > echo "</p>"; > > > ***************************************************** > CURRENTLY IN THAILAND > Steven Raucher > The Karma Tourer > www.RaucherTour.com > mailto:stevenraucher.com > yahoo messenger: stevenraucher > *****************************************************

    attached mail follows:


    Hi guys,

    Is there any special way to get some pics from the web? Cos' what I wrote just does not work. Thanks

    if (file_exists($kepnev)){

    $kepnev="http://www.stg/pics/somethinggy.jpg"];

    $fdr = fopen($kepnev,"r"); $fdw = fopen($kepnevshort,"w"); while (!feof($fdr)) { fputs ($fdw,fgets($fdr, 4096));

    }

    fclose($fdr); fclose($fdw); } }

    attached mail follows:


    "Tamas Bucsu" <ta.bucsuorion-infotech.com> wrote in message news:012c01c12c8b$49cf6750$1100020adomain1... > Is there any special way to get some pics from > the web? Cos' what I wrote just does not work. > Thanks > > > if (file_exists($kepnev)){ > > $kepnev="http://www.stg/pics/somethinggy.jpg"]; > > $fdr = fopen($kepnev,"r"); > $fdw = fopen($kepnevshort,"w"); > while (!feof($fdr)) { > fputs ($fdw,fgets($fdr, 4096)); > > } > > fclose($fdr); > fclose($fdw); > } > }

    The simplest method, assuming the file is web-accessible, is probably echo "<img src='$kepnev'>";

    If you really need to pass the raw image data back (ie you're pulling it out of a database or server file system or dynamically generating it), you have to start with appropriate headers to tell the browser how to treat what it's getting, ie header("Content-Type: image/jpg");

    Also, I bet it helps if you set $kepnev _before_ you test whether it exists.

    attached mail follows:


    Brack wrote:

    > if you have structure like > <html> > <?php > if (isset(...)){ > ..; > } > elseif (isset()){ > } > else { > .. > ?> > </html> > then you need to insert "}" before "</html> > or if you use syntax >

    Correct, in part. The last ELSE has a starting {, but no ending }. It should go before the ?> not </html>, that would place it outside the PHP code block.

    > <html> > <?php > if (isset()): > ..; > elseif (isset()): > ..; > else: > ..; > ?> > </html> > you have to insert "endif;" > If you think you did it but still have an error, try to count your "if" > statements and "endif;" maybe something is missing. > > Youri

    the correct structure would be:

    <html> <?php if ( condition ) { multiple ; statements for condition=true, all ended with ";" (semi-colon) ; } elseif ( other_condition) { multiple ; statements for other_condition=true, all ended with ";" (semi-colon) ; } else { other block ; of multiple lines ; } ?> </html>

    Note that curly braces (expression group) does not need the semicolon after them.

    If the IF, ELSEIF or ELSE constructs just need to execute one line then

    <html> <?php if (condition) echo "whatever" ; ?> </html>

    the constructs themselves don't need an ending semicolon

    Elias

    attached mail follows:


    On Jue 23 Ago 2001 22:33, Scott wrote: > What's happening specifically is that I have an html form with action > "whatever.php" and when I click on submit I get code echoed to the screen. > As I said it works normally in Netscape, I get the php page with all the > data displayed perfectly.

    That´s not logical, becuase the web server is who parses the php code, returning pure html code. Unless you don´t have a miss-configuration on your web sever.

    Saludos... :-)

    -- 
    Porqué usar una base de datos relacional cualquiera,
    si podés usar PostgreSQL?
    -----------------------------------------------------------------
    Martín Marqués                  |        mmarquesunl.edu.ar
    Programador, Administrador, DBA |       Centro de Telematica
                           Universidad Nacional
                                del Litoral
    -----------------------------------------------------------------
    

    attached mail follows:


    konquerer is krap. :-)

    only kidding. i seem to remember that konquerer has specific settings for script execution - it may be worth checking out the setup...

    Steve

    "Scott" <gildedpageearthlink.net> wrote in message news:01082320290701.01876localhost.localdomain... > I have a database browser that I made with php and mysql. When I use it in > Netscape it behaves normally. However when I view it using Konquerer, all > kinds of php code shows up on the screen when I execute a php page. I > thought that Konquerer might not be recognizing the <? and ?> start and end > tags so I tried <script language="php"> and </script>. However if I use > these nothing at all shows up on the screen. Can someone tell me what the > problem is? > Thanks, > SW

    attached mail follows:


    <Original message> From: Scott <gildedpageearthlink.net> Date: Thu, Aug 23, 2001 at 08:29:07PM -0400 Message-ID: <01082320290701.01876localhost.localdomain> Subject: [PHP] konquerer and php

    > I have a database browser that I made with php and mysql. When I use it in > Netscape it behaves normally. However when I view it using Konquerer, all > kinds of php code shows up on the screen when I execute a php page. I > thought that Konquerer might not be recognizing the <? and ?> start and end > tags so I tried <script language="php"> and </script>. However if I use > these nothing at all shows up on the screen. Can someone tell me what the > problem is? > Thanks, > SW > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    </Original message>

    <Reply>

    For the script execution it doesn't matter at all which browser you use. PHP is processed server-side, so the browser just gets 'plain' HTML. I guess something else is wrong than using a different browser.

    </Reply>

    -- 
    

    * R&zE:

    -- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renzedatalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- ««««««««««««««««««««««««

    attached mail follows:


    Thanks for all that answered my question. I wanted this function because i use Postgres too in the same project , i will use informix or postgres , so the logic in my implementation was based on postgres functions... But if to Informix it doesn't work ... I will do of another way. Leila Martín marqués <martinbugs.unl.edu.ar> escreveu nas notícias de mensagem:01082321203802.16708bugs... > On Jue 23 Ago 2001 21:21, Chris Fry wrote: > > This function does not work reliably with most databases, not just > > Informix. Caused me a lot of problems as I have a number of pages where I'd > > like to display a "No records found message". > > I normally have a count(*) query to know how much records belong to the query > (especially when I use LIMIT and that stuff). > > With Informix, you'll have to use sqlca.sqlerrd[0..5]. One of the elements of > the array is the amount of records. > > > Just have to do it the hard way. > > > > I think there's a disclaimer in the docs about this being unreliable. > > It once was on the informix docs, but not anymore. The source may have > changed. > > > Saludos... :-) > > P.D.: No problems with pg_num_rows() :-) > > -- > Porqué usar una base de datos relacional cualquiera, > si podés usar PostgreSQL? > ----------------------------------------------------------------- > Martín Marqués | mmarquesunl.edu.ar > Programador, Administrador, DBA | Centro de Telematica > Universidad Nacional > del Litoral > -----------------------------------------------------------------

    attached mail follows:


    I am in need of someone that is very good at PHP and MySQL to view my scripts and discuss with me in detail on how to speed up my scripts and how to speed up mysql some. if you are interested please send me credentials and rates ASAP please send them to randymyhostingsite.com

    Thank you,

    Randy

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.268 / Virus Database: 140 - Release Date: 8/7/2001
    

    attached mail follows:


    Hello,

    Steve Orr wrote: > > What kind of PHP application development frameworks, class libraries, or > templates are widely used? Is SiteManager any good? How about phplib? > Others? Doesn't the future of object oriented PHP depend on good foundation > classes? Any comments on PHP object orientation?

    Good enough to have over 200 people contributing to this PHP Classes repository with well over 300 classes. Not that all have a great quality or all of them are really useful to everybody, but they are there ready for anybody to use despite some people claim PHP object orientation is not good enough.

    Regards, Manuel Lemos

    attached mail follows:


    Hello,

    I managed to setup my Win2k machine for testing purposes with php and mysql and things appear to work fine with one strange problem ...

    The same files work perfectly well when run from the server at my ISP, but now when running them on my machine, I am getting first some error messages such as

    Warning: Use of undefined constant link - assumed 'title' in ./lib/lib_main.php3 on line 352 Warning: Use of undefined constant link - assumed 'subtitle' in ./lib/lib_main.php3 on line 352 Warning: Use of undefined constant link - assumed 'link' in ./lib/lib_main.php3 on line 354

    And then the page is properly displayed at the bottom of all those warnings ... :-) These messages do not show up with the same files when used at my ISP's server, but do show up on my machine here.

    The "constant" code causing this warning message are things like the following: $list[title] $list[subtitle] $list[link]

    Anyone have an idea what may be causing these warnings? It is only with code such as " $variable[value]" that these messages show up ... and then the code is processed anyways and the page displayed. Thank you for any input and help to solve this problem ...

    God bless you with His grace and peace Wolfgang

    Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/

    attached mail follows:


    Wolfgang Schneider wrote: > > ... > > Anyone have an idea what may be causing these warnings? It is only > with code such as " $variable[value]" that these messages show up ... > and then the code is processed anyways and the page displayed. > Thank you for any input and help to solve this problem ... >

    Use $variable['value'] or $variable["value"].

    Because, if you use $variable[value], then PHP thinks that 'value' is some constant, not string. This is why these warnings occurs.

    -- 
    Pavel a.k.a. Papi
    

    attached mail follows:


    Hi, I would like to know if PHP on *nix system can use another SMTP mailer than sendmail. On WinNT is PHP indipendent on concrete mail-server. In our company we use Symantec's Mail-Gear on Linux (Slackware) and I'd like to setup PHP use it. Is it posible ? Thanks in advance, Juraj Ha¹ko System Administrator CAC LEASING Slovakia, a.s.

    attached mail follows:


    Yup, try qmail: www.qmail.org

    You need to adjust the setting in your php.ini as well.

    HTH Jon

    -----Original Message----- From: Juraj Hasko [mailto:haskocacleasing.sk] Sent: 24 August 2001 14:19 To: php-generallists.php.net Subject: [PHP] PHP & sendmail

    Hi,

    I would like to know if PHP on *nix system can use another SMTP mailer than sendmail. On WinNT is PHP indipendent on concrete mail-server. In our company we use Symantec's Mail-Gear on Linux (Slackware) and I'd like to setup PHP use it. Is it posible ? Thanks in advance,

    Juraj Ha¹ko System Administrator

    CAC LEASING Slovakia, a.s.

    attached mail follows:


    Juraj Hasko wrote: > > Hi, > > I would like to know if PHP on *nix system can use another SMTP mailer than sendmail. On WinNT is PHP indipendent on concrete mail-server. In our company we > use Symantec's Mail-Gear on Linux (Slackware) and I'd like to setup PHP use it. Is it posible ?

    http://www.php.net/manual/en/configuration.php#ini.sendmail-path

    -- 
    Pavel a.k.a. Papi
    

    attached mail follows:


    Mail-Gear hasn't sendmail wrapper. Juraj >Juraj Hasko wrote: >> >> Hi, >> >> I would like to know if PHP on *nix system can use another >SMTP mailer than sendmail. On WinNT is PHP indipendent on >concrete mail-server. In our company we >> use Symantec's Mail-Gear on Linux (Slackware) and I'd like >to setup PHP use it. Is it posible ? > >http://www.php.net/manual/en/configuration.php#ini.sendmail-path > >-- >Pavel a.k.a. Papi

    attached mail follows:


    Does anyone on this list know where a client-side, for Linux, ODBC driver is available for the UniVerse Database. I have not yet found any commercial products on IBM->Informix->UniVerse chain...

    _justin

    -- 
    Justin Farnsworth
    Eye Integrated Communications
    321 South Evans - Suite 203
    Greenville, NC 27858 | Tel: (252) 353-0722
    

    attached mail follows:


    Hi.

    I'm using "wget -q -o /home/httpd/html/temp/logs.txt http://localhost/script.php" to run a php script from shell.

    But 'wget' always create a log file with same name of the script that wget are running in "/home/httpd/html/".

    why he doesn't put the "logs" in logs.txt?

    thanks.

    Augusto

    _______________________________________________________________________________________________ Yahoo! GeoCities Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil e grátis! http://br.geocities.yahoo.com/

    attached mail follows:


    Hi,

    use '-o /dev/null' with this you will get no output at all.

    Sean C. McCarthy SCI, S.L. (www.sci-spain.com)

    Augusto Cesar Castoldi wrote: > > Hi. > > I'm using "wget -q -o /home/httpd/html/temp/logs.txt > http://localhost/script.php" to run a php script from > shell. > > But 'wget' always create a log file with same name of > the script that wget are running in > "/home/httpd/html/". > > why he doesn't put the "logs" in logs.txt? > > thanks. > > Augusto > > _______________________________________________________________________________________________ > Yahoo! GeoCities > Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil e grátis! > http://br.geocities.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    hi,

    i've got 2 different MySQL tables. i need to check which entries in the text-field 'User' in one table are NOT present in the 'User' field in the other table. then i need to either save this array to a textfile or otherwise prepare it for creating a new, third table.

    any hints on how this kind of comparison operation can be accomplished?

    many thanks,

    tom

    attached mail follows:


    I would use:

    $query = "select table.user from table LEFT JOIN table2 ON table.user=table2.user where table2.user is NULL";

    This will return every member of user which is present in table but not in table2.

    From there you can do pretty much whatever you want with it in PHP

    Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com

    ----- Original Message ----- From: "Tom Churm" <thomas.churmpixelpark.com> To: <php-generallists.php.net> Sent: Friday, August 24, 2001 8:52 AM Subject: [PHP] comparing 2 mysql tables

    > hi, > > i've got 2 different MySQL tables. i need to check which entries in the > text-field 'User' in one table are NOT present in the 'User' field in > the other table. then i need to either save this array to a textfile or > otherwise prepare it for creating a new, third table. > > any hints on how this kind of comparison operation can be accomplished? > > many thanks, > > tom > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    Hi all. I am having a very strange problem when trying to run PGP under Unix shell from inside a php script. I am trying to encrypt the body of an email message. And, bizarrely, I can get it to work fine several different ways (using exec(), popen(), backtick, etc), but (here's the strange part) every time the script works fine, I get an "internal web server" (Apache) error when the script terminates. Whenever I try an exec() or popen() command that DOESN'T work, Apache DOESN'T complain! In other words, when the call to PGP works, Apache fails and vice-versa! It feels like PGP and Apache are working together to make sure I can't get the job done!

    Now, when I use GNUPG instead of PGP, everything works fine (and no Apache error). So, I think the problem has something to do with the way PHP, PGP, Unix and Apache interact together. One solution is to just use GNUPG instead of PGP, but I like PGP better.

    Note: I am running my PHP script through a program called php-cgiwrap which makes the PHP script execute as me on the server rather than as "nobody". I can't let the script execute as "nobody" because "nobody" doesn't have permission to run PGP, but I do.

    I would greatly appreciate help on getting the PGP approach to work perfectly. I am posting both the PGP and GNUPG code snippets below (note: all the GNUPG snippets work perfectly). Thanks.

    Kurt Bertone

    /**************************************************************************/ Here are some code snippets where the PGP works fine, but Apache complains:

    <script language="php">

    /* set up some strings */ $pgppath = "/usr/home/myhome/.pgp"; $uid = "Recipient Name <recipisp.com>"; $to = "recipisp.com"; $subject = "Seekwit Message"; $from = "meisp.com"; $msg = "This is a vewy, vewy seekwit message.";

    putenv("PGPPATH=$pgppath");

    /* following works fine, except we get the Apache error */ $cmd = "/usr/local/bin/pgp -feat '$uid' | /usr/bin/mail -s '$subject' $to"; $pp = popen($cmd, "w"); fputs($pp, $msg); pclose($pp);

    /* following works fine, except we get the Apache error */ $cmd = "echo '$msg' | /usr/local/bin/pgp -feat '$uid' | /usr/bin/mail -s '$subject' $to"; `$cmd`;

    /* following works fine, except we get the Apache error */ $cmd = "echo '$msg' | /usr/local/bin/pgp -feat '$uid'"; $encrypted = `$cmd`; $encrypted = "From: $from\n\n" . $encrypted; mail($to, $subject, "", "$encrypted");

    </script>

    /**************************************************************************/ The following GNUPG code works perfectly - no problems at all.

    <script language="php">

    /* set up some strings */ $pgppath = "/usr/home/myhome/.pgp"; $uid = "Recipient Name <recipisp.com>"; $to = "recipisp.com"; $subject = "Seekwit Message"; $from = "meisp.com"; $msg = "This is a vewy, vewy seekwit message.";

    putenv("GNUPGHOME=$gnupghome");

    /* following works perfectly */ $cmd = "/usr/local/bin/gpg --textmode --always-trust "; $cmd .= "--armor --batch --no-secmem-warning --homedir '$gnupghome' "; $cmd .= "--compress-algo 1 --cipher-algo cast5 --recipient '$uid' --encrypt "; $cmd .= "| /usr/bin/mail -s '$subject' $to"; $pp = popen($cmd, "w"); fputs($pp, $msg); pclose($pp);

    /* following works perfectly */ $cmd = "echo '$msg' | /usr/local/bin/gpg --textmode --always-trust "; $cmd .= "--armor --batch --no-secmem-warning --homedir '$gnupghome' "; $cmd .= "--compress-algo 1 --cipher-algo cast5 --recipient '$uid' --encrypt "; $cmd .= "| /usr/bin/mail -s '$subject' $to"; `$cmd`;

    /* following works perfectly */ $cmd = "echo '$msg' | /usr/local/bin/gpg --textmode --always-trust "; $cmd .= "--armor --batch --no-secmem-warning --homedir '$gnupghome' "; $cmd .= "--compress-algo 1 --cipher-algo cast5 --recipient '$uid' --encrypt"; $encrypted = `$cmd`; $encrypted = "From: $from\n\n" . $encrypted; mail($to, $subject, "", $encrypted);

    </script>

    attached mail follows:


    i have written a login page for a members area on my site - the code is as follows...

    <? require_once("backend.php");

    if (!$userid || !$password) {

    include("loginform.php"); exit; } else { $login = $authlib->login($userid, $password);

    if ($login != 2) { $error = $login; include("loginform.php"); exit; } else { include("index.php"); } } ?>

    it uses authlib to authorise the user and then include a different pasge if they are logged in...fairly simple so far..

    approx 50% of the time the user cannot log in straight away... the page just reloads and you get the blank entry fields again.

    The logs show the page being posted and then get

    213.165.1.171 - - [24/Aug/2001:15:05:36 +0100] "POST /cand/members/login.php HTTP/1.1" 302 1792 213.165.1.171 - - [24/Aug/2001:15:05:36 +0100] "GET /cand/members/login.php HTTP/1.1" 200 1094

    i am using apache 1.3.19 and php 4.0.4 on redhat 7

    I have had this problem reported on another form page as well...

    attached mail follows:


    I have seen this behavior when the user had a bookmark to the page with a session ID in the bookmark URL. Just a thought.

    Kirk

    > -----Original Message----- > From: Mike [mailto:mike-nospamblueroot.net] > Sent: Friday, August 24, 2001 8:17 AM > To: php-generallists.php.net > Subject: [PHP] GET / POST strange error > > > i have written a login page for a members area on my site - > the code is as > follows... > > <? > require_once("backend.php"); > > if (!$userid || !$password) { > > include("loginform.php"); > exit; > } > else { > $login = $authlib->login($userid, $password); > > if ($login != 2) { > $error = $login; > include("loginform.php"); > exit; > } > else { > include("index.php"); > } > } > ?> > > it uses authlib to authorise the user and then include a > different pasge if > they are logged in...fairly simple so far.. > > approx 50% of the time the user cannot log in straight > away... the page just > reloads and you get the blank entry fields again. > > The logs show the page being posted and then get > > 213.165.1.171 - - [24/Aug/2001:15:05:36 +0100] "POST > /cand/members/login.php > HTTP/1.1" 302 1792 > 213.165.1.171 - - [24/Aug/2001:15:05:36 +0100] "GET > /cand/members/login.php > HTTP/1.1" 200 1094 > > i am using apache 1.3.19 and php 4.0.4 on redhat 7 > > I have had this problem reported on another form page as well...

    attached mail follows:


    Hi all, I need to use a public/private key encryption system for dredit card details on a site I am developing. We are not taking Credit Card payments with an online marchanmt such as NetBanx Sec Pay, etc, etc, but we need to send the CC details to the Shop Management for putting through a PDQ machine. How can I use a Public Private key system to do this from PHP. I know Java can support RSA (although never investigated it), and that PHP can use standard Java classes (is this true?).

    Please any help would be great

    Martin Gunther

    attached mail follows:


    hi . do you know in what site I find the source code of compiler and

    design editor for it.

    thanks.

    attached mail follows:


    I am a programmer in c++ builder, this place has a section of the compiler's discharge, you can see if it serves you

    http://www.borland.com/bcppbuilder/freecompiler/ and http://www.gnu.org/software/gcc/gcc.html

    greetings!!!

    hi . do you know in what site I find the source code of compiler and

    design editor for it.

    thanks.

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

    attached mail follows:


    Definitely not in this group/mailing list. It's called *PHP*.general for a reason.

    Nevertheless, this should get you started:

    Unix-like compilers (with source, GPL):

    http://www.gnu.org/software/gcc/gcc.html

    For "design editor", use any text edtior. vi, emacs, an X notepad type thing... If you have KDE, try KDevelop (http://www.kdevelop.org).

    MS-DOS/Windows shell (with source, GPL):

    http://www.delorie.com/djgpp/

    Again, use text editors. Or, if you want the whole she-bang IDE-with-compiler *without* source code (or any of the freedoms of free software), try MS Visual Studio (http://www.microsoft.com).

    J

    p.s. you'll get a better response and discussion in an actual C or C++ group.

    Nafiseh Saberi wrote:

    > > hi . > do you know in what site I find the source code of compiler and > > design editor for it. > > thanks.

    attached mail follows:


    Hi all, I need to use a public/private key encryption system for dredit card details on a site I am developing. We are not taking Credit Card payments with an online marchanmt such as NetBanx Sec Pay, etc, etc, but we need to send the CC details to the Shop Management for putting through a PDQ machine. How can I use a Public Private key system to do this from PHP. I know Java can support RSA (although never investigated it), and that PHP can use standard Java classes (is this true?).

    Please any help would be great

    Martin Gunther

    attached mail follows:


    PGP would be an ideal solution for this. The webserver would have the public key and the people operating the PDQ machine the private key. A few things to remember are.

    1. Call PGP using exec() 2. Make sure you read the PGP docs to see how to use a particular keyring. 3. Make sure the keyrings and randseed files are readable by the apache user. 4. Have fun

    I have successfully got this working and if you need any help let me know

    Regards

    jon

    --
    Jon Farmer  Õ¿Õ¬
    Systems Programmer, Entanet www.enta.net
    Tel 01952 428969 Mob 07968 524175
    PGP Key available, send blank email to pgpkeybctech.co.uk
    

    -----Original Message----- From: Martin Gunther [mailto:mguntheruknetprojects.co.uk] Sent: 24 August 2001 15:41 To: php-generallists.php.net Subject: [PHP] PHP and RSA/Java (Repost with correct e-mail!)

    Hi all, I need to use a public/private key encryption system for dredit card details on a site I am developing. We are not taking Credit Card payments with an online marchanmt such as NetBanx Sec Pay, etc, etc, but we need to send the CC details to the Shop Management for putting through a PDQ machine. How can I use a Public Private key system to do this from PHP. I know Java can support RSA (although never investigated it), and that PHP can use standard Java classes (is this true?).

    Please any help would be great

    Martin Gunther

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

    attached mail follows:


    This would work but I don't think that this was the idea.

    You could send encrypted email from to server to another place with this method but you can't encrypt the date transmitted with an html form. (since php runs on the server and not on the client machine)

    To secure the communication between the web-server and the client's browser you can't use php. You'll either need SSL for your server or you use a java to encrypte the data on the client side and then send it to the server.

    On 24-Aug-2001 Jon Farmer wrote: > PGP would be an ideal solution for this. The webserver would have the public > key and the people operating the PDQ machine the private key. A few things > to remember are. > > 1. Call PGP using exec() > 2. Make sure you read the PGP docs to see how to use a particular keyring. > 3. Make sure the keyrings and randseed files are readable by the apache > user. > 4. Have fun > > I have successfully got this working and if you need any help let me know > > Regards > > jon > > > Hi all, > I need to use a public/private key encryption system for dredit card > details on a site I am developing. We are not taking Credit Card payments > with an online marchanmt such as NetBanx Sec Pay, etc, etc, but we need to > send the CC details to the Shop Management for putting through a PDQ > machine. How can I use a Public Private key system to do this from PHP. I > know Java can support RSA (although never investigated it), and that PHP can > use standard Java classes (is this true?). > > Please any help would be great > > Martin Gunther > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    ---------------------------------- E-Mail: Gregor Maier <gregor.maiernewlogic.com> Date: 24-Aug-2001 Time: 17:37:41 ----------------------------------

    attached mail follows:


    I dont think you read the original post correctly. Obviously you would use SSL to get the info form the browser to server. What the poster was asking was how does he securely get the information from the server to the people using the PDQ machine.

    Regards

    --
    Jon Farmer  O?O?
    Systems Programmer, Entanet www.enta.net
    Tel +44 (0)1952 428969 Mob +44 (0)7968 524175
    PGP Key available, send blank email to pgpkeybctech.co.uk
    

    -----Original Message----- From: gmaierultra5-15.newlogic.at [mailto:gmaierultra5-15.newlogic.at]On Behalf Of Gregor Maier Sent: 24 August 2001 16:45 To: php-generallists.php.net Subject: RE: [PHP] PHP and RSA/Java (Repost with correct e-mail!)

    This would work but I don't think that this was the idea.

    You could send encrypted email from to server to another place with this method but you can't encrypt the date transmitted with an html form. (since php runs on the server and not on the client machine)

    To secure the communication between the web-server and the client's browser you can't use php. You'll either need SSL for your server or you use a java to encrypte the data on the client side and then send it to the server.

    On 24-Aug-2001 Jon Farmer wrote: > PGP would be an ideal solution for this. The webserver would have the public > key and the people operating the PDQ machine the private key. A few things > to remember are. > > 1. Call PGP using exec() > 2. Make sure you read the PGP docs to see how to use a particular keyring. > 3. Make sure the keyrings and randseed files are readable by the apache > user. > 4. Have fun > > I have successfully got this working and if you need any help let me know > > Regards > > jon > > > Hi all, > I need to use a public/private key encryption system for dredit card > details on a site I am developing. We are not taking Credit Card payments > with an online marchanmt such as NetBanx Sec Pay, etc, etc, but we need to > send the CC details to the Shop Management for putting through a PDQ > machine. How can I use a Public Private key system to do this from PHP. I > know Java can support RSA (although never investigated it), and that PHP can > use standard Java classes (is this true?). > > Please any help would be great > > Martin Gunther > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    ---------------------------------- E-Mail: Gregor Maier <gregor.maiernewlogic.com> Date: 24-Aug-2001 Time: 17:37:41 ----------------------------------

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

    attached mail follows:


    Hi all,

    I have the simplest question maybe, but I can't seem to find the answer. It's friday.....

    Anybody knows how I can redirect to another url?

    greetings

    Wilbert

    ------------------------- Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl infopdd.nl -------------------------

    attached mail follows:


    Guys this stuff is all in the manual. :)

    header ("Location: url");

    On Fri, 24 Aug 2001, Wilbert Enserink wrote:

    > Hi all, > > > I have the simplest question maybe, but I can't seem to find the answer. > It's friday..... > > > Anybody knows how I can redirect to another url? > > > greetings > > > Wilbert > > ------------------------- > Pas de Deux > Van Mierisstraat 25 > 2526 NM Den Haag > tel 070 4450855 > fax 070 4450852 > http://www.pdd.nl > infopdd.nl > ------------------------- > >

    attached mail follows:


    header("location: redirect.php");

    --
    Jon Farmer  Õ¿Õ¬
    Systems Programmer, Entanet www.enta.net
    Tel 01952 428969 Mob 07968 524175
    PGP Key available, send blank email to pgpkeybctech.co.uk
    

    -----Original Message----- From: Wilbert Enserink [mailto:wilbertpdd.nl] Sent: 24 August 2001 15:45 To: php-generallists.php.net Subject: [PHP] redirect

    Hi all,

    I have the simplest question maybe, but I can't seem to find the answer. It's friday.....

    Anybody knows how I can redirect to another url?

    greetings

    Wilbert

    ------------------------- Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl infopdd.nl -------------------------

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

    attached mail follows:


    Hi,

    I know this question has been asked many times before so I am not asking again :-) What I am asking is how I can search the forum, is there a web based system that I can use to search???

    TIA Ade

    attached mail follows:


    On 8/24/2001 10:54 AM this was written:

    > I know this question has been asked many times before so I am not asking > again :-) What I am asking is how I can search the forum, is there a web > based system that I can use to search???

    Well, there's a Newgroup:

    news.php.net

    There is an archive on this list but I forget where it is. Perhaps the support page on www.php.net will give it.

    -- 
    

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

    attached mail follows:


    Sorry to bother you with what probably seems like a useless question but why is this not skipping a line?

    echo " $team \n ";

    Its in a while loop and the output is:

    Bears Giants Jets ....etc

    attached mail follows:


    In html?

    If it is then you should be using <BR>. An \n will just put a newline in your source code.

    Nick.

    On Fri, 24 Aug 2001, Jeremy Morano wrote:

    > > Sorry to bother you with what probably seems like a useless question but why > is this not skipping a line? > > > echo " $team \n "; > > > > Its in a while loop and the output is: > > Bears Giants Jets ....etc > > >

    attached mail follows:


    you do know you need to put <br> to make it go to a new line :D one of the stupidest mistakes, but done alot :D ----- Original Message ----- From: "Jeremy Morano" <jeremyprepresshelp.com> To: <php-generallists.php.net> Sent: Saturday, August 25, 2001 1:18 AM Subject: [PHP] \n

    > > Sorry to bother you with what probably seems like a useless question but why > is this not skipping a line? > > > echo " $team \n "; > > > > Its in a while loop and the output is: > > Bears Giants Jets ....etc > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    are you on windows or *nix? paste more code

    On Fri, 24 Aug 2001, Jeremy Morano wrote:

    > > Sorry to bother you with what probably seems like a useless question but why > is this not skipping a line? > > > echo " $team \n "; > > > > Its in a while loop and the output is: > > Bears Giants Jets ....etc > > >

    -- 
    

    attached mail follows:


    Hi

    Perhaps I am confused, but is it not possible to return arrays in PHP?

    Example:

    function getArray() { $ret = array('hallo','you'); return $ret; }

    $r = getArray();

    for( $i=0;$i < count($r); $i++) echo "$r[i]";

    Does not work! The array shows 2 Elements, but they are emty

    Hm... Where is do mistake?

    Regards Frank

    --
    SFI Technology Services AG
    Dr. F. Loewenthal
    Stettbachstrasse 10
    CH-8600 Dübendorf
    Switzerland
    

    frank.loewenthalsfi.ch www.sfi.ch +41/1-824 49 00

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

    -- SFI Technology Services AG Dr. F. Loewenthal Stettbachstrasse 10 CH-8600 Dübendorf Switzerland

    frank.loewenthalsfi.ch www.sfi.ch +41/1-824 49 00

    attached mail follows:


    Try "echo "$r[$i]" instead of echo "$r[i]".

    Kirk

    > -----Original Message----- > From: Frank Loewenthal [mailto:frank.loewenthalfreesurf.ch] > Sent: Friday, August 24, 2001 9:33 AM > To: php-generallists.php.net > Subject: [PHP] Fwd: functions returning arrays > > > Hi > > Perhaps I am confused, but is it not possible to return arrays in PHP? > > Example: > > function getArray() { > $ret = array('hallo','you'); > return $ret; > } > > $r = getArray(); > > for( $i=0;$i < count($r); $i++) > echo "$r[i]"; > > Does not work! The array shows 2 Elements, but they are emty > > Hm... Where is do mistake?

    attached mail follows:


    On Fri, 24 Aug 2001, Frank Loewenthal wrote:

    > Hi > > Perhaps I am confused, but is it not possible to return arrays in PHP? > > Example: > > function getArray() { > $ret = array('hallo','you'); > return $ret; > } > > $r = getArray(); > > for( $i=0;$i < count($r); $i++) > echo "$r[i]";

    Do we assume echo "$r[$i]"?? Or is that your mistake ;)

    > > Does not work! The array shows 2 Elements, but they are emty > > Hm... Where is do mistake? > > Regards > Frank > > > > > -- > SFI Technology Services AG > Dr. F. Loewenthal > Stettbachstrasse 10 > CH-8600 Dübendorf > Switzerland > > frank.loewenthalsfi.ch > www.sfi.ch > +41/1-824 49 00 > > ------------------------------------------------------- > >

    attached mail follows:


    okay... I have a function that includes multiple files in a directory - it was working but I changed something and I'm now getting a "Fatal error: input in flex scanner failed"

    can anyone see where I messed up?

    cheers, jaxon ----------------------------------- function group_include($directory) { $handle=opendir("$directory"); while ($file = readdir($handle)) { //load files in $directory into array if ($file != ".." && $file != ".") { $files_to_include[count($files_to_include)] = $file; } }

    //clean up and sort closedir($handle); if (is_array($files_to_include)) { while (list ($key, $val) = each ($files_to_include)) { include "$directory/$val"; } } }

    //include common and page specific modules

    $common_include_dir="modules/common"; $page_include_dir="modules/page";

    group_include($common_include_dir); group_include($page_include_dir);

    attached mail follows:


    A lot of answers about the typing error $r[ i ] resp. $r[ $i ]

    Sorry, this was only wrong in my mail. But this is not the solution.

    Hi

    Perhaps I am confused, but is it not possible to return arrays in PHP?

    Example:

    function getArray() { $ret = array('hallo','you'); return $ret; }

    $r = getArray();

    for( $i=0;$i < count($r); $i++) echo "$r[ $i ]";

    Does not work! The array shows 2 Elements, but they are emty

    Hm... Where is do mistake?

    Regards Frank

    --
    SFI Technology Services AG
    Dr. F. Loewenthal
    Stettbachstrasse 10
    CH-8600 Dübendorf
    Switzerland
    

    frank.loewenthalsfi.ch www.sfi.ch +41/1-824 49 00

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

    -- SFI Technology Services AG Dr. F. Loewenthal Stettbachstrasse 10 CH-8600 Dübendorf Switzerland

    frank.loewenthalsfi.ch www.sfi.ch +41/1-824 49 00

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

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

    -- SFI Technology Services AG Dr. F. Loewenthal Stettbachstrasse 10 CH-8600 Dübendorf Switzerland

    frank.loewenthalsfi.ch www.sfi.ch +41/1-824 49 00

    attached mail follows:


    I would like to send generate a list of members and allow the user to send a mail to all the members.

    This is done using the users email client, so i would have to pass all the names to the mailto link that is generated.

    Is it possible to do so?? and if it is any suggestions on how I can get it done??

    attached mail follows:


    Hi,

    > A lot of answers about the typing error > $r[ i ] resp. $r[ $i ] > > Sorry, this was only wrong in my mail. But this is not the solution.

    Okay.... this was really the mistake. Hm... it is Friday, sorry for this stupid question.

    Regards Frank

    -- 
    SFI Technology Services AG
    Dr. F. Loewenthal
    Stettbachstrasse 10
    CH-8600 Dübendorf
    Switzerland
    

    frank.loewenthalsfi.ch www.sfi.ch +41/1-824 49 00

    attached mail follows:


    Sorry, I know file uploads are asked about all the time...

    I'm having an odd problem on a WinNT system.

    When I try to do my upload, I test the file to see the type of it: $image_info = GetImageSize($the_image);

    However, that line gives me: Warning: getimagesize: Unable to open '/Joe1/Desktop%20Folder/device_eval.gif' for reading. in D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on line 22

    At first I had thought this would be a permissions issue, but the file it can't open is the one being uploaded. If I echo the file being uploaded, i get: Image Name: /Joe1/Desktop%20Folder/device_eval.gif

    I swear I looked at the archive and I've done this plenty of times before (but on Unix). This project is being done on NT, which I'm fairly unfamiliar with though. Any help would be much appreciated.

    Thanks,

    Joe

    attached mail follows:


    Try putting it in a directory that doesn't have a space in it.

    On Fri, 24 Aug 2001, Joseph Koenig wrote:

    > Sorry, I know file uploads are asked about all the time... > > I'm having an odd problem on a WinNT system. > > When I try to do my upload, I test the file to see the type of it: > $image_info = GetImageSize($the_image); > > However, that line gives me: > Warning: getimagesize: Unable to open > '/Joe1/Desktop%20Folder/device_eval.gif' for reading. in > D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on > line 22 > > At first I had thought this would be a permissions issue, but the file > it can't open is the one being uploaded. If I echo the file being > uploaded, i get: > Image Name: /Joe1/Desktop%20Folder/device_eval.gif > > I swear I looked at the archive and I've done this plenty of times > before (but on Unix). This project is being done on NT, which I'm fairly > unfamiliar with though. Any help would be much appreciated. > > Thanks, > > Joe > >

    attached mail follows:


    > I'm having an odd problem on a WinNT system.

    That's what NT is all about. ;)

    > When I try to do my upload, I test the file to see the type of it: > $image_info = GetImageSize($the_image);

    Out of curiousity, who don't you try using:

    if(is_file($the_image)) { do something... } else { kick out no file warning... }

    Docs: http://www.php.net/manual/en/function.is-file.php

    > However, that line gives me: > Warning: getimagesize: Unable to open > '/Joe1/Desktop%20Folder/device_eval.gif' for reading. in > D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on > line 22

    Have you specifically sent the uploaded file there? If not, it's more than likely in whatever temporary upload folder you have defined in your php.ini file.

    > At first I had thought this would be a permissions issue, but the file > it can't open is the one being uploaded. If I echo the file being > uploaded, i get: > Image Name: /Joe1/Desktop%20Folder/device_eval.gif

    Oh! OK, I get it...you're tossing it up onto your desktop. So that path isn't correct. It should be:

    C:\WINNT\Profiles\Joe1\Desktop\device_eval.gif

    In general, you're better off placing that file someplace other than the desktop. Make a folder somewhere nice and generic, like D:\Uploads\Images\ . That'll make your life a whole lot easier.

    Hope this helps, drop me a line if it doesn't... - Erik

    attached mail follows:


    Actually,

    The warning is coming from when I try and upload the file from the desktop of my Mac. It's supposed to get uploaded into: C:\WINNT\PHP\UPLOADTEMP. I checked phpinfo() and that's where it says the upload_tmp_dir is. By the way, I was using the getimagesize to check if the file is a .gif, .jpg, etc. Even without the getimagesize(), the file still isn't being uploaded into the temp folder. I'm using, basically, the same function that I use on Unix systems. Is there something magic about doing uploads on windows that I don't know about? Thanks,

    Joe

    "Erik H. Mathy" wrote: > > > I'm having an odd problem on a WinNT system. > > That's what NT is all about. ;) > > > When I try to do my upload, I test the file to see the type of it: > > $image_info = GetImageSize($the_image); > > Out of curiousity, who don't you try using: > > if(is_file($the_image)) { > do something... > } else { > kick out no file warning... > } > > Docs: > http://www.php.net/manual/en/function.is-file.php > > > However, that line gives me: > > Warning: getimagesize: Unable to open > > '/Joe1/Desktop%20Folder/device_eval.gif' for reading. in > > D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on > > line 22 > > Have you specifically sent the uploaded file there? If not, it's more than > likely in whatever temporary upload folder you have defined in your php.ini > file. > > > At first I had thought this would be a permissions issue, but the file > > it can't open is the one being uploaded. If I echo the file being > > uploaded, i get: > > Image Name: /Joe1/Desktop%20Folder/device_eval.gif > > Oh! OK, I get it...you're tossing it up onto your desktop. So that path > isn't correct. It should be: > > C:\WINNT\Profiles\Joe1\Desktop\device_eval.gif > > In general, you're better off placing that file someplace other than the > desktop. Make a folder somewhere nice and generic, like D:\Uploads\Images\ . > That'll make your life a whole lot easier. > > Hope this helps, drop me a line if it doesn't... > - Erik > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    I went through the same problem. the simplest solution with browsers like IE 5.5 is to click with the right buttom on the link an choose "save this location". You could mention this on the your page in a "if you have trouble dwonloading...." sentence.

    a very stable solution would be to make a selfextracting archive and provige two download links, one for people having the helper application installed and want to just view it or those who want to download it.

    David Minor schrieb:

    > Can anybody tell me why this doesn't work in IE? I need to force download > mp3 files instead of IE5.5 trying to apply a helper app. This code works > fine for NN. > > // detect for MSIE bug > if (strstr($HTTP_USER_AGENT, "MSIE")) > $attachment = ""; > else > $attachment = " attachment;"; > > // stream file to user > header("Content-Type: application/octet-stream"); > header("Content-Disposition:$attachment filename=$filename"); > header("Content-Length: ".filesize($tmp_file)); > header("Content-Transfer-Encoding: binary"); > readfile($tmp_file);

    attached mail follows:


    I went through the same problem. the simplest solution with browsers like IE 5.5 is to click with the right buttom on the link an choose "save this location". You could mention this on the your page in a "if you have trouble dwonloading...." sentence.

    a very stable solution would be to make a selfextracting archive and provige two download links, one for people having the helper application installed and want to just view it or those who want to download it.

    David Minor schrieb:

    > Can anybody tell me why this doesn't work in IE? I need to force download > mp3 files instead of IE5.5 trying to apply a helper app. This code works > fine for NN. > > // detect for MSIE bug > if (strstr($HTTP_USER_AGENT, "MSIE")) > $attachment = ""; > else > $attachment = " attachment;"; > > // stream file to user > header("Content-Type: application/octet-stream"); > header("Content-Disposition:$attachment filename=$filename"); > header("Content-Length: ".filesize($tmp_file)); > header("Content-Transfer-Encoding: binary"); > readfile($tmp_file);

    attached mail follows:


    Hello,

    I've tried one php chat some time ago (myPhPChat ? or something similar) which had some nice features, but was quite slow (compared to what I see with some of the chat functions for example in AOL IM or ICQ ) ... Are PHP based chats just slower? should one go for a CGI solution? Does anyone have some ideas, perhaps can tell of their experience with certain solutions? I appreciate any helpful insights and input! God bless you with His grace and peace Wolfgang

    Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/

    attached mail follows:


    Depends on how BIG is your chat.

    I made a chat that is usually used by 4/5 peoples and it runs great.

    I'm using MySQL (tow tables, one of "rooms" other for "the chat") and PHP, some JavaScript and a Frame.

    see you.

    Augusto

    --- Wolfgang Schneider <schneiderbibelcenter.de> escreveu: > Hello, > > I've tried one php chat some time ago (myPhPChat ? > or something > similar) which had some nice features, but was quite > slow (compared > to what I see with some of the chat functions for > example in AOL IM > or ICQ ) ... Are PHP based chats just slower? should > one go for a CGI > solution? Does anyone have some ideas, perhaps can > tell of their > experience with certain solutions? > I appreciate any helpful insights and input! > God bless you with His grace and peace > Wolfgang > > Looking for Biblical information? COME AND SEE! > -- ONLINE Courses: http://classes.bibelcenter.de ... > NEW! > -- BibelCenter: http://www.bibelcenter.de > -- Bookstore: http://www.worthy.net/BibelCenter/ > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-general-unsubscribelists.php.net > For additional commands, e-mail: > php-general-helplists.php.net > To contact the list administrators, e-mail: > php-list-adminlists.php.net >

    _______________________________________________________________________________________________ Yahoo! GeoCities Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil e grátis! http://br.geocities.yahoo.com/

    attached mail follows:


    On Fri, 24 Aug 2001 13:21:41 -0300 (ART), Augusto Cesar Castoldi wrote:

    >Depends on how BIG is your chat. >I made a chat that is usually used by 4/5 peoples and >it runs great.

    Dear Augusto, thank you for the note ... I would think that perhaps 5-10 people might use the chat at one time. I don't anticipate that the chat facility will become so well known that it draws a lot of people to come and chat ... I think the general chatters would go to specific chat sites ... or use the IRC chat servers etc.

    >I'm using MySQL (tow tables, one of "rooms" other for >"the chat") and PHP, some JavaScript and a Frame.

    Did you write this yourself, or is the application available for download some place on the internet? God bless you with His grace and peace Wolfgang

    Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/

    attached mail follows:


    send an 401 unauthorized header. see php manuall under function header() as an example

    Alex Sofronie schrieb:

    > Hi all! > > How can I "logout" from a PHP based auth (with PHP_AUTH_USER and PHP_AUTH_PW > and appropriate headers sent at the beginning)? > It seems like unset($PHP_AUTH_USER) does not wotk in this case... > > Any help would be appreciated! > > Alex Sofronie > maxxmail.dntis.ro

    attached mail follows:


    I have developed a web portal for big compamies with a lot of traffic on their pages. main functions, like member authentication etc. are called on every page request. it would make sence to have them ready enterpretet to skip enterpretation on each request. i know that there are tools arround like Zent Cache. however they require an recompilation/binding on the server. but this is on such big corporate servers almost impossible.

    Does anybody know a solution for that ?

    attached mail follows:


    I would like to maintain a session without cookies, what would be the best way of going about this?

    I have a very complicated php site, and have recently recieved numerous complaints about the lack of support for people behind firewalls (that block cookies) and browsers with coookies disabled...

    Any help would be appeciated.

    Thanks in advance,

    Saurabh!

    attached mail follows:


    Append the session id on the url.

    There are several ways to do this. Change all urls to put it at the end, add a javascript that will do it for you (saw at php.net's page). Or change an option at php.ini to this also automatically for you, or use ini_set(); if you can't change the .ini.

    --
    

    Julio Nobrega

    A hora está chegando: http://toca.sourceforge.net "Saurabh Kapoor" <saurabh.kbbtinternet.com> wrote in message news:005701c12cba$9148efa0$701923d9killer666... > I would like to maintain a session without cookies, what would be the best > way of going about this? > > I have a very complicated php site, and have recently recieved numerous > complaints about the lack of support for people behind firewalls (that block > cookies) and browsers with coookies disabled... > > Any help would be appeciated. > > Thanks in advance, > > Saurabh! >

    attached mail follows:


    On Fri, 24 Aug 2001 17:33:51 +0100, "Saurabh Kapoor" <saurabh.kbbtinternet.com> wrote:

    >I would like to maintain a session without cookies, what would be the best >way of going about this?

    You missed a related discussion by just a few days. But here is a summary of it ...

    To initialize a session and force the browser to inject the PHPSESSID string into the url of every page, including the first, use this code in the very first page (and only the very first page!)

    <? $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; session_start(); if (!session_is_registered('vsid')) { session_register('vsid'); $HTTP_SESSION_VARS['vsid'] = session_id(); $sidurl = "Location: $PHP_SELF" . '?' . SID; header("$sidurl"); exit(); } .... .... remaining code on first page .... ?>

    And then use this code on all pages you link to:

    <? session_start(); .... .... remaining code .... ?>

    This approach has another benefit too:

    On all pages you link to after the first, you can test the value of "vsid" to see if it matches the value of PHPSESSID. That way, you can determine whether the user reached the other pages by going through the initial page. If not, you can reject the request with a message like "improper request" or something similar.

    In your php.ini, use:

    variables_order = "ECGPS"

    to make GET data override cookie data, and use:

    session.use_trans_sid = 1

    to have PHP inject the PHPSESSID string into document links (PHP also needs a compile flag set, for this .ini value to work). And to turn off cookies, use:

    session.use_cookies = 0

    Or if you have permission for setting these values in an .htaccess file, then in .htaccess you can use:

    php_value session.use_cookies 0 php_value session.use_trans_sid 1 php_value variables_order "ECGPS"

    Hope that helps!

    Egan

    attached mail follows:


    Sorry Hugh - didn't mean to send it just to you!!

    Hi!

    Thanks for the help!

    It works great, but I've now made the array 2 dimensional:

    <?php $index = array ( "The Music Behind<br />Les Mis&eacute;rables" => array ("About Les Mis&eacute;rables"), "Introduction" => array ("About Les Mis&eacute;rables"), "Changes &amp; Cuts" => array ("About Les Mis&eacute;rables"), "Scores" => array ("About Les Mis&eacute;rables"), "Orchestra" => array ("About Les Mis&eacute;rables"), "Synthesizers" => array ("About Les Mis&eacute;rables"), "Sound System" => array ("About Les Mis&eacute;rables"), "Articles" => array ("About Les Mis&eacute;rables"), "21st Century<br />Les Mis&eacute;rables" => array ("About Les Mis&eacute;rables"), "Information" => array ("About Les Mis&eacute;rables"), "Discussion Forums" => array ("About Les Mis&eacute;rables") ); ?>

    (they're not all the same - it's just for quick tesing purposes!)

    Now in the nav menu I get:

    Warning: Undefined offset: 0 in E:\inetpub\wwwroot\index.php on line 103 > Warning: Undefined offset: 1 in E:\inetpub\wwwroot\index.php on line 103 > Warning: Undefined offset: 2 in E:\inetpub\wwwroot\index.php on line 103 > Warning: Undefined offset: 3 in E:\inetpub\wwwroot\index.php on line 103 > etc... down to "10"

    the rest of the script is:

    <?php $items = count($index); for($i = 0; $i < $items; $i++) { echo "\n<tr><td class='navtext'";

    if ($sect == $i) echo " id='sel'";

    echo "><a href='index.php?sect=$i&id=0'>".$index[$i]."</a>"; <-------- LINE 103

    echo "</td></tr>"; } ?>

    is it something to do with the "count($index)"?

    Thanks for all the help!

    Martin-)

    attached mail follows:


    I have written a web based package in php and mysql that I am looking at selling to my customers, The only thing is that I do not want to give them the source code,

    Is there any way in which I can lock the files or secure the files if they are not hosted on my server?

    If not is there other way I can secure the software so that they do not give copies out to their freinds foc.

    Many thanks in advance for your reply.

    Peter Allum

    attached mail follows:


    Encode (or compile) the source.

    Zend's compiler costs 2400 dollars. At this cost is better to release your code on an open source license ;-)

    --
    

    Julio Nobrega

    A hora está chegando: http://toca.sourceforge.net "Peter Allum" <developconnectu.co.uk> wrote in message news:20010824183223.7153.qmailpb1.pair.com... > I have written a web based package in php and mysql that I am looking at > selling to my customers, The only thing is that I do not want to give them > the source code, > > Is there any way in which I can lock the files or secure the files if they > are not hosted on my server? > > If not is there other way I can secure the software so that they do not give > copies out to their freinds foc. > > Many thanks in advance for your reply. > > > Peter Allum > >

    attached mail follows:


    > Encode (or compile) the source. > > Zend's compiler costs 2400 dollars. At this cost is better to > release your code on an open source license ;-)

    The open source license is only as effective as your ability to hire a lawyer to enforce it. ;)

    It also depends on:

    a.) How much you're charging for the product b.) If you feel confident in your ability to police your clients.

    My .02 cents, IMHO, etc, etc... - Erik

    attached mail follows:


    Hello,

    Christopher Cm Allen wrote: > > > > > I'm afraid that PHP is not yet very credible in that world. The truth is > > there is not great marketing force behind PHP like there is Sun behind > > Java or Microsoft behind .Net > > Good point, and how does one go about marketing a language that is > open-source?

    If you don't know it is because you are not very motivated to do it. So, the first step is to convince and motivate yourself that PHP needs to be marketed.

    As for what to do, instead of suggesting new ideas, I would rather recall some old ideas that always seemed to work well.

    For instance, provide PHP users compensation. It does not need to be financial compensation. It may be moral compensation as long as it is real compensation.

    For instance, if I am not mistaken, Guido Van Rossum, the Python creator, sponsored a contest to develop software development tools with cash prizes. Only a few won, but the contest attracted a lot of people and was even mentioned in prestiged software development magazines like Dr. Dobbs. This required some investment, but if you look around you will not have much trouble to find a sponsor.

    Another point is that they managed to get the media on their side. It seems that in the PHP community there is little effort to appeal to media. That is a major waste of oppiortunity because they can provide some much marketing for free.

    One free way to provide compensation to any PHP user is to promote their work. 2 years ago I started a repository of PHP Classes of objects that basically allow anybody to contribute regardless of the quality and utility that you may attribute to what is contributed.

    The point is that once users that anybody can have some fame to have his work exposed to a large PHP audience (over 40.000 subscribers), they want to contribute as well and the site grows thanks to the moral compensation that it offers to any PHP user.

    There are other class repositories, like the official PHP PEAR repository, but the scope is different because the contributions are not accepted arbitrarily, so you don't get as many contributors.

    Other than that, PHP resources sites like these should be officially linked altogether with things like Web rings. It would cause a much better impression to newcomers or ceptic people as it would make PHP more credible exposing the real level of support that the whole PHP community can provide. Unfortunately, the maintainers of PHP main site and Zend site do not seem to agree that it would be a good idea to promote other PHP resources sites with banners to pointing to them like what is done with Web rings.

    Ok, these are just a few ideas that would help PHP to be better marketed. They are not new and have already been discussed before. It is up to the people that have more active roles in the PHP community to open their minds and pick them up.

    > I do it by not allowing FP like extensions on my server's. All of my custom > apps are php or if need be I switch to C/perl. > If I get pushed hard enough I will do c++ :) > > By your own words though , the volume of users of a non-marketed php, > compared to the users of marketed Java et al. speaks for itself. > Php holds its own..

    But for how long?

    > What if a group of developers/designers started marketing PHP?

    Marketing does wonders. I should not need to to tell you that. One problem seems to be some people in the PHP community have some kind of aversion to the idea of that somebody can make money from free software. That way you are ruling out people that can do a lot of good to the growth of the PHP market. I think it is a matter of being more open minded. The more opportunities you provide to others, the greater are the chances that opportunities benefit your goals, in this case a a wider acceptance of PHP making it more credible to people that basically ignore it.

    ok, that's just me trying to be more constructive. :-)

    Regards, Manuel Lemos