Re: [PHP] Re: classes v. functions

2003-07-20 Thread Curt Zirzow
* Thus wrote Simon Fredriksson ([EMAIL PROTECTED]):
 [...]
 just got confused. Then, suddenly I got some class for something, 
 checked out the code and my brain just snapped. aaah, THAT's how it's 
 done!. It wasn't well documented, just nicely structured and easy to 
 read and understand.

I need a good brain snap sometimes, too :)


Curt.
--


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: classes v. functions

2003-07-20 Thread Andu


--On Sunday, July 20, 2003 07:53:20 +0200 Simon Fredriksson 
[EMAIL PROTECTED] wrote:

I've been working like that for about two years and just recently I got
enlighted in the use of classes.
The main reason I started this thread is that since I'm just beginning with 
php I thought I might as well start with a good methodology. I've seen on 
the net whole collections of classes some going as far as almost inventing 
a new language but having some experience I know everything comes at a 
price.
Classes seem to provide advantages to plain functions but only sometimes, 
striking the right balance I guess, is what I'm after.
One shouldn't apply industrial theories to just everything.

Regards, Andu Novac

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] list server problem

2003-07-20 Thread Andu
Is it just me getting some messages 3 times?
I also noticed that there is no Reply-To in the headers so every time I 
want to reply to the list I have to copy/paste the list's address, clicking 
the Reply button would send my message to the poster, not the list.
I guess others are having the same problem for which reason they reply to 
all or cc to the list, all of us ending up with a couple copies of the 
message.
Is this something that can be fixed?

Regards, Andu Novac

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] list server problem

2003-07-20 Thread Curt Zirzow
* Thus wrote Andu ([EMAIL PROTECTED]):
 Is it just me getting some messages 3 times?
 I also noticed that there is no Reply-To in the headers so every time I 
 want to reply to the list I have to copy/paste the list's address, clicking 
 the Reply button would send my message to the poster, not the list.
 I guess others are having the same problem for which reason they reply to 
 all or cc to the list, all of us ending up with a couple copies of the 
 message.
 Is this something that can be fixed?

I've been noticing this too, everytime someone replies to the list I get
an extra copy of the mail. It seems that most people are just doing a
reply to all type follow-up. 

I've actually been considering adding a reply-to: php-general to my
outbound mail on this list, but have hesitated doing so.

I dont have that problem cause mutt recoginzes that I'm replying to the
mailing list and replies directly to the list instead of the user. It
would be nice if a solution could be made on this, i'm getting needless
mail in my mailbox.


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Coding Question

2003-07-20 Thread Aaron Axelsen
 
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

I am currently trying to think of how I want to solve an issue, and
im looking for some input.

I have a page that will query information from a database and then
properly display it on the screen.  Now the thing I want to set up is
the option to split the information over 2,3 or more pages.

For example, the user can set a value in the config file for how many
results to display for page, then on each page ill have something
that says results 25-50 here and what not.

The only thing that comes to my mind, is somehow setting up some
tests, and then altering the sql statement with the list option.  Is
this the best way to do this?  Does anyone else have any other
suggestions??

Thanks in advance for the assistance.

- ---
Aaron Axelsen
AIM: AAAK2
Email: [EMAIL PROTECTED]

Want reliable web hosting at affordable prices?
www.modevia.com
 
Web Dev/Design Community/Zine
www.developercube.com


-BEGIN PGP SIGNATURE-
Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com

iQA/AwUBPxpK1brnDjSLw9ADEQK0cQCgmFLBwO/IeqIYZIJUhR2j23Na5/sAniYv
nXehy/vKSs6AE8/yI3O9BixJ
=s7G2
-END PGP SIGNATURE-



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Forms and PHP

2003-07-20 Thread Jason Wong
On Sunday 20 July 2003 12:37, Jason Giangrande wrote:
 I have a question about forms and PHP.  Here's what I'm looking to do.
 I'm trying to set up a spell checker that checks text entered in a form,
 but I want the check results to show up in a different window so that
 the user can change the misspelled words if they'd like.  In other
 words, I want to be able to click a link and have another page open that
 checks the spelling.  My question is how can I send the text from the
 form to this other page (which, right now, is a separate php script) so
 it can be spell checked without actually submitting the actual form
 first?  In other words, I would like the user to be able to check the
 spelling without actually submitting the form.

Squirrelmail has a nice spelling checker which works similar to that. Take a 
look to see if you can borrow some ideas/code.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
It is not a good omen when goldfish commit suicide.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] list server problem

2003-07-20 Thread Jason Wong
On Sunday 20 July 2003 14:42, Andu wrote:
 Is it just me getting some messages 3 times?
 I also noticed that there is no Reply-To in the headers so every time I
 want to reply to the list I have to copy/paste the list's address, clicking
 the Reply button would send my message to the poster, not the list.
 I guess others are having the same problem for which reason they reply to
 all or cc to the list, all of us ending up with a couple copies of the
 message.
 Is this something that can be fixed?

There is nothing wrong with the headers that the list messages use. This was 
discussed fairly extensive about two weeks ago. Refer to archive for details.

The executive summary is that there is nothing to be fixed. If you're using a 
less than adequate mail client which does not understand the mailing list 
info contained in the headers then you should either change clients or, even 
easier, just add the mailing list address into your address book.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
An antique that seems too good to be true, probably is. 
-- Kathy Lee's Dictum
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Still problem with files

2003-07-20 Thread Jason Wong
On Monday 21 July 2003 00:23, Beauford.2005 wrote:
 These files were already done from last year, so I figured I would just
 carry on with them. Last year they did not have to be manipulated - so
 it wasn't a big deal. I have since changed the whole thing and am now
 using a database (took me a whole 45 minutes), which I was using anyway
 to hold all my other info. I'd still be curious though as to why the
 other way did not work.

If it's not obvious from examining the code then you have to get down to some 
serious debugging. Most importantly you need to:

 - incorporate error checking into your code, examine the values returned from 
all functions

 - var_dump() all your major variables and verify that they are what you 
expect them to be

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
What's all this brouhaha?
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] FREE PHP HOSTING

2003-07-20 Thread Bang Dodi
FREE PHP  MySQL Hosting !

http://cmax.port5.com

Film  TV Extras urgently required in your area - See Yourself in major Films  TV? 
Call 0907 1512440 to Register. calls cost 150pm  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] creating rs2 newsfeeds

2003-07-20 Thread Merlin
Hi there,

I was searching on the net for a while on how to create dynamic newsfeeds
from my web portal. Somehow I did not find what I was looking for.

Can anybody give me a good start on how to write a newsfeed service which is
dynamic? The goal is whenever a member publishes a story on the site, it
should be included into the newsfeed.

Thanx for any suggestions and help on this!

--
Worldwide Travel Community
http://www.globosapiens.net



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Preserving session vars over multiple windows

2003-07-20 Thread Thomas Hochstetter
Hi there.

How can i preserve var's of session 's' over more than one window without
loosing them?

Thomas

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++

Jetzt ein- oder umsteigen und USB-Speicheruhr als Prämie sichern!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] hi

2003-07-20 Thread David Kelso

Hi there,

My name is Dave, and no ya don't know me, but I wanna tell ya about something.
I'll admit I got your info off a website somewhere while searching around
for addys on Yahoo, but this isn't spam, and i'm not adding you to any
sort of list. This email is between *me* and *you* and if you reply,
you will get a real person on the other end :-)

The site that I saw yer addy on, and I can't really recall where I saw it,
it had something to do with message forums and online conversation, and I
am also into message forums also. I don't like the flame forums tho with
all the idiots just swearing like they have nothing better to do.

I like the ones that are fun, friendly, and the people actually have something
intelligent to say.

Well, anywayz, I run a message forum network called Xpresit Net, and am trying
to premote it. We don't sell anything, and I actually run the network from my
DSL line at home. The site is on an OC3, but the actual mail exchange takes
place from the hub on my DSL line.

This is a network in light of the fact that we not only offer it to regular
people, but we also offer it to websites to have for their visitors.

It's a free speech network, we just don't allow flaming, because I feel that
any opinion can be said without attacking someone.

We have 62 servers so far, and we have telnet, web, nntp (Newsgroup), and email
list access to post in the network.

Since this network is privately run, there is absolutely no spam, and the way
it is setup, spammers can't get to it.

You can't spam via a bot on the website, with telnet its impossible to spam,
and with email and nntp, if anyone actually manages to send out a spam
message, their account will be blocked and removed.

I setup this network 10 years ago, starting on my 14.4 modem, if you can
beleive that :-)

Well anyways, if you are a webmaster who wants the network on your site,
or if your just a regular person looking for a friendly place to chat
with some nice people, then please visit http://www.xpresit.net

If you have any questions, please feel free to reply. If your not
interested, I'm really really sorry to have bothered you, and you
can just delete this email.

Well anywayz, thats about all i have to say about that. I hope you'll
join us. But if not thats ok too.

Have a good one, and thanks again.

Dave



[PHP] Jumping between HTTP and HTTPS

