Re: [PHP] Re: [PHP General] RE: Problems with MySQL-Link [3:14370:14592]
On Friday 01 February 2002 15:38, Berthold wrote: > Hi! > > Thank you. > But I cannot use that $link1 and/or $link2 to select two databases on > different servers... > If I use $link1 the first time to select the first database on the first > server I got that error. But without that $link1-variable AND only one > connection in the script it works. > > And it makes no sense if I use it as shell-prog or with Apache-Builtin-PHP. > > eg: > #!/usr/local/bin/php -q > $link1 = mysql_connect("localhost","a"); > echo 'Link 1: '.$link1 .''; > if (mysql_select_db("test", $link1)) { > echo 'Successful select of test'; > } else { > echo 'Failed to select test'; > } > ?> > gives this output: > Warning: Supplied argument is not a valid MySQL-Link resource in > /home/bt/bin/test.php on line 4 Try: $link1 = mysql_connect("localhost","a") or die ("Cannot connect to db!"); If it dies, then you know you have a problem connecting to the db. If you follow the examples in the code with regards to the DB functions they all have a die() statement on the end for debugging purposes. It's there to help you. In this case your real problem is most likely that you're not giving the correct number of parameters to mysql_connect($host, $user, $password). Again, proper use of die() would have quickly helped you track down where the real problem was. Instead of trying to figure out what is wrong with line 4! hth -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* Congratulations! You are the one-millionth user to log into our system. If there's anything special we can do for you, anything at all, don't hesitate to ask! */ -- PHP General Mailing List (http://www.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: Anyone Up?
"Jtjohnston" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Luke is that 6:47 pm tomorrow? :) You lost an entire day! > Enough Oz Jokes. Here is my predicament in Canada :-) > > $varname = "Check".$i; > > $varname = "Check1" but I want $varname = "Your Name1" to "Your Name12". > > One more try? :) > > > > > etc. > > for ($i = 1; $i <= $NMax; $i++) > { > #$varname = "$Check".$i; > $varname = "Check".$i > #echo $varname; > if ($varname) > echo "$varname = $i"; > } In that case it is easy, I did not know that the ids were just 1 to 12, I thought they could be anything spat out by the database. How about something like this: for ($i = 1; $i <= $NMax; $i++) { $varname = "Check".$i if (isset($$varname) echo $$varname.""; } Luke Welling. -- PHP and MySQL Web Development by Luke Welling and Laura Thomson http://www.amazon.com/exec/obidos/ASIN/0672317842 -- PHP General Mailing List (http://www.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] external programs
i'm having a bit of a problem, i have in my php script a call to system(), it calls an external .exe, php hangs waiting for a return value from the .exe [i believe], i've recompiled the program i'm calling with system() to return 0 and even 1, but it still does not work, would any body have any suggestions perhaps? -- PHP General Mailing List (http://www.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] Anyone Up?
* Brian Clark ([EMAIL PROTECTED]) [Feb 01. 2002 02:37]: [...] > echo ${"Check$i"} Whoops. Make that: echo ${"Check$i"}; -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 It may be your sole purpose in life to serve as a warning to others. -- PHP General Mailing List (http://www.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 General] RE: Problems with MySQL-Link [3:14370:14592]
Hi! Thank you. But I cannot use that $link1 and/or $link2 to select two databases on different servers... If I use $link1 the first time to select the first database on the first server I got that error. But without that $link1-variable AND only one connection in the script it works. And it makes no sense if I use it as shell-prog or with Apache-Builtin-PHP. eg: #!/usr/local/bin/php -q '; if (mysql_select_db("test", $link1)) { echo 'Successful select of test'; } else { echo 'Failed to select test'; } ?> gives this output: Warning: Supplied argument is not a valid MySQL-Link resource in /home/bt/bin/test.php on line 4 I don't know what to do... David Robley wrote: > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > >>Hi! >> >>mysql_error returns nothing... >> >>The error arrives while selecting the database via: >> >>$link = mysql_connect("host","user","passwd"); >>mysql_select_db("bla", $link); >> >>echo $link returns always '1'! >> >> >> >> >>David Robley wrote: >> > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... >> > >> >>So, >> >> >> >>I've testet all possible I found in my brain... >> >>CGI or Apache module: same error >> >>mysql_connect or mysql_pconnect: same error >> >>Variing settings in php.ini: same error >> >> >> >>How can I solve that problem? >> >>BTW: Here I describe it again: >> >>Connecting to a database works well: ok >> >>Working with that database: ok >> >>Using the additional $link-Parameter: false >> >>Not a valid resource id ... >> >> >> >>And it does not matter how many different links with different servers I >> >>use! The resource-id is always '1'. >> >> >> >>Strange... >> >> >> > >> > Not a valid resource ID usually means a problem with the query - in fact >> > this might be in the FAQ. Use mysql_error() after the database query to >> > see if mysql returns a useful error. >> > > Guess I misread your question. However, a litle playing around with this > script > > $link1 = mysql_connect("localhost","a"); > $link2 = mysql_connect("localhost"); > echo 'Link 1: '.$link1 .''; > echo 'Link 2: '.$link2 .''; > if(mysql_select_db("test", $link1)) { > echo 'Successful select of test'; > }else{ > echo 'Failed to select test'; > } > if(mysql_select_db("test2", $link2)) { > echo 'Successful select of test2'; > }else{ > echo 'Failed to select test2'; > } > > ?> > which gives this output > Link 1: Resource id #1 > Link 2: Resource id #2 > Successful select of test > Successful select of test2 > > seems to indicate that php is smart enough not to open a new link even if > requested if there is already a link for the user! Removing the "a" in > the first mysql_connect gives me two links with a resource ID of 1. > > I can force errors of course by feeding a wrong username/password which > eventually leads to a 'Not a valid resource id' error but has other error > messages as well. You aren't by chance hiding other error responses by > using @ or 'or die'? > > -- Berthold -- PHP General Mailing List (http://www.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] Anyone Up?
* jtjohnston ([EMAIL PROTECTED]) [Feb 01. 2002 02:14]: > Anyone Awake? Up? Yawwwnn. :-) [...] > When I submit, I want to echo to see if anyone clicked on them. But I > can't get my variable right to find $check1 through $check12. How do I > express in a for loop. $Check.$i does not work of course! > for ($i = 1; $i <= $NMax; $i++) > { > echo $Check.$i""; echo ${"Check$i"} > } > :) Help Hope it helps. -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Variables won't; constants aren't. -- PHP General Mailing List (http://www.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] Anyone Up?
Niklas, Bingo. I wondered if it was somehting like that? Same thing in JS more or less. Thanks, John > eval() is your solution. > > for ($i = 1; $i <= $NMax; $i++) > { > $variable = "\$Check$i"; > eval("\$string = \"$variable\";"); > echo $string.""; > } > > Niklas > > -Original Message- > From: jtjohnston [mailto:[EMAIL PROTECTED]] > Sent: 1. helmikuuta 2002 9:16 > To: [EMAIL PROTECTED] > Subject: [PHP] Anyone Up? > > Anyone Awake? Up? > > I'm using 12 checkboxes > > > > dynamically generated by mysql. Each has an id as primary index so I do > this: > > id."\" > VALUE=\"".$mydata->yourname."\"> > > When I submit, I want to echo to see if anyone clicked on them. But I > can't get my variable right to find $check1 through $check12. How do I > express in a for loop. $Check.$i does not work of course! > > for ($i = 1; $i <= $NMax; $i++) > { > echo $Check.$i""; > } > > :) Help > > -- > PHP General Mailing List (http://www.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: Anyone Up?
Luke is that 6:47 pm tomorrow? :) You lost an entire day! Enough Oz Jokes. Here is my predicament in Canada :-) $varname = "Check".$i; $varname = "Check1" but I want $varname = "Your Name1" to "Your Name12". One more try? :) etc. for ($i = 1; $i <= $NMax; $i++) { #$varname = "$Check".$i; $varname = "Check".$i #echo $varname; if ($varname) echo "$varname = $i"; } Thanks much! John (Brr it's cold up here.) Luke Welling wrote: > "Jtjohnston" wrote: > > Anyone Awake? Up? > It is 6:17 pm. I would have trouble sleeping at this time of day :) > > > I'm using 12 checkboxes > > > > > > > > dynamically generated by mysql. Each has an id as primary index so I do > > this: > > > > id."\" > > VALUE=\"".$mydata->yourname."\"> > > > > When I submit, I want to echo to see if anyone clicked on them. But I > > can't get my variable right to find $check1 through $check12. How do I > > express in a for loop. $Check.$i does not work of course! > > There are two ways I can think of. > > 1) You could change the way that your code creates the checkbox names, so > that rather than getting 12 variables, you get an array with 12 elements. > > 2) You could repeat your MySQL query on the echo page, and loop though code > something like this: > $varname = "Check".$mydata->id; > echo $$varname; > > Good Luck. > > Luke Welling. > -- > PHP and MySQL Web Development > by Luke Welling and Laura Thomson > http://www.amazon.com/exec/obidos/ASIN/0672317842 -- PHP General Mailing List (http://www.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] Anyone Up?
eval() is your solution. for ($i = 1; $i <= $NMax; $i++) { $variable = "\$Check$i"; eval("\$string = \"$variable\";"); echo $string.""; } Niklas -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: 1. helmikuuta 2002 9:16 To: [EMAIL PROTECTED] Subject: [PHP] Anyone Up? Anyone Awake? Up? I'm using 12 checkboxes dynamically generated by mysql. Each has an id as primary index so I do this: id."\" VALUE=\"".$mydata->yourname."\"> When I submit, I want to echo to see if anyone clicked on them. But I can't get my variable right to find $check1 through $check12. How do I express in a for loop. $Check.$i does not work of course! for ($i = 1; $i <= $NMax; $i++) { echo $Check.$i""; } :) Help -- PHP General Mailing List (http://www.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: Anyone Up?
"Jtjohnston" wrote: > Anyone Awake? Up? It is 6:17 pm. I would have trouble sleeping at this time of day :) > I'm using 12 checkboxes > > > > dynamically generated by mysql. Each has an id as primary index so I do > this: > > id."\" > VALUE=\"".$mydata->yourname."\"> > > When I submit, I want to echo to see if anyone clicked on them. But I > can't get my variable right to find $check1 through $check12. How do I > express in a for loop. $Check.$i does not work of course! There are two ways I can think of. 1) You could change the way that your code creates the checkbox names, so that rather than getting 12 variables, you get an array with 12 elements. 2) You could repeat your MySQL query on the echo page, and loop though code something like this: $varname = "Check".$mydata->id; echo $$varname; Good Luck. Luke Welling. -- PHP and MySQL Web Development by Luke Welling and Laura Thomson http://www.amazon.com/exec/obidos/ASIN/0672317842 -- PHP General Mailing List (http://www.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] SFTP
Exist some php scripts (commands) to update files in linux server throgh sftp protocol ? Thanks roman -- PHP General Mailing List (http://www.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] Anyone Up?
Anyone Awake? Up? I'm using 12 checkboxes dynamically generated by mysql. Each has an id as primary index so I do this: id."\" VALUE=\"".$mydata->yourname."\"> When I submit, I want to echo to see if anyone clicked on them. But I can't get my variable right to find $check1 through $check12. How do I express in a for loop. $Check.$i does not work of course! for ($i = 1; $i <= $NMax; $i++) { echo $Check.$i""; } :) Help -- PHP General Mailing List (http://www.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] add on's to php
You can add modules on the fly today using dl() or semi-on-the-fly by adding them to php.ini and just restarting the web server. You don't need to recompile php to add any of these modules. -Rasmus On Thu, 31 Jan 2002, Kunal Jhunjhunwala wrote: > Hey, > I was wondering, if it would be possible to work on a "add on the fly" > approach for php modules like zlib, imap, gd etc. There are a lot of people > who dont compile these in there installation by default, which makes it very > difficult to work on programs which utilize these modules. Coz there are a > lot of ppl who are fussy abt recompiling php all the time. > > Do any of you guys face these problems? or is it just me? > Regards, > Kunal Jhunjhunwala > > > -- > PHP General Mailing List (http://www.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] gd library with GIF support
>Therefore it would be recommended to avoid problems in the future and >use PNG instead, however, if you want to use transparency in your images >bear in mind that a number of implementations do not support this. >For example the quicktime plugin that handles PNGs in Netscape 4.x . Yea... the main reason of still having to use gif is animation for banners. hmmm Maybe I'm assuming something - png doesn't support animation, right? If it does, is it easy to convert animated gifs to png? -Ed -- PHP General Mailing List (http://www.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] connection_aborted() ?
> can anone show me a good example how to use this function? > I'm not really sure how it works it only makes sense to use if your turn off user aborts. -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] connection_aborted() ?
can anone show me a good example how to use this function? I'm not really sure how it works -- PHP General Mailing List (http://www.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] session.cookie_lifetime
At 10:27 PM 1/31/2002 -0400, Miles Thompson wrote: >>when a user logs in to my site, i load a bunch of stuff about them from a >>database and put it in session variables. right now i have the session >>expiration time set to a pretty large value. >> >>they can come back later in the day and still have all their information >>remembered, or they can hit the logout button to have their session destroyed. > >Jon, > >This I don't understand: "right now i have the session expiration time set >to a pretty large value.". > >I have believed, according to the docs, that when the user closed the >browser the session was GONE. Or do you mean that the session is kept >alive beyond the default period, so that they can leave the page open and >come back a couple of hours later and they are still logged in, so to speak. check the docs again. the php ini variable session.cookie_lifetime controls whether the session cookie goes poof when the browser closes (as you are assuming) or whether it sticks around. i set mine to a big value, so it lives. the end result for the user is they come back to the site and all their info is remembered. the problem is, what if the user WANTS their info forgotten when they close the browser? personally i use my machine from home exclusively so i want the info to persist, but someone who shares a machine, or logs in from an internet cafe, wouldn't want their info to stick around. a lot of sites have these "remember my login" checkboxes which control whether your info persists. i would really like to give my users a choice. it seems like the ideal way to control that would be to just dynamically set the session.cookie_lifetime value, which is all i have been trying to figure out. i just discovered the session_set_cookie_params function. must investigate >You're right about the idea of a cookie. I would guess a one-way >encryption or hash of some combination of time, barometric pressure & info >stored in the database which gets refreshed on each login, set to expire >within a time that will work OK for most users. If they don't come back >within that period they will have to log in again. the problem there is i have to check on every page of the site whether they have the cookie but their session is uninitialized, and if they have the cookie, setup the session (which is a pretty complicated thing). -jsd- -- PHP General Mailing List (http://www.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] Making your include files invisible (header() in if loop)
I don't know if this is related but header() must be called before any actual output is sent. One way to resolve this is to use the ob_start() tag at the start of the code, this turns output buffering on. Mind you I am no expert and stand ready to be corected and berated. Peter I wanted to hide the existance of my include files by making them 'invisible': give a 404 error when requested. This worked, but the files that were including were obviously 404ing too. So I decided to use $PHP_SELF and check whether the script's PHP_SELF was it's filename, which would mean that it was being accessed directly, as opposed to being included. I tried this code: (include.php) at the top of the include files, but it wasn't working. Change the header() to an echo and test it. It echoed. So it's a problem with the header(). I tried this: and it worked perfectly. Can header() not be in an if loop or something like that? -- PHP General Mailing List (http://www.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] Making your include files invisible (header() in if loop)
I wanted to hide the existance of my include files by making them 'invisible': give a 404 error when requested. This worked, but the files that were including were obviously 404ing too. So I decided to use $PHP_SELF and check whether the script's PHP_SELF was it's filename, which would mean that it was being accessed directly, as opposed to being included. I tried this code: (include.php) at the top of the include files, but it wasn't working. Change the header() to an echo and test it. It echoed. So it's a problem with the header(). I tried this: and it worked perfectly. Can header() not be in an if loop or something like that? -- PHP General Mailing List (http://www.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] "sorry, your input was invalid. please re-enter the asterisked fields"
On Friday 01 February 2002 08:49, Erik Price wrote: > SCENARIO: > > You're filling out your online web form. Unfortunately, you forgot to > fill out/check/select some data or other that is considered "required" > by the site that's hosting the form. You hit "submit", but you are > simply returned to the same page. All of the data that you entered is > still there, but the fields which you accidentally left blank are marked > with a big red asterisk. [snip] > > I can write this code myself -- but I write pretty sloppy code and was > wondering if there is a neat, encapsulated algorithm that a lot of > people use because its effectiveness has been proven time and again. If > not, no worries, I look forward to writing it as best I can. There are a number of classes on www.phpclasses.upperdesign.com which does what you want. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* I dote on his very absence. -- William Shakespeare, "The Merchant of Venice" */ -- PHP General Mailing List (http://www.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: create xml document with PHP
XML isn't always going to a browser remember, it could be another application on another server that wants an XML doc to sync something or such like. And that sort of application is what PHP needs (more middleware-ish to compete with Java etc), as I feel that PHP is capable of much more than just web page -> user scenarios. Don't mean to be patronising however! Oliver Cronk "Manuel Lemos" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Hello, > > Rodrigo Peres wrote: > > > > Hi list, > > > > I'm new to the xml world, and I need to create a page with data retrieved > > from my database using PHP. The process is the same of create an html page?? > > I mean I can use echo to output the xml tags and values?? Since this page > > will be dinamically generated what kind of headers I need to use to this > > page become an xml??? > > I don't think serving XML directly to the browser is a good idea because > many browsers would not render it. > > > > I saw many docs in web but all about parse an xml, but not in how to build > > one. > > This PHP class does exactly what you need. See the documentation for a > typical example. > > Regards, > Manuel Lemos > -- PHP General Mailing List (http://www.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: limit 0,30
Jtjohnston wrote: > I want to do something like this on a page: > > Pages: 1 2 3 [Next>>] > > How can I code SELECT * FROM `bookmarks` LIMIT 0, 30 ? > > Thanks? > > John > > This should be of some help. http://phpbuilder.com/columns/rod20001214.php3 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]
[PHP] How to have custom error pages rather than "CGI Error. The specifed ..."
Hi, I am running PHP on W2k. How do I redirect an url if a php file is not found and the web browser returns "CGI not found. The specified CGI misbehaved.." Tried looking in IIS Error pages but can't find the html file. Regards Nyon -- PHP General Mailing List (http://www.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] session.cookie_lifetime
At 05:15 PM 1/31/2002 -0800, Jon Drukman wrote: >At 09:03 PM 1/31/2002 -0400, Miles Thompson wrote: >>If you want persistence then use a cookie to >>- store the information >>- to provide a key for fetching data from a database >>or accept that if preservation of inter-invocation data is impt enough to >>require registration of users and a login if the client has cookies turned off. >> >>Sessions are supposed to be evanescent! >> >>(If someone else has responed, forgive me.) > >hmmm, i think i stated this badly. > >when a user logs in to my site, i load a bunch of stuff about them from a >database and put it in session variables. right now i have the session >expiration time set to a pretty large value. > >they can come back later in the day and still have all their information >remembered, or they can hit the logout button to have their session destroyed. > >i see what you're saying about using a cookie, but the session IS a >cookie! it just seems like it would be better to have just the one >cookie. especially as the contents of a session cookie are hard to guess >at. i'm not sure what sort of cookie i could give someone for persistent >login that isn't easily forged. > >-jsd- Jon, This I don't understand: "right now i have the session expiration time set to a pretty large value.". I have believed, according to the docs, that when the user closed the browser the session was GONE. Or do you mean that the session is kept alive beyond the default period, so that they can leave the page open and come back a couple of hours later and they are still logged in, so to speak. You're right about the idea of a cookie. I would guess a one-way encryption or hash of some combination of time, barometric pressure & info stored in the database which gets refreshed on each login, set to expire within a time that will work OK for most users. If they don't come back within that period they will have to log in again. Somewhere over the past two weeks I saw an article which very neatly took apart most of our schemes for security and log ins. I guess if it really has to be secure, then you have users log in and change passwords frequently. And of course, we have the problem of users who are concerned that cookies will eat their children so have them turned off. Shortly after a v. bad experience with Nimda, one client became hyper-excited about security and insisted that everything be turned off: cookies, automatic downloads, script execution, etc. Of course most of his favourite sites didn't work, within two days he was back to "normal". Miles -- PHP General Mailing List (http://www.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] limit 0,30
I want to do something like this on a page: Pages: 1 2 3 [Next>>] How can I code SELECT * FROM `bookmarks` LIMIT 0, 30 ? Thanks? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTML Email attachment problem
check out one of many HTML email scripts on hotscripts.com. --- Peter Atkins <[EMAIL PROTECTED]> wrote: > All, > > I'm building a tool that takes form input and sends > out an html email with a > word doc attached. > It sends the text and html version of the email but > I can't open the > attachment. It opens blank. > > Anyone have a thought or two about this? > > > if ($attachment) { > $fp = fopen($attachment, "rb"); > $data = fread($fp, filesize($attachment)); > $data = chunk_split(base64_encode($data)); > fclose($fp); > > // add the MIME data > $str .= "--" . $boundary . "\r\n"; > $str .= "Content-Type: application/octet-stream; > name=\"" . > $attachment ."\"\r\n"; > $str .= "Content-Transfer-Encoding: base64\r\n"; > $str .= "Content-Disposition: attachment; > filename=\"" . $attachment > ."\"\r\n\r\n"; > $str .= $data . "\r\n"; > } > > > thanks, > -p > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > = Anas Mughal [EMAIL PROTECTED] [EMAIL PROTECTED] Tel: 973-249-6665 __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] this list has been mutated to a lamers paradise
Agreed. - Original Message - From: "Jason Murray" <[EMAIL PROTECTED]> To: "'Gregor Welters'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 7:14 PM Subject: RE: [PHP] this list has been mutated to a lamers paradise > > just wanted to point this out. > > And these kinds of emails make it *so* much better, of course. > > If the topic doesn't interest you, don't read it. (I don't > read 90% of the emails I get on the list, I just dump them > into a folder because I don't know anything about the topic, > don't care, or I might be busy at the time). If you think > you've graduated from the Newbie class, pat yourself on the > back, move on, and quietly unsubscribe yourself. > > Don't make fun of the newbies who come here for advice. > They don't know any better, and we were all new to PHP at > one point. > > 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] > -- PHP General Mailing List (http://www.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] this list has been mutated to a lamers paradise
Thanks, LAMER - Original Message - From: "Gregor Welters" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 5:06 PM Subject: [PHP] this list has been mutated to a lamers paradise > just wanted to point this out. > > > > > > -- > PHP General Mailing List (http://www.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] session.cookie_lifetime
At 09:03 PM 1/31/2002 -0400, Miles Thompson wrote: >If you want persistence then use a cookie to >- store the information >- to provide a key for fetching data from a database >or accept that if preservation of inter-invocation data is impt enough to >require registration of users and a login if the client has cookies turned off. > >Sessions are supposed to be evanescent! > >(If someone else has responed, forgive me.) hmmm, i think i stated this badly. when a user logs in to my site, i load a bunch of stuff about them from a database and put it in session variables. right now i have the session expiration time set to a pretty large value. they can come back later in the day and still have all their information remembered, or they can hit the logout button to have their session destroyed. i see what you're saying about using a cookie, but the session IS a cookie! it just seems like it would be better to have just the one cookie. especially as the contents of a session cookie are hard to guess at. i'm not sure what sort of cookie i could give someone for persistent login that isn't easily forged. -jsd- -- PHP General Mailing List (http://www.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] this list has been mutated to a lamers paradise
> just wanted to point this out. And these kinds of emails make it *so* much better, of course. If the topic doesn't interest you, don't read it. (I don't read 90% of the emails I get on the list, I just dump them into a folder because I don't know anything about the topic, don't care, or I might be busy at the time). If you think you've graduated from the Newbie class, pat yourself on the back, move on, and quietly unsubscribe yourself. Don't make fun of the newbies who come here for advice. They don't know any better, and we were all new to PHP at one point. 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]
[PHP] this list has been mutated to a lamers paradise
just wanted to point this out. -- PHP General Mailing List (http://www.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] where is PHP_SELF?
On Thursday, January 31, 2002, at 06:12 PM, Lars Torben Wilson wrote: > On Thu, 2002-01-31 at 14:57, Erik Price wrote: >> I'm running PHP 4.1.0 on LAMP w/register_globals=off > > > Since register_globals is off, the $_SERVER array will not be extracted > into the global scope. Try $_SERVER['PHP_SELF'] and you should be fine. AHHH... I didn't know that the predefined variables belonged to an array like that. So far I haven't used anything but $_GET, $_POST, and $_SESSION. Guess I should study some more. Thanks Lars Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [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] session.cookie_lifetime
If you want persistence then use a cookie to - store the information - to provide a key for fetching data from a database or accept that if preservation of inter-invocation data is impt enough to require registration of users and a login if the client has cookies turned off. Sessions are supposed to be evanescent! (If someone else has responed, forgive me.) Miles At 12:37 PM 1/29/2002 -0800, Jon Drukman wrote: >can you change session.cookie_lifetime on the fly? some users might want >their sessions to persist between browser invocations, and others might want >their sessions to expire. > >-jsd- > > > > >-- >PHP General Mailing List (http://www.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] session.cookie_lifetime
is it possible to have session.cookie_lifetime different for each user? some users may want their cookies to live past a browser shutdown and others may not. i'd like to give them a choice, if possible. -jsd- -- PHP General Mailing List (http://www.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] Hi - newbie questions...
At 02:14 PM 1/31/2002 -0500, Michael Kimsal wrote: >>>4th >>>sessions, can they be accessed from an asp script and the other way round? >> >>No, they cannot. They are specific to PHP. > > >not directly, but an ASP script on the same domain should be able to read >the cookie storing the session ID, then pull the info out from a database >(if you're using a db backed to store the session info). > >Short answer is no - probably for the questioner's needs, but it's >possible it can be done in some unique situations. Yes Michael, I didn't think differently enough about the nature of temporary, or session only, cookies. Of course, an ASP script should be able to sort through all the cookies for the same domain and dig out which one stores the session vars. Cheers - Miles -- PHP General Mailing List (http://www.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] "sorry, your input was invalid. please re-enter the asterisked fields"
SCENARIO: You're filling out your online web form. Unfortunately, you forgot to fill out/check/select some data or other that is considered "required" by the site that's hosting the form. You hit "submit", but you are simply returned to the same page. All of the data that you entered is still there, but the fields which you accidentally left blank are marked with a big red asterisk. QUESTION: There's plenty of ways to achieve this effect. One way, that I have been using, is a page that calls itself and executes different code (via a switch statement) depending on what the user does with a form. Using hidden form fields and the like. In each "section" of the switch statement, the code is checked for the presence of certain variables -- if they are not present, then the statement "break"s, and the default "section" of the switch statement requires the user to fill out the required fields again. Is there a standard algorithm that is used by most PHP developers "in the know" for this? Or does everybody pretty much write the code that comes to their mind and which is most appropriate to their application? I can write this code myself -- but I write pretty sloppy code and was wondering if there is a neat, encapsulated algorithm that a lot of people use because its effectiveness has been proven time and again. If not, no worries, I look forward to writing it as best I can. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [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] Accessing piped data in PHP shell script
Have you tried running the program from your php script? Something like: $stuff = System("cat foo.txt"); I have done something similar, but I don't recall exactly how I did it. Jeff At 04:30 PM 1/31/2002 -0800, David Yee wrote: >How can I access data/parameters piped into a PHP shell script? E.g: > >cat foo.txt | php -q myscript.php > >In this example I want to take the contents of foo.txt and store it into a >variable/array in myscript.php. I tried $argv[] but no go. Thanks. > >David > > >-- >PHP General Mailing List (http://www.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] Accessing piped data in PHP shell script
Oops, nevermind- I found the answer: $fp = fopen("php://stdin", "r"); while(($buf=fgets($fp, 512)) != false) { $input .= $buf; } echo "$input"; - Original Message - From: "David Yee" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 4:30 PM Subject: [PHP] Accessing piped data in PHP shell script > How can I access data/parameters piped into a PHP shell script? E.g: > > cat foo.txt | php -q myscript.php > > In this example I want to take the contents of foo.txt and store it into a > variable/array in myscript.php. I tried $argv[] but no go. Thanks. > > David > > > -- > PHP General Mailing List (http://www.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] Sessions in URL not being recognized!
I have an existing production machine running Red Hat Linux 7.1, Apache 1.3.19, and PHP 4.0.6. I have a new machine I'm *TRYING* to replace it with. It's a clean machine that I just did a fresh install of RedHat Linux 7.1 on. I downloaded MySQL 3.23.47, PHP 4.0.6, and Apache 1.3.22. Everything seems to build and work fine. But when I copy all the php site files over to the new location, the sessions don't seem to work! I am not using cookies, and so the PHPSESSION ID is in the URL. The odd thing is, the sessions are created fine. I see the session file in the /tmp dir. I've inspected it and it seems fine. Same size and contents of the production machine. But when I go to a new page on the new box, the URL contains the Session id, but the code doesn't recognize that there are any session variables! It says my session variables are not there (session_is_registered fails!). I don't understand what's going on. I have rebuilt and reinstalled till I am blue in the face. I am literally at my wits end. Why is it that the PHP code isn't recognizing Session variables on the new machine?? Track_vars is on. Register_globals is on. Any help would be appreciated... test code to run, whatever... Please help! -- Grant -- PHP General Mailing List (http://www.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] Accessing piped data in PHP shell script
How can I access data/parameters piped into a PHP shell script? E.g: cat foo.txt | php -q myscript.php In this example I want to take the contents of foo.txt and store it into a variable/array in myscript.php. I tried $argv[] but no go. Thanks. David -- PHP General Mailing List (http://www.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] Need Urgent Help!!
Scott, Apparently I'm too stupid to be able to use my mail client correctly and sent this email from my wife's account. (It was an early morning for me so please forgive me. Anyway, to answer your question you would do the following: 1) Create the page that you want to send the email. Create this page with a '.php' extension. For example, sendmail.php. This will be the target of your form. 2) Add the following code to the top of the file: "); ?> 3) You can add any html code following this that you would like to see after the email is sent. 4) Make sure this page is on your server and point your form at it. Voila! Let me know if you have any problems. Regards, Jason Cox > Shannon, > I appreciate your help! > The following are the form fields I have created in Flash and their variable > names, I need to be able to receive an email from the website using php. > FIELD = VARIABLE NAME > name = txtname > email = txtemail > message = txtmessage > > the email address it needs to be sent to is my email address: > [EMAIL PROTECTED] > > Thanks in Advance! > > - Original Message - > From: "Shannon Cox" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Thursday, January 31, 2002 12:06 PM > Subject: Re: [PHP] Need Urgent Help!! > > > > Scott, > > > > Did you ever get this solved? If not, let me know and I will help you. > > Please reply both to my address and send a copy to the list. > > > > Thanks, > > Jason > > > > "Scott" <[EMAIL PROTECTED]> wrote in message > > news:<[EMAIL PROTECTED]>... > > > All, > > > I have just found out that the VB script that I have used to send email > > from > > > my web site is null and void, apparently the server does not do VB or > > > something along those lines (security) but that's not the issue. I have > > > contacted my teh people who host my site and they told me I have to use > > PHP > > > script. > > > My website (Flash) needs to be able to send emails and membership > > > applications from form I have already created, does anyone have any > > scripts > > > and directions that some with absolutely no code writing skills can use. > > > Your help is greatly appreciated!! > > > Billy > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: php-list- [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: php-list- [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: redirection rather than include()
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > This is a PHP newbie trying to figure something out. > > I am creating a web-app which begins with a login page and goes through the > typical user/pass validation and upon success moves to a frameset where the > application will run. The action of the login form is act_login.php. In > that script I validate the user/pass and, upon validation, include() the > frameset script. However, I would rather redirect the browser to the > frameset script. In other words I want to progression to go like this... > > login form --> successful login (determined by act_login.php) --> redirect > browser to app frameset > > This scenario is probably swimming in technicalities, and I'm probably just > fine using the include() statement. However, I guess my overall question > is... is there a way to redirect the browser to a new URL (eg. php script) > inside something as simple as an if/then statement? > > Thanks! You can use header() to force redirection - ther's a sample in the manual but remember that you can't output anything _at all_ to the browser before attempting to use header. -- David Robley Temporary Kiwi! -- PHP General Mailing List (http://www.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: destroy session on close?
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > is there any way to destroy a session automaticly when a user closes down > you page? > And preferably perform an action like a database removal at the same time. Have a look at the Connection Handling section of the manual, and the functions register_shutdown_function() and onnection_aborted(). Seems like they might do what you need. -- David Robley Temporary Kiwi! -- PHP General Mailing List (http://www.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] session.cookie_lifetime
can you change session.cookie_lifetime on the fly? some users might want their sessions to persist between browser invocations, and others might want their sessions to expire. -jsd- -- PHP General Mailing List (http://www.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: redirection rather than include()
use the: http://www.whatever.com/whatever.php); ?> MAKE SURE header is used before any code that outputs anything, other wise it won't work (as header sends additional HTTP header commands). Alternatively the frameset could just be sent back to browser (i.e. make your frameset dynamic (if user valid then outpust frameset etc) - and thereby more secure - as some can't just bypass your script to get to the frameset directly. Hope that helps Ollie "Benjamin Deruyter" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > This is a PHP newbie trying to figure something out. > > I am creating a web-app which begins with a login page and goes through the > typical user/pass validation and upon success moves to a frameset where the > application will run. The action of the login form is act_login.php. In > that script I validate the user/pass and, upon validation, include() the > frameset script. However, I would rather redirect the browser to the > frameset script. In other words I want to progression to go like this... > > login form --> successful login (determined by act_login.php) --> redirect > browser to app frameset > > This scenario is probably swimming in technicalities, and I'm probably just > fine using the include() statement. However, I guess my overall question > is... is there a way to redirect the browser to a new URL (eg. php script) > inside something as simple as an if/then statement? > > Thanks! > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] HTML Email attachment problem
All, I'm building a tool that takes form input and sends out an html email with a word doc attached. It sends the text and html version of the email but I can't open the attachment. It opens blank. Anyone have a thought or two about this? if ($attachment) { $fp = fopen($attachment, "rb"); $data = fread($fp, filesize($attachment)); $data = chunk_split(base64_encode($data)); fclose($fp); // add the MIME data $str .= "--" . $boundary . "\r\n"; $str .= "Content-Type: application/octet-stream; name=\"" . $attachment ."\"\r\n"; $str .= "Content-Transfer-Encoding: base64\r\n"; $str .= "Content-Disposition: attachment; filename=\"" . $attachment ."\"\r\n\r\n"; $str .= $data . "\r\n"; } thanks, -p -- PHP General Mailing List (http://www.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] suppressing division by zero errors
that's alright - i'm using 4.0.6 and the suppression works thnx again -Original Message- From: Lars Torben Wilson [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 10:33 AM To: Christopher William Wesley Cc: [EMAIL PROTECTED]; Martin Towell Subject: Re: [PHP] suppressing division by zero errors On Thu, 2002-01-31 at 15:16, Christopher William Wesley wrote: > You really need to do some error checking on the denominator. > $num = 5; > $den = 0; > > echo $den != 0 ? $num/$den : "0"; > > A number divided by zero isn't defined, so you have to circumvent the > situation by making sure it never happens. Actually, the result of a divide-by-zero will be boolean false in PHP 4. Though in older (4.0.3pl1, to be precise) versions, the warning doesn't seem to be suppressable. Hm. Torben > ~Chris /"\ > \ / September 11, 2001 > X We Are All New Yorkers > / \ rm -rf /bin/laden > > On Fri, 1 Feb 2002, Martin Towell wrote: > > > Is there a way to suppress division by zero errors? > > > > echo 5/0; // this give a warning - obviously!! > > > > @echo 5/0; // this gives a parse error > > > > echo @5/0; // this still comes up with a warning > > > > unless I turn error_reporting off before and turn it back on afterwards, but > > I don't want to do that unless I REALLY have to > > > > Martin > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] suppressing division by zero errors
On Thu, 2002-01-31 at 15:16, Christopher William Wesley wrote: > You really need to do some error checking on the denominator. > $num = 5; > $den = 0; > > echo $den != 0 ? $num/$den : "0"; > > A number divided by zero isn't defined, so you have to circumvent the > situation by making sure it never happens. Actually, the result of a divide-by-zero will be boolean false in PHP 4. Though in older (4.0.3pl1, to be precise) versions, the warning doesn't seem to be suppressable. Hm. Torben > ~Chris /"\ > \ / September 11, 2001 > X We Are All New Yorkers > / \ rm -rf /bin/laden > > On Fri, 1 Feb 2002, Martin Towell wrote: > > > Is there a way to suppress division by zero errors? > > > > echo 5/0; // this give a warning - obviously!! > > > > @echo 5/0; // this gives a parse error > > > > echo @5/0; // this still comes up with a warning > > > > unless I turn error_reporting off before and turn it back on afterwards, but > > I don't want to do that unless I REALLY have to > > > > Martin > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] suppressing division by zero errors
On Thu, 2002-01-31 at 15:26, Martin Towell wrote: > I was thinking of writing a _very simple_ graphing program - enter an > expression and php will generate an image with the graph on it, I didn't > want to spend too much time parsing the expression up and seeing if there's > a division or anything else that may cause an error/warning [eg tan(PI/2), > etc] > > I know there's probably loads of code already written to do what I'm > thinking of doing, but there's no substitute in starting from scratch and > getting something working yourself :) > > Thanks Torben, that helped. > > Martin Just to warn you, I just checked this on PHP 4.0.3pl1 and it doesn't appear to suppress the warning, for some reason. Works on 4.2.0-dev though... Torben > -Original Message- > From: Christopher William Wesley [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 01, 2002 10:17 AM > To: [EMAIL PROTECTED] > Cc: Martin Towell > Subject: Re: [PHP] suppressing division by zero errors > > > You really need to do some error checking on the denominator. > $num = 5; > $den = 0; > > echo $den != 0 ? $num/$den : "0"; > > A number divided by zero isn't defined, so you have to circumvent the > situation by making sure it never happens. > > ~Chris /"\ > \ / September 11, 2001 > X We Are All New Yorkers > / \ rm -rf /bin/laden > > On Fri, 1 Feb 2002, Martin Towell wrote: > > > Is there a way to suppress division by zero errors? > > > > echo 5/0; // this give a warning - obviously!! > > > > @echo 5/0; // this gives a parse error > > > > echo @5/0; // this still comes up with a warning > > > > unless I turn error_reporting off before and turn it back on afterwards, > but > > I don't want to do that unless I REALLY have to > > > > Martin > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] suppressing division by zero errors
I was thinking of writing a _very simple_ graphing program - enter an expression and php will generate an image with the graph on it, I didn't want to spend too much time parsing the expression up and seeing if there's a division or anything else that may cause an error/warning [eg tan(PI/2), etc] I know there's probably loads of code already written to do what I'm thinking of doing, but there's no substitute in starting from scratch and getting something working yourself :) Thanks Torben, that helped. Martin -Original Message- From: Christopher William Wesley [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 10:17 AM To: [EMAIL PROTECTED] Cc: Martin Towell Subject: Re: [PHP] suppressing division by zero errors You really need to do some error checking on the denominator. $num = 5; $den = 0; echo $den != 0 ? $num/$den : "0"; A number divided by zero isn't defined, so you have to circumvent the situation by making sure it never happens. ~Chris /"\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden On Fri, 1 Feb 2002, Martin Towell wrote: > Is there a way to suppress division by zero errors? > > echo 5/0; // this give a warning - obviously!! > > @echo 5/0; // this gives a parse error > > echo @5/0; // this still comes up with a warning > > unless I turn error_reporting off before and turn it back on afterwards, but > I don't want to do that unless I REALLY have to > > Martin > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] where is PHP_SELF?
I too just had this problem, it seems that this happens when php is installed as a cgi binary with apache, perhaps if you use $_SERVER["PATH_INFO") or perhaps $_SERVER["SCRIPT_NAME"] or even $path_info, just some ideas, i've not tested this at all yet... good luck 1/31/02 2:57:55 PM, Erik Price <[EMAIL PROTECTED]> wrote: >I have a file called "index.php". This file includes another file, >"foot.inc". In the file "foot.inc", amidst much HTML code, I have a >simple line: > >echo "$PHP_SELF" ; >?> > >The expected result is that "index.php" will appear in my web >page, or at least something will appear. Yet, when the page is served >to my browser, all that shows up is the "". The variable >$PHP_SELF isn't getting through. Am I doing something wrong, or is this >because that variable is assigned to the name "foot.inc", and has been >included into another file? Does the name of the page served not get >passed onto the include file, where $PHP_SELF is echoed? > >Thanks for any insight you can give, > >Erik > >PS: I have an Apache directive that prevents any "*.inc" files from >being served, but that doesn't stop them from being parsed as PHP. I'm >running PHP 4.1.0 on LAMP w/register_globals=off > > > > > > > >Erik Price >Web Developer Temp >Media Lab, H.H. Brown >[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] suppressing division by zero errors
You really need to do some error checking on the denominator. $num = 5; $den = 0; echo $den != 0 ? $num/$den : "0"; A number divided by zero isn't defined, so you have to circumvent the situation by making sure it never happens. ~Chris /"\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden On Fri, 1 Feb 2002, Martin Towell wrote: > Is there a way to suppress division by zero errors? > > echo 5/0; // this give a warning - obviously!! > > @echo 5/0; // this gives a parse error > > echo @5/0; // this still comes up with a warning > > unless I turn error_reporting off before and turn it back on afterwards, but > I don't want to do that unless I REALLY have to > > Martin > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] suppressing division by zero errors
On Thu, 2002-01-31 at 15:00, Martin Towell wrote: > Is there a way to suppress division by zero errors? > > echo 5/0; // this give a warning - obviously!! > > @echo 5/0; // this gives a parse error > > echo @5/0; // this still comes up with a warning > > unless I turn error_reporting off before and turn it back on afterwards, but > I don't want to do that unless I REALLY have to > > Martin The @ operator will work on the following expression in this case. In the last one above, you're suppressing the error from the expression '5', since the @ binds more tightly than the / (i.e. @ has a higher precedence). So you need to force precedence, which in PHP is done with parentheses: echo @(5/0); Check the following page for more information: http://www.php.net/manual/en/language.operators.precedence.php Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] where is PHP_SELF?
On Thu, 2002-01-31 at 14:57, Erik Price wrote: > I have a file called "index.php". This file includes another file, > "foot.inc". In the file "foot.inc", amidst much HTML code, I have a > simple line: > > echo "$PHP_SELF" ; > ?> > > The expected result is that "index.php" will appear in my web > page, or at least something will appear. Yet, when the page is served > to my browser, all that shows up is the "". The variable > $PHP_SELF isn't getting through. Am I doing something wrong, or is this > because that variable is assigned to the name "foot.inc", and has been > included into another file? Does the name of the page served not get > passed onto the include file, where $PHP_SELF is echoed? > > Thanks for any insight you can give, > > Erik > > PS: I have an Apache directive that prevents any "*.inc" files from > being served, but that doesn't stop them from being parsed as PHP. I'm > running PHP 4.1.0 on LAMP w/register_globals=off Since register_globals is off, the $_SERVER array will not be extracted into the global scope. Try $_SERVER['PHP_SELF'] and you should be fine. Hope this helps, Torben > > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > [EMAIL PROTECTED] -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] suppressing division by zero errors
Is there a way to suppress division by zero errors? echo 5/0; // this give a warning - obviously!! @echo 5/0; // this gives a parse error echo @5/0; // this still comes up with a warning unless I turn error_reporting off before and turn it back on afterwards, but I don't want to do that unless I REALLY have to Martin
[PHP] where is PHP_SELF?
I have a file called "index.php". This file includes another file, "foot.inc". In the file "foot.inc", amidst much HTML code, I have a simple line: $PHP_SELF" ; ?> The expected result is that "index.php" will appear in my web page, or at least something will appear. Yet, when the page is served to my browser, all that shows up is the "". The variable $PHP_SELF isn't getting through. Am I doing something wrong, or is this because that variable is assigned to the name "foot.inc", and has been included into another file? Does the name of the page served not get passed onto the include file, where $PHP_SELF is echoed? Thanks for any insight you can give, Erik PS: I have an Apache directive that prevents any "*.inc" files from being served, but that doesn't stop them from being parsed as PHP. I'm running PHP 4.1.0 on LAMP w/register_globals=off Erik Price Web Developer Temp Media Lab, H.H. Brown [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] table row
duh ! yep exactly like ! thanks ! :-)) > something like ? > > $cntr = 0; > echo ""; > while ($r = mysql_fetch_array($result0)) > { > $cntr++; > $cityid = $r["t_city_id_city"]; > $cityname = $r["t_city_name"]; > echo " > href=\"city_person.php?city_id=$cityid\">$cityname > "; > if ($cntr % 2 == 0) echo ""; > } // from while result 0 > echo""; > > > -Original Message- > From: John Fishworld [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 01, 2002 9:45 AM > To: [EMAIL PROTECTED] > Subject: [PHP] table row > > > apologies for a stupid question ! but it's late ! > > everthings fine, mysql query, results etc > > but I want to produce a table with two columns instead of just one long > column > > ie answer1answer2 > > can someone please give me a hint how to do it ? > > while ($r = mysql_fetch_array($result0)) > { > $cityid = $r["t_city_id_city"]; > $cityname = $r["t_city_name"]; > echo " > href=\"city_person.php?city_id=$cityid\">$cityname > "; > } // from while result 0 > echo""; > > thanks in advance > > > > -- > PHP General Mailing List (http://www.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: Newbie: Question about filesize()
Manuel Ritsch <[EMAIL PROTECTED]> wrote: > $file_s = filesize($file); you want $file_s = filesize("images/$file"). jim -- PHP General Mailing List (http://www.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] table row
something like ? $cntr = 0; echo ""; while ($r = mysql_fetch_array($result0)) { $cntr++; $cityid = $r["t_city_id_city"]; $cityname = $r["t_city_name"]; echo " $cityname "; if ($cntr % 2 == 0) echo ""; } // from while result 0 echo""; -Original Message- From: John Fishworld [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 9:45 AM To: [EMAIL PROTECTED] Subject: [PHP] table row apologies for a stupid question ! but it's late ! everthings fine, mysql query, results etc but I want to produce a table with two columns instead of just one long column ie answer1answer2 can someone please give me a hint how to do it ? while ($r = mysql_fetch_array($result0)) { $cityid = $r["t_city_id_city"]; $cityname = $r["t_city_name"]; echo " $cityname "; } // from while result 0 echo""; thanks in advance -- PHP General Mailing List (http://www.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] table row
apologies for a stupid question ! but it's late ! everthings fine, mysql query, results etc but I want to produce a table with two columns instead of just one long column ie answer1answer2 can someone please give me a hint how to do it ? while ($r = mysql_fetch_array($result0)) { $cityid = $r["t_city_id_city"]; $cityname = $r["t_city_name"]; echo " $cityname "; } // from while result 0 echo""; thanks in advance -- PHP General Mailing List (http://www.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] redirection rather than include()
use: { header("location: new_full_url_here"); exit; } -Original Message- From: Benjamin deRuyter [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 9:42 AM To: PHP Subject: [PHP] redirection rather than include() This is a PHP newbie trying to figure something out. I am creating a web-app which begins with a login page and goes through the typical user/pass validation and upon success moves to a frameset where the application will run. The action of the login form is act_login.php. In that script I validate the user/pass and, upon validation, include() the frameset script. However, I would rather redirect the browser to the frameset script. In other words I want to progression to go like this... login form --> successful login (determined by act_login.php) --> redirect browser to app frameset This scenario is probably swimming in technicalities, and I'm probably just fine using the include() statement. However, I guess my overall question is... is there a way to redirect the browser to a new URL (eg. php script) inside something as simple as an if/then statement? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] redirection rather than include()
This is a PHP newbie trying to figure something out. I am creating a web-app which begins with a login page and goes through the typical user/pass validation and upon success moves to a frameset where the application will run. The action of the login form is act_login.php. In that script I validate the user/pass and, upon validation, include() the frameset script. However, I would rather redirect the browser to the frameset script. In other words I want to progression to go like this... login form --> successful login (determined by act_login.php) --> redirect browser to app frameset This scenario is probably swimming in technicalities, and I'm probably just fine using the include() statement. However, I guess my overall question is... is there a way to redirect the browser to a new URL (eg. php script) inside something as simple as an if/then statement? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Printing from mysql
Hi, Lets say that i have a database, and some names in it (Name and adress). When it's new year:) id like to send letters to those guys, from db. How would i print those names on envelopes, or how should i print one name at one A4 page, other name on next etc... If I open those names in browser and print i got title and URL on the top and botoom of page. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] destroy session on close?
is there any way to destroy a session automaticly when a user closes down you page? And preferably perform an action like a database removal at the same time. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP vs Ruby
Anyone able to comment on Ruby's features, pros and cons as a web scripting alternative to PHP. Thanks. = Anas Mughal [EMAIL PROTECTED] [EMAIL PROTECTED] Tel: 973-249-6665 __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: [PHP General] RE: Problems with MySQL-Link [3:14370:14592]
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hi! > > mysql_error returns nothing... > > The error arrives while selecting the database via: > > $link = mysql_connect("host","user","passwd"); > mysql_select_db("bla", $link); > > echo $link returns always '1'! > > > > > David Robley wrote: > > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > > > >>So, > >> > >>I've testet all possible I found in my brain... > >>CGI or Apache module: same error > >>mysql_connect or mysql_pconnect: same error > >>Variing settings in php.ini: same error > >> > >>How can I solve that problem? > >>BTW: Here I describe it again: > >>Connecting to a database works well: ok > >>Working with that database: ok > >>Using the additional $link-Parameter: false > >>Not a valid resource id ... > >> > >>And it does not matter how many different links with different servers I > >>use! The resource-id is always '1'. > >> > >>Strange... > >> > > > > Not a valid resource ID usually means a problem with the query - in fact > > this might be in the FAQ. Use mysql_error() after the database query to > > see if mysql returns a useful error. Guess I misread your question. However, a litle playing around with this script '; echo 'Link 2: '.$link2 .''; if(mysql_select_db("test", $link1)) { echo 'Successful select of test'; }else{ echo 'Failed to select test'; } if(mysql_select_db("test2", $link2)) { echo 'Successful select of test2'; }else{ echo 'Failed to select test2'; } ?> which gives this output Link 1: Resource id #1 Link 2: Resource id #2 Successful select of test Successful select of test2 seems to indicate that php is smart enough not to open a new link even if requested if there is already a link for the user! Removing the "a" in the first mysql_connect gives me two links with a resource ID of 1. I can force errors of course by feeding a wrong username/password which eventually leads to a 'Not a valid resource id' error but has other error messages as well. You aren't by chance hiding other error responses by using @ or 'or die'? -- David Robley Temporary Kiwi! -- PHP General Mailing List (http://www.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: problems with mt_rand()
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I need to generate a random number (range is not crucial) and I have been > trying to use mt_rand(). However, I am finding that is generates the same > value EVERY time. This is true whether I supple a range or not. For > example, the follow line of code generated 13 EVERY time... > > $result = mt_rand(1,15); > echo $result; > > In addition, this line of code generated 1755202938 EVERY time... > > $result = mt_rand(); > echo $result; > > What am I doing wrong?? > > - Ben One usually needs to seed a random generator; looking at the docs I find mt_srand which is the tool you need. -- David Robley Temporary Kiwi! -- PHP General Mailing List (http://www.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: Plz help w/ query
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > The following query displays 0 e-mails. Why? > > Tbl con_inf holds 51 records w/ 51 usernames. Tbl scr_149 holds 37 > records with 37 equivalent usernames of which 14 show date_done=0. > > > $connection=mysql_connect("localhost","wagner","xxx") or die ("No > connection!"); > > $db=mysql_select_db("sbwresearch",$connection) or die ("No database!"); > > $qry_1="select con_inf.e_mail from con_inf, scr_149 where > scr_149.date_done=\"0\" AND con_inf.username=scr_149.username"; This looks suspicious. What type of field is date_done? If it is integer, the value you are testing for should not be in quotes. If it is char, it should be in single quotes. Same for username. > > $result_1=mysql_query($qry_1,$connection) or die ("No query # 1!"); If you still have problems, try adding before while: if(mysql_errno()) { echo 'Error: ' . mysql_error() . ''; } > while ($row_1=mysql_fetch_array($result_1, MYSQL_ASSOC)) > { > $e_mail=$row_1["e_mail"]; > echo "$e_mail\n"; > }; > > mysql_free_result($result_1); > mysql_close($connection); > exit; > ?> > > Thanks! > > Anthony F. Rodriguez > ([EMAIL PROTECTED]) > > -- David Robley Temporary Kiwi! -- PHP General Mailing List (http://www.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] ereg et all - new question..
\\1, actually. \\0 refers to the entire source string, not just to the part inside the parentheses... so I think it would put the bold tags around the entire contents of $str, not just the "this" words. At least, that's according to the source I'm using (_Professional PHP Programming_ by Castagnetto, et al). YMMV, so you may wish to try it both ways. On Thu, 2002-01-31 at 14:23, Edward van Bilderbeek - Bean IT wrote: > Wow, thanks a lot... > > although it should be \\0 here... > > didn't see anything in the manual about the \\ maybe gotta look for it again > :-) > > Thanks, > > Edward > > - Original Message - > From: "Richard Crawford" <[EMAIL PROTECTED]> > To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Thursday, January 31, 2002 11:20 PM > Subject: Re: [PHP] ereg et all - new question.. > > > > Seems like that makes it a LOT easier. > > > > Use eregi_relace() instead of ereg_replace(). eregi allows for > > case-insensitivity. > > > > Try > > > > eregi_replace("this","\\1",$str); > > > > That should do it, though I haven't tried it myself. > > > > > > On Thu, 2002-01-31 at 14:14, Edward van Bilderbeek - Bean IT wrote: > > > Maybe I better ask my question different... > > > > > > what i want to do is, to highlight certain text in a string... > > > > > > for example: "This equals this equals tHis..." has to become: > > > "This equals this equals tHis"... so dispite the > case, > > > the 's should be put around it... > > > > > > does that make it easier? not for me :-) > > > > > > Greets, > > > > > > Edward > > > > > > > > > - Original Message - > > > From: "Jeff Sheltren" <[EMAIL PROTECTED]> > > > To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > > > <[EMAIL PROTECTED]> > > > Sent: Thursday, January 31, 2002 11:06 PM > > > Subject: Re: [PHP] ereg et all > > > > > > > > > > Ahhh, ok makes more sense now. Although, I don't think that there is > an > > > > "easy" way to do what you are asking. I think that in order to > accomplish > > > > that, you will have to specify all possible cases of a string, and > have a > > > > ereg_replace() statement for each of them. > > > > > > > > Jeff > > > > > > > > At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: > > > > >Oh, that was a typo... sorry... > > > > > > > > > >it should be: > > > > > > > > > >"This equals this equals tHis" -> "That equals that equals tHat" > > > > > > > > > >Edward > > > > > > > > > >- Original Message - > > > > >From: "Jeff Sheltren" <[EMAIL PROTECTED]> > > > > >To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > > > > ><[EMAIL PROTECTED]> > > > > >Sent: Thursday, January 31, 2002 10:56 PM > > > > >Subject: Re: [PHP] ereg et all > > > > > > > > > > > > > > > > I'm not sure why you wanted the last word "tHis" to be changed to > > > "That" > > > > > > (with a capital)... can you explain further? > > > > > > > > > > > > Jeff > > > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.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] ereg et all - new question..
Wow, thanks a lot... although it should be \\0 here... didn't see anything in the manual about the \\ maybe gotta look for it again :-) Thanks, Edward - Original Message - From: "Richard Crawford" <[EMAIL PROTECTED]> To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 11:20 PM Subject: Re: [PHP] ereg et all - new question.. > Seems like that makes it a LOT easier. > > Use eregi_relace() instead of ereg_replace(). eregi allows for > case-insensitivity. > > Try > > eregi_replace("this","\\1",$str); > > That should do it, though I haven't tried it myself. > > > On Thu, 2002-01-31 at 14:14, Edward van Bilderbeek - Bean IT wrote: > > Maybe I better ask my question different... > > > > what i want to do is, to highlight certain text in a string... > > > > for example: "This equals this equals tHis..." has to become: > > "This equals this equals tHis"... so dispite the case, > > the 's should be put around it... > > > > does that make it easier? not for me :-) > > > > Greets, > > > > Edward > > > > > > - Original Message - > > From: "Jeff Sheltren" <[EMAIL PROTECTED]> > > To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > > <[EMAIL PROTECTED]> > > Sent: Thursday, January 31, 2002 11:06 PM > > Subject: Re: [PHP] ereg et all > > > > > > > Ahhh, ok makes more sense now. Although, I don't think that there is an > > > "easy" way to do what you are asking. I think that in order to accomplish > > > that, you will have to specify all possible cases of a string, and have a > > > ereg_replace() statement for each of them. > > > > > > Jeff > > > > > > At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: > > > >Oh, that was a typo... sorry... > > > > > > > >it should be: > > > > > > > >"This equals this equals tHis" -> "That equals that equals tHat" > > > > > > > >Edward > > > > > > > >- Original Message - > > > >From: "Jeff Sheltren" <[EMAIL PROTECTED]> > > > >To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > > > ><[EMAIL PROTECTED]> > > > >Sent: Thursday, January 31, 2002 10:56 PM > > > >Subject: Re: [PHP] ereg et all > > > > > > > > > > > > > I'm not sure why you wanted the last word "tHis" to be changed to > > "That" > > > > > (with a capital)... can you explain further? > > > > > > > > > > Jeff > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.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] ereg et all - new question..
Sorry, that should be: eregi_replace("(this)","\\1",$str); On Thu, 2002-01-31 at 14:20, Richard Crawford wrote: > Seems like that makes it a LOT easier. > > Use eregi_relace() instead of ereg_replace(). eregi allows for > case-insensitivity. > > Try > > eregi_replace("this","\\1",$str); > > That should do it, though I haven't tried it myself. > > > On Thu, 2002-01-31 at 14:14, Edward van Bilderbeek - Bean IT wrote: > > Maybe I better ask my question different... > > > > what i want to do is, to highlight certain text in a string... > > > > for example: "This equals this equals tHis..." has to become: > > "This equals this equals tHis"... so dispite the case, > > the 's should be put around it... > > > > does that make it easier? not for me :-) > > > > Greets, > > > > Edward > > > > > > - Original Message - > > From: "Jeff Sheltren" <[EMAIL PROTECTED]> > > To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > > <[EMAIL PROTECTED]> > > Sent: Thursday, January 31, 2002 11:06 PM > > Subject: Re: [PHP] ereg et all > > > > > > > Ahhh, ok makes more sense now. Although, I don't think that there is an > > > "easy" way to do what you are asking. I think that in order to accomplish > > > that, you will have to specify all possible cases of a string, and have a > > > ereg_replace() statement for each of them. > > > > > > Jeff > > > > > > At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: > > > >Oh, that was a typo... sorry... > > > > > > > >it should be: > > > > > > > >"This equals this equals tHis" -> "That equals that equals tHat" > > > > > > > >Edward > > > > > > > >- Original Message - > > > >From: "Jeff Sheltren" <[EMAIL PROTECTED]> > > > >To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > > > ><[EMAIL PROTECTED]> > > > >Sent: Thursday, January 31, 2002 10:56 PM > > > >Subject: Re: [PHP] ereg et all > > > > > > > > > > > > > I'm not sure why you wanted the last word "tHis" to be changed to > > "That" > > > > > (with a capital)... can you explain further? > > > > > > > > > > Jeff > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.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] ereg et all - new question..
Seems like that makes it a LOT easier. Use eregi_relace() instead of ereg_replace(). eregi allows for case-insensitivity. Try eregi_replace("this","\\1",$str); That should do it, though I haven't tried it myself. On Thu, 2002-01-31 at 14:14, Edward van Bilderbeek - Bean IT wrote: > Maybe I better ask my question different... > > what i want to do is, to highlight certain text in a string... > > for example: "This equals this equals tHis..." has to become: > "This equals this equals tHis"... so dispite the case, > the 's should be put around it... > > does that make it easier? not for me :-) > > Greets, > > Edward > > > - Original Message - > From: "Jeff Sheltren" <[EMAIL PROTECTED]> > To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: Thursday, January 31, 2002 11:06 PM > Subject: Re: [PHP] ereg et all > > > > Ahhh, ok makes more sense now. Although, I don't think that there is an > > "easy" way to do what you are asking. I think that in order to accomplish > > that, you will have to specify all possible cases of a string, and have a > > ereg_replace() statement for each of them. > > > > Jeff > > > > At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: > > >Oh, that was a typo... sorry... > > > > > >it should be: > > > > > >"This equals this equals tHis" -> "That equals that equals tHat" > > > > > >Edward > > > > > >- Original Message - > > >From: "Jeff Sheltren" <[EMAIL PROTECTED]> > > >To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > > ><[EMAIL PROTECTED]> > > >Sent: Thursday, January 31, 2002 10:56 PM > > >Subject: Re: [PHP] ereg et all > > > > > > > > > > I'm not sure why you wanted the last word "tHis" to be changed to > "That" > > > > (with a capital)... can you explain further? > > > > > > > > Jeff > > > > > > > > -- > PHP General Mailing List (http://www.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] ereg et all - new question..
Maybe I better ask my question different... what i want to do is, to highlight certain text in a string... for example: "This equals this equals tHis..." has to become: "This equals this equals tHis"... so dispite the case, the 's should be put around it... does that make it easier? not for me :-) Greets, Edward - Original Message - From: "Jeff Sheltren" <[EMAIL PROTECTED]> To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 11:06 PM Subject: Re: [PHP] ereg et all > Ahhh, ok makes more sense now. Although, I don't think that there is an > "easy" way to do what you are asking. I think that in order to accomplish > that, you will have to specify all possible cases of a string, and have a > ereg_replace() statement for each of them. > > Jeff > > At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: > >Oh, that was a typo... sorry... > > > >it should be: > > > >"This equals this equals tHis" -> "That equals that equals tHat" > > > >Edward > > > >- Original Message - > >From: "Jeff Sheltren" <[EMAIL PROTECTED]> > >To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > ><[EMAIL PROTECTED]> > >Sent: Thursday, January 31, 2002 10:56 PM > >Subject: Re: [PHP] ereg et all > > > > > > > I'm not sure why you wanted the last word "tHis" to be changed to "That" > > > (with a capital)... can you explain further? > > > > > > Jeff > > -- PHP General Mailing List (http://www.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] ereg et all
hmm, that's not what i wanted to hear :-))) e.g. try doing that for the word: transparancy looots of different possibilities then... Edward - Original Message - From: "Jeff Sheltren" <[EMAIL PROTECTED]> To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 11:06 PM Subject: Re: [PHP] ereg et all > Ahhh, ok makes more sense now. Although, I don't think that there is an > "easy" way to do what you are asking. I think that in order to accomplish > that, you will have to specify all possible cases of a string, and have a > ereg_replace() statement for each of them. > > Jeff > > At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: > >Oh, that was a typo... sorry... > > > >it should be: > > > >"This equals this equals tHis" -> "That equals that equals tHat" > > > >Edward > > > >- Original Message - > >From: "Jeff Sheltren" <[EMAIL PROTECTED]> > >To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > ><[EMAIL PROTECTED]> > >Sent: Thursday, January 31, 2002 10:56 PM > >Subject: Re: [PHP] ereg et all > > > > > > > I'm not sure why you wanted the last word "tHis" to be changed to "That" > > > (with a capital)... can you explain further? > > > > > > Jeff > > -- PHP General Mailing List (http://www.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] Best way to frequently check database?
On Thu, 31 Jan 2002, Rick Emery wrote: > To timeout users after 20 minutes, use a cookie which is set for 20 minutes. But once again you can have problems with cookies, they're not reliable (user can have cookies support turned off) and they tend to be good for CSS attacks :( You could have a timestamp updated in every access to a page, and then a cron job to delete the entries with timestamps older than some interval of time. But I guess that if your app will have tons of load, this is not a very good solucion :) Regards. -- PHP General Mailing List (http://www.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.jobs
Hi, Where can I find a list of PHP Jobs (help wanted)? Thanks, Brian -- PHP General Mailing List (http://www.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] ereg et all
Ahhh, ok makes more sense now. Although, I don't think that there is an "easy" way to do what you are asking. I think that in order to accomplish that, you will have to specify all possible cases of a string, and have a ereg_replace() statement for each of them. Jeff At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: >Oh, that was a typo... sorry... > >it should be: > >"This equals this equals tHis" -> "That equals that equals tHat" > >Edward > >- Original Message - >From: "Jeff Sheltren" <[EMAIL PROTECTED]> >To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; ><[EMAIL PROTECTED]> >Sent: Thursday, January 31, 2002 10:56 PM >Subject: Re: [PHP] ereg et all > > > > I'm not sure why you wanted the last word "tHis" to be changed to "That" > > (with a capital)... can you explain further? > > > > Jeff -- PHP General Mailing List (http://www.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] Best way to frequently check database?
To timeout users after 20 minutes, use a cookie which is set for 20 minutes. I'm not exactly sure what you are attempting to limit on database: 100 entries per hour, per day, per year, concurrently? -Original Message- From: Hawk [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 3:58 PM To: [EMAIL PROTECTED] Subject: [PHP] Best way to frequently check database? Let's say I have a database that recieves new information about 6 times/minute and I want the database to be checked to frequently to limit the maximum entrys to the database to.. let's say 100. And also timeout users if their session has been inactive for, let's say 20 minutes. -- PHP General Mailing List (http://www.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] ereg et all
Oh, that was a typo... sorry... it should be: "This equals this equals tHis" -> "That equals that equals tHat" Edward - Original Message - From: "Jeff Sheltren" <[EMAIL PROTECTED]> To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 10:56 PM Subject: Re: [PHP] ereg et all > I'm not sure why you wanted the last word "tHis" to be changed to "That" > (with a capital)... can you explain further? > > Jeff > > At 10:52 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: > >that is not what I meant... I want the cases to remain... > > > >- Original Message - > >From: "Rick Emery" <[EMAIL PROTECTED]> > >To: "'Edward van Bilderbeek - Bean IT'" <[EMAIL PROTECTED]>; > ><[EMAIL PROTECTED]> > >Sent: Thursday, January 31, 2002 10:47 PM > >Subject: RE: [PHP] ereg et all > > > > > > > try: eregi_replace("this","that","This equals this equals tHis"); > > > > > > > > > -Original Message- > > > From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] > > > Sent: Thursday, January 31, 2002 3:40 PM > > > To: [EMAIL PROTECTED] > > > Subject: [PHP] ereg et all > > > > > > > > > hi, > > > > > > is there a simple way to replace an occurence of a string, into another, > > > maintaing capital positions... > > > > > > Like: > > > $str = "This equals this equals tHis"; > > > > > > and I wanna replace all occurences of "this" in "that", that the result > >will > > > be: > > > > > > $str = "That equals that equals That"; > > > > > > Edward > > > > > > > > > > -- > PHP General Mailing List (http://www.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] Best way to frequently check database?
Let's say I have a database that recieves new information about 6 times/minute and I want the database to be checked to frequently to limit the maximum entrys to the database to.. let's say 100. And also timeout users if their session has been inactive for, let's say 20 minutes. -- PHP General Mailing List (http://www.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] ereg et all
I'm not sure why you wanted the last word "tHis" to be changed to "That" (with a capital)... can you explain further? Jeff At 10:52 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: >that is not what I meant... I want the cases to remain... > >- Original Message - >From: "Rick Emery" <[EMAIL PROTECTED]> >To: "'Edward van Bilderbeek - Bean IT'" <[EMAIL PROTECTED]>; ><[EMAIL PROTECTED]> >Sent: Thursday, January 31, 2002 10:47 PM >Subject: RE: [PHP] ereg et all > > > > try: eregi_replace("this","that","This equals this equals tHis"); > > > > > > -Original Message- > > From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, January 31, 2002 3:40 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] ereg et all > > > > > > hi, > > > > is there a simple way to replace an occurence of a string, into another, > > maintaing capital positions... > > > > Like: > > $str = "This equals this equals tHis"; > > > > and I wanna replace all occurences of "this" in "that", that the result >will > > be: > > > > $str = "That equals that equals That"; > > > > Edward > > > > -- PHP General Mailing List (http://www.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] ereg et all
that is not what I meant... I want the cases to remain... - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "'Edward van Bilderbeek - Bean IT'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 10:47 PM Subject: RE: [PHP] ereg et all > try: eregi_replace("this","that","This equals this equals tHis"); > > > -Original Message- > From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 31, 2002 3:40 PM > To: [EMAIL PROTECTED] > Subject: [PHP] ereg et all > > > hi, > > is there a simple way to replace an occurence of a string, into another, > maintaing capital positions... > > Like: > $str = "This equals this equals tHis"; > > and I wanna replace all occurences of "this" in "that", that the result will > be: > > $str = "That equals that equals That"; > > Edward > > > > -- > PHP General Mailing List (http://www.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] COM Question- Please Help
This is what I am trying to do. I am trying to add a border to the bottom edge of a cell. The Range and some other methods seem to not work with the syntax that the VB editor in excel says. Like Range in the vb editor is Range("A1:B9").Select. When I try this in php it gives me and error. I found that some of the functions are not recognized also. Do I have to use some other syntax? Do you know where I can get a list of the available objects that are available in php? I want to select the range A1:E5 $sheet = Range( ??? ); $sheet->Select; Thanks, __ Joseph D. Mainolfi Jr. IT Specialist American Bridge Company 1000 American Bridge Way Coraopolis, PA 15108 (412) 631-1018 phone (412) 631-2000 fax [EMAIL PROTECTED] http://www.americanbridge.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] ereg et all
try: eregi_replace("this","that","This equals this equals tHis"); -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 3:40 PM To: [EMAIL PROTECTED] Subject: [PHP] ereg et all hi, is there a simple way to replace an occurence of a string, into another, maintaing capital positions... Like: $str = "This equals this equals tHis"; and I wanna replace all occurences of "this" in "that", that the result will be: $str = "That equals that equals That"; Edward -- PHP General Mailing List (http://www.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] ereg et all
hi, is there a simple way to replace an occurence of a string, into another, maintaing capital positions... Like: $str = "This equals this equals tHis"; and I wanna replace all occurences of "this" in "that", that the result will be: $str = "That equals that equals That"; Edward -- PHP General Mailing List (http://www.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] Newbie: Question about filesize()
Hello There I'm new to PHP and trying to code a function that reads all teh files out of a directory and printing out a link and the filesize, but it seems that the filesize() function doesn't work, here's the code so far: $handle = opendir ('images'); echo "Files:"; while (false !== ($file = readdir ($handle))) { if($file != "." && $file != "..") { $file_s = filesize($file); echo "$file Filesize: $file_s"; } } closedir($handle); and the output is somethingl ike this: Files: button_test_04.gif Filesize: button_test_03-down.gif Filesize: lilextras_01.gif Filesize: (and so on)... You see, there's no Filesize and I don't know why, please help me -- manu -- PHP General Mailing List (http://www.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] Pregenerating Script Again
On Friday 01 February 2002 03:52, karthikeyan wrote: > Hi Guys, > > I got some sweet responses like using cat and using Output Buffering > functions. But then what i really want is to provide user with the > interface like this : > > Pregeneration Program > --- > > Step 1 - Choose you Header file [ ] [Browse] - here they will > choose the header file > > Step 2 - Choose you Body file [ ] [Browse] - here they will > choose the content body file > > Step 3 - Choose you Footer file [ ] [Browse] - here they will > choose the footer file > > Step 4 - Please give the output File Name [ ] - The file can > be saved in the same directory where this program is running > > [ Generate ] - This is a button > > When they press generate then step4 file should be created combining the > step1, step2 and step3 files. Obviously this will take them to the next > page where this operations will be carried out the then they will be shown > the succes or failure. > > Hope now you understand what i really want. You're still not making it clear what you want. Are the header/body/footer files just plain text? If yes, then cat will do. Do they contain php that needs to be interpreted? If so, then does the user need to see the results, or just a simple SUCCESS/FAILED? Etc. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* The moving cursor writes, and having written, blinks on. */ -- PHP General Mailing List (http://www.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] WIN CE builds
Anyone know of an Apache and PHP build for Win CE? I would rather build a Web app for my device than completely have to learn eMbedded VB, or use the IIS port with something like PocketASP from modezero. Thanks in advance, __ Mike Krisher Director of Technology hyperQUAKE 312 West 4th Street Cincinnati, OH 45202 Tel: 513.563.6555 Cel: 513.254.7821 AOLIM: twopeoplecom ICQ: 83891383 MSN: [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 and listbox multiple selections
Notice the "[ ]" at the end of the select box name, this prompts php to treat the values as an array. $myrow[1]"; } } ?> When the form is submitted I fire this code $mycount = count($options); // get the number of elements in the array (selected in the drop down) while($mycount){// cycle through the array decrementling your counter var ($mycount) untill you have inserted all of the values. $mycount--; mysql_query("INSERT INTO table (value1,value2) VALUES ($value1,$options[$mycount])"); } I hope this helps, it works perfectly for me and uses less code than other examples I have seen. > On Monday, January 28, 2002, at 10:41 AM, Simos Varelakis wrote: > >> A php form contains a listbox (named foolist) with n Items which >> can be >> multiple selected and form posted to >> results.php how can results.php determine which items were selected >> in order >> to add all the items in a Mysql table ??? > -- PHP General Mailing List (http://www.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] newbie: regular expression suggestios
I thought about the case insensitivity, but I wanted to be certain that A-Z was captured. Personnally, I'd use ereg(), as you suggest. -Original Message- From: Administrator [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 2:38 PM To: Rick Emery Subject: Re: [PHP] newbie: regular expression suggestios Would I be mistaken to say that the A-Z is not needed when using eregi() ? ereg(^[a-zA-Z0-9]*$); or eregi(^[a-z0-9]*$); eregi() being case insensitive... Am I wrong? - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "'Lee P Reilly'" <[EMAIL PROTECTED]>; "PHP List" <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 2:27 PM Subject: RE: [PHP] newbie: regular expression suggestios > try: if (eregi("^[a-zA-Z0-9]*$", $name)) > > This searches for [a-zA-Z0-9] between start and end of line with no other > intervening characters > > -Original Message- > From: Lee P Reilly [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 31, 2002 1:45 PM > To: PHP List > Subject: [PHP] newbie: regular expression suggestios > > > Hi, > > I am using (getting to grips with) regular expressions for validating > form data and have come across a little problem: > > I have a statement like the following: > if (eregi("^[a-z0-9]{strlen($name)}$, $name)) > { >blah... >return true; > } > > , but the strlen($name) does not seem to evaluated. Is there any way > this can be accomplished? If the code above is not clear (or correct!), > I am returning true iff the input is comprised of chars > (letters/numbers) only. Maybe there's a better/more efficient way to > accomplish this..? > > Any information greatly aprpeciated. Thanks in advance! > > - Best regards, > Lee Reilly > > -- > Lee P. Reilly, ms:G758 > Szilard Resource, tel:505-665-7025 > Bioscience Division, > SM-30 Bikini Atoll Rd, > Los Alamos National Laboratory, mailto:[EMAIL PROTECTED] > Los Alamos, NM 87545. http://home.lanl.gov/lreilly > > "Quidquid latine dictum sit, altum viditur" > > > > > -- > PHP General Mailing List (http://www.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] Pregenerating Script Again
Hi Guys, I got some sweet responses like using cat and using Output Buffering functions. But then what i really want is to provide user with the interface like this : Pregeneration Program --- Step 1 - Choose you Header file [ ] [Browse] - here they will choose the header file Step 2 - Choose you Body file [ ] [Browse] - here they will choose the content body file Step 3 - Choose you Footer file [ ] [Browse] - here they will choose the footer file Step 4 - Please give the output File Name [ ] - The file can be saved in the same directory where this program is running [ Generate ] - This is a button When they press generate then step4 file should be created combining the step1, step2 and step3 files. Obviously this will take them to the next page where this operations will be carried out the then they will be shown the succes or failure. Hope now you understand what i really want. Environment - Win NT, PHP 4.0.6, Apache Looking forward for your response. karthikeyan.
RE: [PHP] newbie: regular expression suggestios
try: if (eregi("^[a-zA-Z0-9]*$", $name)) This searches for [a-zA-Z0-9] between start and end of line with no other intervening characters -Original Message- From: Lee P Reilly [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 1:45 PM To: PHP List Subject: [PHP] newbie: regular expression suggestios Hi, I am using (getting to grips with) regular expressions for validating form data and have come across a little problem: I have a statement like the following: if (eregi("^[a-z0-9]{strlen($name)}$, $name)) { blah... return true; } , but the strlen($name) does not seem to evaluated. Is there any way this can be accomplished? If the code above is not clear (or correct!), I am returning true iff the input is comprised of chars (letters/numbers) only. Maybe there's a better/more efficient way to accomplish this..? Any information greatly aprpeciated. Thanks in advance! - Best regards, Lee Reilly -- Lee P. Reilly, ms:G758 Szilard Resource, tel:505-665-7025 Bioscience Division, SM-30 Bikini Atoll Rd, Los Alamos National Laboratory, mailto:[EMAIL PROTECTED] Los Alamos, NM 87545. http://home.lanl.gov/lreilly "Quidquid latine dictum sit, altum viditur" -- PHP General Mailing List (http://www.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] PHP and listbox multiple selections
On Monday, January 28, 2002, at 10:41 AM, Simos Varelakis wrote: > A php form contains a listbox (named foolist) with n Items which can > be > multiple selected and form posted to > results.php how can results.php determine which items were selected in > order > to add all the items in a Mysql table ??? You can define each in a listbox with an array element as its value. Like so: Item 1 Item 2 Item 3 That's one way to do it. Personally, if I'm populating a listbox with results returned from a SQL query, I use the primary key of the record as the "value" attribute in . Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [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] COM
is anyone out there familiar with COM built into Php? This is my code: $sheet = Range("B6:B9")->Select; $sheet->Selection->Borders(xlEdgeBottom); $sheet->Selection->LineStyle = 9; //xlContinuous $sheet->Selection->Weight = 2; //xlThin I get an error everytime I use the Range method and some other methods, the major things work, but the formatting seems to be a little funny with its syntax Any help would be greatly appreciated, Thanks in advance __ Joseph D. Mainolfi Jr. IT Specialist American Bridge Company 1000 American Bridge Way Coraopolis, PA 15108 (412) 631-1018 phone (412) 631-2000 fax [EMAIL PROTECTED] http://www.americanbridge.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] Need Urgent Help!!
mail("[EMAIL PROTECTED]","Subject line",$message,"From: $txtname <$email>"); -Original Message- From: Scott's Mail [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 2:00 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Need Urgent Help!! Shannon, I appreciate your help! The following are the form fields I have created in Flash and their variable names, I need to be able to receive an email from the website using php. FIELD = VARIABLE NAME name = txtname email = txtemail message = txtmessage the email address it needs to be sent to is my email address: [EMAIL PROTECTED] Thanks in Advance! - Original Message - From: "Shannon Cox" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 12:06 PM Subject: Re: [PHP] Need Urgent Help!! > Scott, > > Did you ever get this solved? If not, let me know and I will help you. > Please reply both to my address and send a copy to the list. > > Thanks, > Jason > > "Scott" <[EMAIL PROTECTED]> wrote in message > news:<[EMAIL PROTECTED]>... > > All, > > I have just found out that the VB script that I have used to send email > from > > my web site is null and void, apparently the server does not do VB or > > something along those lines (security) but that's not the issue. I have > > contacted my teh people who host my site and they told me I have to use > PHP > > script. > > My website (Flash) needs to be able to send emails and membership > > applications from form I have already created, does anyone have any > scripts > > and directions that some with absolutely no code writing skills can use. > > Your help is greatly appreciated!! > > Billy > > > > > > > > -- > > PHP General Mailing List (http://www.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] Help with JPGraph in PHP.
You need to send the headers to tell the browser what kind of data you're sending. Try something like this: header("Content-type: image/png"); Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Sridhar Moparthy [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 7:57 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Help with JPGraph in PHP. Also I am using GD2.0. Does any one know where I can get GD older version ( like GD1.6)? -Original Message- From: Sridhar Moparthy [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 9:23 AM To: [EMAIL PROTECTED] Subject: [PHP] Help with JPGraph in PHP. Hi All, Is any one is using JpGraphs to display graphs with PHP. If so could you please help me?. Here is what I have done. 1. Enabled extension php_gd.dll 2. Included jpgraph.php and jpgraph_line.php files. 3. Try to run the following code $ydata = array ( 11,3,8,12,5,1,9,13,5,7); $graph= new Graph(300,200); $graph->setscale("textlin"); $lineplot = new LinePlot($ydata); $graph->Add($lineplot); $graph->Stroke(); I am not getting the graph abut I am getting some junk characters like "PNG IHDR,È/" Am I missing anything here?. Do I need to set anything in php.ini file ?. Do I need to set anything in jpgraph.php? I am using PHP 4.06 On IIS, WinNT. Thank you in advance! Sridhar Moparthy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 -- PHP General Mailing List (http://www.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] libmcrypt v2.4.x
Just a quick question: the v2.4.x function declaration for several mcrypt functions requires a path to the library (at least thats what I have gathered), whereas previous versions didn't require this. Are they looking for a specific file path, or a general path to the library files? Mike Frazer -- PHP General Mailing List (http://www.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] problems with mt_rand()
Did you remember to seed it? See http://www.php.net/manual/en/function.mt-srand.php for info on how to seed it. Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Benjamin deRuyter [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 1:02 PM To: PHP Subject: [PHP] problems with mt_rand() I need to generate a random number (range is not crucial) and I have been trying to use mt_rand(). However, I am finding that is generates the same value EVERY time. This is true whether I supple a range or not. For example, the follow line of code generated 13 EVERY time... $result = mt_rand(1,15); echo $result; In addition, this line of code generated 1755202938 EVERY time... $result = mt_rand(); echo $result; What am I doing wrong?? - Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 -- PHP General Mailing List (http://www.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] problems with mt_rand()
On Thu, 31 Jan 2002, Benjamin deRuyter wrote: > I need to generate a random number (range is not crucial) and I have been > trying to use mt_rand(). However, I am finding that is generates the same > value EVERY time. This is true whether I supple a range or not. For > example, the follow line of code generated 13 EVERY time... 27-Mar-2001 07:29 Don't forget to do mt_srand() before the mtrand() or you wil get the same values every time you'll go back to the same page.Not when you refresh the page, only when you open the page in a new browserwindow and the history is empty. http://www.php.net/manual/en/function.mt-rand.php ~Chris /"\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] zend encoded files dont work
I'd imagine it's because windows zend has to compile them in a slightly different manner. Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Kunal Jhunjhunwala [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 12:41 PM To: php-list Subject: [PHP] zend encoded files dont work Hey guys, Zend encoded files on a linux machine dont seem to work on a windows machine. Any ideas why? I have tried uploading the files in binary and ascii mode.. .and the optimizer is also loaded successfullly... the encoded files work on linux.. but not windows... any ideas why? is there any one else havin the same problem?? Regards, Kunal Jhunjhunwala -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]