Re: [PHP] Hitler and Recent Threads

2003-08-07 Thread Mark
I believe according to Godwin's Law, Mr. Cummings has now lost the
argument.

That kind of thinking leads to things like Hitler :|


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a right unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



[PHP] parallelport interfacing

2003-08-07 Thread Michael P. Carel
Hi to all,

Just want to ask if PHP is capable of Parallel port interfacing?
If ever , can anyone give me  a good tutorial or samples  about this.

Thanks in advance.



Mike

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



[PHP] Session ID as a regex

2003-08-07 Thread Gerard Samuel
How would you best describe a session id as a regex?
[a-z0-9]{32}
Just checking to see if any other characters can be in a session id.
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Stop neurotic posting

2003-08-07 Thread Chris W. Parker
Robert Cummings mailto:[EMAIL PROTECTED]
on Wednesday, August 06, 2003 12:27 PM said:

 Your example is ridiculous -- it looks like you want a search egnine
 to properly phrase the question for you.

No it's not and it should be apparent why.

I'll even search groups.google.com by asking my question in as few
words as possible. Sometimes it works, but sometimes it doesn't

As you can see here, I explain that I do exactly what you suggest below.

 This works and is more concise and clear: php find a string in a
 string

The reason I noted google didn't know what the heck I was talking about
was because we're assuming the person asking the question (who btw is
not me) wouldn't be able to come up with php find a string in a
string. That's the whole point! It's not that the person is lazy or
stupid, it's that the person DOESN'T KNOW HOW to ask the question
properly. It takes time to learn to pick out the key words and
understand what's important and what's fluff.

 I rarely answer questions anymore because I find that many
 people want the coders on the PHP mailing list to do their work for
 them because they're too lazy to bother doing some research.

u r such teh 1337 h4x0r. thx 4 playing!

 Also to
 get back to the problem of wording queries wrong in google or
 whatever -- maybe trying a fwe different queries would help.

Of course it would!

In fact I agree so much, I'd rather struggle with a problem for an hour
than ask the list for help.

 Anyways this is all just my humble opinion.

Hardly.



chris.

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



[PHP] Hitler and Recent Threads

2003-08-07 Thread Phillip Blancher
OK Everyone... Isn't this a PHP list...


--
Best Regards, Phil

Phillip Blancher
Web Developer  Lead Graphic Designer
 http://www.ontarioweb.ca  1-866-209-0349
 [EMAIL PROTECTED] 