2003-07-20 Thread John Manko
I'm having a little trouble understanding how to accomplish this.
Should the entire browsing session be HTTPS after login, or just for 
important functions like login and checkout
If noly for those function, who should I design to jump back an forth.  
I know DB should be used for cart items, but when I jump to HTTPS, 
should I enclude the session ID (which will be stored in the DB) as a 
GET query string field?  If not, how else will I be able to know which 
user to continue with.  I don't see any functions that will let you 
specify which session ID to continue with.  What is the best practice?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Coding Question

2003-07-20 Thread Justin French
Retrieving the results can be LIMITed to X results starting at row Y 
using mysql's LIMIT function.

Check the MySQL manual, but basically, this will limit the result to 10 
rows, starting with row 5.

SELECT name FROM customers LIMIT 5,10

By taking your values for the starting point and row count from 
variables from within the url, a posted form, session, cookie, etc, you 
can build dynamic queries, eg:

$sql = SELECT name FROM customers LIMIT {$start},{$perPage};

You can also build next and previous links by adding and subtracting 
the $perPage to the $start.

Make sense?

There's plenty of tutorials -- just do a google search.

Justin



On Sunday, July 20, 2003, at 05:55  PM, Aaron Axelsen wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,

I am currently trying to think of how I want to solve an issue, and
im looking for some input.
I have a page that will query information from a database and then
properly display it on the screen.  Now the thing I want to set up is
the option to split the information over 2,3 or more pages.
For example, the user can set a value in the config file for how many
results to display for page, then on each page ill have something
that says results 25-50 here and what not.
The only thing that comes to my mind, is somehow setting up some
tests, and then altering the sql statement with the list option.  Is
this the best way to do this?  Does anyone else have any other
suggestions??
Thanks in advance for the assistance.

- ---
Aaron Axelsen
AIM: AAAK2
Email: [EMAIL PROTECTED]
Want reliable web hosting at affordable prices?
www.modevia.com
Web Dev/Design Community/Zine
www.developercube.com
-BEGIN PGP SIGNATURE-
Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com
iQA/AwUBPxpK1brnDjSLw9ADEQK0cQCgmFLBwO/IeqIYZIJUhR2j23Na5/sAniYv
nXehy/vKSs6AE8/yI3O9BixJ
=s7G2
-END PGP SIGNATURE-


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
[This E-mail scanned for viruses]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] URL correctimizer ... how to make one?

2003-07-20 Thread Justin French
On Sunday, July 20, 2003, at 03:26  PM, Curt Zirzow wrote:

I know this isn't your code but...
yes, it wasn't mine, but i should have checked it out more thoroughly 
regardless.


btw, the above code is copyrighted so dont use it.
*sigh*... so why contribute it to the list?  Just to prove your skills?

I didn't join this list for that reason at all... I joined to teach and 
learn in return.

I have no need for the code you supplied AT ALL, and don't plan to use 
it, but fail to see why you're so precious about a few lines, and fail 
to see why you bothered to send it to the list at all if you didn't 
want anyone to use it.

Justin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Auto session timeout

2003-07-20 Thread Tan Ai Leen
Hi,
Can someone confirm that php does not have a auto timeout feature? Meaning
something like session will auto expire irregardless of whether the browser
is close or not?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] The 'Unable to create Java Virtual Machine' Again

2003-07-20 Thread Tan Ai Leen
Hi,
I know there are already a lot of posting regarding this bug. But I can't
find a solution for this problem. There is no problem with my installation,
I think. I can call java classes. But the Unable to create Java Virtual
Machine error will occur if I would to constantly refresh the page. I guess
there is a out of memory issue or deadlock somewhere.
Have any one sucessfully deploy php pages accessing java classes without
errors? This bug has been submitted but not resolved. Have anyone come up
with a solution?
I am working on a winxp, using Apache 1.3.27 and php 4.3.2., java version
1.4.1.

Thanks in advance.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] HOW TO -- ARRAY UPDATE MYSQL

2003-07-20 Thread Suresh Babu.A [Support]
Hi ALL,

I just want to validate each  row values of a and load the same in MYSQL
Table.

Suresh A.


On Sat, 19 Jul 2003, Curt Zirzow wrote:

 Suresh Babu.A [Support] [EMAIL PROTECTED] wrote:
  
  HI ALL,
  
  I want to update a mulitple row from a HTML Table to MYSQL Database.
  
  L1 V1 T1
  L2 V2 V2
  L3 V3 V3
 Can you expand on this a little more, it's a bit vague.
 
  
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] The 'Unable to create Java Virtual Machine' Again

2003-07-20 Thread Tan Ai Leen
Hi,
I know there are already a lot of posting regarding this bug. But I can't
find a solution for this problem. There is no problem with my installation,
I think. I can call java classes. But the Unable to create Java Virtual
Machine error will occur if I would to constantly refresh the page. I guess
there is a out of memory issue or deadlock somewhere.
Have any one sucessfully deploy php pages accessing java classes without
errors? This bug has been submitted but not resolved. Have anyone come up
with a solution?
I am working on a winxp, using Apache 1.3.27 and php 4.3.2., java version
1.4.1.

Thanks in advance.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Auto session timeout

2003-07-20 Thread John W. Holmes
Tan Ai Leen wrote:
Hi,
Can someone confirm that php does not have a auto timeout feature? Meaning
something like session will auto expire irregardless of whether the browser
is close or not?
If you're using the default session handler and storing the session 
files in the location specified in php.ini, then the files will be 
deleted by the garbage collection process after so many minutes of not 
being accessed. So, whether the browser window is open or not, the file 
will be deleted if it hasn't been accessed, thus ending the session.

The time that this happens isn't exact, though, since garbage collection 
is triggered based upon traffic to your site and a probability you set 
in php.ini. It's close enough for government work, though. :)

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals  www.phparch.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] URL correctimizer ... how to make one?

2003-07-20 Thread Randum Ian
And even if it is copyrighted as soon as you change variable names and
so on that copyright does not apply.

-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED] 
Sent: 20 July 2003 14:00
To: Curt Zirzow
Cc: php
Subject: Re: [PHP] URL correctimizer ... how to make one?


On Sunday, July 20, 2003, at 03:26  PM, Curt Zirzow wrote:

 I know this isn't your code but...

yes, it wasn't mine, but i should have checked it out more thoroughly 
regardless.


 btw, the above code is copyrighted so dont use it.

*sigh*... so why contribute it to the list?  Just to prove your skills?

I didn't join this list for that reason at all... I joined to teach and 
learn in return.

I have no need for the code you supplied AT ALL, and don't plan to use 
it, but fail to see why you're so precious about a few lines, and fail 
to see why you bothered to send it to the list at all if you didn't 
want anyone to use it.


Justin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL correctimizer ... how to make one?

2003-07-20 Thread Mike Morton
Tell me Curt, where is it copyrighted?  US/Canada/Worldwide?  Where is it
registered?  What do you intended to do to protect your copyright?  What
makes this code unique that it can be copyrighted to you?  Do you understand
copyrighting and intellectual property?  You just made that code public on a
public list - does that nullify the copyright?  Why did you post the code if
it was not with the intent to share?

Perhaps you should think twice/thrice/four-times before you post copyrighted
code - I can guarantee you that it will be used over and over and over by
many a person - and you did not even include a credit in the code.  Silly
boy :)



On 7/20/03 1:26 AM, Curt Zirzow [EMAIL PROTECTED] wrote:

 I know this isn't your code but...
 
 * Thus wrote Justin French ([EMAIL PROTECTED]):
 [...]
 
 // test the URL
 // it's important that you dont put http:// or it will not work
 // the 2nd paramater is how long to test the URL b4 timing out
 $found = fsockopen($url, 10);
 
 $found = fsockopen($host, $port, $errno, $errstr, $timeout);
 
 
 // act on it
 if($found)
 {  
 echo URL http://{$url} could not be found, thus is considered
 invalid;
 
 hm... actually this is found but any way but any way since it is found
 might as well check the uri..
 
 fputs($found, GET $uri HTTP/1.0\r\nHost: $host\r\n\r\n);
 
 $status = fgets($found)
 list(proto, $result, $result_text) = split($status);
 if ($result != 200 ) {
 echo url is bad, give me a better one;
 } else{
 echo thank you for for the url;
 }
 
 }
 ?
 
 and of course 
 fclose($found); //we dont want the rest of the page.
 
 
 hmm.. I think I did to much.. just that other peoples code frighten me
 sometimes
 
 btw, the above code is copyrighted so dont use it.
 
 cheers,
 
 Curt

--
Cheers

Mike Morton


*
* Tel: 905-465-1263
* Email: [EMAIL PROTECTED]
*


Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up with
Apple.
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: classes v. functions

2003-07-20 Thread Robert Cummings
On Sun, 2003-07-20 at 02:28, Andu wrote:
 
 One shouldn't apply industrial theories to just everything.
 

