Re: [PHP] Using Logical OR operator in IF statement???
I'm a bit confused by the logic used (your conditionals are looking for NOT -, but then the printed statement indicates you were looking for the -), but anywho ... try these on for size. if (substr($sString,-1,1)==-) { print You can't have a dash at the end of your string.; } if (substr($sString,0,1)==-) { print You can't have a dash at the beginning of your string.; } if ((substr($sString,-1,1)==-) or (substr($sString,0,1)==-)) { print you can't have a dash at the beginning or end of your string.; } (They reflect me thinking that you just had a logic mix-up, and I simplified the call to substr() ... the strlen() was overkill.) g.luck, ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden On Sat, 20 Oct 2001, Brad Melendy wrote: Hello, Ok, this works: if (substr($sString,(strlen($sString)-1)!=-)) { print You can't have a dash at the end of your string.; } and this works: if (substr($sString,0,1)!=-) { print You can't have a dash at the beginning of your string.; } But, this doesn't work for any case: if ((substr($sString,(strlen($sString)-1)!=-)) or (substr($sString,0,1)!=-)) { print you can't have a dash at the beginning or end of your string.; } What could be wrong? I've used a logical OR operator in the middle of an IF statement like this before, but for some reason, this just isn't working. Anyone got any ideas? I suppose I can just evaluate this with two different IF statements, but it seems like I shoud be able to do it in one and reduce duplicate code. Thanks very much in advance. .Brad -- 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] delete html
How can I delete html from an input type=text ? Signed Perl user converted :) An email post reply would come in ral handy. John -- 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] delete html
use the strip_tags() function to remove HTML tags from strings. http://www.zend.com/manual/function.strip-tags.php ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden On Sun, 21 Oct 2001, jtjohnston wrote: How can I delete html from an input type=text ? Signed Perl user converted :) An email post reply would come in ral handy. John -- 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] delete html
A fella could get converted real quick from Perl. Is there anything else I need to learn :) Is it that new that I can't find it on the function menu at www.php.net? Thanks, John Christopher William Wesley wrote: use the strip_tags() function to remove HTML tags from strings. http://www.zend.com/manual/function.strip-tags.php ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden On Sun, 21 Oct 2001, jtjohnston wrote: How can I delete html from an input type=text ? Signed Perl user converted :) An email post reply would come in ral handy. John -- 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] delete html
The main manual seems to be down right now, probably being rebuilt... Take a look at: http://www.php.net/manual/en/html/ strip_tags() is under String Functions, and has been around for a while. -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 3:33 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] delete html A fella could get converted real quick from Perl. Is there anything else I need to learn :) Is it that new that I can't find it on the function menu at www.php.net? Thanks, John Christopher William Wesley wrote: use the strip_tags() function to remove HTML tags from strings. http://www.zend.com/manual/function.strip-tags.php ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden On Sun, 21 Oct 2001, jtjohnston wrote: How can I delete html from an input type=text ? Signed Perl user converted :) An email post reply would come in ral handy. John -- 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]
[PHP] Why WAIT??? Refinance Now
We can help! Mortgage Rates have been slashed again! *Lower your monthly payment! *Shorten the term of your loan! *Reduce your interest rate! SAVE MONEY!!! NOW is the time to refinance... rates have NEVER been lower! We CAN assist everyone, even if you've been turned down before! Take just a minute to complete this form and a Loan Consultant will contact you at your convenience. http://www.firstmortgagedebt.com Your information is secure, confidential and you are under NO OBLIGATION for this free analysis. Since you have received this message you have either responded to one of our offers in the past or your address has been registered with us. If you wish to be removed please reply to: mailto:[EMAIL PROTECTED]?subject=remove ** -- 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] Thank You For Your Interest..........
Everyone uses ATM machines at one time or another, and if you are seriously looking for a way to generate income in a secure and consistent manner, the ATM business might be what you are looking for. We can show you how to Profit daily and be a part of this $ 375 Billion dollar industry. Our ATM program offers: Immediate Income, Proven Profitability, No Time Investment, 24 Hour Profit Centers, No Overhead, No Employees, High Demand, No Maintenance, No Experience or Selling Required, Tax Advantages, Unlimited Growth Potential ! High Traffic National Brand Name Fast Food Franchise Locations are currently available now and are included in this lucrative turn-key opportunity. Own your own ATM machines and Profit Daily! Timing is Everything ! For a full information package at no cost or obligation, ~ Call Anytime ~ (954) 481-1450 To Unsubscribe to our list, please reply with Unsubscribe ATM in the SUBJECT Line. -- 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: Annotated PHP Manual
DL Neil wrote: Khalid Hazmi wrote: How I can download the current Annotated PHP Manual??? There is no such thing... AFAIK. = Yasuo Ohgaki Yasuo: Yes there is (and VERY useful it is too), check out the range of PHP documentation available from http://www.php.net/docs.php Khalid: Unlike some other packages I don't think there's a zipped-up, ready-for-download version. I presume this is because the online version is always 'the latest' - but I don't know how often they update it (maybe that's somewhere on the page I just quoted!?) You could try something called a webwhacker to download the web of pages that make up the manual... I thought Khalid is talking about downloadable version of *Annotated* PHP Manual, not a usual HTML/PDF/etc version of PHP Manual. AFIAK, PHP Manual is written in DocBook/DSSSL format and HTML/PDF/etc version is generated from XML source which does not have any info about notes in online version of PHP Manual -- Yasuo Ohgaki _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.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] Online Manual?
What happened with the online annotated manual? Going to /manual/en (from docs.php) just returns the index to the directory with manual.php in it (and some others). Something's broken I think. I can no longer hit http://www.php.net/function and get the annotated page returned. All it returns now is a search result, and clicking on any of the returned links doesn't seem to work either (it just re-searches that link again) -- H | Life is the art of drawing without an eraser. - John Gardner + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 Director of Internet Operations / SysAdmin. 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.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] enable truetype string function in gd
Greetings, Does anyone know what it's going to take to get access to the function imagettftext() in PHP 4.0.6?! My eyes are bloodshot right about now. Seems like I have everything but the kitchen sink enabled, but no matter what I do I can't get ttf+gd+php functioning together. % egrep '(true|free)type' ~root/php_configure.log checking whether to enable truetype string function in gd... no checking for freetype(2)... yes I've tried building gd itself with either freetype (1) or freetype2, both produce the same result in the output of PHP's ./configure -- and, by the way, gd builds with either freetype or freetype2 just fine. Their locations are: /usr/local/include/freetype2 /usr/include/freetype I've tried feeding php's configure any one of /usr, /usr/local, /usr/local/include, /usr/include/freetype, /usr/local/include/freetype2 and none work as far as getting `truetype string function' to give me a `yes'. I know someone has been through this before.. what did you do to fix it? :-) Maybe I'm just tired.. or suicidal. -- Brian Clark | OpenPGP 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]
[PHP] php.ini
pane teda c:/php voi c:/windows -- 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] Odd is_int() behaviour
I have the following snippet in my file: if ($PATH_INFO == ) { $PATH_INFO = /; } echo PATH_INFO: $PATH_INFObr\n; // All we want is the fist element, call it $section list($section) = explode('/', substr($PATH_INFO,1)); if (is_int($section)) { echo section: $sectionbr\n; } else { echo Invalid section (NON_INT: $section)br\n; } Um, why does it fail when I hit the script with any INT? For example: /script/1 fails. Is $section not an INT when parsed? -- H | Life is the art of drawing without an eraser. - John Gardner + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 Director of Internet Operations / SysAdmin. 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.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] Arrays in form
Hi all How can i implement a hotmail-inbox like checkbox functionality? thanks in adv Regards Srinivasan Ranganathan Do You Yahoo!? Send a newsletter, share photos files, conduct polls, organize chat events. Visit http://in.groups.yahoo.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] Thick arc with PHP
Hi there, How it would be possible to draw a thich arc with PHP GD? You can see a picture here about thing I mean: http://www.pilotmedia.fi/xfiles/circle.jpg ImageArc -function is just what I need, but it makes all arcs only 1 pixel width. Any ideas? Cheers, - Ville -- 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 is filerpos, filelen and subfile
This is really strange, found this function someware (cant remember where) and it works. What I cant find is any reference to filerpos, filelen or subfile on the php website! They are not functions I define in any inc files. Anyone know where these are documented? Ben function get_file_ext($file) { $i = filerpos($file,.); if (!$i) { return ; } $l = filelen($file) - $i; $ext = subfile($file,$i+1,$l); return filetolower( $ext ); } ** * Ben Edwards+352 091 429995 * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * ** -- 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] bug in str_replace() ?
Bug in str_replace(), PHP 4.0.6 $text = hello world; $out = str_replace( , ,$text); echo $out; Expected output: hello world Actual output: hello world Of course, this is what happens if str_replace() does replacements on input, but not on the soon-to-be output it is working on. Is this to be expected, or would it be ok to modify the functionality of str_replace()? /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] Re: bug in str_replace() ?
[EMAIL PROTECTED] (Martin Lindhe) wrote: Bug in str_replace(), PHP 4.0.6 $text = hello world; $out = str_replace( , ,$text); echo $out; Expected output: hello world Actual output: hello world Of course, this is what happens if str_replace() does replacements on input, but not on the soon-to-be output it is working on. Is this to be expected, or would it be ok to modify the functionality of str_replace()? you should put it in a loop or something to get what you want. -- Henrik Hansen -- 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: bug in str_replace() ?
Martin Lindhe wrote: Bug in str_replace(), PHP 4.0.6 $text = hello world; $out = str_replace( , ,$text); echo $out; Expected output: hello world Actual output: hello world Of course, this is what happens if str_replace() does replacements on input, but not on the soon-to-be output it is working on. Is this to be expected, or would it be ok to modify the functionality of str_replace()? Huh? It did exactly what you asked to do. You had three spaces, and you requested that two be replaced by one. So, you went from three spaces to two spaces, as two of the three were combined into one. I don't understand why you expected to end up with one space. Can you elaborate please? Thanks, Chris -- 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: PHP/CGI problem: #!/path/php at top of CGI script appears in output
Hi, Thanks Stefan for your answer First, I'll explain why I want to use php in cgi I'ts a simple reason, some users want to use php without safemode (which is required with Apache due to safety problems). So I want to use php in cgi mode with suexec. I've tryed your solution, it works in all non-cgi directory But it doesn't work in cgi directory with suexec or not If I put #/usr/local/bin/php in the script, the script work but we can see #/usr/local/bin/php at the top. If I don't put it, there is an 500 error (Internal Server Error) In error_log, we can see these lines [Sun Oct 21 17:30:10 2001] [error] (8)Exec format error: exec of /home/webbourse/cgi-bin/php.cphp failed [Sun Oct 21 17:30:10 2001] [error] [client 212.103.7.98] Premature end of script headers: /home/webbourse/cgi-bin/php.cphp Someone has an idea Thanks Philippe Stefan Siefert writes: Hi @all.. I'm not sure if this can fix (or explain) your problem (cause I didn't tried it in lack of time) but theoretical it could be :). I think you only need the #!/usr/local/bin/php if you would like to run scripts from the bash, or as a real cgi. But I think, there could be another solution .. compile your php as cgi like you did and add these lines in your httpd.conf ScriptAlias /php/ /usr/local/bin/ AddType application/x-httpd-php .php .phtml .cgi Action application/x-httpd-php /php/php This should also launch the cgi - version of php, but doesn't requires the #! line in the scripts. I'm not sure, but it should work. Hope this helps you, Stefan Siefert - Original Message - From: Dave Goodrich [EMAIL PROTECTED] To: Philippe [EMAIL PROTECTED] Cc: php-general [EMAIL PROTECTED]; php-install [EMAIL PROTECTED] Sent: Saturday, October 20, 2001 6:05 PM Subject: [PHP-INST] Re: [PHP] PHP/CGI problem: #!/path/php at top of CGI script appears in output It's not you. I just built a bare cgi version of php, nothing but './configure' and got the same result. I used this simple script to be sure I was in fact running the cgi binary and it showed I was. info.cgi #!/usr/local/bin/php ?php phpinfo(); ? I got the correct info page, but with the #!/usr/local/bin/php at the top as you stated. Odd, but I've never used the cgi version so other than confirming your problem I am afraid I'm no help. DAve On Sat, Oct 20, 2001 at 03:31:06PM +, Philippe wrote: Hi, I'll synthetize the problem with the response I have givven to Curt. I've FreeBSD 4.2/Apache 1.3.9/PHP 4.0.6 I've installed PHP in Apache, it works very well I need to have too PHP 4.0.6 in CGI mode (With Suexec but I don't think it's the problem) but I've a problem. In CGI mode, the path of PHP is always written at the top of the result I'll take for example this script which is in the cgi-bin with the execute mod (755), the extension is .cgi : #!/usr/local/bin/php ? print Hello World; ? When the file is called by the browser, the result is : #!/usr/local/bin/php Hello World Does someone know the problem and the solution ? Have I forgotten something ? I think that's a misconfiguration in PHP Thanks for your help Philippe -- 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] -- My other computer is your Windows machine... -- PHP Install 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] AW: PHP/CGI problem: #!/path/php at top of CGI script appears in output
Hi, well I do understand your needing. First a question. What are your compile options, e.g. your configure call? Do you use --enable-discard-path ? If not, try this. You need this option to run Phpscripts from cgi-bin folders!!! Greetings, Stefan Siefert -Ursprüngliche Nachricht- Von: Philippe [mailto:[EMAIL PROTECTED]] Gesendet: Sonntag, 21. Oktober 2001 17:53 An: Stefan Siefert; php-general; php-install Betreff: Re: PHP/CGI problem: #!/path/php at top of CGI script appears in output Hi, Thanks Stefan for your answer First, I'll explain why I want to use php in cgi I'ts a simple reason, some users want to use php without safemode (which is required with Apache due to safety problems). So I want to use php in cgi mode with suexec. I've tryed your solution, it works in all non-cgi directory But it doesn't work in cgi directory with suexec or not If I put #/usr/local/bin/php in the script, the script work but we can see #/usr/local/bin/php at the top. If I don't put it, there is an 500 error (Internal Server Error) In error_log, we can see these lines [Sun Oct 21 17:30:10 2001] [error] (8)Exec format error: exec of /home/webbourse/cgi-bin/php.cphp failed [Sun Oct 21 17:30:10 2001] [error] [client 212.103.7.98] Premature end of script headers: /home/webbourse/cgi-bin/php.cphp Someone has an idea Thanks Philippe Stefan Siefert writes: Hi @all.. I'm not sure if this can fix (or explain) your problem (cause I didn't tried it in lack of time) but theoretical it could be :). I think you only need the #!/usr/local/bin/php if you would like to run scripts from the bash, or as a real cgi. But I think, there could be another solution .. compile your php as cgi like you did and add these lines in your httpd.conf ScriptAlias /php/ /usr/local/bin/ AddType application/x-httpd-php .php .phtml .cgi Action application/x-httpd-php /php/php This should also launch the cgi - version of php, but doesn't requires the #! line in the scripts. I'm not sure, but it should work. Hope this helps you, Stefan Siefert - Original Message - From: Dave Goodrich [EMAIL PROTECTED] To: Philippe [EMAIL PROTECTED] Cc: php-general [EMAIL PROTECTED]; php-install [EMAIL PROTECTED] Sent: Saturday, October 20, 2001 6:05 PM Subject: [PHP-INST] Re: [PHP] PHP/CGI problem: #!/path/php at top of CGI script appears in output It's not you. I just built a bare cgi version of php, nothing but './configure' and got the same result. I used this simple script to be sure I was in fact running the cgi binary and it showed I was. info.cgi #!/usr/local/bin/php ?php phpinfo(); ? I got the correct info page, but with the #!/usr/local/bin/php at the top as you stated. Odd, but I've never used the cgi version so other than confirming your problem I am afraid I'm no help. DAve On Sat, Oct 20, 2001 at 03:31:06PM +, Philippe wrote: Hi, I'll synthetize the problem with the response I have givven to Curt. I've FreeBSD 4.2/Apache 1.3.9/PHP 4.0.6 I've installed PHP in Apache, it works very well I need to have too PHP 4.0.6 in CGI mode (With Suexec but I don't think it's the problem) but I've a problem. In CGI mode, the path of PHP is always written at the top of the result I'll take for example this script which is in the cgi-bin with the execute mod (755), the extension is .cgi : #!/usr/local/bin/php ? print Hello World; ? When the file is called by the browser, the result is : #!/usr/local/bin/php Hello World Does someone know the problem and the solution ? Have I forgotten something ? I think that's a misconfiguration in PHP Thanks for your help Philippe -- 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] -- My other computer is your Windows machine... -- PHP Install 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] Download the whole directory
Hi, I know I can use the following code to download a single file, but how can I download the whole directory by using the following code. Please help.. (I am using PHP Apache) ?php Header(Content-disposition: attachment; filename=\Quickstep.doc\); Header(Content-type: application/download); readfile($path/Quickstep.doc'); ? Thank you Mark -- 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] Download the whole directory
Hi Mark, I don't think you can download an entire directory at once. You'll probably have to get a directory listing, and download each file in that directory. I'm not sure though. Good luck, Tyler - Original Message - From: Mark Lo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 21, 2001 12:16 PM Subject: [PHP] Download the whole directory Hi, I know I can use the following code to download a single file, but how can I download the whole directory by using the following code. Please help.. (I am using PHP Apache) ?php Header(Content-disposition: attachment; filename=\Quickstep.doc\); Header(Content-type: application/download); readfile($path/Quickstep.doc'); ? Thank you Mark -- 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] Tag {HEADER} not found in template loginform.inc.php
Hi All, Tag {HEADER} not found in template loginform.inc.php. What could be the error of this error-message. The tag exist in row 1 loginform.inc.php of like: div align=center b{HEADER}/b TIA Ron -- 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 is filerpos, filelen and subfile
Forget this one, i'me being stupid. At 04:26 P 21/10/01, Ben Edwards wrote: This is really strange, found this function someware (cant remember where) and it works. What I cant find is any reference to filerpos, filelen or subfile on the php website! They are not functions I define in any inc files. Anyone know where these are documented? ** * Ben Edwards+352 091 429995 * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * ** -- 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] Download the whole directory
U can either use something to zip the whole directory up, and then download that 1 zip file. OR You could use some JScript or something to make X number of windows popup, each with a file to be saved... Other than that I'm not sure what u can do... Unless you generate GRX files or similar things that are read by programs like Getright... Just my comments Andrew - Original Message - From: Mark Lo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 21, 2001 6:16 PM Subject: [PHP] Download the whole directory Hi, I know I can use the following code to download a single file, but how can I download the whole directory by using the following code. Please help.. (I am using PHP Apache) ?php Header(Content-disposition: attachment; filename=\Quickstep.doc\); Header(Content-type: application/download); readfile($path/Quickstep.doc'); ? Thank you Mark -- 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: Download the whole directory
No. You cannot initiate multiple transactions that way (at least not without considerable glue outside of PHP, such as JavaScript etc to cause the browser to initiate multiple transactions; but it cannot be done directly from the server side as the client only asked for one file). You could zip or tar the directory up and send it to the client in one file, one transaction. Mark Lo wrote: Hi, I know I can use the following code to download a single file, but how can I download the whole directory by using the following code. Please help.. (I am using PHP Apache) ?php Header(Content-disposition: attachment; filename=\Quickstep.doc\); Header(Content-type: application/download); readfile($path/Quickstep.doc'); ? Thank you Mark -- 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: [PHP-DEV] What's wrong with my PHP
Please ask support questions at [EMAIL PROTECTED] And, check what type '$this-a' is. It's probably not an array. - Markus On Sun, Oct 21, 2001 at 05:33:25PM +0800, fatbobman wrote : when i try to open add a record to my db.. php tell me Warning: Cannot use a scalar value as an array in c:\program files\apache group\apache\htdocs\textdb\tdb.inc.php on line 127 127: $this-a[] = array($fieldname, $fieldtype); why ... my php.ini's wrong ...? how to edit it i'm using php 4 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]
[PHP] Forms and Netscape -- spacing problem -- Help!
I have wrapped around my web page, my form tag -- my pages are auto-expanding -- that is, always flush with the left, right, top and bottom of the users browser... in IE - the form tag (wrapped around the page) doesn't cause a problem -- however, in NS (4x - 6x) there is some additional space at the *bottom* of my page -- about an 1 (of white space.) Nesting the form tag deeper within my web page *is not* an option -- as the spacing caused by the form tag in NS jacks up other things -- so worse comes to worse, I'd rather it produce the white space at the bottom, than to influence my inner page design. So my question is; Can I programmatically (through PHP) make it so that (with the form tag where it is) in NS, the bottom table is flush with the bottom of the browser (hence, eliminating the extra space cause by the form tag)? Thanks Jason [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] Using Logical OR operator in IF statement???
That's odd ... the code I gave you I tested prior to pasting into my email, and it worked fine ... and still does. I'm not aware of any bugs with logical or in any versions of PHP. If this doesn't work for you, I'm not sure where to go. (It works on my server ... PHP 4.0.6-5 ... and my personal preference for || over or is reflected :) ?php $sString = foo-; if( substr( $sString, 0, 1 ) != - ){ print( no - at beginning of stringbr ); } if( substr( $sString, -1, 1 ) != - ){ print( no - at end of stringbr ); } if( ( substr( $sString, 0, 1 ) != - ) || ( substr( $sString, -1, 1 ) != - ) ){ print( - missing from beginning or end of stringbr ); } ? g.luck, ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden On Sun, 21 Oct 2001, Brad Melendy wrote: Thanks Chrisopher, Yeah, I was a tad confused. What I wanted to say in my statement was really this: if ((substr($sString,-1,1)!=-) or (substr($sString,0,1)!=-)) { print do this if there isn't a dash at the beginning or end of your string; } else { print you can't have a dash at the beginning or end of your string.; } I like the simplifying of the statement by counting backwards regardless of the string length. But I still can't get the darn thing to work if I use: if ((substr($sString,-1,1)!=-) or (substr($sString,0,1)!=-)) It only works if I use (substr($sString,-1,1)!=-) or (substr($sString,0,1)!=-) by themselves. That only catches one half of what I am trying to do though. I get the results I expect indivitually so that -hello fails with one part of the statement and hello- fails with the other part, but when I use them together with the OR operator, it doesn't pick up either case, -hello or hello-. I think I'm going to have to resort to evaluating the string with more than just the one IF statement and use an ELSEIF and duplicate some code to make this work. Thanks very much in advance. Brad Christopher William Wesley [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm a bit confused by the logic used (your conditionals are looking for NOT -, but then the printed statement indicates you were looking for the -), but anywho ... try these on for size. if (substr($sString,-1,1)==-) { print You can't have a dash at the end of your string.; } if (substr($sString,0,1)==-) { print You can't have a dash at the beginning of your string.; } if ((substr($sString,-1,1)==-) or (substr($sString,0,1)==-)) { print you can't have a dash at the beginning or end of your string.; } (They reflect me thinking that you just had a logic mix-up, and I simplified the call to substr() ... the strlen() was overkill.) g.luck, ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden On Sat, 20 Oct 2001, Brad Melendy wrote: Hello, Ok, this works: if (substr($sString,(strlen($sString)-1)!=-)) { print You can't have a dash at the end of your string.; } and this works: if (substr($sString,0,1)!=-) { print You can't have a dash at the beginning of your string.; } But, this doesn't work for any case: if ((substr($sString,(strlen($sString)-1)!=-)) or (substr($sString,0,1)!=-)) { print you can't have a dash at the beginning or end of your string.; } What could be wrong? I've used a logical OR operator in the middle of an IF statement like this before, but for some reason, this just isn't working. Anyone got any ideas? I suppose I can just evaluate this with two different IF statements, but it seems like I shoud be able to do it in one and reduce duplicate code. Thanks very much in advance. .Brad -- 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: Using Logical OR operator in IF statement???
Hi Brad, This worked for me: ? if ((substr($sString, 0, (strlen($sString)-1) == -)) || (substr($sString, 0, 1) == -)) { echo you can't have a dash at the beginning or end of your string.; } ? .. but I'd tend to go for a regex as a solution to what you're after, which involves less code: ? if (preg_match(/^-|-$/s, $string)) { echo You cannot have a \-\ character at the beginning or end of your string.; } else { echo Whatever; } ? Just my thoughts... James Brad Melendy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Ok, this works: if (substr($sString,(strlen($sString)-1)!=-)) { print You can't have a dash at the end of your string.; } and this works: if (substr($sString,0,1)!=-) { print You can't have a dash at the beginning of your string.; } But, this doesn't work for any case: if ((substr($sString,(strlen($sString)-1)!=-)) or (substr($sString,0,1)!=-)) { print you can't have a dash at the beginning or end of your string.; } What could be wrong? I've used a logical OR operator in the middle of an IF statement like this before, but for some reason, this just isn't working. Anyone got any ideas? I suppose I can just evaluate this with two different IF statements, but it seems like I shoud be able to do it in one and reduce duplicate code. Thanks very much in advance. .Brad -- 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: Using Logical OR operator in IF statement???
Thanks James, I tried a regular expression comparison first, but it was eluding me. I'm new to PHP (trying to convert form ASP) and part of this is me trying to convert my ASP/VBSCRIPT to PHP. ;-) I actually have a FOR loop evaluated when the conditions of the IF statement are met, and I suspect that is messing things up. Here's my entire code and I've used your expression comparison instead but it still fails to find the - unless I split things up and check either ONLY for the '-' at the beginning or the end, but not both in the same line: function StringCheck($sString) { if (preg_match(/^-|-$/s, $sString)) { for ( $counter=0; $counter strlen($sString); $counter++ ) { $nChar = ord(strtolower(substr($sString, $counter, 1))); if (($nChar 47 And $nChar 58) or ($nChar 96 And $nChar 123) or ($nChar == 45)) { $result = TRUE; } else { $result = FALSE; break; } } } else { $result = FALSE; } return $result; } //End Function StringCheck Maybe you see something I don't. I can't get over the fact that if I check for just the front, or the end, it works, but if I check for both the front and end of the string in the same line with the OR, it fails. :-\ Thanks in advance for any thing you might notice. Brad Yz James [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Brad, This worked for me: ? if ((substr($sString, 0, (strlen($sString)-1) == -)) || (substr($sString, 0, 1) == -)) { echo you can't have a dash at the beginning or end of your string.; } ? .. but I'd tend to go for a regex as a solution to what you're after, which involves less code: ? if (preg_match(/^-|-$/s, $string)) { echo You cannot have a \-\ character at the beginning or end of your string.; } else { echo Whatever; } ? Just my thoughts... James Brad Melendy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Ok, this works: if (substr($sString,(strlen($sString)-1)!=-)) { print You can't have a dash at the end of your string.; } and this works: if (substr($sString,0,1)!=-) { print You can't have a dash at the beginning of your string.; } But, this doesn't work for any case: if ((substr($sString,(strlen($sString)-1)!=-)) or (substr($sString,0,1)!=-)) { print you can't have a dash at the beginning or end of your string.; } What could be wrong? I've used a logical OR operator in the middle of an IF statement like this before, but for some reason, this just isn't working. Anyone got any ideas? I suppose I can just evaluate this with two different IF statements, but it seems like I shoud be able to do it in one and reduce duplicate code. Thanks very much in advance. .Brad -- 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] Form Question
I got a form that a user fills out. When they hit submit they are transfered to a PHP page that verifies their data. If a problem is found (They forgot to enter an e-mail address) the PHP sends them back to the original form with the field they forgot to fill out highlighted in red. Unfortunately all there entries are wiped out and they have to re-enter everything. Any easy way to keep there original entries? -- 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] Form Question
well all of the entries are passed via post or get to your form handler (obviously). So just pass them back when you re-call the form. then put in input type=text name=firstname value=?=$firstname? in the form or something like that anyway. - seb -Original Message- From: Chip Landwehr [mailto:[EMAIL PROTECTED]] Sent: 21 October 2001 20:49 To: [EMAIL PROTECTED] Subject: [PHP] Form Question I got a form that a user fills out. When they hit submit they are transfered to a PHP page that verifies their data. If a problem is found (They forgot to enter an e-mail address) the PHP sends them back to the original form with the field they forgot to fill out highlighted in red. Unfortunately all there entries are wiped out and they have to re-enter everything. Any easy way to keep there original entries? -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/2001 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/2001 -- 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] Form Question
I got that but the passing back I'm having a problem with. This is waht I got: if ($T3==){header (Location: new_narrative.php?FilledName=No);} How do I change this to include a Post? Seb Frost [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... well all of the entries are passed via post or get to your form handler (obviously). So just pass them back when you re-call the form. then put in input type=text name=firstname value=?=$firstname? in the form or something like that anyway. - seb -Original Message- From: Chip Landwehr [mailto:[EMAIL PROTECTED]] Sent: 21 October 2001 20:49 To: [EMAIL PROTECTED] Subject: [PHP] Form Question I got a form that a user fills out. When they hit submit they are transfered to a PHP page that verifies their data. If a problem is found (They forgot to enter an e-mail address) the PHP sends them back to the original form with the field they forgot to fill out highlighted in red. Unfortunately all there entries are wiped out and they have to re-enter everything. Any easy way to keep there original entries? -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/2001 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/2001 -- 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] enable truetype string function in gd
Does anyone know what it's going to take to get access to the function imagettftext() in PHP 4.0.6?! My eyes are bloodshot right about now. http://database.sourceforge.net/documentation/installing_apache_with_gd_zlib_png_jpg_tiff_pdf_support.html -- 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] Form Question
I can't do that because the form is to big and there is a limit to how much data you can send via the URL bar. Any other ideas? Seb Frost [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... if ($T3==){header (Location: new_narrative.php?FilledName=Novariable1=hellovariable2=goodbye);} etc etc - seb -Original Message- From: Chip Landwehr [mailto:[EMAIL PROTECTED]] Sent: 21 October 2001 21:03 To: [EMAIL PROTECTED] Subject: Re: [PHP] Form Question I got that but the passing back I'm having a problem with. This is waht I got: if ($T3==){header (Location: new_narrative.php?FilledName=No);} How do I change this to include a Post? Seb Frost [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... well all of the entries are passed via post or get to your form handler (obviously). So just pass them back when you re-call the form. then put in input type=text name=firstname value=?=$firstname? in the form or something like that anyway. - seb -Original Message- From: Chip Landwehr [mailto:[EMAIL PROTECTED]] Sent: 21 October 2001 20:49 To: [EMAIL PROTECTED] Subject: [PHP] Form Question I got a form that a user fills out. When they hit submit they are transfered to a PHP page that verifies their data. If a problem is found (They forgot to enter an e-mail address) the PHP sends them back to the original form with the field they forgot to fill out highlighted in red. Unfortunately all there entries are wiped out and they have to re-enter everything. Any easy way to keep there original entries? -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/2001 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/2001 -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/2001 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/2001 -- 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] Form Question
Chip Landwehr wrote: I can't do that because the form is to big and there is a limit to how much data you can send via the URL bar. Any other ideas? Use cookies. -- 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] PHP/CGI problem: #!/path/php at top of CGI script appears in output
Nope it fails when he removes the line. It fails on me as well, I tried it. Also note I did say that the ouput of phpinfo() was correct. The output showed the page had been handled by the php cgi binary, not the module. The module has a large config line and several extensions configured in, the cgi binary was compiled with nothing but ./configure and the info page confirms this. So it seems Apache is handling everything correct, the page gets passed to the proper php binary, and the result is correctly served back to the client. DAve On Sun, Oct 21, 2001 at 12:18:07PM -0500, Brian Mauter wrote: Seems to me that the problems is that you have two instances of PHP going at the same time. The first is the one compiled into Apache and the second is the cgi module. My bet is that the PHP compiled into Apache is catching it first (maybe you told all .cgi files to be parsed by the PHP parser?). In that case, the first line would be treated as HTML output, not PHP. This would be the reason you get that line in all of your scripts. Here's a test: remove that line from your file and then try it. If it continues to work, I would seriously suspect that the built-in Apache-PHP parser is handling your .cgi files. -Brian -Original Message- From: Dave Goodrich [mailto:[EMAIL PROTECTED]] * snip info.cgi #!/usr/local/bin/php ?php phpinfo(); ? -- My other computer is your Windows machine... -- 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] enable truetype string function in gd
Hi speedboy, @ 4:24:56 PM on 10/21/2001, speedboy wrote: Does anyone know what it's going to take to get access to the function imagettftext() in PHP 4.0.6?! My eyes are bloodshot right about now. http://database.sourceforge.net/documentation/installing_apache_with_gd_zlib_png_jpg_tiff_pdf_support.html I appreciate the RTFM, but that didn't tell me anything that I didn't already know. :-) Done that, been there, isn't working for me. -- -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] enable truetype string function in gd
@ 5:33:52 PM on 10/21/2001, Brian Clark wrote: Does anyone know what it's going to take to get access to the function imagettftext() in PHP 4.0.6?! My eyes are bloodshot right about now. http://database.sourceforge.net/documentation/installing_apache_with_gd_zlib_png_jpg_tiff_pdf_support.html I appreciate the RTFM, but that didn't tell me anything that I didn't already know. :-) Done that, been there, isn't working for me. Sigh.. I changed the order of the configure arguments (ttf stuff last, right before --with-apache) and it worked!? Bug? -- -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]
[PHP] Re: Using Logical OR operator in IF statement???
Ok, it works!! Thanks to everyone for their suggestions and answers. This group is a great resourse. Thanks again ...Brad Brad Melendy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thanks James, I tried a regular expression comparison first, but it was eluding me. I'm new to PHP (trying to convert form ASP) and part of this is me trying to convert my ASP/VBSCRIPT to PHP. ;-) I actually have a FOR loop evaluated when the conditions of the IF statement are met, and I suspect that is messing things up. Here's my entire code and I've used your expression comparison instead but it still fails to find the - unless I split things up and check either ONLY for the '-' at the beginning or the end, but not both in the same line: function StringCheck($sString) { if (preg_match(/^-|-$/s, $sString)) { for ( $counter=0; $counter strlen($sString); $counter++ ) { $nChar = ord(strtolower(substr($sString, $counter, 1))); if (($nChar 47 And $nChar 58) or ($nChar 96 And $nChar 123) or ($nChar == 45)) { $result = TRUE; } else { $result = FALSE; break; } } } else { $result = FALSE; } return $result; } //End Function StringCheck Maybe you see something I don't. I can't get over the fact that if I check for just the front, or the end, it works, but if I check for both the front and end of the string in the same line with the OR, it fails. :-\ Thanks in advance for any thing you might notice. Brad Yz James [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Brad, This worked for me: ? if ((substr($sString, 0, (strlen($sString)-1) == -)) || (substr($sString, 0, 1) == -)) { echo you can't have a dash at the beginning or end of your string.; } ? .. but I'd tend to go for a regex as a solution to what you're after, which involves less code: ? if (preg_match(/^-|-$/s, $string)) { echo You cannot have a \-\ character at the beginning or end of your string.; } else { echo Whatever; } ? Just my thoughts... James Brad Melendy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Ok, this works: if (substr($sString,(strlen($sString)-1)!=-)) { print You can't have a dash at the end of your string.; } and this works: if (substr($sString,0,1)!=-) { print You can't have a dash at the beginning of your string.; } But, this doesn't work for any case: if ((substr($sString,(strlen($sString)-1)!=-)) or (substr($sString,0,1)!=-)) { print you can't have a dash at the beginning or end of your string.; } What could be wrong? I've used a logical OR operator in the middle of an IF statement like this before, but for some reason, this just isn't working. Anyone got any ideas? I suppose I can just evaluate this with two different IF statements, but it seems like I shoud be able to do it in one and reduce duplicate code. Thanks very much in advance. .Brad -- 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] Form Question
Why not just post to the same script, then you don't have to worry about this? Hth, -AD Chip Landwehr [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I can't do that because the form is to big and there is a limit to how much data you can send via the URL bar. Any other ideas? -- 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] Form Question
On Sun, 21 Oct 2001, Chip Landwehr wrote: if ($T3==){header (Location: new_narrative.php?FilledName=No);} How do I change this to include a Post? You can put it back on as a query string (kinda dirty, but you can't POST it back). ?php $myQueryString = FilledName=No; while( list( $key, $val ) = each( $HTTP_POST_VARS ) ){ $myQueryString .= . $key . = . $val; } if( $T3 == ){ header( Location: new_narrative.php? . $myQueryString ); } ? ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden -- 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] Form Question
ok, several different solutions, best being: 1. use sessions. this is probably the simplest, most robust way of doing it, after you've become familiar with sessions. 2. as someone mentioned before, use one page that posts to itself. this would be easier than using sessions, but not as powerful. jack -Original Message- From: Christopher William Wesley [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 6:46 PM To: [EMAIL PROTECTED] Cc: Chip Landwehr Subject: Re: [PHP] Form Question On Sun, 21 Oct 2001, Chip Landwehr wrote: if ($T3==){header (Location: new_narrative.php?FilledName=No);} How do I change this to include a Post? You can put it back on as a query string (kinda dirty, but you can't POST it back). ?php $myQueryString = FilledName=No; while( list( $key, $val ) = each( $HTTP_POST_VARS ) ){ $myQueryString .= . $key . = . $val; } if( $T3 == ){ header( Location: new_narrative.php? . $myQueryString ); } ? ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden -- 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] IDE for Linux
Can you guys give me some hints of IDEs for programming PHP in Linux? thanks _ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br -- 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] generating charts/graphics
I'm working on (actually I'm almost finished) on a very nice ad management system. It has a script that generates a very informative report, in HTML. But I wanted something more... like some comparative chart... or pie chart... can anyone give some hints, where can I find info on this? Is this easy to do in PHP? Can I get something already implemented? Some class or something? thanks... _ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br -- 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] 4.2.0-dev+Apache/2.0.27-dev
Hi all. i tried to compile new Apache/2.0.27-dev PHP 4.2.0-dev (both get from CVS) On FreeBSD-stable 4.4 (CVS) when i start apache with php module , i get this: Cannot load /usr/local/apache2/modules/libphp4.so into server: /usr/local/apache2/modules/libphp4.so: Undefined symbol "pthread_getspecific" i compile apache with both: mpm=threaded, mpm=prefork Alone apache runs well. but with PHP always the same problem. (also from apache version httpd-2_0_25-alpha) where i should correct the problem? is it FreeBSD problem ? thanks for help. Have a nice day. Jiri. -- 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] IDE for Linux
You can try ActiveState's Komodo. http://www.activestate.com/Products/ASPN_Komodo/ It supports PHP, Perl, Python, etc., has a debugger, pretty cool editor, etc. It's only a 1.0 (at least the last time I used it), but was pretty solid for a 1.0. What are you looking for in an IDE? Instead of an IDE I use Visual SlickEdit. It's a commercial editor, but it supports PHP, and does a lot of things an IDE does (it has projects workspaces, you can do your builds in it, awesome editor, stuff like function name completion, shows you what params the function takes, etc.). -Original Message- From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 4:36 PM To: [EMAIL PROTECTED] Subject: [PHP] IDE for Linux Can you guys give me some hints of IDEs for programming PHP in Linux? thanks _ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br -- 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] Submit
I got a form (form.php) that recalls itself when you hit submit to verify all the fields. If all the fields are good, I need it to automatically post to a new page. Anyway to do this? -- 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] IDE for Linux
At 17:20 21/10/01 -0700, you wrote: You can try ActiveState's Komodo. http://www.activestate.com/Products/ASPN_Komodo/ It supports PHP, Perl, Python, etc., has a debugger, pretty cool editor, etc. It's only a 1.0 (at least the last time I used it), but was pretty solid for a 1.0. What are you looking for in an IDE? Instead of an IDE I use Visual SlickEdit. It's a commercial editor, but it supports PHP, and does a lot of things an IDE does (it has projects workspaces, you can do your builds in it, awesome editor, stuff like function name completion, shows you what params the function takes, etc.). exactly what I'm looking for... it's not for me really... It's for a friend... I develop in Win32... and use HomeSite... I tried this Komodo... but never saw this SlickEdit... does it have a win32 version??? _ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br -- 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] Submit
sure, have to states for your script, one is the normal blank form, the second is the check. in your check, validate the data. if its not good, print the form out again with those values already filled in if they apply. if it is good, redirect to a new page using header(); http://php.net/header be careful not to output any before you make this header call. jack -Original Message- From: Chip Landwehr [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 8:29 PM To: [EMAIL PROTECTED] Subject: [PHP] Submit I got a form (form.php) that recalls itself when you hit submit to verify all the fields. If all the fields are good, I need it to automatically post to a new page. Anyway to do this? -- 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] Submit
But won't using a header kill all the form data? Thought you had to use post for that? Jack Dempsey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... sure, have to states for your script, one is the normal blank form, the second is the check. in your check, validate the data. if its not good, print the form out again with those values already filled in if they apply. if it is good, redirect to a new page using header(); http://php.net/header be careful not to output any before you make this header call. jack -Original Message- From: Chip Landwehr [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 8:29 PM To: [EMAIL PROTECTED] Subject: [PHP] Submit I got a form (form.php) that recalls itself when you hit submit to verify all the fields. If all the fields are good, I need it to automatically post to a new page. Anyway to do this? -- 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] IDE for Linux
Visual SlickEdit is available on Linux, Win32, and about a dozen other platforms (except MacOS). I use it on both Windows and Linux (was one of the reasons I chose it, although now that I've used it, I have many others :) It's a great editor, worth every penny I spent on it. Komodo has a Win32 version as well. -Original Message- From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 5:31 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] IDE for Linux At 17:20 21/10/01 -0700, you wrote: You can try ActiveState's Komodo. http://www.activestate.com/Products/ASPN_Komodo/ It supports PHP, Perl, Python, etc., has a debugger, pretty cool editor, etc. It's only a 1.0 (at least the last time I used it), but was pretty solid for a 1.0. What are you looking for in an IDE? Instead of an IDE I use Visual SlickEdit. It's a commercial editor, but it supports PHP, and does a lot of things an IDE does (it has projects workspaces, you can do your builds in it, awesome editor, stuff like function name completion, shows you what params the function takes, etc.). exactly what I'm looking for... it's not for me really... It's for a friend... I develop in Win32... and use HomeSite... I tried this Komodo... but never saw this SlickEdit... does it have a win32 version??? _ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br -- 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] Submit
sorry chip, i'm so used to using sessions, i just kind of assumed you would :-) sessions will carry the data around.if you can't/won't use them, you could use curl to post the values along, but sessions are much more elegant for this kind of thing my $.02 jack -Original Message- From: Chip Landwehr [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 8:39 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Submit But won't using a header kill all the form data? Thought you had to use post for that? Jack Dempsey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... sure, have to states for your script, one is the normal blank form, the second is the check. in your check, validate the data. if its not good, print the form out again with those values already filled in if they apply. if it is good, redirect to a new page using header(); http://php.net/header be careful not to output any before you make this header call. jack -Original Message- From: Chip Landwehr [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 8:29 PM To: [EMAIL PROTECTED] Subject: [PHP] Submit I got a form (form.php) that recalls itself when you hit submit to verify all the fields. If all the fields are good, I need it to automatically post to a new page. Anyway to do this? -- 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] Submit
lol NP--actually I am using sessions-Will I have to declare each form variable as a session variable to do this? Jack Dempsey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... sorry chip, i'm so used to using sessions, i just kind of assumed you would :-) sessions will carry the data around.if you can't/won't use them, you could use curl to post the values along, but sessions are much more elegant for this kind of thing my $.02 jack -Original Message- From: Chip Landwehr [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 8:39 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Submit But won't using a header kill all the form data? Thought you had to use post for that? Jack Dempsey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... sure, have to states for your script, one is the normal blank form, the second is the check. in your check, validate the data. if its not good, print the form out again with those values already filled in if they apply. if it is good, redirect to a new page using header(); http://php.net/header be careful not to output any before you make this header call. jack -Original Message- From: Chip Landwehr [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 8:29 PM To: [EMAIL PROTECTED] Subject: [PHP] Submit I got a form (form.php) that recalls itself when you hit submit to verify all the fields. If all the fields are good, I need it to automatically post to a new page. Anyway to do this? -- 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] Submit
you could just declare one multidimensional array as a session var, then carry that aroundthat's easiest way i've found. jack -Original Message- From: Chip Landwehr [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 8:43 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Submit lol NP--actually I am using sessions-Will I have to declare each form variable as a session variable to do this? Jack Dempsey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... sorry chip, i'm so used to using sessions, i just kind of assumed you would :-) sessions will carry the data around.if you can't/won't use them, you could use curl to post the values along, but sessions are much more elegant for this kind of thing my $.02 jack -Original Message- From: Chip Landwehr [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 8:39 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Submit But won't using a header kill all the form data? Thought you had to use post for that? Jack Dempsey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... sure, have to states for your script, one is the normal blank form, the second is the check. in your check, validate the data. if its not good, print the form out again with those values already filled in if they apply. if it is good, redirect to a new page using header(); http://php.net/header be careful not to output any before you make this header call. jack -Original Message- From: Chip Landwehr [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 8:29 PM To: [EMAIL PROTECTED] Subject: [PHP] Submit I got a form (form.php) that recalls itself when you hit submit to verify all the fields. If all the fields are good, I need it to automatically post to a new page. Anyway to do this? -- 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] -- 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 or perl bug when execing php scripts?
I saw another post on this that got no response, I figure I should try again before filing another bug report. I've got some perl cgi scripts that I have to keep, and I need them to do some things in php that are already done in php, it's not really practical to rewrite either of these so it's all in the same language. So I need to execute a php script from the perl cgi. The php script works fine from a command line. It works fine from a command line as the webserver user. But it won't work from a perl cgi script. Here's what I've tried and the result of each. 1) put #!/usr/local/bin/php at the top of the php file call from perl with `/path/to/script arg1 arg2` Result: php returns No input file specified 2) left out #! in file call from perl with `/path/to/php /path/to/script arg1 arg2` Result: no arguments get passed to script 3) left out #! in file call from perl with `/path/to/php /path/to/script arg1 arg2` Result: php returns No input file specified 4) left out #! in file call from perl with `/path/to/php -f /path/to/script arg1 arg2` Result: php returns No input file specified Is this a bug? Am I doing something wrong here? This should work... -- Chad Cunningham [EMAIL PROTECTED] Well, once again my friend, we find that science is a two-headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is bad! Oh beware the other head of science, Arthur, it bites! -- 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] Form Question
For me, using FastTemplate calling back the same script is the best idea. Using flags, you can have a different response by using a different template, yet retain all the POST data. HTH, At 03:49 AM 10/22/2001, Chip Landwehr wrote: I got a form that a user fills out. When they hit submit they are transfered to a PHP page that verifies their data. If a problem is found (They forgot to enter an e-mail address) the PHP sends them back to the original form with the field they forgot to fill out highlighted in red. Unfortunately all there entries are wiped out and they have to re-enter everything. Any easy way to keep there original entries? -- 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] view *.php pages locally on NT?
Reductor [EMAIL PROTECTED] wrote in message news:003a01c15654$4d89c280$eb00a8c0@mum... How do I view these *.php pages locally. I'm using Windows NT and I have both MSIE (preferred) Netscape. http://miniserver.wxs.org Is the URL to the Miniserver Site Its a great little web server, havn't had a problem, also the easiest to setup, and you can install perl, php, and run isapi pages easilyalso just install mysql, set it up in php, and use mysql :D Thanks (also to Martin for his similar idea). I will look into that server. I've installed ActivePerl, which gives me a way to run .pl files, i.e. : c:\ perl someprogram.pl Does the php installation give me a command-line interpreter like that? Here's why I'm asking. I have a set of pages that I want to convert to php, but I will also need to drop those pages onto a CD too. I supposed I could view each page from the server and 'save as HTML' locally, but I was thinking that I might be able to run a php interpreter on the *.php pages and generate corresponding *.html pages in batch mode as follows: c:\ php index.php index.html c:\ php about.php about.html etc. and then run a batch search/replace program on the *.html files to change all links to .php pages to link to the newly-generated pages. Is there anything like that or does the install package just configure a web server? -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here -- 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] Why I wish PHP had Python's exception handling....
I am just doing something at the moment in PHP, which is naturally suited to managing via a try,catch kind of structure which just isn't in PHP and means I am having to be very, very careful. I just thought I might use it to put the case for some exceptions. Basically, I have a whole bunch of tasks to run, called say Task1, Task2 etc. So in an ideal world, they could run as RunTask1(); RunTask2(); RunTask3(); ... However, I can't let multiple instances try and run these tasks in tandem, so I put a lock in place: GrabLock(); RunTask1(); RunTask2(); RunTask3(); ... ReleaseLock(); The nasty thing then comes in that if any task fails, I have to stop. So I create a convention that every task returns 1 for success, 0 for failure. Tasks can also be nested. So this gives me a structure like this: if ( ! GrabLock() ) return 0; $retval = 0; switch(0){ default: if ( ! RunTask1() ) break; if ( ! RunTask2() ) break; if ( ! RunTask3() ) break; $retval = 1; } ReleaseLock(); return $retval; This works, but it is cumbersome, you have to be VERY careful and there are other complications in terms of reporting sensible error messages when tasks are shared. In Python, the code would be written like this: try: GrabLock(); try: RunTask1(); RunTask2(); RunTask3(); ... finally: ReleaseLock(); # If GrabLock runs without raising any # exceptions this will ALWAYS run except: # Gracefully handle any exceptions from GrabLock, RunTask1 etc... which is an awful lot neater, and a lot safer, and can handle error messages much more cleanly. Anyway - this is just an example of why I think exceptions would be a really cool thing to add to PHP. Regs Brian White - Brian White Step Two Designs Pty Ltd - SGML, XML HTML Consultancy Phone: +612-93197901 Web: http://www.steptwo.com.au/ Email: [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] Single Form
Hi Instead of using a html and a php page, how can i use a single php page to process data? thanks in advance Srinivasan Ranganathan *NEW* Connect to Yahoo! Messenger through your mobile phone *NEW* Visit http://in.mobile.yahoo.com/smsmgr_signin.html -- 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] Single Form
make a php page that prints out the html, and direct the form's action to $PHP_SELF. then have some sort of test to determine if there's been a post, process the data, etc, and you're set. -Original Message- From: Srinivasan Ranganathan [mailto:[EMAIL PROTECTED]] Sent: Monday, October 22, 2001 1:20 AM To: [EMAIL PROTECTED] Subject: [PHP] Single Form Hi Instead of using a html and a php page, how can i use a single php page to process data? thanks in advance Srinivasan Ranganathan *NEW* Connect to Yahoo! Messenger through your mobile phone *NEW* Visit http://in.mobile.yahoo.com/smsmgr_signin.html -- 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 I wish PHP had Python's exception handling....
On Mon, Oct 22, 2001 at 02:57:44PM +1000, Brian White wrote: Preface to these ramblings: Exception handling is planned for the next version of the Zend engine. For details, see http://www.zend.com/zend/future.php The nasty thing then comes in that if any task fails, I have to stop. So I create a convention that every task returns 1 for success, 0 for failure. Tasks can also be nested. So this gives me a structure like this: if ( ! GrabLock() ) return 0; $retval = 0; switch(0){ default: if ( ! RunTask1() ) break; if ( ! RunTask2() ) break; if ( ! RunTask3() ) break; $retval = 1; } ReleaseLock(); return $retval; This works, but it is cumbersome, you have to be VERY careful and there are other complications in terms of reporting sensible error messages when tasks are shared. This is probably no less messy, but it does allow you to handle an arbitrary number of steps, possibly with arguments, without having to add another if check as you're doing above. This also lets you know easilly which step failed: ? function first($a) { if ($a) return true; else return false; } function second($a) { if ($a) return true; else return false; } function third($a) { if ($a) return true; else return false; } function GrabLock() { echo Grabbing.\n; return true; } function ReleaseLock() { echo Releasing.\n; return true; } $ret = true; $funcs = Array('first','second','third'); $args = Array(1,1,1); // Change one to zero to trigger a failure if (!GrabLock()) return 0; while ($ret = $funcs[0]($args[0])) { array_shift($funcs); array_shift($args); if (!count($funcs)) break; } ReleaseLock(); if (count($funcs)) echo Failed at $funcs[0].\n; ? 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] Re: Arrays in form
Use JavaScript. Read PHP Manul if you need to pass array form vars. There is a section for that. Srinivasan ranganathan wrote: Hi all How can i implement a hotmail-inbox like checkbox functionality? thanks in adv Regards Srinivasan Ranganathan -- 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] Re: Odd is_int() behaviour
This is expected behaviour. Ashley M. Kirchner wrote: I have the following snippet in my file: if ($PATH_INFO == ) { $PATH_INFO = /; } echo PATH_INFO: $PATH_INFObr\n; // All we want is the fist element, call it $section list($section) = explode('/', substr($PATH_INFO,1)); explode() is string function and returns array of strings. Therefore, type is integer. if (is_int($section)) { echo section: $sectionbr\n; } else { echo Invalid section (NON_INT: $section)br\n; } Um, why does it fail when I hit the script with any INT? '1' is not integer, but string. 1 is integer. BTW, all user inputs(POST/GET/etc) are string. -- 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]
RE: [PHP] Re: Arrays in form
You don't need to use javascript unless you're lookin for select all functionality. I think what you are looking for might just be to have many checkboxes that can be selected at a time? You can look in the manual, but the trick is just to name your form fields with a [] at the end. So, it would be like input type=checkbox name=messageid[] ... That will ensure that PHP takes all checked messageid boxes and sticks them in an array for ya! Hope that helps! Brian Tanner Project Manager Zaam Internet Solutions Toll Free: 1-866-225-2675 [EMAIL PROTECTED] http://www.zaam.com -Original Message- From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]] Sent: October 21, 2001 10:50 PM To: Subject: [PHP] Re: Arrays in form Use JavaScript. Read PHP Manul if you need to pass array form vars. There is a section for that. Srinivasan ranganathan wrote: Hi all How can i implement a hotmail-inbox like checkbox functionality? thanks in adv Regards Srinivasan Ranganathan -- 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 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] generating charts/graphics
Try this http://www.aditus.nu/jpgraph/ M.N. --- Christian Dechery wrote: I'm working on (actually I'm almost finished) on a very nice ad management system. It has a script that generates a very informative report, in HTML. But I wanted something more... like some comparative chart... or pie chart... can anyone give some hints, where can I find info on this? Is this easy to do in PHP? Can I get something already implemented? Some class or something? 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]
[PHP] Re:
Æ߲ʹÈÁ¦ÍÆÐÂÆ·£ºÉñÏÉ·Û£¡¼ÛÓŵĺòúÆ·£¡ ÉñÏÉ·Û££·þÓúóÊý·ÖÖÓ£¬¼´ÄÜÐË·ÜÅ®ÐÔ´óÄÔÉñ¾£¬²úÉúºÃ¸ÐºÍ¿ÊÍû¡£ÎÞ¶¾¡¢ÎÞ¸±×÷Óá¢ÎÞñ«ÐÔ¡£ http://shop.7cv.com/shop/index.php?asstfrom=7cvtest34 ºÃÕ¾Äѵ㬿ì¿ì¼ÓÈëÊղؼÐÓ´£º£© ¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª ¸ü¶à³ÉÈËÓÃÆ·¡¢±£½¡Æ·¡¢ÇéȤÄÚÒÂ... ¾¡ÔÚ£º Æß²ÊÉ̳ǣ×î´óµÄÍøÉϳÉÈËÓÃÆ·ÉÌ³Ç http://shop.7cv.com/shop/index.php?asstfrom=7cvtest77 ¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª ллÄãµÄÖ§³Ö£¡ WeiKuΪÄã½ÚԼʱ¼ä£¬´øÀ´»¥ÁªÍøÊÀ½çµÄ櫶«£¬ÓÅ»ÝÐÅÏ¢¡£ ÖÔÐÄÏ£ÍûÄãÔ¸Òâ¼ÌÐø»ñµÃÎÒÃǵÄÐÅÏ¢£¬ÎÒÃDZ£Ö¤²»·¢ËÍÎÞνÐÅÏ¢¡£ ÒµÎñ£º[EMAIL PROTECTED] ÈçÈ¡ÏûÇë·¢ÐÅ[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 I wish PHP had Python's exception handling....
If that happens it would be great. At 00:33 22/10/2001 -0500, Matt McClanahan wrote: On Mon, Oct 22, 2001 at 02:57:44PM +1000, Brian White wrote: Preface to these ramblings: Exception handling is planned for the next version of the Zend engine. For details, see http://www.zend.com/zend/future.php The nasty thing then comes in that if any task fails, I have to stop. So I create a convention that every task returns 1 for success, 0 for failure. Tasks can also be nested. So this gives me a structure like this: if ( ! GrabLock() ) return 0; $retval = 0; switch(0){ default: if ( ! RunTask1() ) break; if ( ! RunTask2() ) break; if ( ! RunTask3() ) break; $retval = 1; } ReleaseLock(); return $retval; This works, but it is cumbersome, you have to be VERY careful and there are other complications in terms of reporting sensible error messages when tasks are shared. This is probably no less messy, but it does allow you to handle an arbitrary number of steps, possibly with arguments, without having to add another if check as you're doing above. This also lets you know easilly which step failed: ? function first($a) { if ($a) return true; else return false; } function second($a) { if ($a) return true; else return false; } function third($a) { if ($a) return true; else return false; } function GrabLock() { echo Grabbing.\n; return true; } function ReleaseLock() { echo Releasing.\n; return true; } $ret = true; $funcs = Array('first','second','third'); $args = Array(1,1,1); // Change one to zero to trigger a failure if (!GrabLock()) return 0; while ($ret = $funcs[0]($args[0])) { array_shift($funcs); array_shift($args); if (!count($funcs)) break; } ReleaseLock(); if (count($funcs)) echo Failed at $funcs[0].\n; ? 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] - Brian White Step Two Designs Pty Ltd - SGML, XML HTML Consultancy Phone: +612-93197901 Web: http://www.steptwo.com.au/ Email: [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] PHP editing
Hi, I was wondering are there any editor programs for PHP? Right now, I am using RedHat Linux 6.2 and I have to type everything by telneting into the server and using Pico. Thanks. Peter -- 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] PHP editing
If you're on RedHat, then you could also use vi/vim/gvim, Emacs/XEmacs, and I think RH 6.2 probably also had Glimmer, NEdit, and some others. You could also search the archives of this list since this topic gets asked a lot :) Try Active State's Komodo (http://www.activestate.com), which is an IDE that runs on Linux and Windows and supports PHP, Perl, Python, and more. It's pretty cool. Note: I should mention that I don't work for ActiveState or have any ties to them (since I've now mentioned Komodo twice in one night of replies :) Many editors support PHP, pick your favorite and see if it has PHP syntax support (which is what I'm guessing you're after). Also, if you are telnetting in, if you're on a Windows box, then there are lots of choices, same on Mac (e.g. I think BBEdit supports PHP, Alpha probably does as well), and with editors like Visual SlickEdit, BBEdit, Emacs, GoLive, and plenty of others, they have nicely integrated FTP file open save abilities, so you could just open your file right off the server, but edit it locally, then when you hit save, the editor automatically FTP's it back up to the server for you. -Original Message- From: Peter [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 11:00 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP editing Hi, I was wondering are there any editor programs for PHP? Right now, I am using RedHat Linux 6.2 and I have to type everything by telneting into the server and using Pico. Thanks. Peter -- 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]