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: Mon Sep 17 2001 - 06:51:23 CDT

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

    php-general Digest 17 Sep 2001 11:51:23 -0000 Issue 881

    Topics (messages 67543 through 67594):

    Re: sending a 404 error
            67543 by: Michael A. Peters
            67574 by: Tim Ward

    Re: limiting rows and pages like google
            67544 by: Lawrence.Sheed.dfait-maeci.gc.ca

    SMS with php
            67545 by: Alva Chew
            67548 by: Lewis Bergman
            67576 by: Tom Carter
            67578 by: nico_oreka
            67580 by: Tom Carter
            67593 by: Tom Carter

    Re: mysqlimport & exec()
            67546 by: David Robley

    Problem with Rename() and linux - SOLVED but....
            67547 by: Gaylen Fraley

    Re: Assigning output of include() to a variable
            67549 by: Sid

    Re: PHP vs. PERL (Functional Comparison)??
            67550 by: Bora Paksoy
            67551 by: Bora Paksoy
            67554 by: Rasmus Lerdorf
            67556 by: Rasmus Lerdorf
            67557 by: speedboy
            67559 by: Rasmus Lerdorf
            67562 by: Jack Dempsey

    Performance: PHP vs. Visual Basic
            67552 by: Masami Kawakami
            67553 by: Michael Kimsal
            67555 by: Matthew Loff
            67560 by: Lawrence.Sheed.dfait-maeci.gc.ca

    Re: Why doesn't this work?
            67558 by: Rasmus Lerdorf

    Re: if(isset($a)) vs if($a)
            67561 by: CC Zona

    Re: echo/printing html within a function - best method
            67563 by: speedboy
            67564 by: Rasmus Lerdorf
            67565 by: Jason Bell

    Re: Compiling php like C
            67566 by: Yasuo Ohgaki
            67568 by: Andrew Perevodchik

    FOPEN remote problems..
            67567 by: reberrya
            67585 by: _lallous

    Re: R: viewer analysis
            67569 by: Adrian D'Costa

    Can I use Microsoft Access as a database?
            67570 by: A. op de Weegh
            67571 by: Niklas Lampén

    PHP windows version DLLs ...
            67572 by: nico_oreka

    Re: PHP versus ZOPE
            67573 by: Ben.Edwards.chase.com

    MySQL query error
            67575 by: Niklas Lampén
            67586 by: _lallous
            67587 by: Niklas Lampén

    recognize the URL
            67577 by: Murat
            67594 by: David Otton

    EXTRACTING URL FROM A FILE
            67579 by: chinmay varma

    Re: Overriding PHP build-in functions
            67581 by: _lallous

    Re: Download a file with PHP
            67582 by: _lallous

    R: Login in https, site in http problem
            67583 by: ---

    R: multiple selections in list/menu field
            67584 by: ---

    Re: PHP Web Base Email
            67588 by: Alexander Skwar

    Re: Quick mail function help.... please!!!
            67589 by: Alexander Skwar

    Re: radio button help
            67590 by: Alexander Skwar
            67591 by: Alexander Skwar

    Re: For the RegExps gurus!
            67592 by: * R&zE:

    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:


    Close- this is what actually worked-

    header ("HTTP/1.1 404 Not Found");

    But thanks- it got me on the right track, anyway (i wasn't aware server responses were sent from the header)

    It doesn't log it in the error_log or send the 404 error page, but i have a custom error page- so i just include() it... works beautifully, and agents like wget understand there's nothing to grab.

    On Sun, 16 Sep 2001 20:44:02 -0800
    GATop <gatophot.ee> wrote:

    *snip*
    >
    > MAP> I would like to replace the line
    > MAP> die ("The file you wish to download does not exist");
    >
    > MAP> with instead an invocation of the http 404 error.
    >
    *snip
    >
    > Yes You can
    >
    > header ("404 Not Found");
    >
    > should work
    >
    > --
    > Best regards,
    > GATop mailto:gatophot.ee
    >

    -- 
    -=-=-=-=-=-=-=-=-=-=-=-=-
    Michael A. Peters
    http://24.5.29.77:10080/
    

    attached mail follows:


    ... and how do you get the server to send a 404 error if the browser calls a page that doesn't exist with a suffix that is marked to be parsed by php?

    Tim Ward

    ---------- From: GATop [SMTP:gatophot.ee] Sent: 17 September 2001 05:44 To: php-generallists.php.net Subject: Re: [PHP] sending a 404 error

    Hello Michael,

    Sunday, September 16, 2001, 9:05:35 AM, you wrote:

    MAP> Is it possible to invoke the server 404 error error from php?

    MAP> Where I would like to do such a thing is

    MAP> http://24.5.29.77:10080/encryption/index.phps

    MAP> I would like to replace the line MAP> die ("The file you wish to download does not exist");

    MAP> with instead an invocation of the http 404 error.

    MAP> Theoretically a 404 error should never happen if I properly did my stuff, but it would be nice for me to be able to detect such problems just from the http error logs...

    MAP> If there's not a way to directly do it, I'll need to redirect to a 404 error page (well, include my custom error page) and have the script make an entry into the http_error log- but a nice one MAP> liner invocation of Apache's built in 404 error function would be nice...

    Yes You can

    header ("404 Not Found");

    should work

    -- Best regards, GATop mailto:gatophot.ee

    attached mail follows:


    How about limiting results?

    eg limit the return page value after a certain number (say 10) to every 5 pages, then 50 pages a la google.

    Page 1 2 3 4 5 6 7 8 9 10 ..15 ..20 ..50 ..100

    This can be done relatively easily

    eg (untested)

    for ($count=1;$count<=$pages;$count++) { // loop thru //set modifier for page display if ($count < 10) $iMod = 1; elseif ($count <50) $iMod = 5; else $iMod=50; if ($count % $iMod==0) //Are we on an exact iMod boundary? print "<a href=\"$PHP_SELF?offset=$count\">$i</a> &nbsp; \n"; }

    -----Original Message----- From: Adrian D'Costa [mailto:adrianpcsadvt.com] Sent: September 14, 2001 5:57 PM To: Lawrence.Sheeddfait-maeci.gc.ca Cc: woodjucalgary.ca; php general list Subject: RE: [PHP] limiting rows and pages like google

    Hi,

    Thanks. Instead of using next and previous I am giving the page number at the bottom of the page (see lastminute.vvmm.net/nextweek.php). The problem is that if there are, say 35 pages, the page numbers go off the screen. This is the snippet:

    if ($nopage>=$limit) {

    echo ("<center><table border=\"0\" width=\"100%\"> <tr> <td><font face=\"Arial\" size=\"1\">Pagina</td>"); for($j=1; $j<=($nopage); $j++) { //$next = $limit*($j-1); $xi = ($j-1); echo("<td><font face=\"Arial\" size=\"1\"><a href=\"$PHP_SELF?npage=$xi\">[$page[$j]]</a></font> </td>");

    } echo(" </tr> </table></center>"); }

    Adrian

    On Thu, 13 Sep 2001 Lawrence.Sheeddfait-maeci.gc.ca wrote:

    > 2 queries is ok imho, but let the database do all the work ;) > > The first query should be a select count (*) QUERY for a count. > The second query should be the actual QUERY. > > Eg something cut 'n' pasted from some code of mine (not nice, but hey ;) ) > > ------------------------------ > > $db = mysql_connect($db_domain, $db_user,$db_password); > mysql_select_db($db_databasename,$db); > > $sqlwhere = " where CuisineID = $CuisineID "; > > $numresults=mysql_query( "select count(*) from restaurants" . $sqlwhere); > $numrows=mysql_num_rows($numresults); > > // get results > $sqlstring= "select ID, Name,LanguageID from restaurants ". $sqlwhere . > "limit $offset,$limit"; > $result=mysql_query($sqlstring,$db); > > //Do stuff with $result... > > // calculate number of pages needing links > $pages=intval($numrows/$limit); > > // $pages now contains int of pages needed unless there is a remainder from > division > if ($numrows%$limit) { > // has remainder so add one page > $pages++; > } > > for ($i=1;$i<=$pages;$i++) { // loop thru > $newoffset=$limit*($i-1); > print "<a href=\"$PHP_SELF?offset=$newoffset\">$i</a> &nbsp; \n"; > } > > // check to see if last page > if (!(($offset/$limit)==$pages) && $pages!=1) { > // not last page so give NEXT link > $newoffset=$offset+$limit; > print "<a href=\"$PHP_SELF?offset=$newoffset\">NEXT</a><p>\n"; > } > > -----Original Message----- > From: Julian Wood [mailto:woodjucalgary.ca] > Sent: September 14, 2001 1:34 AM > To: php general list > Subject: Re: [PHP] limiting rows and pages like google > > > > It's not too hard to do the next/previous through all your results, as > has been shown by several people. What is a little trickier, at least > when using mysql and trying to take advantage of the limit clause, is > how to display how many results you have (ie 1 to 10 of 107 results). If > you use the limit, you can't get the total number of rows, without doing > a second search sans limit. It's also harder to do the next link, > because you don't necessarily know if there are any more rows (imagine > you are displaying 10 rows at a time, you are on page 3 and there are 30 > total rows). Conversely, if you do a single query without the limit, > then you're doing a slower search (limiting a search is way faster), and > I'm not sure of the implications of the full result set residing > serverside - maybe higher memory requirements. So what do people do to > take advantage of limit? Two queries or a single query? Any other > solutions? Any more insights on how limit works? > > Julian > > On Wednesday, September 12, 2001, at 10:16 PM, Adrian D'Costa wrote: > > > > > Hi, > > > > I am trying to find out the the best way to do the following: > > > > I have a script that select records from a table. The problem is that I > > need to limit the rows to 20. I know that I can use limit 20. But > > what I > > want to do is give the view a link to the next 20 till all the records > > are > > shown. What I don't know is how to maintain the search query and I want > > to use the same script. > > > > The logic would be to check if the script is called the first time, then > > the sql statement would be select travel.*, city.city from travel, city > > where travel.cityid=city.id limit 0,20. > > The second time or based on what has been selected on the page (1-20, > > 21-40, etc) add that to the sql statement. My question is how? > > > > Can someone guide me or give me some example. > > > > TIA > > > > 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 > > > > -- > Julian Wood > > Programmer/Analyst > University of Calgary > >

    attached mail follows:


    Hi,

    Does anyone know how to send a sms message to a handphone using PHP?

    Thanks and regards, Alva Chew

    attached mail follows:


    > Hi, > > Does anyone know how to send a sms message to a handphone using PHP? > > Thanks and regards, > Alva Chew I have a class that does it. It is very easy. See the RFC on SNPP and some use standard mail servers.

    attached mail follows:


    I'm very intruiged how you have got this to work.... it was my understanding you needed to be running a server, such as kannel, and have a contract with an smsc?

    Is this so?

    ----- Original Message ----- From: "Lewis Bergman" <lbergmanabi.tconline.net> To: <alvachewyahoo.com> Cc: <php-generallists.php.net> Sent: Monday, September 17, 2001 2:59 AM Subject: Re: [PHP] SMS with php

    > > Hi, > > > > Does anyone know how to send a sms message to a handphone using PHP? > > > > Thanks and regards, > > Alva Chew > I have a class that does it. It is very easy. See the RFC on SNPP and some > use standard mail servers. > > > -- > 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:


    http://www.ietf.org/rfc/rfc1568.txt?number=1568

    maybe something can be done with that ....

    (°- Nayco, //\ Nayconetcourrier.com v_/_ http://nayco.free.fr

    ----- Original Message ----- From: Tom Carter <subsroundcorners.com> To: Lewis Bergman <lbergmanabi.tconline.net>; <alvachewyahoo.com> Cc: <php-generallists.php.net> Sent: Monday, September 17, 2001 10:51 AM Subject: Re: [PHP] SMS with php

    > I'm very intruiged how you have got this to work.... it was my understanding > you needed to be running a server, such as kannel, and have a contract with > an smsc? > > Is this so? > > ----- Original Message ----- > From: "Lewis Bergman" <lbergmanabi.tconline.net> > To: <alvachewyahoo.com> > Cc: <php-generallists.php.net> > Sent: Monday, September 17, 2001 2:59 AM > Subject: Re: [PHP] SMS with php > > > > > Hi, > > > > > > Does anyone know how to send a sms message to a handphone using PHP? > > > > > > Thanks and regards, > > > Alva Chew > > I have a class that does it. It is very easy. See the RFC on SNPP and some > > use standard mail servers. > > > > > > -- > > 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:


    Thats the standard, but because of the other systems involved in delivering msgs then I don't think it possible just to do that without the co-operation of a third party smsc.

    I really hope I'm wrong tho... ----- Original Message ----- From: "nico_oreka" <costes.nicolasoreka.com> To: "Tom Carter" <subsroundcorners.com>; "Lewis Bergman" <lbergmanabi.tconline.net>; <alvachewyahoo.com> Cc: <php-generallists.php.net> Sent: Monday, September 17, 2001 11:00 AM Subject: Re: [PHP] SMS with php

    > http://www.ietf.org/rfc/rfc1568.txt?number=1568 > > maybe something can be done with that .... > > > (°- Nayco, > //\ Nayconetcourrier.com > v_/_ http://nayco.free.fr > > > ----- Original Message ----- > From: Tom Carter <subsroundcorners.com> > To: Lewis Bergman <lbergmanabi.tconline.net>; <alvachewyahoo.com> > Cc: <php-generallists.php.net> > Sent: Monday, September 17, 2001 10:51 AM > Subject: Re: [PHP] SMS with php > > > > I'm very intruiged how you have got this to work.... it was my > understanding > > you needed to be running a server, such as kannel, and have a contract > with > > an smsc? > > > > Is this so? > > > > ----- Original Message ----- > > From: "Lewis Bergman" <lbergmanabi.tconline.net> > > To: <alvachewyahoo.com> > > Cc: <php-generallists.php.net> > > Sent: Monday, September 17, 2001 2:59 AM > > Subject: Re: [PHP] SMS with php > > > > > > > > Hi, > > > > > > > > Does anyone know how to send a sms message to a handphone using PHP? > > > > > > > > Thanks and regards, > > > > Alva Chew > > > I have a class that does it. It is very easy. See the RFC on SNPP and > some > > > use standard mail servers. > > > > > > > > > -- > > > 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:


    for those who are interested there is a good wap/sms server, open source and generally funky.... kannel (kannel.3glabs.org)

    It's all you need to server wap, but sms does requrie a contract (=cost money) with a service centre

    ----- Original Message ----- From: "Tom Carter" <subsroundcorners.com> To: "nico_oreka" <costes.nicolasoreka.com>; "Lewis Bergman" <lbergmanabi.tconline.net>; <alvachewyahoo.com> Cc: <php-generallists.php.net> Sent: Monday, September 17, 2001 11:07 AM Subject: Re: [PHP] SMS with php

    > Thats the standard, but because of the other systems involved in delivering > msgs then I don't think it possible just to do that without the co-operation > of a third party smsc. > > I really hope I'm wrong tho... > ----- Original Message ----- > From: "nico_oreka" <costes.nicolasoreka.com> > To: "Tom Carter" <subsroundcorners.com>; "Lewis Bergman" > <lbergmanabi.tconline.net>; <alvachewyahoo.com> > Cc: <php-generallists.php.net> > Sent: Monday, September 17, 2001 11:00 AM > Subject: Re: [PHP] SMS with php > > > > http://www.ietf.org/rfc/rfc1568.txt?number=1568 > > > > maybe something can be done with that .... > > > > > > (°- Nayco, > > //\ Nayconetcourrier.com > > v_/_ http://nayco.free.fr > > > > > > ----- Original Message ----- > > From: Tom Carter <subsroundcorners.com> > > To: Lewis Bergman <lbergmanabi.tconline.net>; <alvachewyahoo.com> > > Cc: <php-generallists.php.net> > > Sent: Monday, September 17, 2001 10:51 AM > > Subject: Re: [PHP] SMS with php > > > > > > > I'm very intruiged how you have got this to work.... it was my > > understanding > > > you needed to be running a server, such as kannel, and have a contract > > with > > > an smsc? > > > > > > Is this so? > > > > > > ----- Original Message ----- > > > From: "Lewis Bergman" <lbergmanabi.tconline.net> > > > To: <alvachewyahoo.com> > > > Cc: <php-generallists.php.net> > > > Sent: Monday, September 17, 2001 2:59 AM > > > Subject: Re: [PHP] SMS with php > > > > > > > > > > > Hi, > > > > > > > > > > Does anyone know how to send a sms message to a handphone using PHP? > > > > > > > > > > Thanks and regards, > > > > > Alva Chew > > > > I have a class that does it. It is very easy. See the RFC on SNPP and > > some > > > > use standard mail servers. > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > > For additional commands, e-mail: php-general-helplists.php.net > > > > To contact the list administrators, e-mail: > php-list-adminlists.php.net > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > > > For additional commands, e-mail: php-general-helplists.php.net > > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    On Sat, 15 Sep 2001 13:02, Terry Reynolds wrote: > Hi > has anyone in the PHP world ever managed to run mysqlimport via exec? > > I have written a one line script > > mysqlimport -u user -ppassword table file.txt > > & chmodded it (+ x), which works from the command line every time. > I've tried exec(), system() etc within PHP but with no luck. > I have my own Linux/Apache/Slackware box at an IP and I have tried all > relevant files & directories (including mysqlimport command) as > root.root and nobody.nobody. Any ideas would be appreciated. > TIA > Terry

    Check that it is actually executable by the user that your webserver runs as.

    Checking the output of exec might give some insight.

    -- 
    David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
    CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  
    

    Useless Invention: Training wheels for timid sports car drivers.

    attached mail follows:


    I figured out another way to solve this. But, I need to know the downside, if any.

    I chmod the directory to 2777 and leave Apache as is. Obviously this opens the directory up to danger if someone hacks in.

    Comments?

    --
    Gaylen
    gfraley5earthlink.net
    http://www.gaylenandmargie.com
    PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts
    

    "Chris Schneck" <chrishubcityhosting.com> wrote in message news:003d01c13ef8$84435020$0500a8c0no.shawcable.net... > Although this is a little OT, I dont remember any online tutorials that > helped me and this is a fairly lengthy explanation. In your httpd.conf (this > is how i did it you can find your own way im sure) set the apache user to be > www and the group to www. Apache now knows to run as that user, but your > linux box doesnt know that user which seems to be the root of your problem. > Now you have to edit the file '/etc/passwd' and add a line like > 'www:x:105:105:www::' then edit your '/etc/group' file and a dd a line like > 'www::105:'. > Restart your Apache server. > Now your Apache server is ready to run as user www group www. Any Directory > of Files that Apache is going to be working with should be chown'ed to > www.www > > Remember not to 'adduser' to accomplish this, you dont want anyone actually > logging in as www :) Hope this helped a little. > > > From: "Gaylen Fraley" <gfraley5earthlink.net> > To: <php-generallists.php.net> > Sent: Sunday, September 16, 2001 2:07 PM > Subject: [PHP] Re: Problem with Rename() and linux - update > > > > It is the delete (unlink) portion that the page cannot execute. So, I > > assume this is a setting in my server conf? Apache is running as nobody, > > but nobody is not a valid user on my linux server. Is that the problem? > If > > so, is the normal prcatice to have a user like 'web' and give all rights > to > > that user? Alternatively I could do a copy and truncate to accomplish the > > same task, but this seems too laborious. Thoughts? > > > > -- > > Gaylen > > gfraley5earthlink.net > > http://www.gaylenandmargie.com > > PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts > > > > "Gaylen Fraley" <gfraley5earthlink.net> wrote in message > > news:20010916194315.94381.qmailpb1.pair.com... > > > I am attempting to use the rename() function and am receiving the > > following > > > error: > > > > > > Warning: Rename failed (Permission denied) in > > > /usr/local/apache/htdocs/mydir/myfile.php on line 7 > > > > > > The files all have a mod of 777 . My application can update the same > file > > > w/o any problem, it's only when attempting to use rename. Is there > > > something else I need to do? It's as if delete is not allowed by httpd, > > > although as root I can. This does work in windows, so I know the syntax > > is > > > correct. > > > > > > Thanks. > > > > > > -- > > > Gaylen > > > gfraley5earthlink.net > > > http://www.gaylenandmargie.com > > > PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts > > > > > > > > > > > > > > > > > -- > > 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:


    Hey I did it. A special thanks goes out to Michael Kimsal for giving me the idea of output buffering. Here is the code I used. Hope this helps

    ob_start(); // Start output bufering include ("$filename"); //$filename is the file you want to include $x = ob_get_contents(); //Set the contents of the output buffer to variable x ob_end_clean(); //Stop output buffering and flush its contents without giving output. If you want it to give out put change this line to ob_end_flush();

    Once again thanks to everyone who helped :-)

    SID

    At 11:09 PM 9/9/01 -0400, you wrote: >file() probably won't do it, unless you call an http:// file request to >your webserver - PHP won't execute other PHP code in another file when >pulled in thru file(). > >What you are looking for is most likely output buffering. > >Read up on ob_start at php.net/ob_start. Basically turn output buffering >on, include() the file, grab the contents from the output buffer, put them >into $x, and clear the buffer. There should be an example or 2 at the >website. zend.com also had an article on output buffering. > > > >-------------------- >Michael Kimsal >http://www.tapinternet.com >734-480-9961 > > >On Mon, 10 Sep 2001, Jason Brooke wrote: > > > > Hi, > > > > > > I've been trying to figure this thing out for 3 hours now. Lets say we > > have > > > a variable $x. Now I need to assign $x with similar output that comes > from > > > an include function. > > > > > > For anyone who did not understand me --> Instead of the stupid include() > > > function outputing the file contents to the browser I need it to > assign it > > > to variable x. > > > > > > I am pretty sure inlude() cannot do it but is there any other function > > > similar to include() that will process the file and then assign the > output > > > to a variable. > > > > > > Thanks in advance > > > > > > SID > > > > there's a stupid function called file() that does that > > it's in the stupid manual - which also explains the behaviour of > include for > > you as well > > > > jason > > > > > > > > > > -- > > 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:


    > Why on earth would you prefer java servlets?

    Hmm... Let's see;Java is a full-fledge, totally OOP and awesome programming language but not a scripting language. Speed (will be mentioning this later), having total control over whatever you want (exception handling, db pooling, caching, syncrhonization, threadding, etc. etc.), ease of use, etc. etc. I mean, come on;)

    > veins as well), therefore its imho much easier > to do web programming with php.

    That is what I saw, but as I said, I didn't see a lot of difference between perl and php, I mean, C++ and perl are very different, likewise java and perl or other languages, but PHP has a very similar syntax.

    > FYI, JSP is the slowest to my knowledge.

    The first request is slow since JSPs are compiled into servlets (java classes)... But, then it is not bad... In fact, I saw some comparisons showing that servlets are kicking ass! But, again, I mean, this all depends on how you design/configure the system, one simple example:java used to crap out (before 1.2, don't know the latest situation, but heard that it is better) after 40-50 threads per jvm, so if you have more than 40-50 concurrent requests, starting couple of servlet engines on different jvms and using apache dispatching improves the speed a lot! Likewise, tricks like using caching, staying away from classic traps (i.e. using StringBuffers instead of Strings when needed), minimizing garbage collection, etc. etc. Also, with the introduction of JIT and hotspot capable JREs, java is doing pretty well these days...You can check comparisons at rasin servlet engine page.

    > No, its not available on Windows, but then > again, why on earth would you want to use Windows? ;)

    Same here;) I am supposed to implement this sytem on windows 2000...But I totally agree! I would definitely prefer linux or other unix systems over windows...

    If you really need > shm on windows, submit a patch, hint, its just a mmap() :)

    Well, what I meant was something like ease of sharing data in java (using static variables) and dealing with synchronization is extremely easy in java... Also, FastCGI is not that hard as far as I could see, but I am not an expert in that area;)

    > You can use Files or SHM management, or write > your own custom session backend using for example MySQL.

    Using a database in the backhand is what huge sites are doing, but they have huge boxes to run these databases and very fast network infrastructure. Do you think overhead of serializing/de-serializing session for every request via the database is a lot? Files again is??? I don't know... As you specified SHM is not very nice either (dealing with synchronization might be messy).

    > No. Its compile and execute everytime

    ??? Don't you think using perl and printing out html from the code is faster than this? I mean, parsing the whole html doesn't seem very good???Actually, this is what I was scared of. I mean, for example say you have an html that consists of blocks... Making every block an include is clean, but this time, php engine has to read all of these includes, and parse the html+php and compile/run php everytime a request is made??? I am not sure about this?

    > Yes, but do you want your web designer going > through your perl code

    Hmmm, good point, hehehehe...

    Thanks a lot for your time and I appreciate your comments.

    Baho...

    __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/

    attached mail follows:


    > Threading instead of forking? None of these do > either. Apache is a > pre-forking multi-process server and both PHP and > mod_perl are part of > these pre-forked processes. Neither mod_perl nor > PHP do any threading nor forking.

    ??? I didn't get this? Aren't these pre-forked processes handle requests using threads internally? Say you configure apache to pre-fork 5 server processes, what you are saying implies that you can only handle 5 concurrent requests?????? can you please explain this more?

    > Again, the architectural difference makes this a lot > easier to do in a > single-process JVM scenario. Note that such a > single-process JVM > architecture which maintains static objects is very > hard to scale cleanly.

    Actually, as far as I know, you can configure tomcat or other servlet engines to start multiple servlet engines (JVMs) and the dispatcher code makes sure that every user goes to the same JVM for subsequent requests. So, you can scale with this architecture...

    > The lifecycle of a request/response matches the > lifecycle of an HTTP request/response.

    Actually, I was asking the low-level information, I mean something like web server receives the request, hands this over to mod_php, that requests a thread from the worker threads, so on so forth...

    Anyways, once again, thanks for your time... Baho.

    __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/

    attached mail follows:


    > ??? I didn't get this? Aren't these pre-forked > processes handle requests using threads internally? > Say you configure apache to pre-fork 5 server > processes, what you are saying implies that you can > only handle 5 concurrent requests?????? can you please > explain this more?

    That's exactly what it means. Apache on Unix is non-threaded.

    > Actually, I was asking the low-level information, I > mean something like web server receives the request, > hands this over to mod_php, that requests a thread > from the worker threads, so on so forth...

    Well, since there are no threads involved here there is no pool of worker threads or anything like that. You simply have a process that grabs a requests, branches off to mod_php/mod_perl and sends the result back.

    -Rasmus

    attached mail follows:


    > I mean, for example say you have > an html that consists of blocks... Making every block > an include is clean, but this time, php engine has to > read all of these includes, and parse the html+php and > compile/run php everytime a request is made??? I am > not sure about this?

    I wouldn't say it was clean to split everything out into separate files. I tend to do something more like:

    <? include 'logic.php' ?> <HTML> tags tags tags <? my_func() ?> More tags <? another_func() ?> More tags <? footer() ?>

    ie. don't necessarily use 1 file per block, create functions that are defined in a single file and call those instead of including a new file. If you really do want to separate it, have a look at a cacheing templating system like Smarty which lets you keep this per-file separation but it caches the combined logic.

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

    -Rasmus

    attached mail follows:


    > ie. don't necessarily use 1 file per block, create functions that are > defined in a single file and call those instead of including a new file.

    How do you echo your html, do you put the html in your functions and escape the double quotes? There is some extra load there echoing all the html?

    Thanks.

    attached mail follows:


    > > ie. don't necessarily use 1 file per block, create functions that are > > defined in a single file and call those instead of including a new file. > > How do you echo your html, do you put the html in your functions and > escape the double quotes? There is some extra load there echoing all the > html?

    echo HTML? I do this:

    <? php stuff..?> HTML stuff <? more php stuff ?>

    I drop out of PHP mode to display raw HTML. If I have a lot of HTML with a lot of PHP variables tossed in, I do:

    <? $test = 'test'; $one = 'one'; echo <<<EOF This is a $test. And here is another $one. EOF; ..more php code... ?>

    Or sometimes simply:

    HTML stuff <?=$variable?> and some more HTML stuff.

    -Rasmus

    attached mail follows:


    hallelujah...first time i've seen someone else mention here docs, and being rasmus, not a bad person to make the mention ;-)

    -----Original Message----- From: Rasmus Lerdorf [mailto:rasmusphp.net] Sent: Monday, September 17, 2001 12:17 AM To: speedboy Cc: php-generallists.php.net Subject: Re: [PHP] PHP vs. PERL (Functional Comparison)??

    > > ie. don't necessarily use 1 file per block, create functions that are > > defined in a single file and call those instead of including a new file. > > How do you echo your html, do you put the html in your functions and > escape the double quotes? There is some extra load there echoing all the > html?

    echo HTML? I do this:

    <? php stuff..?> HTML stuff <? more php stuff ?>

    I drop out of PHP mode to display raw HTML. If I have a lot of HTML with a lot of PHP variables tossed in, I do:

    <? $test = 'test'; $one = 'one'; echo <<<EOF This is a $test. And here is another $one. EOF; ..more php code... ?>

    Or sometimes simply:

    HTML stuff <?=$variable?> and some more HTML stuff.

    -Rasmus

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


    Maybe this is one of FAQ, Please give me a URL of this kind of comparison page, or your experience.

    A web server program is running in my office. It consists of Visual Basic, IIS, and MS SQL Server on Windows 2000. although the performance is confortable for few users, it is terribly slow for 40-50 users. Once all of them start to use, it takes more than 20 seconds to open a page in client browser.

    To improve the performance, we have an idea to use, instead of Microsoft, PHP, Apache, and mySQL/ProgreSQL on Linux. How much will be the improvement?

    We also have plan to enhance the hardware, 1PC for DataBase, 2nd and 3rd for IIS or Apaches. Which has better scalability, VB or PHP?

    -- 
    Masami Kawakami <mkwkmworldnet.att.net>
    

    attached mail follows:


    Much as I don't like to defend MS, I'll take a stab here.

    By 40-50 people in an office, I presume you're talking about an intranet of some type - 40-50 aren't constantly hitting it (meaning 40-50 requests per second all the time), but 40-50 are using it throughout the day for various tasks.

    You don't give the machine specs, but I'd hazard to say, if it's moderate equipment, that there's some DB optimization (or VB optimization) that could be done. 40 people lightly hitting a machine shouldn't cause much of a problem regardless of language used, unless there's some extremely bad coding going on.

    Are you closing DB connections? Are you avoiding putting objects in session and/or application scope? Are the DB queries optimized properly (proper indices on tables, etc)?

    Those are just a few things I'd look for. Yeah it'd be great to have you switch to PHP, but some optimization issues are universal, and if it's written poorly in one language, chances are it'll be written poorly in another.

    Regardless of this, we still recommened PHP to most clients because of the cost issue as well. However, since you've already paid for this software you're running (right?) it's probably worth it to take a while to optimize what you've got first.

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

    On Sun, 16 Sep 2001, Masami Kawakami wrote:

    > Maybe this is one of FAQ, Please give me a URL of this kind of comparison > page, or your experience. > > A web server program is running in my office. It consists of Visual > Basic, IIS, and MS SQL Server on Windows 2000. although the performance > is confortable for few users, it is terribly slow for 40-50 users. Once > all of them start to use, it takes more than 20 seconds to open a page > in client browser. > > To improve the performance, we have an idea to use, instead of Microsoft, > PHP, Apache, and mySQL/ProgreSQL on Linux. How much will be the > improvement? > > We also have plan to enhance the hardware, 1PC for DataBase, 2nd and 3rd > for IIS or Apaches. Which has better scalability, VB or PHP? > > > > -- > Masami Kawakami <mkwkmworldnet.att.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 would agree that the DB is probably the biggest bottleneck...

    Are you connecting to the DB via ODBC? I'm not an expert at DB stuff outside of the MySQL realm, but I've heard many say ODBC is horribly slow. I don't know ASP that well, but could someone comment on ADODB? It uses OLEDB, not ODBC, correct? I've read that OLEDB is much faster.

    First and foremost, as Michael said, optimize your SQL... That's the first thing I'd do... Then, check and see how you are connecting to the DB...

    I think I can safely say, that if you switch to PHP/MySQL, that using MySQL native libs to connect to the database are fastest... But I have been wrong in the past...

    -----Original Message----- From: Michael Kimsal [mailto:michaelwings.themusicguide.com] Sent: Sunday, September 16, 2001 11:54 PM To: Masami Kawakami Cc: php forum Subject: Re: [PHP] Performance: PHP vs. Visual Basic

    Much as I don't like to defend MS, I'll take a stab here.

    By 40-50 people in an office, I presume you're talking about an intranet of some type - 40-50 aren't constantly hitting it (meaning 40-50 requests per second all the time), but 40-50 are using it throughout the day for various tasks.

    You don't give the machine specs, but I'd hazard to say, if it's moderate equipment, that there's some DB optimization (or VB optimization) that could be done. 40 people lightly hitting a machine shouldn't cause much of a problem regardless of language used, unless there's some extremely bad coding going on.

    Are you closing DB connections? Are you avoiding putting objects in session and/or application scope? Are the DB queries optimized properly (proper indices on tables, etc)?

    Those are just a few things I'd look for. Yeah it'd be great to have you switch to PHP, but some optimization issues are universal, and if it's written poorly in one language, chances are it'll be written poorly in another.

    Regardless of this, we still recommened PHP to most clients because of the cost issue as well. However, since you've already paid for this software you're running (right?) it's probably worth it to take a while to optimize what you've got first.

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

    On Sun, 16 Sep 2001, Masami Kawakami wrote:

    > Maybe this is one of FAQ, Please give me a URL of this kind of > comparison page, or your experience. > > A web server program is running in my office. It consists of Visual > Basic, IIS, and MS SQL Server on Windows 2000. although the > performance is confortable for few users, it is terribly slow for > 40-50 users. Once all of them start to use, it takes more than 20 > seconds to open a page in client browser. > > To improve the performance, we have an idea to use, instead of > Microsoft, PHP, Apache, and mySQL/ProgreSQL on Linux. How much will be

    > the improvement? > > We also have plan to enhance the hardware, 1PC for DataBase, 2nd and > 3rd for IIS or Apaches. Which has better scalability, VB or PHP? > > > > -- > Masami Kawakami <mkwkmworldnet.att.net> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net To > contact the list administrators, e-mail: php-list-adminlists.php.net >

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

    attached mail follows:


    It may not be a performance thing based on software in use, it could be coding problems with the current software.

    If you are having problems with 40 - 50 users, you may want to look at where things are locking up. Table locking because of badly designed update queries can freeze a good system because of contentions.

    How do you handle concurrent locking - what does your code look like for the initial 20 seconds to load page / slow loading pages?

    Run some performance monitoring on sql server, it has good tools for this, as does win2k.

    How much ram do you have? sql server eats ram. (buy more, depending on whether your monitoring tells you its needed - look at paging). There are lots of nt tuning faq's out there. Check what you have before dumping it for something else.

    I learnt from someone once its better to find out and understand the problem than to avoid it. It may come back and bite you.

    That said, php is more scalable than vb (flamebait), but its equally easy to write bad code in both. SQL Server is a bit of a behemoth, but feed it nicely (ram), and it generally behaves (*unless you are russian nuclear materials database admins - see slashdot for more.)

    Regards,

    Lawrence

    -----Original Message----- From: Masami Kawakami [mailto:mkwkmworldnet.att.net] Sent: September 17, 2001 11:43 AM To: php forum Subject: [PHP] Performance: PHP vs. Visual Basic

    Maybe this is one of FAQ, Please give me a URL of this kind of comparison page, or your experience.

    A web server program is running in my office. It consists of Visual Basic, IIS, and MS SQL Server on Windows 2000. although the performance is confortable for few users, it is terribly slow for 40-50 users. Once all of them start to use, it takes more than 20 seconds to open a page in client browser.

    To improve the performance, we have an idea to use, instead of Microsoft, PHP, Apache, and mySQL/ProgreSQL on Linux. How much will be the improvement?

    We also have plan to enhance the hardware, 1PC for DataBase, 2nd and 3rd for IIS or Apaches. Which has better scalability, VB or PHP?

    -- 
    Masami Kawakami <mkwkmworldnet.att.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:


    > print split("=",$testString)[0];

    First, using split() on such a simple delimiter is a waste. Use explode(). And yes, PHP does not support automatic dereferencing of returned arrays like that.

    -Rasmus

    attached mail follows:


    In article <200109161757.f8GHvSj05426zeus.mminternet.net>, maggeletmminternet.com (Mark) wrote:

    > calling empty($a) does not give a warning.

    Sheesh. It doesn't at that. WTF?

    -- 
    CC
    

    attached mail follows:


    > > How do you echo your html, do you put the html in your functions and > > escape the double quotes? There is some extra load there echoing all the > > html? > > echo HTML? I do this: > > <? php stuff..?> > HTML stuff > <? more php stuff ?> > > I drop out of PHP mode to display raw HTML. If I have a lot of HTML with > a lot of PHP variables tossed in, I do: > > <? > $test = 'test'; > $one = 'one'; > echo <<<EOF > This is a $test. > And here is another $one. > EOF; > ..more php code... > ?>

    I meant to say, in your functions, do you use the same as above echo <<<EOF ...

    Thanks.

    attached mail follows:


    > > > How do you echo your html, do you put the html in your functions and > > > escape the double quotes? There is some extra load there echoing all the > > > html? > > > > echo HTML? I do this: > > > > <? php stuff..?> > > HTML stuff > > <? more php stuff ?> > > > > I drop out of PHP mode to display raw HTML. If I have a lot of HTML with > > a lot of PHP variables tossed in, I do: > > > > <? > > $test = 'test'; > > $one = 'one'; > > echo <<<EOF > > This is a $test. > > And here is another $one. > > EOF; > > ..more php code... > > ?> > > I meant to say, in your functions, do you use the same as above echo <<<EOF ...

    I try to avoid having my functions generate HTML. But yes, when they do I use the same approach. You can have functions that look like this:

    <? function foo() {?> HTML Stuff <? } ?>

    That is, a function that does nothing but output HTML.

    -Rasmus

    attached mail follows:


    Out of curiosity, why do you avoid having functions generate HTML? Is this just personal preference, or is there some performance or other reason?

    -Jason

    ----- Original Message ----- From: "Rasmus Lerdorf" <rasmusphp.net> To: "speedboy" <speedboynomicrosoft.org> Cc: <php-generallists.php.net> Sent: Sunday, September 16, 2001 9:32 PM Subject: Re: [PHP] Re: echo/printing html within a function - best method

    > I try to avoid having my functions generate HTML. But yes, when they do I > use the same approach.

    attached mail follows:


    Kunal Jhunjhunwala wrote: > Hi, > Has anyone done this to date?? I was thinking of compiling my programs for > better perfomance, and of course, protect the source code. Anyone have any > ideas on this issue? > Regards, > Kunal Jhunjhunwala >

    There are sevral cache modules. These are cache modules that I know. - Alternative PHP Cache (APC): http://apc.communityconnect.com/ - AfterBuaner Cache (bwcache) : http://bwcache.bware.it/ - PHP Accelerator : http://www.php-accelerator.co.uk/ - Zend Cache : http://www.zend.com/zend/products.php#cache

    All of them gives 2 - 3 times perfomance improvment in general.

    Yasuo Ohgaki

    attached mail follows:


    >> Has anyone done this to date?? I was thinking >> of compiling my programs for better perfomance, >> and of course, protect the source code. Anyone >> have any ideas on this issue?

    Another question: is it possible to compile PHP script in COM or EXE file?

    -- 
    Andrew Perevodchik
    oknaverex.kiev.ua
    

    attached mail follows:


    Hey all. I'm trying to do a fopen for reading on many different sites and web pages. However, I have found that many webpages can not be FOPENed at all. For instance, one such example would be http://www.800.com/prod.asp?P=5261

    I do not understand as I can read from numerous other sites. Why can I see the above site and others in Internet Explorer and Netscape, but PHP is not able to read from that file?

    And yes, I can read from many other ASP, JSP, and PHP pages, so this is not the problem that I know of.

    Any help appreciated.

    Andrew

    attached mail follows:


    I tried to get it via CURL but i failed, here's the output: * Connected to www.800.com (216.88.211.1) > GET /prod.asp?P=5261 HTTP/1.1 User-Agent: curl/7.8 (win32) libcurl 7.8 Host: www.800.com Pragma: no-cache Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* * Closing live connection (#0)

    I tried with NetVampire (which allow you to specifiy a user agent string), and I succeeded, here's output: Connecting to www.800.com ... Connected to www.800.com [216.88.211.1] GET /prod.asp?P=5261 HTTP/1.1 Connection: close Host: www.800.com Accept: */* Pragma: no-cache Cache-Control: no-cache Referer: http://www.800.com/ User-Agent: Mozilla/4.04 [en] (Win95; I ;Nav) Cookie: SITESERVER=GUID=5003bed94ac9ead4d5b3fcd703c59b91; MemRightsChanged=jtalOx==; popup=1

    HTTP/1.0 200 OK Server: Microsoft-IIS/5.0 Date: Mon, 17 Sep 2001 10:58:16 GMT P3P: policyref="http://www.800.com/w3c/p3p.xml", CP="ADM DEV CUS TAI STP UNI STA OUR DSP ALL COR" Content-Length: 51076 Content-Type: text/html Cache-Control: private X-Cache: MISS from gw.inet.gw Connection: close

    Data transfer started Received 51 076 bytes in 0:00:08 (5 686 bytes/s) JOB COMPLETED SUCCESSFULLY

    I'm not sure then if the problem is with user agent or not....

    "Reberrya" <newsphpaiowt.com> wrote in message news:20010917061013.44846.qmailpb1.pair.com... > Hey all. I'm trying to do a fopen for reading on many different sites and > web pages. However, I have found that many webpages can not be FOPENed at > all. For instance, one such example would be > http://www.800.com/prod.asp?P=5261 > > I do not understand as I can read from numerous other sites. Why can I see > the above site and others in Internet Explorer and Netscape, but PHP is not > able to read from that file? > > And yes, I can read from many other ASP, JSP, and PHP pages, so this is not > the problem that I know of. > > Any help appreciated. > > Andrew > >

    attached mail follows:


    On Fri, 14 Sep 2001, GATop wrote:

    > Is there more like that?

    Like what :)

    Adrian

    attached mail follows:


    Hi all, for testing purposes in a school environment, I would like to use a Microsoft Access database with PHP. I know how to connect to and use a MySQL database, but I can't find any functions for accessing Microsoft Access databases.

    Can anyone help me out here?

    Thankx, Alex

    --
    PS: Replace the underscore (_) in my e-mail address with a minus sign (-).
    

    attached mail follows:


    I think that ODBC is your solution.

    Niklas

    -----Original Message----- From: A. op de Weegh [mailto:aweeghweegh_it.nl] Sent: 15. syyskuuta 2001 13:05 To: php-generallists.php.net Subject: [PHP] Can I use Microsoft Access as a database?

    Hi all, for testing purposes in a school environment, I would like to use a Microsoft Access database with PHP. I know how to connect to and use a MySQL database, but I can't find any functions for accessing Microsoft Access databases.

    Can anyone help me out here?

    Thankx, Alex

    --
    PS: Replace the underscore (_) in my e-mail address with a minus sign (-).
    

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


    Does someone know where i can get various extension DLLs for 'Zend' PHP 4 for windows ? I can't find any on the net !!! I'm specialy lookin for the 'GD' dll extension ....

    thanx.

    (°- Nayco, //\ Nayconetcourrier.com v_/_ http://nayco.free.fr

    attached mail follows:


    Zope is very good but badly documented. The other things to consider is hosting, which is relatively expensive as there are not that many people who do it. Also the fact that you will have to learn python (which is not a major issue but is probably a much higher learning code than PHP) is something to consider.

    I started developing an e-commerce site in Zope but switched to PHP because the lack of documentation was driving me nuts. This is a particular problem because zope is far from a traditional language. Its bad enough trying to get your head round a new paradigm when the documentation is good! The only 'book' on it was the one on the web site and the documentation/articles are rather eclectic. Also the book only really scratches the surface.

    Having said this the email list is very useful and the environment is elegant. Have fun and let me know how you get on. I am not on php-general at the moment so please email me directly (I will try to send this to php-general but an sure it will bounce).

    Regards, Ben

    attached mail follows:


    Code: <? $Query = "UPDATE feRegUsers SET Constructor='2001-09-17', Enertec='2001-09-17', Seatec='2001-09-17' WHERE ID LIKE '288'"; mysql_quory($Query); print mysql_error(); ?>

    That results "You have an error in your SQL syntax near 'Constructor='2001-09-17', Enertec='2001-09-17', Seatec='2001-09-17'' at line 1".

    What's wrong? I don't see anything that can be wrong! Am I blind once again?

    Niklas

    attached mail follows:


    > mysql_quory($Query); typos....

    i can't also see more errors...

    "Niklas lampén" <niklas.lampenpublico.fi> wrote in message news:NPEFKEPHNLKEPEOLHPKNEEHFCFAA.niklas.lampenpublico.fi... > Code: > <? > $Query = "UPDATE feRegUsers SET Constructor='2001-09-17', > Enertec='2001-09-17', Seatec='2001-09-17' WHERE ID LIKE '288'"; > mysql_quory($Query); > print mysql_error(); > ?> > > That results > "You have an error in your SQL syntax near 'Constructor='2001-09-17', > Enertec='2001-09-17', Seatec='2001-09-17'' at line 1". > > What's wrong? I don't see anything that can be wrong! Am I blind once again? > > > Niklas >

    attached mail follows:


    :) It just started to work. World's a strange place. Maybe someone was doing something to the server/php/mysql, dunno.

    Niklas

    -----Original Message----- From: _lallous [mailto:elias_bachaalanyyahoo.com] Sent: 17. syyskuuta 2001 15:03 To: php-generallists.php.net Subject: [PHP] Re: MySQL query error

    > mysql_quory($Query); typos....

    i can't also see more errors...

    "Niklas lampén" <niklas.lampenpublico.fi> wrote in message news:NPEFKEPHNLKEPEOLHPKNEEHFCFAA.niklas.lampenpublico.fi... > Code: > <? > $Query = "UPDATE feRegUsers SET Constructor='2001-09-17', > Enertec='2001-09-17', Seatec='2001-09-17' WHERE ID LIKE '288'"; > mysql_quory($Query); > print mysql_error(); > ?> > > That results > "You have an error in your SQL syntax near 'Constructor='2001-09-17', > Enertec='2001-09-17', Seatec='2001-09-17'' at line 1". > > What's wrong? I don't see anything that can be wrong! Am I blind once again? > > > Niklas >

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

    attached mail follows:


    hi, i have a html form and it is posted a php script. but how can i recognize the url that only posted from my html file?

    thanks

    attached mail follows:


    On Mon, 17 Sep 2001 12:08:31 +0300, you wrote:

    >i have a html form and it is posted a php script. but how can i >recognize the url that only posted from my html file?

    Simple answer: $HTTP_REFERER

    Complicated answer: You can't. Not reliably, anyway.

    http://www.php.net/manual/en/language.variables.predefined.php

    djo

    attached mail follows:


    Hi all, The following is a sample code I try to extract URL from a Web Page.Its not finding any match.Any idia why ? Kindly let me know. Thanks to all. chinmay. *********************************************************** $fp = fopen('http://yahoo.com/','r') or die ("Cannot connect"); while($line = fgets($fp,1024)) { if(preg_match_all('/<.*?a.*?href=\s*?[\'"](.+)[\'"].*?>.*?<\/.*?a.*?>/i',$line,$matches)) { array_shift($matches); foreach($matches as $match) { $url_list = $match; echo $match; } } } ********************************************************

    attached mail follows:


    You have two ways:

    1)Recompile PHP (as it comes with source code) and put your decryption functions just after the reading of the .PHP and before getting it parsed.

    2)If you want to do a windows solution w/o modifying source code then you have to hack into the PHP code and add your new functions: The idea is to set a hook on the CreateFileA() and ReadFileA() windows APIs and replace them with our new functions that only decrypts PHP files (in memory) and them returns them to PHP.

    //elias

    "Robert Klinkenberg" <robertnts.nl> wrote in message news:41995094E2FED31197F6005004B2739F01088BD7ntsintra.nts.nl... > Is it possible to override the php build-in functions without changing the > PHP base distribution? > > We want to encode our scripts but zend is a bit expensive so we are looking > to write something ourself. > (encryption libs are freely available, so the main problem is changing the > file open function so that it decodes the file while reading it from disk) > > Robert Klinkenberg > >

    attached mail follows:


    Very simple,

    you can use functions like this to copy file from an HTTP server to your local harddrive: function my_copyfile($src, $dest) { if (!$fp = fopen($src, "rb")) return; $fpo = fopen($dest, "wb"); while (!feof($fp)) { $t = fread($fp, 4096); fwrite($fpo, $t, 4096); } fclose($fp); fclose($fpo); }

    in combination with the use of RegExps to parse HTML pages and extract the filenames that you want to extract....

    "Erich Kolb" <ekolbrandbreceivables.com> wrote in message news:000601c13d3b$3e0ba580$6b01a8c0randbreceivables.com... > How do I download a file with PHP? I have a few hundred .xml and .rdf files > that I want to download on a regular basis. >

    attached mail follows:


    Check if the browser transmit the Session ID in the first http connection, and if the SID transmitted in https is equal to the SID transmitted in http... it's possible that turning https to http cause that php think that it's another domain...

    Look at the settings in php.ini or use ini_alter function...

    ------------------------------ Federico flagzenNO-SPAMlibero.it ------------------------------

    Ben Edwards <benvideonetwork.org> wrote in message 4.2.0.58.20010915120711.00a0f4e0pop.spamcop.net... > We have a site which logs in using https (secure site) but the rest of the > site is in http (non-secure site). We are doing this because we do not > have/want to pay for a secure key. The login form posts back to itself so > the whole login is in https. > > The problem is the session variables set in https (username and ip address) > are not available in http. Has anybody got any word rounds/solutions for this? > > Regards, > Ben > *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ > * Ben Edwards benvideonetwork.org +352 091 429995 * > * This Email account is protected by http://www.spamcop.net * > * ALL spam is reported to ISP and there network provider * > * Homepage http://www.gifford.co.uk/~bedwards * > * i-Contact Progressive Video http://www.videonetwork.org * > * Smashing the Corporate image http://www.subvertise.org * > * Bristol's radical news http://www.bristle.co.uk * > * Open Directory Project http://www.dmoz.org * > *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+

    attached mail follows:


    i don't know if it will work, but try to use x[rec_pd4][] as select name and remember that x[rec_pd4] will result as an array, not a string!! instead of ==, you can use the in_array function to check if a value is in the array...

    ---------------------------- Federico flagzenNO-SPAMlibero.it ----------------------------

    Tom Beidler <tomorbittechservices.com> wrote in message B7C7EE59.2C7A%tomorbittechservices.com... > I'm trying to use a list/menu field with multiple options allowed but I'm > only getting the very last selection. > > Here's part of my code to build the list/menu field; > > print (" <td><select name=\"x[rec_pd4]\" multiple size=\"15\">\n"); > print ("$option_pd4"); > print (" </select></td>\n"); > > Here's the code to build the options; > > $pd4arry = array(array("c1,","Bookpacks & Daypacks"),array("c2,","Mini > Packs/Diaper Bag"),array("c3,","Shoulder Bags/Briefcase")); > foreach($pd4arry as $value) { > > if (($value[0] == $category_code) || ($value[0] == $x[rec_pd4])) { > $option_pd4 .= " <option > value=\"$value[0]\"selected>$value[1]</option>\n"; > } else { > $option_pd4 .= " <option > value=\"$value[0]\">$value[1]</option>\n"; > } > } > > The field displays fine but I only get the last option. I'm testing with IE > 5. > > Let me know if this is not a PHP issue but I thought there might be > something that would prevent me from using this type of field with PHP. > > Thanks, > Tom >

    attached mail follows:


    So sprach »Sall Him« am 2001-09-10 um 12:17:54 +0800 : > Hi All > > Does anyone know is there any web base email system which is written in > PHP?

    imp

    -> http://horde.org

    Alexander Skwar

    -- 
    How to quote:	http://learn.to/quote (german) http://quote.6x.to (english)
    Homepage:	http://www.digitalprojects.com   |   http://www.iso-top.de
       iso-top.de - Die günstige Art an Linux Distributionen zu kommen
    		Uptime: 4 days 5 hours 43 minutes
    

    attached mail follows:


    So sprach »Kyle Smith« am 2001-09-16 um 21:09:10 -0700 : > Can someone please show me how to change the reply address in the mail function (and the from address) cause i have a script im making for a mailing list and the script in the manual doesnt work cause it has loads of different code aswell :(

    -> php.net/mail 3rd comment

    PS: Keep your lines below 72 characters/line. Thanks.

    Alexander Skwar

    -- 
    How to quote:	http://learn.to/quote (german) http://quote.6x.to (english)
    Homepage:	http://www.digitalprojects.com   |   http://www.iso-top.de
       iso-top.de - Die günstige Art an Linux Distributionen zu kommen
    		Uptime: 4 days 5 hours 46 minutes
    

    attached mail follows:


    So sprach »Nikola Veber« am 2001-09-17 um 08:48:17 +0200 : > How am I suposed to handle multiple buttons(what should I change, name or the > value?)

    Make it an array:

    <input type="radio" name="radios[]" value="1">One <input type="radio" name="radios[]" value="2">Two

    In your PHP script, you can then easily parse the $radios array.

    Alexander Skwar

    -- 
    How to quote:	http://learn.to/quote (german) http://quote.6x.to (english)
    Homepage:	http://www.digitalprojects.com   |   http://www.iso-top.de
       iso-top.de - Die günstige Art an Linux Distributionen zu kommen
    		Uptime: 4 days 5 hours 47 minutes
    

    attached mail follows:


    So sprach »biscut« am 2001-09-16 um 20:07:23 +0100 : > you would simply have the following: > > <input type="radio" name="radiobutton" value="radiobutton1">blah1<br> > <input type="radio" name="radiobutton" value="radiobutton2">blah2<br> > <input type="radio" name="radiobutton" value="radiobutton3">blah3<br>

    Of course.... I was thinking about checkboxes....

    Nevermind :)

    Alexander Skwar

    -- 
    How to quote:	http://learn.to/quote (german) http://quote.6x.to (english)
    Homepage:	http://www.digitalprojects.com   |   http://www.iso-top.de
       iso-top.de - Die günstige Art an Linux Distributionen zu kommen
    		Uptime: 4 days 5 hours 49 minutes
    

    attached mail follows:


    Ehhh... hai!

    I've been away on vacation, so it's a bit late, but anyway...

    > You didn't. Actually please expose - tell i tell i:). I am all ears:)

    I meant I improved my own versions, not you're version. That's why you can't find the improvement on you're code. If that's what you meant...

    > ? RE ? Sorry, I am not a club insider:)

    Not realy any kind of club... just lazy typing; RE stands for Regular Expression.

    -- 
    

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