Object Oriented Design is not an industrial theory. It's a tried and
true practice with over a decade of computer science and practical use
behind it. Procedural programming is a subset of Object oriented
programming. Someday you'll need the higher level features OOD offers,
but until then it probably just won't make sense unless you actually go
and learn the principles from a good book or teacher. Trying to
formulate an opinion about OOD from the PHP mailing list is like trying
to form an opinion about nuclear physics from your buddy that watched
some show on nuclear power plants (maybe not that extreme, but hopefully
you get the point).

Cheers,
Rob.
-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: creating rs2 newsfeeds

2003-07-20 Thread Aquarion
On Sun, 20 Jul 2003 12:28:55 +0200, [EMAIL PROTECTED] (Merlin) wrote:

Hi there,

I was searching on the net for a while on how to create dynamic newsfeeds
from my web portal. Somehow I did not find what I was looking for.

Can anybody give me a good start on how to write a newsfeed service which is
dynamic? The goal is whenever a member publishes a story on the site, it
should be included into the newsfeed.

Thanx for any suggestions and help on this!

Two ways of doing it, basically.

First is a dynamic PHP page that goes though the last ten or whatever
updates and displays them as RSS (in much the same way you display a
recent articles page, except you output XML instead of HTML)

Second is to create the page as above whenever you add a new story and
then output it to a static file.

Output of RSS is fairly simple, start off with
?PHP
header(content-type: text/xml)
?

then build up the introductory data (I'm using a stripped down version
of my own feed as an example here):

example

?xml version=1.0 encoding=utf-8?
rss version=2.0 
  xmlns:dc=http://purl.org/dc/elements/1.1/;
channel
titleAquarionics/title
linkhttp://www.aquarionics.com/link
description/description
dc:languageen-gb/dc:language
dc:creatorAquarion ([EMAIL PROTECTED])/dc:creator
dc:rightsCopyright 2003 Aquarion/dc:rights
dc:date2003-07-20T11:55:00+0100/dc:date
admin:generatorAgent
rdf:resource=http://www.aquarionics.com/epistula/?v=2.0.2b; /

admin:errorReportsTo rdf:resource=mailto:[EMAIL PROTECTED]/
sy:updatePerioddaily/sy:updatePeriod
sy:updateFrequency8/sy:updateFrequency
sy:updateBase2000-01-01T12:00+00:00/sy:updateBase

/example

If it's a database, query for the last 10 items, then loop though them
and output the code:

item
titleJournal - Aquarion and the Missing Domain/title

linkhttp://www.aquarionics.com/journal/2003/07/18/Aquarion_and_the_Missing_Domain/link


commentshttp://www.aquarionics.com/journal/2003/07/18/Aquarion_and_the_Missing_Domain/comments
descriptionIn which a server vanishes/description
guid
isPermaLink=truehttp://www.aquarionics.com/journal/2003/07/18/Aquarion_and_the_Missing_Domain/guid
content:encoded![CDATA[  pOkay, so in the confusion
of yesterday, I forgot to mention something. As of yesterday morning,
the entire gkhs.net network went span class=capsAWOL/span
because for some reason neither of the people who have the domain got
any emails reminding us that it was due to expire./p

pThis is why none of you have discovered that
spirit.gkhs.net isn#8217;t working for span class=capsIRC/span
atm. I#8217;ll relaunch it when I get them back again (I#8217;ve now
renewed the domain)./p
 ]]/content:encoded
dc:date2003-07-18T07:33:00+0100/dc:date
dc:subjectcomputing/dc:subject
/item

Finally, do the final closing tags:

/channel
/rss

and then run it though the Feed Validator at
http://feeds.archive.org/validator/ to make sure you haven't done
anything silly :-)

The specification for RSS2 (which will tell you - or help you - know
what goes in all the tags I used above) is at
http://blogs.law.harvard.edu/tech/rss

HTH

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Forms and PHP

2003-07-20 Thread Yasir Malik
I'm working with forms using PHP and HTML.  I've noticed that there is a
limit of the length of a URL that can sent to browser (I'm passing many
many things as arguments across pages).  Is there a way to get across the
limit or am I doing something wrong?
Yasir

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Forms and PHP

2003-07-20 Thread John Nichel
Yasir Malik wrote:
I'm working with forms using PHP and HTML.  I've noticed that there is a
limit of the length of a URL that can sent to browser (I'm passing many
many things as arguments across pages).  Is there a way to get across the
limit or am I doing something wrong?
Yasir
Submit your form via post instead of get.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] mail function

2003-07-20 Thread Peda
I put this PHP script on web server:

?php
 if (mail([EMAIL PROTECTED], brati, peda, From: Peda)== TRUE)
print(U redu je);
 else
print(Greska);
?

But It seems that mail function doesn't work. I don't get any e-mail.

Can anyone tell me what is wrong.

Greetings.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: creating rs2 newsfeeds

2003-07-20 Thread Merlin
ok, I get the idea how to create those newsfeeds. Looks pretty staigh
forward.

How do you implement them on the client site. I read about news agregator
programms (like newsreaders for newsgroups). But I do want to integrate them
into another website without having php on that site. Do I have to wrap it
around another peace of software? It would be grate if it would just be a
html tag which just implements the little news into a whole html page
surrounded by its other content.

--
Worldwide Travel Community
http://www.globosapiens.net
Aquarion [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 On Sun, 20 Jul 2003 12:28:55 +0200, [EMAIL PROTECTED] (Merlin) wrote:

 Hi there,
 
 I was searching on the net for a while on how to create dynamic newsfeeds
 from my web portal. Somehow I did not find what I was looking for.
 
 Can anybody give me a good start on how to write a newsfeed service which
is
 dynamic? The goal is whenever a member publishes a story on the site, it
 should be included into the newsfeed.
 
 Thanx for any suggestions and help on this!

 Two ways of doing it, basically.

 First is a dynamic PHP page that goes though the last ten or whatever
 updates and displays them as RSS (in much the same way you display a
 recent articles page, except you output XML instead of HTML)

 Second is to create the page as above whenever you add a new story and
 then output it to a static file.

 Output of RSS is fairly simple, start off with
 ?PHP
 header(content-type: text/xml)
 ?

 then build up the introductory data (I'm using a stripped down version
 of my own feed as an example here):

 example

 ?xml version=1.0 encoding=utf-8?
 rss version=2.0
   xmlns:dc=http://purl.org/dc/elements/1.1/;
 channel
 titleAquarionics/title
 linkhttp://www.aquarionics.com/link
 description/description
 dc:languageen-gb/dc:language
 dc:creatorAquarion ([EMAIL PROTECTED])/dc:creator
 dc:rightsCopyright 2003 Aquarion/dc:rights
 dc:date2003-07-20T11:55:00+0100/dc:date
 admin:generatorAgent
 rdf:resource=http://www.aquarionics.com/epistula/?v=2.0.2b; /

 admin:errorReportsTo rdf:resource=mailto:[EMAIL PROTECTED]/
 sy:updatePerioddaily/sy:updatePeriod
 sy:updateFrequency8/sy:updateFrequency
 sy:updateBase2000-01-01T12:00+00:00/sy:updateBase

 /example

 If it's a database, query for the last 10 items, then loop though them
 and output the code:

 item
 titleJournal - Aquarion and the Missing Domain/title


linkhttp://www.aquarionics.com/journal/2003/07/18/Aquarion_and_the_Missing
_Domain/link



commentshttp://www.aquarionics.com/journal/2003/07/18/Aquarion_and_the_Mis
sing_Domain/comments
 descriptionIn which a server vanishes/description
 guid

isPermaLink=truehttp://www.aquarionics.com/journal/2003/07/18/Aquarion_an
d_the_Missing_Domain/guid
 content:encoded![CDATA[ pOkay, so in the confusion
 of yesterday, I forgot to mention something. As of yesterday morning,
 the entire gkhs.net network went span class=capsAWOL/span
 because for some reason neither of the people who have the domain got
 any emails reminding us that it was due to expire./p

 pThis is why none of you have discovered that
 spirit.gkhs.net isn#8217;t working for span class=capsIRC/span
 atm. I#8217;ll relaunch it when I get them back again (I#8217;ve now
 renewed the domain)./p
  ]]/content:encoded
 dc:date2003-07-18T07:33:00+0100/dc:date
 dc:subjectcomputing/dc:subject
 /item

 Finally, do the final closing tags:

 /channel
 /rss

 and then run it though the Feed Validator at
 http://feeds.archive.org/validator/ to make sure you haven't done
 anything silly :-)

 The specification for RSS2 (which will tell you - or help you - know
 what goes in all the tags I used above) is at
 http://blogs.law.harvard.edu/tech/rss

 HTH



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: creating rs2 newsfeeds

2003-07-20 Thread Manuel Lemos
Hello,

On 07/20/2003 07:28 AM, Merlin wrote:
I was searching on the net for a while on how to create dynamic newsfeeds
from my web portal. Somehow I did not find what I was looking for.
Can anybody give me a good start on how to write a newsfeed service which is
dynamic? The goal is whenever a member publishes a story on the site, it
should be included into the newsfeed.
You may want to try this class that does exactly what you ask:

