php-general Digest 17 Feb 2003 11:01:29 -0000 Issue 1888

Topics (messages 135786 through 135814):

Re: List problem
        135786 by: David T-G

Re: recursion?????
        135787 by: David T-G

Re: Inserting records in a particular way in MySQL
        135788 by: Miles Thompson

Converting a large number of passwords to MD5 at once.
        135789 by: Vernon
        135799 by: Lord Loh.
        135800 by: Jason Wong

Convert my old cookies to session variable(s)
        135790 by: Øystein Håland

anyone know what ical and outlook are programmed in?
        135791 by: Kevin Myrick
        135793 by: Luke Woollard
        135794 by: Kevin Myrick

Re: What happened to phpEdit???
        135792 by: Bryan Lipscy

Re: URL of calling page
        135795 by: Brendon
        135798 by: Luke Woollard

Re: long running PHP application
        135796 by: Robert Cummings

Future compatibility
        135797 by: Lord Loh.

Re: PHP error messages
        135801 by: Lord Loh.

Re: loading same page
        135802 by: Lord Loh.

Re: call a website from a php script
        135803 by: Uttam

Free PHP?
        135804 by: Bjarke Walling Petersen
        135805 by: Alan Murrell

Re: What's the proper way to open a file? File access permissions?
        135806 by: Dunkel
        135807 by: Dunkel

Re: RSA implementation
        135808 by: José León Serna
        135809 by: José León Serna

Default argument values
        135810 by: neko
        135811 by: Stephen Willcock

Re: forking sendmail
        135812 by: Brendon
        135813 by: Manuel Lemos

Search engine PHP
        135814 by: Andrian Ivanov

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]


----------------------------------------------------------------------
--- Begin Message ---
Beauford --

...and then Beauford.2002 said...
% 
% Does anyone else get bounced messages saying they can't send email to
% [EMAIL PROTECTED] when sending email to the list? Every email I send to

Yep.  Looks like that person was subscribed to this list and died but the
list hasn't yet kicked out the address.

Just flush 'em when you get 'em.


HTH & HAND

:-D
-- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg97171/pgp00000.pgp
Description: PGP signature

--- End Message ---
--- Begin Message ---
Fred, et al --

