RE: [PHP] form submission error trapping
George, Good point. I actually like your idea a lot. I have never thought about using $SCRIPT_NAME. You also mentioned using $PATH_INFO to implement elegant (and search-engine safe) urls... below. Can you give me a couple of examples of how I might do this? I always hated the GET strings at the end of the url. Sometimes I redirect a user to the same page two times just to get rid of the trailing GET string. I know that's a bad way of doing it, but it was a temporary thing until I could find a way around it. I would really appreciate your help on this one. Thanks... Navid -Original Message- From: George Whiffen [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 7:09 AM To: Navid Yar Subject: Re: [PHP] form submission error trapping Navid, $SCRIPT_NAME is sometimes a safer alternative than $PHP_SELF. The difference is that $PHP_SELF includes $PATH_INFO while $SCRIPT_NAME is just the name of the actual script running. http://www.php.net/manual/en/language.variables.predefined.php This becomes particularly important if you use $PATH_INFO to implement elegant (and search-engine safe) urls e.g. /search/products/myproduct rather than /search.php?category=productskey=myproduct. George Navid Yar wrote: Simply, to send a form to itself, you can use a special variable called $PHP_SELF. Here's an example of how to use it: if ($somevalue) { header(Location: $PHP_SELF); } else { execute some other code... } Here, if $somevalue holds true, it will call itself and reload the same script/file. This code is not very useful at all, but it gets the point across. If you wanted to pass GET variables to this, then you could easily say: header(Location: $PHP_SELF?var=valuevar2=value2var3=value3); ...and so on. You can also use this approach with Sessions if you wanted to turn the values back over to the form page, assuming you had two pages: one for the form, and one for form checking and entry into a database. There are several ways to check forms, whether you want it on one page or span it out to several pages. You just need to be creative in what tools are avaiable to you. Here is an example of how you can pass session values: header(Location: some_file.php??=SID?); Here, whatever variables you've registered in session_register() will be passed to the php page you specify, in this case some_file.php. Hope this helps. Have fun, and happy coding. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to start a secure HTTP session?
-Original Message- From: Janet Valade [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 12:15 AM To: gaukia 345; [EMAIL PROTECTED] Subject: Re: [PHP] How to start a secure HTTP session? To have a secure HTTP session, you must be communicating with a secure web server. This is apache. It has nothing to do with PHP or Linux. You classmate was right. The only difference for SSL is that you use https instead of http. To find out if your server can communicate using SSL, try it. If you try to access a web page using https and the server is not a secure server, you will get an error message. Page connot be displayed. If you are using Apache and you installed it yourself, if you did not do extra stuff to make it SSL, then it is not. For more info, go to main apache web site, www.apache.org, and follow links to apache-ssl and mod_ssl. Janet - Original Message - From: gaukia 345 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 18, 2002 5:43 AM Subject: [PHP] How to start a secure HTTP session? I heard from my coursemates it's just typing https:// instead of http://. 1) To enable secure http (SSL) session, what extensions should I install? To which one: Apache or PHP or Linux? 2) How do I know if my Apache and/or Linux and/or PHP support SSL? Thanx _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sendmail and setting From
On careful reading of the php.ini file, I now realize that the settings for the From is for WIN32 *only*. So, as a newbie to the world or Linux/Unix, I am not sure where I place the setting for the default From. I can add it as the fourth argument in the mail() function, but I would prefer not to have to put it into every message. However, unless I do, my messages have From: Apache. Hopefully, I am making some sense.. Construct a proper From: header, then pass it to the mail() function. Look at http://www.php.net/manual/en/function.mail.php Greg Donald - http://destiney.com/ http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to test ob_start(ob_gzhandler);
hi i'm testing the same thing under windows, the output is compressed but the browsers prompt me with a download window , it seems they do not support this compression...is this working under windows ??? 18/02/2002 15:15:32, Rein Velt [EMAIL PROTECTED] wrote: Dear PHP coders, i am using ob_start(ob_gzhandler) to compress all html output. Is there any way to check if the output is really compressed? (and how much)? Thanks in advance, Rein Velt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Difference between two dates
Hello, How can i find out the difference between two dates. I am having the date like this $str=10-01-2001; $str1=01-02-2002; I need to find out the difference between the date,month and year. If anyone know the solution for this problem plz tell me -Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Homesite
There was a plugin for homesite to work with PHP, can somebody help me please? Jeroen
Re: [PHP] Difference between two dates
Read this article at PHPbuilder: http://www.phpbuilder.com/columns/akent2610.php3 - D - Original Message - From: Uma Shankari T. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 9:50 AM Subject: [PHP] Difference between two dates Hello, How can i find out the difference between two dates. I am having the date like this $str=10-01-2001; $str1=01-02-2002; I need to find out the difference between the date,month and year. If anyone know the solution for this problem plz tell me -Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Simple problem
I need insert some variable ito log.txt file but every item (variable) must be on other line how to do this ? $fp1 = Fopen(D:\\log.txt,a+); fwrite($fp1,$start); fwrite($fp1,$array[0]); fwrite($fp1,$array[1]); . fwrite($fp1,$end); Fclose($fp1); roman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Difference between two dates
Try this : $d1=strtotime('d-m-Y',$str); $d2=strtotime('d-m-Y',$str1); var_dump($d2-$d1); Best regards, Andrey Hristov - Original Message - From: Uma Shankari T. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 10:50 AM Subject: [PHP] Difference between two dates Hello, How can i find out the difference between two dates. I am having the date like this $str=10-01-2001; $str1=01-02-2002; I need to find out the difference between the date,month and year. If anyone know the solution for this problem plz tell me -Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Homesite
What exactly are you looking for? I think that syntax coloring is automatic for any file with a .php file extension since Homesite 4. If you are looking for the PHP Manual formatted for HS or an expression builder, check out: http://www.wilk4.com/asp4hs/php4hs.htm HTH -jeff At 09:50 19/02/02 +0100, you wrote: There was a plugin for homesite to work with PHP, can somebody help me please? Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: convert TIFF to JPEG
three hours running on win2k not on a linux-system. the problem is that the tiff-file has a CMYK-format an not RGB. i guess this convert takes such a long time. is there any other way? -Ursprungliche Nachricht- Von: Ironfroggy [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 19. Februar 2002 09:26 An: [EMAIL PROTECTED] Betreff: Re: AW: [PHP] convert TIFF to JPEG IM needs about 3 hours to convert a tiff group 4 image to a jpeg-image three hours? are you sure? I haven't used it myself, but I don't see how any program can take that long to convert tiff 2 jpeg. Neither format is all that complex. __ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Unicode TTF Font wingding's just don't cut it!
Help Does anyone know where I can get a simple symbol font which is .ttf and unicode compatible. Seems that my php graphic program is very sensitive to ttf problems. It'll take one or two wingdings in imagettftext() before it up and dies. Your help will be greatly appreciated. Hugh
Re: [PHP] Simple problem
I need insert some variable ito log.txt file but every item (variable) must be on other line how to do this ? If I am understanding your question correctly, you need to add a newline character (\n) at then end every line. Like so: $fp1 = Fopen(D:\\log.txt,a+); fwrite($fp1,$start\n); fwrite($fp1,$array[0]\n); fwrite($fp1,$array[1]\n); . fwrite($fp1,$end); Fclose($fp1); HTH -jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Homesite
What exactly are you looking for? I think that syntax coloring is automatic for any file with a .php file extension since Homesite 4. If you are looking for the PHP Manual formatted for HS or an expression builder, check out: http://www.wilk4.com/asp4hs/php4hs.htm HTH -jeff thanx, syntax coloring i know but the manuel i was looking for, Thx again jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unicode TTF Font wingding's just don't cut it!
What symbols are you trying to use? Verdana is good enough for most unicode characters. hugh danaher wrote: Help Does anyone know where I can get a simple symbol font which is .ttf and unicode compatible. Seems that my php graphic program is very sensitive to ttf problems. It'll take one or two wingdings in imagettftext() before it up and dies. Your help will be greatly appreciated. Hugh *** This message was virus checked with: SAVI 3.53 Jan 2002 last updated 30th January 2002 *** -- Email: [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Difference between two dates
Hello, If i executed code then nothing will be displayed... -Uma On Tue, 19 Feb 2002, Andrey Hristov wrote: AHTry this : AH$d1=strtotime('d-m-Y',$str); AH$d2=strtotime('d-m-Y',$str1); AHvar_dump($d2-$d1); AH AH AHBest regards, AHAndrey Hristov AH AH- Original Message - AHFrom: Uma Shankari T. [EMAIL PROTECTED] AHTo: [EMAIL PROTECTED] AHSent: Tuesday, February 19, 2002 10:50 AM AHSubject: [PHP] Difference between two dates AH AH AH AH AH Hello, AH AH How can i find out the difference between two dates. AH AH I am having the date like this AH AH $str=10-01-2001; AH $str1=01-02-2002; AH AH I need to find out the difference between the date,month and year. AH AH If anyone know the solution for this problem plz tell me AH AH AH -Uma AH AH AH -- AH PHP General Mailing List (http://www.php.net/) AH To unsubscribe, visit: http://www.php.net/unsub.php AH AH AH -- Love and you shall be loved by others -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] IE and Netscape
The following code shows exactly what I want in IE5 but does not in Netscape. I have tried various combinations of slashes and quotes but can't get it to display properly. Can anyone show me the changes I need to make. Code: echo h6,$name, nbsp nbsp, E-mail:, nbsp,$email, nbsp nbsp,$date, nbsp nbsp, PostID:, nbsp,$id ,/h6; IE5:Debbie McNicol E-mail: [EMAIL PROTECTED] PostID: 180 Netscape: Debbie McNicol nbspE-mail:[EMAIL PROTECTED] nbspPostID:nbsp180 -- Alex Francis Cameron Design 35, Drumillan Hill Greenock PA16 0XD Tel 01475 798106 [EMAIL PROTECTED] http://www.camerondesign.co.uk This message is sent in confidence for the addressee only. It may contain legally privileged information. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP_SELF Undefined
On Tue, 19 Feb 2002 09:50, Narvaez, Teresa did align ASCII characters thusly: When I execute the code below, why is PHP_SELF undefined? I will appretiate any help on this. I can get its value by: echo $_SERVER[PHP_SELF];Thanks in advance! -Teresa HTML HEAD TITLEFeedback/TITLE /HEAD BODY ? $form_block = FORM method=\POST\ action=\$PHP_SELF\ PYour Name:br INPUT type=\text\ name=\sender_name\ size=30/p PYour E-Mail Address:br INPUT type=\text\ name=\sender_email\ size=30/p PYour Message:br textarea name=\message\ cols=30 rows=5/textarea /p PINPUT type=\submit\ value=\Send This Form\/p /FORM ; ? I don't know whether this is of any help to you or not, but this works perfectly on my system. I suspected it would as I saw nothing wrong, per se, with the code. Cheers, Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IE and Netscape
The following code shows exactly what I want in IE5 but does not in Netscape. I have tried various combinations of slashes and quotes but can't get it to display properly. Can anyone show me the changes I need to make. HTML entities begin with a (ampersand) and end with a ; (semicolon). You are going to want to replace nbsp with nbsp; -jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] IE and Netscape
The problem isn't php related - its HTML. Try changing nbsp for nbsp; The semicolon is, strictly speaking, required for proper HTML syntax, but IE lets you get away with not having it. I guess Netscape doesn't. HTH, Richy == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -Original Message- From: Alex Francis [SMTP:[EMAIL PROTECTED]] Sent: 19 February 2002 10:15 To: [EMAIL PROTECTED] Subject:[PHP] IE and Netscape The following code shows exactly what I want in IE5 but does not in Netscape. I have tried various combinations of slashes and quotes but can't get it to display properly. Can anyone show me the changes I need to make. Code: echo h6,$name, nbsp nbsp, E-mail:, nbsp,$email, nbsp nbsp,$date, nbsp nbsp, PostID:, nbsp,$id ,/h6; IE5:Debbie McNicol E-mail: [EMAIL PROTECTED] PostID: 180 Netscape: Debbie McNicol nbspE-mail:[EMAIL PROTECTED] nbspPostID:nbsp180 -- Alex Francis Cameron Design 35, Drumillan Hill Greenock PA16 0XD Tel 01475 798106 [EMAIL PROTECTED] http://www.camerondesign.co.uk This message is sent in confidence for the addressee only. It may contain legally privileged information. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: IE and Netscape
Thank you - everything alright now. I guess this is what happens when you learn using wiziwig editors. -- Alex Francis Cameron Design 35, Drumillan Hill Greenock PA16 0XD Tel 01475 798106 [EMAIL PROTECTED] http://www.camerondesign.co.uk This message is sent in confidence for the addressee only. It may contain legally privileged information. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. Alex Francis [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The following code shows exactly what I want in IE5 but does not in Netscape. I have tried various combinations of slashes and quotes but can't get it to display properly. Can anyone show me the changes I need to make. Code: echo h6,$name, nbsp nbsp, E-mail:, nbsp,$email, nbsp nbsp,$date, nbsp nbsp, PostID:, nbsp,$id ,/h6; IE5:Debbie McNicol E-mail: [EMAIL PROTECTED] PostID: 180 Netscape: Debbie McNicol nbspE-mail:[EMAIL PROTECTED] nbspPostID:nbsp180 -- Alex Francis Cameron Design 35, Drumillan Hill Greenock PA16 0XD Tel 01475 798106 [EMAIL PROTECTED] http://www.camerondesign.co.uk This message is sent in confidence for the addressee only. It may contain legally privileged information. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Copyright
Hi! I have seen lots of webiste with a sign [EMAIL PROTECTED] 2002 etc... if I would like to do that, do I have to register myself to a certain company or.. I just put it on my website? Thanks! regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apache+PHP+DSO: maybe trivial (?): apxs doesn't create libphp4.so under AIX 4.3.3
Hi php4-Installers, what reason might cause the subject above ? We have installed (and working well): o gcc version 2.95.3 20010315 (release) o perl, version 5.003 with EMBED built under aix o OpenSSL 0.9.6 o mm-1.1.3 o Apache-1.3.23 configured with: time CC=gcc CFLAGS=-O ./configure \ --prefix=/pd/apache_1.3.23 \ --enable-module=rewrite \ --enable-shared=rewrite (with compiled-in modules mod_so.c - and mod_ssl.c ...) o mod_ssl-2.8.6-1.3.23 configured with: CC=gcc CFLAGS=-O ./configure \ --prefix=/pd/apache_1.3.23 \ --with-apache=/pd/apache_1.3.23 \ --with-ssl=/pd/openssl \ --with-mm=/pd/mm-1.1.3 \ --with-crt=/pd/openssl/certs/mail_cert.pem \ --enable-module=most \ --enable-module=ssl \ --enable-shared=rewrite o gmake - GNU Make version 3.79.1 built for powerpc-ibm-aix4.3.3.0 o php-4.1.1 configured as dynamic module (following verbose installation): time CC=gcc CFLAGS=-O ./configure \ --prefix=/pd/php-4.1.1 \ --with-apxs=/pd/apache_1.3.23/bin/apxs ... done well: ++ |*** WARNING *** | | You chose to compile PHP with the built-in MySQL support. If you | are compiling a server module, and intend to use other server | modules that also use MySQL (e.g, mod_auth_mysql, PHP 3.0, | mod_perl) you must NOT rely on PHP's built-in MySQL support, and | instead build it with your local MySQL support files, by adding | --with-mysql=/path/to/mysql to your configure line. ++ | License: | This software is subject to the PHP License, available in this | distribution in the file LICENSE. By continuing this installation | process, you are bound by the terms of this license agreement. | If you do not agree with the terms of this license, you must abort | the installation process at this point. ++ Thank you for using PHP. real29m48.27s (!) user1m6.67s sys 4m10.69s o gmake ... ok o gmake install ... ending with: . . . Making install in . gmake[1]: Entering directory `/appl/pd/php-4.1.1' /pd/apache_1.3.23/bin/apxs -i -a -n php4 libs/libphp4.so [activating module `php4' in /pd/apache_1.3.23/conf/httpd.conf] cp libs/libphp4.so /pd/apache_1.3.23/libexec/libphp4.so cp: libs/libphp4.so: No such file or directory apxs:Break: Command failed with rc=1 gmake[1]: *** [install-sapi] Error 1 gmake[1]: Leaving directory `/appl/pd/php-4.1.1' gmake: *** [install-recursive] Error 1 root@mail:/pd/php-4.1.1# So, no libphp4.so on the system. Considering we have the products (in most cases the up-to-date versions) it must be some obvious problem - but I have no idea. Thanks for help in advance, Erwin -- Dipl.-Ing. Erwin SRUBAR Zentraler Informatikdienst, Bereich ,,Zentrale Services`` Technische Universitaet Wien, Wiedner Hauptstrasse 8-10 Turm C (Roter Trakt), 2.Stk., Zi.DC02O08 A-1040 Wien, OeSTERREICH Mail:[EMAIL PROTECTED] Tel: (++43 1) 588-01/42084, Fax: (++43 1) 588-01/42099 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] please reply -copy right
I just send this again, just incase my email doesn't get through. thanks Dani wrote: Hi! I have seen lots of webiste with a sign [EMAIL PROTECTED] 2002 etc... if I would like to do that, do I have to register myself to a certain company or.. I just put it on my website? Thanks! regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] please reply -copy right
You don´t have to register anywhere. You don´t even have to add a copyright notice. But if you do you are signalling that the content of the website is protected by copyright laws. No more complicated than that... - D - Original Message - From: Dani [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 3:24 PM Subject: [PHP] please reply -copy right I just send this again, just incase my email doesn't get through. thanks Dani wrote: Hi! I have seen lots of webiste with a sign [EMAIL PROTECTED] 2002 etc... if I would like to do that, do I have to register myself to a certain company or.. I just put it on my website? Thanks! regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] please reply -copy right
thanks for the reply! Daniel Alsén wrote: You don´t have to register anywhere. You don´t even have to add a copyright notice. But if you do you are signalling that the content of the website is protected by copyright laws. No more complicated than that... - D - Original Message - From: Dani [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 3:24 PM Subject: [PHP] please reply -copy right I just send this again, just incase my email doesn't get through. thanks Dani wrote: Hi! I have seen lots of webiste with a sign [EMAIL PROTECTED] 2002 etc... if I would like to do that, do I have to register myself to a certain company or.. I just put it on my website? Thanks! regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Homesite
[EMAIL PROTECTED] (Jeroen Timmers) wrote: There was a plugin for homesite to work with PHP, can somebody help me please? What do you mean work with? standard it has syntax highlighting etc. -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] What Do You Think?
Timothy Taylor's and Sam Smith's are much better example of Yokshire beer. I know people who've found bottled Sam's all over the world Tim Ward www.chessish.com http://www.chessish.com -- From: Richard Crawford [SMTP:[EMAIL PROTECTED]] Sent: 15 February 2002 19:56 To: Erik Price Cc: hugh danaher; Arik Ashepa; php Subject: Re: [PHP] What Do You Think? Tetley's is good stuff. Try Old Nick. Only beer I've found that needs a chaser. On Fri, 2002-02-15 at 11:52, Erik Price wrote: On Friday, February 15, 2002, at 02:40 PM, Richard Crawford wrote: Hmm. I'd also be interested in a Guinness Finder site. Plug in your zip code, and you get a list of all of the pubs and bars in your area that serve draft Guinness. I could support a site like that, or help build one. Guiness lovers have it easy. My favorite beer, of all time, which I love with a passion far greater than the zeal of any Guinness drinker on this list, is Tetley's English Ale. I live for that stuff. Not only can I hardly find a place with Tetley's on tap, I can hardly find it in stores! LOVE Tetley's. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupery Push the button, Max! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] NULL Apache environment variables
-Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 5:58 PM To: Lars Torben Wilson Hm? I didn't think that this was the case -- I thought that although there is a long-term move to making 'register_globals = off' default, register_globals is still default to be 'on'. I think that this is described in the 4.1.0 release announcement. Indeed, the 4.1.0 release notes say this: PHP 4.1.0 still defaults to have register_globals set to on. [...] As of the next semi-major version of PHP, new installations of PHP will default to having register_globals set to off. No worries! Existing installations, which already have a php.ini file that has register_globals set to on, will not be affected. ... and the 4.1.1 release notes do not contradict this. I took next semi-major version to mean 4.2.0, but if this change has actually occurred in 4.1.1 this should be made clear, both in the release notes and the manual section on Configuration. Perhaps it would have been better to state an actual version number, rather than an opaque phrase like next semi-major version. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newbie with a BIG project, needs lots of advice
First off I would like to say Hello World to everyone here :) Now for the business part of this post. I recently got appointed to run a branch of my gaming clan as we expand into a new game. Now I run my website using phpnuke, which except for figuring out what the heck to put for content and as the theme really makes my live much easier. Now I want to create the following, a easy way to keep track of my clan member roster as well as the ranking and matches. I want it to be easy to navigate and admin. I know i'll have to do a bit of editing to my user tables at one point so I can keep the normal site users separate from the clan members but still be fully intergrated. I also do not wish it to use any external systems and be relatively self contained. Now I am a raw beginner with only a few spoof scripts to my name. What current information, tutorials, and advice is out there? I dont have time to wade through billions of bad links and out dated materal. So what can you all tell me that would make my task a tad easier at least in the planning stages? Thanks in advance. _ Tarl Grenier ICQ#:62735926 Current ICQ status: SMS: (Send an SMS message to my ICQ): +278314262735926 More ways to contact me: http://wwp.icq.com/62735926 _ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Logging Users In - What is the Best Way
At 06:17 PM 2/18/2002 -0800, Phillip S. Baker wrote: I have a MyQSL back end. It houses a users user_name and password. I have a secure area of the site that I only want members to view. The way I have it now is that the user logs in. If user_name and password match cookies are set. Each page in the secure are checks for a variable in the cookie. If set the user can view the page, if not set the page redirects back to the login page. That's how I do it. When creating user accounts I hash the passwords with md5() before putting them into the database. When a user logs in he submits his password to my script in plain text only ONCE. At that point my script hashes the password with md5(), compares it to the hashed password already in the database...and if it's the same it sets a cookie on the client containing the username and the hashed version of the password. So from that point forward only the hashed version is submitted as a cookie variable. From what I have seen lots of scripts use a similar mechanism. Of course, it's not the most secure thing in the world. The password is sent in plain text at least once (not good), but even hashing doesn't really help you that much. Sure, it prevents a hacker from knowing what your password is, but if he can eavesdrop on your connection he can just steal the hashed version and then find a way to send it along with the request (fairly easy)...no need to know the unhashed version. The only way to be truly secure is to use SSL...but then you have to ask yourself if it's really worth it. My app is not that critical and certainly not worth encrypting. Your needs may vary... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP_SELF Undefined
-Original Message- From: Matt [mailto:[EMAIL PROTECTED]] Sent: 18 February 2002 23:30 To: Lars Torben Wilson $foo = This page is $_SERVER[PHP_SELF]; Or, better: $foo = This page is {$_SERVER['PHP_SELF']}; You do have to concat to do this in single-quoted (noninterpolated) strings, though. http://www.php.net/manual/en/language.types.string.php#languag e.types.string .parsing Can you expand on why the first option isn't generally acceptable? Another reason, as I understand it (and I'm sure Torben will correct me if I'm wrong!), is that in the version without quotes, PHP_SELF is taken as the name of a constant -- which, as it happens to be undefined, PHP very kindly assumes you intended to be the equivalent string 'PHP_SELF'. This is bad for two reasons: (1) the PHP compiler is doing avoidable extra work to get the desired result; (2) if you just happen, at a later date, to define a constant of that name, your result will suddenly be wrong (unlikely with PHP_SELF, I admit, but less so with something like, say, MAX_SIZE). Even though this is only a theoretical danger of low probability, the principles of good defensive programming would suggest that you nonetheless avoid it with a vengeance!! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Novice Question
-Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: 18 February 2002 22:44 To: 'JSheble'; [EMAIL PROTECTED] window.document.frmName.elements[poly[]].value !!! This should also work (well, it has for me in the past!): window.document.frmName[poly[]].value since in JavaScript the syntax a.b is, by definition, exactly equivalent to a[b]. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] File Upload failing on Binary Files
I can't upload images though text is ok. This worked on earlier version of PHP and I don't know whether it is php, apache, or linux at fault. The post basic code is as per documented example. test_load.htm FORM action=test_received.htm enctype=multipart/form-data method=POST INPUT TYPE=file name=userfile INPUT TYPE=hidden name=MAX_FILE_SIZE value=20 INPUT TYPE=SUBMIT value=Send File /FORM test_received.htm HR ? echo is_file_uploaded($userfile); ? HR Results 90k text - 30 seconds - ok 2k gif - 20 seconds - ok but very slow 6k gif - Never completes. No binary file greater than about 4k completes. PHP 4.0..4pl1 Apache 1.3.12 Linux Redhat 7 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Copyright
Dani wrote: Hi! I have seen lots of webiste with a sign [EMAIL PROTECTED] 2002 etc... if I would like to do that, do I have to register myself to a certain company or.. I just put it on my website? Depending on what country you are in, it would probably help to register the information (or website code or whatever) with the appropriate copyright agency in your government. It will probably never be used, but if and when you needed to bring charges against someone for violating that copyright, it's registered. If it's unregistered, it's possibly harder to prove violation. By registering with your government , it essentially creates a verified copy with a time/date as to when it was registered (not when it was created necessarily, but when the government agency registered it). Hopefully you'll never need to use it, and most people don't bother with registration. If you think your content is valuable enough, then by all means register with your government's copyright agency. It may save you a bundle in the future. In either case, you can still display the copyright mark immediately. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: mysql_num_rows
Thanks to everyone that replied. After trying solutions from everyone and still not getting it to work I finally figured out why my code: $result = mysql_query($query,$connection) or die(Error in Query); $num = mysql_num_rows($result); if ($num == 0) echo something; else echo something else; was not working. I had that piece of code in a while ($row = mysql_fetch_array($result))loop. It seems that if there is nothing to get the condition inside the while loop is false so my code above was never being executed. Even when I tried printing out the contents of $num it would always be blank. The clue came when I deliberately changed the vale of $num right above my code above and it still didn't work. Thanks again to all who replied. It was a good chance to learn about isset(), empty() and other functions. Frank Frank Miller Computer Specialist and Webmaster Technology and Distance Education Texas AM University-Texarkana 2600 North Robison Rd Texarkana, Texas 75501 Phone: 903-223-3156 Fax: 903-223-3139 Office: 165 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP binary file
Has anyone compiled php on linux and found the binary executable file? Ray Hunter Firmware Engineer ENTERASYS NETWORKS Phone: 801 887-9888 Fax:801 972-5789 Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www:www.enterasys.com http://www.enterasys.com
Re: [PHP] Sendmail and setting From
Greg - Many thanks! That is what I am doing now and I was hoping that I could do the same in Linux as I do with the NT server: have a default in a conf file. Todd -- Dr. Todd Cary Ariste Software 707-773-4523 [EMAIL PROTECTED] It is a worthy thing to fight for one's freedom; it is another sight finer to fight for another man's Mark Twain -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where To Find Resources About Programming Style (my bleedin' code is so darn ugly)
On Sun, Feb 17, 2002 at 08:05:17PM +0100, Christian Blichmann wrote: [ . . . ] P.S.: Your code _always_ works? -Wow... I was trying to say that I usually get things to work at the end of the day, when I have enough time to tweak the code, but that my code at some point tends to become unreadable which is not a functionality issue but more of a managament question (reinventing everything that I'd figured out at some point over and over again begins to feel kinda silly) . . . Thanks for your suggestions! Regards, Frank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Where To Find Resources About Programming Style (my bleedin' code is so darn ugly)
On Sun, Feb 17, 2002 at 12:39:49PM -0800, Lars Torben Wilson wrote: [ . . . ] An excellent book on coding practices is 'Code Complete', by Steve C McConnell. http://www.amazon.com/exec/obidos/ASIN/1556154844/qid=1013978113/sr=8-1/ref=sr_8_67_1/102-2030399-6728144 There is also the Indian Hill style guide--for C, but highly transferrable to PHP: http://dogbert.comsc.ucok.edu/~mccann/cstyle.html For a whole list of 'em, check out: http://www.cs.umd.edu/users/cml/cstyle/ I'll check 'em out! Thanks all, Frank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP binary file
Hi, mine is located here: /usr/bin/php I don't recall telling it where to put the binary (if such an option exists) so I assume that is the default location. Jeff At 09:28 AM 2/19/2002 -0500, Hunter, Ray wrote: Has anyone compiled php on linux and found the binary executable file? Ray Hunter Firmware Engineer ENTERASYS NETWORKS Phone: 801 887-9888 Fax:801 972-5789 Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www:www.enterasys.com http://www.enterasys.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP binary file
If you installed it with apache or some other webserver, and you didn't use the --prefix option, it's probably here: /usr/local/lib/php/ Somewhere in that directory would be my guess. I think that's where mine is located. Tyler - Original Message - From: Hunter, Ray [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 8:28 AM Subject: [PHP] PHP binary file Has anyone compiled php on linux and found the binary executable file? Ray Hunter Firmware Engineer ENTERASYS NETWORKS Phone: 801 887-9888 Fax: 801 972-5789 Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www: www.enterasys.com http://www.enterasys.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP binary file
Has anyone compiled php on linux and found the binary executable file? I usually compile it and copy it to where I want it manually... Greg Donald - http://destiney.com/ http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] register_shutdown_function vs require
Hi, I'm trying to make some kind of caching system that first delivers the old page, and then regenerate the new one in the background. I achieved this with register_shutdown_function(). The registered function starts the real work, the normal php script just delivers the old page (of course if it were generated into the cahce before). In the normal part of the program I required only the needed files to make the cache faster. It worked fine in older releases of php (maybe 4.0.4, 4.0.5 I don't remember), but now 4.0.6 seems to include the files even if they aren't needed, and it slows down my cache. Without the requires (I commented out them) it delivers a page in avg 0.04sec, but with the requires it's only 0.25 and it's too much for a cache. The requires are called in the registered function, so they shouldn't affect the normal code. What is more interesting that it depends on the flow of the registered php code. For example if the page that should be regenarated is locked by another process and it can't be regenerated in the backround the cache delivers the page fast (0.04s), but if it's not locked (it can be regenerated) the cache becomes slow again (0.25s). So what I don't understand: why the flow of the php code that is registered with register_shutdown_function affects the normal code's run? In theory it runs only when the normal code finished and the connection is released, and doesn't have anything to do with the normal script (that's why I started to use this method of caching). (4.1.x is worse in this case because of bug #15209, it doesn't release the connection while the registered function is running) Thanks for your help, Arpi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is it possible to...
Given the following code: script language=php function function1() { global $bob; echo Bob = $bob\n; } function function2() { $GLOBALS[bob] = Joe Bob Briggs; function1(); } function2(); /script function1() can echo out the value of $bob because it is added to the global namespace in function2(). Is it possible for function1() to access the variables that were defined in the function2() namespace? Like some sort of limited global or something? Something to allow called functions access to the variable namespace of the calling function? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] get_browser();
Greg Donald wrote: Use this to identify Netscape 4.x: if(strstr($HTTP_USER_AGENT,Mozilla/4) !strstr($HTTP_USER_AGENT,MSIE)){ // is Netscape 4 } else { // is something else } Is that going to catch the Mozilla spoofers, like webtv and opera? Err, no... if they are being spoofed then why would it? Open a phpinfo() page in each of the browsers you wish to correctly identify, then you can see what user agent you need to search for to do whatever with... :) Greg Donald - http://destiney.com/ http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/ I don't need to take those steps. I do have a complet browser list. The problm with using plain browser detection, it doesn't work if your trying to disallow browser that do not or do poor CCS and advanced scripting. The only way is to see if they is to see if they can preform advanced scripting by using. if (document.getElementById document.createElement). If your checking for only CSSS you can skip document.createElement it is only for Opera 5. Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is it possible to...
Is it possible for function1() to access the variables that were defined in the function2() namespace? Must be defined with global construct, as you did in function1() -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 9:52 AM To: PHP General Subject: [PHP] Is it possible to... Given the following code: script language=php function function1() { global $bob; echo Bob = $bob\n; } function function2() { $GLOBALS[bob] = Joe Bob Briggs; function1(); } function2(); /script function1() can echo out the value of $bob because it is added to the global namespace in function2(). Is it possible for function1() to access the variables that were defined in the function2() namespace? Like some sort of limited global or something? Something to allow called functions access to the variable namespace of the calling function? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Homesite
Henrik Hansen wrote: [EMAIL PROTECTED] (Jeroen Timmers) wrote: There was a plugin for homesite to work with PHP, can somebody help me please? What do you mean work with? standard it has syntax highlighting etc. There is an expressions builder for php that works like the one that come with Homesite. I don't use it but it used to be on the Allire site. Since Macromedia owns hs now, No telling where to find it. gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] register_shutdown_function vs require (with pseudocode example)
Hi again, I read my email back and found a little hard to understand :)), so I thought a code exmplae might help. It's just pseudo code for explaining how my cache works: //simplified main code if page is in cache { deliver the old one register_shutdown_function(regenerate) } else { regenerate() deliver } //registered shutdown function function regenerate() { if it's locked by another process { return } else { lock require_once(...); require_once(...); require_once(...); require_once(...); require_once(...); creation of many classes calling of many methods (the code is approx 1,6Megs) store unlock } } The main code delivers the page and reigsters the regenerate() function, and that's all what it should do. It takes about 0.04s, but this time unfortunately depends on what the regenerate() function does. If the page is locked then it finishes quickly (the overall time is 0.04s again), but when it can be regenerated it takes 0.25s. By the way the whole page regeneration takes 1.1s, that's why I really don't understand the 0.25s. I hope it was clearer with the two mails :)), and someone has an idea of whats happening here. Thanks for your help, Arpi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache+PHP+DSO: maybe trivial (?): apxs doesn't create libphp4.so under AIX 4.3.3
On Tuesday, February 19, 2002, at 06:18 AM, Erwin S R U B A R wrote: So, no libphp4.so on the system. Considering we have the products (in most cases the up-to-date versions) it must be some obvious problem - but I have no idea. Thanks for help in advance, I had the same exact problems. The best way to go about it, which was suggested to me and I have suggested to others, is to install PHP4 as a static Apache module. But be sure to set the configuration options to allow Apache to install other DSOs, so that you can later add mod_perl or other DSOs you might want. I should really just put this on a web page somewhere since it seems to work for most everyone and I am constantly reposting it :) 1) Download Apache, PHP, and MySQL tarballs, and untar them. 2) Install MySQL (easy, use whatever config options you want). Initialize it and get it running. 3) Install Apache with PHP as static module a) ./configure --prefix=/usr/local/apache b) pushd to PHP tarball source directory c) ./configure --with-apache=/path/to/apache/src/dir --with- mysql=/path/to/mysql/main/dir (and any other flags you want, I did zlib and xml) d) make e) make install (make sure you're root for this one, or sudo) f) popd (back to Apache src dir) g) ./configure --activate-module=./src/modules/php4/libphp4.a --enable-module=so --enable-shared=max (this makes sure that Apache will work with later DSOs) h) pushd ./src/modules/php4 i) make (do not make install yet) j) popd (back to Apache src dir) k) make l) make install (make sure you're root again, or sudo) m) test with /path/to/apache/bin/apachectl start n) if Apache works, configure your httpd.conf o) cp the php.ini-dist to /usr/local/lib/php.ini HTH, this has worked for many people (and I didn't write em so I don't deserve any credit). Thank you Nathan for helping me when I had this prob. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Moto
I noticed this server-side scripting language which has an interesting twist: your code can be complied and loaded as an apache DSO. Would this be feasible with PHP? -- This space for rent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Homesite
There is an expressions builder for php that works like the one that come with Homesite. I don't use it but it used to be on the Allire site. Since Macromedia owns hs now, No telling where to find it. Try: http://www.wilk4.com/asp4hs/php4hs.htm c -- Chris Lott http://www.chrislott.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 4.1.1, c-client-2001a and cyrus-imapd
Hi all, we're using PHP4.1.1 as apache module compiled with c-client-2001a. So when I try to open imap mailbox server (cyrus-imapd v 2.0.16) says: Feb 19 19:00:18 hermes imapd[10412]: badlogin: test.test.net[x.x.x.x] CRAM-MD5 authentication failure [no secret in database] We have to plaintext authentication. Is there a way to say php/c-client to use plaintext authentication??? At the same time when I use php4.0.4pl1 with cclient-2001a it works fine. Is it problem of PHP4.1.1? Should we downgrade to PHP4.0 and c-client-2000a? Thanks in advance, Pavel. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Moto
Ben Curtis wrote: I noticed this server-side scripting language which has an interesting twist: your code can be complied and loaded as an apache DSO. Would this be feasible with PHP? http://www.php.net/manual/en/install.apache.php#AEN855 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Crashing a webserver
I have got the task to down our webserver, to see how stable she is, and how easy/hard it is to get it on it's knees ;) Does anyone have some ideas how to do it? phpinfo() kan be found here: http://devel.basm.be/phpinfo.php Thanks Already, Witch -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Moto
Not PHP itself, heh, but PHP scripts that you write. Moto scripts can be interpreted by moto, just like PHP, but the scripts can also be compiled as DSOs. On Tue, Feb 19, 2002 at 11:58:52AM -0500, Gary wrote: Ben Curtis wrote: I noticed this server-side scripting language which has an interesting twist: your code can be complied and loaded as an apache DSO. Would this be feasible with PHP? http://www.php.net/manual/en/install.apache.php#AEN855 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- This space for rent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Moto
On Tue, 19 Feb 2002, Ben Curtis wrote: Not PHP itself, heh, but PHP scripts that you write. Moto scripts can be interpreted by moto, just like PHP, but the scripts can also be compiled as DSOs. Don't suppose you have a URL where one could read more about Moto? =) Cheers, Nick Winfield. -[ http://www.pi0.org/ ]- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Moto
http://www.webcodex.com/moto/ On Tue, Feb 19, 2002 at 05:07:14PM +, Nick Winfield wrote: On Tue, 19 Feb 2002, Ben Curtis wrote: Not PHP itself, heh, but PHP scripts that you write. Moto scripts can be interpreted by moto, just like PHP, but the scripts can also be compiled as DSOs. Don't suppose you have a URL where one could read more about Moto? =) Cheers, Nick Winfield. -[ http://www.pi0.org/ ]- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- This space for rent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Crashing a webserver
I'd start out by using ab, the apache benchmarker. Look for $APACHE_PATH/bin/ab. You can start hammering away at the site by setting the number of connections to try, conncurrent connections, etc. in ab, which will spit out a bunch of interesting stats, like the number or errors produced, pages served per second, etc. J Ruben Vermeersch wrote: I have got the task to down our webserver, to see how stable she is, and how easy/hard it is to get it on it's knees ;) Does anyone have some ideas how to do it? phpinfo() kan be found here: http://devel.basm.be/phpinfo.php Thanks Already, Witch -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Dynamic file creation in Win NT4.
Hi All, Could you please help me on how to create a file dynamically on the server in PHP. I wanted to open a new file for each day to save all the errors generated by different web pages on that day. I am using PHP 4.1.6 on, Win NT4 and IIS . Thank you in advance! Sridhar Moparthy
RE: [PHP] Dynamic file creation in Win NT4.
You need to make sure that php has the correct permissions to access the directory and write the file that you want it to write too... Check out the manual for this... Ray Hunter Firmware Engineer ENTERASYS NETWORKS -Original Message- From: Sridhar Moparthy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 10:44 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Dynamic file creation in Win NT4. Hi All, Could you please help me on how to create a file dynamically on the server in PHP. I wanted to open a new file for each day to save all the errors generated by different web pages on that day. I am using PHP 4.1.6 on, Win NT4 and IIS . Thank you in advance! Sridhar Moparthy
Re: [PHP] Re: Copyright
Here is a good explanation, in laymen's terms, of intellectual property laws: 'An Intellectual Property Law Primer for Multimedia and Web Developers' http://www.laderapress.com/lib/laderapress/primer.html Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED] On Tuesday, February 19, 2002, at 05:40 AM, michael kimsal wrote: Dani wrote: Hi! I have seen lots of webiste with a sign [EMAIL PROTECTED] 2002 etc... if I would like to do that, do I have to register myself to a certain company or.. I just put it on my website? Depending on what country you are in, it would probably help to register the information (or website code or whatever) with the appropriate copyright agency in your government. It will probably never be used, but if and when you needed to bring charges against someone for violating that copyright, it's registered. If it's unregistered, it's possibly harder to prove violation. By registering with your government , it essentially creates a verified copy with a time/date as to when it was registered (not when it was created necessarily, but when the government agency registered it). Hopefully you'll never need to use it, and most people don't bother with registration. If you think your content is valuable enough, then by all means register with your government's copyright agency. It may save you a bundle in the future. In either case, you can still display the copyright mark immediately. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Crashing a webserver
I have got the task to down our webserver, to see how stable she is, and how easy/hard it is to get it on it's knees ;) Does anyone have some ideas how to do it? There are various useful torture scripts floating around the web that you can use to create heavy, somewhat radom loads on a server, as well as to send large chunks of random data, etc... a few quick links that might help: http://stein.cshl.org/~lstein/torture/torture.html http://stein.cshl.org/~lstein/talks/perl_conference/cute_tricks/torture1.htm l http://www.hpl.hp.com/personal/David_Mosberger/httperf.html http://www.softwareqatest.com/qatweb1.html#LOAD c -- Chris Lott http://www.chrislott.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Parse Error Line Numbers
Does anyone know how line numbers are figured? I get errors like the following: Parse error: parse error in /home/sites/site104/users/walker/web/admin/_fileutils.php on line 74 Is PHP preprocessing the code to remove comments and white space? The larger my code file, the more inaccurate the parse error line number. In this case, the actual error was on line 83. Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED]
RE: [PHP] PHP_SELF Undefined
On Tue, 2002-02-19 at 05:14, Ford, Mike [LSS] wrote: -Original Message- From: Matt [mailto:[EMAIL PROTECTED]] Sent: 18 February 2002 23:30 To: Lars Torben Wilson $foo = This page is $_SERVER[PHP_SELF]; [snip] Can you expand on why the first option isn't generally acceptable? Another reason, as I understand it (and I'm sure Torben will correct me if I'm wrong!), is that in the version without quotes, PHP_SELF is taken as the name of a constant -- which, as it happens to be undefined, PHP very kindly assumes you intended to be the equivalent string 'PHP_SELF'. This is bad for two reasons: (1) the PHP compiler is doing avoidable extra work to get the desired result; (2) if you just happen, at a later date, to define a constant of that name, your result will suddenly be wrong (unlikely with PHP_SELF, I admit, but less so with something like, say, MAX_SIZE). Even though this is only a theoretical danger of low probability, the principles of good defensive programming would suggest that you nonetheless avoid it with a vengeance!! Cheers! Mike You're very right, but even worse than constant collisions are the keyword collisions, as far as WTF factor goes: ?php $array('default' = 'Select an option', 'option1' = 'First option', 'option2' = 'Second option'); echo $array[default]; // Parse error. ? This one has come up a number of times. -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parse Error Line Numbers
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Steven Walker declared Does anyone know how line numbers are figured? I get errors like the following: Parse error: parse error in /home/sites/site104/users/walker/web/admin/_fileutils.php on line 74 Is PHP preprocessing the code to remove comments and white space? The larger my code file, the more inaccurate the parse error line number. In this case, the actual error was on line 83. Well I hope someone provides a more technically accurate answer than mine :-) but my take on it is that php reports the line it was on when it encountered the error with isn't the same as where you've made your mistake. - -- - --- www.explodingnet.com |Projects, Forums and +Articles for website owners - -- Nick Wilson -- |and designers. -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8cqKJHpvrrTa6L5oRArJ8AJ4jXm+TYxKbXhqhtAgmgR14wycojACgh4zX vSFDxyu6sWvE7G14Jp91MZg= =P2dl -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Getting an RGB value of a pixel (JPEG)
Hi there I have to get an RGB value of a specified pixel in an JPEG image. This image uses 24bit per pixel (so is true-color). How could this be done? Thanks a lot Reto -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Moto
Ben Curtis wrote: http://www.webcodex.com/moto/ On Tue, Feb 19, 2002 at 05:07:14PM +, Nick Winfield wrote: On Tue, 19 Feb 2002, Ben Curtis wrote: Not PHP itself, heh, but PHP scripts that you write. Moto scripts can be interpreted by moto, just like PHP, but the scripts can also be compiled as DSOs. Don't suppose you have a URL where one could read more about Moto? =) Cheers, Nick Winfield. -[ http://www.pi0.org/ ]- I would guess that the cloest thing would be the Zend Encoder. Someone on the list may working on something else. http://zend.com/store/products/encoder-faq.php#3 Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] When should I use gethostbyaddr () if I want to monitoring the users
I'm using the gethostbyaddr() function in each webpage on my server to monitor the users. Today I noticed that it causes a very slow speed but before it was ok. Is it commonly bad choise to use it like I do? Should I rather check the host afterwards e.g. when I'm viewing the log-database? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Tel.4615501 GSM 8960376 E-mail [EMAIL PROTECTED] Website:www.sed.is -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] email body text extraction.
I want to check for new emails (with a specific subject) and extract the message body. This message body will be used to update specific parts of my website. Any ideas? Many thanks in advance. Regards. Athar Hameed [EMAIL PROTECTED] P.S. I would like to meet other PHP programmers in Islamabad, Pakistan. If anyone's interested, mail me at [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Looking for good tutorial on Sessions
Greetings all, I am looking for a good tutorial on the net about sessions. I have found a few but they do not seem to go in much detail about full use. Can anyone suggest anything? Thanks Phillip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parse Error Line Numbers
my take on it is that php reports the line it was on when it encountered the error with isn't the same as where you've made your mistake. That sometimes is the case, depending on the error/omission. However, in my case the error is reported on a line number -before- the actual line number I found it on. I understand that compile/parse-time errors do not provide a lot of accuracy... I'm just trying to understand a little better how it generally preprocesses the file. Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED] On Tuesday, February 19, 2002, at 11:07 AM, Nick Wilson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Steven Walker declared Does anyone know how line numbers are figured? I get errors like the following: Parse error: parse error in /home/sites/site104/users/walker/web/admin/_fileutils.php on line 74 Is PHP preprocessing the code to remove comments and white space? The larger my code file, the more inaccurate the parse error line number. In this case, the actual error was on line 83. Well I hope someone provides a more technically accurate answer than mine :-) but my take on it is that php reports the line it was on when it encountered the error with isn't the same as where you've made your mistake. - -- - --- www.explodingnet.com |Projects, Forums and +Articles for website owners - -- Nick Wilson -- |and designers. -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8cqKJHpvrrTa6L5oRArJ8AJ4jXm+TYxKbXhqhtAgmgR14wycojACgh4zX vSFDxyu6sWvE7G14Jp91MZg= =P2dl -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looking for good tutorial on Sessions
On Tuesday, February 19, 2002, at 02:52 PM, Phillip S. Baker wrote: Greetings all, I am looking for a good tutorial on the net about sessions. I have found a few but they do not seem to go in much detail about full use. Can anyone suggest anything? How's this: 1) Put session_start() at the top of any script in which you wish to use sessions. 2) Use $_SESSION['varname'] = $var; to assign any variable to a session variable (assuming you are using PHP 4.1 or greater) 3) Keep in mind that users must have cookies enabled to store the session ID cookie, or you will have to plan for this by appending the SID to the querystring for each page in which you intend the session data to be accessible. I.e. : ?php print trtda href=\http://domain.com/index.php?SID=$SID\;Go Home/a/td/tr; ? Yes, this is a pain in the ass so if you want to use sessions extensively you can have PHP do it automatically by recompiling PHP with --enable-trans-id (I think, check the man for details). 4) Read the session-related functions' man pages It's really very simple! With PHP 4.1, you don't even need to use session_register() to assign session variables, just use (2) from above. Erik PS: 5) when you have specific questions ask the list Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looking for good tutorial on Sessions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Phillip S. Baker declared I am looking for a good tutorial on the net about sessions. I have found a few but they do not seem to go in much detail about full use. Can anyone suggest anything? Depends what you've found? There is some reasonable comprehensive stuff on both phpbuider and devshed and I'm fairly sure there's something on sitepoint.com Are these the ones you've seen? Have you seen the manuals section on this? - -- - --- www.explodingnet.com |Projects, Forums and +Articles for website owners - -- Nick Wilson -- |and designers. -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8crIiHpvrrTa6L5oRAibjAJ41syisweg3ZXUsPObKeyPH03GqNQCeITYc lqLJIjZkfNtL90j6AmJdqLA= =QdhP -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: When should I use gethostbyaddr () if I want to monitoring theusers
Yes... you definately want to wait to check the domains until later. gethostbyaddr() (or any dns lookup) can be extremely slow... Also, you're doing it *every* time even for the same visitor... if you waited until you were parsing the log files you could do it *once* per visitor (by caching the results of the first lookup). -p On Tue, 19 Feb 2002, SED wrote: I'm using the gethostbyaddr() function in each webpage on my server to monitor the users. Today I noticed that it causes a very slow speed but before it was ok. Is it commonly bad choise to use it like I do? Should I rather check the host afterwards e.g. when I'm viewing the log-database? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Tel. 4615501 GSM 8960376 E-mail[EMAIL PROTECTED] Website: www.sed.is -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple problem
Or you could just write snip $fp1 = Fopen(D:\\log.txt,a+); fwrite($fp1,$start\n$array[0]\n$array[1]\n); snip to simplify... -- Richard, oblivion creations http://oblivion.lunamorena.net [EMAIL PROTECTED] +4+ (0) 736 849 531 for sure contact.. Jeff Van Campen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I need insert some variable ito log.txt file but every item (variable) must be on other line how to do this ? If I am understanding your question correctly, you need to add a newline character (\n) at then end every line. Like so: $fp1 = Fopen(D:\\log.txt,a+); fwrite($fp1,$start\n); fwrite($fp1,$array[0]\n); fwrite($fp1,$array[1]\n); . fwrite($fp1,$end); Fclose($fp1); HTH -jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: My Session don't expire
Try passing Header(Cache-Control: no-cache, must-revalidate); Header(Pragma: no-cache); in the beginning of the page, that way all contents MUST be re-valided, thus disabling cache. -- Richard, oblivion creations http://oblivion.lunamorena.net [EMAIL PROTECTED] +4+ (0) 736 849 531 for sure contact.. Rodrigo Peres [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi list, I'm using IE5 on Mac with MacOS 9.2.2. I've made a script that use session_register(), but even when I quit the browser the values registered with session still there. Ex: I run the script, quit the browser, reopen it and do an echo($myvar) and, the value is there, didn't expire. How can I correct this??? Thank's in advance Rodrigo Peres -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail Headers Formatting
Can someone tell me where to find documentation on defining mail headers and formatting? I've been to faqs.org, but was hoping to find something a bit more friendly. Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: http header?
Which of them? A webserver sents quite many variables, and you can access almost everyone of them with PHP. So perhaps giving some specifics? -- Richard, oblivion creations http://oblivion.lunamorena.net [EMAIL PROTECTED] +4+ (0) 736 849 531 for sure contact.. Marcbey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hello php guys, how can i get the http header ? greetings marc -- --- magic garden GmbH - Agentur für Informationsarchitektur Hermannstr. 15 - 70178 Stuttgart (Am Feuersee) www.magic-garden.de ¦ [EMAIL PROTECTED] Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] explode? (table field to a variable of same name)
How can I assign automatically all fields of a database to a variable of the same name? Instead of having to manually do $user_id=$row[user_id]; etc Then how could I know the number of fields in the table so I can do a loop to print them all in html? In advance, thanks for your help. Alfredo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] explode? (table field to a variable of same name)
This isn't exactly what you want, but it is close: list($user_id,$field2,$field3,$field4) = $row; where $row was retrieved via mysql_fetch_array() Just list each of the variable names in the list() function; include ALL fields' names included in $row -Original Message- From: Baloo :0) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP] explode? (table field to a variable of same name) How can I assign automatically all fields of a database to a variable of the same name? Instead of having to manually do $user_id=$row[user_id]; etc Then how could I know the number of fields in the table so I can do a loop to print them all in html? In advance, thanks for your help. Alfredo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting an RGB value of a pixel (JPEG)
ImageColorsForIndex() and ImageColorAt() But you will PHP 4.1 for these functions to work with TrueColor images. -Rasmus On Tue, 19 Feb 2002, Baumann Reto wrote: Hi there I have to get an RGB value of a specified pixel in an JPEG image. This image uses 24bit per pixel (so is true-color). How could this be done? Thanks a lot Reto -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Storing Newsletter in Database
Hello all, I have a challenge that has been put on me. I have built a website for my church and we are now wanting to put our newsletter online. It is currently being done in Microsoft Publisher. I would like to take the MS Publisher file and extract the data and insert it into a database (PostgreSQL) and then display it via PHP. Catch is, the data is not that consistent. The only thing I can think of is to have MS Publisher save it as HTML, and then go through and parse everything and get it put in the database. I know that would still involve some kind of consistency with the data. If there was a way for me to apply an XML DTD to the HTML, that would automate the process more. On the other hand, I could just have the entire newsletter HTML dumped in the database and then have it displayed like that (modifying the HTML of course). But that defeats the entire purpose of automating data. Any ideas on how this can be done, even if I don't have consistency in the data? Any help is appreciated, Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Storing Newsletter in Database
An XML DTD would not work here; XML describes content, HTML describes presentation. You might consider translating to PDF via Adobe Acrobat. Acrobat supports hyperlinks and PDF is a standard plugin for the IE and NN -Original Message- From: Kevin Old [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 3:03 PM To: [EMAIL PROTECTED] Subject: [PHP] Storing Newsletter in Database Hello all, I have a challenge that has been put on me. I have built a website for my church and we are now wanting to put our newsletter online. It is currently being done in Microsoft Publisher. I would like to take the MS Publisher file and extract the data and insert it into a database (PostgreSQL) and then display it via PHP. Catch is, the data is not that consistent. The only thing I can think of is to have MS Publisher save it as HTML, and then go through and parse everything and get it put in the database. I know that would still involve some kind of consistency with the data. If there was a way for me to apply an XML DTD to the HTML, that would automate the process more. On the other hand, I could just have the entire newsletter HTML dumped in the database and then have it displayed like that (modifying the HTML of course). But that defeats the entire purpose of automating data. Any ideas on how this can be done, even if I don't have consistency in the data? Any help is appreciated, Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] explode? (table field to a variable of same name)
First grab an associative array of the variables from the database with mysql_fetch_array() Then use extract($array); to extract all of the variables in the array to the symbol table: www.php.net/extract Simon Baloo :0) wrote: How can I assign automatically all fields of a database to a variable of the same name? Instead of having to manually do $user_id=$row[user_id]; etc Then how could I know the number of fields in the table so I can do a loop to print them all in html? In advance, thanks for your help. Alfredo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP and HTTPS
On Mon, 18 Feb 2002, Michael Kimsal wrote: on IE on pc a this page cannot be displayed error (with possible reasons like your browser needs to be set to accept SSL2 and SSL3 [it is by the way]) is generated half of the time. the other half it works. We've worked with this several times - it's an issue with IE under Windows. The claim is that it only affect 'high security' (SGP or something) but my own experience is that it's always affected. IE just won't work right with SSL if the web server isn't IIS. You pretty much have no choice but to live with it or move to IIS as a server platform. Then maybe it's not a bug in MSIE, but a feaure included to force people to move to IIS+Win2k, just because most people use MSIE, and don't know about other browsers. That's typical from M$ :( Sorry for the semi-off-topic. Regards. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP and HTTPS
On Mon, 18 Feb 2002, J Smith wrote: plaintext, no SSL at all. Useful if you want to keep your password safe during transmission, but it sucks that everything can't be encrypted. That's the way hotmail works too, f. ex. I guess it's to increase speed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] argv and argc
The other day, I was reading the docs and I just happened across something that emulated argc and argv. However, I just spent 2 hours in the docs and can't find it. Is there something in PHP that you can use to get this info? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] shopping cart
Hi I listed my shopping cart in this form: product_name quantity(text field in form)price And I want allow user to change quantity and then after submit load cart contents with new quantity. I forward text value in one variable(name of text field) and id of product in second(hidden type) to my php script which modify quantity in mysql table. This is working good but only if I have one product in cart . What should I do to forward to script all variables of products in cart. My modify function is part of class and when I put there global $HTTP_POST_VARS; variables of that one product weren't be seem , if I write global $id,$quantity they were been seem very well ( but it's still for one product). How to make $HTTP_POST_VARS been see in class function? thx for any help sasza -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] argv and argc
look in the manual under predefined variables: language.variables.predefined.html -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 4:00 PM To: PHP General Subject: [PHP] argv and argc The other day, I was reading the docs and I just happened across something that emulated argc and argv. However, I just spent 2 hours in the docs and can't find it. Is there something in PHP that you can use to get this info? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] argv and argc
Here are all the predefined variables that are in PHP. You will notice that there is an argc and argv here. http://www.php.net/manual/en/language.variables.predefined.php Ray Hunter Firmware Engineer ENTERASYS NETWORKS -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 3:00 PM To: PHP General Subject: [PHP] argv and argc The other day, I was reading the docs and I just happened across something that emulated argc and argv. However, I just spent 2 hours in the docs and can't find it. Is there something in PHP that you can use to get this info? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] argv and argc
Good day, The array $argv contains what you're looking for (I'm not sure if this is deprecated in 4.1.0, though) so you'll have to flip through the manual and release notes. Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 3:00 PM To: PHP General Subject: [PHP] argv and argc The other day, I was reading the docs and I just happened across something that emulated argc and argv. However, I just spent 2 hours in the docs and can't find it. Is there something in PHP that you can use to get this info? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] argv and argc
look in the manual under predefined variables: language.variables.predefined.html Sorry, I should have specified for a function, not a script. I found those vars, just couldn't find the same for a function. Just found it, though: func_num_args(); func_get_arg(); :) Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] explode? (table field to a variable of same name)
This may not be what you want to do, but should give you some hints. (This is my code which I use to simply dump any SQL table into an HTML table I can view in a browser ... for small tables, of course.) Using MySQL as an example: // assuming you ran a query and stored results in $mysql_result_set // Get the number of fields to work with $num_fields = mysql_num_fields( $mysql_result_set ); // http://www.php.net/manual/en/function.mysql-num-fields.php // Print out a row of column headers print( tr ); for( $i = 0; $i $num_fields; $i++ ){ $fieldName = mysql_fetch_field( $mysql_result_set, $i ); // http://www.php.net/manual/en/function.mysql-fetch-field.php print( td . $fieldName-name . /td ); } print( /tr ); // Print out the data from the result records while( $record = mysql_fetch_row( $mysql_result_set ) ){ // http://www.php.net/manual/en/function.mysql-fetch-row.php print( tr ); foreach( $record as $field ){ ${$field} = $field; // The above is unnecessary, but answers your question. // It assigns a variable, named after a table column, //the value of that column (in this record). print( td${field}/td ); } print( tr ); } Hope that gives you something to work with. g.luck, ~Chris On Tue, 19 Feb 2002, Baloo :0) wrote: How can I assign automatically all fields of a database to a variable of the same name? Instead of having to manually do $user_id=$row[user_id]; etc Then how could I know the number of fields in the table so I can do a loop to print them all in html? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] explode? (table field to a variable of same name)
This creates all the variables you asked for and also prints each one in a column of a table. foreach($row as $key=$val) { $$key = $val; echo td$val/td; } -Rasmus On Tue, 19 Feb 2002, Baloo :0) wrote: How can I assign automatically all fields of a database to a variable of the same name? Instead of having to manually do $user_id=$row[user_id]; etc Then how could I know the number of fields in the table so I can do a loop to print them all in html? In advance, thanks for your help. Alfredo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] explode? (table field to a variable of same name)
oi ... typo! see below. sorry :( ~Chris On Tue, 19 Feb 2002, Christopher William Wesley wrote: This may not be what you want to do, but should give you some hints. (This is my code which I use to simply dump any SQL table into an HTML table I can view in a browser ... for small tables, of course.) Using MySQL as an example: // assuming you ran a query and stored results in $mysql_result_set // Get the number of fields to work with $num_fields = mysql_num_fields( $mysql_result_set ); // http://www.php.net/manual/en/function.mysql-num-fields.php // Print out a row of column headers print( tr ); for( $i = 0; $i $num_fields; $i++ ){ $fieldName = mysql_fetch_field( $mysql_result_set, $i ); // http://www.php.net/manual/en/function.mysql-fetch-field.php print( td . $fieldName-name . /td ); } print( /tr ); // Print out the data from the result records while( $record = mysql_fetch_row( $mysql_result_set ) ){ // http://www.php.net/manual/en/function.mysql-fetch-row.php print( tr ); I screwed it up here ... this foreach() loop should be as follows foreach( $record as $fieldName=$field ){ ${$fieldName} = $field; // The above is unnecessary, but answers your question. // It assigns a variable, named after a table column, //the value of that column (in this record). print( td${field}/td ); } print( tr ); } Again ... sorry about that. Oi ... and I see that someone else, wrote that bit of code correctly to the list just now :) (thx, Rasmus). Hope that gives you something to work with. g.luck, ~Chris On Tue, 19 Feb 2002, Baloo :0) wrote: How can I assign automatically all fields of a database to a variable of the same name? Instead of having to manually do $user_id=$row[user_id]; etc Then how could I know the number of fields in the table so I can do a loop to print them all in html? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Timing Sessions Out
Hey Gents and Ladies, I read that sessions can be set to timeout after a certain period of time. However I have not come across anything that tells me how to do that. So how do I specify when sessions are to timeout? Phillip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Formatting problem
I feel kinda dumb for posting this but here it is... I am trying to query a table then format the results so it looks like the rest of the site and the darn delete button to remove db entries keeps showing up at the top. Here is the code... Thanks in advance. Jas ?php require '../scripts/db.php'; $result = mysql_query(SELECT * FROM cur_inv,$dbh) or die(Could not execute query, please try again later); echo table border=\0\ class=\table-body\ width=\100%\form name=\rem_inv\ method=\post\ action=\done2.php3\ trtd align=\center\ colspan=\2\font size=\4\BCurrent Inventory/B/fonthr color=\33\/td/tr; $count = -1; while ($myrow = mysql_fetch_row($result)) { $count ++; echo trtd width=\30%\BType Of Car: /B/tdtd; printf(mysql_result($result,$count,car_type)); echo /tdtdinput type=\checkbox\ name=\car_type\ value=\checkbox\remove/td /tr\n; echo trtd width=\30%\BModel Of Car: /B/tdtd; printf(mysql_result($result,$count,car_model)); echo /td/tr\n; echo trtd width=\30%\BYear Of Car: /B/tdtd; printf(mysql_result($result,$count,car_year)); echo /td/tr\n; echo trtd width=\30%\BPrice Of Car: /B/tdtd$; printf(mysql_result($result,$count,car_price)); echo /td/tr\n; echo trtd width=\30%\BVIN Of Car: /B/tdtd; printf(mysql_result($result,$count,car_vin)); echo /td/trtrtd colspan=\3\hr color=\33\/td/tr\n; } echo input type=\submit\ name=\delete\ value=\delete\/form/table; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Formatting problem
Your problem is a simple HTML formatting problem - your FORM submit button is inside your TABLE but outside a TD (it's after the final /TR), thus Netscape puts it above the table entirely. -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT Work now, freak later! -Original Message- From: jas [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 10:23 PM To: [EMAIL PROTECTED] Subject: [PHP] Formatting problem I feel kinda dumb for posting this but here it is... I am trying to query a table then format the results so it looks like the rest of the site and the darn delete button to remove db entries keeps showing up at the top. Here is the code... Thanks in advance. Jas ?php require '../scripts/db.php'; $result = mysql_query(SELECT * FROM cur_inv,$dbh) or die(Could not execute query, please try again later); echo table border=\0\ class=\table-body\ width=\100%\form name=\rem_inv\ method=\post\ action=\done2.php3\ trtd align=\center\ colspan=\2\font size=\4\BCurrent Inventory/B/fonthr color=\33\/td/tr; $count = -1; while ($myrow = mysql_fetch_row($result)) { $count ++; echo trtd width=\30%\BType Of Car: /B/tdtd; printf(mysql_result($result,$count,car_type)); echo /tdtdinput type=\checkbox\ name=\car_type\ value=\checkbox\remove/td /tr\n; echo trtd width=\30%\BModel Of Car: /B/tdtd; printf(mysql_result($result,$count,car_model)); echo /td/tr\n; echo trtd width=\30%\BYear Of Car: /B/tdtd; printf(mysql_result($result,$count,car_year)); echo /td/tr\n; echo trtd width=\30%\BPrice Of Car: /B/tdtd$; printf(mysql_result($result,$count,car_price)); echo /td/tr\n; echo trtd width=\30%\BVIN Of Car: /B/tdtd; printf(mysql_result($result,$count,car_vin)); echo /td/trtrtd colspan=\3\hr color=\33\/td/tr\n; } echo input type=\submit\ name=\delete\ value=\delete\/form/table; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] argv and argc
IF it is deprecated in 4.1.0, then what are we meant to use in place of it? Martin -Original Message- From: Darren Gamble [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 9:04 AM To: 'Chris Boget'; PHP General Subject: RE: [PHP] argv and argc Good day, The array $argv contains what you're looking for (I'm not sure if this is deprecated in 4.1.0, though) so you'll have to flip through the manual and release notes. Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 3:00 PM To: PHP General Subject: [PHP] argv and argc The other day, I was reading the docs and I just happened across something that emulated argc and argv. However, I just spent 2 hours in the docs and can't find it. Is there something in PHP that you can use to get this info? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php