http://www.phpclasses.org/rsswriter

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: A new FREE web server can do PHP faster than Apache's mod_php

2003-07-20 Thread Mark Clarkstone
I can't find the windows downloads?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: creating rs2 newsfeeds

2003-07-20 Thread Merlin
  Can anybody give me a good start on how to write a newsfeed service
which is
  dynamic? The goal is whenever a member publishes a story on the site, it
  should be included into the newsfeed.

 You may want to try this class that does exactly what you ask:

 http://www.phpclasses.org/rsswriter


thanx, but I am looking for a method which I can forward to people without
having to worry about php. Something like JavaSript. Something that even a
person on geocities would enable to put the newsfeed on there page.

Is this even possible?


--
Worldwide Travel Community
http://www.globosapiens.net
Manuel Lemos [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 Hello,

 On 07/20/2003 07:28 AM, Merlin wrote:
  I was searching on the net for a while on how to create dynamic
newsfeeds
  from my web portal. Somehow I did not find what I was looking for.
 
  Can anybody give me a good start on how to write a newsfeed service
which is
  dynamic? The goal is whenever a member publishes a story on the site, it
  should be included into the newsfeed.

 You may want to try this class that does exactly what you ask:

 http://www.phpclasses.org/rsswriter

 --

 Regards,
 Manuel Lemos

 Free ready to use OOP components written in PHP
 http://www.phpclasses.org/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Jumping between HTTP and HTTPS

2003-07-20 Thread Curt Zirzow
* Thus wrote John Manko ([EMAIL PROTECTED]):
 I'm having a little trouble understanding how to accomplish this.
 Should the entire browsing session be HTTPS after login, or just for 
 important functions like login and checkout
 If noly for those function, who should I design to jump back an forth.  
 I know DB should be used for cart items, but when I jump to HTTPS, 
 should I enclude the session ID (which will be stored in the DB) as a 
 GET query string field?  If not, how else will I be able to know which 
 user to continue with.  I don't see any functions that will let you 
 specify which session ID to continue with.  What is the best practice?

It is overkill to run whole site on https,  you only need it when
sensitive data is being sent back and forth (ie, credit card, login
info..)

Technically you only need to use https when the user actually
submits the form to the script that processes. So the page that
generates the form for the user to login does NOT need to be encrypted,
the forms action will contain the https url.

In general practice though I would probably encrypt the login/checkout
page just so 'joe user' feels more secure (seeing the little secure icon
in the lower left corner.)

You dont need to touch any php code, just modify the html so the
properlinks point to https where needed.

On and advanced note, there are ways to protect a users password on a
normal http connection.  The authentication program I helped developed
and use has the abilty to make a hash of the password on the client side
then send the hash value to the authentication script. The authenication
script never sees the password just verifies the hash.

http://sourceforge.net/projects/diggerauth/
(only cvs version is available, you need ot browse cvs to see the code)


HTH,

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Jumping between HTTP and HTTPS

2003-07-20 Thread Curt Zirzow
I'm curious as to why your email has these headers:

References: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
In-Reply-To: [EMAIL PROTECTED]

My email program thinks your discussing db sized and how you can get it
into a variable in php.

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL correctimizer ... how to make one?

2003-07-20 Thread Curt Zirzow
* Thus wrote Curt Zirzow ([EMAIL PROTECTED]):
 
 btw, the above code is copyrighted so dont use it. 

Sorry, i shouldn't and try and make jokes in the furture...

I was a little tired last night and kinda needed to lighten up my email
a little (but it backfired on me)..


Again, sorry for the confusion.

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] list server problem

2003-07-20 Thread Andu


--On Sunday, July 20, 2003 16:35:46 +0800 Jason Wong 
[EMAIL PROTECTED] wrote:

On Sunday 20 July 2003 14:42, Andu wrote:
Is it just me getting some messages 3 times?
I also noticed that there is no Reply-To in the headers so every time I
want to reply to the list I have to copy/paste the list's address,
clicking the Reply button would send my message to the poster, not the
list. I guess others are having the same problem for which reason they
reply to all or cc to the list, all of us ending up with a couple
copies of the message.
Is this something that can be fixed?
There is nothing wrong with the headers that the list messages use. This
was  discussed fairly extensive about two weeks ago. Refer to archive for
details.
The executive summary is that there is nothing to be fixed. If you're
using a  less than adequate mail client which does not understand the
mailing list  info contained in the headers then you should either change
clients or, even  easier, just add the mailing list address into your
address book.
Nonsense, all clients understand reply-to if it's there and that is the 
obligation of the sender which in this case is the list server not my 
client.



Regards, Andu Novac

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: creating rs2 newsfeeds

2003-07-20 Thread Manuel Lemos
Hello,

On 07/20/2003 01:07 PM, Merlin wrote:
Can anybody give me a good start on how to write a newsfeed service
which is

dynamic? The goal is whenever a member publishes a story on the site, it
should be included into the newsfeed.
You may want to try this class that does exactly what you ask:

http://www.phpclasses.org/rsswriter


thanx, but I am looking for a method which I can forward to people without
having to worry about php. Something like JavaSript. Something that even a
person on geocities would enable to put the newsfeed on there page.
Is this even possible?
Sure, just use that class to generate RSS feed and then use this 
Javascript feed viewer service to embed it peoples pages with a single 
HTML line. Here is an example:

Original feed:
http://www.phpclasses.org/browse.html/latest/latest.xml
HTML tags to embed:
script language=javascript 
src=http://publish.curry.com/rss/rss-box.r?url=http://www.phpclasses.org/browse.html/latest/latest.xmlalign=leftwidth=200frameColor=blacktitleBarColor=%23add8e6titleBarTextColor=blackboxFillColor=whitetextColor=blackfontFace=maxItems=7compact=xmlButton=javascript=true;/script

Feed viewer page:
http://publish.curry.com/rss/?url=http%3A%2F%2Fwww.phpclasses.org%2Fbrowse.html%2Flatest%2Flatest.xmlwidth=200align=leftframeColor=blacktitleBarColor=%23add8e6titleBarTextColor=blackboxFillColor=whitetextColor=blackfontFace=maxItems=7setup=true
--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Auto session timeout

2003-07-20 Thread Curt Zirzow
* Thus wrote Tan Ai Leen ([EMAIL PROTECTED]):
 Hi, Can someone confirm that php does not have a auto timeout feature?
 Meaning something like session will auto expire irregardless of
 whether the browser is close or not?
 

two php ini variables that effect this:

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0

; After this number of seconds, stored data will be seen as 'garbage' and 
; cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440

Now if your cookie_lifetime is greater than your gc_maxlifetime, I'm not
sure if garbage clean up will honor the time of the cookie_lifetime.  I
would think it should.


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



php-general Digest 20 Jul 2003 17:09:02 -0000 Issue 2187

2003-07-20 Thread php-general-digest-help

php-general Digest 20 Jul 2003 17:09:02 - Issue 2187

Topics (messages 155942 through 155982):

Re: Forms and PHP
155942 by: Jason Giangrande
155951 by: Jason Wong
155970 by: Yasir Malik
155971 by: John Nichel

Re: Setting total db size to a variable.
155943 by: Curt Zirzow

Re: URL correctimizer ... how to make one?
155944 by: Curt Zirzow
155960 by: Justin French
155966 by: Randum Ian
155967 by: Mike Morton
155979 by: Curt Zirzow

Re: classes v. functions
155945 by: Simon Fredriksson
155946 by: Curt Zirzow
155947 by: Andu
155968 by: Robert Cummings

list server problem
155948 by: Andu
155949 by: Curt Zirzow
155952 by: Jason Wong
155980 by: Andu

Coding Question
155950 by: Aaron Axelsen
155959 by: Justin French

Re: Still problem with files
155953 by: Jason Wong

FREE PHP HOSTING
155954 by: Bang Dodi

creating rs2 newsfeeds
155955 by: Merlin
155969 by: Aquarion
155973 by: Merlin
155974 by: Manuel Lemos
155976 by: Merlin
155981 by: Manuel Lemos

Preserving session vars over multiple windows
155956 by: Thomas Hochstetter

hi
155957 by: David Kelso

Jumping between HTTP and HTTPS
155958 by: John Manko
155977 by: Curt Zirzow
155978 by: Curt Zirzow

Auto session timeout
155961 by: Tan Ai Leen
155965 by: John W. Holmes
155982 by: Curt Zirzow

The 'Unable to create Java Virtual Machine' Again
155962 by: Tan Ai Leen
155964 by: Tan Ai Leen

Re: HOW TO -- ARRAY UPDATE MYSQL
155963 by: Suresh Babu.A [Support]

mail function
155972 by: Peda

Re: A new FREE web server can do PHP faster than Apache's mod_php
155975 by: Mark Clarkstone

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
---BeginMessage---
Thanks guys.  I think I'll try it first as Chris suggested and see how
that goes.  Thanks again.

Jason