...and then Fred Merritt said...
% 
...
% The benefit of checking in javascript(which I suspect is enabled in most 

Not me!  Not me!  Not me!

It is by no means ubiquitous.  Anyone who even moderately considers
security will have it turned off.


HTH & HAND

:-D
-- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg97171/pgp00001.pgp
Description: PGP signature

--- End Message ---
--- Begin Message ---
If you are not using them as foreign keys, how does it matter? They are simply identifiers for a particular record. If you need to know the number of records a select count(*) does that quickly enough, gaps are irrelevant.

Miles


At 03:38 PM 2/16/2003 -0500, Willie G wrote:
Miles,

I never use auto increment.  Not because of gaps, but in case I need to
reload the table.  They do have meaning if they are foreign keys to another
table.

- Larry


-----Original Message-----
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 16, 2003 1:14 PM
To: Phillip S. Baker; PHP Email List
Subject: Re: [PHP] Inserting records in a particular way in MySQL



Phillip,

It doesn't matter, obviously you're not using the autoincrement ID for a
foreign key. All this does is identify a record.

If you did a SELECT and found a missing sequence number, what's to say that
value would not be inserted by another user before your INSERT? If you have
not set up the table with a MyISAM, MySQL will eventually use the missing
numbers.

These are only identifying tags, with no intrinsic meaning.

Miles


At 09:37 AM 2/16/2003 -0800, Phillip S. Baker wrote:
>Greetings all,
>
>I have some PHP code that is inserting records into a DB.
>Most of this is auto increment.
>
>However I know there is allot of breaks in the sequencing.
>
>I am wondering if there is some way to write the SQL code to search
>through the existing records in the DB and to find where the next
>available ID is instead of just inserting the next sequence.
>
>So for example if the ID's are.
>
>20453
>20454
>20458
>20459
>
>It would let me know that 20455 is available for use and use the ID number
>instead of using 20460
>Thanks all.
>
>
>Phillip
>
><snip overly long sig>
>
>--
>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

--- End Message ---
--- Begin Message ---
I made the mistake of opening a web site with encrypting the passwords
stored in the database and want to encrypt them all in one fell swoop. Any
ideas on how to do that?

Thanks


--- End Message ---
--- Begin Message ---
Simple!
Write a script to automate the process!

Lord Loh


--- End Message ---
--- Begin Message ---
On Monday 17 February 2003 09:17, Vernon wrote:
> I made the mistake of opening a web site with encrypting the passwords
> stored in the database and want to encrypt them all in one fell swoop. Any
> ideas on how to do that?

while (some more password) {
  get password from wherever it is stored
  md5() password
  put password back to wherever it is stored
}

-- 
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
------------------------------------------
/*
Will this never-ending series of PLEASURABLE EVENTS never cease?
*/

--- End Message ---
--- Begin Message ---
I use extensively cookies in my web applications, but have reached the 4 kB
limit. So now I need to 'convert' all my cookies to session variables. Have
got an idea how I can create such for one variable, but here I have multi
element cookies. Reading the php manual gives me no idea on how to do this.
Here's the recipe for my cookies:
function formCookie() {
 var cookieValue = document.$formname.totalAns.value+'|'; // Using '|' to
split each part of the cookie
 cookieValue +=
document.form01.correct.value+'$test[1]'+document.form01.question1.value+doc
ument.form01.answer.value+'|';
 cookieValue +=
document.form02.correct.value+'$test[1]'+document.form02.question2.value+doc
ument.form02.answer.value+'|';

<more lines>

 document.cookie = '$answercookie='+escape(cookieValue)+';expires=';
}


--- End Message ---
--- Begin Message ---
Hey all,

I was wondering if anyone could tell me what iCal and
Outlook are programmed in offhand. I have an ambitious
but probably not so thought out plan on builing some
mods for phpwebsite based off of phprojekt,
squirrelmail, myphpcalendar, and was thinking I would
write my own address book, but will probably use the
one built into projekt.

This info will help me greatly, because I'll write
files that will pass the address book and schedule
info from Outlook, and just the schedule infor from
iCal, onto my system (if it is even possible...)

Thanks,
Kevin Myrick

PS- Where would I look to find the PEAR libs
documentation on what each function, in each file,
does. I plan on printing this out so I can take a clos
e look into designing my system... PEAR is used in the
new version of phpwebsite (currently 0.9.0RC4) and
wanted to use this common function system to do the
rest of the design for me.

=====
Kevin Myrick
/etc/KevX45
http://www.ultimatealchemy.com
[EMAIL PROTECTED]
"Screw you guys, I'm going home."-Eric Cartman, South Park
Ultimatealchemy Dotcom!

__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
--- End Message ---
--- Begin Message ---
Outlook would most likely be written in VC++ &/OR Visual Basic

It's just a hunch..

LW






-----Original Message-----
From: Kevin Myrick [mailto:[EMAIL PROTECTED]]
Sent: Monday, 17 February 2003 2:27 PM
To: 
Subject: [PHP] anyone know what ical and outlook are programmed in?


Hey all,

I was wondering if anyone could tell me what iCal and
Outlook are programmed in offhand. I have an ambitious
but probably not so thought out plan on builing some
mods for phpwebsite based off of phprojekt,
squirrelmail, myphpcalendar, and was thinking I would
write my own address book, but will probably use the
one built into projekt.

This info will help me greatly, because I'll write
files that will pass the address book and schedule
info from Outlook, and just the schedule infor from
iCal, onto my system (if it is even possible...)

Thanks,
Kevin Myrick

PS- Where would I look to find the PEAR libs
documentation on what each function, in each file,
does. I plan on printing this out so I can take a clos
e look into designing my system... PEAR is used in the
new version of phpwebsite (currently 0.9.0RC4) and
wanted to use this common function system to do the
rest of the design for me.

=====
Kevin Myrick
/etc/KevX45
http://www.ultimatealchemy.com
[EMAIL PROTECTED]
"Screw you guys, I'm going home."-Eric Cartman, South Park
Ultimatealchemy Dotcom!

__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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



--- End Message ---
--- Begin Message ---
Thanks, I appreciate it.
--- Luke Woollard <[EMAIL PROTECTED]> wrote:
> Outlook would most likely be written in VC++ &/OR
> Visual Basic
> 
> It's just a hunch..
> 
> LW
> 
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Kevin Myrick
> [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 17 February 2003 2:27 PM
> To: 
> Subject: [PHP] anyone know what ical and outlook are
> programmed in?
> 
> 
> Hey all,
> 
> I was wondering if anyone could tell me what iCal
> and
> Outlook are programmed in offhand. I have an
> ambitious
> but probably not so thought out plan on builing some
> mods for phpwebsite based off of phprojekt,
> squirrelmail, myphpcalendar, and was thinking I
> would
> write my own address book, but will probably use the
> one built into projekt.
> 
> This info will help me greatly, because I'll write
> files that will pass the address book and schedule
> info from Outlook, and just the schedule infor from
> iCal, onto my system (if it is even possible...)
> 
> Thanks,
> Kevin Myrick
> 
> PS- Where would I look to find the PEAR libs
> documentation on what each function, in each file,
> does. I plan on printing this out so I can take a
> clos
> e look into designing my system... PEAR is used in
> the
> new version of phpwebsite (currently 0.9.0RC4) and
> wanted to use this common function system to do the
> rest of the design for me.
> 
> =====
> Kevin Myrick
> /etc/KevX45
> http://www.ultimatealchemy.com
> [EMAIL PROTECTED]
> "Screw you guys, I'm going home."-Eric Cartman,
> South Park
> Ultimatealchemy Dotcom!
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Shopping - Send Flowers for Valentine's Day
> http://shopping.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=====
Kevin Myrick
/etc/KevX45
http://www.ultimatealchemy.com
[EMAIL PROTECTED]
"Screw you guys, I'm going home."-Eric Cartman, South Park
Ultimatealchemy Dotcom!

__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
--- End Message ---
--- Begin Message ---
Did you check google?
http://ozu.arecom-sa.com/~marms/phpedit.net/

-----Original Message-----
From: Al [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, February 16, 2003 8:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] What happened to phpEdit???


Their site no longer responds.

Surely, we haven't lost one of the best php editors.


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

--- End Message ---
--- Begin Message ---
On Sun, 16 Feb 2003 15:58:30 -0600, Acleave <[EMAIL PROTECTED]> wrote:

I believe there's a way in PHP to get the URL of the page that called the current page but can't find it. Is there such a function? Or would I have to use another script (like Javascript)?

What I mean is if I click on a link on index.html to jeremiah.php I can call the function and find out I just came from index.html (and not henry.php or fred.php).
If you're trying to get back to a page, I would suggest passing the current page as a variable to the next page.

e.g.
<a href="somepage.php?return_to=<? echo urlencode($_SERVER['REQUEST_URI']) ?>">Subscribe</a>

--
_BB
--- End Message ---
--- Begin Message ---
dude - try this:

echo $HTTP_REFERER;

It'l give you the refering page from when you came.

Luke Woollard






-----Original Message-----
From: Brendon [mailto:[EMAIL PROTECTED]]
Sent: Monday, 17 February 2003 3:17 PM
To:  Acleave
Subject: [PHP] Re: URL of calling page


On Sun, 16 Feb 2003 15:58:30 -0600, Acleave <[EMAIL PROTECTED]> wrote:

> I believe there's a way in PHP to get the URL of the page that called the
> current page but can't find it.  Is there such a function?  Or would I
> have to use another script (like Javascript)?
>
> What I mean is if I click on a link on index.html to jeremiah.php I can
> call the function and find out I just came from index.html (and not
> henry.php or fred.php).

If you're trying to get back to a page, I would suggest passing the current
page as a variable to the next page.

e.g.
<a href="somepage.php?return_to=<? echo urlencode($_SERVER['REQUEST_URI'])
?>">Subscribe</a>

--
 _BB

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



--- End Message ---
--- Begin Message ---
I run a fantasy MUD and I have a PHP based daemon which checks for in game
player mail and if found and the player has registered an email address, then
it sends the MUD mail out to the player's email address. The program wakes up
once a minute to check the database and then goes back to sleep. It's been
running for months without a problem.

Cheers,
Rob.

Ilja Polvanovas wrote:
> 
> Does anybody have minds about problems running long running PHP scripts as
> standalone programs (ex. like servers, daemons). For example there is a
> "simple TCP/IP server" in Sockets chapter of the Manual. Have anybody any
> ideas how long can the script run ? is there any garbage collector in PHP,
> if it is, is it enough solution? Can the script run for unlimited time ? is
> there any restrictions ? Is it stable enough ?
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
.---------------------------------------------.
| 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.    |
`---------------------------------------------'
--- End Message ---
--- Begin Message ---
Future compatibility
===============

Php and zend have constantly been discarding old syntax...making it
deprecated and all...

How can I be sure that a code I write will run for ever (or at least 10
years) irrespective of future PHP versions...

Is there a list of syntax that php plans to discard...

for example(only example): The DBX library I have is giving warnings with
mysql...

Please help

Thank You!
Lord Loh


--- End Message ---
--- Begin Message ---
That is not an error! It is a Warning...I got it the other day when the file
was empty (or did not exist or something).

Use @ prefix to make it disappear

<?php
$ar=@file("http://www.something.com/the_filename.txt";);
?>

Hope this helps...

Lord Loh.


--- End Message ---
--- Begin Message ---
Thy these headers
=========
$now = gmdate('D, d M Y H:i:s') . ' GMT';
header('Expires: ' . $now);
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Pragma: no-cache');
=========

Hope it helps...

Lord Loh


--- End Message ---
--- Begin Message ---
if (condition) {
        header("Location: http://www.gogle.com/";);
} else {
        header("Location: http://www.yahoo.com/";);
}

regds,
-----Original Message-----
From: christian tischler [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 16, 2003 16:11
To: [EMAIL PROTECTED]
Subject: call a website from a php script

can anybody tell me please how to "call" a website from a php script.

meaning
if (something happens) {goto www.google.com} else {goto www.yahoo.com}

tanks,

christian



--- End Message ---
--- Begin Message ---
I'm planing to host websites. Is it free to use PHP4 as an option for my
users?
I'm hosting on a Windows-based system.

Thanks a lot.

Bjarke


--- End Message ---
--- Begin Message ---
Hello Bjarke,

--- Bjarke Walling Petersen <[EMAIL PROTECTED]> wrote:
> Is it free to use PHP4 as an option for my users?

Yes.

HTH.

Alan

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca
--- End Message ---
--- Begin Message ---

Jason Wong wrote:
On Friday 14 February 2003 16:36, Dunkel wrote:


How do I ensure that all file access permissions are allowed? What is
the proper way to do it?

- I tried to 'fopen' an existing text file but got "Permission denied"
error.
- I tried different parameters, same error
- I tried to use 'chmode', same thing
....

So, what should I do to get it work?

Try using the /fullpath/to/the/file. If you're in doubt about the permissions try writing to the system temp directory (/tmp for example).

Okay, thank you. I'll try that.
Is there any way to find out the full - whole - path?

Paul Dunkel
--
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---

Jason Wong wrote:
On Friday 14 February 2003 16:36, Dunkel wrote:


How do I ensure that all file access permissions are allowed? What is
the proper way to do it?

- I tried to 'fopen' an existing text file but got "Permission denied"
error.
- I tried different parameters, same error
- I tried to use 'chmode', same thing
....

So, what should I do to get it work?

Try using the /fullpath/to/the/file. If you're in doubt about the permissions try writing to the system temp directory (/tmp for example).

Okay, thank you. I'll try that.
Is there any way to find out the full - whole - path?

Paul Dunkel
--
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
El mié, 12-02-2003 a las 16:27, Chris Hewitt escribió:
> Or it could be an MD5 hash.
> Current password hash compared with what is in the database, if OK then 
> store new password hash.
> I'm just suggesting that its possible to use MD5 and not a two-way 
> encryption/decryption. I have no experience of using RSA, I'd have to 
> leave it to others to help.
 I'm not trying to *log the user* this is already done with MD5, what
I'm trying is to allow the user to change it's own password. I need
decryption.

Regards.

--- End Message ---
--- Begin Message ---
El mié, 12-02-2003 a las 18:47, Matt Vos escribió:
> Why not try this:
I'm not trying to log in the user, this is already done with MD5, I'm
trying to allow the user to change its own password, so I need
encryption/decryption.

Regards.

--- End Message ---
--- Begin Message ---
Hey All,

I've been trying to write a function that accepts multiple optional 
parameters, some of which are ints. The function signature looks like this:

function blahBlah($fromDate, $toDate = 0, $limit = 20, $limitNodeType = 
null)

I've been reading up here:

http://www.php.net/manual/en/functions.arguments.php

But it doesn't describe what to do with multiple optional arguments. Can I 
call the function like this:

blahBlah($date, null, null, $limitNodeType);


?

Need some help getting this language feature sorted.

cheers,
neko
--- End Message ---
--- Begin Message ---
Yes, you can call your function with these arguments, but in this case of
course the defaults will not be used because you have supplied arguments.
SW


"Neko" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey All,
>
> I've been trying to write a function that accepts multiple optional
> parameters, some of which are ints. The function signature looks like
this:
>
> function blahBlah($fromDate, $toDate = 0, $limit = 20, $limitNodeType =
> null)
>
> I've been reading up here:
>
> http://www.php.net/manual/en/functions.arguments.php
>
> But it doesn't describe what to do with multiple optional arguments. Can I
> call the function like this:
>
> blahBlah($date, null, null, $limitNodeType);
>
>
> ?
>
> Need some help getting this language feature sorted.
>
> cheers,
> neko


--- End Message ---
--- Begin Message ---
On Sun, 16 Feb 2003 01:05:58 -0300, Manuel Lemos <[EMAIL PROTECTED]> wrote:

Hello,

On 02/16/2003 12:15 AM, Brendon wrote:
I've been trying to fork sendmail because DNS checks cause it to be slow delivering messages...
Here's what i've tried, and many other variations...

$str = "to: [EMAIL PROTECTED]\nfrom: [EMAIL PROTECTED]\nsubject: test";
exec('sendmail -i -t $str >& /dev/null&');

Has anyone successfully acomplished something like this? ideas?
You are duplicating a function that sendmail already provides given the right switches. Anyway, if you want to raise the message delivery throughput, the best you can do is to use the deferred mode so it does not take a long time to queue the messages and then sendmail will take care of the delivery next time it runs the queue.

In that case you may want to look at this class for composing and sending messages that comes with sub-class to deliver with sendmail program directly. It comes with options to let you choose the appropriate sendmail delivery mode:

http://www.phpclasses.org/mimemessage


Thanks for that. I'll look at it and see if I can modify it for my needs.

The problem isn't sendmail priority. The system isn't doing anything and sendmail isn't doing anything. The problem is that it takes sendmail awhile for it to respond. No. sendmail isn't broke, it just has to do a lot of thinking before it talks to a client. I want to remove that problem from the equation by puting sendmail in the background once its called.

Brendon
--- End Message ---
--- Begin Message ---
Hello,

On 02/17/2003 07:04 AM, Brendon wrote:
I've been trying to fork sendmail because DNS checks cause it to be slow delivering messages...
Here's what i've tried, and many other variations...

$str = "to: [EMAIL PROTECTED]\nfrom: [EMAIL PROTECTED]\nsubject: test";
exec('sendmail -i -t $str >& /dev/null&');

Has anyone successfully acomplished something like this? ideas?

You are duplicating a function that sendmail already provides given the right switches. Anyway, if you want to raise the message delivery throughput, the best you can do is to use the deferred mode so it does not take a long time to queue the messages and then sendmail will take care of the delivery next time it runs the queue.

In that case you may want to look at this class for composing and sending messages that comes with sub-class to deliver with sendmail program directly. It comes with options to let you choose the appropriate sendmail delivery mode:

http://www.phpclasses.org/mimemessage


Thanks for that. I'll look at it and see if I can modify it for my needs.

The problem isn't sendmail priority. The system isn't doing anything and sendmail isn't doing anything. The problem is that it takes sendmail awhile for it to respond. No. sendmail isn't broke, it just has to do a lot of thinking before it talks to a client. I want to remove that problem from the equation by puting sendmail in the background once its called.
What I am telling you is that sendmail itself can act that way given that you pass the right command line switches when you invoke it.

The class above lets you tell sendmail to act that way but usually it is better to tell it to queue the message instead of trying to deliver it right away because if you attempt to deliver many messages at once you can exhaust your server resources easily and your script will break.

--

Regards,
Manuel Lemos

--- End Message ---
--- Begin Message ---
Hello,

Can somebody direct me to a documentation source, about creating small
database search engines with PHP?

Thank you in advance, Andrian Ivanov


--- End Message ---

Reply via email to