- Original Message -
From: Robert Cummings [EMAIL PROTECTED]
To: Chris Sherwood [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 5:14 PM



[EMAIL PROTECTED][EMAIL PROTECTED]
 4.75 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 Content-Type: text/plain
 Content-Transfer-Encoding: 7bit
 X-Mailer: Ximian Evolution 1.0.8-3mdk
 Date: 06 Aug 2003 17:14:38 -0400
 Message-Id: [EMAIL PROTECTED]
 Mime-Version: 1.0
 Subject: Re: [PHP] Stop neurotic posting
 X-MailScanner-Information: Please contact the ISP for more information
 X-MailScanner: Found to be clean
 X-UIDL: N1j!!hQl!*od!!VS+#!

 Hitler began his conquest by taking a country here, a country there
 while other countries sat around saying to each other oh he won't keep
 doing it. Let's DO NOTHING! Obviously that plan was flawed -- and that
 is what I was referring to -- not that by being quiet suddenly the world
 will be plunged into war again (not that it isn't already).

 Cheers,
 Rob.

 On Wed, 2003-08-06 at 17:11, Chris Sherwood wrote:
  Hitler is it?
 
  why is it everytime someone mentions a proper ettiquette, or some common
  sense thing that it is immeadiately taken to an extreme..
 
  is this reasonable behaviour? does it portray us as adults, maybe adults
who
  have a major chip on our shoulders... all I am saying is if you feel
nasty
  ... keep it to yourself
 
  now how does that equate to being like or bringing back hitler?
 
 
  - Original Message -
  From: Robert Cummings [EMAIL PROTECTED]
  To: Chris Sherwood [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Wednesday, August 06, 2003 2:04 PM
  Subject: Re: [PHP] Stop neurotic posting
 
 
   On Wed, 2003-08-06 at 16:36, Chris Sherwood wrote:
   
or what does it take to actually give a reasonable answer... if I am
  gonna
be rude I  wont say anything... doesnt any one remember their mother
  telling
them if you dont have anything nice to say dont say anything at all?
   
  
   That kind of thinking leads to things like Hitler :| If we never say
   anything then it becomes the norm for people to continue their
   behaviour. Currently the question being debated is what constitutes
poor
   behaviour/etiquette within this mailing list. While I agree that this
   forum is primarily for answering questions -- I disagree that it is
for
   answering silly little questions that would be common knowledge if the
   asker had bothered to read any tutorials or documentation -- most
   especially when it appears that the poster didn't even bother to do
any
   kind of searching for themselves. I mean really, questions like does
X
   do Y is often as simple as writing 1 to 5 lines of test code which is
   probably shorter than the email itself and doesn't pollute the mailing
   list with 5 to 10 replies of yes or no.
  
   Cheers,
   Rob.
   --
   .-.
   | Worlds of Carnage - http://www.wocmud.org   |
   :-:
   | Come visit a world of myth and legend where |
   | fantastical creatures come to life and the  |
   | stuff of nightmares grasp for your soul.|
   `-'
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
 --
 .-.
 | Worlds of Carnage - http://www.wocmud.org   |
 :-:
 | Come visit a world of myth and legend where |
 | fantastical creatures come to life and the  |
 | stuff of nightmares grasp for your soul.|
 `-'

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


 --
 This message has been scanned for viruses and
 dangerous content by Ontario Webs MailScanner, and is
 believed to be clean.




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003


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



Re: [PHP] Display Records in Multiple Pages help please !

2003-08-07 Thread daniel
100k = 100k records = 200 meg hehe
 a sample from my db class, i had to store the total in a session as
 calling the total on every page on a large database was painful doing
 count(*) or even SQL_CALC_FOUND_ROWS, on a small database u just cant
 tell but on a database of 100k + it was painful to load each page ;)

 function page_query($per_page, $query, $page, $session_var, $debug =
 null, $start_session = null) {
   if ($start_session) session_start();
   if(!$page) {
$this-page = 1;
   $this-start = 0;
} else {
   $this-page = $page;
   $this-start = ($this-page - 1) * $per_page;
   }

   if ((!$page  !$_SESSION[''.$session_var.'']) || (!
 $_SESSION[''.$session_var.''])) {
   $query = preg_replace(/SELECT|select/,\\0
 SQL_CALC_FOUND_ROWS,$query);
   $query = $query LIMIT $this-start, $per_page;
   $result = $this-query($query);
   if ($debug) $this-debug();
   $row = $this-getOne(SELECT FOUND_ROWS() as
 total_rows);
   $_SESSION[''.$session_var.''] = $row['total_rows'];
   $this-total = $_SESSION[''.$session_var.''];
   } else {
   $query = $query LIMIT $this-start, $per_page;
   $result = $this-query($query);
   if ($debug) $this-debug();
   $this-total = $_SESSION[''.$session_var.''];
   }
   $this-pages = ceil($this-total / $per_page);
   return $result;
}




 --
 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] Help with Mod mathematical function

2003-08-07 Thread Jason Wong
On Wednesday 06 August 2003 18:19, Dean Baldwin wrote:

 I am porting a vb application across to php but have come up against a
 small problem. The code uses the Mod calculation however I cannot find any
 Mod in php. The line of code that uses it looks like:

 Data = (index Mod 16)

 Anybody have any ideas how I recreate this in php? Both data and index are
 integers.

manual  Operators

-- 
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
--
/*
Putt's Law:
Technology is dominated by two types of people:
Those who understand what they do not manage.
Those who manage what they do not understand.
*/


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



RE: [PHP] error: cannot redeclare ()

2003-08-07 Thread Martin Towell
thnx - I'll see if this help..

-Original Message-
From: Joe Harman [mailto:[EMAIL PROTECTED]
Sent: Thursday, 7 August 2003 4:38 PM
To: 'Martin Towell'; [EMAIL PROTECTED]
Subject: RE: [PHP] error: cannot redeclare ()


Hi Martin... I am guessing you have a nested function that is being
redeclared, your error would come from there... Just a guess anyhow...

Joe

 -Original Message-
 From: Martin Towell [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, August 07, 2003 2:11 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] error: cannot redeclare ()
 
 
 I'm getting the following error:
 
 PHP Fatal error:  Cannot redeclare () (previously declared in
 /path/to/file/functions.inc:19) in 
 /path/to/file/functions.inc on line 0
 
 Anyone have any ideas how a no-name function could be 
 generated? Line 19 contains:
   function idb_exec_deadlock($sql,$count=0)
 
 There are only two lines before this that contain code (the rest are
 comments) and they are:
   if (!$__GEN_HIR_FUNCTIONS_INCLUDE){
 $__GEN_HIR_FUNCTIONS_INCLUDE=1;
 
 TIA
 Martin
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
__ Information from NOD32 1.468 (20030725) __

This message was checked by NOD32 for Exchange e-mail monitor.
http://www.nod32.com




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



Re: [PHP] greedy preg

2003-08-07 Thread John W. Holmes
skate wrote:

What are the possible values of $file? Are you looking to replace just a
specific occurance of a $file between item tags? Maybe this will help:
$contents = preg_replace(|item[^]*$file[^]*/item|si,,$contents);

or just use the 'U' modifier for ungreedy...



i'm looking to replace the entire item/item for that respective
file.
the file will have a value of whichever file that record points to, and will
be unique (xml/news/12312312.xml)
should .*? not be ungreedy tho?
Yeah, it should be. What kind on content can be around $file and also 
within the item tag?

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

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





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


[PHP] Re: How to run PHP from a MySQL DB

2003-08-07 Thread Jeremy Darling
Thanks Alexandru,
  I just picked PHP back up and am quite a bit rusty on where to find
information these days.

Jeremy

Alexandru Costin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,
 Please take a look at http://php.weblogs.com/ their first article is
 exactly about this (both PostgreSQL and something about MySQL - see the
 comment)

 Alexandru

 --
 Alexandru COSTIN
 Chief Operating Officer
 http://www.interakt.ro/
 +4021 312 5312
 Jeremy Darling [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  I have a database of code pages and was wondering if their is a way to
  actually run the code from the Database as if it was part of a page.
 
  Thanks,
  Jeremy
 
 





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



Re: [PHP] moderator: has anything on this list changed?

2003-08-07 Thread Curt Zirzow
* Thus wrote Curt Zirzow ([EMAIL PROTECTED]):
 
 I'm bcc'ing this to [EMAIL PROTECTED], hopefully someone over there
 can help the list out with this issue.

well, I guess we are on are own, the bcc bounced :/


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

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



RE: [PHP] mail

2003-08-07 Thread Jay Blanchard
[snip]
* Thus wrote Jay Blanchard ([EMAIL PROTECTED]):
 
 GIS for send attachments with PHP mail()

GIS?

Google  Search?
[/snip]

Information :)

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



RE: [PHP] Stop neurotic posting

2003-08-07 Thread Chris W. Parker
Jennifer Goodie mailto:[EMAIL PROTECTED]
on Wednesday, August 06, 2003 11:27 AM said:

 and in any event they're often things I
 wouldn't have thought about looking up anyway.
 
 
 I love how the argument for not doing research is not having the
 time/not wanting to waste time.  That is just lazy and selfish.

I totally agree with you on the time factor. The answerers time (for
lack of a better word) is more important than the questioners time
(again, for lack of a better word).

But I think a good point that the above quote contains is in any event
they're often things I wouldn't have thought about looking up anyway.

I find that, although I know my question is rudimentary, I don't even
know how to search for it on google or in the archives. I don't know
what a function is called, or what it /might/ be called and therefore my
only recourse is to describe what I'm thinking (or trying/wanting to do)
to another human being that can better interpret my question than google
or the archives can.

I'll even search groups.google.com by asking my question in as few words
as possible. Sometimes it works, but sometimes it doesn't, and mainly
because people don't always ask the same question the same way.

Here's an example...

How do I return a string based on certain criteria? For example I've
got the string 'magical mystery tour' and I want to return the word
'myst' if it's found within the original string.

A bad answer would be:

RTFM http://php.net/preg_match;

A good answer would be:

That can be done with a regular expression. The function you're looking
for is called preg_match. http://php.net/preg_match;


And guess what, I pasted that question into google and it gave me not
one good result. It did tell me how the Rio works though.


My .02

Chris.

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



RE: [PHP] Attention everyone 0-t

2003-08-07 Thread Chris W. Parker
Ryan A mailto:[EMAIL PROTECTED]
on Wednesday, August 06, 2003 4:42 PM said:

 for some reason over 90% of all posters to this list has been
 blacklisted by spamcop...

And how do you know this?

 any ideas on what we can do about it?

Dunno.



c.

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



Re: [PHP] for the love of god, remove me

2003-08-07 Thread Joseph Bannon
 It's not usless if you read the page. 
 [EMAIL PROTECTED]

As I said, the page is useless. This doesn't work either.

J.



 On Sun, 2003-08-03 at 13:45, Joseph Bannon wrote:
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
  This page is useless, you can't remove yourself.
  
  J. 
  
  
  __
  Do you Yahoo!?
  Yahoo! SiteBuilder - Free, easy-to-use web site design software
  http://sitebuilder.yahoo.com
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] Running script produces no output

2003-08-07 Thread Chris Blake
Hi Jacob,

The script does indeed run, and I have since added the following :

$shell_return = shell_exec(./info.sh .  21);

This pointed out to me that the error was in the script itself, and not
the php...

I have now sorted this out so it works as expected...

Thanks for your time in assisting..

Regards

Chris

On Wed, 2003-08-06 at 08:58, Jacob Vennervald Madsen wrote:
 Does the script work when you run it by hand?
 
 Try to insert an echo TESTER in the top the shell script to make sure
 something is sent to stdout. And then check in your php script that you
 receive the message.
 
 Best regards,
 Jacob Vennervald
 
 On Wed, 2003-08-06 at 08:38, Chris Blake wrote:
  Greetings learned PHP(eople);
  
  I have a small script sitting in my web directory which I have called
  upon as follows :
  
  ?php
  shell_exec('./info.sh');
  ?
  
  The script is not being run, yet I can do things like
  
  ?php
  $info=shell_exec('ls -l');
  echo 'pre$info/pre';
  ?
  
  ..which produce output to the browser...
  
  I have tried 'chown apache:apache info.sh' but this doesn`t change
  anything
  I have also tried using './info.sh' with no result
  
  Any pointers much appreciated as to why this won`t work. The permissions
  are as follows for the script file :
  
  -rwxrwxrwx1 root root 2456 Aug  5 16:35 info.sh
  
  Regards
  
  -- 
  Chris Blake
  Office : (011) 782-0840
  Cell : 083 985 0379
  
  Join the army, see the world, meet interesting, exciting people, and
  kill them.
  
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
  
-- 
Chris Blake
Office : (011) 782-0840
Cell : 083 985 0379

We're mortal -- which is to say, we're ignorant, stupid, and sinful --
but those are only handicaps.  Our pride is that nevertheless, now and
then, we do our best.  A few times we succeed.  What more dare we ask
for?
-- Ensign Flandry


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



RE: [PHP] problem using unlink()

2003-08-07 Thread James Brash
thanks for your help, I have already its 777

You need to chmod or chown the directory where the file is located.



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



Re: [PHP] moderator: has anything on this list changed?

2003-08-07 Thread Juan Nin
From: Curt Zirzow [EMAIL PROTECTED]

 well, I guess we are on are own, the bcc bounced :/

what about [EMAIL PROTECTED] or [EMAIL PROTECTED] ?

regards,

Juan

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



RE: [PHP] dev style guide

2003-08-07 Thread Mike Migurski
At the risk of starting a flame/religious/holy war I find the One True
Brace style to have some inconsistency if it is as above. The 'function'
does not open the curly brace at the EOL, but the 'if' does.

Yeah, that's pretty much the definition of the OTBS. :)

I'm not sure why I find it so natural, but basically it acknowledges that
function definitions are fundamentally different (in usage and meaning)
than other code blocks. I like this.


I also mentioned me being and old-schooler earlier today but the rules
that we use in our (current) group always place the opening curly at the
EOL. Also, we do not allow ternary notation.

Personally, I use ternary notation a lot, but I try to use it thusly:

(condition
? statement 1
: statement 2)

The line breaks make it easier to see what's going on.

I don't think it really matters what standard you use, as long as you
*have one* and everyone in your group agrees that it's a comfortable fit,
which paradoxically seems to converge on something like what PEAR uses
anyway.

Anecdote:
At one time, a member of our group decided (on their own) that the coding
style should automatically prefer printf() constructions to double-quoted
variable interpretation, and that it should be word-wrapped to fit within
his 80-char vim terminal. An autoconversion script was written, files were
drastically modified to conform, and then subsequently committed to CVS.
This is not a proper way to go about implementing a coding standard. :P

-
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] Parse error not understood

2003-08-07 Thread CPT John W. Holmes
From: Chris Blake [EMAIL PROTECTED]
[snip]
 //If Delete User is selected--
 if ( $_REQUEST['useroption'] == 'delete')
 {
[snip]
 No matter which option I select I get the following output :
 --
 Parse error: parse error, unexpected $ in
 /var/www/html/Sessions/userman.php on line 83
 
 Line 83 is '?'..

You're missing a closing brace for the above IF condition...

---John Holmes...

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



Re: [PHP] Piping and the CLI parser

2003-08-07 Thread Nicolas Frisby
Sorry Jason, I didn't catch my typo about the echo program until
recently.

Regardless of that, do you know anything of how the piping mechanism
works?

Thanks for your time,
-Nick

Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 On Tuesday 05 August 2003 13:25, Nicolas Frisby wrote:
 
 [snip]
 
  executes the script with arguments), I attempted some piping; which,

  through very shallow research, I've come to think uses STDIN.
 
 I don't think it does.
 
  It fails; no piping whatsoever. Even the simplest 'dir | echo.php', 
  where echo just implodes() $argv and echoes, gives no output.
 
 If all you're interested is in the results and not how you get there, 
 then
 forget about $argv and just simply parse STDIN to get your
'arguments'.
 
 --
 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
 --
 /*
 Wonderful day.  Your hangover just makes it seem terrible.
 */
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.502 / Virus Database: 300 - Release Date: 7/18/2003
 


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



Re: [PHP] Command line php....

2003-08-07 Thread John Nichel
That did it.  Thanks.

Jason Wong wrote:
On Wednesday 06 August 2003 11:11, John Nichel wrote:

4.3.2


Try disabling output buffer in php.ini.



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


[PHP] Re: on specific time in the month do script!!

2003-08-07 Thread Bobby Patel
look into executing your php script through cron. (Cron is a Unix schedular
and nothing to do with PHP). Or you can use Tash Schedular (on windows
servers, I guess).

Also, check the archives but I think this issue was answered as above.

Nabil [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 HI all;
 how can i run somthing or a function that only run on every month from the
 first untill the second on a specific time:

 in other word :
 the first two day of every month but it end on like 2pm of the second..

 if ( today is 1/of any month untill 2/ of the same month at XX hour )
 { return true}
 else
 {return false}


 thanks
 Nabil





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



RE: [PHP] Best PHP CMS

2003-08-07 Thread Ezra Nugroho
Also look at 
http://www.caravelcms.org


Quoting Matt Schroebel [EMAIL PROTECTED]:

 
  -Original Message-
  From: Anthony [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, August 05, 2003 9:52 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Best PHP CMS
  
  
  I'm just looking for some opinions.  I've been going though 
  sourceforge
  looking at different CMS systems.  There are a lot of really good CMS
  projects out there.  I'm looking for some opinions on the 
  best ones out
  there.  I'm obviously looking at something PHP based and using mySQL
  backend.  Some of the features that I'd like are an easy template
  implementation, blog features, media gallery and something 
  that's easy to
  build custom modules to add features.  So far I'm looking at 
  about 6 CMS
  systems, I like certain things in each of them. so what's 
  your opinion.
 I've looked at these:
 
 http://www.midgard-project.org/
 Midgard looked good but I couldn't get the admin to work right, and it
 requires php-4.2.2 or lower (which drove me a little nuts at first).
 It's optimized for php as it's functions are written in C and become
 built in php functions with --with-midgard, plus it has a mod_midgard to
 link into apache.  Midgard allows lots of customization and you could
 place php code just about anywhere.  Runs on *nix only and requires
 access to add modules to php and apache.
 
 http://www.tikiwiki.org/
 TikiWiki had lots of cool features.  It looked to me to be more suitable
 for a community CMS (baseball team etc) rather than a general CMS. All
 php.
 
 http://www.geeklog.net/
 There's also GeekLog, with a similar community slant as TikiWiki, and it
 was reviewed in last months php-architect magazine. All php.
 
 http://www.typo3.org
 I agree with what Nick Tabbet said.  Of these 4 CMSs, this one has the
 most refined user interface, and most general purpose features.  It's
 written in all object oriented php and will easily install on an ISP
 hosted system.  Quick setup 1-2-3, and your ready to go.  It does have a
 long learning curve, but anything complex does.  Since it's all OO, has
 it's own TypoScript code to design content and big, it will really
 benefit if run with a php accelerator to cache the intermediate code.
 Has good tutorial for getting started, and another good intro to it's
 templates.  It's more for small to mid-sized sites, as anything larger
 should be written in native C, C++, etc.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 




-
This mail sent through IMP: http://horde.org/imp/

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



Re: [PHP] Stop neurotic posting

2003-08-07 Thread Robert Cummings
On Wed, 2003-08-06 at 16:36, Chris Sherwood wrote:
 
 or what does it take to actually give a reasonable answer... if I am gonna
 be rude I  wont say anything... doesnt any one remember their mother telling
 them if you dont have anything nice to say dont say anything at all?
 

That kind of thinking leads to things like Hitler :| If we never say
anything then it becomes the norm for people to continue their
behaviour. Currently the question being debated is what constitutes poor
behaviour/etiquette within this mailing list. While I agree that this
forum is primarily for answering questions -- I disagree that it is for
answering silly little questions that would be common knowledge if the
asker had bothered to read any tutorials or documentation -- most
especially when it appears that the poster didn't even bother to do any
kind of searching for themselves. I mean really, questions like does X
do Y is often as simple as writing 1 to 5 lines of test code which is
probably shorter than the email itself and doesn't pollute the mailing
list with 5 to 10 replies of yes or no.

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

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



RE: [PHP] How to point at a spot and get relevant information?

2003-08-07 Thread Yao, Minghua
Robert and skate,

Thank you for your reponses. The problem is there are thousands of spots on
the plot.
The locations are random. 
 
-MY
-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 11:00 AM
To: skate
Cc: Yao, Minghua; [EMAIL PROTECTED]
Subject: Re: [PHP] How to point at a spot and get relevant information?


ou should be able to use an image map form input widget to get the
coordinates that the user selects from some image you display to them.
Then the determination of relevant information can occur server side via
PHP. I don't have experience with this, but it appears to be how
mapquest works:

input type=image name=mqmap border=0 src=http://mq-mapgen ...

HTH,
Rob.


On Thu, 2003-08-07 at 11:52, skate wrote:
 
 
 
   Dear all,
  
   Anybody knows how to write a graphic plotting code such that when
users
   point
   at that spot, they can get the information relevant to that spot?
Thanks
   in advance.
  
 
 
 that'd be pretty intense. to do this feasbly with PHP, you'd have to
analyse
 the picture first with the GD library. but to allow the user to interact
 with this, your gonna have to store all values into JavaScript. the users
 interaction can't be done with PHP, as that's all client side.
 
 this would result in possibly huge amounts of code to download, and fairly
 high processing time. i don't know if there's a javascript alternative, or
 maybe some other technology someone's made. this wouldn't be so hard in
 flash tho...
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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

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



Re: [PHP] Unzipping Files

2003-08-07 Thread Adam Alkins
Try the zziplib library, http://www.php.net/manual/en/ref.zip.php

-- 
Adam Alkins
http://www.rasadam.com


Quoting Matt Palermo [EMAIL PROTECTED]:

 Anyone know where I can find tutorials or examples on how to use the
 gunzip, gzip, and other commands using PHP to work with compressed
 files?  I would really appreciate it if someone could send me some links
 or examples of how to use them.  My goal would be to be able to extract
 .zip, .gz, and other types of compressed files using a PHP script.  Let
 me know if you can help. 
  
 Thanks,
  
 Matt
 


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



Re: [PHP] gettin parameters from url, architecture question

2003-08-07 Thread Chris Shiflett
--- Merlin [EMAIL PROTECTED] wrote:
 What do you think? Maybe there is another possiblitiy=?

Are you certain the site in question doesn't simply parse the HTML files as if
they were PHP? Even so, I do not understand how you think one of these URLs is
more search optimized than the other:

http://example.org/script.html
http://example.org/script.php

Also, don't rule out the possibility of generating static HTML at regular
intervals. This is how sites such as Slashdot operate - it's a sort of a
creative server-side caching mechanism.

Hope that helps.

Chris

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

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



Re: [PHP] Edit a page in PHP

2003-08-07 Thread Jeremy Darling
Thanks greatly thats exactly what I was looking for.

John W. Holmes [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Jeremy Darling wrote:
  This is driving me nuts.  I know it can be done, cuz I've seen it done
  before, but I can't figure it out.
 
  I would like to have a php file that allows me to edit an HTML/PHP file
thru
  my browser.
 
  Currently I have something that looks like:
 
  TextArea
  ?PHP
  $filename = /usr/local/something.txt;
  $handle = fopen ($filename, r);
  $contents = fread ($handle, filesize ($filename));
  fclose ($handle);
  print $contents;

 print htmlentities($contents);

  ?
  /TextArea
 
  This works fine unless the page that I'm editing has a TextArea tag in
it,
  witch throws everything off.  I know that this is more of an HTML
question,
  but I couldn't find the answer in my quick searches (too many pages to
go
  thru).

 --
 ---John Holmes...

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

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







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



Re: [PHP] error: cannot redeclare ()

2003-08-07 Thread CPT John W. Holmes
From: Martin Towell [EMAIL PROTECTED]
 I'm getting the following error:

 PHP Fatal error:  Cannot redeclare () (previously declared in
 /path/to/file/functions.inc:19) in /path/to/file/functions.inc on line 0

 Anyone have any ideas how a no-name function could be generated?
 Line 19 contains:
 function idb_exec_deadlock($sql,$count=0)

Make sure you're not including/requiring functions.inc more than once. This
is usually what causes these kind of errors.

Also, I hope you are denying access to .inc files on your server, otherwise
your PHP code will be served up as plain text.

---John Holmes...


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



Re: [PHP] Stop neurotic posting

2003-08-07 Thread Curt Zirzow
* Thus wrote [EMAIL PROTECTED] ([EMAIL PROTECTED]):
  This is a very busy list, over 100 message in a quiet day and most
  people  are helpful and decent, don't mind reading and learning.
  Unfortunately  there are some who mostly post stuff like 'read the
  manual' and other shit  like that. Stuffing e-mailboxes with such
  garbage day after day doesn't do  anybody any good even if the manual
  is  not being read as much as it should  be. Is it too difficult to not
  answer the post at all if you disagree with  the content?
 
 
  Andu
 
  --
 
 good on you , i'm sick and tired of twats replying with i dont understand
 your question or RTFM , i absolutely hate RTFM , the idea of the list is
 to help eachother out and even post back to the list the completed code
 someone was stuck on to share with everyone , if there is no decent asnwer
 to reply with dont reply at all

Calling someone a twat is not going to persuade anybody to change
how you think a proper reply should be.

If I dont understand someone's question, should I not let them know
that if that make themselves a little clearer a better answer may
be given instead of 12 people shooting in the dark giving answers
to problems that are not the issue the person is having?


: skips comment on RTFM :)

Yes the list is about helping people out, but we (those who help
people) arn't here to write someone elses code.  If and when that
is done people become too lazy and rely on the list to have their
problems solved, instead of the user doing research himself to
find out if this is a common problem.

Like for example, when people are asking for examples a simple
google search for 'functionname' example', usually results with
some good examples.

cheers,

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

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



Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-07 Thread Mike Migurski
I have written as part of my CMS, an image upload system, now when the
images are placed in the destination folder, they are owned by httpd.root
and I need to get them to be owned by siteuser.sitegroup.

I have tried to chmod and chgrp it to siteuser.sitegroup but it gives
permission denied errors.

Is there any way round this without enabling run as root? Or is there a
safe way to do this?

You can ch(mod|own|grp) the files in the upload script, right after they
are written to disk. chmod a+rwX is a good option if you are not overly
concerned about the security of these files. Are you getting
permission-denied errors when attempting to do this in your script, or
afterwards, on the command-line?

-
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] Correct Coding

2003-08-07 Thread CPT John W. Holmes
From: Martin Peck [EMAIL PROTECTED]
   That can generate an error if $Task was never assigned a value.
  
 
  could you not do
 
  if(@$Task == Add ){do something }
 
  to suppress the error of the variable not being set?

 I have never seen php give an error if $Task is not set to anything.  I
 would have said that

It would give an error if you have your error reporting set accordingly.
Search the archives for the difference between works and right (or the
next issue of PHP|Architect) :)