On Sun, 2003-07-20 at 00:55, Justin French wrote:
 This is done with javascript... without getting too off topic... JS can 
 get the contents of the textarea, and submit it via get (maybe post as 
 well) to another (pop-up) window.  the pop-up window can highlght 
 misspelled words, and even make dynamic changes to the content in the 
 first window.
 
 it's pretty complex stuff though... and definitely NOT for the JS 
 newbie...
 
 look around the JS lists and sites for something that might give you a 
 head start.
 
 
 justin
 
 
 
 On Sunday, July 20, 2003, at 02:37  PM, Jason Giangrande wrote:
 
  I have a question about forms and PHP.  Here's what I'm looking to do.
  I'm trying to set up a spell checker that checks text entered in a 
  form,
  but I want the check results to show up in a different window so that
  the user can change the misspelled words if they'd like.  In other
  words, I want to be able to click a link and have another page open 
  that
  checks the spelling.  My question is how can I send the text from the
  form to this other page (which, right now, is a separate php script) so
  it can be spell checked without actually submitting the actual form
  first?  In other words, I would like the user to be able to check the
  spelling without actually submitting the form.
 
  Thanks,
  Jason Giangrande
 
 
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  ---
  [This E-mail scanned for viruses]
 
 
 

---End Message---
---BeginMessage---
On Sunday 20 July 2003 12:37, Jason Giangrande wrote:
 I have a question about forms and PHP.  Here's what I'm looking to do.
 I'm trying to set up a spell checker that checks text entered in a form,
 but I want the check results to show up in a different window so that
 the user can change the misspelled words if they'd like.  In other
 words, I want to be able to click a link and have another page open that
 checks the spelling.  My question is how can I send the text from the
 form to this other page (which, right now, is a separate php script) so
 it can be spell checked without actually submitting the actual form
 first?  In other words, I would like the user to be able to check the
 spelling without actually submitting the form.

Squirrelmail has a nice spelling checker which works similar to that. Take a 
look to see if you can borrow some ideas/code.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general

Re: [PHP] Forms and PHP

2003-07-20 Thread Curt Zirzow
* Thus wrote Yasir Malik ([EMAIL PROTECTED]):
 I'm working with forms using PHP and HTML.  I've noticed that there is a
 limit of the length of a URL that can sent to browser (I'm passing many
 many things as arguments across pages).  Is there a way to get across the
 limit or am I doing something wrong?
 Yasir

using a form POST has virtually unlimited amount data that can be sent.

if you have to keep passing the data around, I would suggest to storing
the data in a session of some sort then just passing the session
variable around in the urls.


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] list server problem

2003-07-20 Thread Jason Wong
On Monday 21 July 2003 00:39, Andu wrote:

  The executive summary is that there is nothing to be fixed. If you're
  using a  less than adequate mail client which does not understand the
  mailing list  info contained in the headers then you should either change
  clients or, even  easier, just add the mailing list address into your
  address book.

 Nonsense, all clients understand reply-to if it's there and that is the
 obligation of the sender which in this case is the list server not my
 client.

Please read the archives.

The list is not the originator/sender of any particular message and hence 
should not be the subject of any reply or reply-to. Therefore it follows that 
it is not the list's responsibility to set a reply-to header pointing to 
itself.

It is the mail client's job (or the list subscriber to be more precise) to 
direct a reply to the appropriate place and not the list's responsibility to 
second-guess where a reply should be directed.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Delta: The kids will love our inflatable slides.-- David Letterman
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail function

2003-07-20 Thread Curt Zirzow
* Thus wrote Peda ([EMAIL PROTECTED]):
 I put this PHP script on web server:
 
 ?php if (mail([EMAIL PROTECTED], brati, peda, From: Peda)==
 TRUE) print(U redu je); else print(Greska); ?
 
 But It seems that mail function doesn't work. I don't get any e-mail.
 
 Can anyone tell me what is wrong.

What does your sendmail_path say in your config, and what OS are you
running.

Read:
http://us2.php.net/mail
and
http://php.net/function.mail

Oh, and your from should contain a valid email too, otherwise it prolly
get bounced to /dev/null

From: Peda [EMAIL PROTECTED]

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail function

2003-07-20 Thread Jason Wong
On Sunday 20 July 2003 23:00, Peda wrote:
 I put this PHP script on web server:

 ?php
  if (mail([EMAIL PROTECTED], brati, peda, From: Peda)== TRUE)
 print(U redu je);
  else
 print(Greska);
 ?

 But It seems that mail function doesn't work. I don't get any e-mail.

 Can anyone tell me what is wrong.

Check your php error logs and your mailserver logs.

A good and quick way to check whether mail on your system is working correctly 
is to use error_log() with the mail option.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
What a misfortune to be a woman!  And yet, the worst misfortune is not to
understand what a misfortune it is.
-- Kierkegaard, 1813-1855.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Jumping between HTTP and HTTPS

2003-07-20 Thread Jason Wong
On Monday 21 July 2003 00:30, Curt Zirzow wrote:
 I'm curious as to why your email has these headers:

 References: [EMAIL PROTECTED]
 [EMAIL PROTECTED] [EMAIL PROTECTED]
 In-Reply-To: [EMAIL PROTECTED]

 My email program thinks your discussing db sized and how you can get it
 into a variable in php.

That's because:

---
You have started a new thread by taking an existing posting and replying to
it while you changed the subject.

That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a References: header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view (tree view) of the postings.

With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.

Always do a fresh post when you want to start a new thread. To achieve this,
click on New message instead of Reply within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.
---

In the above, $you =='john'.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
30. Ooops.  Save your work, everyone.  FAST!

--Top 100 things you don't want the sysadmin to say
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Jumping between HTTP and HTTPS

2003-07-20 Thread John W. Holmes
Curt Zirzow wrote:

On and advanced note, there are ways to protect a users password on a
normal http connection.  The authentication program I helped developed
and use has the abilty to make a hash of the password on the client side
then send the hash value to the authentication script. The authenication
script never sees the password just verifies the hash.
So, I can't sniff the password, but I can sniff the hash and then send 
the same one when I want access. This doesn't protect much until the 
user changes their password and I have to get their new hash.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals  www.phparch.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] list server problem

2003-07-20 Thread Andu


--On Monday, July 21, 2003 01:34:11 +0800 Jason Wong 
[EMAIL PROTECTED] wrote:

On Monday 21 July 2003 00:39, Andu wrote:

 The executive summary is that there is nothing to be fixed. If you're
 using a  less than adequate mail client which does not understand the
 mailing list  info contained in the headers then you should either
 change clients or, even  easier, just add the mailing list address
 into your address book.
Nonsense, all clients understand reply-to if it's there and that is the
obligation of the sender which in this case is the list server not my
client.
Please read the archives.
There's several thousand emails in there, give me a subject or something. I 
already attempted to do that but the search only takes 2 words, it looks 
like and chances I use the relevant ones are low, just spent some time 
without any relevant success.

The list is not the originator/sender of any particular message and hence
should not be the subject of any reply or reply-to. Therefore it follows
that  it is not the list's responsibility to set a reply-to header
pointing to  itself.
So what you're saying is that all the lists i've been on in the past 7-8 
years were doing it wrong but this one doesn't. The list is not the 
originator of my message but an inteligent list server knows that the vast 
majority of the clients want to reply to the list not the originator of the 
message.

It is the mail client's job (or the list subscriber to be more precise)
to  direct a reply to the appropriate place and not the list's
responsibility to  second-guess where a reply should be directed.
So what do I do if I have one account only? Should I keep changing the 
Reply-To for each email I send so that replies to other unrelated mail 
don't end up on php list? The list should second-guess members of the list 
want to reply to the list 99% of the time without being wrong.

--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Delta: The kids will love our inflatable slides.-- David Letterman
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





Regards, Andu Novac

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Mail From option in PHP.ini

2003-07-20 Thread Lowell Allen
 From the php website, it appears that the [EMAIL PROTECTED] can be
 put in the fifth parameter of the mail() function:
 
 Example 3. Sending mail with extra headers and setting an additional
 command line parameter.
 
 mail([EMAIL PROTECTED], the subject, $message,
From: [EMAIL PROTECTED], [EMAIL PROTECTED]);
 
 
 Note: This fifth parameter was added in PHP 4.0.5. Since PHP 4.2.3
 this parameter is disabled in safe_mode and the mail() function will
 expose a warning message and return FALSE if you're trying to use it.

I followed this recent thread with some interest, because I'd like to be
able to set the return-path header for a script that emails to a large list,
which would in turn allow me to identify bounced emails. I'm using a shared
host server, with PHP running as the master account user name, so the
return-path for emails is something like Return-Path:
[EMAIL PROTECTED]. I had accepted that I could not change
the return-path value with PHP, but reading about this fifth parameter
renewed my hope that I could.

I tried adding a fifth parameter to mail() in order to do this, like so:

// fifth mail() parameter to set envelope sender
$cmd_line_param = [EMAIL PROTECTED];
mail($fullname$email, $subject, $message, $headers, $cmd_line_param);

This didn't change the return-path header. Perhaps the problem is that I
have no idea what the syntax of the command line parameter is (what the -f
does).

