Re: [PHP] learning resources for PHP
On 05/04/12 13:41, tamouse mailing lists wrote: On Wed, Apr 4, 2012 at 6:16 AM, Bastien wrote: Bastien Koert On 2012-04-03, at 10:39 PM, Tim Dunphy wrote: Hello list, I am quite sure that you've heard this question at least a few times before. :) But I have been dabbling a bit in PHP for years and I've decided that its' high time that became serious about getting a solid grounding in it. Currently I work as a Sysadmin and have modest but reliable skills in bash and perl. But I consider PHP more of an artform and I really need to 'pick up a brush and start painting' so to speak. So what I was wondering what websites, and books you'd recommend to someone who (for all intents and purpose) is just starting out. On my hit list of things to learn are basic php / database interaction (mysql mainly).. then how to accelerate php interraction through memcache.. and eventually one I have all that down onto using some of the NoSQLs (mongo/cassandra/membase, etc). Thanks! -- GPG me!! gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The manual is a great place Www.php.net Then there are tons of sites forum and otherwise to aid your learning. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I'll second the manual -- quite a lot of info, and generally very well written. When I started out learning PHP, I used the tutorials at webmonkey.com. They're pretty well done, and definitely got me going quickly. If you already have programming experience, and understand data bases a bit, they should help you along. 2 cents If you have no programming or data base experience, PHP isn't necessarily a bad first language, but it is very rich, and there are many ways to make mistakes and create poorly formed programs. Writing web apps is quite a bit different than writing admin scripts in shell and perl, and there are various ways to go about it. While the php.net manual is extensive in describing the workings and functions of PHP, it is not a programming tutorial by any stretch. Way back in the Jurassic of programming, I had a nifty little book called "Programming Proverbs" that laid out quite succinctly some rules of thumb for writing good code. Today, books like "Code Complete" serve that purpose well, but with a lot more text and no where near as much fun. Still, if you're are a beginner to writing applications, it's good to look at such books. I've been having a lot of fun with Beginning PHP 5.3 by Matt Doyle. Covers basics nicely, and I've found myself going back to the book for reference constantly as I do my own php medium size project as a learning experience =) Also, the code samples and explanations are top notch, and you come to really understand what it is you're doing.. so that's my 2 cents! -Henry A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP setup
Good Day All I am running windows xp pro and using built in IIS as my web-server. And I installed PHP 5.2.5. I also installed MySQL 5.0.37. Now PHP is working, how ever I having problems with the configuration with MySQL. I used phpinfo(), and I notice this doc_root no value no value extension_dir C:\php5 C:\php5 I did edit my php.ini file: include_path ="C:\PHP;C:\PHP\ext" doc_root ="C:\Inetpub\wwwroot" extension_dir ="C:\PHP\ext" And windows systems paths I have C:\PHP; and it shows up in the path command. I do not understand why it’s not using the php.ini file or what I am doing wrong. No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.21/1263 - Release Date: 06/02/2008 8:14 PM
Re: [PHP] Paged Results Set in MySQL DB with one result
On Friday 12 May 2006 12:01 pm, tedd wrote: > It shouldn't be blank. > There should be a Next/Previous button -- isn't there? > If so, then click "Next" > If not, please tell me. Works: Suse Linux 10.x/Firefox 1.0.7 Windows XP/Firefox 1.5.0.3 Mac OS 10.4.6/Safari 2.0.3 Works sort of: Suse Linux 10.x/Konquerer 3.4.2 => (first page loads but next/previous buttons produce no results) Windows XP/Internet Explorer 6.0.x => (first page loads but next/previous buttons produce no results) Blank: none that I tested Don't have Firefox on the Mac box. I just clicked the next/previous buttons a few times, so take it for what's it's worth. Thanks to you Tedd. Made me realize I should upgrade my Linux Firefox. HTHs. -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] BDC to ASCII Conversion
On Thursday 11 May 2006 10:08 am, Jim Moseby wrote: > In dog we trust Am partial to "Dog is my co-pilot" -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] remove html tags in text?
On Thursday 11 May 2006 9:51 am, Bing Du wrote: > Any functions that can help remove all the HTML tags in it? What about > just removing selected tags, like ? Looks like strip_tags() will do the trick for you: http://us3.php.net/manual/en/function.strip-tags.php -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question about using temporary named pipe in the string for system
On Wednesday 10 May 2006 4:02 pm, Ginger Cheng wrote: > Hello, PHP gurus, > I have a command that I want to run using system function. The > command exploits temporary named pipes in the place of temporary files. > >my command is > > paste <(cut -f1 file1) <(cut -f2 file2)> final_file > > It works perfectly well if I just type it in my interactive > shell. But if I do a > > $cmd = " paste <(cut -f1 file1) <(cut -f2 file2)> final_file"; > system($cmd); > ?> > > I got the syntax error msg as > "sh: -c: line 1: syntax error near unexpected token `('". I have tried > to 'escapeshellcmd' the command and run it in system, then I got > > paste: invalid option -- f > Try `paste --help' for more information. > > Also tried exec. I really want to take advantage of the > temporary named pipes so I don't have to worry about the temporary files > generated. I've been googling around without much help. Could anyone > plz give me some hint? Thanks a lot > ginger Think you might want the shell_exec() command instead. http://us2.php.net/manual/en/function.shell-exec.php HTH -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WINNER
On Monday 08 May 2006 12:52 pm, Ryan A wrote: > Ok, the last time this happened I think it was either > Jay B or John Holmes (the dude!) who claimed the > prize...this time, hands off, its mine... > > 615,960.00. I'm rich bearch! Think we should split it equally among all PHP-general subscribers. That would be, like, a latte or beer each. Yippee! -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sanity checker?
On Tuesday 02 May 2006 6:14 pm, Ezra Nugroho wrote: > Does anyone know of any tools to test the sanity of your php code? This sounds an awful lot like the Halting Problem to me, which isn't solvable. http://en.wikipedia.org/wiki/Halting_Problem -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using linkDisplayFields of FormBuilder
On Tuesday 25 April 2006 4:36 pm, Tom wrote: > instead we recommend emailing > [EMAIL PROTECTED] where you are more likely to get answer. You found the PHP-general list instead of the Pear-general list. Here's a link to the Pear mailing list page: http://pear.php.net/support/lists.php HTH -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Preg_match() regex
On Friday 21 April 2006 9:44 am, Jeff wrote: > Regex pattern question here. I need to match on "Foo-F00", "Foo-foo", > "foo-Foo". I know in perl you can use the /i to specify "case > insensitive" matching. Is there any such switch that can be used in > preg_match() in PHP? http://us3.php.net/manual/en/reference.pcre.pattern.syntax.php -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: no offense to Rasmus... are you kidding me
On Thursday 20 April 2006 1:18 am, Richard Lynch wrote: > Is 5 longer than 4? Size doesn't matter. At least that's what I've been told. ;) -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pushing PHP Into The Web 2.0 Generation
On Tuesday 18 April 2006 10:50 am, Jay Blanchard wrote: > [snip] > .. > [/snip] > > And his mailing list name is James Crane, he signs of as M.T. which > stands for Matt Todd. > > I call shenanigans. My nominee for best analogy from the article: > Much like the artists and writers of the early twentieth century when they realized that the weapons and machines were dehumanizing war, making it far too easy to kill, web designers and developers realized that there was a need for a social, human revolution within the sterile, synthetic arena of the web. Hence, the Web 2.0 Movement was born. Web development and war in the same sentence. Killer! -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Post & forms
On Thursday 13 April 2006 8:44 pm, Stephen Johnson wrote: > On 4/13/06 7:40 PM, "Gary E. Terry" <[EMAIL PROTECTED]> wrote: > > Quite possibly a stupid question, but here goes. > > > > I have a form that is a list of jobs. On that list is a > > checkbox. The form field is named 'changedate'. > > > > I also have a hidden field called 'JobID'. > > > > What I am trying to accomplish is if a checkbox is > > checked, when the form is submitted, I want all of > > the JobID's to be updated by an SQL query. > > > > But it seems to me that $_POST will only contain > > the last JobID in the form, no matter what. Am I correct > > on this? > > > > Is what I am trying to accomplish not possible with a > > form post? > > > > I think I remember doing something similar with Cold Fusion > > years ago, but I have never attempted this with PHP. > > > > Any suggestions? > > You need to pass the checkboxes as an array value with the JobID as the > identifier. > > Then on the other side, you can run through the list of JobID's and see > which ones need to be updated. > If I'm understanding what you're asking, you have an array of checkboxes whose values you want passed to you PHP via the $_POST array. The HTML form syntax would be something like: etc. Then in your PHP script, $_POST['array'] will hold an array of the checkbox values. HTH -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] interview
On Thursday 13 April 2006 11:13 am, Robert Cummings wrote: > On Thu, 2006-04-13 at 12:56, Wolf wrote: > > How much wood would a wood chuck chuck if a wood chuck could chuck wood?? > > Canadian, American, or "Other" woodchuck? > Leave or we shall taunt you a second time! -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Argument passed by reference?
On Friday 07 April 2006 5:06 pm, tedd wrote: > At 1:52 PM -0500 4/6/06, Chris Boget wrote: > >>The way I understand it, pass by reference in php is determined in > >>the function definition and not the function call. Something like: > > > >You used to be able to pass by reference at run time. But I see that is > >no longer allowed... :| So I guess that makes my question moot. > > > >Thanks for your help. > > > >thnx, > >Chris > > Chris: > > Please forgive my ignorance, but when did that happen? > > tedd > -- > --- >- http://sperling.com I'm not sure when this happened. I'm fairly new to php, myself. Maybe someone else could answer that? -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parse Error on SQL Insert
On Friday 07 April 2006 1:56 pm, Chrome wrote: > Backticks (`) encapsulate table or database names > > I was thinking maybe if the array references were encapsulated in curly > braces {}: > > $_POST['model'] to {$_POST['model']} > > Of course if the field in the DB isn't numeric this would be > '{$_POST['model']}' > > Dan > > ------- > http://chrome.me.uk > > > -Original Message- > From: Joe Henry [mailto:[EMAIL PROTECTED] > Sent: 07 April 2006 20:53 > To: php-general@lists.php.net; [EMAIL PROTECTED] > Subject: Re: [PHP] Parse Error on SQL Insert > > On Friday 07 April 2006 1:37 pm, Tom Chubb wrote: > > $insertSQL = "INSERT INTO cars (model, `year`, details, price, image1, > > Not sure if this is your problem, but those look like backticks around year > instead of single quotes. Should there even be quotes there? > > HTH > -- > Joe Henry > www.celebrityaccess.com > [EMAIL PROTECTED] > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > __ NOD32 1.1475 (20060406) Information __ > > This message was checked by NOD32 antivirus system. > http://www.eset.com Good to know. Thanks. -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parse Error on SQL Insert
On Friday 07 April 2006 1:37 pm, Tom Chubb wrote: > $insertSQL = "INSERT INTO cars (model, `year`, details, price, image1, Not sure if this is your problem, but those look like backticks around year instead of single quotes. Should there even be quotes there? HTH -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Argument passed by reference?
On Thursday 06 April 2006 12:24 pm, Chris Boget wrote: > Is there a way to test to see if a function argument was passed by > reference instead of by value? > > thnx, > Chris The way I understand it, pass by reference in php is determined in the function definition and not the function call. Something like: function foo (&$bar) { ... } Here's a link to that section of the php manual: http://us3.php.net/manual/en/language.references.pass.php Hope that helps. -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] simple regex query
On Thursday 06 April 2006 6:19 am, Angelo Zanetti wrote: > Hi guys > > Been tryin to figure out regex and have found some tutorials but some have > made things clear and others have confused me. > > Anyway for a simple query, if I just wanted to check that a variable has > only text and numeric characters would I do something like this (i want it > to fail if it finds a symbol eg: + - { " etc...): > > echo "REG result: " . preg_match('/[a-zA-Z0-9]*/', '{d-fg'); > > however this resolves to true because there are normal characters > (alphabetical characters) so how do I make the expression fail because of > the { and - characters in the string? > > You can also list which characters you DON'T want -- just use a '^' as the > first symbol in a bracket expression (i.e., "%[^a-zA-Z]%" matches a string > with a character that is not a letter between two percent signs). But that > would mean that I would have to list each symbol I dont want and that would > be undesireable as it would be better to list exactly what the acceptable > characters are. > > Can anyone give me some insight as to where I'm going wrong? > > thanks > > -- > > Angelo I found an AJAX regex tester the other day. It'll check PCRE, Posix, and Javascript. Don't know how useful this is, but thought I'd throw it into this thread. http://rexv.org/ -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download image in PHP
On Wednesday 05 April 2006 7:16 am, mbneto wrote: > Hi, > > If all you want to do is this as a suggestion (altough not php > related) you could call wget from your php script to fetch this image > without having to worry with other things. > > Something like this > > exec ('/path/to/wget http://www.foo.com/bar.jpg'); > > Of course you'd have to check if everything went fine. > > On 4/5/06, Russell Jones <[EMAIL PROTECTED]> wrote: > > I have an image library on one site that I want to be able to access from > > another, but I actually want the image downloaded and cached to the new > > site (so that it doesnt keep taxing the image server). > > > > I allow the file() command to pull from other sites, can I do this with > > just the file('http://www.site.com/image.jpg";); - or how would i do this? > > > > Russ You might want to look at CURL, too. http://us2.php.net/manual/en/ref.curl.php -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] White label with PHP?
On Wednesday 29 March 2006 9:52 am, Merlin wrote: > white label solution Can someone enlighten me as to what this means? Thanks. -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can "output_buffering" be set in a script?
On Thursday 30 March 2006 9:02 am, Todd Cary wrote: > I do not have access to the php.ini file and I need to have > output_buffering turned on. Can this be done within a script? > > Thank you Yep. http://us2.php.net/manual/en/function.ob-start.php That link should get you started. -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] private $foo
On Tuesday 28 March 2006 1:12 pm, Jochem Maas wrote: > > class Foo > { > private $foo = 'foo'; > > function __get($k) > { > if (isset($this->{$k})) { > return $this->{$k}; > } > > throw new Exception("non existing property!"); > } > > function __set($k, $v) > { > if (isset($this->{$k})) { > $this->{$k} = $v; > return; > } > > throw new Exception("non existing property!"); > } > } > > $f = new Foo; > echo $f->foo,"\n"; > $f->foo = "bar"; > echo $f->foo,"\n"; Maybe I'm wrong, but I thought you couldn't use the "$f->foo" to access private variables from outside a class? -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] where php at?
On Monday 27 March 2006 12:31 pm, tedd wrote: > At 1:19 PM -0600 3/27/06, Jay Blanchard wrote: > >[snip] > >Where do I type in "which php"? > >[/snip] > > > >At the command line on the host. > > Aarrrg -- no disrespect meant. > > I'm totally and absolutely clueless and frustrated. It must be my age > because I haven't seen a command line since my Apple][ days -- let > alone one while doing web work. > > I'm sitting in front of my computer accessing my remote web site via > ftp (GoLive) writing code and trying to set up a cron job using > cpanel to run that code. > > Now, I have no idea of where I should type in "which php" -- I've > tried putting it in my cpanel cron jobs "command to run" box, but > that doesn't do anything. > > Does anyone have any reference material of where a "command line of > the host" is? > > Thanks. > > tedd > > -- > --- >- http://sperling.com Hey Tedd, Do you have ssh access to your remote server from your local machine? If you do, then that would be where you'd run the command "which php". On Linux/Mac OS X, you can ssh via a terminal. On Windows, a program like PuTTY will do the trick. Link for PuTTY download (just in case): http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Syntax for ssh: ssh @ Once you have an ssh session open to your remote server, running "which php" will return the remote path for php. Hope that helps. -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IE quirk
With IE, it's not a quirk. It's a feature. On Thursday 16 March 2006 3:31 pm, Jay Blanchard wrote: > [snip] > I created a small bannering program. It works great in Firefox. But I > have a problem with IE. > If I place the banner on a different domain than the bannering program, > Ex: > > www.bannerserver.com > > www.otherserver.com has img tag calling from www.bannerserver.com > > > I use a session to keep track of the banner that is displayed, have even > tried using cookies directly. > > Works great in firefox, problem with IE is first time vising > www.otherserver.com, clicking on the img does not work, apparently, the > session was never start/recorded when retrieving the image. However, if > I go back to www.otherserver.com, it then works fine, I can go anywhere, > as long as I don't close the browser, www.otherserver.com works. > > Why would IE not be recording the session info on the first visit? > Firefox does it just fine. > > Anyone run into this? > [/snip] > > From http://www.php.net/session > [quote] > When using session_start() to begin a session this session will remain > open until the page has finished loading or it is explicitly terminated. > > You can lose the session however if the the page contains a reference to > with name and id references (which may be used if the image > is referencing a dynamic image, called by javascript) This seems to > casue IE6 to refresh the page session id and hence loose the session. > [/quote] -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What am I missing?
On Tuesday 07 March 2006 11:45 am, Gustav Wiberg wrote: > action="admin/phpfunctions/addnewmanufacturer.php?frmManufacturer= echo $frmIDManufacturer;?>&frmModel=" > method="post"> > > You could try using an absolute rather than a relative path: /mobilkamera/admin/phpfunctions/addnewmanufacturer.php -- Joe Henry www.celebrityaccess.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] LIMIT?
On Feb 6, 2006, at 12:11 PM, James Kaufman wrote: Answers that show SQL commands that apply to specific databases annoy me. Not everyone uses MySQL. I've worked with several databases that don't support a LIMIT command. At least mention the database engine you are referencing. Response like this annoy me. A liberal is someone too poor to be a capitalist and too rich to be a communist. Oh, that explains a lot. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting The Document Root
you could try pathinfo() http://us3.php.net/pathinfo On Feb 2, 2006, at 8:59 AM, Jeremy Privett wrote: John Nichel wrote: $_SERVER['DOCUMENT_ROOT'] http://www.php.net/manual/en/ reserved.variables.php#reserved.variables.server Nope. I've already tried that... $_SERVER['DOCUMENT_ROOT'] contains /home/jeremy/public_html/test/ ... All I want is to the public_html part. -- Jeremy Privett [ http://www.jeremyprivett.com ] Founder - Lead Software Developer - Hosting Systems Administrator Omega Vortex (http://www.omegavortex.com) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help retrieving an HTML array
The input name must include [] (brackets) to let php know it's an array. Ex: input type=text name=xname[] value="3303" On Feb 1, 2006, at 9:07 AM, Mauricio Pellegrini wrote: Hi , I have a HTML page with a form in which there are some inputs like these: input type=text name=xname value="3303" input type=text name=xname value="9854" input type=text name=xname value="n..." the name of the input is always the same ( xname ) This generates automatically generates an array named xname in HTML with all the diferent values assigned to a diferent position. My question is : How do I retrieve that array from within PHP ? I've tryed the following $xname=$_REQUEST['xname']; and then echo $xname[0][0] ; // this returns nothing echo $xname[0] ;// this returns only first digit of the first input None of the above seem to recognize that xname is ( in HTML ) an array . Any help greatly appreciated Thanks Mauricio On Sun, 2005-10-02 at 19:38, adriano ghezzi wrote: if i understand well you need to get an array from html post if you use the same name for your html fields you automatically have an array in $_POST eg input type=text name=myfield value="field_1" input type=text name=myfield value="field_2" you'll get the array ar_myfield = $_POS['myfield'] you should achieve the same result using myfield[key] in the name of html hyh by ag. 2005/10/2, Martin van den Berg <[EMAIL PROTECTED]>: Newbe question: How does one convert an array into a HTML GET request easely? Are there any standard functions? Same for HTML POST requests. Thanks, Martin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] operators
I have some experience with PHP, but not with these operators: -> => Can someone explain how they are working in this snippet from Yahoo's search API foreach($xml->Result[$i] as $key=>$value) I don't see anything about them in the "Array Operators" documentation.. Thanks - Yahoo! for Good - Make a difference this year.
[PHP] Re: Can't execute external program
Hi, Thank you, after a frustrating month the problem was solved. My system had SElinux blocking that.. no php, apache or file permissions. Something else to keep in mind. Henry On 11/24/05, n.g. <[EMAIL PROTECTED]> wrote: > put the executable into another directory rather than DOC_ROOT, > maybe you have reached apache security settings. > or try add `option +exec' to your apache conf, but be aware this maybe > a security problem to your site to do so. > > On 11/24/05, Henry Castillo <[EMAIL PROTECTED]> wrote: > > Hi > > Still desperate > > DOCUMENT_ROOT is /var/www/html > > Check all settings at http://provi.voicenetworx.net:8080/t.php > > From the command line it runs perfectly: > > [EMAIL PROTECTED] html]# /var/www/html/myprog -E 123456789098.dat > > sample1.txt > > sample1.new > > (no output, it just creates the file .new) > > > > Here is the php I've created, fairly simple: > > > exec("/var/www/html/myprog -E 123456789098.dat sample1.txt > > sample1.new"); > > phpinfo(); > > ?> > > > > > > > > On 11/22/05, n.g. <[EMAIL PROTECTED]> wrote: > > > > > > is /var/www/html your web root dir ? > > > maybe its the plobrem. > > > > > > On 11/23/05, Henry Castillo <[EMAIL PROTECTED]> wrote: > > > > That was on of the first things I checked: > > > > safe mode is set to off > > > > Any ideas... > > > > Henry > > > > Voip tech said the following on 11/20/2005 10:31 PM: > > > > > Hello, > > > > > I cannot get exec(), system() or passthru() to run an extenal > > program. > > > > > From the command line it runs perfectly: > > > > > > > > > > > > > > > > > I'm getting frustrated, Any help will be deeply appreciated > > > > > Henry > > > > > > > > The answer is probably in your php.ini. Look into whether you are > > > > running in safe mode or not, and if you are whether you have your > > > > program in the safe_mode_exec_dir or not. Also check > disable_functions > > > > to see if any of the ones you are having trouble with are listed. > > > > > > > > - Ben > > > > > > > > > > > > > > > > > -- > > > Tomorrow will be a good day :-) > > > > > > > > > > -- > Tomorrow will be a good day :-) > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can't execute external program
I added 2>&1 but still nothing... as a matter of fact it won't execute anything. I put echo exec('asdf'); and nothing happend either ( i should've echoed an error) However it'll execute some other commands echo exec('ls -lart'); will output correctly. Any ohter Idea? Henry
[PHP] Re: Can't execute external program
Hi Still desperate DOCUMENT_ROOT is /var/www/html Check all settings at http://provi.voicenetworx.net:8080/t.php >From the command line it runs perfectly: [EMAIL PROTECTED] html]# /var/www/html/myprog -E 123456789098.dat sample1.txt sample1.new (no output, it just creates the file .new) Here is the php I've created, fairly simple: On 11/22/05, n.g. <[EMAIL PROTECTED]> wrote: > > is /var/www/html your web root dir ? > maybe its the plobrem. > > On 11/23/05, Henry Castillo <[EMAIL PROTECTED]> wrote: > > That was on of the first things I checked: > > safe mode is set to off > > Any ideas... > > Henry > > Voip tech said the following on 11/20/2005 10:31 PM: > > > Hello, > > > I cannot get exec(), system() or passthru() to run an extenal program. > > > From the command line it runs perfectly: > > > > > > > > > I'm getting frustrated, Any help will be deeply appreciated > > > Henry > > > > The answer is probably in your php.ini. Look into whether you are > > running in safe mode or not, and if you are whether you have your > > program in the safe_mode_exec_dir or not. Also check disable_functions > > to see if any of the ones you are having trouble with are listed. > > > > - Ben > > > > > > > -- > Tomorrow will be a good day :-) >
[PHP] Re: Can't execute external program
That was on of the first things I checked: safe mode is set to off Any ideas... Henry Voip tech said the following on 11/20/2005 10:31 PM: > Hello, > I cannot get exec(), system() or passthru() to run an extenal program. > From the command line it runs perfectly: > I'm getting frustrated, Any help will be deeply appreciated > Henry The answer is probably in your php.ini. Look into whether you are running in safe mode or not, and if you are whether you have your program in the safe_mode_exec_dir or not. Also check disable_functions to see if any of the ones you are having trouble with are listed. - Ben
[PHP] Re: Running a PHP script on an automated regular schedule
You may also want to look at wget as a way of invoking your PHP script if command line support is not available. Henry "I.A. Gray" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi. > > I am wanting to use a PHP script to check on an hourly/daily basis on a few > things- ie links on my sites, whether the sites are up and running and also > to send an e-mail to me. I know how to do this using PHP but my problem is > how to have this running 24/7. I can't really have this on a web page as > wouldn't it time out? I don't have my own server and so use a hosting > company. Is there a way of running a PHP script on a regular basis (say > every 10 or 30 mins, or hourly or daily)? Would I have to set up my own > server to do this? I just the simplest way of acheiving this. Any ideas? > Does anyone know of any decent link checkers written in PHP that I could > implement? > > Many thanks, > > Ian Gray > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Checking if a website is up?
Hi All, I am trying to check if a website is up (reachable) and I have used the standard code below: Unfortunately this works for most sites but Microsoft doesn't work most of the time even thought the site is definiately up! (Occassionally it does say it is reachable but only occassionaly and thats whats even more confusing). Suggestions? Henry I tried URL's as follows: http://www.microsoft.com/ http://www.microsoft.com function url_reachable( $link ) { $url_parts = @parse_url( $link ); if ( $url_parts["scheme"]!="http" ) return ( false ); if ( empty( $url_parts["host"] ) ) return( false ); if ( !empty( $url_parts["path"] ) ) { $documentpath = $url_parts["path"]; } else { $documentpath = "/"; } if ( !empty( $url_parts["query"] ) ) { $documentpath .= "?" . $url_parts["query"]; } $host = $url_parts["host"]; $port = $url_parts["port"]; // Now (HTTP-)GET $documentpath at $host"; if (empty( $port ) ) $port = "80"; $socket = @fsockopen( $host, $port, $errno, $errstr, 30 ); if (!$socket) { return(false); } else { fwrite ($socket, "HEAD ".$documentpath." HTTP/1.0\r\nHost: $host\r\n\r\n"); $http_response = fgets( $socket, 22 ); if ( ereg("200 OK", $http_response, $regs ) ) { return(true); fclose( $socket ); } else { //echo "HTTP-Response: $http_response"; return(false); } } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Ticketing system
Hi I am using deskpro. see http://www.deskpro.com It's written in PHP, but it is not cheap. From my brief experience I would have to say however that it certainly seems to be worth it. Such a sophisticated ticketing system would take a very significant amount of time to build from scratch. HTH <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi there, ok i am asking now, but be assured that I have googled already. I > am looking for a good customisable ticketing system in PHP, i had a look at > request tracker, but it doesnt look customisable and its in Perl. > > I am trying to find if there are solutions to what we want before i go and > build it from scratch, let me know thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Loosing $_SESSION vars somewhere...
Hello everyone! I'm running PHP v4.3.3 on an Apache server. I'm using $_SESSIONS to track student information while they're in a course. Every once in a while some of the session vars suddenly go blank! What disappears is the information gathered and stored from the login - so it's the "oldest" data gathered. At first I thought it was session.cache_expire so we expanded that from the default 180 to 600 minutes - but the problem remains. What I've done at this point is to implement a new function that repeatedly checks the value of certain $_SESSION values on each page. If a value suddenly disappears then I pop an error to the user and write the event to a text file on the server. This is okay as a stop-gap, but I need to track down what's causing the problem in the first place. Any ideas? tia Mark H -- Mark Henry Enterprises, Inc. Phone/Fax: (704)721-6685 [EMAIL PROTECTED] http://www.markhenryenterprises.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to make sure a redirect works
Thankyou all, There's a lot of info here but I guess that I can summaries it as follows: 1) Do not redirect if the page is visited as the result of a POST 2) Keep text after header("Location: ...) to an absolute minimum. Namely ... 3) Use absolute URLs not relative ones. 4) If you abide by 1,2&3 it should work with all (most) browsers Thanks for all the help Henry. "Christophe Chisogne" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Vincent Jansen wrote: > >>If you output a location header then I don't know what the browser will > >>do with text sent after that. Hopefully nothing! > > Be carefull to exit() php code after header-location > (and some text, see below): otherwise code following > will be executed! It's a common error. > > > I experienced some strange behaviour(=no redirect at all!!) with a > > script that send data after the location header. > > > header("Location: http://somesite.nl";); > > die(); > > To make things work, just follow the HTTP/1.1 spec[1]: > PHP just sends a "302 Found" code in the http header when using > PHP header("Location: ..."). It's a 'temporary' redirect (browser > should continue to use previous url), as opposed to a 'permanent' > redirect (http code 301). Text sent after that fills the body > of the http request (ex GET), and it shoud > "contain a short hypertext note with a hyperlink to the new URI(s)." > (unless request is HEAD) [2]. Also note that the location url > must be absolute, not relative [3]. > > So use > > 1. header("Location: $url"); // $url must be absolute > 2. echo "."; // send body of request > 3. exit() or die(); // to avoid executing of code following > > Forgetting 1 is common error: not all browser will 'redirect' then, > but most modern browsers do, helping uncompliant applications. > > Forgetting 2 makes impossible to see the redirected page with old > browsers (they only display the body of 30x request, allowing > user to manually follow it.. I vaguely remember netscape 2 or 3). > > Forgetting 3 causes bugs, sometimes hard to find. > > Note that things can be different with POST requests. > "If the 302 status code is received in response to a request other than > GET or HEAD, the user agent MUST NOT automatically redirect the request > unless it can be confirmed by the user, since this might change the > conditions under which the request was issued." [4] > > The curious about redirects will read 302 and 301 codes, > but also 303 and 307 (only since http/1.1) > > [1] http/1.1 RFC (w3c html version) > http://www.w3.org/Protocols/rfc2616/rfc2616.html > [2] 302 http code > http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.3 > [3] Location http header > http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30 > > Christophe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Warning: Cannot modify header information - headers already sent by (output sta
Hi The problem is that the header requires that no output be generated by your script before it is invoked. It makes this clear in the error message when it indicates that on line 6 you produced output! Try this instead (although the code seems a little confused). http://www.index.php";); } echo ""; ?> Username: Password: "; ?> "Mike Mapsnac" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This code below gives me this error message: > Warning: Cannot modify header information - headers already sent by (output > started at /var/www/html/account.php:6) in /var/www/html/account.php on line > 17 > > The script check in the database if user exists and than redirect the page > to the home index.php page. I know the problem exist in the header() .. But > I don't understand why? > > > > session_start(); > include_once("lib/lib_main.php"); > dbConnect($host, $user, $pass); > > echo "";?> > > Username: name="username"> > Password: name="password"> > value="Submit"> > "; > $password = $_POST['password']; > $username = $_POST['username']; > $sql_login = mysql_query("SELECT id from user WHERE username='$username' and > password=password('$password')"); > if(mysql_num_rows($sql_login)) { > header("Location: http://www.index.php";); >} ?> > > _ > Find things fast with the new MSN Toolbar - includes FREE pop-up blocking! > http://clk.atdmt.com/AVE/go/onm00200414ave/direct/01/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Are $_POST and $_GET interchangable?
Hi You can use both $_GET and $_POST at the same time. As an example imagine that you had a script that generated a HTML form for collecting data. And image that that script generated different forms on the basis of a parameter passed in the URL (i.e. a $_GET value). Of the top of my head like this: "; break; case 2: echo 'enter you telephone number:"; break; default: echo "oops, no form ID"; break; } ?> you could imagine calling this as follow: http://www.yoursite.com/form.php?formid=1 or http://www.yoursite.com/form.php?formid=2 HTH Henry "David Jackson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I understand the difference between how they process from data. > Most application seem to reply on $_GET which display the > session/from/cookie values in the URL windows. > > What I'm not clear on are there times when you have to either $_POST or > $_GET? > > TX, > david -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to make sure a redirect works
Hi All, I want to randomly select a desitniation page and use cookies to ensure that refreshes and return visits on the same machine always return to that desination (assuming the cookie is intact). Imagine that we have an array of URL's $url=array(1=>"dest1.html", "dest2.html", "dest3.html"); // I'm using the 1=> so that I don't need to store 0 in a cookie! and that we have a variable $index which has a value in it (either set to a cookie value, if this is a refresh or return visit, or a random value [1-3] if this is the first visit My question is are there problems with: Might some browsers fail to redirect to the required destination? If so under what circumstances? Can I use "belt and braces" and employ HTML and javascript methods afterwards without introducing problems? i.e. <!-- window.location.replace="<?php echo $url[$index]; ?>"; window.location="<?php echo $url[$index]; ?>"; // for NS <= 2.x no support for replace // --> Forward Page Your browser appears not to support any form of automatic redirect. Pleaseclick here to be redirected to the web site. Any comments or suggestions would be greatly appreciated. Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] renamed images are now corrupt...
Hello all, I wrote a small script to rename a few thousand images, both gif and jpeg... After running the script, none of the renamed images can be viewed or downloaded. Trying to download these images from an FTP client fails. FTP client attempts to download the images PASSIVE-ly Unaltered images can be downloaded as binary files with no problem.. I now have over 3000 images I cannot download or view on our website. What about rename caused this? Thank you, Bryan Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] renamed images are now corrupt...
Browser and FTP client act as if the image files do not exist, even though the directory contents can be views via FTP... What did I do? Bryan On Thu, 26 Feb 2004 17:56:25 -0600, Bryan Henry <[EMAIL PROTECTED]> wrote: Hello all, I wrote a small script to rename a few thousand images, both gif and jpeg... After running the script, none of the renamed images can be viewed or downloaded. Trying to download these images from an FTP client fails. FTP client attempts to download the images PASSIVE-ly Unaltered images can be downloaded as binary files with no problem.. I now have over 3000 images I cannot download or view on our website. What about rename caused this? Thank you, Bryan Henry -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: renamed images are now corrupt...
Looking throught my FTP client it seems that the permission are the same? Could this be incorrect? Should I chmod or chown through a shell? or using PHP? ~ bryan On Fri, 27 Feb 2004 00:01:47 +, Michael Nolan <[EMAIL PROTECTED]> wrote: Check the permissions and ownership of the files, especially if you ran the script as some privileged user like root. chmod or chown can be used to changed these. Mike Bryan Henry wrote: Browser and FTP client act as if the image files do not exist, even though the directory contents can be views via FTP... What did I do? Bryan On Thu, 26 Feb 2004 17:56:25 -0600, Bryan Henry <[EMAIL PROTECTED]> wrote: Hello all, I wrote a small script to rename a few thousand images, both gif and jpeg... After running the script, none of the renamed images can be viewed or downloaded. Trying to download these images from an FTP client fails. FTP client attempts to download the images PASSIVE-ly Unaltered images can be downloaded as binary files with no problem.. I now have over 3000 images I cannot download or view on our website. What about rename caused this? Thank you, Bryan Henry -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] renamed images are now corrupt...
Here is the script I used to rename images. foreach ($config as $line) { if ( $line == "" ) next($config); elseif ( $line == "\n" ) next($config); elseif ( strstr($line,"#")) next($config); else { $value = split(Chr(9),$line); $imgs[$value[0]] = $value[1]; } } foreach ($imgs as $k => $v) { if ((strpos($v,'/s.gif') === FALSE) AND (strpos($v,'noimage') === FALSE) AND (strlen(trim($v)) >= 0)) { $tmp = split("/",$v); $cnt = count($tmp); $cnt = $cnt - 1; $re = explode(".", $tmp[$cnt]); $ext = $re[1]; $renamed = strtolower($k).".".strtolower($ext); if (file_exists("Merchant2/".trim($v)) AND $cnt) { rename("Merchant2/".trim($v), "pi/".$renamed); $write .= $k.Chr(9)."graphics/0001/".$renamed.Chr(10); } else { $write .= $k.Chr(9).Chr(10); echo $k.""; } } else { $write .= $k.Chr(9).Chr(10); } } fwrite($handle, $write); fclose($handle); clearstatcache(); ?> On Thu, 26 Feb 2004 16:21:55 -0800 (PST), Michal Migurski <[EMAIL PROTECTED]> wrote: I wrote a small script to rename a few thousand images, both gif and jpeg... After running the script, none of the renamed images can be viewed or downloaded. I now have over 3000 images I cannot download or view on our website. What about rename caused this? Well, on line 5 of your script... oh wait. /Where's your script?/ - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] renamed images are now corrupt...
Chmod and file_exists report that the file does not exist, even though I can view the files via the FTP client. bryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: renamed images are now corrupt...
I realized that I did not trim the end line characters off of the file extensions after I grabbed all the file names from a text file. Now all the images have end of line chracters as part of the extension. I cannot access/edit the files through SHH, PHP or FTP... Oh well... bryan On Fri, 27 Feb 2004 00:01:47 +, Michael Nolan <[EMAIL PROTECTED]> wrote: Check the permissions and ownership of the files, especially if you ran the script as some privileged user like root. chmod or chown can be used to changed these. Mike Bryan Henry wrote: Browser and FTP client act as if the image files do not exist, even though the directory contents can be views via FTP... What did I do? Bryan On Thu, 26 Feb 2004 17:56:25 -0600, Bryan Henry <[EMAIL PROTECTED]> wrote: Hello all, I wrote a small script to rename a few thousand images, both gif and jpeg... After running the script, none of the renamed images can be viewed or downloaded. Trying to download these images from an FTP client fails. FTP client attempts to download the images PASSIVE-ly Unaltered images can be downloaded as binary files with no problem.. I now have over 3000 images I cannot download or view on our website. What about rename caused this? Thank you, Bryan Henry -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] regexp appears to be faulty!?
Absolutely brilliant, also I'm using the /s modifier to process newlines as well. Great Thanks to everybody for their help. "Jome" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Henry Grech-Cini" <[EMAIL PROTECTED]> skrev i meddelandet > news:[EMAIL PROTECTED] > > Thanks for that Mike, > > > > I was getting lost. > > > > Is there anyway to say > > > > Any characters excluding the sequence > > > > so I could do something like > > > > /]*)>(.* whilst not <\/fieldset>)<\/fieldset>/i > > > > Or alternatively is there a switch to say get the smallest sequence > > > > ? is what you're looking for. i.e.: .*? instead of just .* > > /j -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: regexp appears to be faulty!?
I came accross this link http://www.alpha-geek.com/2003/12/31/do_not_do_not_parse_html_with_regexs.html "> http://www.alpha-geek.com/2003/12/31/do_not_do_not_parse_html_with_regexs.html Do we all agree or should I keep trying? Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] regexp appears to be faulty!?
Thanks for that Mike, I was getting lost. Is there anyway to say Any characters excluding the sequence so I could do something like /]*)>(.* whilst not <\/fieldset>)<\/fieldset>/i Or alternatively is there a switch to say get the smallest sequence Thanks Henry "Mike Ford" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 24 February 2004 12:40, Henry Grech-Cini wrote: > > > Hi All, > > > > function extractFieldsets($subject) > > { > >$regexp="/]*)>[^(<\/fieldset>)]*/i"; > > This: [^(<\/fieldset>)] > will match any *single* character except the ones listed -- i.e. any character that isn't one of: ()<>/defilst > > So this: [^(<\/fieldset>)]* > will match any run of characters that is not in that set. > > > > > And it produced; > > > > (0)= > > (0)=[con] > > (1)=[goo] > > > > Why did it get three letters after the end of the "fieldset" tag > > By coincidence, the 4th letter in each case is one of the set listed above, and so ends the match: "t" in "content" and "d" in "goodbye". If the second example had ahppened to be, say, "au revoir", you'd have got 4 characters ("au r"). > > Cheers! > > Mike > > - > Mike Ford, Electronic Information Services Adviser, > Learning Support Services, Learning & Information Services, > JG125, James Graham Building, Leeds Metropolitan University, > Beckett Park, LEEDS, LS6 3QS, United Kingdom > Email: [EMAIL PROTECTED] > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: regexp appears to be faulty (DONT actually think so)
Thanks Sven, You are quite right with your "some probs" comment. Do you know what the the switch is that catches only the least result? I now get (0)= (0)=[hello legendcontent of helloblahgoodbye] (1)= (0)=[ attribute="hello"] (2)= (0)=[hello legendcontent of helloblahgoodbye] as we can see the second fieldset is included in that which is between the fieldset tags! :-( Thanks everyone for you help including Mike (with the post out of chain). Henry "Sven" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Henry Grech-Cini schrieb: > ... > >> $regexp="/]*)>[^(<\/fieldset>)]*/i"; > ... > >>$result=extractFieldsets('testcontent of > >>helloblah >>attribute="goodbye">goodbye'); > ... > >>And it produced; > >>(0)= > >>(0)=[con] > >>(1)=[goo] > >>(1)= > >>(0)=[ attribute="hello"] > >>(1)=[ attribute="goodbye"] > > hi, > > as it is defined in regex-spec: a '^' inside a char-group '[...]' > defines all chars, that aren't allowed, and not a string! > > so the first 't' of 'content' and the 'd' of 'goodbye' don't match your > regex anymore. > > a start for a solution could be: > > $rx = '/]*>(.*)<\/fieldset>/i'; > ?> > > if you want to take care of your fieldset-attribs in your result, you > can set your brackets again: ([^>]*) > > some probs i can think of are nested fieldsets inside fieldsets (don't > know by head, if this is allowed by w3). and another prob: is that you > don't catch multiple fieldsets after another. i think there is a switch, > that catches only the least result. > > hth SVEN -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: regexp appears to be faulty (DONT actually think so)
Hi All, I don't actually think regexp is fault. But if anyone could explain this or give me some example code that will extract the attributes and data between a "fieldset" tag pair I would be appreciated. Henry "Henry Grech-Cini" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi All, > > function extractFieldsets($subject) > { >$regexp="/]*)>[^(<\/fieldset>)]*/i"; >$replacement; >$matches=array(); > >preg_match_all($regexp, $subject, $matches); > >return ($matches); > } > > $result=extractFieldsets('testcontent of > helloblah attribute="goodbye">goodbye'); > echo ""; > foreach($result as $key=>$string) > { >echo "(".$key.")=".""; >foreach($string as $subkey=>$subres) > echo " (".$subkey.")=[".htmlspecialchars($subres)."]"; >echo ""; > } > > And it produced; > > (0)= > (0)=[con] > (1)=[goo] > > (1)= > (0)=[ attribute="hello"] > (1)=[ attribute="goodbye"] > > Why did it get three letters after the end of the "fieldset" tag > > "con" and "goo". > > Any pointers? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] regexp appears to be faulty!?
Hi All, function extractFieldsets($subject) { $regexp="/]*)>[^(<\/fieldset>)]*/i"; $replacement; $matches=array(); preg_match_all($regexp, $subject, $matches); return ($matches); } $result=extractFieldsets('testcontent of helloblahgoodbye'); echo ""; foreach($result as $key=>$string) { echo "(".$key.")=".""; foreach($string as $subkey=>$subres) echo " (".$subkey.")=[".htmlspecialchars($subres)."]"; echo ""; } And it produced; (0)= (0)=[con] (1)=[goo] (1)= (0)=[ attribute="hello"] (1)=[ attribute="goodbye"] Why did it get three letters after the end of the "fieldset" tag "con" and "goo". Any pointers? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to solve include_path / safe_mode / open_basedir /document_root
PHP4: 4.3.2 Likewise, my intention is to restrict the user within '/home/ahank/public_html' when using fopen(), but allow the user to use include() on files in '/usr/local/share/wl'. Here is my VirtualHost config: php_admin_flag register_globals Off php_admin_flag safe_mode On php_admin_flag safe_mode_gid On php_admin_value include_path /usr/local/share/wl php_admin_value safe_mode_include_dir /usr/local/share/wl php_admin_value open_basedir /home/ahank/public_html However, I get this error when loading a page which includes files in this shared directory: Warning: main(): open_basedir restriction in effect. File(/usr/local/share/wl/hahaha.php) is not within the allowed path(s): (/home/ahank/public_html) in /home/ahank/public_html/test.php on line 3 Warning: main(hahaha.php): failed to open stream: Operation not permitted in /home/ahank/public_html/test.php on line 3 Warning: main(): Failed opening 'hahaha.php' for inclusion (include_path='/usr/local/share/wl') in /home/ahank/public_html/test.php on line 3 It would seem that 'safe_mode_include_dir' has nothing to do with 'open_basedir'. Is there an equivalent to 'open_basedir_include_dir' which will allow one to only interpret files by way of include/require? - hank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] including files with open_basedir restriction
In response to the post found at: http://marc.theaimsgroup.com/?l=php-general&m=104913671122253&w=2 I would like to use open_basedir to stop users from reading the contents of system files, while using include/require to let users take advantage of scripts that I have created. These scripts have DB passwords which I would like to keep secret. While they are outside of the Apache document root, this post states "include() must be relative to one of the directories listed in open_basedir". This would allow users, knowing the name of the script, to read its contents with an fopen(). As there are many ways to skin small mammals, what security mechanisms are there in place to prevent this from happening? Are there any other approaches I can take to solve this problem? I think, ultimately, what I am asking for is a way to allow access for the php interpreter to parse the file (with include) while disallowing access to open the file for reading with fopen). Thank you for taking the time to read this. I would be very grateful to hear any experiences and suggestions the users of this list may have. Sincerely, Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] callback function via preg_replace_callback
Hi, I have Function A containing a preg_replace_callback calling Function B. The code works quite nicely. Now, is there a way for the callback function (B) to receive *additional* arguments (from A), so that, for example, it may optionally perform additional tasks? If not, is there a way for B to otherwise access arguments passed to A, for the same purpose? Thanks. --H. Tan-Tenn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] circumventing SAFE MODE Restriction
Hi All, I want to get a list of files in my own sub-directory from where my .php file is. If I use dir(".") then I can list the file in the current directory BUT If I use dir("./subdirectory") or dir("subdirectory") I get the following error: Warning: SAFE MODE Restriction in effect. The script whose uid is 614 is not allowed to access /home/currentdirectory owned by uid 0 in /home/currentdirectory/download.php on line 12 Handle: Path: Fatal error: Call to a member function on a non-object in /home/currentdirectory/download.php on line 15 The code looks like this. Untitled Document handle."\n"; echo "Path: ".$d->path."\n"; while (false !== ($entry = $d->read())) { echo $entry."\n"; } $d->close(); ?> Any ideas about how to get round this other than making a .php file to call in the subdirectory? TIA Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: using preg_match to extract information from pop3
Found a solution if (preg_match("/Form:[ ]*(.+)[ ]*<(.+)>/", "Form:Henry <[EMAIL PROTECTED]>", $info)) { print_r($info); } else print "Pattern not found"; but I'm refining it so that it doesn't need the last bit, any more pointers appreciated!!! Thanks All Henry "Henry Grech-Cini" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi All, > > I know that you will probably tell me to RTFM but I have (several times) and > I cannot quite understand it! > > So failing that I turn to you for help. > > I know that this is very trivial but please humour me. > > I have a line containing "From: Henry< henry @ .com >" > (please ignore any spaces between the angled braces < >, they are just to > fool outlook express) > > And I want to extract the name and the email address into the variables > $name $email. I suspect using preg_match? > > TIA > > Henry > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: using preg_match to extract information from pop3
I tried if(preg_match("/^From:(.*)$/", $headers[$line], $info)) { echo "["; print_r($info); echo "]"; echo "",HtmlSpecialChars($headers[$line]),""; } But all I get is [Array ( [0] => From: [1] => ) ] From: Henry< henry @ .com > Any pointers? "Henry Grech-Cini" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi All, > > I know that you will probably tell me to RTFM but I have (several times) and > I cannot quite understand it! > > So failing that I turn to you for help. > > I know that this is very trivial but please humour me. > > I have a line containing "From: Henry< henry @ .com >" > (please ignore any spaces between the angled braces < >, they are just to > fool outlook express) > > And I want to extract the name and the email address into the variables > $name $email. I suspect using preg_match? > > TIA > > Henry > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: using preg_match to extract information from pop3
Hi All, This has to be easy to do using preg_match! Can no one spare a minute of their time? Henry "Henry Grech-Cini" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi All, > > I know that you will probably tell me to RTFM but I have (several times) and > I cannot quite understand it! > > So failing that I turn to you for help. > > I know that this is very trivial but please humour me. > > I have a line containing "From: Henry< henry @ .com >" > (please ignore any spaces between the angled braces < >, they are just to > fool outlook express) > > And I want to extract the name and the email address into the variables > $name $email. I suspect using preg_match? > > TIA > > Henry > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] using preg_match to extract information from pop3
Hi All, I know that you will probably tell me to RTFM but I have (several times) and I cannot quite understand it! So failing that I turn to you for help. I know that this is very trivial but please humour me. I have a line containing "From: Henry< henry @ .com >" (please ignore any spaces between the angled braces < >, they are just to fool outlook express) And I want to extract the name and the email address into the variables $name $email. I suspect using preg_match? TIA Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP shopping carts
Hi, Please let me know if you find one thats any good? Henry "Dan Sabo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > What I'm looking for is either an open source or commercial solution which > is supported by either commercial or OS add on modules. I've looked at OS > commerce and X cart so far, wanted to look at a few more. > > I'm hoping to find one which has a hotel booking or reservation system > either as a standard or as an add on mod, and am doing some comparisons. > > Thanks, > > Dan > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] processing pop3 inbox
Hi All, I need to process the inbox. Any pointers, I don't use Perl and would like to use PHP. Also I do not have PHP compiled for a comand line so I'll probably use a crontab and unix text based web browser to invoke the PHP page to process the inbox. TIA Any help much appreciated. Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session variable under PHP 4.0.6
Thanks that works in my testing example. But why? The manual says: Caution If you are using $_SESSION (or $HTTP_SESSION_VARS), do not use session_register(), session_is_registered() and session_unregister(). But in index2.php I am using $HTTP_SESSION_VARS and it works?! Need a bit of clarification since my actual app still doesn't work! Henry "Kirk Johnson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In the first file, replace this line: > > $HTTP_SESSION_VARS['variable']="the variables value"; > > with these two lines: > > $variable = "the variables value"; > session_register('variable'); > > This is because 'register_globals' is enabled in the php.ini file. > > Kirk > > > -Original Message- > > From: Henry Grech-Cini [mailto:[EMAIL PROTECTED] > > Sent: Monday, March 03, 2003 9:34 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Session variable under PHP 4.0.6 > > > > > > Hi All, > > > > I'm having a problem with session variables under PHP 4.0.6 > > on a secure > > server. I ran phpinfo and have attached the resulting page > > after the main > > body of this message. > > > > My test code looks like this > > > > Filename: index.php > > > > Page Start -- > > > > > session_start(); > > > > $HTTP_SESSION_VARS['variable']="the variables value"; > > > > ?> > > click here to go to the next page > > > > Page End -- > > > > > > Next file > > Filename: index2.php > > > > Page Start -- > > > > > session_start(); > > > > print_r($HTTP_SESSION_VARS); > > > > echo "-->".$HTTP_SESSION_VARS['variable']."<--"; > > ?> > > > > Page End -- > > > > > > Suffice to say it doesn't work. The first page displays > > > > "click here to go to the next page" > > > > > > as expected. However clicking on the link takes you to > > index2.php and the > > following is displayed: > > > > > > "Array ( ) --><--" > > > > > > Namely that the session variable called "variable" is not set in the > > session. > > > > > > I have run the exact same code on a machine running PHP 4.2.3 > > (non secure > > servers) and it works perfectly! And outputs: > > > > "Array ( [variable] => the variables value ) -->the variables > > value<--" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problems posting
Did you send this post at 17:17 and did it arrive at 17:22? "Niels Andersen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > When I post something here, it first appears several hours later. How can it > be so? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] where do you recommend I put useful code for people to use?
Hi All, I've written some javascript that serializes javascript variables so that they can be sent to PHP and unserialized there. Is this silly thing to have done? i.e. is it already done or superfluous for some reason? Or, if it is not, where would I put the code to share it with others. Thing is that although its meant for use with PHP it is javascript so I'm not sure where to post it. Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session variable under PHP 4.0.6
Hi All, I'm having a problem with session variables under PHP 4.0.6 on a secure server. I ran phpinfo and have attached the resulting page after the main body of this message. My test code looks like this Filename: index.php Page Start -- click here to go to the next page Page End -- Next file Filename: index2.php Page Start -- Page End -- Suffice to say it doesn't work. The first page displays "click here to go to the next page" as expected. However clicking on the link takes you to index2.php and the following is displayed: "Array ( ) --><--" Namely that the session variable called "variable" is not set in the session. I have run the exact same code on a machine running PHP 4.2.3 (non secure servers) and it works perfectly! And outputs: "Array ( [variable] => the variables value ) -->the variables value<--" Exactly as required!! I hope that you can help, since I am getting frustrated after 4 days trying to fix this problem. Henry -- Sorry about the formating but this is what I got from phpinfo from the machine PHP Version 4.0.6 Build Date Oct 7 2001 Configure Command './configure' '--with-mysql' '--with-apxs=/usr/sbin/apxs' '--enable-track-vars' '--with-config-file-path=/etc' '--enable-magic-quotes' '--enable-apc=shared' '--with-xml' '--enable-trans-sid' '--with-pgsql' '--with-zlib' Server API Apache Virtual Directory Support disabled Configuration File (php.ini) Path /etc/php.ini ZEND_DEBUG disabled Thread Safety disabled This program makes use of the Zend scripting language engine: Zend Engine v1.0.6, Copyright (c) 1998-2001 Zend Technologies with Zend Optimizer v1.1.0, Copyright (c) 1998-2000, by Zend Technologies PHP 4.0 Credits Configuration PHP Core Directive Local Value Master Value allow_call_time_pass_reference On On allow_url_fopen 1 1 arg_separator.input & & arg_separator.output & & asp_tags Off Off auto_append_file no value no value auto_prepend_file no value no value browscap no value no value default_charset no value no value default_mimetype text/html text/html define_syslog_variables Off Off disable_functions no value no value display_errors On On display_startup_errors Off Off doc_root no value no value enable_dl On On error_append_string no value no value error_log no value no value error_prepend_string no value no value error_reporting 2039 2039 expose_php On On extension_dir ./ ./ file_uploads 1 1 gpc_order GPC GPC highlight.bg #FF #FF highlight.comment #FF9900 #FF9900 highlight.default #CC #CC highlight.html #00 #00 highlight.keyword #006600 #006600 highlight.string #CC #CC html_errors On On ignore_user_abort Off Off implicit_flush Off Off include_path .:/usr/local/lib/php .:/usr/local/lib/php log_errors Off Off magic_quotes_gpc On On magic_quotes_runtime Off Off magic_quotes_sybase Off Off max_execution_time 30 30 open_basedir no value no value output_buffering Off Off output_handler no value no value post_max_size 8M 8M precision 14 14 register_argc_argv On On register_globals On On safe_mode Off Off safe_mode_exec_dir no value no value sendmail_from [EMAIL PROTECTED] [EMAIL PROTECTED] sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i short_open_tag On On SMTP localhost localhost sql.safe_mode Off Off track_errors Off Off upload_max_filesize 2M 2M upload_tmp_dir no value no value user_dir no value no value variables_order EGPCS EGPCS y2k_compliance Off Off xml XML Support active standard Regex Library Bundled library enabled Dynamic Library Support enabled Path to sendmail /usr/sbin/sendmail -t -i Directive Local Value Master Value assert.active 1 1 assert.bail 0 0 assert.callback no value no value assert.quiet_eval 0 0 assert.warning 1 1 safe_mode_allowed_env_vars PHP_ PHP_ safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH session.use_trans_sid 1 1 url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry session Session Support enabled Directive Local Value Master Value session.auto_start Off Off session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID s
RE: [PHP] Redirect without header or javascipt
with using header? you mean like this--> Header("location: http://url";); -Original Message- From: Daniel Guerrier [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 7:00 AM To: php user group Subject: [PHP] Redirect without header or javascipt Is there any to redirect in php with using header() and without the use of javascript? __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do I know alive session at this moment?
RE: [PHP] How to implement this by php Session
HI Chirs: thanks for your reply and opinion, so you mean I can know the alive session by reading /tmp ? I think that's only problem I want to know cause I affraid that I can't hold the dead or alive of session OK, I'll try to trace session by reading /tmp directory thanks a lot -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 2:54 AM To: Henry; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] How to implement this by php Session --- Henry <[EMAIL PROTECTED]> wrote: > what I want to do is make sure one account can login > in at the same time I understand now, with Jason's help. > is there any mechanism in PHP can slove it? Well, not exactly. You see, this is a rather strange restriction (or seems strange to me at least). There are two different data stores in a typical session management environment: 1. Session data store. This is all of those /tmp/sess* files if you are using the default setup. 2. User (or client) data store. This is where you would keep persistent data, such as username and password. You could store a login indicator in the user data store, so that when a user logs in, you make sure this flag is not set (else deny their login) and set it if it is not. This would work for a lot of cases, but it has a few notable problems: 1. It is not atomic. Under heavy load, you can experience synchronization problems where multiple clients check the flag, see that it is not set, and all try to set it. This is a rather unlikely prolem, but it is something to consider. 2. How do you know that someone is logged in? For example, if I login to your site (and you set my login flag to 1), how much inactivity will you tolerate before you consider me no longer logged in? Do you consider me logged in as long as I have a session record? What if I accidentally close my browser and go back to your site (and am not recognized due to my cookie being lost). Will you not allow me to log back in to your site until my login flag times out? I think this seems like a bad idea, but you might try this idea to see if it works well enough for you. Good luck. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to implement this by php Session
absolutely! Sorry for my english first, what I want to do is make sure one account can login in at the same time, is there any mechanism in PHP can slove it? or I have to use external program (daemon what I develop) to do so? the way I imagination is list below does that work or you have smarter solution? - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 23, 2003 12:32 AM Subject: Re: [PHP] How to implement this by php Session > On Thursday 23 January 2003 00:26, Chris Shiflett wrote: > > --- Henry <[EMAIL PROTECTED]> wrote: > > > I'd like to implement ONE USER SIGNIN at the same time, > > > the way I consider about is below: > > > 1 record the sessionId and userId in some media(db), > > > then we'll know who is login and who is not > > > 2 use a demon program to determine whole sessionId > > > which is live and correspond to db's data if some > > > session is dead then demon program will remove from db > > > > > > that's what I think, does it work? or anybody has real > > > exprience about it? if my idea work, how to get whole > > > live sessionId from webserver(apache+php)? > > > > I honestly cannot understand exactly what you are asking, > > but are you certain it is different from just using PHP's > > sessions? It sounds to me like it is the same thing. > > Sounds as if he wants to ensure that only one (active?) login (per account? or > per application?) is allowed at any one time. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > Hug me now, you mad, impetuous fool!! > Oh wait... > I'm a computer, and you're a person. It would never work out. > Never mind. > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A simple question please.
it doesn't matter before or after as I know - Original Message - From: "Denis L. Menezes" <[EMAIL PROTECTED]> To: "PHP general list" <[EMAIL PROTECTED]> Sent: Wednesday, January 22, 2003 11:21 PM Subject: [PHP] A simple question please. Hello friends. I need to add a part of html (the banner, top menus and the logo) in all pages dynamically. I made this part of the html and converted same to php code using "Print " command. Now, how do I add this code in the other pages? Should I inclue "require" or "include" command? if yes? should I include after the tag itself? Thanks denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to implement this by php Session
I'd like to implement ONE USER SIGNIN at the same time, the way I consider about is below: 1 record the sessionId and userId in some media(db), then we'll know who is login and who is not 2 use a demon program to determine whole sessionId which is live and correspond to db's data if some session is dead then demon program will remove from db that's what I think, does it work? or anybody has real exprience about it? if my idea work, how to get whole live sessionId from webserver(apache+php)? thanks RDS
RE: [PHP] Why PHP doesn't work with Apache2?
what issues for example? I do know I can successful install php in module with apache2.0.43 without error messages, also execution was successful can you tell me what issues did you see? -Original Message- From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 22, 2003 7:11 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Why PHP doesn't work with Apache2? Henry wrote: > Apache2 now work with php in aspx (PHP is as a module) Really!? I was sure there were still some issues ... Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Why PHP doesn't work with Apache2?
Apache2 now work with php in aspx (PHP is as a module) -Original Message- From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 22, 2003 6:06 PM To: [EMAIL PROTECTED] Subject: [PHP] Why PHP doesn't work with Apache2? I don't want to start a flame-war here, just asking for specifics on a question I have :) I know that PHP and Apache 2 (on Linux anyway) have some problems working together. I was just wondering, for my own education, why is that? Is it a problem in Apache 2 or in PHP? (Not that I want to lay blame, just wondering). Can someone point me to some ressource explaining the main points of why PHP won't work with Apache 2 just yet? Thanks. Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Adding a variable to oracle that contains quotation marks??
Once you use double quota mark the character BackSlash doesn't need anymore that's my experience ^_^ - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, January 21, 2003 8:56 PM Subject: Re: [PHP] Adding a variable to oracle that contains quotation marks?? > $query = "UPDATE ACTIVITY SET COMMENTS = \'$updatecomments\' WHERE ACTIVITY_ID =\'$actcode\'"; > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, January 21, 2003 6:53 AM > Subject: [PHP] Adding a variable to oracle that contains quotation marks?? > > > Hi All, > > I'm trying to add a variable to an oracle database but it fails due > to the fact that it contains quotation marks. These have to be present for > the end user. My Script is as follows: > === > if ($conn == true) > { > > $query = "UPDATE ACTIVITY > SET COMMENTS = '$updatecomments' WHERE ACTIVITY_ID = > '$actcode'"; > $cursor = Ora_Open ($conn); > $result = Ora_Parse ($cursor, $query); > $result = Ora_Exec ($cursor); > > ora_close($cursor); > Ora_Logoff($conn); > } > === > > Can anyone tell me what to do! > > Thank you > Dave > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help with Error, I am Trying!!
you miss a { at first if statement -Original Message- From: Karl James [mailto:[EMAIL PROTECTED]] Sent: Monday, January 20, 2003 12:28 PM To: php Subject: [PHP] Help with Error, I am Trying!! Parse error: parse error, unexpected '}' in /home/virtual/site12/fst/var/www/html/Create_Account.php on line 5 http://www.ultimatefootballleague.com/Create_Account.phps I'm Trying to get the values of the form to echo out and to insert into my managers table. thanks karl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] is this better or is it still in html?
i don't get your point -Original Message- From: Karl James [mailto:[EMAIL PROTECTED]] Sent: Monday, January 20, 2003 11:59 AM To: php Subject: [PHP] is this better or is it still in html? Karl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XTemplate
Hi All, I'm looking for a way to seperate my HTML from my PHP and database access code, I pointed in the direction of XTemplate. After having had a look at XTemplate I'm not sure if it is current and stable under PHP 4 Is it and if it isn't is there something better to use? Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Parsing HTML
I assure you that I am not trying to circumvent google's anything. I'm trying to provide a HTML translation page tool for some of my visitors where they will provide there own URL and a translation of some keywords will be done for them. Thats all. I never actually was going to flaunt googles terms and conditions and after the replys from Rasmus I went away and looked into the mater. I agree whole heartedly with what Rasmus and others said and will not be circumventing APIs under any circumstance. Henry "John Nichel" <[EMAIL PROTECTED]> wrote in message news:3DBD546D.3000500@;by-tor.com... > The tools for you to execute the regular expression are there for you in > the manual. The actual regular expression that you're looking for is > not a php issue. And I can't say that I'm totally convinced that you're > still not trying to circumvent google's TOS. > > Henry wrote: > > What; nobody has anything to say about parsing HTML and doing search and > > replaces!! Is there another news group that might be better suited? I do > > want to do it PHP if I hadn't made that clear. > > > > Somebody, anybody, please help. > > > > "Henry" <[EMAIL PROTECTED]> wrote in message > > news:20021028103849.2175.qmail@;pb1.pair.com... > > > >>Hi All, > >> > >>I would like to be able to do a serach and replace in a HTML document. For > > > > a > > > >>list of words; > >> > >>for example: > >>hello become buongiorno > >>yes becomes si > >>size become grossezza > >> > >>The problem is that if I change the word "size" without considering html > >>tags and html comments in the case of inline javascripts I'll end up with > >>"broken" html. > >> > >>Is there a way to only do the search and replace outside the tags and > >>comments. > >> > >>It is further complicated by the fact that I would still like to do the > >>replacements within strings for example within meta tags! > >> > >>Any ideas. > >> > >>Henry > >> > >> > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Parsing HTML
I did a search and I remebered that I have previously seen some of your work. In particlar your guide to CMS in evolt.org. Which I think is absolutely wonderful. Thankyou for your help and I hope that I haven't gone to far with my disingenuous comment posting. I hadn't appreciated the time difference and do appreciate your help. Thankyou. Henry "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:004001c27e95$1c4d2580$8102a8c0@;000347D72515... > [snip] > Thanks Jay, I am still a newbie and I will read the manual, thankyou for the > help. > > Having an OK day in the UK . > [/snip] > > Henry your questions will get answered more quickly and accurately when you > provide > > a. A clear explanation of the problem at hand > 2. Proof that you have done some research on your own (show your work) [RTFM > or STFW] > > Coming back with a "What..!!" will get you squat, it is insulting to those > who are here to help. Also your original post was about 4:30AM and your > follow-up "What..!!" was at 9AM ... on a Monday morning. Think > aboout that for a second. > > HTH! > > Jay > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Parsing HTML
Dear Jay, I have now had a look in the FM and whilst it does help if you know how to use regular expressions I think that you are being a little disingenuous. Having to parse the HTML is more complicated than is suggest in your reply. If it is so simple perhaps you might spend 5 minutes generating the regular expression to use that will ignore the contents of tags save for the contents of quotes within meta tags and do the replace for an associative array of mappings. Hope your day is getting better in Texas. Henry "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:003f01c27e93$87bc1da0$8102a8c0@;000347D72515... > [snip] > What; nobody has anything to say about parsing HTML and doing search and > replaces!! Is there another news group that might be better suited? I do > want to do it PHP if I hadn't made that clear. > > Somebody, anybody, please help. > [/snip] > > What? No one wants to help someone who didn't search the manual for regular > expressions? Things like eregi_replace()? > > RTFM, this is very basic. > > Having a bad day in Texas... :^[ *grrr* > > Jay > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Parsing HTML
Thanks Jay, I am still a newbie and I will read the manual, thankyou for the help. Having an OK day in the UK . Henry "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:003f01c27e93$87bc1da0$8102a8c0@;000347D72515... > [snip] > What; nobody has anything to say about parsing HTML and doing search and > replaces!! Is there another news group that might be better suited? I do > want to do it PHP if I hadn't made that clear. > > Somebody, anybody, please help. > [/snip] > > What? No one wants to help someone who didn't search the manual for regular > expressions? Things like eregi_replace()? > > RTFM, this is very basic. > > Having a bad day in Texas... :^[ *grrr* > > Jay > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Parsing HTML
What; nobody has anything to say about parsing HTML and doing search and replaces!! Is there another news group that might be better suited? I do want to do it PHP if I hadn't made that clear. Somebody, anybody, please help. "Henry" <[EMAIL PROTECTED]> wrote in message news:20021028103849.2175.qmail@;pb1.pair.com... > Hi All, > > I would like to be able to do a serach and replace in a HTML document. For a > list of words; > > for example: > hello become buongiorno > yes becomes si > size become grossezza > > The problem is that if I change the word "size" without considering html > tags and html comments in the case of inline javascripts I'll end up with > "broken" html. > > Is there a way to only do the search and replace outside the tags and > comments. > > It is further complicated by the fact that I would still like to do the > replacements within strings for example within meta tags! > > Any ideas. > > Henry > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Findng a pattern
Hi Again, sorry it's taken so long. Thankyou for your help. I have since reappraised my thoughts on this subject and would like to thank all of you (and inparticular Rasmus Lerdorf) for your time in replying to my question. I will not be using anthing that was provided in reply to circumvent googles API's. Henry "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message news:Pine.LNX.4.44.0210042315100.28746-10@;www.lerdorf.com... > You are building something that will automatically scrape Google by > explicitly circumventing the tools they have provided for you to do so. > Whether the information is for your own internal statistics or not is > irrelevant. The terms of service state: > > No Automated Querying > > You may not send automated queries of any sort to Google's system > without express permission in advance from Google. Note that "sending automated > queries" includes, among other things: > > * using any software which sends queries to Google to determine how >a website or webpage "ranks" on Google for various queries; > > * "meta-searching" Google; and > > * performing "offline" searches on Google. > > -Rasmus > > On Sat, 5 Oct 2002, Henry wrote: > > > Dear Rasmus et.al. > > > > I am not wishing to reformat or display or mirror anything from google. > > > > This is for my own internal statistics. > > > > I hope that puts your mind at rest. > > > > Henry > > > > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message > > news:Pine.LNX.4.44.0210042151130.28746-10@;www.lerdorf.com... > > > You realize that you are asking us to help you violate the terms of > > > service of Google? > > > > > > A direct quote from their terms of service: > > > > > > "You may not take the results from a Google search and reformat and > > >display them, or mirror the Google home page or results pages on your > > >Web site." > > > > > > -Rasmus > > > > > > On Sat, 5 Oct 2002, Henry wrote: > > > > > > > Thanks, but I don't want to uses google's SOAP interface, is there a > > preg > > > > type solution. > > > > > > > > > > > > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message > > > > news:Pine.LNX.4.44.0210042145330.28746-10@;www.lerdorf.com... > > > > > Google has a SOAP interface for this. > > > > > > > > > > On Sat, 5 Oct 2002, Henry wrote: > > > > > > > > > > > Dear All, > > > > > > > > > > > > Excuse my ignorance but I'm STILL a newbie to this aspect of PHP. > > > > > > > > > > > > $str="Results 1 - 10 of about 14. Search took > > > > > > 0.04 seconds." > > > > > > > > > > > > I would like to look for the string above in a buffer of text. > > However I > > > > > > would like to find it even if the numeric are different. Furthermore > > I > > > > would > > > > > > like to know what the values are. Is there a simple way to do this? > > > > > > > > > > > > TIA > > > > > > > > > > > > Henry > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > PHP General Mailing List (http://www.php.net/) > > > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Parsing HTML
Hi All, I would like to be able to do a serach and replace in a HTML document. For a list of words; for example: hello become buongiorno yes becomes si size become grossezza The problem is that if I change the word "size" without considering html tags and html comments in the case of inline javascripts I'll end up with "broken" html. Is there a way to only do the search and replace outside the tags and comments. It is further complicated by the fact that I would still like to do the replacements within strings for example within meta tags! Any ideas. Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Findng a pattern
Thanks "Timothy J Hitchens" <[EMAIL PROTECTED]> wrote in message 001201c26c2c$5b7091a0$0500a8c0@BAMBINO">news:001201c26c2c$5b7091a0$0500a8c0@BAMBINO... > > > > Timothy Hitchens (HITCHO) > [EMAIL PROTECTED] > > HITCHO has Spoken! > > > > > > > -Original Message- > From: Henry [mailto:[EMAIL PROTECTED]] > Try this.. but take what Rasmus says if you are talking about Google: > > > $string = "Results 1 - 10 of about 14. Search > took 0.14seconds."; > > preg_match_all("/[0-9]+[.]*[0-9]*/", $string, $result); > > print_r($result); > > ?> > > > Timothy Hitchens (HITCHO) > [EMAIL PROTECTED] > > HITCHO has Spoken! > > > > > > > Sent: Saturday, 5 October 2002 2:50 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Findng a pattern > > > Yes > > The string will always be the same and the repective values will always > have the same meaning. > > "Timothy J Hitchens" <[EMAIL PROTECTED]> wrote in message > 001101c26c2b$55adc400$0500a8c0@BAMBINO">news:001101c26c2b$55adc400$0500a8c0@BAMBINO... > > Are the value in the same order each time? > > > > > > Timothy Hitchens (HITCHO) > > [EMAIL PROTECTED] > > > > HITCHO has Spoken! > > > > > > > > > > > > > > -Original Message- > > From: Henry [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, 5 October 2002 2:44 PM > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP] Findng a pattern > > > > > > Thanks, but I don't want to uses google's SOAP interface, is there a > > preg type solution. > > > > > > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Google has a SOAP interface for this. > > > > > > On Sat, 5 Oct 2002, Henry wrote: > > > > > > > Dear All, > > > > > > > > Excuse my ignorance but I'm STILL a newbie to this aspect of PHP. > > > > > > > > $str="Results 1 - 10 of about 14. Search > took > > > > 0.04 seconds." > > > > > > > > I would like to look for the string above in a buffer of text. > > > > However I would like to find it even if the numeric are different. > > > > > Furthermore I > > would > > > > like to know what the values are. Is there a simple way to do > > > > this? > > > > > > > > TIA > > > > > > > > Henry > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Findng a pattern
Dear Rasmus et.al. I am not wishing to reformat or display or mirror anything from google. This is for my own internal statistics. I hope that puts your mind at rest. Henry "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You realize that you are asking us to help you violate the terms of > service of Google? > > A direct quote from their terms of service: > > "You may not take the results from a Google search and reformat and >display them, or mirror the Google home page or results pages on your > Web site." > > -Rasmus > > On Sat, 5 Oct 2002, Henry wrote: > > > Thanks, but I don't want to uses google's SOAP interface, is there a preg > > type solution. > > > > > > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Google has a SOAP interface for this. > > > > > > On Sat, 5 Oct 2002, Henry wrote: > > > > > > > Dear All, > > > > > > > > Excuse my ignorance but I'm STILL a newbie to this aspect of PHP. > > > > > > > > $str="Results 1 - 10 of about 14. Search took > > > > 0.04 seconds." > > > > > > > > I would like to look for the string above in a buffer of text. However I > > > > would like to find it even if the numeric are different. Furthermore I > > would > > > > like to know what the values are. Is there a simple way to do this? > > > > > > > > TIA > > > > > > > > Henry > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Findng a pattern
Yes The string will always be the same and the repective values will always have the same meaning. "Timothy J Hitchens" <[EMAIL PROTECTED]> wrote in message 001101c26c2b$55adc400$0500a8c0@BAMBINO">news:001101c26c2b$55adc400$0500a8c0@BAMBINO... > Are the value in the same order each time? > > > Timothy Hitchens (HITCHO) > [EMAIL PROTECTED] > > HITCHO has Spoken! > > > > > > > -Original Message- > From: Henry [mailto:[EMAIL PROTECTED]] > Sent: Saturday, 5 October 2002 2:44 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Findng a pattern > > > Thanks, but I don't want to uses google's SOAP interface, is there a > preg type solution. > > > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Google has a SOAP interface for this. > > > > On Sat, 5 Oct 2002, Henry wrote: > > > > > Dear All, > > > > > > Excuse my ignorance but I'm STILL a newbie to this aspect of PHP. > > > > > > $str="Results 1 - 10 of about 14. Search took > > > 0.04 seconds." > > > > > > I would like to look for the string above in a buffer of text. > > > However I would like to find it even if the numeric are different. > > > Furthermore I > would > > > like to know what the values are. Is there a simple way to do this? > > > > > > TIA > > > > > > Henry > > > > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Findng a pattern
Yes But that the string is contained within a much bigger string as well I want to search for the follwong string but with wild cards for the numeric values and I would like to know the values as well. "Results $1 - $2 of about $3. Search took $4 seconds." Where all the $'s are numeric values Henry "Timothy J Hitchens" <[EMAIL PROTECTED]> wrote in message 001001c26c2a$927a9ad0$0500a8c0@BAMBINO">news:001001c26c2a$927a9ad0$0500a8c0@BAMBINO... > Are you saying you want to be able to extract the numbers etc? > > > Timothy Hitchens (HiTCHO) > [EMAIL PROTECTED] > > HiTCHO has Spoken! > > > > > > > -Original Message- > From: Henry [mailto:[EMAIL PROTECTED]] > Sent: Saturday, 5 October 2002 2:36 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Findng a pattern > > > Dear All, > > Excuse my ignorance but I'm STILL a newbie to this aspect of PHP. > > $str="Results 1 - 10 of about 14. Search took > 0.04 seconds." > > I would like to look for the string above in a buffer of text. However I > would like to find it even if the numeric are different. Furthermore I > would like to know what the values are. Is there a simple way to do > this? > > TIA > > Henry > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Findng a pattern
Thanks, but I don't want to uses google's SOAP interface, is there a preg type solution. "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Google has a SOAP interface for this. > > On Sat, 5 Oct 2002, Henry wrote: > > > Dear All, > > > > Excuse my ignorance but I'm STILL a newbie to this aspect of PHP. > > > > $str="Results 1 - 10 of about 14. Search took > > 0.04 seconds." > > > > I would like to look for the string above in a buffer of text. However I > > would like to find it even if the numeric are different. Furthermore I would > > like to know what the values are. Is there a simple way to do this? > > > > TIA > > > > Henry > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Findng a pattern
Dear All, Excuse my ignorance but I'm STILL a newbie to this aspect of PHP. $str="Results 1 - 10 of about 14. Search took 0.04 seconds." I would like to look for the string above in a buffer of text. However I would like to find it even if the numeric are different. Furthermore I would like to know what the values are. Is there a simple way to do this? TIA Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail headers & filtering
I like that ;-) "Manuel Lemos" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > On 09/30/2002 01:29 PM, Henry wrote: > > How about somebody making a javascript email encoder so that if you use a > > javascript enabled mail client it will get decoded only once it arrives with > > the recipient. With a link for those people without javascript enabled email > > clients to view the message remotely on a > > decode server if they wish. > > That won't work in many mail programs either because they do not support > HTML mail or because they disable Javascript. Most Webmails even strip > Javascript from the HTML. > > A more reliable alternative is to put a remote image in the HTML that is > generated dynamically by PHP script that serves a static image after > it records the identity of the user that read the message. > > > -- > > Regards, > Manuel Lemos > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: submitting a form to multiple places!!!
No takers? Is this such a difficult problem? Please help. Henry "Henry" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi All, > > I have a problem that I hope you can help me with. > > I'm using a third party shopping cart solution which is quite frankly naff. > They bundle some autoresponders with it. Unfortunately the autoresponders do > not work!. I want to find a temporary solution to this. The easiest way > would be to allow a form to be submitted to more than one place! > > Basically I would lke to have an intermediate php page that will submit the > details (submitted to it) to two other pages and then follow the response of > one of those other pages (the primary page). That way I can insert a > different autoresponder handling system into the submission process but > continue to use the shopping carts pages for the time being. > > Any suggestions? > > Henry > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] submitting a form to multiple places!!!
Hi All, I have a problem that I hope you can help me with. I'm using a third party shopping cart solution which is quite frankly naff. They bundle some autoresponders with it. Unfortunately the autoresponders do not work!. I want to find a temporary solution to this. The easiest way would be to allow a form to be submitted to more than one place! Basically I would lke to have an intermediate php page that will submit the details (submitted to it) to two other pages and then follow the response of one of those other pages (the primary page). That way I can insert a different autoresponder handling system into the submission process but continue to use the shopping carts pages for the time being. Any suggestions? Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail headers & filtering
Hi Debbie et.al. I think that we just have to accept that emails can no longer be relied upon. How about somebody making a javascript email encoder so that if you use a javascript enabled mail client it will get decoded only once it arrives with the recipient. With a link for those people without javascript enabled email clients to view the message remotely on a decode server if they wish. Henry Grech-Cini PS. If anybody does do this please let me know "Debbie Dyer" <[EMAIL PROTECTED]> wrote in message 020f01c26895$619cd880$8c093c3e@homepc">news:020f01c26895$619cd880$8c093c3e@homepc... I sent this mail earlier:- "More and more emails seem to be getting blocked by mail filtering systems looking for spam (but trashing legitimate mail at the same time). Does anyone have any tips for ensuring mails get through these systems (with regard to headers) or do we just have to accept now that email can no longer be relied upon as a means of communication?" I don't know if it arrived or if there were any replies due to my own provider blocking my mails - I know they are doing it because I tested it myself and because I have just subscribed to this list under another email address - this other email ad is receiving the php list mails the other is not. Time to change ISP but anyway, if this mail was received and there were any replies, I'd be grateful if someone could forward them to me. Thanks Debbie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] checking if a MySQL update worked
Hi All, mysql_affected_rows() returns zero if you update without changing the data in a database record. How do you tell the difference betwix "it worked but nothing changed" as opposed to "it didn't work"? TIA Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: exec("echo ... issuse
How about $ip is down, lets call the admin. I was sleeping for $var_timer_rechner1 Minutes\" | smbclient -M $popup_1 >> $script"; exec("echo \"$command\""); ?> "Mario Ohnewald" <[EMAIL PROTECTED]> wrote in message 001901c26480$5e280df0$350aa8c0@W2KDP">news:001901c26480$5e280df0$350aa8c0@W2KDP... > Hi Henry, > > > > From: Henry [mailto:[EMAIL PROTECTED]] > > > > > > Have you tried using single quotes arround the main string? > > > > i.e. 'echo "echo blah blah"' > > I have tried serveral of version, maybe you could give me your example from > the lines below. > I couldnt work it out ;( > > > > > > Henry > > > > "Henry" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > use \" instead of " so that you don't actually end the string > > > > > > Henry > > > > > > "Mario Ohnewald" <[EMAIL PROTECTED]> wrote in message > > > 001801c2647a$070aa100$350aa8c0@W2KDP">news:001801c2647a$070aa100$350aa8c0@W2KDP... > > > > Hello! > > > > I want to write a line into a file (called $script) wich > > goes like that: > > > > > > > > echo "`date` 192.168.10.123 is down, lets call > > the admin. I was > > > > sleeping for 10 Minutes | smbclient -M Computer > > > > > > > > This is what i have tried: > > > > exec("echo "echo "`date` ===> $ip is down, lets > > call the admin. > > I > > > > was sleeping for $var_timer_rechner1 Minutes" | smbclient > > -M $popup_1" > > >> > > > > $script"); > > > > > > > > The problem is that after > > > > exec("echo " > > > > its command ends due to that ". > > > > > > > > I tried \" to let php ignore this " but then it doesn´t write my " > > > anymore: > > > > exec("echo \"echo \"`date` ===> $ip is down, > > lets call the > > admin. > > > I > > > > was sleeping for $var_timer_rechner1\" | smbclient -M > > $popup_1\" >> > > > > $script"); > > > > > > > > this is the result: > > > > echo Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is > > down, lets call > > > the > > > > admin. I was sleeping for | smbclient -M Server > > > > > > > > but i want: > > > > echo "Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is > > down, lets call > > > the > > > > admin. I was sleeping for" | smbclient -M Server > > > > > > > > ^^ > > > > ^^ > > > > missing > > > > missing > > > > > > > > > > > > Can anyone tell me where the my mistake is? > > > > > > > > > > > > Cheers, Mario > > > > > > > > > > > > > > mario > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: exec("echo ... issuse
Have you tried using single quotes arround the main string? i.e. 'echo "echo blah blah"' Henry "Henry" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > use \" instead of " so that you don't actually end the string > > Henry > > "Mario Ohnewald" <[EMAIL PROTECTED]> wrote in message > 001801c2647a$070aa100$350aa8c0@W2KDP">news:001801c2647a$070aa100$350aa8c0@W2KDP... > > Hello! > > I want to write a line into a file (called $script) wich goes like that: > > > > echo "`date` 192.168.10.123 is down, lets call the admin. I was > > sleeping for 10 Minutes | smbclient -M Computer > > > > This is what i have tried: > > exec("echo "echo "`date` ===> $ip is down, lets call the admin. I > > was sleeping for $var_timer_rechner1 Minutes" | smbclient -M $popup_1" >> > > $script"); > > > > The problem is that after > > exec("echo " > > its command ends due to that ". > > > > I tried \" to let php ignore this " but then it doesn´t write my " > anymore: > > exec("echo \"echo \"`date` ===> $ip is down, lets call the admin. > I > > was sleeping for $var_timer_rechner1\" | smbclient -M $popup_1\" >> > > $script"); > > > > this is the result: > > echo Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is down, lets call > the > > admin. I was sleeping for | smbclient -M Server > > > > but i want: > > echo "Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is down, lets call > the > > admin. I was sleeping for" | smbclient -M Server > > > > ^^ > > ^^ > > missing > > missing > > > > > > Can anyone tell me where the my mistake is? > > > > > > Cheers, Mario > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php