---John Holmes...


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



Re: [PHP] Hitler and Recent Threads

2003-08-07 Thread Ryan A
I pity the poor sap who just joined the list and instead of finding php
topics discussed finds quotes,jokes,godwins laws, quirks laws,name calling,
referneces to Hitler and other topics...

Can we end this now please?

-Ryan


We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com


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



Re: [PHP] Correct Coding

2003-08-07 Thread Robert Cummings
Looks good.

Cheers,
Rob.

On Thu, 2003-08-07 at 13:09, Christopher J. Crane wrote:
 Is this the best way to do this?
 
 if(isset($Task)  $Task == Add) { Do something }
 
 I want to check if the variable is set and if so, if it is Add.
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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

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



[PHP] session bug or feature

2003-08-07 Thread Christian Calloway
Hey Everyone,

I am running Apache 2.047 with PHP (as module) 4.3.2. I ran into something
interesting and I wanted to know if it was a bug, or actually supposed to be
that way. Given the following lines of code:

?php

session_start();

// lets say this equals bar and it was set on a previous page
$_SESSION[foo];

$foo = rab;


echo $_SESSION[foo];

?

The problem is, when I set the global variable $foo=rab, when I echo the
session variable $_SESSION[foo], it outputs rab instead of bar?! This
doesn't seem right? If that is the intended behavior, is there anyway to
avoid this (perhaps a php.ini directive)? It was a nightmare finding out why
my session variables values were being changed by like-named global
variables ;-) Hey PHP still rocks though, later