Can anyone advise? Is it possible to use this fifth parameter to set the
return-path header, and if so, what's the syntax?

TIA,

--
Lowell Allen


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Jumping between HTTP and HTTPS

2003-07-20 Thread Curt Zirzow
* Thus wrote John W. Holmes ([EMAIL PROTECTED]):
 Curt Zirzow wrote:
 
 On and advanced note, there are ways to protect a users password on a
 normal http connection.  The authentication program I helped
 developed and use has the abilty to make a hash of the password on
 the client side then send the hash value to the authentication
 script. The authenication script never sees the password just
 verifies the hash.
 
 So, I can't sniff the password, but I can sniff the hash and then send
 the same one when I want access. This doesn't protect much until the
 user changes their password and I have to get their new hash.

The method isn't fool proof.  There other things the authentication
checks for when building the hash. 

User Requests login form:
  1. when the user requests the login page the auth program generates a
 key which is something like md5(rand()).
  2. stores that key in session variable for the next request.

User Submits form:
  3. when the form is submitted a javascipt function takes the key and
 hashes the password with the key (and otherstuff)
  4. the auth program then  looks at the users session stuff finds the
 key that it generated, from when the user first requested the page.
  5. uses the session key and the users password from the database and
 hashes those together.
  6. if they match then the following was true.
- user currently has the currect session (expires after time)
- user currently has the corrrect (psudo secret) key (expires 
after time)
- user is from the same ip (optional) 
- user had entered the correct password. 
7. on fail or success, the key is marked as stale (expired). If it
 failed a new key is generated, and we restart the login form
 process.

So.. if you followed that and I explained it well enough... 

if you do sniff the hash, the key, and the session.  You will  have to
get your request in before the key becomes stale, otherwise that
information you have is bad.  In most cases the authentication is the
first thing done so we're dealing with micro seconds.

You can check the code out if you want its over on sourceforge
(called DiggerAuth).


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Mail From option in PHP.ini

2003-07-20 Thread Curt Zirzow
* Thus wrote Lowell Allen ([EMAIL PROTECTED]):
 return-path for emails is something like Return-Path:
 [EMAIL PROTECTED]. I had accepted that I could not change
 the return-path value with PHP, but reading about this fifth parameter
 renewed my hope that I could.
 
 I tried adding a fifth parameter to mail() in order to do this, like so:
 
 // fifth mail() parameter to set envelope sender
 $cmd_line_param = [EMAIL PROTECTED];
 mail($fullname$email, $subject, $message, $headers, $cmd_line_param);
 
 This didn't change the return-path header. Perhaps the problem is that I
 have no idea what the syntax of the command line parameter is (what the -f
 does).

I believe its '-f [EMAIL PROTECTED]', could be different depending on wich
sendmail your using.

I'm curious though what if your sendmail already has a -f on it:
  php.ini: sendmail_path=sendmail [EMAIL PROTECTED]

thus a command
sendmail [EMAIL PROTECTED] [EMAIL PROTECTED]

 
 Can anyone advise? Is it possible to use this fifth parameter to set the
 return-path header, and if so, what's the syntax?
 

Also, the 5th paramater is disabled in safe_mode, check that also if the
above doesn't work.


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Serial Port and PHP Login

2003-07-20 Thread Dev
Hello All,

I have asked before about serial port programing with PHP and have gotten 
great advice and now I am stuck again.

Okay here is my problem.

I want to have a php app executed upon a modem connection.  Currently the 
/sbin/login is what is executed.

Does anyone have any clues on this or where I may want to look.  I am using 
mgetty as my modem connection control.

Thanks in advance!



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Jumping between HTTP and HTTPS

2003-07-20 Thread John Manko


You dont need to touch any php code, just modify the html so the
properlinks point to https where needed.
 

I tried that.  However, the session is different when going from 80 to 
443. 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Jumping between HTTP and HTTPS

2003-07-20 Thread John W. Holmes
John Manko wrote:



You dont need to touch any php code, just modify the html so the
properlinks point to https where needed.
 

I tried that.  However, the session is different when going from 80 to 443.
You'll have to pass the SID through the form or URL when switching from 
HTTP to HTTPS.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals  www.phparch.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mail function

2003-07-20 Thread Peda
sendmail_path = /usr/sbin/sendmail
OS is Linux




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Auto session timeout

2003-07-20 Thread Hardik Doshi
Hi,

I have implemented the Auto session timeout after the
specific period of time. 

What i am doing is..At the time of login to the
system, my script is storing the current unix time
into the session and later on at every user click, It
(my script) is checking the stored unix time with the
current time. So, if you want to auto logout the user
after 30 minutes of inactivity then you need to store
auto session timeout interval to 30 min. 

Algorith is..If session stored time + auto session
timeout interval  current time then my script
automatically logout the user from the system
otherwise my script stores the current unix time in
the session.

My problem is.. If user is doing some work on the
particular page (Ex. user is writing some stuff on the
specific page) but my script is counting this thing to
inactive period.. so after 31 minutes if user is
completing the writing and hit submit button then he
is getting the session expired screen and he is
loosing all the contents on that particular page..
Please let me know if any one has solution for this.

Let me know if i am unclear at any point.

Thanks

Hardik


--- John W. Holmes [EMAIL PROTECTED] wrote:
 Tan Ai Leen wrote:
  Hi,
  Can someone confirm that php does not have a auto
 timeout feature? Meaning
  something like session will auto expire
 irregardless of whether the browser
  is close or not?
 
 If you're using the default session handler and
 storing the session 
 files in the location specified in php.ini, then the
 files will be 
 deleted by the garbage collection process after so
 many minutes of not 
 being accessed. So, whether the browser window is
 open or not, the file 
 will be deleted if it hasn't been accessed, thus
 ending the session.
 
 The time that this happens isn't exact, though,
 since garbage collection 
 is triggered based upon traffic to your site and a
 probability you set 
 in php.ini. It's close enough for government work,
 though. :)
 
 -- 
 ---John Holmes...
 
 Amazon Wishlist:
 www.amazon.com/o/registry/3BEXC84AB3A5E/
 
 PHP|Architect: A magazine for PHP Professionals –
 www.phparch.com
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] redirecting to a url..

2003-07-20 Thread Louie Miranda
yes, got it working. thanks a lot.. i did use header

--
Thank you,
Louie Miranda ([EMAIL PROTECTED])


- Original Message - 
From: Chris Shiflett [EMAIL PROTECTED]
To: Louie Miranda [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:45 PM
Subject: Re: [PHP] redirecting to a url..


 
 --- Louie Miranda [EMAIL PROTECTED] wrote:
  echo meta http-equiv=\REFRESH\ CONTENT=\0; URL=us/index.php\;
  
  Or you may have other more advance alternatives?
 
 You can use a protocol redirect rather than relying on HTML:
 
 header('Location: http://yoursite.org/us/index.php');
 
 Chris
 
 =
 Become a better Web developer with the HTTP Developer's Handbook
 http://httphandbook.org/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Still problem with files

2003-07-20 Thread Beauford.2005
I've kept the code in a temp file so when I get some time I will delve
into it further. Certainly more of a pain than I expected.

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED] 
Sent: July 20, 2003 4:45 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Still problem with files


On Monday 21 July 2003 00:23, Beauford.2005 wrote:
 These files were already done from last year, so I figured I would 
 just carry on with them. Last year they did not have to be manipulated

 - so it wasn't a big deal. I have since changed the whole thing and am

 now using a database (took me a whole 45 minutes), which I was using 
 anyway to hold all my other info. I'd still be curious though as to 
 why the other way did not work.

If it's not obvious from examining the code then you have to get down to
some 
serious debugging. Most importantly you need to:

 - incorporate error checking into your code, examine the values
returned from 
all functions

 - var_dump() all your major variables and verify that they are what you

expect them to be

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
What's all this brouhaha?
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Error - when trying to connect to postgresql

2003-07-20 Thread Paul Tun
When I try to connect to postresql with my php script below I got hhis eror:
I can insert into the table from psql.  Please help
 
Thanks,
 
---
Warning: pg_exec() query failed: ERROR: invention: permission denied in 
/home/pptun/public_html/invention.php on line 9
---
Here is my PHP script:

?PHP

$L_Invention = addslashes($Invention);

$L_Inventor = addslashes($Inventor);

$L_Year = addslashes($Year);

//note: Nation is a code with integer value

$L_Nation = addslashes($Nation);

$conn = pg_connect(dbname=pptun port=5432);

$result = pg_exec($conn, insert into invention 
values('$L_Invention','$L_Inventor','$L_Year',$L_Nation););

//header(Location:http://is3.usfca.edu/~pptun/invention.html;);

exit;

?



-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Re: [PHP] Auto session timeout

2003-07-20 Thread John W. Holmes
Hardik Doshi wrote:

Hi,

I have implemented the Auto session timeout after the
specific period of time. 

