Re: [PHP] mail() from addess problems

2004-09-07 Thread Josh Close
Thanks.

-Josh


On Tue, 07 Sep 2004 16:55:24 -0500, Greg Donald <[EMAIL PROTECTED]> wrote:
> 
> 
> On Tue, 2004-09-07 at 16:52, Josh Close wrote:
> > When I'm using mail() to send an email, the user is always
> >
> > From: "Apache" <[EMAIL PROTECTED]>
> >
> > How would I get this to change? I didn't see anything in php.ini or
> > httpd.conf. I've found it's not possible to do a header rewrite with
> > postfix either.
> 
> Add a "From:" header in the optional last field of your mail() call.
> 
> --
> Greg Donald
> 
>

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



[PHP] mail() from addess problems

2004-09-07 Thread Josh Close
When I'm using mail() to send an email, the user is always

From: "Apache" <[EMAIL PROTECTED]>

How would I get this to change? I didn't see anything in php.ini or
httpd.conf. I've found it's not possible to do a header rewrite with
postfix either.

-Josh

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



Re: [PHP] xml tags interfere with php tags

2004-09-01 Thread Josh Close
I'll do something similar to this. I don't want to have to turn short
tags off :P

-Josh

On Wed, 1 Sep 2004 12:21:29 -0700, Michal Migurski <[EMAIL PROTECTED]> wrote:
> 
> 
> > How do I get an xml tag to work with a php script?
> >
> > 
> >
> > php is trying to parse that.
> 
> ' ?>
> 
> ugly, huh?
> 
> I'm not sure if there is a better way, but I use the above to prevent
> erroneous PHP parsing of xml declarations regardless of short_open_tags
> setting, and to keep my text editor's syntax highlighting from being
> fooled.
> 
> 
> michal migurski- contact info and pgp key:
> sf/cahttp://mike.teczno.com/contact.html
> 
>

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



Re: [PHP] xml tags interfere with php tags

2004-09-01 Thread Josh Close
I was hoping there was another way around it. if not, I could do
that I guess.

-Josh



On Wed, 1 Sep 2004 14:06:18 -0500, Brent Clements
<[EMAIL PROTECTED]> wrote:
> The simplest answer is to either turn off short tags or change the short tag
> which php uses.
> 
> You can do either by editing php.ini
> 
> -Brent
> 
> 
> 
> ----- Original Message -
> From: "Josh Close" <[EMAIL PROTECTED]>
> To: "PHP" <[EMAIL PROTECTED]>
> Sent: Wednesday, September 01, 2004 1:08 PM
> Subject: [PHP] xml tags interfere with php tags
> 
> > How do I get an xml tag to work with a php script?
> >
> > 
> >
> > php is trying to parse that.
> >
> > -Josh
> >
> > --
> > 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] xml tags interfere with php tags

2004-09-01 Thread Josh Close
How do I get an xml tag to work with a php script?



php is trying to parse that.

-Josh

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



[PHP] Re: [tcphp] alternating highlights

2004-08-03 Thread Josh Close
This is very simple actually


  

  
  
  

  
  

That was very quick, but I hope it helps.

-Josh

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



Re: [PHP] javascript type cast OT

2004-08-03 Thread Josh Close
On Tue, 3 Aug 2004 15:30:20 -0400, John Nichel <[EMAIL PROTECTED]> wrote:
> On Tuesday 03 August 2004 14:54, Alex Hogan offered up the following tid-bit
> of information :
> > However there is a difference between list courtesy and blatant
> > aggression.  I understand that there are going to be more newbie's to
> > programming here than on most language lists.  Does this mean that they
> > don't get the same consideration that those get who it is apparent that
> > they have been hacking code for a while?
> >
> > This is a general list.
> 
> And when 'newbies' sign up to this list, they get a copy of the 'Newbie
> Guide', with a wealth of information on how to ask smart questions, how to
> find answers to common problems, etc.  If they are not going to use that
> advice, and just blast the list with an OT question, or one that's been
> asked a zillion times, why should we take the time out to help those who
> are not going to help themselves?

Well, you shouldn't. But you did take the time to flame on and on and
on and on (not you specifically).

> 
> 
> --
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> [EMAIL PROTECTED]
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



Re: [PHP] javascript type cast

2004-08-03 Thread Josh Close
On Tue, 03 Aug 2004 14:15:32 -0500, Alex Hogan
<[EMAIL PROTECTED]> wrote:
> 
> > All I have to say is, sorry I asked.
> 
> OK.., now you're really making me want to take a poke at you.
> 
> You posted off topic, knew it was off topic, you got spanked for it.
> 
> Don't make things worse by whining.

Not trying to whine for you. I was just surprised that people would
take several hours out of their day to complain about this, instead of
just saying it's OT and to not post OT.

I won't happen again, so you can stop whining.

-Josh

> 
> alex hogan
> 
> 
> *
> The contents of this e-mail and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom it is addressed. The
> views stated herein do not necessarily represent the view of the company. If you are
> not the intended recipient of this e-mail you may not copy, forward, disclose, or
> otherwise use it or any part of it in any form whatsoever. If you have received this
> e-mail in error please e-mail the sender.
> *
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



Re: [PHP] javascript type cast