Christian



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



RE: [PHP] setting function variables

2003-08-07 Thread Jennifer Goodie
 I am trying to specify a single php file to contain all the
 variables and I
 just call this file where necessary.  What I am running into is
 that I want
 to do this for all the built in functions (i.e. mssql_query) as
 well.  I've
 tried numerous attempts but can't get it to operate without wanting to run
 the functions or return an error.  Something like this:

 $runQuery = @mssql_query;
 $qryResults = @mssql_result;
 $getRow = @mssql_fetch_row;
 $getRowNums = @mssql_num_rows;

 I've tried using the %, $, ,'', and the @ symbol without any
 luck.  Anyone
 know of way to do this, so I can use a generic name for all the functions
 and be able to distribute it to those using either SQL Server or MySQL
 without them having to go through the code and manually change it?

 thanks

Have you looked into variable functions?
http://www.php.net/manual/en/functions.variable-functions.php


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



Re: [PHP] Correct Coding

2003-08-07 Thread Juan Nin
 Is this the best way to do this?
 if(isset($Task)  $Task == Add) { Do something }
 I want to check if the variable is set and if so, if it is Add.

why don't just do:

if($Task == Add) { Do something }

regards,

Juan

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



[PHP] php calendar suggestion..

2003-08-07 Thread Louie Miranda
I currently downloaded phpcalendar from..
http://www.cascade.org.uk/software/php/calendar/index.php