What i am doing is..At the time of login to the
system, my script is storing the current unix time
into the session and later on at every user click, It
(my script) is checking the stored unix time with the
current time. So, if you want to auto logout the user
after 30 minutes of inactivity then you need to store
auto session timeout interval to 30 min. 

Algorith is..If session stored time + auto session
timeout interval  current time then my script
automatically logout the user from the system
otherwise my script stores the current unix time in
the session.
My problem is.. If user is doing some work on the
particular page (Ex. user is writing some stuff on the
specific page) but my script is counting this thing to
inactive period.. so after 31 minutes if user is
completing the writing and hit submit button then he
is getting the session expired screen and he is
loosing all the contents on that particular page..
Please let me know if any one has solution for this.
What you could do, at the point you realize the session has times out, 
is save the contents of $_GET, $_POST, or $_REQUEST (depending upon your 
script) and the current URL of the page in the session. Have the user 
log in again. The login validation page then checks for the saved 
values, and if they are there, redirects back to that page. Then the 
user doesn't lose anything. It'll require a little work, but short of 
increasing your time-out limit, that's the best option. There's no way 
to tell if a user is working on filling out a page or has left the 
browser open.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals  www.phparch.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Howto list Mysql Table Headers using PHP

2003-07-20 Thread Ow Mun Heng
Hi,

Got a quick question.. How do I get the table headers also
printed/retrieved by PHP for 'echo'??

eg :
1   +--+--+-++
2   | Drive SN | HSA DCM  | Family  | Media Supplier |
3   +--+--+-++
4   | WMACK001 | GD223213JHHS | PIONEER | KOMAG  |
5   | WMACK002 | GH37489284HH | PIONEER | FUJI   |
6   | WMACK003 | F023213JHHS  | XBOX| KOMAG  |
7   | WMACK004 | FV23213JHHS  | XBOX||
8   +--+--+-++

The coding can get rows 4-7 printed out but I would like to get row2 printed
out as well. The table's all set up for it already.

I'm using 

$result = mysql_query($sql);
$num_results = mysql_num_rows($result);
for ($i = 0; $i  $num_results ; $i++)
{
echo tr\n  ;
$row = mysql_fetch_row($result);
for ($j = 0; $j  sizeof($row) ; $j++)
{
echo \t . 'td'; 
echo  $row[$j] ;
echo /td \n;
}
echo /tr\n;
}


Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia 
DID : 03-7870 5168


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Howto list Mysql Table Headers using PHP

2003-07-20 Thread John W. Holmes
Ow Mun Heng wrote:

Hi,

Got a quick question.. How do I get the table headers also
printed/retrieved by PHP for 'echo'??
mysql_field_name()

Next time, check the manual. :)

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals  www.phparch.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] on preview, loosing data using post/session..

2003-07-20 Thread Louie Miranda
hello, im am making a business card preview program. im passing data using..
post and session. i did use a redir on my index because i use 2 diff layout.
when it redir it goes to a index site that dont have a post yet. after the
users enters the data when they preview the data is ok, but when they go
back to correct the fields. the entered data is being lost.

is there a way to store data that it wont be lost using it's session? or
post? what ever's easy will be good help.

--
Thank you,
Louie Miranda ([EMAIL PROTECTED])



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Howto list Mysql Table Headers using PHP

2003-07-20 Thread Ow Mun Heng
Whoops.. Missed that..

Thanks.. ( sorry..)

Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia 
DID : 03-7870 5168


-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Monday, July 21, 2003 9:45 AM
To: Ow Mun Heng
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Howto list Mysql Table Headers using PHP


Ow Mun Heng wrote:

 Hi,
 
   Got a quick question.. How do I get the table headers also
 printed/retrieved by PHP for 'echo'??

mysql_field_name()

Next time, check the manual. :)

-- 
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals  www.phparch.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] POSIX seteuid and similar

2003-07-20 Thread David Goodchild
Hi,

I am trying to create a small php program where I can control users
processes.  As far as I see I require Apache to run as root in order to do
this (Note: I wish to access it via a webpage run through a browser).  At
the moment all pages are executed as user 'apache' (UID #48 in this case).
Other than giving apache root access which i hear is a very bad thing to do,
what other ways can i use the posix_seteuid() functions and the like.

Any help at all will be really appreciated.

Thanks,

Dave



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] POSIX seteuid and similar

2003-07-20 Thread David
Hi,

I am trying to create a small php program where I can control users
processes.  As far as I see I require Apache to run as root in order to do
this (Note: I wish to access it via a webpage run through a browser).  At
the moment all pages are executed as user 'apache' (UID #48 in this case).
Other than giving apache root access which i hear is a very bad thing to do,
what other ways can i use the posix_seteuid() functions and the like.

Any help at all will be really appreciated.

Thanks,

Dave


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] redirecting to a url..

2003-07-20 Thread Ow Mun Heng
Me, 

I have 2 functions. 1 I call - immediate and other refresh.. the
difference is one as the name implies is immediate - (like chris pointed out
below ) - 

header('Location: http://yoursite.org/us/index.php');

The other is more of a refresh kind, waits a default of 2 secs (for me so
that I can show a warning message before it redirects..

function header_refresh_html($l_refresh_url)
{
// This is taken from php-manual
header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);
// Date in the past
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT);  //
always modified
header(Cache-Control: no-store, no-cache, must-revalidate);   //
HTTP/1.1
header(Cache-Control: post-check=0, pre-check=0, false);
header(Pragma: no-cache);
// HTTP/1.0
header( Refresh:2;url=$l_refresh_url );   // Wait
default of 2 seconds
}
Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia 
DID : 03-7870 5168


-Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:46 PM
To: Louie Miranda; [EMAIL PROTECTED]
Subject: Re: [PHP] redirecting to a url..


--- Louie Miranda [EMAIL PROTECTED] wrote:
 echo meta http-equiv=\REFRESH\ CONTENT=\0; URL=us/index.php\;
 
 Or you may have other more advance alternatives?

You can use a protocol redirect rather than relying on HTML:

header('Location: http://yoursite.org/us/index.php');

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] RE: Something to watch look for when getting HEADER Warnings

2003-07-20 Thread Ow Mun Heng
Been There.. 

Was a REAL pain to figure that out one.. 

Have a look through PhpMyAdmin's (source) scripts, I see there's a bash
shell code that actually searches through some of it's php files for
sanitation for the exact same purpose. (Haven't played with it yet though)

Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia 
DID : 03-7870 5168


-Original Message-
From: John Manko [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 19, 2003 12:49 PM
Cc: [EMAIL PROTECTED]
Subject: Something to watch look for when getting HEADER Warnings


Recently, I ran into a problem where I continually got a Header already 
sent message.
I took me a while to figure out because the file that was included 
only contained function definitions, or so I thought.
After the closing php tag, I had a new line with a single space on it.  
This space was, in turn, sent to the browser.

 file.php begin (blah, not working) -
?php
function seomthing()
{ //do something
}
?[enter]
[space]
 file.php end --

It wasn't until I removed the single space and any additional newlines 
that all worked fine.
Any non-null lines outside of the php tags will results in voiding all
rights to send any header or cache information, and this includes
space or newline characters.
Just an FYI.

 file.php begin (cool, it works now) -
?php
function seomthing()
{ //do something
}
?[no newline]
 file.php end --

Actually, you can have a newline after the clsoing php tab, but if you 
have a
non-null string following that (this includes newline characters), bad 
bad stuff can happen.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] computing 2 value and adding it..

2003-07-20 Thread Louie Miranda
I have a 2 form value on 500/pcs and 1000/pcs
And i was hoping how will i compute this when i comes to this code..

--- start 
$final_price_usmail = ( $bcard_price + $usmail_price );
$final_price_courier = ( $bcard_price + $courier_price );

if ($v_sendvia === 'USMail') {
 echo '$' . $bcard_price . ' (Business Card) + ' . $usmail_price . ' (U.S.
Mail) = $' . $final_price_usmail . '.00';

} elseif ($v_sendvia === 'Courier') {
 echo '$' . $bcard_price . ' (Business Card) + ' . $courier_price . '
(Courier) = $' . $final_price_courier . '.00';
}
--- end 

Im looking for a way that when the user click on the 1000/pcs it will
compute * 2.
But i couldt figure this out..

--
Thank you,
Louie Miranda ([EMAIL PROTECTED])



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] computing 2 value and adding it..

2003-07-20 Thread Ralph Guzman


if($pcs_1000){
  $total = $amount * 2;
}

-Original Message-
From: Louie Miranda [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 20, 2003 7:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP] computing 2 value and adding it..
Importance: High

I have a 2 form value on 500/pcs and 1000/pcs
And i was hoping how will i compute this when i comes to this code..

--- start 
$final_price_usmail = ( $bcard_price + $usmail_price );
$final_price_courier = ( $bcard_price + $courier_price );

if ($v_sendvia === 'USMail') {
 echo '$' . $bcard_price . ' (Business Card) + ' . $usmail_price . '
(U.S.
Mail) = $' . $final_price_usmail . '.00';

} elseif ($v_sendvia === 'Courier') {
 echo '$' . $bcard_price . ' (Business Card) + ' . $courier_price . '
(Courier) = $' . $final_price_courier . '.00';
}
--- end 