2004-08-03 Thread Josh Close
Ok. I write most my web apps in php. I rarely will use js for
anything, but I needed it on this rare occasion. I didn't want to have
to post to the same php page to get the results to change, so I though
a little js would do the job.

Being a php list, I thought that a few others would have run into the
same issue while doing this. Would it have made it better if I talked
a little about the php work that was being done on the page also?

All this is doing is making me like php less and less. And what about
the newer users to the list? This also makes me not want to answer
other peoples questions either. I've also noticed that a lot of
answers to peoples questions get flamed on this list also. It's like
you think you're better than them and came take them down for whatever
reason.

Yes, the question was OT and I knew it. Yes, I found the answer via
google 5-10 mins later. I had already searched a while before for it.
And I'm not going to go and get on a js list for one question I may
have once every 3 months. I figured someone here has ran into the same
situation before. Especially since type casting is a common thing
among most languages (even php).

All I have to say is, sorry I asked. I really wasn't worth it.

-Josh



On Tue, 03 Aug 2004 13:09:19 -0500, Alex Hogan
<[EMAIL PROTECTED]> wrote:
> I have been on a number of lists over the years, as what ever technology
> I'm using at the time has demanded.
> 
> I would have to say that this list is one of the most curt and
> condescending lists I've ever been on.  Perhaps it's because the long
> time users don't realize they're being so, (unless of course you read
> the FAQ about asking smart questions which they are so happy to throw at
> you), or maybe it's because they are so much better at this particular
> technology that they don't have to even be civil.
> 
> What ever the reason it leaves a bad impression for anyone embracing php
> and wanting to gather additional information that can sometimes only be
> obtained from an individual with experience and not a book. (imagine
> that)
> 
> Now I fully expect that some one will come back and say something like,
> "Well you don't have to stay on this list" or something equally as
> moronic.  Quite frankly I don't care.  Flame away...
> 
> Over the last seven months that I have been on this list I have seen the
> same questions addressed several times.  Sometimes worded different, but
> nothing really new.  Maybe that is what creates such animosity to the
> newer members of this list from the older ones.  Then again maybe it's
> nothing more than the age old trait of chastising someone else to give
> themselves a feeling of importance.
> 
> My point is a little temperance goes a lot farther and shows a lot more
> than self importance.
> 
> BTW.., Yes I'm top posting so go ahead and flame away for that too.
> 
> alex hogan
> 
> 
> > -Original Message-
> > From: Vail, Warren [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, August 03, 2004 12:38 PM
> > To: 'Jason Wong'; [EMAIL PROTECTED]
> > Subject: RE: [PHP] javascript type cast
> >
> > I, for one, am not convinced that this all that far off topic.
> >
> > Since the accepted method to generate browser interaction
> > with server side PHP, is to use Javascript, it doesn't seem
> > any more off-topic than dealing with database questions about MySQL.
> >
> > I am probably like most PHP developers, with a very weak
> > knowledge of Javascript, and while that makes the question
> > "feel" like being off-topic, I'm not sure it should be.  I
> > wish I knew of another list I could recommend as a resource
> > for Javascript, but I don't, and that is probably a result of
> > knowing so little.
> >
> > Only abuse occurring here, IMHO is the content police's
> > treatment of Josh.
> > 
> > Warren Vail
> *
> The contents of this e-mail and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom it is addressed. The
> views stated herein do not necessarily represent the view of the company. If you are
> not the intended recipient of this e-mail you may not copy, forward, disclose, or
> otherwise use it or any part of it in any form whatsoever. If you have received this
> e-mail in error please e-mail the sender.
> *
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



Re: [PHP] javascript type cast

2004-08-03 Thread Josh Close
Wow, no need to be an ass. I just wanted a little help and this list
is usually pretty friendly and willing to help. but I guess not.



On Wed, 4 Aug 2004 01:01:47 +0800, Jason Wong <[EMAIL PROTECTED]> wrote:
> On Wednesday 04 August 2004 00:38, Josh Close wrote:
> > Yes, but most php users do some web programming and might have come
> > across this before.
> 
> Most people on this list eat as well, but that doesn't make this list an
> appropriate forum for discussing food.
> 
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> Time will end all my troubles, but I don't always approve of Time's methods.
> */
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



Re: [PHP] javascript type cast

2004-08-03 Thread Josh Close
Yes, but most php users do some web programming and might have come
across this before.

-Josh

On Tue, 3 Aug 2004 12:34:40 -0400, John Nichel <[EMAIL PROTECTED]> wrote:
> On Tuesday 03 August 2004 12:28, Josh Close wrote:
> > P.S. I'm doing this in a php page... that's why I'm asking here.
> 
> But this doesn't make it a php problem.
> 
> --
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> [EMAIL PROTECTED]
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



[PHP] Re: javascript type cast

2004-08-03 Thread Josh Close
...I found you can do var*1 to get it to type cast.

Thanks.

-Josh



On Tue, 3 Aug 2004 11:28:16 -0500, Josh Close <[EMAIL PROTECTED]> wrote:
> Is there any way to do a typecast in javascript? I know you can in
> 2.0, but that won't work here.
> 
> I have an input field and I need to add a number to it's value.
> 
> var + 123 == 'var123'
> 
> You would think that it would automatically typecast var to an int
> since it's being added to one, but it just concatenates it instead.
> 
> How can I add (or sum) the two values?
> 
> P.S. I'm doing this in a php page... that's why I'm asking here.
> 
> -Josh
>

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



[PHP] javascript type cast

2004-08-03 Thread Josh Close
Is there any way to do a typecast in javascript? I know you can in
2.0, but that won't work here.

I have an input field and I need to add a number to it's value. 

var + 123 == 'var123'

You would think that it would automatically typecast var to an int
since it's being added to one, but it just concatenates it instead.

How can I add (or sum) the two values?

P.S. I'm doing this in a php page... that's why I'm asking here.

-Josh

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



[PHP] multiple checkboxes

2004-08-02 Thread Josh Close
Very simple question.

When making multiple checkboxes, you put the name the same for a few
to group them together






So they are grouped but then submitting them I only get the last
value check.



How would I get all the boxes check when "grouping" them by using the
same name for all checkboxes in the name field?

-Josh

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



Re: [PHP] freeTDS

2004-07-27 Thread Josh Close
Well, they're going to have to install php with mssql support also

./configure --with-mssql --with-freetds

there are examples in the freetds.conf file of what you need to do.
Basically just telling it where to connect.

-Josh


On Tue, 27 Jul 2004 16:49:37 -0400, John Nichel <[EMAIL PROTECTED]> wrote:
> 
> 
> Edward Peloke wrote:
> > no, I don't see any mssql info...and yes, they said they did recompile with
> > freetds.  If there anything I have to change in the freetds conf file or in
> > php.ini?
> 
> 
> Then either :
> 
> A) It hasn't been compiled with FreeTDS or,
> B) The web server hasn't been restarted.
> 
> --
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> [EMAIL PROTECTED]
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



