|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Sat Jun 15 2002 - 02:02:40 CDT
php-general Digest 15 Jun 2002 07:02:40 -0000 Issue 1406
Topics (messages 102248 through 102318):
Re: Header URL question
102248 by: Jay Blanchard
Variable Result is not displayed
102249 by: J0s
102251 by: Lazor, Ed
102254 by: J0s
102255 by: Lazor, Ed
102257 by: J0s
Re: Dreamweaver MX?
102250 by: Jas
102252 by: Lazor, Ed
Re: beginner in PHP
102253 by: Phillip Perry
XML and parameter entities
102256 by: Pawel
Question about global variables
102258 by: Don
102260 by: Kevin Stone
102262 by: remery.emeryloftus.com
Re: bulk mail()
102259 by: Jeff Field
102261 by: Pawel
102303 by: Justin French
Re: php server on Windows
102263 by: Peter
102281 by: Bruce Karstedt
102283 by: Lazor, Ed
102285 by: Bruce Karstedt
102286 by: Stuart Dallas
102299 by: Bruce Karstedt
PHP Chat Program?
102264 by: Devin Atencio
102312 by: SenthilVelavan
'CC' and 'BCC' in mail function
102265 by: Sridhar Moparthy
102269 by: Stuart Dallas
102273 by: Richard Baskett
PHP Installation Win98/Apache error....
102266 by: Phil Schwarzmann
102267 by: Lazor, Ed
ucwords() usage QUICKIE
102268 by: Daniel Negron/KBE
102270 by: Lazor, Ed
102271 by: Julie Meloni
102272 by: 1LT John W. Holmes
Sessions... wtf is wrong?!
102274 by: Rick Kukiela
102275 by: Rick Kukiela
Re: Editor
102276 by: Chris Bunting
Re: row pointer
102277 by: Zac Hillier
102278 by: 1LT John W. Holmes
search parse?
102279 by: Lazor, Ed
102318 by: Jason Morehouse
integer to string
102280 by: Pushkar Pradhan
102282 by: Lazor, Ed
pfsockopen
102284 by: Dan Goodliffe
PLEASE HELP! session variable fails to persist!!
102287 by: Zlutarch G.
102288 by: Stuart Dallas
102289 by: Zlutarch G.
102290 by: Stuart Dallas
102291 by: Zlutarch G.
102292 by: Stuart Dallas
102293 by: Zlutarch G.
102295 by: Stuart Dallas
Confusion with the $_name $_type $_size Variable Extensions
102294 by: Nathan Taylor
102298 by: SenthilVelavan
session problems....
102296 by: Rick Kukiela
102297 by: SenthilVelavan
102300 by: Bruce Karstedt
102302 by: Julie Meloni
102311 by: Bruce Karstedt
102313 by: Chris Shiflett
Re: getting help on php
102301 by: Justin French
unset key/element in array
102304 by: Aljosa Mohorovic
Problem with MySQL
102305 by: Chuck Payne
102307 by: Tyler Longren
102308 by: Chuck Payne
Checking referrer?
102306 by: Leif K-Brooks
102314 by: Chris Shiflett
Re: Quick question
102309 by: SenthilVelavan
Re: Shut down server
102310 by: SenthilVelavan
Best way to store login data?
102315 by: Leif K-Brooks
102316 by: SenthilVelavan
102317 by: Pradeep Dsouza
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
oops, never mind, I think I see the problem...a missing "btn="
-----Original Message-----
From: Jay Blanchard [mailto:jay.blanchard
niicommunications.com]
Sent: Friday, June 14, 2002 12:59 PM
To: php-general
lists.php.net
Subject: [PHP] Header URL question
I wanted to return to a specific page in a small web app I am writing, which
is based on a variable for each individual record. I just tried
header("Location: customer.php?" . $btn . ""); exit;
and although syntactically correct it did not work. I am going to try a
couple of other things but I wanted to see if any of you had thoughts on
this.
HAGW!
Jay
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hi there,
To work on some scripts, I have install PHP 4.02 on a IIS 5.1 server. (on my own XP machine) I have setuped PHP following install.txt procedure.
When I try to run my scripts they works fine exept for the variables results that are not displayed. I have upload this script on my web site and all is working fine. So I assume there is a misconfiguration on my PHP.ini or a missing extension or .....
Thanks for your help.
J0s
attached mail follows:
Could you include some of your code?
> -----Original Message----- > When I try to run my scripts they works fine exept for the > variables results > that are not displayed. **************************************************************************** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
attached mail follows:
Here is an example of the test script.
sample.php <?
$result=$who." works as a ".$what." in ".$where.". He/She can be contacted at: ".$web.".";
print "&result=".$result;
print "&loading=NO";
?>
Nota : The variable are passed throught a Flash form.
In this case, if the script is uploaded on my web site the result is : Name Test works as a Web developper in Montreal. He/She can be contacted at : My Web Site.
But on my own machine the result is : works as a Web in. He/She can be contacted at :.
attached mail follows:
make sure global variables are enabled in your php.ini
> -----Original Message-----
> From: J0s [mailto:JoelNO_SPAM
infopratique.net]
> Sent: Friday, June 14, 2002 11:52 AM
> To: php-general
lists.php.net
> Subject: [PHP] Re: Variable Result is not displayed
>
>
> Here is an example of the test script.
>
> sample.php
> <?
>
> $result=$who." works as a ".$what." in ".$where.". He/She can
> be contacted
> at: ".$web.".";
>
> print "&result=".$result;
>
> print "&loading=NO";
>
> ?>
>
> Nota : The variable are passed throught a Flash form.
>
> In this case, if the script is uploaded on my web site the result is :
> Name Test works as a Web developper in Montreal. He/She can
> be contacted at
> : My Web Site.
>
> But on my own machine the result is :
> works as a Web in. He/She can be contacted at :.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
****************************************************************************
This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message. Thank you very
much.
attached mail follows:
Thanks a lot! Ok this programm began to be interesting. I will try to stop to be a Newbie.
: ))
"Ed Lazor" <ELazor
providence.org> wrote in message
news:C8891DEC2698D411A91B00508BF9898806E117A3
phsormsg04.phsor.org...
> make sure global variables are enabled in your php.ini
>
> > -----Original Message-----
> > From: J0s [mailto:JoelNO_SPAM
infopratique.net]
> > Sent: Friday, June 14, 2002 11:52 AM
> > To: php-general
lists.php.net
> > Subject: [PHP] Re: Variable Result is not displayed
> >
> >
> > Here is an example of the test script.
> >
> > sample.php
> > <?
> >
> > $result=$who." works as a ".$what." in ".$where.". He/She can
> > be contacted
> > at: ".$web.".";
> >
> > print "&result=".$result;
> >
> > print "&loading=NO";
> >
> > ?>
> >
> > Nota : The variable are passed throught a Flash form.
> >
> > In this case, if the script is uploaded on my web site the result is :
> > Name Test works as a Web developper in Montreal. He/She can
> > be contacted at
> > : My Web Site.
> >
> > But on my own machine the result is :
> > works as a Web in. He/She can be contacted at :.
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
****************************************************************************
> This message is intended for the sole use of the individual and entity to
> whom it is addressed, and may contain information that is privileged,
> confidential and exempt from disclosure under applicable law. If you are
> not the intended addressee, nor authorized to receive for the intended
> addressee, you are hereby notified that you may not use, copy, disclose or
> distribute to anyone the message or any information contained in the
> message. If you have received this message in error, please immediately
> advise the sender by reply email and delete the message. Thank you very
> much.
attached mail follows:
It also has support for snippits, or a code library that you can add, edit or delete. Saves alot of time in re-using code. I definately recommend it, not only for that reason for but for the code debugging options available. HTH Jas
"John Holmes" <holmes072000
charter.net> wrote in message
news:002101c213ca$36cfba20$b402a8c0
mango...
> Yes, download it and see. Gives you a GUI to program recordsets from the
> database, and drag and drop for results. Other PHP stuff along with
> highlighting built in. If it didn't cost so much, I'd recommend it.
>
> ---John Holmes...
>
> > -----Original Message-----
> > From: Lazor, Ed [mailto:ELazor
providence.org]
> > Sent: Friday, June 14, 2002 12:39 PM
> > To: php-general
lists.php.net
> > Subject: [PHP] Dreamweaver MX?
> >
> > Does Dreamweaver MX have good PHP support?
> >
> > Thanks,
> >
> > -Ed
> >
> >
> ************************************************************************
> **
> > **
> > This message is intended for the sole use of the individual and entity
> to
> > whom it is addressed, and may contain information that is privileged,
> > confidential and exempt from disclosure under applicable law. If you
> are
> > not the intended addressee, nor authorized to receive for the intended
> > addressee, you are hereby notified that you may not use, copy,
> disclose or
> > distribute to anyone the message or any information contained in the
> > message. If you have received this message in error, please
> immediately
> > advise the sender by reply email and delete the message. Thank you
> very
> > much.
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Thanks everyone. I'll check it out.
> > > much. > > > > > > -- > > > 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 > **************************************************************************** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
attached mail follows:
So how do I affect the local copies of the variables. The global() doesn't seem to work. Should I take everything out of the function and just use if statements?
-----Original Message-----
From: Tim Ward [mailto:Tim.ward
stivesdirect.com]
Sent: Friday, June 14, 2002 3:46 AM
To: pperry
inter-design.net; Tim Ward; Martin Towell; Tom Rogers; Php
Subject: RE: [PHP] beginner in PHP
You're insetting the variables within the chout() function only This has no effect on the local copies as they are not in scope here. You have successfully destroyed the session so when you refresh they are unset.
What I do with sessions is keep them all within a session array so you can then destroy the session locally by unsetting that array. If I have a function that I want to change session variables at all I make it take the session in as a parameter and pass it back as the return value.
Tim Ward
> -----Original Message-----
> From: Phillip Perry [SMTP:pperry
inter-design.net]
> Sent: 13 June 2002 19:45
> To: Tim Ward; Martin Towell; Tom Rogers; Php
> Subject: RE: [PHP] beginner in PHP
>
> Yes, here is the checkout code I used...
>
> function chout(){
> session_destroy();
> unset ($mycart);
> unset ($cart_items);
> echo "<p>Thank you for shopping!</p>";
> }
>
> Any suggestions?
>
> -----Original Message-----
> From: Tim Ward [mailto:Tim.ward
stivesdirect.com]
> Sent: Thursday, June 13, 2002 4:18 AM
> To: Martin Towell; Tom Rogers; Php; Phillip Perry
> Subject: RE: [PHP] beginner in PHP
>
>
> From the symptoms it sounds like you're destroying the session okay but
> leaving the variables
> In the script. Are you sure you're unsetting them at the appropriate scope
> level.
>
> Tim Ward
> www.chessish.com <http://www.chessish.com>
>
> ----------
> From: Phillip Perry [SMTP:pperry
inter-design.net]
> Sent: 13 June 2002 05:18
> To: Martin Towell; Tom Rogers; Php
> Subject: RE: [PHP] beginner in PHP
>
> Thanks Martin!! That really helped out a lot. And thanks to all who
> tried to
> help me. I appreciate it!
>
> I have one other question that is really not so much important as it
> is
> annoying, but I can't figure it out myself.
>
> I'm practicing with sessions. What I'm making..if you couldn't tell
> by the
> array output from before...is a test shopping cart. Now the
> annoyance is
> that when I click the checkout link it's just supposed to destroy
> the
> session and reset everything to 0 including the shopping cart. And
> also if
> an item is clicked, that item gets deleted. With both choices when I
> click
> once the session does get destroyed, but everything stays on the
> page until
> I refresh the page. I want the info to get reset when I click the
> link.
> Here's the delete and checkout code...remember they both do actually
> work,
> just not as I want. Any suggestions on how to make it refresh on a
> click
> only?
>
> / DELETE SHOPPING CART ITEMS
>
> function chout(){
> session_destroy();
> $mycart = array();
> $cart_items = 0;
> echo "<p>Thank you for shopping!</p>";
> }
>
> if ($action == delnow)
> {
> unset($mycart[$itemid]);
> }
>
> // END DELETE SHOPPING CART ITEMS
>
> if ($action == checkout)
> {
> chout();
> }
>
> -----Original Message-----
> From: Martin Towell [mailto:martin.towell
world.net]
> Sent: Wednesday, June 12, 2002 11:55 PM
> To: 'pperry
inter-design.net'; Tom Rogers; Php
> Subject: RE: [PHP] beginner in PHP
>
>
> here's the revised loop....
>
>
> $cat_cnt = count($catalog);
> while (list($key,$value) = each($mycart))
> {
> for ($j = 0; $j < $cat_cnt; $j++)
> if ($value == $catalog[$j]["itemcd"])
> {
> echo $catalog[$j]["unitprice"];
> break;
> }
> }
>
>
> -----Original Message-----
> From: Martin Towell [mailto:martin.towell
world.net]
> Sent: Thursday, June 13, 2002 1:50 PM
> To: 'pperry
inter-design.net'; Tom Rogers; Php
> Subject: RE: [PHP] beginner in PHP
>
>
> Ah! $catalog is a 2D array - any your if statement is expecting a 1D
> array...
>
> -----Original Message-----
> From: Phillip Perry [mailto:pperry
inter-design.net]
> Sent: Thursday, June 13, 2002 1:52 PM
> To: Tom Rogers; Php
> Subject: RE: [PHP] beginner in PHP
>
>
> I meant Martin :) sorry.
>
> -----Original Message-----
> From: Phillip Perry [mailto:pperry
inter-design.net]
> Sent: Wednesday, June 12, 2002 11:44 PM
> To: Tom Rogers; Php
> Subject: RE: [PHP] beginner in PHP
>
>
> Array ( [0] => gerainiums [1] => roses [2] => roses [3] => roses [4]
> =>
> roses [5] => roses )
>
> 1
> 1
>
> Your output is different from the last print_r that Tom had me do. I
> wonder
> why that is
>
> -----Original Message-----
> From: Tom Rogers [mailto:trogers
kwikin.com]
> Sent: Wednesday, June 12, 2002 11:44 PM
> To: pperry
inter-design.net; Php
> Subject: RE: [PHP] beginner in PHP
>
>
> Hi
> Then I guess you will have to add some debug code
> try this before the while loop and make sure your if ($value ==
> $catalog["itemcd"]) will produce a match (and you do need the quotes
> really
> :)
>
> echo "<pre>".print_r($catalogue)."<br>".print_r($mycart)."</pre>";
> Tom
>
> At 11:31 PM 12/06/2002 -0400, Phillip Perry wrote:
> >Thanks, but that didn't work either
> >
> >-----Original Message-----
> >From: Tom Rogers [mailto:trogers
kwikin.com]
> >Sent: Wednesday, June 12, 2002 11:32 PM
> >To: pperry
inter-design.net; Php
> >Subject: Re: [PHP] beginner in PHP
> >
> >
> >Hi
> >itemcd and unitprice should be in quotes I think if they are keys
> in an
> >array.
> >$catalog["itemcd"]
> >$catalog["unitprice"]
> >
> >Tom
> >
> >At 10:56 PM 12/06/2002 -0400, Phillip Perry wrote:
> > >Can someone tell me why this doesn't work?
> > >The $mycart array is fine and the $catalog array is also fine but
> nothing
> > >inside the if statement prints. I've tried other echo statements
> but
> >nothing
> > >prints at all.
> > >
> > >while (list($key,$value) = each($mycart))
> > > {
> > > if ($value == $catalog[itemcd])
> > > {
> > >
> > > echo $catalog[unitprice];
> > >
> > > }
> > > }
> > >
> > >
> > >Thanks
> > >
> > >Phil
> > >
> > >
> > >--
> > >PHP General Mailing List (http://www.php.net/)
> > >To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hello,
I'm having a hard time getting expat to parse parameter entities and I'm wondering if any one tried this before (general entities work fine)
sample xml: -------------------------------------------- <?xml version='1.0'?> <!DOCTYPE alfs [ <!ENTITY % common_entities SYSTEM "00-entities-00"> %common_entities; ]> ..... ---------------------------------------------
as the name suggests, the file "00-entities-00" contains common general entities shared between multiple .xml's Expat's external_entity_ref_handler doesn't catch parameter entities, but I'm not even sure it should.
How should I parse this ?
Any hints appreciated Pawel
PS. php version 4.3.0-dev (cli) (yesterday's cvs)
attached mail follows:
Hi,
Don't know if this is possible but is there a way to create a single variable (in my case, a two dimensional array) that is global to my site? This is regardless of which page is initially loaded BUT I need to have it empty first time in.
I am trying to implement a 'stack' feature where I can place/remove information into/out of the array.
Thanks, Don
attached mail follows:
I don't think this is possible to setup a global way you're thinking, but I do believe that you can still accomplish the effect you're looking for. First of all, exactly what kind of information will you be storing in the array? You say it needs to be empty the 'first time in'. Does that mean per user? -Kevin
----- Original Message -----
From: "Don" <don
lclcan.com>
To: "php list" <php-general
lists.php.net>
Sent: Friday, June 14, 2002 1:08 PM
Subject: [PHP] Question about global variables
Hi,
Don't know if this is possible but is there a way to create a single variable (in my case, a two dimensional array) that is global to my site? This is regardless of which page is initially loaded BUT I need to have it empty first time in.
I am trying to implement a 'stack' feature where I can place/remove information into/out of the array.
Thanks, Don
attached mail follows:
Cookies
Session variables
----- Original Message -----
From: "Don" <don
lclcan.com>
To: "php list" <php-general
lists.php.net>
Sent: Friday, June 14, 2002 2:08 PM
Subject: [PHP] Question about global variables
Hi,
Don't know if this is possible but is there a way to create a single variable (in my case, a two dimensional array) that is global to my site? This is regardless of which page is initially loaded BUT I need to have it empty first time in.
I am trying to implement a 'stack' feature where I can place/remove information into/out of the array.
Thanks,
Don
attached mail follows:
I've been doing the following sending personalized mail to 600+ recipients, so far without any signs of discomfort anywhere:
set_time_limit($total_rows * 1); // up the script timeout 1 second per email
BTW, I use qmail; not sendmail. As I've never used sendmail, I don't know if this is part of your problem or not. I'm guessing a bit, but based on 600+ emails, I'd say that the script itself takes about 10-15 seconds; the mail to be delivered takes a bit longer, perhaps another minute or two.
Jeff
> -----Original Message-----
> From: Justin French [mailto:justin
indent.com.au]
> Sent: Wednesday, June 12, 2002 6:45 AM
> To: php
> Subject: [PHP] bulk mail()
>
>
> Hi all,
>
> I've got a mailing on a website, with email address' / names / etc in a
> MySQL table.
>
> I think there's around 120 on it at the moment.
>
> I've been noticing a growing lag on the sending of mail though...
> I've got a
> script which takes a message from a form, then runs a while loop
> through the
> rows of the mailing_list table, replacing a special string with the
> subscribers name, and sending using the mail() command.
>
> However, this time, the script actually failed, with a "failure when
> attempting to access blah.com/foo.php" (the sending script). I
> have no idea
> if SOME people got the email, or what, and have no idea how to check.
>
> So, I make the assumption that as the mailing list has grown, the script
> time has slowed... now it's too big (or the server was too busy)
> to process
> all the emails before the script timed out.
>
>
> If I didn't want to personalise the emails, I'm sure the script
> would run a
> lot quicker with every address in the Bcc header, but since we personalise
> each email, I can't see any option other than using mail() 200
> times... and
> it's only going to get a lot worse as we climb to 1000+.
>
> So, what options do I have?
>
> Break the mailing list up into batches of 40 or so? How would I implement
> something like this?
>
>
> Any advice / concepts / ideas welcome!
>
>
> Justin French
> --------------------
> Creative Director
> http://Indent.com.au
> --------------------
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
> > -----Original Message-----
> > From: Justin French [mailto:justin
indent.com.au]
> > Sent: Wednesday, June 12, 2002 6:45 AM
> > To: php
> > Subject: [PHP] bulk mail()
> >
> >
> > Hi all,
> >
> > I've got a mailing on a website, with email address' / names / etc in a
> > MySQL table.
> >
> > I think there's around 120 on it at the moment.
> >
> > I've been noticing a growing lag on the sending of mail though...
> > I've got a
> > script which takes a message from a form, then runs a while loop
> > through the
> > rows of the mailing_list table, replacing a special string with the
> > subscribers name, and sending using the mail() command.
> >
You're using something like mysql_fetch_array and not querying the db 120 times I hope.
> > However, this time, the script actually failed, with a "failure when > > attempting to access blah.com/foo.php" (the sending script). I > > have no idea > > if SOME people got the email, or what, and have no idea how to check.>
go through the your MTA's logs (long and painful process)
> > So, I make the assumption that as the mailing list has grown, the script > > time has slowed... now it's too big (or the server was too busy) > > to process > > all the emails before the script timed out.
The time your MTA takes to process the emails has nothing to do with this. 120 calls to mail() should not time out, maybe you have a complicated regexp for fixing that name in the emails what's the body of your while() loop ?
> > > > If I didn't want to personalise the emails, I'm sure the script > > would run a > > lot quicker with every address in the Bcc header, but since we personalise > > each email, I can't see any option other than using mail() 200 > > times... and > > it's only going to get a lot worse as we climb to 1000+. > >
putting 120 email addresses in one bcc will surely get your email classified as spam
> > So, what options do I have? > > > > Break the mailing list up into batches of 40 or so? How would I implement > > something like this? > >
you could try adding a column in your db that will reflect the last time you've sent an email to that person. Then you could just append "LIMIT 40" to your select query, but updating the column requires a separate query (1 update per email if you want to know exactly how got the email and who didn't)
Pawel
attached mail follows:
on 15/06/02 5:32 AM, Pawel (php-general
lists.aliengov.org) wrote:
> You're using something like mysql_fetch_array and not querying the db 120 > times I hope.
of course! :)
> The time your MTA takes to process the emails has nothing to do with this. > 120 calls to mail() should not time out, maybe you have a complicated > regexp for fixing that name in the emails > what's the body of your while() loop ?
nothing too complex at all:
while($myrow = mysql_fetch_array($result))
{
$to = $myrow["email"];
$name = $myrow["name"];
$this_message = eregi_replace('#name#',$name,$message);
$this_message = stripslashes($this_message);
$this_message .= $email_footer;
$headers = "From: mailinglist
{$domain_name}";
mail($to, $subject, $this_message.$email_footer, $headers);
}
> putting 120 email addresses in one bcc will surely get your email > classified as spam
good point
> you could try adding a column in your db that will reflect the last time > you've sent an email to that person. Then you could just append "LIMIT 40" > to your select query, but updating the column requires a separate query (1 > update per email if you want to know exactly how got the email and who didn't)
I think i'll write a simple log file for each send-out
Based on everyone's advice, I'm going to break the sending process into batches of 10 or 20 rows using a redirect, encorporate a log (so that I can remove bad address' that may slow it down), and then see where to go from there.
Thanks for everyone's help.
Justin French
attached mail follows:
You can run PHP as a module / extension for apache or let Apache load and run the php.exe program for each php file. Loading and running the program in quick succession strains the system somewht but the extension is always loaded and is just used when needed - much faster and efficient.
"Phil Schwarzmann" <pschwar
jhmi.edu> wrote in message
news:sd08b337.055
cis27.hosts.jhmi.edu...
> So I'm thinking about setting up a little php/mysql web server here at
> work and want to use Windows as my platform instead of Linux and have a
> couple questions...
>
> I know that PHP on Windows has some limitations as compared to Linux.
> What are these limitations?
>
> Which version of Windows would be best ?
>
> Is this gonna be a real pain in the ass to get PHP & MySQL & Apache &
> Windows to get along well?
>
> Can I use IIS instead of Apache ?
>
> Thanks!
>
attached mail follows:
Windows / PHP is fine for development work but I would never put a production site on a Windows box (With all due apologies to you Windows fans). Put your site on a *nix box with apache its a heck of a lot faster and a heck of a lot more stable and a heck of a lot easier to configure and upgrade.
Just my 2 cents
Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474
-----Original Message-----
From: Peter [mailto:newsaddress
saracenvsu.org.uk]
Sent: Friday, June 14, 2002 3:06 PM
To: php-general
lists.php.net
Subject: [PHP] Re: php server on Windows
"Phil Schwarzmann" <pschwar
jhmi.edu> wrote in message
news:sd08b337.055
cis27.hosts.jhmi.edu...
> So I'm thinking about setting up a little php/mysql web server here at
> work and want to use Windows as my platform instead of Linux and have a
> couple questions...
>
> I know that PHP on Windows has some limitations as compared to Linux.
> What are these limitations?
>
> Which version of Windows would be best ?
>
> Is this gonna be a real pain in the ass to get PHP & MySQL & Apache &
> Windows to get along well?
>
> Can I use IIS instead of Apache ?
>
> Thanks!
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Do you have any benchmarks?
> -----Original Message----- > fans). Put your site on a *nix box with apache its a heck of > a lot faster **************************************************************************** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
attached mail follows:
The last test I did was to put a custom built (by me) box dual 1.2G P4's 36G Raid 5 all on 7200RPM spindles and 2GB ram running WIN 2000 Server with all the back office toys vs. an old 133M Pentium, 1.2G 256Meg garbage box I had in the basement running BSDi Unix with squid caching. The garbage box was 8 times faster. Look I'm not out to bash Microsoft but every good carpenter has more than one tool in his box and knows which one to use for which job. Even Microsoft uses Unix for their Web Servers.
Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474
-----Original Message-----
From: Lazor, Ed [mailto:ELazor
providence.org]
Sent: Friday, June 14, 2002 5:34 PM
To: 'bkarstedt
prodigy.net'; 'Peter'; php-general
lists.php.net
Subject: RE: [PHP] Re: php server on Windows
Do you have any benchmarks?
> -----Original Message----- > fans). Put your site on a *nix box with apache its a heck of > a lot faster
attached mail follows:
On Friday, June 14, 2002 at 11:30:07 PM, Bruce Karstedt wrote: > Put your site on a *nix box with apache its a heck of a lot faster > and a heck of a lot more stable and a heck of a lot easier to configure and > upgrade.
It's all very well saying that, but have you got any evidence to back those comments up? With the arrival of Win2k, the win32 platform has become a lot more stable and IMHO is now on a par with the '*nix' platform. As far as how easy they are to configure and upgrade, it depends where you're coming from. But for a complete beginner, IIS beats the competition hands down.
The speed issue is a tricky one. In another email you say...
On Saturday, June 15, 2002 at 12:08:51 AM, Bruce Karstedt wrote: > The last test I did was to put a custom built (by me) box dual 1.2G P4's 36G > Raid 5 all on 7200RPM spindles and 2GB ram running WIN 2000 Server with all > the back office toys vs. an old 133M Pentium, 1.2G 256Meg garbage box I had > in the basement running BSDi Unix with squid caching. The garbage box was 8 > times faster. Look I'm not out to bash Microsoft but every good carpenter > has more than one tool in his box and knows which one to use for which job.
That's the only benchmark you have? Not very conclusive is it. How did you measure the speed? What were you requesting of the server? Was it under load? Were both servers under exactly the same conditions? You can't possibly expect us to accept that as definitive proof that the '*nix' platform is faster.
The only benchmark I would accept as definitive proof is one using identical hardware and where each server has been tuned by an Apache/IIS expert as appropriate. Each server must be hit by the same test script using the same network connection which must also be in controlled conditions (i.e. a dedicated connection).
> Even Microsoft uses Unix for their Web Servers.
Actually their main site is served by IIS 5 on Win2k (http://uptime.netcraft.com/up/graph/?mode_u=off&mode_w=on&site=www.microsoft.com). I know that they do use other platforms for other servers, but as far as I can tell, they are providing minor services compared to the IIS servers. But do correct me if I'm wrong.
-- Stuart
attached mail follows:
An opinion was requested, and I gave it.
<flame>
I will make a few pointed comments and then I will stop wasting my time and the time of the others on this list.
1) If you do not know why Unix and its various derivatives are a better, meaning more flexible, more secure, faster, and more stable, then you probably don't know much about Unix.
2) I don't consider any Windows platform stable for commercial serving needs. I've had Unix boxes run continuously for over 3 years some as many as 5 and only one time was the crash caused by the operating system. Want to tell me how many times you've seen the "blue screen of death" on a Windows box.
3) Unix is faster for two main reasons - it has a real file system and it doesn't have all GUI overhead cluttering up CPU/Disk/Bus resources. While the GUI if a great feature on development boxes and workstations its a complete waste of resources on a server.
4) If all you need to do is design web sites Win 2000 (don't use the FAT32 file system) / apache ( not 2.x) and PHP / Pearl / cgi is OK. But if you want to be a successful webmaster and provide your clients / bosses / end users with the best possible service / speed and uptime - learn and use Unix.
5) If you want to learn how to configure the hardware - I'll teach you that too. Just contact me off list.
Nuff said.
</flame>
Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474
-----Original Message-----
From: Stuart Dallas [mailto:stuart
sharedserver.net]
Sent: Friday, June 14, 2002 6:29 PM
To: php-general
lists.php.net
Subject: Re[2]: [PHP] Re: php server on Windows
On Friday, June 14, 2002 at 11:30:07 PM, Bruce Karstedt wrote: > Put your site on a *nix box with apache its a heck of a lot faster > and a heck of a lot more stable and a heck of a lot easier to configure and > upgrade.
It's all very well saying that, but have you got any evidence to back those comments up? With the arrival of Win2k, the win32 platform has become a lot more stable and IMHO is now on a par with the '*nix' platform. As far as how easy they are to configure and upgrade, it depends where you're coming from. But for a complete beginner, IIS beats the competition hands down.
The speed issue is a tricky one. In another email you say...
On Saturday, June 15, 2002 at 12:08:51 AM, Bruce Karstedt wrote: > The last test I did was to put a custom built (by me) box dual 1.2G P4's 36G > Raid 5 all on 7200RPM spindles and 2GB ram running WIN 2000 Server with all > the back office toys vs. an old 133M Pentium, 1.2G 256Meg garbage box I had > in the basement running BSDi Unix with squid caching. The garbage box was 8 > times faster. Look I'm not out to bash Microsoft but every good carpenter > has more than one tool in his box and knows which one to use for which job.
That's the only benchmark you have? Not very conclusive is it. How did you measure the speed? What were you requesting of the server? Was it under load? Were both servers under exactly the same conditions? You can't possibly expect us to accept that as definitive proof that the '*nix' platform is faster.
The only benchmark I would accept as definitive proof is one using identical hardware and where each server has been tuned by an Apache/IIS expert as appropriate. Each server must be hit by the same test script using the same network connection which must also be in controlled conditions (i.e. a dedicated connection).
> Even Microsoft uses Unix for their Web Servers.
Actually their main site is served by IIS 5 on Win2k (http://uptime.netcraft.com/up/graph/?mode_u=off&mode_w=on&site=www.microsof t.com). I know that they do use other platforms for other servers, but as far as I can tell, they are providing minor services compared to the IIS servers. But do correct me if I'm wrong.
-- Stuart-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Dear PHP Users,
I have a client who currently has a website setup with iChat which is several years old and we are currently having problems with it. I need to find a PHP Chat program that will be very easy and simple. I just wanted to see if anyone here has used a program and really likes it and can recomment it ?
Devin Atencio
attached mail follows:
Hello Devin, Please download chat application from http://sourceforge.net/projects/phpmychat
I have tried this it's so simple and easy.Let me know if you have any problem. regards, SenthilVellan.P, KovaiTeam Softwares.
----- Original Message -----
From: "Devin Atencio" <dreamboy
aros.net>
To: <php-general
lists.php.net>
Sent: Saturday, June 15, 2002 2:40 AM
Subject: [PHP] PHP Chat Program?
Dear PHP Users,
I have a client who currently has a website setup with iChat which is several years old and we are currently having problems with it. I need to find a PHP Chat program that will be very easy and simple. I just wanted to see if anyone here has used a program and really likes it and can recomment it ?
Devin Atencio
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hi All,
Does any one know how to make mail() function to send mail to 'CC' and 'BCC' address. I have tried to keep 'CC' and BCC' in header, but it is not working. Mail function is sending the message to 'To' address but not to 'CC' and 'BCC'.
I am using WinNT, IIS and PHP 4.0.6.
Here is the part of my code.
$to = $HTTP_POST_VARS["to_address"];
$from = $HTTP_POST_VARS["from_address"];
$cc = $HTTP_POST_VARS["cc_address"];
$bcc = $HTTP_POST_VARS["bcc_address"];
$subject = $HTTP_POST_VARS["subject"];
$message = $HTTP_POST_VARS["message"];
$header .= "From: my_address
wcom.com\r\n";
if ($cc <> "" ) { $header .= "Cc: ".$cc."\r\n"; }
if ($bcc <> "") { $header .= "Bcc: ".$bcc."\r\n"; }
if ($to <>"") { if (mail($to,$subject,$message,$header)) { // Do some thing } else { // Do some thing else } }
-----Original Message-----
From: Devin Atencio [mailto:dreamboy
aros.net]
Sent: Friday, June 14, 2002 5:11 PM
To: php-general
lists.php.net
Subject: [PHP] PHP Chat Program?
Dear PHP Users,
I have a client who currently has a website setup with iChat which is several years old and we are currently having problems with it. I need to find a PHP Chat program that will be very easy and simple. I just wanted to see if anyone here has used a program and really likes it and can recomment it ?
Devin Atencio
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
On Friday, June 14, 2002 at 10:01:24 PM, Sridhar Moparthy wrote: > Does any one know how to make mail() function to send mail to 'CC' and 'BCC' > address. I have tried to keep 'CC' and BCC' in header, but it is not > working. Mail function is sending the message to 'To' address but not to > 'CC' and 'BCC'. <snip > if (mail($to,$subject,$message,$header)) <snip>
The mail function sends the message to the addresses in the first parameter, so you need to specify all the users you want the message to go to in $to.
PS. I (and I'm sure there are others) would prefer it if you could create a new thread for a new topic. It makes things a lot easier to follow.
-- Stuart
attached mail follows:
Take a look at http://www.php.net/manual/en/function.mail.php#AEN39855 for ways of doing complex mails.. You can indeed do CC's and BCC's you just add them in the header area. Study the example, it works beautifully and will do everything you stated.
Plus there are classes out there that will allow you to do everything you could possibly ever want to do with email.. So take a look on google if you want to get into multi part messages, attachments, html, etc etc.
Cheers!
Rick
Don't dismiss a good idea simply because you don't like the source. - Unknown
> From: Stuart Dallas <stuart
sharedserver.net>
> Organization: SharedServer.net
> Reply-To: Stuart Dallas <stuart
sharedserver.net>
> Date: Fri, 14 Jun 2002 22:14:35 +0100
> To: php-general
lists.php.net, php-windows
lists.php.net
> Subject: Re: [PHP] 'CC' and 'BCC' in mail function
>
> On Friday, June 14, 2002 at 10:01:24 PM, Sridhar Moparthy wrote:
>> Does any one know how to make mail() function to send mail to 'CC' and 'BCC'
>> address. I have tried to keep 'CC' and BCC' in header, but it is not
>> working. Mail function is sending the message to 'To' address but not to
>> 'CC' and 'BCC'.
> <snip
>> if (mail($to,$subject,$message,$header))
> <snip>
>
> The mail function sends the message to the addresses in the first parameter,
> so
> you need to specify all the users you want the message to go to in $to.
>
> PS. I (and I'm sure there are others) would prefer it if you could create a
> new
> thread for a new topic. It makes things a lot easier to follow.
>
> --
> Stuart
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
So I'm trying to install PHP on win98 with Apache2. I got these nice instructions from... http://www.webmasterbase.com/article.php?pid=30&aid=525 After I make the following addition to my httpd.conf file, I get an error when I try to start Apache again... ADDITION TO HTTPD.CONF: LoadModule php4_module c:/php/sapi/php4apache.dll
ERROR WHEN STARTING APACHE: Cannot load c:/php/sapi/php4apache.dll into server: One of the library ilfes needed to run this application cannot be found. ...I checked in the sapi directory and php4apache.dll is indeed in there. One other thing - One part of the instructions said to do this... Find the file called php4ts.dll in the PHP folder and copy it to the System32 subfolder of your Windows folder (e.g. C:\Windows\System32). Well, there is no php4ts.dll file anywhere on my PC. There is however a php4ts.lib file. Maybe this has something to do with it? Thanks for your help!!!!!!!!!!!
attached mail follows:
You missed a step in copying DLLs. I don't remember which one, but it's the dll files found in c:\php
> -----Original Message-----
> From: Phil Schwarzmann [mailto:pschwar
jhmi.edu]
> Sent: Friday, June 14, 2002 2:01 PM
> To: php-general
lists.php.net
> Subject: [PHP] PHP Installation Win98/Apache error....
>
>
> So I'm trying to install PHP on win98 with Apache2.
>
> I got these nice instructions from...
>
> http://www.webmasterbase.com/article.php?pid=30&aid=525
>
> After I make the following addition to my httpd.conf file, I get an
> error when I try to start Apache again...
>
> ADDITION TO HTTPD.CONF:
> LoadModule php4_module c:/php/sapi/php4apache.dll
>
> ERROR WHEN STARTING APACHE:
> Cannot load c:/php/sapi/php4apache.dll into server: One of the library
> ilfes needed to run this application cannot be found.
>
> ...I checked in the sapi directory and php4apache.dll is indeed in
> there.
>
> One other thing - One part of the instructions said to do this...
>
> Find the file called php4ts.dll in the PHP folder and copy it to the
> System32 subfolder of your Windows folder (e.g. C:\Windows\System32).
>
> Well, there is no php4ts.dll file anywhere on my PC. There is however
> a php4ts.lib file. Maybe this has something to do with it?
>
> Thanks for your help!!!!!!!!!!!
>
>
>
****************************************************************************
This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message. Thank you very
much.
attached mail follows:
Hi All,
I am trying to figure out how to use ucwords here :
if (submit)
$db = mysql_connect($dbhost,$dbuname,$dbpass);
mysql_select_db($dbname,$db);
ucwords($sql) <<<<< Is this correct ?
$sql = "INSERT INTO $prefix";
$sql .= "(first, last, email, company, address, city, state, zip,
phone, fax, mobile, comments)";
$sql .= "VALUES";
$sql .= "('$first', '$last', '$email', '$company', '$address',
'$city', '$state', '$zip', '$phone', '$fax', '$mobile', '$comments')";
also can you do this
field level ?
Danny
attached mail follows:
Looks like it, but you're missing the semi-colon at the end of the line.
> -----Original Message-----
> From: Daniel Negron/KBE [mailto:danegron
kbelectronics.net]
> Sent: Friday, June 14, 2002 2:06 PM
> To: php-general
lists.php.net
> Subject: [PHP] ucwords() usage QUICKIE
>
>
> Hi All,
>
> I am trying to figure out how to use ucwords here :
> if (submit)
> $db = mysql_connect($dbhost,$dbuname,$dbpass);
> mysql_select_db($dbname,$db);
> ucwords($sql) <<<<< Is this correct ?
> $sql = "INSERT INTO $prefix";
> $sql .= "(first, last, email, company, address,
> city, state, zip,
> phone, fax, mobile, comments)";
> $sql .= "VALUES";
> $sql .= "('$first', '$last', '$email', '$company',
> '$address',
> '$city', '$state', '$zip', '$phone', '$fax', '$mobile', '$comments')";
> also can you do this
field level ?
>
>
> Danny
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
****************************************************************************
This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message. Thank you very
much.
attached mail follows:
DNK> I am trying to figure out how to use ucwords here :
DNK> if (submit)
DNK> $db = mysql_connect($dbhost,$dbuname,$dbpass);
DNK> mysql_select_db($dbname,$db);
DNK> ucwords($sql) <<<<< Is this correct ?
DNK> $sql = "INSERT INTO $prefix";
DNK> $sql .= "(first, last, email, company, address, city, state, zip,
DNK> phone, fax, mobile, comments)";
DNK> $sql .= "VALUES";
DNK> $sql .= "('$first', '$last', '$email', '$company', '$address',
DNK> '$city', '$state', '$zip', '$phone', '$fax', '$mobile', '$comments')";
DNK> also can you do this
field level ?
Currently, you are ucwords-ing an empty string. That being said, I'm not sure what you are trying to do anyway. ucwords() upper-cases the first letter of words in a string. (http://www.php.net/manual/en/function.ucwords.php)
such as:
$string = "this is a test"; $newstring = ucwords($string); echo $newstring // This Is A Test
- Julie
--> Julie Meloni
--> julie
thickbook.com
--> www.thickbook.com
Find "Sams Teach Yourself MySQL in 24 Hours" at http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20
attached mail follows:
You pass a string to the function and it returns a string with each word starting with an uppercase.
$string = "hello world";
$new_string = ucwords($string);
echo $new_string; // Displays 'Hello World'
---John Holmes...
----- Original Message -----
From: "Daniel Negron/KBE" <danegron
kbelectronics.net>
To: <php-general
lists.php.net>
Sent: Friday, June 14, 2002 5:06 PM
Subject: [PHP] ucwords() usage QUICKIE
> Hi All,
>
> I am trying to figure out how to use ucwords here :
> if (submit)
> $db = mysql_connect($dbhost,$dbuname,$dbpass);
> mysql_select_db($dbname,$db);
> ucwords($sql) <<<<< Is this correct ?
> $sql = "INSERT INTO $prefix";
> $sql .= "(first, last, email, company, address, city, state,
zip,
> phone, fax, mobile, comments)";
> $sql .= "VALUES";
> $sql .= "('$first', '$last', '$email', '$company', '$address',
> '$city', '$state', '$zip', '$phone', '$fax', '$mobile', '$comments')";
> also can you do this
field level ?
>
>
> Danny
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Okay, I was running php 4.1.2 on freebsd 4.5 with the build args --with-mysql --enable-track-vars and --with-apxs... I started implimenting session code. When my code wouldnt work I looked on the boards and found that there was a bug with that version, so i wiped out php and upgraded to php 4.2.1. Using the default php.ini file and the example code given off the website for sessions I get the folowing error:
Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
just so you all know, /tmp is drwxrwxrwt and is owned by root.wheel.
I double check after the script. No session data has been written. I tried changing the save path to /usr/local/apache/sessions and then gave that folder 777 and made it owned by nobody... Same error accept its changed to reflect the new save path instead of /tmp... either way its broke and I need it working very badly. Im sick of ripping my hair out. Can anyone help me? please?!?
Rick
attached mail follows:
This is an ls -la from /tmp
[rick
wacky /tmp]$ ls -la
total 58
drwxrwxrwt 3 root wheel 512 Jun 14 14:20 .
drwxr-xr-x 22 root wheel 1024 Jun 13 16:39 ..
drwxr-xr-x 2 root wheel 512 Apr 29 14:43 .webmin
-rw-rw-rw- 1 root wheel 46193 Jun 11 14:11 1hz2b
-rw-rw-rw- 1 root wheel 2539 Jun 11 14:11 21hz2b
-rw------- 1 root wheel 126 Apr 25 14:28 EdP.amKqAY
srwxrwxrwx 1 mysql wheel 0 Jun 14 14:20 mysql.sock
-rw------- 1 root wheel 0 Apr 26 03:01 periodic.NCNBF4riSi
----- Original Message -----
From: "Lazor, Ed" <ELazor
providence.org>
To: "'Rick Kukiela'" <php
mmhosting.com>
Sent: Friday, June 14, 2002 4:44 PM
Subject: RE: [PHP] Sessions... wtf is wrong?!
> Are there read only files in that directory that are blocking things?
>
> > -----Original Message-----
> > From: Rick Kukiela [mailto:php
mmhosting.com]
> > Sent: Friday, June 14, 2002 2:41 PM
> > To: php-general
lists.php.net
> > Subject: [PHP] Sessions... wtf is wrong?!
> >
> >
> > Okay, I was running php 4.1.2 on freebsd 4.5 with the build
> > args --with-mysql --enable-track-vars and --with-apxs... I started
> > implimenting session code. When my code wouldnt work I looked
> > on the boards
> > and found that there was a bug with that version, so i wiped
> > out php and
> > upgraded to php 4.2.1. Using the default php.ini file and the
> > example code
> > given off the website for sessions I get the folowing error:
> >
> > Warning: Failed to write session data (files). Please verify that the
> > current setting of session.save_path is correct (/tmp) in
> > Unknown on line 0
> >
> > just so you all know, /tmp is drwxrwxrwt and is owned by root.wheel.
> >
> > I double check after the script. No session data has been
> > written. I tried
> > changing the save path to /usr/local/apache/sessions and then
> > gave that
> > folder 777 and made it owned by nobody... Same error accept
> > its changed to
> > reflect the new save path instead of /tmp... either way its
> > broke and I need
> > it working very badly. Im sick of ripping my hair out. Can
> > anyone help me?
> > please?!?
> >
> >
> > Rick
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
****************************************************************************
> This message is intended for the sole use of the individual and entity to
> whom it is addressed, and may contain information that is privileged,
> confidential and exempt from disclosure under applicable law. If you are
> not the intended addressee, nor authorized to receive for the intended
> addressee, you are hereby notified that you may not use, copy, disclose or
> distribute to anyone the message or any information contained in the
> message. If you have received this message in error, please immediately
> advise the sender by reply email and delete the message. Thank you very
> much.
>
attached mail follows:
PHP Editors List...
http://www.itworks.demon.co.uk/phpeditors.htm
Check out http://www.php.net
The links section is handy at times...
Chris
_________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com
attached mail follows:
John, Dan & All,
Thanks for your response, perhaps if I tell you more of the story then it'll make more sense. I'm afraid I seem to have an ability for asking cryptic questions.
Below is the code I'm using, it is meant to check for a list of between 10 and 50 words in a table then return the key of the words found, for the words not in the table they should be added to the table.
It seems to work fine, but in a effort to make the code more efficient I realised that at present I'm walking through a lot of the recordset for each keyword. But that the majority of the recordset would be in the same order as the keywords. So if I can add a little extra code that says if the next record in the recordset is not the word I'm trying to find then walk through the recordset, if you reach the end then start at the beginning and go down-to the initial row. This should confirm that the word is not in the recordset and so needs to be added, but leave the recordset in the correct place to check the next word.
However to do this I thought initialy I would need to identify the row the recordset was presently at. However now I understand I need to push the recordset into an array then use this array to loop through finding the key's and the words that need to be added. However saying it and coding it seem to be two completely different things, can anyone help me getting started? Hope this makes some sense? If you have any other comments on the code to improve it or good coding practice I would appreciate your comments as I'm still new to this.
Thanks
Zac
Code:
#--create select statement for getting keywords from table $fndWrds = ''; foreach($kywrd as $val) { $fndWrds .= "wrd = '$val' OR "; }
#-- add test word to get a result regardless $fndWrds .= "wrd = 'test'";
#-- get present keywords from db $dbKy = mysql_query("SELECT ky, wrd FROM ".$site_no."kywrdInd WHERE $fndWrds;");
#--create kywrd index array for index to be used in update value list $indx = array();
#--create update value lists to later add record into lookup table $vlst = '';
foreach($kywrd as $key => $val) { $fnd = 0; While ($kyRw = mysql_fetch_array($dbKy)) { if($kyRw['wrd'] == $val) { $fnd = 1; $indx[$key] = $kyRw['ky']; break 1; } } #-- reset pointer of db array back to begining mysql_data_seek($dbKy, 0);
#-- if not in db then add word to db then set index if($fnd == 0) { if(! mysql_query("INSERT INTO ".$site_no."kywrdInd (wrd) values ('".$val."');")) echo 'Word not added'; $indx[$key] = mysql_insert_id(); }
#-- check to see that each word has an index value if($indx[$key]) { #--create value list for update into lookup table $vlst .= "($compID," . $indx[$key] . "," . $scr[$key] . "), "; } else { echo 'no index set for keyword, word = '.$val.' index = '.$key.'<br>'; }
----- Original Message -----
From: "John Holmes" <holmes072000
charter.net>
To: "'Zac Hillier'" <zac
affectors.net>; <php-general
lists.php.net>
Sent: Friday, June 14, 2002 6:42 PM
Subject: RE: [PHP] row pointer
> Keep track of it yourself as you loop through the data. Maybe if you
> explained what you need "overall" then we could suggest a method...
>
> ---John Holmes...
>
> > -----Original Message-----
> > From: Zac Hillier [mailto:zac
affectors.net]
> > Sent: Friday, June 14, 2002 3:59 AM
> > To: php-general
lists.php.net
> > Subject: [PHP] row pointer
> >
> > Hi
> >
> > I'm looking for a php function that will return the position of the
> > pointer
> > in a mysql recordset.
> >
> > I found mysql_data_seek, but this appears to only move the pointer, I
> need
> > to get the equivalent row number for the pointer position before
> moving
> > it,
> > then return to the same position.
> >
> > Can anyone help?
> >
> > Thanks
> >
> > Zac
> >
> >
> > --
> > 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
>
>
>
attached mail follows:
So you just want to insert a bunch of words into the table if they aren't there already? Why not make the column unique and just insert them. Ignore the warnings about duplicates...
---John Holmes...
----- Original Message -----
From: "Zac Hillier" <zac
affectors.net>
To: <holmes072000
charter.net>; "Analysis & Solutions"
<danielc
analysisandsolutions.com>; <php-general
lists.php.net>
Sent: Friday, June 14, 2002 5:54 PM
Subject: Re: [PHP] row pointer
> John, Dan & All,
>
> Thanks for your response, perhaps if I tell you more of the story then
it'll
> make more sense. I'm afraid I seem to have an ability for asking cryptic
> questions.
>
> Below is the code I'm using, it is meant to check for a list of between 10
> and 50 words in a table then return the key of the words found, for the
> words not in the table they should be added to the table.
>
> It seems to work fine, but in a effort to make the code more efficient I
> realised that at present I'm walking through a lot of the recordset for
each
> keyword. But that the majority of the recordset would be in the same order
> as the keywords. So if I can add a little extra code that says if the next
> record in the recordset is not the word I'm trying to find then walk
through
> the recordset, if you reach the end then start at the beginning and go
> down-to the initial row. This should confirm that the word is not in the
> recordset and so needs to be added, but leave the recordset in the correct
> place to check the next word.
>
> However to do this I thought initialy I would need to identify the row the
> recordset was presently at. However now I understand I need to push the
> recordset into an array then use this array to loop through finding the
> key's and the words that need to be added. However saying it and coding it
> seem to be two completely different things, can anyone help me getting
> started? Hope this makes some sense? If you have any other comments on the
> code to improve it or good coding practice I would appreciate your
comments
> as I'm still new to this.
>
> Thanks
>
> Zac
>
> Code:
>
> #--create select statement for getting keywords from table
> $fndWrds = '';
> foreach($kywrd as $val) {
> $fndWrds .= "wrd = '$val' OR ";
> }
>
> #-- add test word to get a result regardless
> $fndWrds .= "wrd = 'test'";
>
> #-- get present keywords from db
> $dbKy = mysql_query("SELECT ky, wrd FROM ".$site_no."kywrdInd WHERE
> $fndWrds;");
>
> #--create kywrd index array for index to be used in update value list
> $indx = array();
>
> #--create update value lists to later add record into lookup table
> $vlst = '';
>
> foreach($kywrd as $key => $val) {
> $fnd = 0;
> While ($kyRw = mysql_fetch_array($dbKy)) {
> if($kyRw['wrd'] == $val) {
> $fnd = 1;
> $indx[$key] = $kyRw['ky'];
> break 1;
> }
> }
> #-- reset pointer of db array back to begining
> mysql_data_seek($dbKy, 0);
>
> #-- if not in db then add word to db then set index
> if($fnd == 0) {
> if(! mysql_query("INSERT INTO ".$site_no."kywrdInd (wrd) values
> ('".$val."');")) echo 'Word not added';
> $indx[$key] = mysql_insert_id();
> }
>
> #-- check to see that each word has an index value
> if($indx[$key]) {
> #--create value list for update into lookup table
> $vlst .= "($compID," . $indx[$key] . "," . $scr[$key] . "), ";
> } else {
> echo 'no index set for keyword, word = '.$val.' index = '.$key.'<br>';
> }
>
>
> ----- Original Message -----
> From: "John Holmes" <holmes072000
charter.net>
> To: "'Zac Hillier'" <zac
affectors.net>; <php-general
lists.php.net>
> Sent: Friday, June 14, 2002 6:42 PM
> Subject: RE: [PHP] row pointer
>
>
> > Keep track of it yourself as you loop through the data. Maybe if you
> > explained what you need "overall" then we could suggest a method...
> >
> > ---John Holmes...
> >
> > > -----Original Message-----
> > > From: Zac Hillier [mailto:zac
affectors.net]
> > > Sent: Friday, June 14, 2002 3:59 AM
> > > To: php-general
lists.php.net
> > > Subject: [PHP] row pointer
> > >
> > > Hi
> > >
> > > I'm looking for a php function that will return the position of the
> > > pointer
> > > in a mysql recordset.
> > >
> > > I found mysql_data_seek, but this appears to only move the pointer, I
> > need
> > > to get the equivalent row number for the pointer position before
> > moving
> > > it,
> > > then return to the same position.
> > >
> > > Can anyone help?
> > >
> > > Thanks
> > >
> > > Zac
> > >
> > >
> > > --
> > > 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
> >
> >
> >
>
attached mail follows:
Does anyone have a good function for parsing a search string into SQL? I know it will depend on the name of the field and table I'm searching through. Anything close will be helpful. An example search string would be:
beer AND pizza NOT anchovies
and the resulting search string would be
select ID, Title from Products where Title like '%beer%' AND Title like '%pizza%' AND Title NOT LIKE '%anchovies%';
Another example search string would be:
beer OR pizza AND movies
Thanks! =)
-Ed
**************************************************************************** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
attached mail follows:
If you use fulltext search (assuming you are using MySQL), it deals with stop words on its own as well as some additional search logic.
http://www.mysql.com/doc/F/u/Fulltext_Search.html
-J
On Sat, 15 Jun 2002 10:19:04 +1200, Ed Lazor wrote:
> Does anyone have a good function for parsing a search string into SQL? I > know it will depend on the name of the field and table I'm searching > through. Anything close will be helpful. An example search string > would be: > > beer AND pizza NOT anchovies > > and the resulting search string would be > > select ID, Title from Products where Title like '%beer%' AND Title like > '%pizza%' AND Title NOT LIKE '%anchovies%'; > > > Another example search string would be: > > beer OR pizza AND movies > > Thanks! =) > > -Ed > > > **************************************************************************** > This message is intended for the sole use of the individual and entity > to whom it is addressed, and may contain information that is privileged, > confidential and exempt from disclosure under applicable law. If you > are not the intended addressee, nor authorized to receive for the > intended addressee, you are hereby notified that you may not use, copy, > disclose or distribute to anyone the message or any information > contained in the message. If you have received this message in error, > please immediately advise the sender by reply email and delete the > message. Thank you very much.
-- Jason Morehouse (jmnetconcepts.com) Netconcepts LTD, Auckland, New Zealand * Linux: because rebooting is for adding hardware.
attached mail follows:
I generate nos. using range function, e.g. I get 0 to 40. I want to convert these nos. to string, I tried sprintf() syntax:
$soils[$i] = sprintf("%d", $soils[$i]);
But doesn't seem to work, my program returned an error. P.S. : I'm using 4.0.6 otherwise wouldn't have this problem. -Pushkar S. Pradhan
attached mail follows:
Try:
$n = $soils[$i]; $soils[$i] = sprintf("%d", $n);
and if that doesn't work, print out $soils[$i] to see what it is.
> -----Original Message----- > $soils[$i] = sprintf("%d", $soils[$i]); > > But doesn't seem to work, my program returned an error. > P.S. : I'm using 4.0.6 otherwise wouldn't have this problem. > -Pushkar S. Pradhan > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > **************************************************************************** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
attached mail follows:
Anywone, I've been working on an interface to IRC services for a webpage. Ideally I'd like the webpage to stay connected to the network when it's in use. pfsockopen(...) seemed to do just the thing I needed. Open a connection, and don't close it when finished.... great... but it seems you can't continue use of that connection in a subsequent script. Either I'm missing something obvious that allows you to do this, or I've missed the point pfsockopen completely.
Any help or information greatly appreciated.
Many thanks Dan
attached mail follows:
Hi,
My session variables won't persist, could someone help me with this problem? I spent all day trying to figure out what is wrong, and I still don't know why I couldn't get it to work. Here is an example script: <? session_id(); session_start(); header("Pragma: no-cache"); header("Refresh: 2"); $sID=session_id(); echo "session id: $sID<br>"; echo "session var: ".$_SESSION["var"]."<br>";
fnB(); function fnA(){ $_SESSION["var"]=1; } function fnB(){ if(isset($_SESSION["var"])){ echo "session var is set...<br>"; } else{ echo "session var is not set...<br>"; fnA(); echo $_SESSION["var"]; } } ?>
Here is the out put from this script: " session id: ee030ac6e15ea2c01e1dd4fe40f3ab30 session var: session var is not set... 1 " The session ID is the same for a given session, that means the server knows its the same session. And since I get the value "1" each time, I can see that the $_SESSION["var"] is a global variable with a value of "1". But it seems that once the script is finished, this variable runs out of scope! A session variable should persist for the duration of the session. It should not run out of scope like this. Could someone with more experience tell me what am I doing wrong? Thanks in advance.
Zlutarch
_________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com
attached mail follows:
On Saturday, June 15, 2002 at 12:53:47 AM, Zlutarch G. wrote: > The session ID is the same for a given session, that means the server knows > its the same session. And since I get the value "1" each time, I can see > that the $_SESSION["var"] is a global variable with a value of "1". But it > seems that once the script is finished, this variable runs out of scope! A > session variable should persist for the duration of the session. It should > not run out of scope like this. Could someone with more experience tell me > what am I doing wrong? Thanks in advance.
Your code looks ok so I'm guessing that you are just refreshing this page to see if the session variables persist. If that is the case then of course you're not seeing them persist. In order for the page to import the current session it must know what the session id is. Try putting a link on that page that links to the same page. Click on the link and you should find that the session variable now persists.
-- Stuart
attached mail follows:
Hi Stuart,
I tried your idea but it didn't work. When I used session_encode(), I got nothing! It seems that it's not being registered as a session variable. Any idea why that is the case?
Thanks,
Zlutarch
>From: Stuart Dallas <stuart
sharedserver.net>
>Reply-To: Stuart Dallas <stuart
sharedserver.net>
>To: php-general
lists.php.net
>Subject: Re: [PHP] PLEASE HELP! session variable fails to persist!!
>Date: Sat, 15 Jun 2002 01:05:47 +0100
>
>On Saturday, June 15, 2002 at 12:53:47 AM, Zlutarch G. wrote:
> > The session ID is the same for a given session, that means the server
>knows
> > its the same session. And since I get the value "1" each time, I can see
> > that the $_SESSION["var"] is a global variable with a value of "1". But
>it
> > seems that once the script is finished, this variable runs out of scope!
>A
> > session variable should persist for the duration of the session. It
>should
> > not run out of scope like this. Could someone with more experience tell
>me
> > what am I doing wrong? Thanks in advance.
>
>Your code looks ok so I'm guessing that you are just refreshing this page
>to
>see if the session variables persist. If that is the case then of course
>you're
>not seeing them persist. In order for the page to import the current
>session it
>must know what the session id is. Try putting a link on that page that
>links to
>the same page. Click on the link and you should find that the session
>variable
>now persists.
>
>--
>Stuart
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
_________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com
attached mail follows:
On Saturday, June 15, 2002 at 1:27:58 AM, Zlutarch G. wrote: > I tried your idea but it didn't work. When I used session_encode(), I got > nothing! It seems that it's not being registered as a session variable. Any > idea why that is the case?
I hope this will help clear up any confusion.
Go here: http://www.devserver.org/test/session.php and click on the link.
This is the code...
<?php session_start(); $sID=session_id(); echo "session id: $sID<br>"; echo "session var: ".$_SESSION["var"]."<br>"; fnB(); function fnA(){ $_SESSION["var"]=1; } function fnB(){ if(isset($_SESSION["var"])){ echo "session var is set...<br>"; } else{ echo "session var is not set...<br>"; fnA(); echo $_SESSION["var"]; } } print '<br><br><a href="'.$_SERVER['SCRIPT_NAME'].'">reload page</a>'; ?>
It works. If this code doesn't work for you then it's something wrong with your server configuration.
-- Stuart
attached mail follows:
Hi Stuart,
I tried your script, but I couldn't get it to work. I guess it has to be something wrong with my server configuration? I am using Apache 1.3.14. I am new to Apache, so I don't know what could possibly be the configuration problem. Do you have any ideas? Thanks a lot.
Zlutarch
>From: Stuart Dallas <stuart
sharedserver.net>
>Reply-To: Stuart Dallas <stuart
sharedserver.net>
>To: "Zlutarch G." <zlutarch
hotmail.com>
>Subject: Re[2]: [PHP] PLEASE HELP! session variable fails to persist!!
>Date: Sat, 15 Jun 2002 01:32:51 +0100
>
>On Saturday, June 15, 2002 at 1:24:43 AM, you wrote:
> > I tried including a link, but it didn't work. When I used
>session_encode(),
> > I got nothing! Some how it was not registered as a session variable. Any
> > idea why that could be?
>
>I hope this will help clear up any confusion.
>
>Go here: http://www.devserver.org/test/session.php and click on the link.
>
>This is the code...
>
><?php
> session_start();
> $sID=session_id();
> echo "session id: $sID<br>";
> echo "session var: ".$_SESSION["var"]."<br>";
>
> fnB();
> function fnA(){
> $_SESSION["var"]=1;
> }
> function fnB(){
> if(isset($_SESSION["var"])){
> echo "session var is set...<br>";
> }
> else{
> echo "session var is not set...<br>";
> fnA();
> echo $_SESSION["var"];
> }
> }
>
> print '<br><br><a href="'.$_SERVER['SCRIPT_NAME'].'">reload page</a>';
>?>
>
>It works. If this code doesn't work for you then it's something wrong with
>your
>server configuration.
>
>--
>Stuart
>
_________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx
attached mail follows:
On Saturday, June 15, 2002 at 1:42:45 AM, Zlutarch G. wrote: > I tried your script, but I couldn't get it to work. I guess it has to be > something wrong with my server configuration? I am using Apache 1.3.14. I am > new to Apache, so I don't know what could possibly be the configuration > problem. Do you have any ideas? Thanks a lot.
Do you get any errors? Add the following line immediately before the call to session_start()...
error_reporting (E_ALL);
My guess is that it's failing to create the session, but if your error reporting is too low you may not be told about it.
Is the server you are using public? Can you post the URL so we can take a look?
-- Stuart
attached mail follows:
Hi Stuart,
Thanks. I added error_reporting (E_ALL); and it gave me the following error msg: "Warning: Undefined index: var in c:\program files\apache group\apache\htdocs\php\superstock\ssi\valuecalc\valuescreen\testsess.php on line 6"
Here is line 6: echo "session var: ".$_SESSION["var"]."<br>";
Apparently, there is no session variable! Does that mean the session was not created? I thought the session is created if I get the same session ID each time I reload the page.
Zlutarch
P.S. I wish I could post the server address, but its on a private network. Only computers on the intra net have access to the server. I will see what I can do.
>From: Stuart Dallas <stuart
sharedserver.net>
>Reply-To: Stuart Dallas <stuart
sharedserver.net>
>To: php-general
lists.php.net
>Subject: Re[4]: [PHP] PLEASE HELP! session variable fails to persist!!
>Date: Sat, 15 Jun 2002 01:49:40 +0100
>
>On Saturday, June 15, 2002 at 1:42:45 AM, Zlutarch G. wrote:
> > I tried your script, but I couldn't get it to work. I guess it has to be
> > something wrong with my server configuration? I am using Apache 1.3.14.
>I am
> > new to Apache, so I don't know what could possibly be the configuration
> > problem. Do you have any ideas? Thanks a lot.
>
>Do you get any errors? Add the following line immediately before the call
>to
>session_start()...
>
>error_reporting (E_ALL);
>
>My guess is that it's failing to create the session, but if your error
>reporting is too low you may not be told about it.
>
>Is the server you are using public? Can you post the URL so we can take a
>look?
>
>--
>Stuart
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
_________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com
attached mail follows:
On Saturday, June 15, 2002 at 2:05:50 AM, Zlutarch G. wrote: > Thanks. I added error_reporting (E_ALL); and it gave me the following error > msg: "Warning: Undefined index: var in c:\program files\apache > group\apache\htdocs\php\superstock\ssi\valuecalc\valuescreen\testsess.php on > line 6"
> Here is line 6: echo "session var: ".$_SESSION["var"]."<br>";
> Apparently, there is no session variable! Does that mean the session was not > created? I thought the session is created if I get the same session ID each > time I reload the page.
It's saying that there is no variable named var stored in the session. I'm at a loss. I can't see any reason why it's not working. What URL does the link in your page go to? It should have a query string on it. Does it?
-- Stuart
attached mail follows:
I am having a lot of trouble with the $_name, $_size, and $_type variable extensions. I have a basic file upload system however it is within a function. Sometimes when I declare the aforementioned variables in a global statement such as global $file_name I can get a value for _name, other times, I get nothing. Can someone clarify this because I was unable to find anything in the manual?
Cheers, ------------ Lakario ModDev.netGet more from the Web. FREE MSN Explorer download : http://explorer.msn.com
attached mail follows:
-Lakario, Please have a look on http://www.php.net/manual/en/features.file-upload.php for more information on fileuploads in php.Also check with the size of the files you have transferred.When file size is large, then your files won't get uploaded.This is due to the low execution time,If you don't mind please send your programs to dig more. regards, SenthilVelavan.P
----- Original Message -----
From: "Nathan Taylor" <Lakario
msn.com>
To: "php-general" <php-general
lists.php.net>
Sent: Saturday, June 15, 2002 6:46 AM
Subject: [PHP] Confusion with the $_name $_type $_size Variable Extensions
I am having a lot of trouble with the $_name, $_size, and $_type variable extensions. I have a basic file upload system however it is within a function. Sometimes when I declare the aforementioned variables in a global statement such as global $file_name I can get a value for _name, other times, I get nothing. Can someone clarify this because I was unable to find anything in the manual?
Cheers, ------------ Lakario ModDev.netGet more from the Web. FREE MSN Explorer download : http://explorer.msn.com
attached mail follows:
Anyone know why php would complain about not having permission to write the session file in /tmp (and to check the session.save_path var in my php.ini file. when it does specify /tmp in the php.ini and /tmp has drwxrwxrwt for permissions?
I need a resolution... even if we have to pay for it... so if anyone feels they are good enough to fix this we can compensate you for your time.
Thanks, Rick
attached mail follows:
-Rick Change the owner and group of the directory to nobody.nobody to your /tmp directory.Iam not sure here. regards, SenthilVelavan.P
----- Original Message -----
From: "php" <php
mmhosting.com>
To: <php-general
lists.php.net>
Sent: Saturday, June 15, 2002 7:42 AM
Subject: [PHP] session problems....
> Anyone know why php would complain about not having permission to write > the session file in /tmp (and to check the session.save_path var in my > php.ini file. when it does specify /tmp in the php.ini and /tmp has > drwxrwxrwt for permissions? > > I need a resolution... even if we have to pay for it... so if anyone > feels they are good enough to fix this we can compensate you for your > time. > > Thanks, > Rick > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
You should not be writing to /tmp that is a system directory. php.ini is a file. If you need a "temporary" directory, use ./tmp that will be directory in your web root directory.
Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474
-----Original Message-----
From: php [mailto:php
mmhosting.com]
Sent: Friday, June 14, 2002 9:12 PM
To: php-general
lists.php.net
Subject: [PHP] session problems....
Anyone know why php would complain about not having permission to write the session file in /tmp (and to check the session.save_path var in my php.ini file. when it does specify /tmp in the php.ini and /tmp has drwxrwxrwt for permissions?
I need a resolution... even if we have to pay for it... so if anyone feels they are good enough to fix this we can compensate you for your time.
Thanks, Rick
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
BK> You should not be writing to /tmp that is a system directory. php.ini is a BK> file. If you need a "temporary" directory, use ./tmp that will be directory BK> in your web root directory.
With all due respect, I think there's a reason that /tmp is the default session.save_path value in php.ini. /tmp is temp. It's where temporary things go.
Saying "you shouldn't use that" is pretty much saying "Hey PHP Development Group, you've done this wrong for 2 years". If you don't want to write your session files to /tmp, then don't. But please don't say that it's wrong to do so. That's not the answer to the guy's particular problem.
- Julie
--> Julie Meloni
--> julie
thickbook.com
--> www.thickbook.com
Find "Sams Teach Yourself MySQL in 24 Hours" at http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20
attached mail follows:
I was referring to strict Unix directory naming conventions. /tmp is the equivalent of root/tmp and no sysadmin wants you writing to his /tmp directory. In fact you should not be allowed to write to /tmp. While I have not checked this, I have the feeling that PHP takes care of this for you. If you are creating a subdirectory, say for data, on your web site the Unix path may be something like /websites/yoursitename/htdocs/subdirectory.
Since your default directory would be /websites/yoursitename/htdocs to get to /websites/yoursitename/htdocs/subdirectory you should use ./subdirectory which means "start in my default directory and go down one level to subdirectory.
I'm sorry if this sounds critical, but I have found that many of the problem posted to this list are OS based, and I urge the members to learn both the operating system that they do their development on and the box where your site is hosted. The use of OS standard directories such as /tmp or /etc are bad form in Unix and make error log analysis difficult at best
Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474
-----Original Message-----
From: Julie Meloni [mailto:julie
thickbook.com]
Sent: Friday, June 14, 2002 10:13 PM
To: Bruce Karstedt
Cc: 'php'; php-general
lists.php.net
Subject: Re[2]: [PHP] session problems....
BK> You should not be writing to /tmp that is a system directory. php.ini is a BK> file. If you need a "temporary" directory, use ./tmp that will be directory BK> in your web root directory.
With all due respect, I think there's a reason that /tmp is the default session.save_path value in php.ini. /tmp is temp. It's where temporary things go.
Saying "you shouldn't use that" is pretty much saying "Hey PHP Development Group, you've done this wrong for 2 years". If you don't want to write your session files to /tmp, then don't. But please don't say that it's wrong to do so. That's not the answer to the guy's particular problem.
- Julie
--> Julie Meloni
--> julie
thickbook.com
--> www.thickbook.com
Find "Sams Teach Yourself MySQL in 24 Hours" at http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20
attached mail follows:
I'm not sure what sysadmins you are talking about, but /tmp is typically a world-writable directory.
Also, there is no such "strict" Unix naming convention. The directory /tmp is always /tmp, so matter how "lenient" you want to be. There is simply a difference between relative paths and absolute paths.
Chris
Bruce Karstedt wrote:
>I was referring to strict Unix directory naming conventions. /tmp is the
>equivalent of root/tmp and no sysadmin wants you writing to his /tmp
>directory. In fact you should not be allowed to write to /tmp. While I have
>not checked this, I have the feeling that PHP takes care of this for you. If
>you are creating a subdirectory, say for data, on your web site the Unix
>path may be something like /websites/yoursitename/htdocs/subdirectory.
>
>Since your default directory would be /websites/yoursitename/htdocs to get
>to /websites/yoursitename/htdocs/subdirectory you should use ./subdirectory
>which means "start in my default directory and go down one level to
>subdirectory.
>
>I'm sorry if this sounds critical, but I have found that many of the problem
>posted to this list are OS based, and I urge the members to learn both the
>operating system that they do their development on and the box where your
>site is hosted. The use of OS standard directories such as /tmp or /etc are
>bad form in Unix and make error log analysis difficult at best
>
>Bruce Karstedt
>President
>Technology Consulting Associates, Ltd.
>Tel: 847-735-9488
>Fax: 847-735-9474
>
>
>-----Original Message-----
>From: Julie Meloni [mailto:julie
thickbook.com]
>Sent: Friday, June 14, 2002 10:13 PM
>To: Bruce Karstedt
>Cc: 'php'; php-general
lists.php.net
>Subject: Re[2]: [PHP] session problems....
>
>
>BK> You should not be writing to /tmp that is a system directory. php.ini is
>a
>BK> file. If you need a "temporary" directory, use ./tmp that will be
>directory
>BK> in your web root directory.
>
>
>With all due respect, I think there's a reason that /tmp is the default
>session.save_path value in php.ini. /tmp is temp. It's where
>temporary things go.
>
>Saying "you shouldn't use that" is pretty much saying "Hey PHP
>Development Group, you've done this wrong for 2 years". If you don't
>want to write your session files to /tmp, then don't. But please
>don't say that it's wrong to do so. That's not the answer to the
>guy's particular problem.
>
>
>- Julie
>
>--> Julie Meloni
>--> julie
thickbook.com
>--> www.thickbook.com
>
>Find "Sams Teach Yourself MySQL in 24 Hours" at
>http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20
>
>
>
>
attached mail follows:
No, everything in PHP happen on the server, BEFORE it gets to the browser. The browser only sees plain HTML code.
So, page refreshing can be done client-side with JavaScript or META refresh.
Opening a new window can be done in HTML with <A HREF="blah.php" target="_blank">click</a>, or with a javascript pop-up.
You can redirect the browser to a different URL *IF* you haven't sent anything to the browser yet (ie, before <DOCTYPE...> or <HTML>) using PHP's header function (header("Location: blah2.php")).
Justin French
on 15/06/02 12:36 AM, Hotmail (gedser80
hotmail.com) wrote:
> Dear sir, > > I have two questions : > > 1- Is there a function in php that refreshes my page ? > > 2- Is there a function that lets me open a new window ? >
attached mail follows:
i need to remove elements in array which are empty. this code works but is it ok to do it like this?
code: if(in_array("", $people)) unset($people[array_search("", $people)])
attached mail follows:
Hi,
I am working on a movie database I have two database that I am calling from but the problem I am having when I ask it to go and fetch all the movies with the same title, it stops and only shows one.
Here is a basic layout...
if($videoid) {
$result = mysql_query("SELECT * FROM library WHERE videoid=$videoid",$db);
$myrow = mysql_fetch_array($result);
// The Myrows
$title = $myrow[title]; $videoid = $myrow[videoid]; $catergory = $myrow[catergory]; $appraisal = $myrow[appraisal];
// Some where here it's not working.....
$sql = "SELECT concat_ws(' ', fname, lname)as actor FROM actormovie WHERE title = '$title' ORDER by lname"; $result = mysql_query($sql); print $sql;
$actor = ""; while ($myrow = mysql_fetch_array($result)) { $actor = $myrow[actor]; $actor .= "<A HREF=''>" . $actor . "</A><BR>\n";
}
What am I doing wrong? It only show one record and it show more.
Chuck Payne
attached mail follows:
you need to put your $myrow in a while loop:
while ($myrow = mysql_fetch_array($result)) {
$title = $myrow[title]; $videoid = $myrow[videoid]; $catergory = $myrow[catergory]; $appraisal = $myrow[appraisal];
// blah blah blah everything else }
Tyler Longren
Captain Jack Communications
www.captainjack.com
tyler
captainjack.com
----- Original Message -----
From: "Chuck Payne" <cepayne
magidesign.com>
To: "PHP General" <php-general
lists.php.net>
Sent: Friday, June 14, 2002 11:03 PM
Subject: [PHP] Problem with MySQL
Hi,
I am working on a movie database I have two database that I am calling from but the problem I am having when I ask it to go and fetch all the movies with the same title, it stops and only shows one.
Here is a basic layout...
if($videoid) {
$result = mysql_query("SELECT * FROM library WHERE videoid=$videoid",$db);
$myrow = mysql_fetch_array($result);
// The Myrows
$title = $myrow[title]; $videoid = $myrow[videoid]; $catergory = $myrow[catergory]; $appraisal = $myrow[appraisal];
// Some where here it's not working.....
$sql = "SELECT concat_ws(' ', fname, lname)as actor FROM actormovie WHERE title = '$title' ORDER by lname"; $result = mysql_query($sql); print $sql;
$actor = ""; while ($myrow = mysql_fetch_array($result)) { $actor = $myrow[actor]; $actor .= "<A HREF=''>" . $actor . "</A><BR>\n";
}
What am I doing wrong? It only show one record and it show more.
Chuck Payne
attached mail follows:
Ok. Go to this link...
http://www.magidesign.com/movielist.php and select "12 Monkeys" You will see that only picked one actor...
It should have pick four
mysql> SELECT concat_ws(" ", fname, lname) as actor FROM actormovie WHERE title = "12 Monkeys" ORDER BY lname; +---------------------+ | actor | +---------------------+ | Brad Pitt | | Christopher Plummer | | Madeleine Stowe | | Bruce Willis | +---------------------+ 4 rows in set (0.01 sec)
I know that the problem is some where in this statement...
$sql = "SELECT concat_ws(' ', fname, lname)as actor FROM actormovie WHERE title = '$title' ORDER by lname";
$result = mysql_query($sql);
$actor = ""; while ($myrow = mysql_fetch_array($result)) { $actor = $myrow[actor]; $actor .= "<A HREF=''>" . $actor . "</A><BR>\n"; }
Only thing is I am brain dead and can't see it...
Thanks for the help...
Chuck
On 6/15/02 12:10 AM, "Tyler Longren" <tyler
captainjack.com> wrote:
> you need to put your $myrow in a while loop:
>
> while ($myrow = mysql_fetch_array($result)) {
>
> $title = $myrow[title];
> $videoid = $myrow[videoid];
> $catergory = $myrow[catergory];
> $appraisal = $myrow[appraisal];
>
> // blah blah blah everything else
> }
>
> Tyler Longren
> Captain Jack Communications
> www.captainjack.com
> tyler
captainjack.com
>
> ----- Original Message -----
> From: "Chuck Payne" <cepayne
magidesign.com>
> To: "PHP General" <php-general
lists.php.net>
> Sent: Friday, June 14, 2002 11:03 PM
> Subject: [PHP] Problem with MySQL
>
>
> Hi,
>
> I am working on a movie database I have two database that I am calling from
> but the problem I am having when I ask it to go and fetch all the movies
> with the same title, it stops and only shows one.
>
> Here is a basic layout...
>
> if($videoid) {
>
> $result = mysql_query("SELECT * FROM library WHERE videoid=$videoid",$db);
>
> $myrow = mysql_fetch_array($result);
>
> // The Myrows
>
> $title = $myrow[title];
> $videoid = $myrow[videoid];
> $catergory = $myrow[catergory];
> $appraisal = $myrow[appraisal];
>
> // Some where here it's not working.....
>
> $sql = "SELECT concat_ws(' ', fname, lname)as actor FROM actormovie WHERE
> title = '$title' ORDER by lname";
> $result = mysql_query($sql);
> print $sql;
>
> $actor = "";
> while ($myrow = mysql_fetch_array($result)) {
> $actor = $myrow[actor];
> $actor .= "<A HREF=''>" . $actor . "</A><BR>\n";
>
> }
>
> What am I doing wrong? It only show one record and it show more.
>
> Chuck Payne
>
>
>
attached mail follows:
I'm trying to make sure the referer is right on certain pages. I know the variable and everything, but it gets annoying to have to check wth www., without www., with urlencode(), and with rawurlencode(). If there an easier way?
attached mail follows:
This depends on what you mean by "right," of course, but remember that the referer (sic) is just a string. You can use any string manupulation functions to help you test your string, such as searching for substrings, matching patterns with regular expressions, etc.
If you need more specific advice, you'll need to give some examples.
Chris
Leif K-Brooks wrote:
> I'm trying to make sure the referer is right on certain pages. I know > the variable and everything, but it gets annoying to have to check wth > www., without www., with urlencode(), and with rawurlencode(). If > there an easier way? > >
attached mail follows:
Hello Dan, Please try this.Let me know if you have any problem.
<HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080"> <script language="JavaScript"> function setChecked() { document.forms[0].r1value.value='on'; } function checkr1() { if(document.forms[0].r1value.value=='on') { alert("One of your radio button is selected"); return false; } else { alert("Please select one of the radio button"); return false; }
} </script> <form onsubmit=checkr1()> <input type=radio name=r1 onclick=setChecked()> <input type=radio name=r1 onclick=setChecked()> <input type=radio name=r1 onclick=setChecked()> <input type=hidden name=r1value value=off> <input type=submit> </form> </BODY> </HTML>
regards, SenthilVellan.P
----- Original Message -----
From: "Dan McCullough" <McWC
rocketmail.com>
To: "PHP General List" <php-general
lists.php.net>
Sent: Friday, June 14, 2002 7:49 PM
Subject: [PHP] Quick question
> I have a form, and if someone doesnt fill in a field it returns and asks them to filling in the > missing field. I have made it so that the person doesnt lose everything, currently they will lose > radio button information or checkbox information. Can someone tell me how to best keep it so the > checkboxes stay checked or radio buttons stay selected. > > thanks, > > dan > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
Hello Rosen, You can try with visudo command in linux. For example if you want to give permission to user1 then give shutdown permission to that user using visudo command. you have to edit something like username ALL=(ALL) ALL Here the above user is assigned with all rights.When the above said user tries any commands then that command should starts with sudo.for example prompt # sudo shutdown.
Hope this will help you.Let me know if you have any problem.
regards, SenthilVelavan.P, KovaiTeam Softwares.
Thanks, but the idea is another user only to start and shutdown the server.
Any ideas ?
Thanks, Rosen
Bruce Karstedt <bkarstedt
prodigy.net> wrote in message
news:00ea01c21339$e7856d60$4773d73f
c3...
> This is a bad idea from a security standpoint. If your server is local,
> login as root and type shutdown. If the system is remote telnet to the
box,
> login, su to root and type reboot. If you use shutdown remotely, there is
no
> way to restart the server.
>
> Bruce Karstedt
> President
> Technology Consulting Associates, Ltd.
> Tel: 847-735-9488
> Fax: 847-735-9474
>
>
> -----Original Message-----
> From: Lazor, Ed [mailto:ELazor
providence.org]
> Sent: Thursday, June 13, 2002 6:29 PM
> To: 'Rosen'; php-general
lists.php.net
> Subject: RE: [PHP] Shut down server
>
> < clip >
>
> I am not a security expert. Check with others to get their opinion on
> whether this is the best approach.
>
> > -----Original Message-----
> > The server is Linux Red Hat 7.2
> > > > Can someone tell me how I could make shut down the server ?
> > > > Is it possible ?
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I have a site with logins. I am planning to recode logins soon (right now the username and password are stored in cookies with no encoding). In your opinion, which of these is a better idea: 1. Storing in two cookies with md5 encoding for the password 2. Use sessions 3. Store logins in a database, and put an id from there into a cookie
attached mail follows:
Hello Leif, My opinion is 1.First do md5 encoding for passwords. 2.Store the username and encoded passwords in database as well as in two cookies. Note : But storing the passwords in a cookie is a security issue.
regards, SenthilVelavan.P, KovaiTeam Softwares.
----- Original Message -----
From: "Leif K-Brooks" <eurleif
buyer-brokerage.com>
To: <php-general
lists.php.net>
Sent: Saturday, June 15, 2002 10:39 AM
Subject: [PHP] Best way to store login data?
> I have a site with logins. I am planning to recode logins soon (right > now the username and password are stored in cookies with no encoding). > In your opinion, which of these is a better idea: > 1. Storing in two cookies with md5 encoding for the password > 2. Use sessions > 3. Store logins in a database, and put an id from there into a cookie > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
Hi
I would suggest you use a DB for the logins and use the id
Avoid using cookies use sessions that way u have nothing on the client end
Pradeep
----- Original Message -----
From: "Leif K-Brooks" <eurleif
buyer-brokerage.com>
To: <php-general
lists.php.net>
Sent: Saturday, June 15, 2002 10:39 AM
Subject: [PHP] Best way to store login data?
> I have a site with logins. I am planning to recode logins soon (right > now the username and password are stored in cookies with no encoding). > In your opinion, which of these is a better idea: > 1. Storing in two cookies with md5 encoding for the password > 2. Use sessions > 3. Store logins in a database, and put an id from there into a cookie > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]