Im amaze how things goes with that software, i just couldnt figure out how
to link to a file for a specific date.

Can anyone suggest a similar program like this, that is simple and only an
admin can change the dates - events?

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




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



RE: [PHP] Formatted text from mySQL DB

2003-08-07 Thread PHPSpooky
 
 [snip]
 Ah, this question again. Has it been four days already?
 [/snip]
 
 ROFLMFAO! I snorted coffee through my nose!!! :)

Eww I do not like coffee in my mouth.. but nostrils! Yuck!

PHPSpooky




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



[PHP] module to display e-mail from source

2003-08-07 Thread Juan Nin
Does anyone know of any module which can display an e-mail from it's source?
I mean, that it receives the mails source, and displays it as it is
displayed in a webmail for example..
It should be able to hand HTML messages and attachments

I searched the web and found nothing...

I could take code from any PHP based Webmail and modify it a bit to do this,
but maybe there's some existing module to do this..

thanks in advance,

Juan


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



Re: [PHP] snippet

2003-08-07 Thread David Nicholson
** CORRECTION BELOW **

Hello,

This is a reply to an e-mail that you wrote on Tue, 5 Aug 2003 at
11:14, lines prefixed by '' were originally written by you.

 $sFont =submit(font) ? SITE_ROOT . PROG_PATH .