Re: [PHP] Re: how to use session?

2004-07-21 Thread Josh Close
you have to have the session_start before ANY output, including
, so do this






On Thu, 22 Jul 2004 00:56:44 +0800, Sheawh
<[EMAIL PROTECTED]> wrote:
> even   Example: page1.php
> I got the same result,
> and what if i set session auto start ??
> is that means it starts a new session when accessing a HTML?
> 
> 
>  
>  // page1.php
> 
> session_start();
> 
> echo 'Welcome to page #1';
> 
> $_SESSION['favcolor'] = 'green';
> $_SESSION['animal']  = 'cat';
> $_SESSION['time']= time();
> 
> // Works if session cookie was accepted
> echo 'page 2';
> 
> echo "SID : " . session_id();
> // Or maybe pass along the session id, if needed
> echo 'page 2';
> ?>
>  
> 
> "Torsten Roehr" <[EMAIL PROTECTED]> ¦b¶l¥ó
> news:[EMAIL PROTECTED] ¤¤¼¶¼g...
> 
> 
> > "Sheawh" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > I have started a session using  session_start();
> > > but it returns :
> > >
> > > Warning: Cannot send session cookie - headers already sent by (output
> > > started at c:\inetpub\wwwroot\diary\index.php:7) in
> > > c:\inetpub\wwwroot\diary\reg_session.php on line 11
> > >
> > > Warning: Cannot send session cache limiter - headers already sent
> (output
> > > started at c:\inetpub\wwwroot\diary\index.php:7) in
> > > c:\inetpub\wwwroot\diary\reg_session.php on line 11
> > >
> > >
> > > If I don't want to use session cookie , how to set it?
> > > thanks.
> >
> > No output is allowed before starting the session. Look at the user
> comments
> > in the manual and search the mailing list archives.
> >
> > Regards, Torsten Roehr
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
-Josh

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



Re: [PHP] Re: Book Required

2004-07-17 Thread Josh Close
Here's a php5 book, and there's a few others.

http://www.oreilly.com/catalog/learnphp5/index.html