Im looking for a way that when the user click on the 1000/pcs it will
compute * 2.
But i couldt figure this out..

--
Thank you,
Louie Miranda ([EMAIL PROTECTED])



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] POSIX seteuid and similar

2003-07-20 Thread Curt Zirzow
* Thus wrote David Goodchild ([EMAIL PROTECTED]):
 Hi,
 
 I am trying to create a small php program where I can control users
 processes.  As far as I see I require Apache to run as root in order to do
 this (Note: I wish to access it via a webpage run through a browser).  At
 the moment all pages are executed as user 'apache' (UID #48 in this case).
 Other than giving apache root access which i hear is a very bad thing to do,
 what other ways can i use the posix_seteuid() functions and the like.
 
 Any help at all will be really appreciated.

There is an example in the contributed notes on the site under the
posix_setuid. Baically it is a perl script that is ran in cgi mode that
is setuid'd. then opens a php script that runs the setuid script.

I dont see why, if you choose this method is to just bypass the perl cgi
and just make your php cgi setuid.

I'm not sure of any security issues in doing that but it seems better
than running your whole apache server as root.

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[2]: [PHP] running a php script in /cgi from /web

2003-07-20 Thread Tom Rogers
Hi,

Sunday, July 20, 2003, 12:30:30 AM, you wrote:

DW Thanks for the response Tom.  Unfortunately, that won't work either.  A 
DW little background  I'm using Dreamweaver and their template feature. 
DW for the site.  I want to read some info out of a text file and format it 
DW   into the web page.  (the hosting company doesn't support any db 
DW either...  I wish I COULD change companies, but...)  So, if I use your 
DW idea, when the html file is included in my php script in /cgi, the 
DW images in the html file will be relative, not absolute (../images/***).

DW The only solution I can think of is to call the php script, have it 
DW extract the info I need and deposit it (with html-formatting) into a 
DW file, then have the html file include that file.  Course, this will blow 
DW up if more than one person accesses the site at the same time.

DW Anybody with any other thoughts?

DW Thanks
DW Dale

Can you set the path type to 'Site Root Relative' in Dreamveaver ?

-- 
regards,
Tom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



php-general Digest 21 Jul 2003 05:39:40 -0000 Issue 2188

2003-07-20 Thread php-general-digest-help

php-general Digest 21 Jul 2003 05:39:40 - Issue 2188

Topics (messages 155983 through 156013):

Re: Forms and PHP
155983 by: Curt Zirzow

Re: list server problem
155984 by: Jason Wong
155989 by: Andu

Re: mail function
155985 by: Curt Zirzow
155986 by: Jason Wong
155996 by: Peda

Re: Jumping between HTTP and HTTPS
155987 by: Jason Wong
155988 by: John W. Holmes
155991 by: Curt Zirzow
155994 by: John Manko
155995 by: John W. Holmes

Re: Mail From option in PHP.ini
155990 by: Lowell Allen
155992 by: Curt Zirzow

Serial Port and PHP Login
155993 by: Dev

Re: Auto session timeout
155997 by: Hardik Doshi
156001 by: John W. Holmes

Re: redirecting to a url..
155998 by: Louie Miranda
156008 by: Ow Mun Heng

Re: Still problem with files
155999 by: Beauford.2005

Error - when trying to connect to postgresql
156000 by: Paul Tun

Howto list Mysql Table Headers using PHP
156002 by: Ow Mun Heng
156003 by: John W. Holmes
156005 by: Ow Mun Heng

on preview, loosing data using post/session..
156004 by: Louie Miranda

POSIX seteuid and similar
156006 by: David Goodchild
156007 by: David Goodchild
156012 by: Curt Zirzow

Re: Something to watch look for when getting HEADER Warnings
156009 by: Ow Mun Heng

computing 2 value and adding it..
156010 by: Louie Miranda
156011 by: Ralph Guzman

Re: running a php script in /cgi from /web
156013 by: Tom Rogers

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
---BeginMessage---
* Thus wrote Yasir Malik ([EMAIL PROTECTED]):
 I'm working with forms using PHP and HTML.  I've noticed that there is a
 limit of the length of a URL that can sent to browser (I'm passing many
 many things as arguments across pages).  Is there a way to get across the
 limit or am I doing something wrong?
 Yasir

using a form POST has virtually unlimited amount data that can be sent.

if you have to keep passing the data around, I would suggest to storing
the data in a session of some sort then just passing the session
variable around in the urls.


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.
---End Message---
---BeginMessage---
On Monday 21 July 2003 00:39, Andu wrote:

  The executive summary is that there is nothing to be fixed. If you're
  using a  less than adequate mail client which does not understand the
  mailing list  info contained in the headers then you should either change
  clients or, even  easier, just add the mailing list address into your
  address book.

 Nonsense, all clients understand reply-to if it's there and that is the
 obligation of the sender which in this case is the list server not my
 client.

Please read the archives.

The list is not the originator/sender of any particular message and hence 
should not be the subject of any reply or reply-to. Therefore it follows that 
it is not the list's responsibility to set a reply-to header pointing to 
itself.

It is the mail client's job (or the list subscriber to be more precise) to 
direct a reply to the appropriate place and not the list's responsibility to 
second-guess where a reply should be directed.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Delta: The kids will love our inflatable slides.-- David Letterman
*/

---End Message---
---BeginMessage---


--On Monday, July 21, 2003 01:34:11 +0800 Jason Wong 
[EMAIL PROTECTED] wrote:

On Monday 21 July 2003 00:39, Andu wrote:

 The executive summary is that there is nothing to be fixed. If you're
 using a  less than adequate mail client which does not understand the
 mailing list  info contained in the headers then you should either
 change clients or, even  easier, just add the mailing list address
 into your address book.
Nonsense, all clients understand reply-to if it's there and that is the
obligation of the sender which in this case is the list server not my
client.
Please read the archives.
There's several thousand emails in there, give me a subject or something. I 
already attempted to do that but the search only takes 2 words, it looks 
like and chances I use the relevant ones are low, just spent some time 
without any relevant success.

The list is not the originator/sender of any particular message and hence
should not be the subject of any reply or reply-to. Therefore it follows
that  

Re: [PHP] list server problem

2003-07-20 Thread Lars Torben Wilson
On Sun, 2003-07-20 at 11:04, Andu wrote:
 --On Monday, July 21, 2003 01:34:11 +0800 Jason Wong 
 [EMAIL PROTECTED] wrote:
 
  On Monday 21 July 2003 00:39, Andu wrote:
 
   The executive summary is that there is nothing to be fixed. If you're
   using a  less than adequate mail client which does not understand the
   mailing list  info contained in the headers then you should either
   change clients or, even  easier, just add the mailing list address
   into your address book.
 
  Nonsense, all clients understand reply-to if it's there and that is the
  obligation of the sender which in this case is the list server not my
  client.
 
  Please read the archives.
 
 There's several thousand emails in there, give me a subject or something. I 
 already attempted to do that but the search only takes 2 words, it looks 
 like and chances I use the relevant ones are low, just spent some time 
 without any relevant success.

I searched using the terms 'list' and 'reply-to', and the thread was on
the first page. But it depends on which archive you're searching, of
course, and you didn't specify which one you are looking in. The one I
used was http://marc.theaimsgroup.com/?l=php-generalr=1w=2

 So what you're saying is that all the lists i've been on in the past 7-8 
 years were doing it wrong but this one doesn't. 

This is correct. Many lists have used reply-to in a broken fashion, and
many people have become trained to expect this behaviour. Please do a
search on the net for a document entitled 'Reply-to Considered Harmful'
for more discussion on the topic. I've seen arguments about this every
couple of months for the last 10 years and quite frankly am too sick of
it to bother anymore. (And no, I don't run this list, I just work on
the manual.)

 The list is not the originator of my message but an inteligent list 
 server knows that the vast majority of the clients want to reply to
 the list not the originator of the message.

This is not a valid assumption. I would consider any list broken which
tried to outthink my decisions like that.

  It is the mail client's job (or the list subscriber to be more precise)
  to  direct a reply to the appropriate place and not the list's
  responsibility to  second-guess where a reply should be directed.
 
 So what do I do if I have one account only? Should I keep changing the 
 Reply-To for each email I send so that replies to other unrelated mail 
 don't end up on php list? The list should second-guess members of the list 
 want to reply to the list 99% of the time without being wrong.

I disagree. Oddly, I've known people who have been operating using the
correct methodology for well over a decade with no ill effects.



-- 
 Torben Wilson [EMAIL PROTECTED]+1.604.709.0506
 http://www.thebuttlesschaps.com  http://www.inflatableeye.com
 http://www.hybrid17.com  http://www.themainonmain.com
 - Boycott Starbucks!  http://www.haidabuckscafe.com -




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] free hosting

2003-07-20 Thread Bang Dodi
http://cmax.port5.com





__
Mau ringtones yang gaya ? -- http://www.ponselgaya.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php