submit(font) : ;

it is the same as:
if(submit(font)){
$sFont = SITE_ROOT . PROG_PATH;
} else {
$sFont = ;
}

(see http://uk.php.net/language.operators.comparison)

submit() is a user defined function, if it evaluates to **TRUE**
then
$sFont will contain the value of those two constants put togetherm
otherwise it will be set to an empty string.

HTH

David.


--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Free PHP error handling script: www.phpmachine.com/error-handler/

  Professional Web Development by David Nicholson
http://www.djnicholson.com/

QuizSender.com - How well do your friends actually know you?
 http://www.quizsender.com/

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



[PHP] greedy preg

2003-08-07 Thread skate

  $contents = preg_replace( |item.*?$file.*?/item|si, , $contents );

it's being run on an XML file, where each entry is item../item with
a $file pointer in there.

it works okay, except for the fact that it deletes that record, and every
record before it. i can't figure out why it's being greedy? i know i gotta
be missing something real simple...



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



[PHP] Re: Building an XML Parser Class

2003-08-07 Thread Greg Beaver
http://pear.php.net/XML_Parser

:)
Greg
--
phpDocumentor
http://www.phpdoc.org
Donald Tyler wrote:
Hi,

I am trying to create a Class that will parse an XML document. It all works
fine as individual functions but I cant get it to work as a class.
For example, when I do the following in my class:

xml_set_element_handler($this-xml_parser, '$this-startElement',
$this-endElement);
xml_set_character_data_handler($this-xml_parser, $this-valueHandler);
I get an error message:

Warning: xml_parse(): Unable to call handler $this-startElement() in
c:\program files\apache group\php\My_includes\Class.xmlTranslator.php on
line 90
Now I presume this is because I am trying to call methods of my class.

Does anyone know a good way around this?

Thanks.




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


[PHP] PHP 4.3.3RC3 Released

2003-08-07 Thread Ilia Alshanetsky
PHP 4.3.3RC3 was just released, hopefully this will be the final release
candidate prior to the final release. Please test this release as much
possible so that any new/critical bugs maybe uncovered and resolved before
the final. If you do find such bugs (hopefully you won't) be sure to label
them as RC3 bugs.

I would like to ask that all developers refrain from making commits to the 4_3
tree until 4.3.3 final is released, unless a patch addresses a critical
issue. Critical issues are defined as the following:
1) Security Fixes
2) Fixes for bugs introduced in 4.3.3X releases
3) Fixes for bugs that break backwards compatibility with older versions.

Ilia


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



Re: [PHP] Sum a column of values from a MySQL query

2003-08-07 Thread Adam Alkins
Quoting Ben C. [EMAIL PROTECTED]:

 I am trying to sum a query of values from a MySQL table.  The code I am
 using is:
 
 ---BEGIN CODE #1--
 $sql_2 = SELECT SUM(partpaidamount) as partpaid
   FROM $tb_name
   WHERE invoiceid = \$invoiceid\
   ;
 
 $result_2 = @mysql_query($sql_2,$connection) or die(mysql_error());
 
 while ($row = mysql_fetch_array($result_2)) {
   $invoicepartpaid = $row['partpaid'];
 }
 ---END CODE #2
 
 1) The code returns the sum of a partially paid invoice.  The individual
 invoice is 'partpaid'. WORKS...NO PROBLEM
 2) The while() then return a list of partially paid invoices which is
 $invoicepartpaid.  WORKS..NO PROBLEM
 3) I then want to add the list of partially paid invoices ($invoicepartpaid)
 together.  I AM STUCK HERE ADDING THE INVOICES AMOUNTS TOGETHER.