On Sat, 17 Jul 2004 19:28:37 +0100, Lester Caine <[EMAIL PROTECTED]> wrote:
> Tularis wrote:
> 
> > Programming PHP by O`Reilly :)
> 
> Write-up says it STILL uses MySQL as it's database material ;(
> 
> Since I'm pushing PHP5 into all new sites, I'll wait for a PHP5 book :)
> 
> The Firebird Bible ( which has taken two years to write ) is being
> printed at the moment and should be out by next month - not sure how
> much of the PHP chapters actually made it in the final manuscript.
> 
> 
> 
> --
> Lester Caine
> -
> L.S.Caine Electronic Services
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
-Josh

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



Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Josh Close
That sounds about right. It pretty much described the behavior between
the two versions.

Thanks for the info.



On Tue, 13 Jul 2004 18:44:06 -0500, Michael Sims
<[EMAIL PROTECTED]> wrote:
> Curt Zirzow wrote:
> > * Thus wrote Josh Close:
> >> if($var)
> >>
> >> used to work for
> >>
> >> if($var != 0) or if($var != "0")
> >>
> >> but that doesn't seem to work since I upgrade. So I'm just going to
> >> do
> >>
> >> if((int)$var)
> >
> > I still think this is unnecessary
> >
> > if ("0") { echo '"0"'; }
> > if ("")  { echo '""'; }
> > if (0)   { echo 0; }
> >
> > As I pointed out earlier, are still all the same; this behaviour
> > hasn't changed.
> 
> I agree.  As I pointed out in my earlier message in this thread, based on
> the description that the OP gave (and the fact that he's using
> mssql_query()), I think he's getting bitten by the problems introduced by
> the fix for bug #25777:
> 
> http://bugs.php.net/bug.php?id=25777
> 
> Basically PHP used to trim trailing spaces from data being returned via the
> mssql and sybase extensions, and the fix for the above bug (in both
> extensions) was to stop this trimming.  In my case this introduced a new
> problem, because bit fields that contain simply '0' in the database come
> back with trailing spaces.  While this:
> 
> $ php -r 'if ("0") echo "Yes\n";'
> 
> produces no output (because "0" == false) this does:
> 
> $ php -r 'if ("0 ") echo "Yes\n";'
> 
> because "0 " != false.
> 
> I have a hunch that if the OP does a print_r() on their "$var", it will be a
> string that starts with zero and ends with one or more spaces.  Casting $var
> to int will restore the original behavior, but this is only because (int) "0
> " === 0 and 0 == false.  So basically the cast to int does fix the OP's
> problem but not for the reasons he believes.
> 
> Of course, that's a complete guess based off incomplete information.  I
> could be way off. :)
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
-Josh

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



Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Josh Close
That sounds about right. It pretty much described the behavior between
the two versions.

Thanks for the info.


On Tue, 13 Jul 2004 18:44:06 -0500, Michael Sims
<[EMAIL PROTECTED]> wrote:
> Curt Zirzow wrote:
> > * Thus wrote Josh Close:
> >> if($var)
> >>
> >> used to work for
> >>
> >> if($var != 0) or if($var != "0")
> >>
> >> but that doesn't seem to work since I upgrade. So I'm just going to
> >> do
> >>
> >> if((int)$var)
> >
> > I still think this is unnecessary
> >
> > if ("0") { echo '"0"'; }
> > if ("")  { echo '""'; }
> > if (0)   { echo 0; }
> >
> > As I pointed out earlier, are still all the same; this behaviour
> > hasn't changed.
> 
> I agree.  As I pointed out in my earlier message in this thread, based on
> the description that the OP gave (and the fact that he's using
> mssql_query()), I think he's getting bitten by the problems introduced by
> the fix for bug #25777:
> 
> http://bugs.php.net/bug.php?id=25777
> 
> Basically PHP used to trim trailing spaces from data being returned via the
> mssql and sybase extensions, and the fix for the above bug (in both
> extensions) was to stop this trimming.  In my case this introduced a new
> problem, because bit fields that contain simply '0' in the database come
> back with trailing spaces.  While this:
> 
> $ php -r 'if ("0") echo "Yes\n";'
> 
> produces no output (because "0" == false) this does:
> 
> $ php -r 'if ("0 ") echo "Yes\n";'
> 
> because "0 " != false.
> 
> I have a hunch that if the OP does a print_r() on their "$var", it will be a
> string that starts with zero and ends with one or more spaces.  Casting $var
> to int will restore the original behavior, but this is only because (int) "0
> " === 0 and 0 == false.  So basically the cast to int does fix the OP's
> problem but not for the reasons he believes.
> 
> Of course, that's a complete guess based off incomplete information.  I
> could be way off. :)
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
-Josh

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



Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Josh Close
I'm positive that it will always be set, 'cause I set it. It's just
going the comparison.

if($var)

used to work for 

if($var != 0) or if($var != "0")

but that doesn't seem to work since I upgrade. So I'm just going to do

if((int)$var)

from now on, 'cause that should always work. I'll typecast everything
that being compared to and int to make sure.



On Tue, 13 Jul 2004 14:01:47 -0700 (GMT-07:00),
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> http://marc.theaimsgroup.com/?l=php-general&m=108646344905178&w=2
> 
> 
> 
> 
> -Original Message-
> From: Matthew Sims <[EMAIL PROTECTED]>
> Sent: Jul 13, 2004 12:15 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] php 4.3.7/5.0
> 
> > I've noticed that in the last release of php 4.3.7 (or 5.0.0), that
> > when checking the value of a variable has changed.
> >
> > ex:
> >
> > if($var){ /* do something */ }
> >
> > doesn't work anymore. I've had to change code to
> >
> > if($var > 0)
> >
> > but the problem is, what if $var was converted to $var = "0" instead
> > of $var = 0 somewhere throughout the code that I didn't know about?
> >
> > Is there a way to be sure what's going on here?
> >
> > --
> > -Josh
> 
> What about the isset function? Or any of the following:
> 
> http://us3.php.net/manual/en/ref.var.php
> 
> --Matthew Sims
> --
> 
> --
> 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
> 
> 


-- 
-Josh

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



Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Josh Close
I think I'll just have to typecast everything, that should always work then.



On Tue, 13 Jul 2004 15:47:40 -0400, Adam Bregenzer <[EMAIL PROTECTED]> wrote:
> On Tue, 2004-07-13 at 15:35, Josh Close wrote:
> > The problem is, if 0 gets changed to "0" somewhere throughout. That's
> > why I've always used if($var) because it's usually not cared what the
> > type is, but it seems to now.
> 
> You can typecast values as well, this may be a good way to achieve what
> you are looking for:
> if ((int)$var != 0) {
>   // Do Something
> }
> 
> Also, if you are going to use this variable as an integer later you can
> do the following to explicitly convert $var into an integer:
> $var = (int)$var;
> 
> That should convert "0" into the integer value 0.  Also, note the
> following:
> 
> var_dump(0 == "0"); //bool(true)
> var_dump(0 === "0");//bool(false)
> 
> --
> Adam Bregenzer
> [EMAIL PROTECTED]
> http://adam.bregenzer.net/
> 
> 


-- 
-Josh

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



Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Josh Close
Well, the actual code is hard to tell. It's grabbed from a db so it
should be an int. But it's also run through some functions. That's why
I'd like a to tell what's going on better.

The variable is always set. Basically

$result = mssql_query($sql);
$row = mssql_fetch_array($result);
$var = $row[0];

So it should be an int. And if it's copied into a function it
shouldn't be changed.

But doing

if($var)

doesn't seem to work after I upgraded versions. Which is making me
think that they changed how that works.

And using is_string() or is_int() is pointless 'cause it doesn't
matter. I just want to know if the value != 0.

The problem is, if 0 gets changed to "0" somewhere throughout. That's
why I've always used if($var) because it's usually not cared what the
type is, but it seems to now.



On Tue, 13 Jul 2004 19:39:09 +, Curt Zirzow
<[EMAIL PROTECTED]> wrote:
> * Thus wrote Josh Close:
> > I've noticed that in the last release of php 4.3.7 (or 5.0.0), that
> > when checking the value of a variable has changed.
> >
> > ex:
> >
> > if($var){ /* do something */ }
>  
> These values will all *not* do something:
> 
>   var_dump((bool) 0);
>   var_dump((bool) array());
>   var_dump((bool) "");
>   var_dump((bool) "0");
>   var_dump((bool) null);
>   var_dump((bool) false);
> 
> 
> > doesn't work anymore. I've had to change code to
> >
> > if($var > 0)
> 
> what is the actual value of $var?
> 
> Curt
> --
> First, let me assure you that this is not one of those shady pyramid schemes
> you've been hearing about.  No, sir.  Our model is the trapezoid!
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
-Josh

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



[PHP] php 4.3.7/5.0

2004-07-13 Thread Josh Close
I've noticed that in the last release of php 4.3.7 (or 5.0.0), that
when checking the value of a variable has changed.

ex:

if($var){ /* do something */ }

doesn't work anymore. I've had to change code to

if($var > 0)

but the problem is, what if $var was converted to $var = "0" instead
of $var = 0 somewhere throughout the code that I didn't know about?

Is there a way to be sure what's going on here?

-- 
-Josh

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



[PHP] warning: function registration failed

2004-07-12 Thread Josh Close
I installed php-5.0.0 and I get these error when doing "php -v"

PHP Warning:  Function registration failed - duplicate name -
mssql_connect in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_pconnect in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_close in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_select_db in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_query in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_free_result in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_get_last_message in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_num_rows in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_num_fields in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_fetch_field in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_fetch_row in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_fetch_array in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_fetch_object in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_data_seek in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_field_seek in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_result in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_min_error_severity in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name -
mssql_min_message_severity in Unknown on line 0
PHP Warning:  mssql:  Unable to register functions, unable to load in
Unknown on line 0

I'm using gentoo linux. I downgraded back to php-4x and I'm still
getting the errors.

What's going on here? How do I fix this?

Is it because gentoo now has both the mssql and freetds flags?


-- 
-Josh

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



Re: [PHP] Malicious SQL

2004-07-07 Thread Josh Close
It may escape a quote, but injections would still be possible in other ways.

It gets passed in as \' but then used normally as ' when it's the the variable.

-Josh

On Wed, 7 Jul 2004 10:31:17 -0700, Brian Dunning <[EMAIL PROTECTED]> wrote:
> I have a question about this. Here is from the documentation:
> 
>   The PHP directive  magic_quotes_gpc is on by default, and it
> essentially runs addslashes() on all GET, POST,  and COOKIE data.
> 
> Why doesn't this automatically prevent injections, since it escapes out
> any single quotes they try to submit?
> 
> - Brian
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
-Josh

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



Re: [PHP] post without

2004-07-07 Thread Josh Close
So basically there is no easy way around this.

What I'm trying to do is have a page return to a page that was a
couple pages back with the same get info. On the second page I can do

$return_url = $_SERVER['HTTP_REFERER'];

to get the previous url. But then I need to pass it on to the next
page, then that page will return to the $return_url.

I think passing via $_SESSION vars or cookies would be easier then
doing actual socket posts.

If there is an easier way than session or cookies to do this, I'd like to know.

-Josh



On Wed, 07 Jul 2004 09:55:56 -0400, Jason Paschal <[EMAIL PROTECTED]> wrote:
> you are trying to post form data programmatically.  i posted this code on my
> site for reference:
> 
> http://www.dailymedication.com/modules.php?name=News&file=article&sid=19
> 
> ---
> http://www.dailymedication.com  -  Everything you didn't know you needed
> until you went there and said to yourself, "What did I do before I visited
> DailyMedication.com?" and another part of you answered, "It does not matter.
>   You are here now."
> 
> >From: Josh Close <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: [PHP] post without 
> >Date: Wed, 7 Jul 2004 08:49:01 -0500
> >
> >How can I post data without having it submitted from within a form?
> >
> >With get I can just add it to the url. Is there a php function for this?
> >
> >--
> >-Josh
> 
> 
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
> 
> _
> FREE pop-up blocking with the new MSN Toolbar – get it now!
> http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
> 
>

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



[PHP] post without

2004-07-07 Thread Josh Close
How can I post data without having it submitted from within a form?

With get I can just add it to the url. Is there a php function for this?

-- 
-Josh

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



Re: [PHP] fopen newbie question

2004-07-06 Thread Josh Close
Can you post your code so we can see what might be going on?

-Josh


On Mon, 5 Jul 2004 13:06:58 -0400, Joe Carey <[EMAIL PROTECTED]> wrote:
> I'm trying to read a text file from one server from another.  When I read
> from server A to B it works fine and I get the text output that I'm looking
> for.  But when I read from B to A I get "Failed to open stream: FTP server
> reports 550 Can't check for file existence"  I'm sure that its something how
> the server is configured but I can't figure out what I need to ask my host
> to change.  Any ideas please?
> 
> Joe Carey
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.712 / Virus Database: 468 - Release Date: 6/29/2004
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



Re: [PHP] regular expression

2004-07-02 Thread Josh Close
First of all, you might want to put more than one % probably like %%%

Reason is, asp users <% %> like php uses .

Just a precaution.

You almost had the regex right.

/%[a-z]+%/i

Thans means, starts with a %, can match a-z, at least once (the +
part) but as many times (greedy), then another %, and the i means
case-insensitive. If you don't have that you'd have to do [a-zA-Z]
instead. Also, will there be anything else in there besides just alpha
chars?

-Josh

On Fri, 2 Jul 2004 13:56:29 -0500, George Lantz
<[EMAIL PROTECTED]> wrote:
> 
> Could someone help me with a regular expression? I am not very good at
> them. I want to find the following pattern inside a file:
> 
>  [%string%]
> 
> Then extract the string portion to store in array.  I would next like to
> replace those patterns with html code. That's right you guessed it a
> template engine type program.
> 
> I thought it was"/\[\%[a-z]\%\]" but I guess I am wrong. Then what
> function do I use to extract.
> 
> Thank you,
> George
>

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



[PHP] Re: regex problem

2004-07-01 Thread Josh Close
Thanks, that's exactly what I was looking for.

-Josh

On Thu, 01 Jul 2004 15:17:41 -0700, Lars Torben Wilson <[EMAIL PROTECTED]> wrote:
> 
> Josh Close wrote:
> 
> > I'm trying to get a simple regex to work. Here is the test script I have.
> >
> > #!/usr/bin/php -q
> >  >
> > $string = "hello\nworld\n";
> > $string = preg_replace("/[^\r]\n/i","\r\n",$string);
> 
> First, the short version. You can fix this by using backreferences:
> 
>   $string = preg_replace("/([^\r])\n/i", "\\1\r\n", $string);
> 
> Now, the reason:
> 
> preg_replace() replaces everything which matched, so both the \n and
> the character before it will be replaced (as they both had to match
> to make the pattern match).
> 
> Luckily, preg_replace() stores a list of matches, which you can use
> either later in the same pattern or in the replace string. This is
> called a 'backreference'. You can tell preg_replace() which part(s) of
> the pattern you want to store in this fashion by enclosing those parts
> in parentheses.
> 
> In your case, you want to store the character before the \n which matched,
> so you would enclose it in parentheses like so: "/([^\r])\n/i". Thereafter
> you can refer to that portion of the pattern match with the sequence \1.
> If you add another set of parens, you would refer to it with \2...and so
> on. You can even nest pattern matches like this, in which case they are
> counted by the opening paren. So the replacement string would then become
> "\\1\r\n". (You need the extra \ in front of \1 to prevent PHP's string
> interpolation parsing the \1 before it gets passed to preg_replace()).
> 
> A lot more information is available from the manual page on preg_replace():
> 
>http://www.php.net/preg_replace
> 
> There is also an extensive pages on pattern syntax:
> 
>http://www.php.net/manual/en/pcre.pattern.syntax.php
> 
> Hope this helps,
> 
> Torben
> 
> 
> 
> > $string = addcslashes($string, "\r\n");
> >
> > print $string;
> >
> > ?>
> >
> > This outputs
> >
> > hell\r\nworl\r\n
> >
> > so it's removing the char before the \n also.
> >
> > I just want it to replace a lone \n with \r\n
> >
> > -Josh
> 
>

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



Re: [PHP] regex problem

2004-07-01 Thread Josh Close
Why is it taking the char before the [^\r] also?

-Josh

On Thu, 1 Jul 2004 15:17:04 -0700, Justin Patrin <[EMAIL PROTECTED]> wrote:
> 
> On Thu, 1 Jul 2004 16:41:50 -0500, Josh Close <[EMAIL PROTECTED]> wrote:
> >
> > I'm trying to get a simple regex to work. Here is the test script I have.
> >
> > #!/usr/bin/php -q
> >  >
> > $string = "hello\nworld\n";
> > $string = preg_replace("/[^\r]\n/i","\r\n",$string);
> 
> $string = preg_replace("/([^\r])\n/i","\\1\r\n",$string);
> 
> You could also use forward look-aheads, but I don't remember how to do
> that right now.
> 
> > $string = addcslashes($string, "\r\n");
> >
> > print $string;
> >
> > ?>
> >
> > This outputs
> >
> > hell\r\nworl\r\n
> >
> > so it's removing the char before the \n also.
> >
> > I just want it to replace a lone \n with \r\n
> >
> > -Josh
> > 
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > !DSPAM:40e48327189276451316304!
> >
> >
> 
> 
> --
> DB_DataObject_FormBuilder - The database at your fingertips
> http://pear.php.net/package/DB_DataObject_FormBuilder
> 
> paperCrane --Justin Patrin--
>

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



[PHP] regex problem

2004-07-01 Thread Josh Close
I'm trying to get a simple regex to work. Here is the test script I have.

#!/usr/bin/php -q


This outputs

hell\r\nworl\r\n

so it's removing the char before the \n also.

I just want it to replace a lone \n with \r\n

-Josh

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



RE: [PHP] socket_set_block undefined

2004-06-25 Thread Josh Close
I want to get rid of the version on php in /urs/local, how do I do this?

There is no src to do a "make uninstall" from. I deleted some
file/directories, but when I do "php -v" it's still looking for the version
in /usr/local/bin instead of /usr/bin.

-Josh



> -Original Message-
> From: Philip Olson [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 25, 2004 3:21 PM
> To: Josh Close
> Subject: RE: [PHP] socket_set_block undefined
>
>
>
> That sounds about right :)  After sending my first
> reply I realized it was the most likely reason, I
> can see why you went down the "name could have
> changed" track... I knew it wasn't the case as in
> PHP names were only changed to give proper names
> like socket_set_block as opposed to setsocketblock
> or whatever.  Good luck :)
>
> Regards,
> Philip
>
>
>
>
> On Fri, 25 Jun 2004, Josh Close wrote:
>
> > I'm installing a new version right now. I found there was
> two cli versions,
> > when i typed
> >
> > /usr/bin/php -v
> >
> > i got version 4.1.2 so i'm reinstalling a new version.
> There was actually 3
> > versions of php on this box. how annoying.
> >
> > -Josh
> >
> >
> >
> > > -Original Message-
> > > From: Philip Olson [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, June 25, 2004 2:39 PM
> > > To: Josh Close
> > > Cc: PHP (E-mail)
> > > Subject: RE: [PHP] socket_set_block undefined
> > >
> > >
> > >
> > > Perhaps you have multiple PHP versions on your system?  Like
> > > an old CLI or CGI laying around somewhere?  Maybe try checking
> > > the PHP version in the code as well.  If it's not that then
> > > I have no idea.
> > >
> > > Regards,
> > > Philip
> > >
> > > On Fri, 25 Jun 2004, Josh Close wrote:
> > >
> > > > Well, here's the code i'm using. Let me know if I'm doing
> > > something silly.
> > > >
> > > > if(!socket_set_nonblock($this->socket)){
> > > > if($this->logging){ syslog(LOG_ERR, "Could not set
> > > socket to nonblock."); }
> > > > exit();
> > > > }
> > > >
> > > > //connection part goes here
> > > >
> > > > if(!socket_set_block($this->socket)){
> > > > if($this->logging){ syslog(LOG_ERR, "Could not set
> > > socket to block."); }
> > > > exit();
> > > > }
> > > > if($this->loggging){ syslog(LOG_INFO, "Socket set to block."); }
> > > >
> > > >
> > > >
> > > >  and here's the error
> > > >
> > > > Fatal error: Call to undefined function:  socket_set_block()
> > > >
> > > > -Josh
> > > >
> > > > > -Original Message-
> > > > > From: Philip Olson [mailto:[EMAIL PROTECTED]
> > > > > Sent: Friday, June 25, 2004 2:11 PM
> > > > > To: Josh Close
> > > > > Cc: PHP (E-mail)
> > > > > Subject: Re: [PHP] socket_set_block undefined
> > > > >
> > > > >
> > > > >
> > > > > > I'm trying to use socket_set_block and php.net says (php4
> > > > > >= 4.2, php5).
> > > > > >
> > > > > > I'm using version 4.3.1 but I get this error
> > > > > >
> > > > > > Fatal error: Call to undefined function:
> > > > > socket_set_block() in .
> > > > > >
> > > > > > Any idea why this is? Has the name changed or been
> > > something else?
> > > > > >
> > > > > > socket_set_nonblock() work fine.
> > > > >
> > > > > Strange as the name has not changed and the function
> > > > > requires nothing special (no IF block around it), here's
> > > > > the source:
> > > > >
> > > > >  http://lxr.php.net/source/php-src/ext/sockets/sockets.c#715
> > > > >
> > > > > Since socket_set_nonblock() exists you must have
> > > > > the socket extension available so this is odd.
> > > > > Are you sure this problem exists and it's not
> > > > > something silly?  Seems like an impossible problem
> > > > > assuming your php source wasn't modified :)
> > > > >
> > > > > Regards,
> > > > > Philip
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
>
>

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



RE: [PHP] socket_set_block undefined

2004-06-25 Thread Josh Close
also, i know socket_set_option() used to be socket_setopt(), that's why i
ask

-Josh



> -Original Message-
> From: Philip Olson [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 25, 2004 2:11 PM
> To: Josh Close
> Cc: PHP (E-mail)
> Subject: Re: [PHP] socket_set_block undefined
>
>
>
> > I'm trying to use socket_set_block and php.net says (php4
> >= 4.2, php5).
> >
> > I'm using version 4.3.1 but I get this error
> >
> > Fatal error: Call to undefined function:
> socket_set_block() in .
> >
> > Any idea why this is? Has the name changed or been something else?
> >
> > socket_set_nonblock() work fine.
>
> Strange as the name has not changed and the function
> requires nothing special (no IF block around it), here's
> the source:
>
>  http://lxr.php.net/source/php-src/ext/sockets/sockets.c#715
>
> Since socket_set_nonblock() exists you must have
> the socket extension available so this is odd.
> Are you sure this problem exists and it's not
> something silly?  Seems like an impossible problem
> assuming your php source wasn't modified :)
>
> Regards,
> Philip
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

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



RE: [PHP] socket_set_block undefined

2004-06-25 Thread Josh Close
Well, here's the code i'm using. Let me know if I'm doing something silly.

if(!socket_set_nonblock($this->socket)){
if($this->logging){ syslog(LOG_ERR, "Could not set socket to nonblock."); }
exit();
}

//connection part goes here

if(!socket_set_block($this->socket)){
if($this->logging){ syslog(LOG_ERR, "Could not set socket to block."); }
exit();
}
if($this->loggging){ syslog(LOG_INFO, "Socket set to block."); }



 and here's the error

Fatal error: Call to undefined function:  socket_set_block()

-Josh

> -Original Message-
> From: Philip Olson [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 25, 2004 2:11 PM
> To: Josh Close
> Cc: PHP (E-mail)
> Subject: Re: [PHP] socket_set_block undefined
>
>
>
> > I'm trying to use socket_set_block and php.net says (php4
> >= 4.2, php5).
> >
> > I'm using version 4.3.1 but I get this error
> >
> > Fatal error: Call to undefined function:
> socket_set_block() in .
> >
> > Any idea why this is? Has the name changed or been something else?
> >
> > socket_set_nonblock() work fine.
>
> Strange as the name has not changed and the function
> requires nothing special (no IF block around it), here's
> the source:
>
>  http://lxr.php.net/source/php-src/ext/sockets/sockets.c#715
>
> Since socket_set_nonblock() exists you must have
> the socket extension available so this is odd.
> Are you sure this problem exists and it's not
> something silly?  Seems like an impossible problem
> assuming your php source wasn't modified :)
>
> Regards,
> Philip
>
> --
> 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] socket_set_block undefined

2004-06-25 Thread Josh Close
I'm trying to use socket_set_block and php.net says (php4 >= 4.2, php5).

I'm using version 4.3.1 but I get this error

Fatal error: Call to undefined function:  socket_set_block() in .

Any idea why this is? Has the name changed or been something else?

socket_set_nonblock() work fine.

-Josh

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



RE: [PHP] mail sent but not received?!

2004-06-25 Thread Josh Close
Your message could have bounced or been rejected for some other reason, in
which case you wouldn't have recieved it, but it'll look like it's sent
fine.

-Josh



> -Original Message-
> From: Bing Du [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 25, 2004 11:08 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] mail sent but not received?!
>
>
> Hi,
>
> I've been pulling my hair out over this problem for a while...
>
> 
>  $msg = "Hi, this is a test";
> $to = "[EMAIL PROTECTED]";
> $sbj = "test message from my.edu";
>
> $rev = mail($to,$sbj,$msg);
>
> echo "mail from my.edu result is $rev";
> ?>
> --
>
> Since the result of the mail() returned is 1, the message
> should have been
> delivered fine.  but I did not get anything.  Where can I
> look for more
> clues of what the problem might be, like possible log, or turn on some
> debug level in php?  I've also tried mail($to,$sbj,$msg, "-f
> [EMAIL PROTECTED]"),
> no workie either.
>
> Any help would be greatly appreciated!
>
> Bing
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



RE: [PHP] socket_bind

2004-06-25 Thread Josh Close
Thanks, changing the port worked.

-Josh

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 25, 2004 9:22 AM
> To: [EMAIL PROTECTED]
> Cc: PHP (E-mail)
> Subject: Re: [PHP] socket_bind
> 
> 
> I think all sockets less then 1024 need superuser permission 
> to bind.  And because Apache typically runs as nobody you 
> don't have permission, so either run apache as root (DANGER!) 
> or choose a socket above 1024.
> 
> -Brad
> 
> - Original Message -
> From: Josh Close <[EMAIL PROTECTED]>
> Date: Friday, June 25, 2004 10:18 am
> Subject: [PHP] socket_bind
> 
> > I'm trying to do socket_bind() and it works fine from the command 
> > line as
> > root, but when I try to use it through apache I get this error
> > 
> > Warning: socket_bind() unable to bind address [13]: Permission 
> > denied in
> > ..
> > 
> > Is there a way to have this run through apache?
> > 
> > -Josh
> > 
> > -- 
> > 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] socket_bind

2004-06-25 Thread Josh Close
I'm trying to do socket_bind() and it works fine from the command line as
root, but when I try to use it through apache I get this error

Warning: socket_bind() unable to bind address [13]: Permission denied in
..

Is there a way to have this run through apache?

-Josh

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