[PHP] Re: why cant I: array_keys($arr)[0] ?
[EMAIL PROTECTED] wrote: Why does PHP give a parse error if you do: echo array_keys($arr)[0]; This breaks syntax... It makes you assign the result of the function to a var first like this: $arr = array_keys($arr); echo $arr[0]; How about reset($arr); list($key,) = each($arr); echo $key; It's much more efficient. I just want to grab the 1st element of the array. Why does it make you do it in 2 lines instead of letting you index right on the array that results from the function? Writing 2 or 3 lines for printing first key name, is not hard work... PHP script may need more lines to do the same thing compare to Perl, but it's much easier to maintain. IMHO. -- Yasuo Ohgaki -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Access $HTTP_POST_VARS from class member fucntion
Hello I have a class called Member, it has member function called vallidateForm(), i try to pass it a $HTTP_POST_VARS array it looks like this: clas Member{ var $HTTP_POST_VARS; function vallidateForm ($HTTP_POST_VARS){ echo $HTTP_POST_VARS['frmUsername']; } } $user = new Member; if($action==register){ global $HTTP_POST_VARS; $user-vallidateForm($HTTP_POST_VARS); }else{ $user-displayForm(); } ? But i can't acces $HTTP_POST_VARS['frmUsername'] within the function Thank You very much -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Can you help me about apache connect with php ?
Hi Edward, @ 3:43:51 AM on 11/4/2001, [EMAIL PROTECTED] wrote: the installation packages : apache_1.3.20.tar.gz Why not 1.3.22? mysql-3.23.41.tar.gz php-4.0.6.tar.gz installation steps : Apache : ./configure --prefix=/usr/local/apache \ --enable-shared=max make make install /usr/local/apache/bin/apachectl start MySQL : groupadd mysql useradd -g mysql mysql ./configure --with-charset=big5 make make install scripts/mysql_install_db chown -R root /usr/local/share/mysql chown -R mysql /usr/local/var chgrp -R mysql /usr/local/share/mysql cp /usr/local/share/mysql/mysql.server /etc/rc.d/init.d/mysql /etc/rc.d/init.d/mysql start php ( php + apache ) : ./configure \ --with-mysql \ Use: --with-mysql=/usr/local --with-apxs=/usr/local/apache/bin/apxs \ --with-imap \ You probably need a path to imap too. --enable-versioning \ You don't need this if you're only running 4.0.6 --enable-track-vars make make install cp php.ini-dist /usr/local/lib/php.ini Did you restart Apache? /usr/local/apache/bin/apachectl stop /usr/local/apache/bin/apachectl start If that doesn't fix it, make sure you have these lines (uncommented) in /usr/local/apache/conf/httpd.conf: DirectoryIndex index.htm index.html index.php index.php3 index.php4 AddType application/x-httpd-php .php .php3 .php4 AddType application/x-httpd-php-source .phps Then: /usr/local/apache/bin/apachectl stop /usr/local/apache/bin/apachectl start -- -Brian Clark | PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] site last updated
Would there be a way of adding one script to a common footer, which in included in any file, and this script can check any file on the server, and echo the last updated string to a file. Thus, you don't need to add the script to the file, the footer automatically echos that info to any file on the server. Would that be possible? Cause then you could simply add pages, and the whole footer could be echoed to it. Rudi Ahlers UNIX Specialist and Web Developer Bonzai Web Design - http://www.bonzai.org.za Cell: 082 926 1689 - Original Message - From: Chip [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 04, 2001 7:32 AM Subject: Re: [PHP] site last updated On Saturday 03 November 2001 21:12, Steve Werby wrote: Ryan Christensen [EMAIL PROTECTED] wrote: You can do this in a per-page basis w/: $modified = stat(yourfile.html); echo date(l, F dS,$modified[9]); Also see getlastmod() and filemtime(). I am interested in this also. I understand the way it is working here, but what about using a common footer.inc which contains the last modified script, to show the last modified date of another inc file, body.inc, inside page.php? This would have to know the body.inc file name loaded into page.php I guess. That'd sure be easier than adding the script to several hundred seperate pages. -- Chip W. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] why cant I: array_keys($arr)[0] ?
On Sun, Nov 04, 2001 at 12:54:54AM -0700, [EMAIL PROTECTED] wrote: Why does PHP give a parse error if you do: echo array_keys($arr)[0]; It makes you assign the result of the function to a var first like this: $arr = array_keys($arr); echo $arr[0]; I just want to grab the 1st element of the array. Why does it make you do it in 2 lines instead of letting you index right on the array that results from the function? // Shifts the first element off the array $first_element = array_shift($array); // Returns the first element, preserving the array in the calling scope function get_array_first($arr) { return array_shift($arr); } $first_element = get_arr_first($array); Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP/Mysql error handling
Hi, Is there any way to make php notify me of any errors through email? I know it may sounds funny, but imagine having this huge site and u just want it to run smoothly but u juct cant check it all the time . If there was a way that php would notify u for a an error on a specific page/line that would make debuggin much easier and without guessing.. So, is it possible? Thanks. -- phaistonian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] replace nested custom html tags
Hi, Anyone have any ideas on how I could modify the following to work on nested tags? The regex replaces custom tags [i] [u] [b] with real tags. The Regex takes any of the characters in the class \[([ubi])\] then non greedily matches any character (.*?) then matches the result of the first reference from the character class \[\/(\\1)\]/ . It then replaces the [u]stuff[/u] to ustuff/u etc. Everthing works fine, except when the tags are nested. I'm actually suprised that you can use a reference ( eg: \\1 ) in the pattern and not only in the replacement. There does not seam to be any mention of that anywhere. The use of references in the pattern does not appear to be related in any way the the problem. echo preg_replace (/\[([ubi])\](.*?)\[\/(\\1)\]/msi,\\1\\2/\\1, [b] [u] underlined and bold [/u] [/b] [i] italic [/i]); The output:( it doesn't replace the nested [u] [/u] ): b [u] underlined and bold [/u] /b i italics /i Thanks, Bruce _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Apache / PHP Question
Hello, In my lnx server I can do index.php/var1/var2/var3 I try the same exact thing in windows (using the same config (Apache/php) ) and it gives me internal server error. Any ideas? Thanks -- phaistonian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ISAPI modul for IIS5.0
Hi, I have IIS5 on W2k Server, and a can not use isapi modul from php 4.0.6. If I using modul from 4.0.pl2 then everything is OK, but when I use 4.0.6 then it is not functionally and i must use cgi. Can you help me (someone). Thanks,
[PHP] Hello, per making .zip files
Hello, I have tried the zend.com articles to no avail on php/linux 4.03 or even 4.05 whatever is there a way to speciy a directory, in let's say zip.php and when joe schmoe goes to that page, that directory which is specified is downloaded immediately as zip? Not a user interface to make them nobody seems to have a straight answer trying not to talk about 3rd party $10m components can php do this? If so, how? I get errors with every 'solution' so I figured I'd ask here. Thanks
[PHP] Adv Paypal Shopping Cart
This is a difficult one, What I am doing is designing a website to sell DVD's well what I am running into is that when a Person buys the DVD they are getting charged 2.35 for shipping an additional 1.00 for purchasing 2 .. Well that works fine if they buy the same DVD, but when they buy 2 different DVD's they are getting charged 2.35 twice. What I was wondering if I can munipulate the code below to solve this problem using PHP, I have a mySQL database that I pull from and below you can see I am pulling the Shipping from ITM_SHIP field and ITM_ASHIP is for the additional movie they put in there cart. So can I do a math eccuasion so that it does WIEGTH say 1 lb and multiply that by $1 and then put that code in my link below.. Anyone done anything like this, I would love to learn something to this effect! https://www.paypal.com/cart/add=1business=MYACCOUNTitem_name=?php echo $products-Fields(itm_title)?item_number=?php echo $products-Fields(itm_num)?amount=?php echo $products-Fields(itm_price)?shipping=?php echo $products-Fields(itm_ship)?shipping2=?php echo $products-Fields(itm_aship)?image_url=https%3A//www.citystoked.com/logo .jpgreturn=http%3A//www.p-traders.com/success.phpcancel_return=http%3A//ww w.p-traders.com/index.php sincerely Kacey A. Murphy netBuilder's, Inc. You can see what I mean by going to http://www.p-traders.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] .inc files
Hi I was wondering, is there a different way using .inc files? I have a lot of .inc files, which are displayed as normal text when you call it in the browser. I would like to still have a file with the username / password / database / etc in, but make it say config.inc.php. How would I get the app to read a file like that, where say $admin=rudi; But also, how would I be able to change the values from another file? ie. write to it, and delete lines in it? I'm still learnin PHP, and it's great and a lot of fun. Regards Rudi Ahlers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] User authentication?
Hi, do aonyone know of any comprehensive tutorial for user authentication session managment with php4 sessions and mysql? Preferably with some sort of code examples? I have tried searching the larger code libraries but haven´t found anything that suits me (the ones i actually got interested in was dead links). Regards # Daniel Alsén| www.mindbash.com # # [EMAIL PROTECTED] | +46 704 86 14 92 # # ICQ: 63006462 | # -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Get Content-Type of a remote file
Hi. Is it possible to check the Content-type header of a remote file? If so, how? I want to fetch a file using file(), but I want to make sure it is an HTML file first. Thanks, _ Lasar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: User authentication?
Hi Daniel! Phpbuilder have some articles with examples under security. http://www.phpbuilder.com/columns/ Regards Jan Grafstrom Lillemans Hus AB Sweden Daniel alsén [EMAIL PROTECTED] skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, do aonyone know of any comprehensive tutorial for user authentication session managment with php4 sessions and mysql? Preferably with some sort of code examples? I have tried searching the larger code libraries but haven´t found anything that suits me (the ones i actually got interested in was dead links). Regards # Daniel Alsén| www.mindbash.com # # [EMAIL PROTECTED] | +46 704 86 14 92 # # ICQ: 63006462 | # -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: .inc files
Hi Rudi! Check out this example from Hotscripts. http://www.hotscripts.com/cgi-bin/dload.cgi?ID=12367 Regards Jan Grafstrom Rudi Ahlers [EMAIL PROTECTED] skrev i meddelandet 008401c16534$dcb77580$0c00a8c0@camelot">news:008401c16534$dcb77580$0c00a8c0@camelot... Hi I was wondering, is there a different way using .inc files? I have a lot of .inc files, which are displayed as normal text when you call it in the browser. I would like to still have a file with the username / password / database / etc in, but make it say config.inc.php. How would I get the app to read a file like that, where say $admin=rudi; But also, how would I be able to change the values from another file? ie. write to it, and delete lines in it? I'm still learnin PHP, and it's great and a lot of fun. Regards Rudi Ahlers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Am i crazy?
Did I forget everything in a few months? if ($name='admin') { header(Location: $MYPATH/admin.php); } Doesn't. That is it doesn't redirect to whatever $MYPATH/admin.php translates to. Doing an echo $MYPATH directly after the line shows that the path is interpreted correctly - and the file exists (I checked). And the $name is correct - echo $name gives admin. And neither does the php.net example work ... if ($name='admin') { header(Location: http://www.php.net/;); } doesn't redirect to php.net. *sigh* Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 4 Nov 2001 17:48:36 -0000 Issue 975
php-general Digest 4 Nov 2001 17:48:36 - Issue 975 Topics (messages 73373 through 73400): Re: Number_Format Question 73373 by: Steve Werby Re: site last updated 73374 by: Steve Werby 73376 by: Chip 73377 by: speedboy 73385 by: Rudi Ahlers Re: passing variables between pages without using url?? 73375 by: Steve Werby filemtime() problems 73378 by: Ventsyslav Vassilev why cant I: array_keys($arr)[0] ? 73379 by: operator.superprivate.com 73380 by: Yasuo Ohgaki 73381 by: Yasuo Ohgaki 73386 by: Matt McClanahan Can you help me about apache connect with php ? 73382 by: edward.ita.org.mo 73384 by: Brian Clark Access $HTTP_POST_VARS from class member fucntion 73383 by: Daniel Harik PHP/Mysql error handling 73387 by: George E. Papadakis replace nested custom html tags 73388 by: Bruce BrackBill Apache / PHP Question 73389 by: George E. Papadakis ISAPI modul for IIS5.0 73390 by: Marek Erneker Hello, per making .zip files 73391 by: Joelmon2001.aol.com Adv Paypal Shopping Cart 73392 by: Kacey A. Murphy .inc files 73393 by: Rudi Ahlers 73399 by: Jan Grafström Re: [PHP-INST] Can you help me about apache connect with php ? 73394 by: Boyack, Kurt 73396 by: edward.ita.org.mo User authentication? 73395 by: Daniel Alsén 73398 by: Jan Grafström Get Content-Type of a remote file 73397 by: Lasar Liepins Am i crazy? 73400 by: Martin Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- Jeff Oien [EMAIL PROTECTED] wrote: I have a number like this 0.51 and I would like it to display without the leading 0. How can I do this? Thanks. There are lots of solutions. $num = 0.51; $num_parts = explode( '.', $num ); $num_new = '.' . $num_parts[1]; Or if it's always going to be a number b/w 0 and 1 then you could use substr() to get the part you want. You could also use something like ereg_replace(). Someone else may have a solution that's better. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ Ryan Christensen [EMAIL PROTECTED] wrote: You can do this in a per-page basis w/: $modified = stat(yourfile.html); echo date(l, F dS,$modified[9]); Also see getlastmod() and filemtime(). -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ On Saturday 03 November 2001 21:12, Steve Werby wrote: Ryan Christensen [EMAIL PROTECTED] wrote: You can do this in a per-page basis w/: $modified = stat(yourfile.html); echo date(l, F dS,$modified[9]); Also see getlastmod() and filemtime(). I am interested in this also. I understand the way it is working here, but what about using a common footer.inc which contains the last modified script, to show the last modified date of another inc file, body.inc, inside page.php? This would have to know the body.inc file name loaded into page.php I guess. That'd sure be easier than adding the script to several hundred seperate pages. -- Chip W. last modified ?php echo date(D d-m-Y H:i:s, filectime(__FILE__)); ? ^ I put that on the bottom of every page on some sites I make. Would there be a way of adding one script to a common footer, which in included in any file, and this script can check any file on the server, and echo the last updated string to a file. Thus, you don't need to add the script to the file, the footer automatically echos that info to any file on the server. Would that be possible? Cause then you could simply add pages, and the whole footer could be echoed to it. Rudi Ahlers UNIX Specialist and Web Developer Bonzai Web Design - http://www.bonzai.org.za Cell: 082 926 1689 - Original Message - From: Chip [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 04, 2001 7:32 AM Subject: Re: [PHP] site last updated On Saturday 03 November 2001 21:12, Steve Werby wrote: Ryan Christensen [EMAIL PROTECTED] wrote: You can do this in a per-page basis w/: $modified = stat(yourfile.html); echo date(l, F dS,$modified[9]); Also see getlastmod() and filemtime(). I am interested in this also. I understand the way it is working here, but what about using a common footer.inc which contains the last modified script, to show the last modified date of another inc file, body.inc, inside page.php? This would have to know the body.inc file name loaded into page.php I guess. That'd sure be easier than adding the script to several hundred seperate pages. -- Chip W. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [PHP] Am i crazy?
you're assigning, not checking for equality...use two ='s -Original Message- From: Martin [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 04, 2001 12:49 PM To: [EMAIL PROTECTED] Subject: [PHP] Am i crazy? Did I forget everything in a few months? if ($name='admin') { header(Location: $MYPATH/admin.php); } Doesn't. That is it doesn't redirect to whatever $MYPATH/admin.php translates to. Doing an echo $MYPATH directly after the line shows that the path is interpreted correctly - and the file exists (I checked). And the $name is correct - echo $name gives admin. And neither does the php.net example work ... if ($name='admin') { header(Location: http://www.php.net/;); } doesn't redirect to php.net. *sigh* Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Am i crazy?
Jack Dempsey wrote: you're assigning, not checking for equality...use two ='s Still not redirecting ... Martin S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Am i crazy?
what happens? are you sure $name really equal's admin? if you change header to echo $MYPATH does that work? -Original Message- From: Martin [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 04, 2001 12:54 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Am i crazy? Jack Dempsey wrote: you're assigning, not checking for equality...use two ='s Still not redirecting ... Martin S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Am i crazy?
Did I forget everything in a few months? if ($name='admin') { header(Location: $MYPATH/admin.php); } try if ($name =='admin') { ('==' instead of '=', otherwise you are assigning 'admin' to $name) ! oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Am i crazy?
sorry, didn't receive the answers from martin and jack before... oliver Martin wrote: Did I forget everything in a few months? if ($name='admin') { header(Location: $MYPATH/admin.php); } Doesn't. That is it doesn't redirect to whatever $MYPATH/admin.php translates to. Doing an echo $MYPATH directly after the line shows that the path is interpreted correctly - and the file exists (I checked). And the $name is correct - echo $name gives admin. And neither does the php.net example work ... if ($name='admin') { header(Location: http://www.php.net/;); } doesn't redirect to php.net. *sigh* Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: [PHP-INST] Can you help me about apache connect with php ?
Hi Edward, @ 9:35:20 AM on 11/4/2001, [EMAIL PROTECTED] wrote: Now, I have just finished the reinstall Red Hat Linux System , Apache , php and MySQL, But when I start the apache ( web server ) after the re-installation and uncomment the line, these is the error : Syntax error on line 222 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: /usr/local/apache/ libexec/libphp4.so: undefined symbol: gss_mech_krb5 /usr/local/apache/bin/apachectl start: httpd could not be started That's IMAP. From the docs: That requires the c-client library to be installed. Grab the latest version from ftp://ftp.cac.washington.edu/imap/ and compile it. Then copy c-client/c-client.a to /usr/local/lib/libc-client.a or some other directory on your link path and copy c-client/rfc822.h, mail.h and linkage.h to /usr/local/include or some other directory in your include path. And you'll more than likely want to use a path for --with-imap. Also try using --with-kerberos=DIR where DIR is the install directory for kerberos. If that doesn't solve the problem, have a look at this: http://www.geocrawler.com/mail/msg.php3?msg_id=3818227list=5 -- -Brian Clark | PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Am i crazy?
It has to do with the $name variable, if you've fixed the code to check for equality instead of setting the variable: if ($name=='admin') { Echo $name and make sure that it is actually getting set.. Also make sure your header information is before html.. let's see.. yeah that's about all I can think of.. if $name is echoing something then I have no clue why it's not working :( Rick Did I forget everything in a few months? if ($name='admin') { header(Location: $MYPATH/admin.php); } Doesn't. That is it doesn't redirect to whatever $MYPATH/admin.php translates to. Doing an echo $MYPATH directly after the line shows that the path is interpreted correctly - and the file exists (I checked). And the $name is correct - echo $name gives admin. And neither does the php.net example work ... if ($name='admin') { header(Location: http://www.php.net/;); } doesn't redirect to php.net. *sigh* Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP]
http://minwon82.com php-general´Ô ¾È³çÇϽʴϱî? ¹Î¿ø»¡¸®´åÄÄ ¿¡¼ ÀÎ»ç µå¸³´Ï´Ù. ÀÌ°÷¿¡¼´Â µî±âºÎµîº», ÅäÁö´ëÀå, Á¹¾÷Áõ¸í¼, °æ·ÂÁõ¸í¼, µî °¢Á¾ ¹Î¿ø 34Á¾À» ¹Ù»Ú½Å Çö´ëÀεéÀ» ´ë½ÅÇÏ¿© ¹ß±Þ´ëÇà ¼ºñ½º ÇÏ°í ÀÖ½À´Ï´Ù. ½ÅûÀ» ÇϽøé ÀÔ±Ý È®ÀÎÈÄ 2½Ã°£ À̳»¿¡ Æѽº³ª À̸ÞÀÏÀ» ÀÌ¿ë ¿¶÷ °¡´ÉÇÏ¸ç ¿øº»ÀÌ ÇÊ¿äÇϽŠºÐÀº ¿ìÆíÀ̳ª Åù踦 ÀÌ¿ë ¹è´Þµµ ÇØ µå¸³´Ï´Ù. ¸¹Àº ÀÌ¿ëÀ» ¹Ù¶ø´Ï´Ù. Çã¶ôB´Â ¹æ¹® ¿ë¼ÇØ Áֽʽÿä. °¡Á¤¿¡ Çà¿îÀÌ ´Ã ÇÔ²² ÇÏ½Ã±æ ¹Ù¶ø´Ï´Ù...
[PHP] Math Script
Is this possible what I want this to do is take a price say 10.00 in a field in the mySQL databse and do a math set such as -0.5 * 1 This is in a link and I was echoing the field in the database but how do I put a math thingy in there. ?php echo $products-Fields(itm_aship)? Could I do this ?php echo $products-Fields(itm_aship)-0.5*1? or am I thinking all wrong... Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Questions per installing on linux (Php 4)
This is what I did when I installed PHP and I already had mySQL on my RAQ3i and it worked like a charm, I hope this helps you, -- you can skip by the mySQL install and move on the PHP install below. Since mySQL for the RAQ3i (especially if you used the BIN from Cobalt) doesn't have a directory complete with the source so I just used --with-mysql (without a path) been working awesome. E-mail if you need anything ICQ# 16976549 *** ** INSTALLING MySQL on RAQ3i ** *** [1] login as root [2] mkdir usr/local/download [3] cd /usr/local/downoad [4] wget http://www.mysql.com/Downloads/MySQL-3.23/mysql-3.23.32.tar.gz [5] echo mysql:x:101:103:MySql User:/usr/local/mysql:/etc/passwd [6] echo mysql:x:103:/etc/group [7] tar zxvf mysql-3.23.32.tar.gz [8] cd mysql-3.23.32 [9] ./configure --prefix=/usr/local/mysql --with-unix-socket-path=/tmp/mysql.soc k --with-mysqld-user=mysql [10] make [11] make install [12] chown mysql.mysql /usr/local/mysql [13] scripts/mysql_install_db [14] chown -R mysql.mysql /usr/local/mysql/var [15] mkdir /var/lib/mysql [16] ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock [17] rm -f /usr/bin/mysql [18] ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql [19] chmod 755 /usr/local/mysql/var [20] /usr/local/mysql/bin/safe_mysqld [21] /usr/local/mysql/bin/mysqladmin -u root password 'YOURPASSWORDHERE' [22] cp support-files/mysql.server /etc/rc.d/init.d/mysql [23] chmod 755 /etc/rc.d/init.d/mysql [24] echo /etc/rc.d/init.d/mysql start/etc/rc.d/rc.sysinit *** ** INSTALLING PHP4 on RAQ3i ** *** [1] login as Root [2] cd /usr/local/download [3] wget http://php.net/distributions/php-4.0.6.tar.gz [4] tar -xvzf php-4.0.4pl1.tar.gz [5] cd php-4.0.4pl1 [6] mkdir /usr/local/php [7] mv * /usr/local/php [8] cd /usr/local/php [9] rmdir /usr/local/download/php-4.0.4pl1 [10] ./configure --with-mysql --with-apxs --enable-track-vars [11] make [12] make install [13] cp php.ini-dist /usr/local/lib/php.ini [14] pico -w /etc/httpd/conf/httpd.conf (Change the line:) LoadModulephp4_modulelib/apache/libphp4.so to LoadModulephp4_module/usr/lib/apache/libphp4.so) [15] pico -w /etc/httpd/conf/srm.conf Find the following line in srm.conf #AddType application/x-httpd-php .phtml After this line, add the line AddType application/x-httpd-php .php .php4 .phtml This associates the .php file extension with PHP4 (If you want index.php to be served by default you need also to add this as well in the section UserDir web of the same file) # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. DirectoryIndex index.html index.htm index.shtml home.html home.htm index.php index.php4 index.p$ *** ** FINISHING NOTES ** *** Still logged in as 'root' perform the following commands to stop and restart the HTTP server /etc/rc.d/init.d/httpd stop /etc/rc.d/init.d/httpd start -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Questions per installing on linux (Php 4)
This is what I did when I installed PHP and I already had mySQL on my RAQ3i and it worked like a charm, I hope this helps you, -- you can skip by the mySQL install and move on the PHP install below. Since mySQL for the RAQ3i (especially if you used the BIN from Cobalt) doesn't have a directory complete with the source so I just used --with-mysql (without a path) been working awesome. E-mail if you need anything ICQ# 16976549 *** ** INSTALLING MySQL on RAQ3i ** *** [1] login as root [2] mkdir usr/local/download [3] cd /usr/local/downoad [4] wget http://www.mysql.com/Downloads/MySQL-3.23/mysql-3.23.32.tar.gz [5] echo mysql:x:101:103:MySql User:/usr/local/mysql:/etc/passwd [6] echo mysql:x:103:/etc/group [7] tar zxvf mysql-3.23.32.tar.gz [8] cd mysql-3.23.32 [9] ./configure --prefix=/usr/local/mysql --with-unix-socket-path=/tmp/mysql.soc k --with-mysqld-user=mysql [10] make [11] make install [12] chown mysql.mysql /usr/local/mysql [13] scripts/mysql_install_db [14] chown -R mysql.mysql /usr/local/mysql/var [15] mkdir /var/lib/mysql [16] ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock [17] rm -f /usr/bin/mysql [18] ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql [19] chmod 755 /usr/local/mysql/var [20] /usr/local/mysql/bin/safe_mysqld [21] /usr/local/mysql/bin/mysqladmin -u root password 'YOURPASSWORDHERE' [22] cp support-files/mysql.server /etc/rc.d/init.d/mysql [23] chmod 755 /etc/rc.d/init.d/mysql [24] echo /etc/rc.d/init.d/mysql start/etc/rc.d/rc.sysinit *** ** INSTALLING PHP4 on RAQ3i ** *** [1] login as Root [2] cd /usr/local/download [3] wget http://php.net/distributions/php-4.0.6.tar.gz [4] tar -xvzf php-4.0.4pl1.tar.gz [5] cd php-4.0.4pl1 [6] mkdir /usr/local/php [7] mv * /usr/local/php [8] cd /usr/local/php [9] rmdir /usr/local/download/php-4.0.4pl1 [10] ./configure --with-mysql --with-apxs --enable-track-vars [11] make [12] make install [13] cp php.ini-dist /usr/local/lib/php.ini [14] pico -w /etc/httpd/conf/httpd.conf (Change the line:) LoadModulephp4_modulelib/apache/libphp4.so to LoadModulephp4_module/usr/lib/apache/libphp4.so) [15] pico -w /etc/httpd/conf/srm.conf Find the following line in srm.conf #AddType application/x-httpd-php .phtml After this line, add the line AddType application/x-httpd-php .php .php4 .phtml This associates the .php file extension with PHP4 (If you want index.php to be served by default you need also to add this as well in the section UserDir web of the same file) # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. DirectoryIndex index.html index.htm index.shtml home.html home.htm index.php index.php4 index.p$ *** ** FINISHING NOTES ** *** Still logged in as 'root' perform the following commands to stop and restart the HTTP server /etc/rc.d/init.d/httpd stop /etc/rc.d/init.d/httpd start -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] preg_grep changed after php4.0.4+
It does not appear to be in the documentation yet (and only a little blurb in the NEWS file) but preg_grep has changed. Assume $file_list is an array of file names using integer keys, e.g., $file_list { 0 = test, 1 = filenames } $result = preg_grep(/name/i, $file_list); Here is an example of what used to work: print_r($result) would print $result { 0 = filenames } So you could use $result[0] to get the value filenames. They way it works now: print_r($result) prints $result { 1 = filenames } So you have to search $result for array_keys and then use the result of that on the original array. $keys = array_keys($result); and use $file_list[$keys[0]] to get the value filenames -or- create a for loop over $result -or- have the prescience to know the right key in $file_list to start with ;-) Is this documented somewhere? The current PHP manual on php.net zend does not reflect this change. The change broke my script when I upgraded from 4.0.1... to 4.0.4+ Documentation could well be the achilles heel of open source. -A -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] documentation comment
not to start a war, but have you seen php.net's documentation compared to anything microsoft or anyone else has ever put out? i'd say that documentation is microsoft's achilles heel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] how about walking another way?
Good time of a day! Very strange... the code you place here works good (if forget one '=' ). I thinck you have to chek what you have in $name, $MYPATH, $MYPATH/admin.php... by the way what error you have? not such file? ... or somth special?... If still not working. (vay;-))) ) than remember than any mission can be completed in different ways try somth like this ;-) if ($name == admin) { print 'META HTTP-EQUIV=Refresh Content=0; URL='.$MYPATH.'/admin.php.''; } .. Vladimir Galkov. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Am i crazy?
Jack Dempsey wrote: what happens? if ($name == admin) { echo $name; header(Location: $MYPATH/admin.php); } Displays admin on the page where the redirect is from (switch.php). Without the echo statement I just get a blank switch.php. I'm simply not redirected anywhere. (Nothing else is supposed to happen). are you sure $name really equal's admin? Ohh yes. if you change header to echo $MYPATH does that work? No. Martin S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Am i crazy?
Richard Baskett wrote: It has to do with the $name variable, if you've fixed the code to check for equality instead of setting the variable: if ($name=='admin') { Echo $name and make sure that it is actually getting set.. Yes. Also make sure your header information is before html.. There isn't any html in the page at all. It's intended as a switchboard for people logging in to be redirected according to user name. let's see.. yeah that's about all I can think of.. if $name is echoing something then I have no clue why it's not working :( Martin S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: how about walking another way?
Galkov Vladimir wrote: Good time of a day! Very strange... the code you place here works good (if forget one '=' ). I thinck you have to chek what you have in $name, $MYPATH, $MYPATH/admin.php... by the way what error you have? not such file? ... or somth special?... If still not working. (vay;-))) ) than remember than any mission can be completed in different ways try somth like this ;-) if ($name == admin) { print 'META HTTP-EQUIV=Refresh Content=0; URL='.$MYPATH.'/admin.php.''; } OK, thanks. That works. Strange ... Martin S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] URGENT: Can PHP on Linux deal with Access DB?
Hello, I have been asked to maintain a PHP site hosted on NT/IIS, and have only an Apache/RH linux box to do test and development for it. So far it would be a no-brainer, being PHP as portable as is. The problem is that on the real server PHP should read and write an Access database via ODBC, and, for reasons not worth discussing here, I have no possibility to change this in the foreseable future. On the other hand, I really don't want to put online untested pages, cannot afford buying another NT/IIS box just for this purpose, and even less dual booting all the time, because of other Linux only projects I can't stop. The question, then, is if I can copy the Access database files on my Linux box and access them via PHP/ODBC/Apache on my PC to test completely my pages before upload: is this possible? How? Any other solution (like converting the access DB to Mysql or something, in such a way that if the PHP code works on MySQL on my box it will also work for sure on Access on the IIS server) is extremely welcome!! Thanks a lot in advance, Marco -- There is hopeful symbolism in the fact that flags do not wave in a vacuum. -- Arthur C. Clarke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Am i crazy?
well when you were using echo $name to test then you were outputting html, hence no redirect... if your php is set up in such a way as to suppress errors then you wouldn't have been warned about it..check that nothing else is being outputted, eg a space before the first ?. If that doesn't fix it turn error reporting down to its lowest level. After using a header redirect often comment to put exit; HTH,Tom - Original Message - From: Martin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 04, 2001 8:24 PM Subject: Re: [PHP] Am i crazy? Richard Baskett wrote: It has to do with the $name variable, if you've fixed the code to check for equality instead of setting the variable: if ($name=='admin') { Echo $name and make sure that it is actually getting set.. Yes. Also make sure your header information is before html.. There isn't any html in the page at all. It's intended as a switchboard for people logging in to be redirected according to user name. let's see.. yeah that's about all I can think of.. if $name is echoing something then I have no clue why it's not working :( Martin S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] documentation comment
Have you seen a MSDN subscription latly? Its many many CDs of Help Files and such... Php.net has comments added by coders on the end, but other than that they have nothing over M$ unless i'm missing something? Andrew - Original Message - From: Jack Dempsey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 04, 2001 7:59 PM Subject: [PHP] documentation comment not to start a war, but have you seen php.net's documentation compared to anything microsoft or anyone else has ever put out? i'd say that documentation is microsoft's achilles heel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: how about walking another way?
One observation on this.. there is a major difference between this and the the header(location:... header happens on the server side whereas the below is clientside and therefore unreliable. I know that netscape, particullarly on unix, is bad for ignoring this. header() is the only reliable way to do it! Galkov Vladimir wrote: Good time of a day! Very strange... the code you place here works good (if forget one '=' ). I thinck you have to chek what you have in $name, $MYPATH, $MYPATH/admin.php... by the way what error you have? not such file? ... or somth special?... If still not working. (vay;-))) ) than remember than any mission can be completed in different ways try somth like this ;-) if ($name == admin) { print 'META HTTP-EQUIV=Refresh Content=0; URL='.$MYPATH.'/admin.php.''; } OK, thanks. That works. Strange ... Martin S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] site last updated
Re: site last updated 73374 by: Steve Werby 73376 by: Chip 73377 by: speedboy 73385 by: Rudi Ahlers I think that all is partially answers on question that have no answer at all ! Question was : ... SITE last update - not html file inside site but WHOLE__site__. I did this way : 1.Database with all articles on site and it's dates of its last modify (i use text format) 2. array_multisort ( $this-a_tmst , SORT_DESC , $this-a_datestr , 3. echo date_datestr[1]. , so i do in my news.php page (that one automatically show new articles on my site). And this is really date of SITE last modify ... -Original Message- From: Rudi Ahlers [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 04, 2001 12:13 PM To: Chip; [EMAIL PROTECTED] Subject: Re: [PHP] site last updated Would there be a way of adding one script to a common footer, which in included in any file, and this script can check any file on the server, and echo the last updated string to a file. Thus, you don't need to add the script to the file, the footer automatically echos that info to any file on the server. Would that be possible? Cause then you could simply add pages, and the whole footer could be echoed to it. Rudi Ahlers UNIX Specialist and Web Developer Bonzai Web Design - http://www.bonzai.org.za Cell: 082 926 1689 - Original Message - From: Chip [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 04, 2001 7:32 AM Subject: Re: [PHP] site last updated On Saturday 03 November 2001 21:12, Steve Werby wrote: Ryan Christensen [EMAIL PROTECTED] wrote: You can do this in a per-page basis w/: $modified = stat(yourfile.html); echo date(l, F dS,$modified[9]); Also see getlastmod() and filemtime(). I am interested in this also. I understand the way it is working here, but what about using a common footer.inc which contains the last modified script, to show the last modified date of another inc file, body.inc, inside page.php? This would have to know the body.inc file name loaded into page.php I guess. That'd sure be easier than adding the script to several hundred seperate pages. -- Chip W. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: Access $HTTP_POST_VARS from class member fucntion
try this : class me { var arr_post; function init($par_arr_post) { $this-arr_post=$par_arr_post; } } -Original Message- From: Daniel Harik [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 04, 2001 8:42 PM To: [EMAIL PROTECTED] Subject: Access $HTTP_POST_VARS from class member fucntion Hello I have a class called Member, it has member function called vallidateForm(), i try to pass it a $HTTP_POST_VARS array it looks like this: clas Member{ var $HTTP_POST_VARS; function vallidateForm ($HTTP_POST_VARS){ echo $HTTP_POST_VARS['frmUsername']; } } $user = new Member; if($action==register){ global $HTTP_POST_VARS; $user-vallidateForm($HTTP_POST_VARS); }else{ $user-displayForm(); } ? But i can't acces $HTTP_POST_VARS['frmUsername'] within the function Thank You very much -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: Am i crazy?
Why not if (file_exists($fname=$MYPATH/admin.php) $name='admin')) header (Location: .$fname) ;else echo Trouble with $fname; -Original Message- From: Martin [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 04, 2001 7:49 PM To: [EMAIL PROTECTED] Subject: Am i crazy? Did I forget everything in a few months? if ($name='admin') { header(Location: $MYPATH/admin.php); } Doesn't. That is it doesn't redirect to whatever $MYPATH/admin.php translates to. Doing an echo $MYPATH directly after the line shows that the path is interpreted correctly - and the file exists (I checked). And the $name is correct - echo $name gives admin. And neither does the php.net example work ... if ($name='admin') { header(Location: http://www.php.net/;); } doesn't redirect to php.net. *sigh* Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Math Script
On Mon, 5 Nov 2001 05:47, Kacey A. Murphy wrote: Is this possible what I want this to do is take a price say 10.00 in a field in the mySQL databse and do a math set such as -0.5 * 1 This is in a link and I was echoing the field in the database but how do I put a math thingy in there. ?php echo $products-Fields(itm_aship)? Could I do this ?php echo $products-Fields(itm_aship)-0.5*1? or am I thinking all wrong... Thanks! That idsea should work - but also consider doing the same thing in your database query. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Your fly is undone, was Tom's zippy rejoinder. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mysql table information
On Sat, 3 Nov 2001 00:32, Justin French wrote: hi, i was wondering if anyone has some sample code / links which could help me generate HTML forms dynamically from the fields/types/lengths of tables in a mySQL database. ie, if i had a three column table with first (varchar 50), last (varchar 80) bio (medium text) as the columns, it'd be great if i could use this information about the *table* to build a html form. in otherwords, I could generate an INPUT named first who's max length was 50, annother called last with a maxlength of 80, and a TEXTAREA named bio for the medium text, etc etc. sorry i can't describe it any better!! i guess programs like phpMyAdmin achieve this, but i'd rather see a small code snippet and LEARN rather than dig through 1000's of lines of phpMyAdmin code :) Justin You might want to have a look at mysql_field_name and mysql_field_type. There is an example in the docs for the latter that I think will point you in the right direction. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Everywhere is walking distance if you have the time. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] documentation comment
I would have to agree on a global scale. However, strictly in discussion of server-side languages, I haven't seen ASP documentation as complete/useful as PHP's... I have never had to use anything besides the PHP manual to solve a problem in writing something. -Original Message- From: Andrew Brampton [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 04, 2001 5:46 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] documentation comment Have you seen a MSDN subscription latly? Its many many CDs of Help Files and such... Php.net has comments added by coders on the end, but other than that they have nothing over M$ unless i'm missing something? Andrew - Original Message - From: Jack Dempsey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 04, 2001 7:59 PM Subject: [PHP] documentation comment not to start a war, but have you seen php.net's documentation compared to anything microsoft or anyone else has ever put out? i'd say that documentation is microsoft's achilles heel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Access $HTTP_POST_VARS from class member fucntion
At 10:41 AM -0800 11/4/01, Daniel Harik wrote: Hello I have a class called Member, it has member function called vallidateForm(), i try to pass it a $HTTP_POST_VARS array it looks like this: clas Member{ var $HTTP_POST_VARS; function vallidateForm ($HTTP_POST_VARS){ echo $HTTP_POST_VARS['frmUsername']; } } Syntax here is wrong; you don't need to declare function arguments using var; only class variables need that. I'm uncertain what will happen if you do this. I would expect that - if PHP's error reporting were turned up to the maximum - it might give you a warning message. So do either: (1) Drop the 'var $HTTP_POST_VARS line; OR do (2) clas Member{ var $HTTP_POST_VARS; function vallidateForm (){ echo $this-HTTP_POST_VARS['frmUsername']; } } Although option (2) would require rewriting the code below. Also I assume that the 'clas Member{' line is just a typo, and your actual code says 'class Member{'... $user = new Member; if($action==register){ global $HTTP_POST_VARS; $user-vallidateForm($HTTP_POST_VARS); }else{ $user-displayForm(); } ? But i can't acces $HTTP_POST_VARS['frmUsername'] within the function If you are using an old (any PHP3.x, and I think some early betas of PHP4) version of PHP, you need to turn 'track_vars' on to enable $HTTP_POST_VARS and other $HTTP_xxx_VARS arrays. If that's the case - and you can't upgrade immediately - you need to turn track_vars on in httpd.conf, php.ini, or .htaccess (whatever's appropriate in your setup). Hope that helps - - steve edberg -- +--- my people are the people of the dessert, ---+ | Steve Edberg [EMAIL PROTECTED] | | University of California, Davis (530)754-9127 | | Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ | + said t e lawrence, picking up his fork + -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sending email to php script
On Fri, 2 Nov 2001 18:33, Adrian D'Costa wrote: On Fri, 2 Nov 2001, David Robley wrote: What if we need both version?? There's nothing stopping you running both. How do you compile it for both? Adrian To do the cgi compile, use all the configure values you need EXCEPT anything apache related. The compile will produce an executable called, strangely, php. Will it work with apache then? Adrian Um, I don't understand? Presumably you already have the module version of PHP running with Apache; all you need the standalone for is to non-web based stuff? -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Catalogue: How to tell one sort of cat from another. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] header(Location: ...) correct implementation
Hello, After seeing multiple message concerning the Location response-header using relative URI's, and having to change this in multiple open-source projects, I'd like to point out that the correct behaviour only allows ABSOLUTE URI's. This may work on certain clients with a relative URI, but should NOT be depended on! As per http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14 : 14.30 Location The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI. Location = Location : absoluteURI An example is: Location: http://www.w3.org/pub/WWW/People.html I.E. header(Location: mypage.php) should not be used... Just my .02 US dollars, John [Settings] NoSplashScreen=1 UseDialup=0 UseWinSock=1 OffLine=0 [EMAIL PROTECTED] PrinterFont=Courier New LastSettingsCategory=3 RealName=John Steele MailboxSuperclose=1 EmptyTrashOnQuit=1 PrinterFontSize=8 SavePassword=1 SMTPServer=mail.earthlink.net TextAsDoc=0 [EMAIL PROTECTED] CheckForMailEvery=20 MainWindowState=1 SendMIME=1 SendUuencode=0 SendBinHex=0 AutoReceiveAttachmentsDirectory=C:\Download TabsInBody=0 UseQP=0 MAPIUseEudora=0 CtrlArrows=1 LasOptionsCategory=8 MAPIUseNever=0 FingerDefault=0 ShowProgress=1 URLHelper=E:\PROGRA~1\NETSCAPE\COMMUN~1\PROGRAM\NETSCAPE.EXE MAPIUseAlways=1 EasyOpen=0 MAPIDeleteNever=1 MAPIDeleteTrash=0 AutoOKTimeout=20 ScreenFontSize=9 Alert=0 NewMailSound=E:\Program Files\Qualcomm\Eudora Mail\Gotmail.wav AsyncDatabase=0 AsyncWinsock=0 SuccessfulSend=1 ExpandNickname=1 UserSignatures=1 Signature=STANDARD CheckMailByDefault=1 LeaveMailOnServer=0 MailboxShowLabel=0 WarnQuitWithQueued=1 WarnEmptyTrash=0 AutoExpandNicknames=1 LastOptionsCategory=14 RegistrationFlag=-1 MailboxShowServerStatus=0 GuessParagraphs=0 IncludeHeaders=0 NicknameLastActivePropertyPage=0 WarnDeleteUnread=0 AutoOK=1 RunBefore=1 MailboxShowPriority=1 FilterReport=0 DefaultMailto=1 WarnDefaultMailto=1 AutoAttachedDeleteNever=1 AutoAttachedDeleteTrash=0 WarnDeleteUnsent=0 LoginName=johnsteele PopServer=mail.earthlink.net CurrentTipOfTheDay=2 SeenPlugins=x515x LastWindowMax=0 ReplyToAll=0 CopyPriority=0 ScreenFontBaseSize=1 ShowToolBar=1 MailboxPreviewPane=0 RasCloseAfterDone=0 AutoConnection=1 AutoConnectionName=Earthlink RasCloseOnExit=0 AutomationEnabled=1 WordWrap=0 ShowMailboxLines=1 ShowCategoryIcons=1 ShowCoolBars=0 UseBidentAlways=0 SendPlainAndStyled=0 SendPlainOnly=1 FixedDateFormat=%2 %1 %4 Commercial32Version=16 NicknameViewByIndex=0 PersonaViewNameWidth=165 PersonaViewAccountWidth=200 TaskStatusStateWidth=118 TaskStatusStatusWidth=249 TaskStatusProgressWidth=293 ShowTipOfTheDay=0 MessageFontBaseSize=1 SenderTimeDisplay=1 LocalTimeDisplay=0 RegistrationFreeFlag=-1 ShowStatusBar=1 ShowMDITaskbar=0 UseProportionalAsDefault=0 TaskWarnOnClose=0 PrinterFontBaseSize=1 WarnQueueStyledText=0 SendStyledOnly=0 ShowStyledTextToolbar=0 OpenInMailbox=0 InlineMapiTextAttachment=1 TaskMgrWaitTime=2 TaskStatusPersonaWidth=83 WarnLaunchProgram=1 Fumlub=0 DragSelectMessages=1 PlainArrows=0 AltArrows=0 DomainQualifier= ImapDirectoryPrefix= Stationery= LeaveOnServerDays=0 BigMessageThreshold=40960 IMAPMaxDownloadSize=0 AuthenticateKerberos=0 AuthenticateAPOP=0 AuthenticateRPA=0 UsesIMAP=0 UsesAOL=0 UsesPOP=1 AuthenticatePassword=1 DeleteMailFromServer=0 ServerDelete=0 SkipBigMessages=0 IMAPMinDownload=1 IMAPOmitAttachments=0 IgnoreMixedCase=1 SuggestPhoneticSpellings=1 [Mappings] in=txt,,TEXT,text,plain out=txt,ttxt,TEXT,text,plain both=vem,,,voice,voice-e-mail out=mcw,MSWD,WDBN,application,msword in=xls,XCEL,,, out=xls,XCEL,XLS4,, both=xlc,XCEL,XLC3,, both=xlm,XCEL,XLM3,, both=xlw,XCEL,XLW,, both=ppt,PPT3,SLD3,, both=wav,SCPL,WAVE,audio,microsoft-wave both=grp,,,application,microsoft-group both=wri,,,application,microsoft-write both=cal,,,application,microsoft-calendar both=zip,pZIP,pZIP,application,zip both=rtf,MSWD,TEXT,application,rtf both=pdf,,,application,pdf both=ps,,,application,postcript in=eps,,EPSF,, out=eps,dPro,EPSF,application,postscript both=jpg,JVWR,JPEG,image,jpeg out=jpeg,JVWR,JPEG,image,jpeg both=jfif,JFIF,JPEG,image,jpeg both=gif,JVWR,GIFf,image,gif both=tif,JVWR,TIFF,image,tiff both=mpg,mMPG,MPEG,video,mpeg both=mpeg,mMPG,MPEG,video,mpeg both=mov,TVOD,MooV,video,quicktime both=qt,TVOD,MooV,video,quicktime out=1st,ttxt,TEXT,text,plain both=aif,SCPL,AIFF,, both=arc,arc*,mArc,, both=arj,DArj,BINA,, out=asc,ttxt,TEXT,text,plain out=asm,ttxt,TEXT,text,plain both=au,SCPL,ULAW,, out=bas,ttxt,TEXT,text,plain out=bat,ttxt,TEXT,text,plain out=bga,JVWR,BMPp,, both=bmp,JVWR,BMPp,, out=c,ttxt,TEXT,text,plain both=cgm,GKON,CGMm,,
Re: [PHP] Mail() not sending mail..
On Sat, 3 Nov 2001 00:53, Paul Mullett wrote: Hello, Could be a simple problem, using PHP4 on a Linux/Unix Cobalt RaQ4 server. I have been using it fine, but the mail() function wont send mail, even with the most basic content and lack of headers. Can anyone offer any advise on what could be the problem, or any scripts I can use to test the mail() function that will return nice errors to let me know what's going wrong? I have tried searching for help, but I have found nothing specific. Aplogies for such a simple question(?) but I just cant get it to send mail! Thanks. I assume you aren't getting a message like 'mail is not implemented in this build? If not, the first place to check would be php.ini, to ensure that it is pointing at whatever you are using for mail. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA It's become much bigger, said Tom with a groan. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Secure transfer between servers
Hi All- I'm designing a Portal environment for a very large number of organisations and it necessitates having a central server where users initially login and have access to a few functions. For the more complex functions where it is necessary to redirect them to another server, local to them, I have a problem. I can redirect fine but how do I validate that user? At the moment I'm passing through the username and password on the redirect URL but that is no good as Internet Explorer shows that URL in the status bar as it is redirecting. Someone looking over another person's shoulder could see their login and password. I'm looking for ideas on how to securely transfer users between these two separate websites? It is unfortunately not an option to have them login twice. Regards, Adam Whitehead Systems Developer - Computer Support and Maintenance Ph. (08) 8936 3164 E-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] what's this???
Hello :c) im looking at some code i found on the net and i cant find any info on this... it's used like: $this-mode = $mode; I have looked in the online help doc but it did'nt return anything, any one know?? -- Thanks Christian Charette www.charetx2.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] what's this???
$this refers to the current object so $this-mode refers to the variable inside the current object called mode Hope this helps Martin -Original Message- From: Christian C. [mailto:[EMAIL PROTECTED]] Sent: Monday, November 05, 2001 12:17 PM To: [EMAIL PROTECTED] Subject: [PHP] what's this??? Hello :c) im looking at some code i found on the net and i cant find any info on this... it's used like: $this-mode = $mode; I have looked in the online help doc but it did'nt return anything, any one know?? -- Thanks Christian Charette www.charetx2.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] what's this???
http://www.php.net/manual/en/language.oop.php This is what you want to read. Matt. - Original Message - From: Christian C. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 04, 2001 7:16 PM Subject: [PHP] what's this??? Hello :c) im looking at some code i found on the net and i cant find any info on this... it's used like: $this-mode = $mode; I have looked in the online help doc but it did'nt return anything, any one know?? -- Thanks Christian Charette www.charetx2.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Secure transfer between servers
Perhaps make it an MD5 hash of the username and password in the url. Or, make it a submit button. Those two pop off my head. - James -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 04, 2001 7:50 PM To: [EMAIL PROTECTED] Subject: [PHP] Secure transfer between servers Hi All- I'm designing a Portal environment for a very large number of organisations and it necessitates having a central server where users initially login and have access to a few functions. For the more complex functions where it is necessary to redirect them to another server, local to them, I have a problem. I can redirect fine but how do I validate that user? At the moment I'm passing through the username and password on the redirect URL but that is no good as Internet Explorer shows that URL in the status bar as it is redirecting. Someone looking over another person's shoulder could see their login and password. I'm looking for ideas on how to securely transfer users between these two separate websites? It is unfortunately not an option to have them login twice. Regards, Adam Whitehead Systems Developer - Computer Support and Maintenance Ph. (08) 8936 3164 E-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Secure transfer between servers
or, instead of MD5 (depending on how secure you want it) you could use base64_(en|de)code -Original Message- From: James [mailto:[EMAIL PROTECTED]] Sent: Monday, November 05, 2001 12:46 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Secure transfer between servers Perhaps make it an MD5 hash of the username and password in the url. Or, make it a submit button. Those two pop off my head. - James -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 04, 2001 7:50 PM To: [EMAIL PROTECTED] Subject: [PHP] Secure transfer between servers Hi All- I'm designing a Portal environment for a very large number of organisations and it necessitates having a central server where users initially login and have access to a few functions. For the more complex functions where it is necessary to redirect them to another server, local to them, I have a problem. I can redirect fine but how do I validate that user? At the moment I'm passing through the username and password on the redirect URL but that is no good as Internet Explorer shows that URL in the status bar as it is redirecting. Someone looking over another person's shoulder could see their login and password. I'm looking for ideas on how to securely transfer users between these two separate websites? It is unfortunately not an option to have them login twice. Regards, Adam Whitehead Systems Developer - Computer Support and Maintenance Ph. (08) 8936 3164 E-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] URGENT: Can PHP on Linux deal with Access DB?
I'm interested in knowing how to do this too. If it's at all possible. Martin -Original Message- From: Marco Fioretti [mailto:[EMAIL PROTECTED]] Sent: Monday, November 05, 2001 9:36 AM To: [EMAIL PROTECTED] Subject: [PHP] URGENT: Can PHP on Linux deal with Access DB? Hello, I have been asked to maintain a PHP site hosted on NT/IIS, and have only an Apache/RH linux box to do test and development for it. So far it would be a no-brainer, being PHP as portable as is. The problem is that on the real server PHP should read and write an Access database via ODBC, and, for reasons not worth discussing here, I have no possibility to change this in the foreseable future. On the other hand, I really don't want to put online untested pages, cannot afford buying another NT/IIS box just for this purpose, and even less dual booting all the time, because of other Linux only projects I can't stop. The question, then, is if I can copy the Access database files on my Linux box and access them via PHP/ODBC/Apache on my PC to test completely my pages before upload: is this possible? How? Any other solution (like converting the access DB to Mysql or something, in such a way that if the PHP code works on MySQL on my box it will also work for sure on Access on the IIS server) is extremely welcome!! Thanks a lot in advance, Marco -- There is hopeful symbolism in the fact that flags do not wave in a vacuum. -- Arthur C. Clarke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: how about walking another way?
Tom Carter wrote: One observation on this.. there is a major difference between this and the the header(location:... header happens on the server side whereas the below is clientside and therefore unreliable. I know that netscape, particullarly on unix, is bad for ignoring this. header() is the only reliable way to do it! Yes - I read years ago that some browsers have problem honouring META redirects. Didn't know that still is the case ... I've tried this with Mozilla, Navigator 4.77 and Konqueror (in KDE 2.2.1) on Linux, all work. Martin S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Secure transfer between servers
For the more complex functions where it is necessary to redirect them to another server, local to them, I have a problem. If these machines are on a LAN together I would suggest you use database sessions. I.e. a table with records containing active sessions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Am i crazy? - Solved.
Tom Carter wrote: well when you were using echo $name to test then you were outputting html, hence no redirect... I've tried both w/ and w/o the echo. No difference. if your php is set up in such a way as to suppress errors then you wouldn't have been warned about it.. No, nothing is being output the page starts with ?. check that nothing else is being outputted, eg a space before the first ?. If that doesn't fix it turn error reporting down to its lowest level. But ... error_reporting(E_ALL) ... that did it. Apparently what the problem was is that in an included file there were two trailing spaces after the ?. Making that page end with ? fixed the redirect. Thanks to everyone. Martin S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Posting variables to a cgi without a form
Hey all, What is the best wat to post some variables to a cgi file and capture the output so I may strip out all the html tags, I want to replace a forms action with a php script which will mimic a forms post method, allowing me to better format the response, as at the moment the cgi is written in c and creates a whole html page which i need to strip back down to text before I can include it in my site. I know about the string and filesysytem functions, sort of looking for a quick example of passing the variables to the cgi and capturing the output. Any help much appreciated, Regards, Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Am i crazy?
Try putting exit; right after the header() function... -JAson Garber IonZoft.com At 06:54 PM 11/4/2001 +0100, Martin wrote: Jack Dempsey wrote: you're assigning, not checking for equality...use two ='s Still not redirecting ... Martin S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Posting variables to a cgi without a form
Thanks, I got to recompile php to do this (me too lazy), can't I do this with the network/filesystem functions? will keep this in mind though. Regards, Joseph -Original Message- From: Jason G. [mailto:[EMAIL PROTECTED]] Sent: Monday, 5 November 2001 4:14 PM To: Joseph Blythe Subject: Re: [PHP] Posting variables to a cgi without a form I believe cURL is great at this. Php supports cURL. go to curl.haxx.se -Jason Garber IoNZoft.com At 03:40 PM 11/5/2001 +1030, you wrote: Hey all, What is the best wat to post some variables to a cgi file and capture the output so I may strip out all the html tags, I want to replace a forms action with a php script which will mimic a forms post method, allowing me to better format the response, as at the moment the cgi is written in c and creates a whole html page which i need to strip back down to text before I can include it in my site. I know about the string and filesysytem functions, sort of looking for a quick example of passing the variables to the cgi and capturing the output. Any help much appreciated, Regards, Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]