Well, instead of doing $invoicepartpaid = $row['partpaid']; you could do
$invoicepartpaid += $row['partpaid']; which will just add $row['partpaid'] to
$invoicepartpaid, not replace it.

However, why not just SUM all the rows in the table in the query if you just
want a total?

$sql_2 = SELECT SUM(partpaidamount) as partpaid FROM $tb_name;

-- 
Adam Alkins
http://www.rasadam.com

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



[PHP] FDF support in RedHat

2003-08-07 Thread Cesar Cordovez
Hi List!

I know this is old history, but the archives has nothing, the manual is 
so far away and google is kind of slow this morning, so...

Can somebody teach me how to compile php with fdf support in red hat 
linux 8 as if I where a 5 year old? (which I am =)

Thanks.

PD. My mother will change my dippers, don't worry about that!



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


Re: [PHP] greedy preg

2003-08-07 Thread Marek Kilimajer
And what about [^]* -if there are no html tags

skate wrote:


Do you need to use .*?? If there will be only white characters, use
\s* instead.


unfortunately there's some content either side of $file before item/item
this content is different for each item, so i can't define it in the
pattern.




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


RE: [PHP] Re: Password storage system

2003-08-07 Thread Chris W. Parker
 Daevid Vincent [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 I'm in search of an 'enterprise level' password storage system.

Try PMS: Password Management System. I believe it can be found on
sourceforge.


hth,
chris.

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



[PHP] php + wddx

2003-08-07 Thread Angelo Marcos Rigo
Hi 

Maybe anybody has passed by this situation :

I have a webserver machine  with linux apache 2.0 php 4.2.2 with wddx support
and a windows machine with  iis server wich have a .Net system wich i need to use a 
authentication system function . 

I would like to receive information about what requeriments and tutorials to use the 
.net with my linux  webserver 
just to use this c# function to authenticate the users 

Do i install wddx sdk on windows machine ?
Do i install php on windows machine (for iis) ?

Any help will be apreciated 



Ângelo Marcos Rigo



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



[PHP] mysql_error() problem?

2003-08-07 Thread Tyler Longren
Hi,

I'm running an UPDATE query on my table.  After executing the query, I check
mysql_error() to see if there's any errors:
if (mysql_error() == ) {
// success
}
else {
// failure
}

mysql_error() is always empty even if the query didn't succeed.  So it
always thinks it succeeds.  I remember having this problem once quite a
while ago.  I remember somebody telling me that it had something to do with
UPDATE.  Is there a better way to check for errors?

Thanks,
Tyler



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



[PHP] for loop and FTP

2003-08-07 Thread Kevin Millecam
Hi all,

You can probably tell I'm pretty new at this.

I need to grab five pages from a web site every day and then FTP those pages
to another site.

I was wondering if I should grab all five pages (and store them somewhere)
and then FTP all five.

Or if I could keep the FTP connection open while I looped thorough the five
(grab,FTP,grab,FTP ...)

Thanks,

Kevin Millecam
www.bitworkz.com



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



Re: [PHP] session bug or feature

2003-08-07 Thread Curt Zirzow
* Thus wrote Christian Calloway ([EMAIL PROTECTED]):
 Hey Everyone,
 
 I am running Apache 2.047 with PHP (as module) 4.3.2. I ran into something
 interesting and I wanted to know if it was a bug, or actually supposed to be
 that way. Given the following lines of code:
 
 ?php
 
 session_start();
 
 // lets say this equals bar and it was set on a previous page
 $_SESSION[foo];
 
 $foo = rab;
 
 
 echo $_SESSION[foo];
 
 ?


 
 The problem is, when I set the global variable $foo=rab, when I echo the
 session variable $_SESSION[foo], it outputs rab instead of bar?! This
 doesn't seem right? If that is the intended behavior, is there anyway to
 avoid this (perhaps a php.ini directive)? It was a nightmare finding out why
 my session variables values were being changed by like-named global
 variables ;-) Hey PHP still rocks though, later


php4-3.3RC1
Apache 1.3
register_globals: off

Hm.. I can't reproduce that, what are you're php settings that
affect session stuff, and your register_globals setting?

My guess is that you have a session_register('foo') somewhere.

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

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



Re: [PHP] Stop neurotic posting

2003-08-07 Thread John Manko
perhaps there should be two lists (novice and advanced), and the 
advanced listed shouldn't
answer questions if it's considered trivial enough for the novice list 
to answer.



Curt Zirzow wrote:

* Thus wrote andu ([EMAIL PROTECTED]):
 

This is a very busy list, over 100 message in a quiet day and most people 
are helpful and decent, don't mind reading and learning. Unfortunately 
there are some who mostly post stuff like 'read the manual' and other shit 
like that. Stuffing e-mailboxes with such garbage day after day doesn't do 
anybody any good even if the manual is  not being read as much as it should 
   



Yes it is a busy list, I have 1000+ messages for 7 days worth.  

I'm not sure the noisyness of the list is entirely on the ones that
are helping.  There does seem to be a problem of people posting
questions that are plain as day in the manual, or have been
repeatedly answered here on the list (thus the joke, has it been 4
days already, being so funny :)  

if more people would read the manual or know how to find commonly
asked and solved quetions this list would probaly drop in 20% (very
rough estimate) of posts.  Getting that information to the people
who arn't reading the manual is a difficult task, cause if they
arn't reading the manual, why would they even bother with reading
the information on how to find the answer.
Now noisyness from the 'helpers'...  I have noticed at times that a
question is answered the same way like 10 times by 10 different
people; this I consider more noisy than a RTFM post.
 

be. Is it too difficult to not answer the post at all if you disagree with 
the content?
   

Now, I kinda wondered at first if I should not respond to this
cause it's rather in a disagreement tone :)  

I think this shouldn't be considered a bad thing to do.  If you
find something you disagree with and have (legit) arguments, I
would insist that the person reply to it. Of course this only helps
if it was in a constructive manor, which I hope this reply was
done.
Cheers,

