RE: [PHP] Being a SERVER (you cant kill me, im.... DAMN!!)
At 23:29 1-8-01 -0700, Ralph Guzman wrote: >Download a NuSphere release. Depending on which you release you choose, for >the most part these include mySQL, PHP, Apache, and I think Perl. I've found >the setup to be seamless and very simple even for beginners. As far as i've seen NuSphere package is running on Linux only.. has been reported as being 40Megs.. while the seperate parts are 17Megs only. Manuals included.. If you're on Linux then rather download the parts and learn on www.devshed.com how to install.. It's easy.. and fun.. A direct link has been provided by another member of this list.. But I think the guy asking this does run on Windooz.. Bye, B. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SetLocal() problem
Thanks a lot, but I must precise that I'm running PHP (4.0.6) under NT2000 (client not server) platform. 'fr_FR.ISO_8859-1' does not work too. So, it's not very important, but where can I find the entire list of countries with their ISO code? Thanks. - Original Message - From: "Don Read" <[EMAIL PROTECTED]> To: "Frédéric Mériot" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, August 02, 2001 4:10 AM Subject: RE: [PHP] SetLocal() problem > > On 01-Aug-2001 Frédéric Mériot wrote: > > Hello, I've got a little problem with the setLocal function. In many > > tutorials they give this syntax: > > setlocale('LC_TIME','fr_FR'); // for france > > > > I tried this but the "fr_FR" keyword does not seem to work. If I try > > "french" instead it works. > > I've got the same problem with all other countries keywords (C for finland, > > pt_BR for portugal ...etc). > > If i do not put the name of a country, it does not work. > > > > Please help! > > Use the full ISO lang.charset definition : 'fr_FR.ISO_8859-1'. > (Linux allows aliases as defined in locale.alias, that's why "french" works). > > Regards, > -- > Don Read [EMAIL PROTECTED] > -- It's always darkest before the dawn. So if you are going to >steal the neighbor's newspaper, that's the time to do it. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Fw: detecting mysql
On Thu, 2 Aug 2001 16:24, Jon Yaggie wrote: > - Original Message - > From: "sarahana" <[EMAIL PROTECTED]> > To: "Jon Yaggie" <[EMAIL PROTECTED]> > Sent: Thursday, August 02, 2001 6:26 PM > Subject: detecting mysql > > > Does anybody here know how to detect with php whether mysql is > > installed > > or > > > not.. ? Thanks, I haven't been able to get anything from the other > > lists.. sarahana Have you tried phpinfo() ? -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Canadian DOS: "Yer sure, eh?" [y/n] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Fw: detecting mysql
- Original Message - From: "sarahana" <[EMAIL PROTECTED]> To: "Jon Yaggie" <[EMAIL PROTECTED]> Sent: Thursday, August 02, 2001 6:26 PM Subject: detecting mysql > Does anybody here know how to detect with php whether mysql is installed or > not.. ? Thanks, I haven't been able to get anything from the other lists.. > sarahana > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP_SELF
Actually there is no need for you to use exit(); If you choose to use this method cheking for empty fields one at a time rather than all at once; you can simplify your code a bit as follows: If($HTTP_POST_VARS){ if(!$Age) { echo "Please enter your age"; } elseif(!$Email){ echo "Please enter your email"; } else echo "Thanks for your submission"; // continue processing... ... ... } } but in any case, I'm glad I was of help. -Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 12:50 PM To: PHP Subject: Re: [PHP] PHP_SELF Ok, I would like to thank Ralph Guzman & Richard Lynch for your help. I combined your ideas into my own working example. Just posting here for archiving/discussion purposes... // Input some data // echo "\n"; echo "1. Age:\n"; echo " \n"; echo "2. Email:\n"; echo " \n"; echo " \n"; // Start error correction // if (!$HTTP_POST_VARS) { exit(); } elseif (!$Age) { echo "Please enter your age.\n"; } elseif (!$Email) { echo "Please enter your email.\n"; } else { echo "Thanks for your submission.\n"; } // Do what you want with you sanitised strings // .. :) Thanks again guys... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP Extension Documentation?
I'm working on a custom PHP extension in C were I work which is going well but I can't seem to find any documentation about the subject @ php.net. Anyone know of such a manual? A PHP/Zend C API document of some sort - from an extension developer's point-of-view? I've tried searching news.php.net, but the search is down - sorry if this question has already been asked. Rasmus r0x! (saw you @ TLUG) Learned many PHP "secrets"... Thanx! Darryl. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Being a SERVER (you cant kill me, im.... DAMN!!)
If you're running Windows system and you've got the windonws 98 SE original cdrom, you can just install from it PWS from: CDROMDRIVE:\addons\pws (...) "Kyle Smith" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Where do i download the best software (prefebly free) to set up my computer as a server so i can test my php scripts? (apache or whatever) -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Being a SERVER (you cant kill me, im.... DAMN!!)
Download a NuSphere release. Depending on which you release you choose, for the most part these include mySQL, PHP, Apache, and I think Perl. I've found the setup to be seamless and very simple even for beginners. http://www.nusphere.com -Original Message- From: Kyle Smith [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 10:32 PM To: [EMAIL PROTECTED] Subject: [PHP] Being a SERVER (you cant kill me, im DAMN!!) Where do i download the best software (prefebly free) to set up my computer as a server so i can test my php scripts? (apache or whatever) -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Hmmm?
Why you ppl. do this: if ($condition) { //action 1 //action 2 //action 3 } instead of this: if ($condition) { //action 1 //action 2 //action 3 } with the '}' you'll see directly the new code block that belongs to the IF statment. anyway...it's just a style after all "Fredrik Arild Takle" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I think it's impossible to read/understand my own scripts if i don't do it. > > Do: > >if ($submit) { > echo "Counting from 1-32"; > for ($ii = '1'; $ii <= '32' $ii++) { > echo $ii." "; > } > } > echo "All done!"; > ?> > > instead of: > > if ($submit) { > echo "Counting from 1-32"; > for ($ii = '1'; $ii <= '32' $ii++) { > echo $ii." "; > } > } > echo "All done!"; > ?> > > Best Regards > Fredrik A. Takle > > "Keith Jeffery" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Simply indent formatting for readability. I personally don't indent after > > the > > > > > "Kyle Smith" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Whenever i get a php script off a website why is it that most of the main > > parts in the script have a space from the left border. eg > > > > > echo"spazzz"; > > ?> > > > > > > > > -lk6- > > http://www.StupeedStudios.f2s.com > > Home of the burning lego man! > > > > ICQ: 115852509 > > MSN: [EMAIL PROTECTED] > > AIM: legokiller666 > > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Get when it should be Post
which translates to Rasmus Lerdorf wrote: > Then you have some silly mistake somewhere. Show us the URL. > > -Rasmus > > >>Thanx, tried capitals but it still submits via GET :-/ >> >>Rasmus Lerdorf wrote: >> >> I've been having a problem of late that some of my forms which are set to method=post are not submitting by post by via get. >>>I have seen browsers that only do post when it sees, method=POST >>>ie. "POST" vs. "post" >>> >>>-Rasmus >>> >>> >>> >> >> >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ad tracking system
At 11:33 2-8-01 -0500, Jack wrote: >Hi people, >I am looking up for the software that can track all views and click though >number of all advertising on my sites, has to fit in to my RAQ server >though. Is there any advice? Don't mind paying of course. On the risk of a new "attitude" thread.. Think I did mention freshmeat.net and sourceforge.net before.. also.. check your favorite scriptarchive.. do you know there's a link to PHP archive on cgi-resources.com?? use a searchengine.. you'll be amazed with the result.. Just did a quick search and saw several promising hits.. Most of this kind of SW is not very big so it should even fit into your RAQ. :-) Bye, B. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: HTTP_SESSION_VARS
Actually after an hours nap i found the problem. It is not something anyone could have helped me with since i didnt give complete enough code. the very simple solution was stupidly i used it in a function without declaring ir global. all is good now. - Original Message - From: "Richard Lynch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 02, 2001 3:17 AM Subject: [PHP] Re: HTTP_SESSION_VARS > >while (list ($key, $val) = each ($HTTP_session_VARS)) { > >echo "$key => $val"; > >} > > > >i get the error - > > > >Warning: Variable passed to each() is not an array or object in > /var/www/html/adult/func.php >on line 5 > > > >and well it looks liek an array to me . . is there soemthing i can do to > make this work? > > Spell it with SESSION, not session. > > $HTTP_session_VARS ain't nothing unless you set it. > > -- > WARNING [EMAIL PROTECTED] address is an endangered species -- Use > [EMAIL PROTECTED] > Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm > Volunteer a little time: http://chatmusic.com/volunteer.htm > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Make associative array from two arrays
same same... Thought there was a PHP function to do that...instead of looping, "Tim Ward" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > How about ... > > foreach ($keys as $key=>$value) $new_array[$value] = $vals[$key]; > > > Tim > -- > From: elias [SMTP:[EMAIL PROTECTED]] > Sent: 01 August 2001 15:16 > To: [EMAIL PROTECTED] > Subject: Make associative array from two arrays > > Hello! > > I have two arrays: > > $keys = array("a", "b", "c", "d"); > $vals = array(1, 2, 3, 4); > > I would like to get an associative array holding this: > $aarray = array("a" =>1, "b"=>2, "c"=>3, "d"=>4); > > I know I can do it with a "while" loop...but I wonder if there is > any > builtin PHP function that can do that. > Or a better method other than sort of this: > > $aarray = array(); > for ($i=0;$i { > $aarray[$keys[$i]] = $vals[$i]; > } > > thanks! > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Get when it should be Post
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Christian) wrote: Are you quoting the attribute in the real markup (method="POST"), or is like you show below? (It might help to throw the whole page at an html validator either way,'cuz even if that line is syntactically valid, there may be something else that's confusing the browser.) > Thanx, tried capitals but it still submits via GET :-/ > > Rasmus Lerdorf wrote: > > >>I've been having a problem of late that some of my forms > >>which are set to method=post are not submitting by post by via get. > >> > > > > I have seen browsers that only do post when it sees, method=POST > > ie. "POST" vs. "post" -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Multiple search options...
I am creating a search form for an application we're building and I'm curious how it should be handled. Some search options: Category: Any Computer Programmer Computer Operator etc. Experience can choose between 1 and 2: Any 1 2 3 etc Location: Cities listed Skills: added by resume holder Now I can do one or two of these seperate but can anyone suggest a logic to take to allow someone to say: I'd like to search for Computer Programmers between 1 and 3 years experience in Kitchener and that have these keywords. But the next person may come and say I want Computer Programmers with 2 years experience in any city and any keywords... Jeff
Re: [PHP] Get when it should be Post
Then you have some silly mistake somewhere. Show us the URL. -Rasmus > Thanx, tried capitals but it still submits via GET :-/ > > Rasmus Lerdorf wrote: > > >>I've been having a problem of late that some of my forms > >>which are set to method=post are not submitting by post by via get. > >> > > > > I have seen browsers that only do post when it sees, method=POST > > ie. "POST" vs. "post" > > > > -Rasmus > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP]Getting rows in a db...
Bear in mind that you don't want to be doing queries like that generally. Use count(*) to get the number of rows - using mysql_num_rows is slower. eg $query="select count(*) from tablename where cat='band'"; $result = mysql_query($query,$conn); etc. -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: August 2, 2001 2:13 PM To: Chris Cocuzzo; [EMAIL PROTECTED] Subject: Re: [PHP]Getting rows in a db... On Thu, 2 Aug 2001 14:57, Chris Cocuzzo wrote: > hey- > > if I do this: > > $query = "SELECT user FROM table WHERE cat='band'"; > $result = mysql_query($query,$conn); > $rows = mysql_num_rows($result); > > will I get something back from the $rows variable, or am I using the > mysql_num_rows() function incorrectly. What I'm trying to do is get the > number of rows returned as a result of that specific sql statement and > query. > > thanks > chris That should show the number of rows returned by the query, providing there is a successful result. Try it! -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Shotgun wedding: a case of wife or death. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Replacing template variables with values?
You wrote: > > This always works for me... > > > > eval ("\$message = \"$message\";"); > > RED ALERT! SECURITY TO THE BRIDGE! > > "Captain, there's Klingons off the starboard bow!" > > Oh, sorry. Did I type that aloud? Sorry. > > If $message is a free-form email typed in by a potentially malicious user > this looks pretty dangerous to me... > > Have you tried it with things like: > > $message = '";exec("/usr/bin/cat /etc/passwd");'; > > Do *NOT* try this one, but if the above works, think what *THIS* would do! > $message = '";exec("/usr/bin/rm -rf /");'; The e-mail script is for administration, so it's password protected. Do you still see a problem? Do you have any better ideas? -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Get when it should be Post
Thanx, tried capitals but it still submits via GET :-/ Rasmus Lerdorf wrote: >>I've been having a problem of late that some of my forms >>which are set to method=post are not submitting by post by via get. >> > > I have seen browsers that only do post when it sees, method=POST > ie. "POST" vs. "post" > > -Rasmus > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: [PHP-DEV] Passing JavaScript variables to PHP
You wrote: > > location.href='mail.php?message=' + message; > > You need to URLEncode that message data. > > Not sure how JavaScript does it... > > probably message.urlencode() Actually, it's escape(message). -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP]Getting rows in a db...
Yes, if your $conn is valid in the first place, and your SQL is valid. I think 'table' is a reserved word, so as-is, it won't work. Add some error-checking code to see what MySQL is saying about your connection and SQL. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Chris Cocuzzo <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Thursday, August 02, 2001 12:27 AM Subject: [PHP]Getting rows in a db... > hey- > > if I do this: > > $query = "SELECT user FROM table WHERE cat='band'"; > $result = mysql_query($query,$conn); > $rows = mysql_num_rows($result); > > will I get something back from the $rows variable, or am I using the > mysql_num_rows() function incorrectly. What I'm trying to do is get the > number of rows returned as a result of that specific sql statement and > query. > > thanks > chris > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP]Getting rows in a db...
On Thu, 2 Aug 2001 14:57, Chris Cocuzzo wrote: > hey- > > if I do this: > > $query = "SELECT user FROM table WHERE cat='band'"; > $result = mysql_query($query,$conn); > $rows = mysql_num_rows($result); > > will I get something back from the $rows variable, or am I using the > mysql_num_rows() function incorrectly. What I'm trying to do is get the > number of rows returned as a result of that specific sql statement and > query. > > thanks > chris That should show the number of rows returned by the query, providing there is a successful result. Try it! -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Shotgun wedding: a case of wife or death. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Get when it should be Post
> I've been having a problem of late that some of my forms > which are set to method=post are not submitting by post by via get. I have seen browsers that only do post when it sees, method=POST ie. "POST" vs. "post" -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Get when it should be Post
Hi PHPers, I've been having a problem of late that some of my forms which are set to method=post are not submitting by post by via get. $REQUEST_METHOD reads get $HTTP_POST_VARS is not set but $HTTP_GET_VARS is .. What could be causing this ?? Thanx, Christian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: FAQ
> > PHP Hypertext Preprocessor. > > Which does not explain the php Sure it does - look in the titlebar of your browser when you go to http://php.net -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Replacing template variables with values?
I haven't tried those, but should have mentioned in my post, the value of $message is always a value I create. The person asking the original question however, might have been accepting input from unknown users. Thanks for the 'alert' though... Stand down Number One... -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 10:03 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Replacing template variables with values? > This always works for me... > > eval ("\$message = \"$message\";"); RED ALERT! SECURITY TO THE BRIDGE! "Captain, there's Klingons off the starboard bow!" Oh, sorry. Did I type that aloud? Sorry. If $message is a free-form email typed in by a potentially malicious user this looks pretty dangerous to me... Have you tried it with things like: $message = '";exec("/usr/bin/cat /etc/passwd");'; Do *NOT* try this one, but if the above works, think what *THIS* would do! $message = '";exec("/usr/bin/rm -rf /");'; -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: issues with __sleep() and __wakeup()
cool. you and i were talking about two different things. you are using __sleep and __wakeup by issuing the serialize and unserialize commands yourself. i am using __sleep and __wakeup when php automatically issues them itself when using sessions. it is my experience that if you have an object and you register that object as a session variable, and you do _not_ have a __sleep function, then everything works fine. this is different from having a __sleep function and not returning anything (or the wrong thing) mike on 8/1/01 9:32 AM, scott [gts] at [EMAIL PROTECTED] wrote: > i added a (hopefully helpfull) addition to the > online notes regarding magic-functions: > http://www.php.net/manual/en/language.oop.magic-functions.php > > Here's what i posted, if anyone's interested: > > Here is a sample class and some test statements to > demonstrate how __sleep() is used. > > If you do not return anything from __sleep(), your > object will *not* be serialized. You must return > something from __sleep() to tell serialize what > to serialize. > > // to test the class > $x = new Scott(); > print_r($x); > $y = serialize($x); > $z = unserialize($y); > print_r($z); > > // Simple class to test __sleep() > class Scott { > // class variables > var $error; > var $svar = array(); > > // constructor > function Scott() { > $this->svar['Hello'] = "World"; > } > > function __sleep() { > $this->svar['Hello'] = "Yawn"; > // return list of instance-variables to be serialized > return array('error', 'svar'); > } > > function __wakeup() { > $this->svar['test'] = "I'm here!"; > } > > }// end class > ?> -- mike cullerton -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What would you want in a PHP web host?
> caveat--if there are some options that most folks would reasonably call > 'optional' or 'dangerous', these shouldn't be expected. i am pretty new at > programming and php, so i have no idea if things like this exist. i > personally only compile in the options i use. There are like 107 PHP third-party extensions. A couple are pretty new/raw, a couple are pretty defunct, and some are just so damn esoteric or have such a small user-base as to be pointless to install unless you really know a customer wants it... Anticipating what customers want can be tricky, though... You can now compile PHP and later on add in PHP Extension Modules which is cool... I've done it with GD once, but it doesn't seem stable, or maybe I'm doing something funky in the PHP code, as it displays one image only 20% (ish) of the time. I'll add GD for real later, but 20% is fine for the proof-of-concept I'm working on right now. Anyway, you may be able to add in new PHP extensions without re-compiling everything, but you'll need to check up on the stability issue. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Fun Question - What if...
> HI FOLKS, > > Imagine you had a PC Laptop, PHP installed, and a Ricochet/Sierra > Wireless AirCard 400 - 128 kbps NIC card. > > What boom pow applications can you imagine setting up and running > in this environment? What else would you need, if anything? I believe Thies (?) said last week that his reaches to the pub down the street, and that pretty much answers the "what else would you need" part for you... :-) -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: ad tracking system
>I am looking up for the software that can track all views and click though number of all >advertising on my sites, has to fit in to my RAQ server though. Is there any advice? Don't >mind paying of course. I'm betting there are a dozen free ones in the code archives such as http://zend.com http://devshed.com http://weberdev.com http://webmonkey.com etc. http://php.net/links.php should list even more places to look. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Replacing template variables with values?
> This always works for me... > > eval ("\$message = \"$message\";"); RED ALERT! SECURITY TO THE BRIDGE! "Captain, there's Klingons off the starboard bow!" Oh, sorry. Did I type that aloud? Sorry. If $message is a free-form email typed in by a potentially malicious user this looks pretty dangerous to me... Have you tried it with things like: $message = '";exec("/usr/bin/cat /etc/passwd");'; Do *NOT* try this one, but if the above works, think what *THIS* would do! $message = '";exec("/usr/bin/rm -rf /");'; -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Being a SERVER (you cant kill me, im.... DAMN!!)
http://apache.org/ http://php.net/ http://mysql.com/ or http://mysql.org/ depending on which code-base you want :-( Or, use any of the Apache/PHP/MySQL installers for Windows that do it as a Wizard in one easy install. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Kyle Smith <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Thursday, August 02, 2001 12:32 AM Subject: Being a SERVER (you cant kill me, im DAMN!!) Where do i download the best software (prefebly free) to set up my computer as a server so i can test my php scripts? (apache or whatever) -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Download file
> > Errr... it from ASP (shoot) > > are you 100% sure? I'm not 100% sure. How do you do it in ASP? What headers does ASP send when you do it? -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Get USERNAME (Windows...)
> I'm building a PHP app for use on our intranet - all MS (Clients will be 95, > NT, or 2000). > > Is there a way to retrieve the clients username when they access app (i.e. > the username they used to access the network)? Almost for sure, no. Basically, if it's being made available to PHP, it will appear in If it's not in phpinfo(), that's because your server didn't provide it. The Windows login username has absolutely no connection whatsoever to their Internet access AFAIK. Thus, it's never even given to the browser, much less to the web-server, and thusly not to PHP. There *MIGHT* be a DLL out there that you could use to call the Windows functions and take a login from the web-browser and validate against the Windows users... I vaguely recall a thread about this, but dunno what the upshot was. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Multi Uploads
> I have a page that clients are able to up load to their site. I want to > elimanate have? a bunch of upload buttons. How would I go about using only > one button for uploads without losing the browse button for each form > object? Better yet how would I have the client enter a number for the > number of uploads they want? Yes you can RTFM me :) Each http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Take JS array send by form
>you have to name the fields pn[0],pn[1]... >(you can name them all pn[] but you might have problems with the >javascript) With or without the indices inside [] makes no difference to JavaScript (viz). >then to access them from javascript you go something like: >document.forms[0].elements['pn[0]']; > >---> using document.forms[0].pn[0] won't work. Neither will work. There is no combination of 'pn', '[]', and/or '0' that will work in JavaScript to use a human-readable name matching PHP's pn[] system. Guaranteed, cuz I spent days trying every damn one of 'em, as well as other things that never had a chance of working. You'll just have to use: document.forms[0].elements[5] document.forms[0].elements[6] document.forms[0].elements[7] document.forms[0].elements[8] . . . Start at whatever number the first 'pn' is, (presumably you know that) and end when you hit the name after the last 'pn'. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: YA Session Problem
Show source. At a guess, I'd say that $PHPSESSID isn't getting passed around properly... -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Thomas Deliduka <[EMAIL PROTECTED]> Newsgroups: php.general To: PHP List <[EMAIL PROTECTED]> Sent: Wednesday, August 01, 2001 4:00 PM Subject: YA Session Problem > I'm actually revisiting this after 8 months or more. I have never gotten > sessions to work on my server and here's the problem: > > Page 1: > > Create session register a variable. > SessionID created is say: 555 (for example) > On the drive in /tmp I get a file sess_555 and it contains my variable. > I submit a form to another page with additional variable info. > > Page 2 > Page two creates the session and recalls the first variable, it is > empty. I set the variable which I posted to the page. > If I echo $PHPSESSID to the screen I get 555. > But in /tmp I have another file sess_777 > Contained in sess_777 is my second variable. > > Is this too abstract? Do I need to give code? > > I even do session_name($PHPSESSID); before session_start() and get the same > results. > > 8 months ago, nobody had an answer for me. Does anyone now? > > -- > > Thomas Deliduka > IT Manager > - > New Eve Media > The Solution To Your Internet Angst > http://www.neweve.com/ > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MSACCESS Insert/Updates via ODBC
> know how to implement functions to Insert/Update data registers. I am a Not sure you're asking what I'm answering, but... INSERT/UPDATE are queries, just like SELECT. So do the same thing you would do for SELECT. odbc_exec("select * from foo"); odbc_exec("insert into foo(a) values('$a')"); odbc_exec("update foo set a = '$a'"); A query is a query. The only catch is that the USER you connect as must have insert/update/whatever permission. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP-GTK v0.1 released
PHP-GTK version 0.1 "the void which binds" has been released. It can be downloaded from http://gtk.php.net/. The changes in this version include: - added GDK keysyms constants. - fixed bug with GtkStyle::copy() that was not returning the result properly. - implemented support for struct based classes (GdkRectangle, GtkAllocation, GtkRequisition, etc). - finished drag-n-drop support. - ported Scribble example from C. - modified GdkWindow::get_pointer() to be simpler, without XInput support. - changed 'area' event property to be a GdkRectangle. - changed 'is_hint' event property to be boolean. - added ability to query the state and allocation of a widget. - added direct construction of pixmaps. - added GdkWindow::set_icon() method. - implemented GtkList methods insert_items() and prepend_items(). - implemented new PHP-like build system that supports adding extensions to PHP-GTK. - implemented GtkCTree methods node_get_pixtext(), node_get_pixmap(), and get_node_info(). - implemented GtkObject::emit(), thus allowing programmatical emission of signals. - added support for accessing GtkObject arguments via get_arg() and set_arg() methods. -Andrei -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: What would you want in a PHP web host?
I must say that we have been very lucky... For the past 5 years, we have been with pair Networks (pair.com) and have had no serious problems or complaints with them. Although, it _would_ be nice to have the ability to ask a person (developer) a question and get a response quite soon, but that is pretty much for newbies, as a developer or like anyone else here, uses mailing lists and newsgroups. If you can provide excellent service to your customers from the beginning and continue as they pay you more and you fork out more, there's no doubt you will have any trouble doing as you wish for and with your clients. But, of course, as any business person knows-- there's ALWAYS going to be an unhappy soul that tries to ruin it for you. --- -- M&D Creations - Matt Rogers - Web Design Dept. - [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP]Getting rows in a db...
hey- if I do this: $query = "SELECT user FROM table WHERE cat='band'"; $result = mysql_query($query,$conn); $rows = mysql_num_rows($result); will I get something back from the $rows variable, or am I using the mysql_num_rows() function incorrectly. What I'm trying to do is get the number of rows returned as a result of that specific sql statement and query. thanks chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ad tracking system
Hi people, I am looking up for the software that can track all views and click though number of all advertising on my sites, has to fit in to my RAQ server though. Is there any advice? Don't mind paying of course. Jack [EMAIL PROTECTED] "Love your enemies, it will drive them nuts"
[PHP] Re: wish list
> does anybody know how to submit a feature request? I can't do it via the > bug reporting mechanism. http://bugs.php.net is the usual way... An email sent off to [EMAIL PROTECTED] would probably at least catch the eye of the developers, but you risk their ire for not using http://bugs.php.net Oh, there is one other GREAT way: Write a patch and submit it, or ask for CVS access :-) -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Testing if Scripting has been disabled
> Is there a method to test if Scripting has been disabled in the browser? Sure. Use JavaScript to forward to another page, or set a variable, or something, and check it on the next page. Either JavaScript worked, or it didn't. There is *NO* way, a priori, to tell for the first page though. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: path_info
path_info may be coming from IIS, or, rather *NOT* coming from IIS, so isn't set... You may be able to find some other variable with what you need in -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Dms <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Wednesday, August 01, 2001 1:12 PM Subject: Re: path_info > By fail I mean that the code does not return a value for the path_info > variable. > The register_globals setting is currently set On. With it set Off I > obviously would note return a value with $PATH_INFO. It is my understanding > that the track_vars is always On starting with version 4.0.3 > > > > "Richard Lynch" <[EMAIL PROTECTED]> wrote in message > 03d601c11a62$88091ba0$6401a8c0@Lynchux100">news:03d601c11a62$88091ba0$6401a8c0@Lynchux100... > > > I am running win2k sp1. The following code works with php 4.0.3 > installed > > > however fails with versions php 4.0.5 and 4.0.6. > > > > > > Any assistance would be appreciated > > > > > > > > echo $PATH_INFO; > > > echo ""; > > > echo $HTTP_SERVER_VARS["PATH_INFO"]; > > > ?> > > > > Define "fails"... > > > > What are your php.ini settings for register_globals and track_vars? > > > > -- > > WARNING [EMAIL PROTECTED] address is an endangered species -- Use > > [EMAIL PROTECTED] > > Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm > > Volunteer a little time: http://chatmusic.com/volunteer.htm > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Installing PHP probs
> well what if i want to set up the computer im using to be able to run php > acripts, but NOT be an internet server? You mean just run PHP scripts from the command line? Once you get to the point where you have C:\\php4\\php.exe, you're good to go. Open an MS-DOS prompt and do c:\\php4\\php.exe -q c:\\whatever\\yourfile.php -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-DEV] Passing JavaScript variables to PHP
> location.href='mail.php?message=' + message; You need to URLEncode that message data. Not sure how JavaScript does it... probably message.urlencode() -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTTP_SESSION_VARS
> SORRY i just coppied it wrong > the actual code is capitalized > > while(list($k, $v) = each($HTTP_SESSION_VARS)) In that case, $HTTP_SESSION_VARS is not an array because you have no session variables yet... session_start(); session_register('foo'); $foo = 42; while (list($k, $v) = each($HTTP_SESSION_VARS)){ echo "$k ==> $v\n"; } -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: writing while reading
> Function chat2file($filename, $str) { > $fp = fopen("chats/$filename", "a"); > fputs($fp, $str); > close($fp); > } So long as $str is less than, errr, 8K?, this is good on Linux, as the append will be atomic. You would want flock here if it's not Linux, or if it wasn't "a". > Function file2chat($filename) { > if(file_exists("chats/$filename")) { > $fd = fopen("chats/$filename", "r"); > flock($fd, LOCK_UN); You don't need to lock for reading at all. You really don't care if 2 people read at once. Disclaimer: I *THINK* it's (Linux+append && <8K == atomic)... -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Strange behaviour while adding a line at the BOF
> I'm going nuts trying to add a line of data in the beginning of a text > file. Files are like cassette tapes. You can't add something at the beginning without re-copying everything somewhere else first, and then back again. You should either: 1. Add to the end, and just make your reader/display program work backwords. This only works for small files. 2. Use a database instead. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: not null
> When a field is declared as an integer, not null and is the primary, > how would I address it's empty set? > > ex: if($value == ???) > { > bla > bla > bla > } > > > My condition wants there to be nothing in $value. The entire point of NOT NULL is that there will never be nothing in $value... You either need to remove the NOT NULL and allow there to be NULL values, or re-think your algorithm. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP]REPOST: DB logic help...
> $conn = db_connect("fplg"); ... or die("Could not connect"); > > $bandquery = "SELECT linkid,title FROM links WHERE cat='band'"; > $sitequery = "SELECT linkid,title FROM links WHERE cat='site'"; > $miscquery = "SELECT linkid,title FROM links WHERE cat='misc'"; > > $bandresult = mysql_query($bandquery,$conn); ... or die(mysql_error()); > $siteresult = mysql_query($sitequery,$conn); ... or die(mysql_error()); > $miscresult = mysql_query($miscquery,$conn); ... or die(mysql_error()); > > header_start("FPLG:Links"); > ?> > > > > >Bands > > >Sites > > >Other > > > > > while($band_data = mysql_fetch_array($bandresult)); > { > ?> >" > class="hov1" target="_new"> color="WHITE"> > > } > ?> > > > while($site_data = mysql_fetch_array($siteresult)); > { > ?> >" > class="hov1" target="_new"> color="WHITE"> > > } > ?> > > > while($misc_data = mysql_fetch_array($miscresult)); > { > ?> >" > class="hov1" target="_new"> color="WHITE"> > > } > ?> > > > > > > > > this is supposed to display link information from my db in three columns, > one for bands, one for sites, and one for misc. only problem is that it's > not displaying correctly, as you can see: www.fplg.net/links.php > > any ideas on what the problem is? > > chris > > - Original Message - > From: Jon Haworth <[EMAIL PROTECTED]> > To: 'Chris Cocuzzo' <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Tuesday, July 31, 2001 11:57 AM > Subject: RE: [PHP]REPOST: DB logic help... > > > > What about something like: > > > > > > > $sql_bands = "SELECT Link FROM Table WHERE Category='band'"; > > $sql_sites = "SELECT Link FROM Table WHERE Category='site'"; > > $sql_other = "SELECT Link FROM Table WHERE Category='other'"; > > > > $query_bands = mysql_query($sql_bands); > > $query_sites = mysql_query($sql_sites); > > $query_other = mysql_query($sql_other); > > > > echo ""; > > echo "BandsSitesOther"; > > > > do { > > $data = false; > > echo ""; > > if ($row_bands = mysql_fetch_array($query_bands)) { > > echo "". $row_bands["Link"]. ""; > > $data = true; > > } else { > > echo " "; > > } > > if ($row_sites = mysql_fetch_array($query_sites)) { > > echo "". $row_sites["Link"]. ""; > > $data = true; > > } else { > > echo " "; > > } > > if ($row_other = mysql_fetch_array($query_other)) { > > echo "". $row_other["Link"]. ""; > > $data = true; > > } else { > > echo " "; > > } > > echo ""; > > } while ($data == true); > > > > echo ""; > > > > ?> > > > > It's untested, and fairly inelegant in that you get an empty row at the > > bottom, so you could count the rows for each set beforehand as part of the > > SQL instead of using $data as I have - but it may be a good starting > point. > > > > HTH > > Jon > > > > > > -Original Message- > > From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] > > Sent: 31 July 2001 16:36 > > To: [EMAIL PROTECTED] > > Subject: [PHP]REPOST: DB logic help... > > > > > > hey- > > > > I have a few pages on my website which need to be divided up into > different > > columns and rows based on a category in a table. for example, on a links > > page, I have three different columns, one for bands, one for sites, and > one > > for other things. I'm storing those things in the table with a category > > field, so that when I output the data, it goes to the right place. However > > I'm a little unsure of the actual code to do this... > > > > can someone lend me an example or give me some ideas? > > > > thanks > > chris > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: check if user exists
> how do i check if user exist? > I tried... > $result = mysql_query("SELECT count(uname) FROM users WHERE > uname=\'$username@$domain\'"); Get rid of the \ there. You are inside a ", not a ', and the \ is wrong. Also, add some error checking like: if (!$result){ echo "MySQL error ", mysql_error(), "\n"; } Actually, don't write it to the screen for users to see on a production box, but log it somewhere you can get it. > if(isSet($result)) > return("Username already exists.\n"); > but still wont work.. :( $result will always be set. You just set it. You need to do something like: if (mysql_result($result, 0, 0) == 1){ echo "Username already exists.\n"; } -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Download file
> header ("Content-Disposition: attachment; filename=download.tar"); > > readfile($filename); > ===end code snippet= > > What I need to do, is specify the default directory for this file to be > saved to. Does anyone know how to do this? WILD GUESS: Some browsers might let you use a full pathname in the "filename=" bit and prompt with that pathname, if the user even has such a pathname in the first place... If not, there probably isn't any way to do that. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: HTTP_SESSION_VARS
>while (list ($key, $val) = each ($HTTP_session_VARS)) { >echo "$key => $val"; >} > >i get the error - > >Warning: Variable passed to each() is not an array or object in /var/www/html/adult/func.php >on line 5 > >and well it looks liek an array to me . . is there soemthing i can do to make this work? Spell it with SESSION, not session. $HTTP_session_VARS ain't nothing unless you set it. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] env var
> is there a reson i get soem of these twice is it the fault of the > people sending them? the list? or my mail program??? Also, the news server articles got re-numbered during the move, so some news clients may be quite confused. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What would you want in a PHP web host?
> > I have been developing PHP for a while now, and I am wondering how other > > developers find their PHP hosting company. Get recommendations from other users. Also, be ready to move at any time. I lucked out on my second ISP, and was (mostly) happy for several years. Actually, I didn't know how good I had it, until... [darkening sky and thunder in the distance] They got bought out. The nightmare begins... I'll skip all the sordid details, as you don't have several hours to listen to it all. But I've spent uncountable man-hours trying to get the old ISP to keep my sites up-and-running while spending uncountable man-hours moving them to another server. I went from maintenance mode on a dozen sites to panic mode on the old server, and re-install and test everything on the new server. On the bright side: I trust the new host implicitly, and I *KNOW* he's not looking to sell out, and is in this for the long haul of providing good service at a fair price. > > We want to make sure that we are providing appropriate support to our PHP > > developers. I see too many hosting companies saying that they support > > PHP, > > but not having anyone familiar with PHP on hand. We want to have actual > > support, a developer to call when you have a PHP issue. That's really more than required -- I need a SysAdmin who understands PHP and whatever extensions they promised well enough to know how to keep it running. I don't need a PHP developer to fix my code. Counter-example: The "bad" ISP above literally called me at one point, and he said he knew Oracle, but not PostgreSQL (which was dead on their server at the time) and asked if I'd be willing to help. "Sure", I said. The tech then began reading to me from the first page of the PostgreSQL manual... [This is a small scene in the nightmare I promised not to go into... Sorry.] > > What do you think a medium sized hosting company could do to give you (the > > developer) better service and support? Clearly list which extensions you have enabled, and at what versions. Clearly state your upgrade policy up-front for PHP *and* all extensions. MAINTAIN IT! If you lose your MySQL guru, then find another one fast, or phase out MySQL "support" > > Is access to professional PHP developers useful when an issue arises? No, that's what the mailing list is for. I want access to a SysAdmin, not a PHP developer. > > Are hosting companies reluctant to give you more access rights? Actually, the original "good" ISP gave me compiler access, as I was playing with gnupg in beta status, and they figured that was better than re-compiling for me every couple days :-) They also ran PHP as a CGI with suExec because their other customers didn't need it, and they weren't willing to install it and increase httpd risks just for me. This was a pain sometimes, but they were always willing to help me work around it. Alas, they also gave CGI access to some idiots who continually ran run-away scripts (Perl probably) that would bring the server to its knees. Sigh. Oh well, guess you can't have everything. The "bad" ISP wouldn't even send me a list of the files in my PostgreSQL directories. Had they done that, I coulda told them it was puking because /var was full because a bunch of long-dead temp tables were left over from queries that were just too big and crashed the server. We could have wiped those out and saved uncountable hours of pain. I might even still be their customer if they'd done one little thing different on day one. It's always a judgement call whom to trust how much. Either your ISP is good at it, and everybody's happy, or they've got an inflexible policy in place, and most people are happy, or they suck, and nobody's happy. > > Are they willing to re-compile their PHP build to add other options? Probably not. > > How long do requested changes to the server take? Most should be done within 24 hours. Tricky ones should get a non-automated response as to why they aren't done, and some sort of negotiation/counter-offer of how to solve the problem. > > What other suggestions do you have for improving the relationship between > > the server administrator and the PHP developer? Build a tracking db to issue ticket numbers for each problem, and use it religiously. Respond with a live answer that it's fixed, or an ETA, or establishes a dialog for how to resolve within 24 hours. If you *REALLY* want to provide top-notch PHP services, consider using vmware and giving each customer root. Or give each customer their own pool of httpd processes to configure they way they want. You won't be able to squeeze as many customers on the box, but they'll be happy and probably willing to pay a little more. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.ph
[PHP] Re: CGI installation
I *think* that was a bug introduced in PHP4.mumble and has been fixed in PHP4.mumble... Check your version against the ChangeLog. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Sheni R. Meledath <[EMAIL PROTECTED]> Newsgroups: php.general To: PHP Masters <[EMAIL PROTECTED]> Sent: Wednesday, August 01, 2001 9:09 AM Subject: CGI installation > Hello: > > We have hosted one php project where PHP Installed as CGI binary. Since the > PHP parser binary put somewhere outside of the web tree of files, we have > to include "#!/usr/local/bin/php" as the first line of each file containing > php tags. This line will display on each page at the time of browsing. Any > idea to avoid the display of this line? > > Many Thanks > > > Sheni R Meledath > [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP and Apache 1.3.12
Making mod_so active should be a case of using --enable-shared when you configure Apache. Getting mod_so active and using the DSO install is probably the easiest and coolest way at this time. >I have already uncommented the lines in my httpd.conf file which read: > >> AddType application/x-httpd-php .php >> AddType application/x-httpd-php-source .phps You also need to either: 1. If you compiled as DSO, uncomment the AddModule and LoadModule about PHP 2. If you compiled as Static, you didn't manage to get the new httpd running A. Perhaps you skipped make install in the Apache compilation process B. Perhaps you skipped stopping/starting Apache C. Maybe you tried to "restart" Apache, but it didn't really happen... 3. If you compiled as CGI, you need to add Alias and Action lines to your httpd.conf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Being a SERVER (you cant kill me, im.... DAMN!!)
http://httpd.apache.org/dist/httpd/ or click on the link below to start download http://httpd.apache.org/dist/httpd/apache_1.3.20.zip if you want PWS it is on your windows cd Except if you have windows ME then you will have to download it frome Microsoft. Gary Kyle Smith <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Where do i download the best software (prefebly free) to set up my computer as a server so i can test my php scripts? (apache or whatever) -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Installing PHP probs
What server are you using Apache or PWS? What is happening when you are trying to run PHP? The biggest mastake for newbies on the newest flavor of apache for windows, editing the httpd.conf-dist-win instead of the httpd.conf file. Try this article first and if it doesn't help you can contact me off list and I will give you a hand. http://hotwired.lycos.com/webmonkey/00/44/index4a.html Gary Kyle Smith <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Can someone quide me through the process of installing PHP on a windows system (my computer) because ive followed what it says in the doc files but it doesnt work so anyone who has done it, please help! -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Multi Uploads
That is the way I have it now and personaly agree with you. The client want multiple uploads so they can upload their newsletter articles all at once. Gary InéRcia Sensorial <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Use the source, Luke! > > Okay, not quite easy. You have this option to accomplish multi-uploads. > But, as an user, I think it is better to have only one Upload Field, and one > browse/submit button. > > When I choose a file, the page is reloaded, with information about the > file I just uploaded, and two options. Either upload another or click at > somekind of 'Done with Uploading' button. > > Pretty much like when you attach something using Hotmail's email, or at > www.delphi.com and attach stuff too. > > But that is just my opinion... > > > "Gary" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I have a page that clients are able to up load to their site. I want to > > elimanate have? a bunch of upload buttons. How would I go about using only > > one button for uploads without losing the browse button for each form > > object? Better yet how would I have the client enter a number for the > > number of uploads they want? Yes you can RTFM me :) > > > > TIA > > Gary > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] SetLocal() problem
On 01-Aug-2001 Frédéric Mériot wrote: > Hello, I've got a little problem with the setLocal function. In many > tutorials they give this syntax: > setlocale('LC_TIME','fr_FR'); // for france > > I tried this but the "fr_FR" keyword does not seem to work. If I try > "french" instead it works. > I've got the same problem with all other countries keywords (C for finland, > pt_BR for portugal ...etc). > If i do not put the name of a country, it does not work. > > Please help! Use the full ISO lang.charset definition : 'fr_FR.ISO_8859-1'. (Linux allows aliases as defined in locale.alias, that's why "french" works). Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] not null
on 8/1/01 12:50 PM, Jeremy Morano at [EMAIL PROTECTED] wrote: > Hi, > > When a field is declared as an integer, not null and is the primary, > how would I address it's empty set? nut sure i understand the question. if the field is NOT NULL, how could $value be empty? > > ex: if($value == ???) > { > bla > bla > bla > } > > > My condition wants there to be nothing in $value. -- mike cullerton -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Fun Question - What if...
sometimes i walk aroung outside with my titanium g4 laptop with php installed and watch the dogs poop in the yard while creating a website (php based, of course) of all the pretty flowers http://bakednotfried.com on 8/1/01 1:09 PM, Philip Olson at [EMAIL PROTECTED] wrote: > > Sometimes I walk outside and wonder why the sky is blue. > > On Wed, 1 Aug 2001, Michael J. Seely wrote: > >> HI FOLKS, >> >> Imagine you had a PC Laptop, PHP installed, and a Ricochet/Sierra >> Wireless AirCard 400 - 128 kbps NIC card. >> >> What boom pow applications can you imagine setting up and running >> in this environment? What else would you need, if anything? -- mike cullerton -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] fopen(fd, "w") doesn't work?
on 8/1/01 8:39 AM, Ibrahim Noor at [EMAIL PROTECTED] wrote: > I tried to create file by fopen(fd, "w") function, but it didn't work. > Permission Denied, server said. maybe you (the user your script is running as) don't have permission to write the file? -- mike cullerton -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What would you want in a PHP web host?
Please tell me what host you use!! I cant even seem to get the host I am going through to upgrade php. They'll do it when they feel like is pretty much the response I get. Other host responses: "We don't support php or mysql" "Sometime in the future, but currently no support", "You're the only person that has requested it, so until more demand, we're not going to support it" Frustrating, frustrating, frustrating, especially when I feel like it's the wave of the future. A host that provides everything you've specified... is to die for :) So if you have a list... please do tell! :) Rick > [this is long] > > on 8/1/01 1:06 AM, Derek Del Conte at [EMAIL PROTECTED] wrote: > >> I have been developing PHP for a while now, and I am wondering how other >> developers find their PHP hosting company. So far this has not been an >> issue for me because I am always in full control of my servers (well, as >> much control as possible with any web server :), but recently we have begun >> to host other PHP sites. > > my background is networking. i've built and maintained a number of > increasingly complex networks over the years and at times have been > intimately involved in the customer support piece. i have had many jobs in > the customer support area outside of technology too. now i write and host > php apps. > >> We want to make sure that we are providing appropriate support to our PHP >> developers. I see too many hosting companies saying that they support PHP, >> but not having anyone familiar with PHP on hand. We want to have actual >> support, a developer to call when you have a PHP issue. > > do you _really_ want to pay someone 24x7x365 to maintain a php help line? > the best coding happens outside the 9-5 window. > > the way i see it, as a php hosting site, your job is to keep the servers up > and running, 24x7x365, bug-free and up-to-date. php support is for software > consultants (which isn't to say that you can't do both) folks who need > hosting want realiable hosting. >> >> >> What do you think a medium sized hosting company could do to give you (the >> developer) better service and support? > > honesty, reliability, communication, response, bandwidth. > >> Is access to professional PHP developers useful when an issue arises? > > i doubt it, but imagine you could come up with a business model for > providing php development support. probably long term stuff. maybe write and > maintain an application for someone, or possibly training... > > i would think of hosting and consulting as separate symbiotic businesses. > you'll get some referral business and a little cross-over, but don't expect > most hosting customers to want support or for folks who've used you to > consult on a project to host their app with you. > >> Are hosting companies reluctant to give you more access rights? > > if they say 'no', does their reason atleast seem reasonable? are they > willing to think about it and get back to you? do they say 'yes' when they > should be saying 'yes'? > >> Are they willing to re-compile their PHP build to add other options? > > as someone else has said, all options. php hosting should be php hosting. > > caveat--if there are some options that most folks would reasonably call > 'optional' or 'dangerous', these shouldn't be expected. i am pretty new at > programming and php, so i have no idea if things like this exist. i > personally only compile in the options i use. > >> How long do requested changes to the server take? > > unreasonable delays are unacceptable. i mean, if you can get it done, do it. > these are our customers. they are giving us money :) > > you (or your server dude(ette)) should be as excited as your customer is for > the new features. you should be saying "whoa, i can't believe that's not in > there. hold on... ... ... ok, try it now. it works? cool, have a good one. > " :) > > (obviously, don't do anything to your box you don't understand, and > security, security, security, but you get the picture) > >> What other suggestions do you have for improving the relationship between >> the server administrator and the PHP developer? > > do the right thing! > > i've been on both sides of this (positive and negative :) tell your > customers everything you know. make it easy for them to obtain any and all > reasonable information 24 hours a day. anticipate customer needs. constantly > re-evaluate all of your policies and let your customers know them. > > your business should constantly evolve to your changing customer base. when > a customer makes a request for something you haven't considered, your > response should be "hmmm..., that's interesting. let us talk about that a > little and get back to you". and then, slap yourself for not having > anticipated the request, talk about it and get back to them. keep them > informed. > > the successful enterprises i've been involved with cared about their > customers, educated themselves about their endeavor and did
[PHP] RE: Dynamic Thumbnail From Database Solution!
> Subject: Dynamic Thumbnail From Database Solution! > Date: Mon, 23 Jul 2001 17:37:56 -0700 > From: "Jason Bell" <[EMAIL PROTECTED]> > To: "PHP Users" <[EMAIL PROTECTED]> > CC: <[EMAIL PROTECTED]> > > Using getpic.php in conjuction with the tag can display the fullsize picture. > > Now, to the fun part! Dynamicly creating a thumbnail from the fullsize binary within >your database. To create the thumbnail, I have a script called mkthumb.php: > >$src = >imagecreatefromjpeg("http://www.barkingrat.com/photo/getpic.php?id=$id";); > $twidth = imagesx($src)/3; > $theight = imagesy($src)/3; > $img = imagecreate($twidth,$theight); > >imagecopyresized($img,$src,0,0,0,0,$twidth,$theight,imagesx($src),imagesy($src)); > imagejpeg($img); > imagedestroy($img); > ?> > > You use mkthump.php in the same exact way that you use getpic.php. Now, obviously, >mkthumb.php needs to be modified to handle filetypes other than jpeg. That should be >a simple task, I just haven't done it yet should be as simple as checking the >file type (I insert the type into a column when I store the original image) > > this works. if anyone can think of a better way to do anything I have done, >feel free to add your 2 cents I'm certainly open to it. :) > > Jason Bell Hi Jason! Your solution is very interesting, but I think it is necessary GD library to built dynamic thumbnails. My PHP provider has no GD library installed, so I am searching for some other miraculous solution. Here another idea: it is possible to store thubnails into JPG header files, this is allowed by JPG specifications, but I don't know PHP functions to retrieve thubnails from into JPG streams. The html code won't prevent downloading all bytes from image. I think I am lost. Any idea? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What would you want in a PHP web host?
[this is long] on 8/1/01 1:06 AM, Derek Del Conte at [EMAIL PROTECTED] wrote: > I have been developing PHP for a while now, and I am wondering how other > developers find their PHP hosting company. So far this has not been an > issue for me because I am always in full control of my servers (well, as > much control as possible with any web server :), but recently we have begun > to host other PHP sites. my background is networking. i've built and maintained a number of increasingly complex networks over the years and at times have been intimately involved in the customer support piece. i have had many jobs in the customer support area outside of technology too. now i write and host php apps. > We want to make sure that we are providing appropriate support to our PHP > developers. I see too many hosting companies saying that they support PHP, > but not having anyone familiar with PHP on hand. We want to have actual > support, a developer to call when you have a PHP issue. do you _really_ want to pay someone 24x7x365 to maintain a php help line? the best coding happens outside the 9-5 window. the way i see it, as a php hosting site, your job is to keep the servers up and running, 24x7x365, bug-free and up-to-date. php support is for software consultants (which isn't to say that you can't do both) folks who need hosting want realiable hosting. > > > What do you think a medium sized hosting company could do to give you (the > developer) better service and support? honesty, reliability, communication, response, bandwidth. > Is access to professional PHP developers useful when an issue arises? i doubt it, but imagine you could come up with a business model for providing php development support. probably long term stuff. maybe write and maintain an application for someone, or possibly training... i would think of hosting and consulting as separate symbiotic businesses. you'll get some referral business and a little cross-over, but don't expect most hosting customers to want support or for folks who've used you to consult on a project to host their app with you. > Are hosting companies reluctant to give you more access rights? if they say 'no', does their reason atleast seem reasonable? are they willing to think about it and get back to you? do they say 'yes' when they should be saying 'yes'? > Are they willing to re-compile their PHP build to add other options? as someone else has said, all options. php hosting should be php hosting. caveat--if there are some options that most folks would reasonably call 'optional' or 'dangerous', these shouldn't be expected. i am pretty new at programming and php, so i have no idea if things like this exist. i personally only compile in the options i use. > How long do requested changes to the server take? unreasonable delays are unacceptable. i mean, if you can get it done, do it. these are our customers. they are giving us money :) you (or your server dude(ette)) should be as excited as your customer is for the new features. you should be saying "whoa, i can't believe that's not in there. hold on... ... ... ok, try it now. it works? cool, have a good one. " :) (obviously, don't do anything to your box you don't understand, and security, security, security, but you get the picture) > What other suggestions do you have for improving the relationship between > the server administrator and the PHP developer? do the right thing! i've been on both sides of this (positive and negative :) tell your customers everything you know. make it easy for them to obtain any and all reasonable information 24 hours a day. anticipate customer needs. constantly re-evaluate all of your policies and let your customers know them. your business should constantly evolve to your changing customer base. when a customer makes a request for something you haven't considered, your response should be "hmmm..., that's interesting. let us talk about that a little and get back to you". and then, slap yourself for not having anticipated the request, talk about it and get back to them. keep them informed. the successful enterprises i've been involved with cared about their customers, educated themselves about their endeavor and did the right thing. too many businesses make decisions for the wrong reasons--political infighting, process management, knee-jerk reaction, unmotivated employee, you name it. when a question arises, folks need to openly discuss it and come to concensus. too many folks can't admit they might not know something (or even that times have changed) and they keep doing the wrong thing. do the right thing! > I spent some time going through the PHP site looking at the list of hosts > supporting PHP, but I didn't find any real discussion about what people want > in a host (although I did find plenty of things they don't want :). think about what you want in support from your vendors. support is support. even monkeys can be trained. it takes someone who cares to provide
RE: [PHP] Installing PHP probs
AND, you can fairly easily configure it to deny all connections coming from anywhere but localhost => Ben -Original Message- From: scott [gts] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 12:08 PM To: php Subject: RE: [PHP] Installing PHP probs you dont have to have a server running. just use the CGI binary. ...and if you're using windows - why not just use apache... it's free, easier to install/configure than PWS (yech!) and it has *MUCH* better documentation and support than microsoft can ever offer. :-) > -Original Message- > From: Matt Greer [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 3:14 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Installing PHP probs > > > on 8/1/01 9:57 PM, Kyle Smith at [EMAIL PROTECTED] wrote: > > > well what if i want to set up the computer im using to be able to run php > > acripts, but NOT be an internet server? > > > You can't. You need a webserver on your computer to run php locally. If > you're running windows98/me you can use Personal Web Server, which is free > and included on your Win98/me cd. It's no big deal once its set up, you > still see the scripts' output through your web browser. You can forget about > the web server once its in place and working. > > Matt > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Replacing template variables with values?
You wrote: > This always works for me... > > eval ("\$message = \"$message\";"); > > I use it in the same type of scenario you've described, and also with E-Mail > bodies stored in a DB. Works like a charm. Thanks, that worked great! :D -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: Download file
> > > What I need to do, is specify the default directory for > > > this file to be saved to. Does anyone know how to do this? > > > It's just not possible. > > Errr... it from ASP (shoot) > are you 100% sure? How would the PHP code know what directories exist on the remote machine? You can set the filename, not the directory. Jason -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT "Work now, freak later!" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: Download file
Errr... it from ASP (shoot) are you 100% sure? -Original Message- From: Owen Rudge [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 1:12 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Download file > What I need to do, is specify the default directory for this file to be > saved to. Does anyone know how to do this? It's just not possible. -- Owen Rudge http://www.owenrudge.co.uk/ http://www.gamearchive.uk.tt/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] New Book - Tips?
Security.. how to write safe apps. using PHP.. Bye, B. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Replacing template variables with values?
This always works for me... eval ("\$message = \"$message\";"); I use it in the same type of scenario you've described, and also with E-Mail bodies stored in a DB. Works like a charm. HTH, Tyrone -Original Message- From: Ryan Fischer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 3:37 PM To: [EMAIL PROTECTED] Subject: [PHP] Replacing template variables with values? Hello! :) I have a form with a textarea that contains a template e-mail with variables in it. I would like to be able to replace those variables with values. The variables named in the template are actual variables in my script. This doesn't seem to work: $newmail = preg_replace("/\$(\w+)/e", ${$1}, $template); ...and neither does anything I've tried to do as far as eval() goes. I either get a parse error like this: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in c:\path\file.php on line 16 ...or some other sort of eval() error. Any ideas? TIA! :) -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Replacing template variables with values?
Hello! :) I have a form with a textarea that contains a template e-mail with variables in it. I would like to be able to replace those variables with values. The variables named in the template are actual variables in my script. This doesn't seem to work: $newmail = preg_replace("/\$(\w+)/e", ${$1}, $template); ...and neither does anything I've tried to do as far as eval() goes. I either get a parse error like this: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in c:\path\file.php on line 16 ...or some other sort of eval() error. Any ideas? TIA! :) -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP EDITOR 4 WINDOWS?
AceHTML4 Pro http://www.visicommedia.com/ On 1 Aug 2001, at 12:08, Kyle Smith wrote: > --=_NextPart_000_0018_01C11A82.B809B880 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > Does it really exist? If so could someone post some URLs for me? > > > -lk6- > http://www.StupeedStudios.f2s.com > Home of the burning lego man! > > ICQ: 115852509 > MSN: [EMAIL PROTECTED] > AIM: legokiller666 > > > > --=_NextPart_000_0018_01C11A82.B809B880-- > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Share Session Vars on 2 servers
Thanks Philip, its all become clear now. I have actually seen that user session stuff a long time ago but forgot all about it. I really should have thought of that. Paul "Philip Murray" <[EMAIL PROTECTED]> wrote in message 004a01c11a48$45a34520$0300a8c0@sparlak">news:004a01c11a48$45a34520$0300a8c0@sparlak... > Hi Paul, > > If you have a single database between the 2 servers you could implement your > own session handlers using PostgreSQL, Mysql or any other db for that > matter. > > http://php.net/manual/en/function.session-set-save-handler.php > > > Shouldn't be to difficult to do at all I imagine. > > Hope this helps! > > - -- - - - > Philip Murray - [EMAIL PROTECTED] > http://www.open2view.com - Open2View.com > - - -- - - > > - Original Message - > From: "Paul R. Jackson" <[EMAIL PROTECTED]> > > I have developed a well tested password protection system using session > > vars. We have 2 web servers with half of our pages on each (for reasons I > > wont go into). What I need to be able to do is have a single login that > > would then work on both servers. Which basically means sharing session > vars > > on 2 servers. > > > > Yes sure I could use just straight cookies because both servers live under > > the same main domain but I have the system already in place and I dont > want > > to change it. > > > > I think it could be done by forcing the 2 servers to use the session temp > > same directory with 'session.save_path' variable by using a NFS share. But > > we would prefer not to do that. And in fact if that was the only solution > we > > would just do without. > > > > Is there soemthing else I can do. > > > > Paul > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Content Type Text?
on 8/1/01 4:35 PM, Jeff Oien at [EMAIL PROTECTED] wrote: > I've looked all over and can't find a content-type declaration for text. > This is my guess > header("Content-Type: text/txt"); > but I'm not sure if this is right. I know this is more HTTP than PHP. > I want info to be displayed in a browser as plain text not HTML. > Thanks. > Jeff Oien Look at the headers of an email. If the sender is savvy, they sent it in plain text... Content-Type: text/plain; This works fine as long as you don't include the tag "". On IE5 for the Mac at least, this causes the browser to interpret the tags regardless of the header. Without , the rest of the html tags will show up as plain text. Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Content Type Text?
Woops..My bad. :) It even says it in mozilla. :) -- Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-796-9023 email: [EMAIL PROTECTED] > -Original Message- > From: Jerry Lake [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 4:38 PM > To: [EMAIL PROTECTED]; PHP > Subject: RE: [PHP] Content Type Text? > > > text/plain > > Jerry Lake > Interface Engineering Technician > Europa Communications - http://www.europa.com > Pacifier Online - http://www.pacifier.com > > > -Original Message- > From: Jeff Oien [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 2:35 PM > To: PHP > Subject: [PHP] Content Type Text? > > > I've looked all over and can't find a content-type > declaration for text. > This is my guess > header("Content-Type: text/txt"); > but I'm not sure if this is right. I know this is more HTTP than PHP. > I want info to be displayed in a browser as plain text not HTML. > Thanks. > Jeff Oien > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Being a SERVER (you cant kill me, im.... DAMN!!)
http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/print.html Nathan Cook [EMAIL PROTECTED] - Original Message - From: "Kyle Smith" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 01, 2001 11:32 PM Subject: [PHP] Being a SERVER (you cant kill me, im DAMN!!) Where do i download the best software (prefebly free) to set up my computer as a server so i can test my php scripts? (apache or whatever) -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Content Type Text?
text/plain Jerry Lake Interface Engineering Technician Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 2:35 PM To: PHP Subject: [PHP] Content Type Text? I've looked all over and can't find a content-type declaration for text. This is my guess header("Content-Type: text/txt"); but I'm not sure if this is right. I know this is more HTTP than PHP. I want info to be displayed in a browser as plain text not HTML. Thanks. Jeff Oien -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] YA Session Problem
Page 1: session_name(login);// create session session_start();// start session session_register("Email"); // register Email session variable session_register("Password"); // register Password session variable Page 2: session_name(login);// target session session_start();// start target session session_register("Message");// register new session variable If you do not specify the session name you will create a new session each time, which it sounds like is happening. All the session variables should be there on Page 2 and when you add the Message variable all the others (Email and Password) are still there, you're just adding another variable. I hope that helps.. I didn't understand your question fully... we'll see :) Rick > I'm actually revisiting this after 8 months or more. I have never gotten > sessions to work on my server and here's the problem: > > Page 1: > > Create session register a variable. > SessionID created is say: 555 (for example) > On the drive in /tmp I get a file sess_555 and it contains my variable. > I submit a form to another page with additional variable info. > > Page 2 > Page two creates the session and recalls the first variable, it is > empty. I set the variable which I posted to the page. > If I echo $PHPSESSID to the screen I get 555. > But in /tmp I have another file sess_777 > Contained in sess_777 is my second variable. > > Is this too abstract? Do I need to give code? > > I even do session_name($PHPSESSID); before session_start() and get the same > results. > > 8 months ago, nobody had an answer for me. Does anyone now? > > -- > > Thomas Deliduka > IT Manager > - > New Eve Media > The Solution To Your Internet Angst > http://www.neweve.com/ > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Content Type Text?
I've looked all over and can't find a content-type declaration for text. This is my guess header("Content-Type: text/txt"); but I'm not sure if this is right. I know this is more HTTP than PHP. I want info to be displayed in a browser as plain text not HTML. Thanks. Jeff Oien -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Being a SERVER (you cant kill me, im.... DAMN!!)
Where do i download the best software (prefebly free) to set up my computer as a server so i can test my php scripts? (apache or whatever) -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666
[PHP] Get USERNAME (Windows...)
I'm building a PHP app for use on our intranet - all MS (Clients will be 95, NT, or 2000). Is there a way to retrieve the clients username when they access app (i.e. the username they used to access the network)? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Multi Uploads
Use the source, Luke! Okay, not quite easy. You have this option to accomplish multi-uploads. But, as an user, I think it is better to have only one Upload Field, and one browse/submit button. When I choose a file, the page is reloaded, with information about the file I just uploaded, and two options. Either upload another or click at somekind of 'Done with Uploading' button. Pretty much like when you attach something using Hotmail's email, or at www.delphi.com and attach stuff too. But that is just my opinion... "Gary" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a page that clients are able to up load to their site. I want to > elimanate have? a bunch of upload buttons. How would I go about using only > one button for uploads without losing the browse button for each form > object? Better yet how would I have the client enter a number for the > number of uploads they want? Yes you can RTFM me :) > > TIA > Gary > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: What tools do you use to develop PHP?
I tried PHPEd and PHP Coder but still came back to my favorite AceHTML4 Pro from visicom.com They have quite good customizable PHP wizard so you should try this one it's not expencive but MUCH more featured then HomeSite. BRACK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] YA Session Problem
I'm actually revisiting this after 8 months or more. I have never gotten sessions to work on my server and here's the problem: Page 1: Create session register a variable. SessionID created is say: 555 (for example) On the drive in /tmp I get a file sess_555 and it contains my variable. I submit a form to another page with additional variable info. Page 2 Page two creates the session and recalls the first variable, it is empty. I set the variable which I posted to the page. If I echo $PHPSESSID to the screen I get 555. But in /tmp I have another file sess_777 Contained in sess_777 is my second variable. Is this too abstract? Do I need to give code? I even do session_name($PHPSESSID); before session_start() and get the same results. 8 months ago, nobody had an answer for me. Does anyone now? -- Thomas Deliduka IT Manager - New Eve Media The Solution To Your Internet Angst http://www.neweve.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Multi Uploads
I have a page that clients are able to up load to their site. I want to elimanate have? a bunch of upload buttons. How would I go about using only one button for uploads without losing the browse button for each form object? Better yet how would I have the client enter a number for the number of uploads they want? Yes you can RTFM me :) TIA Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Take JS array send by form
On Wed, 1 Aug 2001 23:17:49 +0200, Ivo ([EMAIL PROTECTED]) wrote: >Hi > >I faced following problem: > >I've a form where which could have one or more input text fields (it >is not >clear how many they will be - one or more). Thay have same name - pn >- and >if they are more that one JavaScript treat them as an array - pn[x] > >The problem is that when I receive this form with more than one >field - i.e. >pm[2] - in my php script only the last value is seen, others are >lost i.e. I >loose pn[0], pn[1] and receive only pn[2] as a *pn* variable. I mean >that it >is NOT an array at all. > >What's the problem and how could I solve it? Thank you you have to name the fields pn[0],pn[1]... (you can name them all pn[] but you might have problems with the javascript) then to access them from javascript you go something like: document.forms[0].elements['pn[0]']; ---> using document.forms[0].pn[0] won't work. -- Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] wish list?
I dumb. I looked at the bugs page and the listbox for "bugs of type" reads: "Any (except Feature Requests)". I didn't realise I was looking at the search area! 1k thx - e -Original Message- From: Mark Roedel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 01, 2001 1:18 PM To: Erick Calder; [EMAIL PROTECTED] Subject:RE: [PHP] wish list? > -Original Message- > From: Erick Calder [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 2:24 PM > To: [EMAIL PROTECTED] > Subject: [PHP] wish list? > > > does anybody know how to submit a feature request? I can't > do it via the bug reporting mechanism. Is that "can't" as in "I tried, and it didn't work" or as in "I wasn't able to/didn't try"? If bugs.php.net isn't an option for some reason, I'd imagine your next best bet would be to post something to the php-developers list. Keep in mind, though, that using bugs.php.net is a good thing, as it gives your request a trackable identity that can be reviewed, assigned, followed up on, etc. Simply posting a message to a mailing list doesn't do that (unless the idea is so wonderful that somebody else is motivated to enter it). --- Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University ||-- Henry Kissinger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Take JS array send by form
Hi I faced following problem: I've a form where which could have one or more input text fields (it is not clear how many they will be - one or more). Thay have same name - pn - and if they are more that one JavaScript treat them as an array - pn[x] The problem is that when I receive this form with more than one field - i.e. pm[2] - in my php script only the last value is seen, others are lost i.e. I loose pn[0], pn[1] and receive only pn[2] as a *pn* variable. I mean that it is NOT an array at all. What's the problem and how could I solve it? Thank you Ivo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] wish list?
> -Original Message- > From: Erick Calder [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 2:24 PM > To: [EMAIL PROTECTED] > Subject: [PHP] wish list? > > > does anybody know how to submit a feature request? I can't > do it via the bug reporting mechanism. Is that "can't" as in "I tried, and it didn't work" or as in "I wasn't able to/didn't try"? If bugs.php.net isn't an option for some reason, I'd imagine your next best bet would be to post something to the php-developers list. Keep in mind, though, that using bugs.php.net is a good thing, as it gives your request a trackable identity that can be reviewed, assigned, followed up on, etc. Simply posting a message to a mailing list doesn't do that (unless the idea is so wonderful that somebody else is motivated to enter it). --- Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University ||-- Henry Kissinger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTTP_SESSION_VARS
if there aren't any session vars, $HTTP_SESSION_VARS won't be an array. i use something like if(isset($HTTP_SESSION_VARS)) { reset($HTTP_SESSION_VARS); while(list($k, $v) = each($HTTP_SESSION_VARS)) { do_something($k,$v); } } on 8/1/01 11:46 AM, Jon Yaggie at [EMAIL PROTECTED] wrote: > SORRY i just coppied it wrong > the actual code is capitalized > > while(list($k, $v) = each($HTTP_SESSION_VARS)) > -- mike cullerton [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Download file
> What I need to do, is specify the default directory for this file to be > saved to. Does anyone know how to do this? It's just not possible. -- Owen Rudge http://www.owenrudge.co.uk/ http://www.gamearchive.uk.tt/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP, C++, and LAN
Why doesn't $dir = opendir("//harp/graphics/"); work anyway? Is this an oversite in the Win32 development of PHP? You're able to do this in Perl. "Keith Jeffery" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > I'm writing some PHP scripts that will only be used over our local > Windows NT/2000 network. I've written a directory browser in PHP, but that > only sees the server's local directories/files whereas I would also like to > be able to see shared network directories. Since the PHP directory > functions don't allow network connections (i.e. //harp/graphics/) I decided > that a good workaround would be to write a C++ program that listed the > directories and files (like dir or ls if you're on Unix, and I can't get dir > to work through a PHP exec command), and then I would parse the output in > PHP. I've since written two different C++ programs to do this, one using > findfirst and findnext, and other using opendir and readdir. They both work > by specifying the directory to be listed after the program (i.e. > "listFiles.exe d:/" or "listFiles.exe //harp/graphics/"). Both of these > programs work just as expected from the command prompt, working with both > directories local to the server and those on a shared network drive. > However, both of these programs fail using any PHP system command (exec, > passthru, system) when specifying a network drive as the arguement, although > both work when a server's local directory is given. For some reason it can > no longer read the network drive when run through PHP. I've double and > triple checked the arguements passed, and they command issused is exactly > that given at the command prompt. I've even tried changing the current > working directory in the C++ program and to no avail. Does anybody have any > insight, or perhaps another route down which to travel? I will happily > provide PHP and/or C++ code for what I'm doing. > > Thank you, > Keith Jeffery > [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP_SELF
Ok, I would like to thank Ralph Guzman & Richard Lynch for your help. I combined your ideas into my own working example. Just posting here for archiving/discussion purposes... // Input some data // echo "\n"; echo "1. Age:\n"; echo " \n"; echo "2. Email:\n"; echo " \n"; echo " \n"; // Start error correction // if (!$HTTP_POST_VARS) { exit(); } elseif (!$Age) { echo "Please enter your age.\n"; } elseif (!$Email) { echo "Please enter your email.\n"; } else { echo "Thanks for your submission.\n"; } // Do what you want with you sanitised strings // .. :) Thanks again guys... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Character newline (\n), How to
A couple possible reasons : 1. Mixing \n and \n won't create a newline within your browser but rather it will within your html source code. Meaning, look at your html source and notice the newlines. 2. Using single quotes echo '\n'; will literally print '\n', in otherwords, it won't be evaluated. Odds are this is not your problem but oh well. "\n" will expand into a newline. Perhaps this faq will help too : http://www.faqts.com/knowledge_base/view.phtml/aid/901 Also, have a look at the nl2br() function. Regarding the above faq, if anyone can make it more "understandable" feel free. Regards, Philip On Wed, 1 Aug 2001 [EMAIL PROTECTED] wrote: > Hi, somebody know why the character newline \n doesn't work? . I am using > the combination W2K/Apache/PHP4. I tried the newline character on print > and echo functions but still not working. > Maybe is a stupid cuestion but I need it. > > Thanks in advanced. > > > Atte. Ignacio Estrada F. > Centro Nacional de Control de Energia > Area de Control Occidental > 025+6463, 025+6464, 025+6469 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] wish list?
does anybody know how to submit a feature request? I can't do it via the bug reporting mechanism. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]