Curt
 



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


Re: [PHP] bug in code - can't find it!

2003-08-07 Thread Amanda McComb
Oh, yeah.  Well, I just copied and pasted that from another form.  Taken
out, it still doesn't work.  Even the echo, which is on no way related to
the checkbox.

Thanks!


On Wed, 6 Aug 2003, Chris Sherwood wrote:

 INPUT TYPE=checkbox NAME=? echo $search_result2['user_cd'];?
 VALUE=?if ($search_result2[a.retired_flag] == 1){?CHECKED?}? ?echo
 $search_result2[a.retired_flag]?
 }
 
 well for starters checkboxes dont have a size and maxlength
  you may want to try that and see if it works...
 
 
 
 - Original Message -
 From: Amanda McComb [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, August 06, 2003 2:47 PM
 Subject: [PHP] bug in code - can't find it!
 
 
  Ok, after all of the discussion on posting, I'm afraid to post.
  Unfortunately, no one I know is a programmer, and I am a beginner.  I can
  normally figure out what I've done wrong, but I'm missing something here.
 
  Ok, here is my query and the bit of code I can't figure out:
 
  $query = SELECT * from apt_user_t a, apt_company_t b ;
  $query .= WHERE a.user_cd = b.user_cd ;
  $query .= ORDER BY a.username;
 
   $search_results = mysql_query($query) or die(Select
  Failed!);
  while ($search_result2 = mysql_fetch_array($search_results))
  {
  INPUT
  TYPE=checkbox
  NAME=? echo $search_result2['user_cd'];?
  SIZE=20
  MAXLENGTH=50
  VALUE=?if ($search_result2[a.retired_flag] == 1){?CHECKED?}? ?echo
 $search_result2[a.retired_flag]?
  }
  Nothing shows up with the echo or the value.  I only included this
  checkbox, but all of the other values show up fine.  Can someone give me a
  hint?
 
 
 
 
  --
  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] AOL Email client

2003-08-07 Thread Jennifer Goodie
 I am using php mail and setting all my $headers info to show From:, To:,

What does your call to mail() look like?  How are you formatting you
headers?



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



RE: [PHP] AOL Email client

2003-08-07 Thread Jennifer Goodie
 Here is what my header look like:

   $headers .= MIME-Version: 1.0\r\n;
   $headers .= Content-type:  text/plain;
 charset=us-ascii\r\n;
   $headers .= From: .$name. .$email.\r\n;
   $headers .= To: .$myname. .$toAddress.\r\n;
   $headers .= Reply-To: .$name. .$email.\r\n;
   $headers .= X-Priority: 1\r\n;
   $headers .= X-MSMail-Priority: High\r\n;
   $headers .= X-Mailer: Just My Server;


It appears to work fine in AOL 6.0 when I send from unix box using PHP 4.2.3
and sendmail, what version of AOL are you having problems with, what server
platform and PHP version are you using to send?  If you are using the php
mail function you must be passing To as the first parameter since it is not
optional, so why are putting it in your headers as well?  If I remember
correctly, RFC2822 states there should only be 1 to header.


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



Re: [PHP] Hitler and Recent Threads

2003-08-07 Thread CPT John W. Holmes
From: Mark [EMAIL PROTECTED]

 And as they say, Never argue with a fool. People will
 not be able to tell the differnce.

I thought it was Never argue with an idiot. They drag you down to their
level and beat you with experience

:)

---John Holmes...


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



[PHP] Re: postmaster@hanmir.com

2003-08-07 Thread Ben
I just got two,
Expecting two more now

Joe Harman [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hey is every one getting a returned message from
 [EMAIL PROTECTED]

 Joe Harman







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



[PHP] Re: Semaphores

2003-08-07 Thread l0t3k

Cristiano Duarte [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I know there is no support for semaphores in Windows.
 But does the Windows and Mac implement semaphores ? If they don't what is
 used instead ?

they both support semaphores. its just that most PHP developers seem to be
primarily *NIX users. it would not be hard at all to add semaphore support
for Windows. i just dont have the time to do it. if you're so inclined,
however, have a look at the source for Python and see how they do it.

l0t3k



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



Re: [PHP] Insidious!

2003-08-07 Thread Nicholas Robinson
Could this have anything to do with our being registered as spammers?

On Wednesday 06 Aug 2003 9:59 am, [EMAIL PROTECTED] wrote:
 Do you recall during the height of the War in March?
 I posted a simple joke - got one (positive) reply before getting kicked off
 the list by Mr Lerdorf himself.

 Now all of a sudden my inbox is FILLED with JUNK!  How many of you flamers
 are getting kicked off the (*%^$^%% list?

 At least I made a few people laugh!

 Oh - Apache vs. IIS, in case you forgot.

 Go ahead and kick me off the list again, moron


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



Re: [PHP] Downloding files once

2003-08-07 Thread CPT John W. Holmes
From: Boaz Yahav [EMAIL PROTECTED]
 
 Can you fake a referrer by say, using fsockopen() and sending your
 own headers?

Yep.

---John Holmes...


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



[PHP] Re: [PHP-WIN] Re: Can't Pass variable to other page

2003-08-07 Thread Miha Nedok


Or access you variables via $_GET.

$varname = $_GET['varname'];

-Mike


On Thu, 7 Aug 2003, Ben wrote:

 Date: Thu, 7 Aug 2003 10:25:57 +0100
 From: Ben [EMAIL PROTECTED]
 To: [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: [PHP-WIN] Re: Can't Pass variable to other page

 I had the same problem a couple of weeks ago.

 register_globals=On
 magic_quotes_runtime=Off

 Ben


 Jack [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Dear all
  I had write a script like this :
 
  $link = page.php?day=$daymonth=$monthyear=$year;
 
  when i click on the link, it should pass the parameter to page.php with
  $month and $year variables.
  It actually works fine in php4.2.1, but when i went to other office which
  got php5.0 above installed, using the same script, but it won't pass any
  parameters to page.php! How come?
 
  I heard there is something to set in the php5.0's php.ini before i can do
  so, is that right?
 
  Please could anyone give me a hand on this?
 
  Thx alot
 
  Jack
 
 



 --
 PHP Windows 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