[PHP] Processes under non-UNIX operating system

2002-11-19 Thread Noor Dawod
Hello all,

I was disappointed to know that other than UNIX, PHP doesn't support
processes, unless I don't have the latest news.

For my particular needs, and after investigating many sources, I see
that processes are my friend. My needs comprise of the following:

1) being able to listen on a specific port (use of 'sockets' module,
available for all OS's)
2) being able to listen to more than one connection on a particular port
(sockets)
3) being able to simultaneously serving more than one connection
4) each connection might take some time to finish, so I don't want a
bottleneck

Based on the above guidelines, this looks much like a HTTP server, but
it's not.

So, if I wish to create such a framework that would work in UNIX as well
as other OS's, what are my options in PHP? (I still can code that in C,
but I prefer PHP.)

Thanks,
Noor


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




Re: [PHP] problems with PHP code (Please help!)

2002-11-19 Thread Justin French
Ask your host to set-up a .htaccess file to turn register_globals ON, or you
need to do some research in the archives for "register globals"... it's been
discussed to death.

Basically, instead of a form value being something like $firsName, it's now
$_POST['firstName'] or $_GET['firstName'] (depending on the the method
specified in the  tag).


A quick fix would be to take note of the variables you're expecting from the
form, and re-assign them at the top of your script(s), eg:



...

Good luck,

Justin French






on 19/11/02 6:41 PM, `Yan Grossman ([EMAIL PROTECTED]) wrote:

> Dear Friends,
> 
> I run some PHP scripts to deal with sending forms data to my email adress.
> But, my "nice" Host provider upgraded the server to another version of PHP 4
> and I notice that now the scripts are not working.
> I don't receive the emails anymore.
> They say I have to make sure all my code works for PHP 4.23 or later...
> My code is very simple and uses the command mail().
> I don't know much about PHP, but I guess it should be simple to fix my
> problem.
> I attached one of my most simple scripts and hoping that you might be able
> to help me.
> Please help me.
> I really must fix this today.
> Thank you so much.
> 
> Yan
> 
> 

Justin French

http://Indent.com.au
Web Developent & 
Graphic Design



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




[PHP] Re: echoing date of first and last day of current week.

2002-11-19 Thread Noodle Snacks
I ended up using this:

$time = time();
$weekday = date('w',$time);
$suntimestamp = $time - ($weekday * 86400);
$sattimestamp = $suntimestamp + 604800;
 echo 'Words for the week from '.date('jS F Y',$suntimestamp).' to
'.date('jS F Y',$sattimestamp).'.';


--
JJ Harrison
[EMAIL PROTECTED]

"Noodle Snacks" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I want to get the unix timestamps of the first and last days of this
week...
>
> Currently I have this:
>
>  echo 'Words for the week from '.date('jS F Y',strtotime("last sunday")).'
> to '.date('jS F Y',strtotime ("next saturday")).'.';
>
> on saturday this showed the 10th to 23rd... Is there a good way to do this
> mathematically (for speed) or can someone think of a better string to
parse?
>
>
> --
> JJ Harrison
> [EMAIL PROTECTED]
>
>



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




[PHP] Re: problems with PHP code (Please help!)

2002-11-19 Thread Noodle Snacks
It it better that you use a subject that is related to the problem eg.
"Email Script not working after server upgrade"


--
JJ Harrison
[EMAIL PROTECTED]

"`Yan Grossman" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Dear Friends,
>
> I run some PHP scripts to deal with sending forms data to my email adress.
> But, my "nice" Host provider upgraded the server to another version of PHP
4
> and I notice that now the scripts are not working.
> I don't receive the emails anymore.
> They say I have to make sure all my code works for PHP 4.23 or later...
> My code is very simple and uses the command mail().
> I don't know much about PHP, but I guess it should be simple to fix my
> problem.
> I attached one of my most simple scripts and hoping that you might be able
> to help me.
> Please help me.
> I really must fix this today.
> Thank you so much.
>
> Yan
>
>
>



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




[PHP] communicate with cyrus imap

2002-11-19 Thread Petre Agenbag
Hi
I wonder if someone can give me some pointers on this.

I have cyrus/sendmail  running on a RH server, and it works great. I use
ximian evolution as my mail client and other users also has no problem
with OE or MO.
I've been looking at various web based mail clients to implement on my
server for my clients, but they all seem to have "messy" temp folders
that need to be taken care of with cron jobs etc, and it seems like
these temp folders/cron jobs are not 100% fool proof in either the size
that they grow, or in detecting "old" messages to delete.

So, I would just like to get my mind in line here with the actual
problem. Are these php based webmail clients "forced" to use this kind
of temp folder structure, or is there just no other way, and one would
have to "live with it". Would a Java client be less of a hassle then?

I would have asked something like " Can't you simply let cyrus handle
the whole process and just use php to create the 'frontend' " , but I
obviously don't know enough about the actual "workings" of these php
clients ( squirrel and webmail for instance ).

I just don't want to put one on my server as a solution to my clients if
I cannot be 100% assured and comfortable with the system as I am with
cyrus in general.

Thanks
Hope someone can enlighten me.





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




Re: [PHP] Re: problems with PHP code (Please help!)

2002-11-19 Thread Jason Wong
On Tuesday 19 November 2002 17:40, Noodle Snacks wrote:
> It it better that you use a subject that is related to the problem eg.
> "Email Script not working after server upgrade"

And also, it is better to include your code inline (as text) rather than as an 
attachment. A lot of people would not bother to open an attachment.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Don't shoot until you're sure you both aren't on the same side.
*/


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




[PHP] OOP - transfering object-pointer

2002-11-19 Thread Tularis
Currently, I have the following code:



class overall {
	var $loaded;
	
	function load($class){
		//eval("global \$$class;"); // This didn't work either
		$this->loaded[] = $class;
		eval("\$this->$class = new $class;");
		return true;
	}
}

class foo {
	var $bar;

	// Constructor
	function bar(){
		if(!isset($this->bar)){
			$this->bar = 1;
		}else{
			$this->bar++;
		}
		echo $this->bar."";
	}
}

// Start actual loading
$overall = new overall;
$overall->load('foo');

foreach($overall->loaded as $key=>$val){
	$key =& $overall->$key;
}

$overall->foo->bar();
$overall->foo->bar();
$overall->foo->bar();
$overall->foo->bar();

// it doesn't understand this
$foo->bar(); // line 42
?>

It all works, except for the $foo->bar(); thing... I am wondering how I 
can turn $overall->foo->bar() to $foo->bar(); as all the things I've 
tried, don't work, they don't give any errors, except for
Fatal error: Call to a member function on a non-object in 
d:\apache\htdocs\classes.php on line 42...

Could anyone help me with this?
thanx

- Tularis


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



[PHP] Re: OOP - transfering object-pointer

2002-11-19 Thread Tularis
actually, the foreach should read:
foreach($overall->loaded as $key=>$val){
	$val =& $overall->$val;
}

still doens't work though

Tularis wrote:


Currently, I have the following code:

loaded[] = $class;
eval("\$this->$class = new $class;");
return true;
}
}

class foo {
var $bar;

// Constructor
function bar(){
if(!isset($this->bar)){
$this->bar = 1;
}else{
$this->bar++;
}
echo $this->bar."
";
}
}

// Start actual loading
$overall = new overall;
$overall->load('foo');

foreach($overall->loaded as $key=>$val){
$key =& $overall->$key;
}

$overall->foo->bar();
$overall->foo->bar();
$overall->foo->bar();
$overall->foo->bar();

// it doesn't understand this
$foo->bar(); // line 42
?>

It all works, except for the $foo->bar(); thing... I am wondering how I
can turn $overall->foo->bar() to $foo->bar(); as all the things I've
tried, don't work, they don't give any errors, except for
Fatal error: Call to a member function on a non-object in
d:\apache\htdocs\classes.php on line 42...

Could anyone help me with this?
thanx

- Tularis




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




[PHP] problem with code (almost fixed)

2002-11-19 Thread Yan Grossman
Hi,
I fixed my code to handle forms using $_REQUEST. Just having problem with
the fields with multiple contents...
the one you have to call  like field[0], field[1],etc...

How do I use the brackets inside brackets?
my case is this:
Thanks.
I have fixed everything with $_REQUEST
but I am having problem with the multiple fields, like this:
$message .= ("hotel = " . $_REQUEST['pac_hot[0]'] . " - ".
$_REQUEST['pac_hot[1]']. " - " .$_REQUEST['pac_hot[2]'] . " -
".$_REQUEST['pac_hot[3]'] . "\n");

How am I going to use the brackets inside the brackets?
Thanks



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




RE: [PHP] problem with code (almost fixed)

2002-11-19 Thread Noor Dawod
You'd write something like:

$_REQUEST['pac_hot'][0], $_REQUEST['pac_hot'][1] and so on.

Noor


> -Original Message-
> From: Yan Grossman [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 12:07 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] problem with code (almost fixed)
> 
> 
> Hi,
> I fixed my code to handle forms using $_REQUEST. Just having 
> problem with
> the fields with multiple contents...
> the one you have to call  like field[0], field[1],etc...
> 
> How do I use the brackets inside brackets?
> my case is this:
> Thanks.
> I have fixed everything with $_REQUEST
> but I am having problem with the multiple fields, like this:
> $message .= ("hotel = " . $_REQUEST['pac_hot[0]'] . " - ".
> $_REQUEST['pac_hot[1]']. " - " .$_REQUEST['pac_hot[2]'] . " -
> ".$_REQUEST['pac_hot[3]'] . "\n");
> 
> How am I going to use the brackets inside the brackets?
> Thanks
> 
> 
> 
> -- 
> 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] Looking for compiled Windows PHP installation with multistring fts support

2002-11-19 Thread Simon Dedeyne

Hi,

Does anybody know where to find a pre-compiled Windows (XP) version of
PHP that includes multistring functions? I checked phpdev on firegpages
and other sites that usually hold these installations but their versions
don't support those multistrings yet. Any help/links are appreciated!

Simon


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




[PHP] Re: Swear word substitution

2002-11-19 Thread Craig Donnelly
http://www.evilwalrus.com/viewcode/560.php

"Cj" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm posting this again as i got a mail saying
>
> Trend SMEX Content Filter has detected sensitive content.
>
> Place = [EMAIL PROTECTED]; ;
> Sender = CJ
> Subject = [PHP] Swear word substitution
> Delivery Time = November 14, 2002 (Thursday) 23:40:23
> Policy = Dirty Words
> Action on this mail = Delete message
>
> Warning message from administrator:
> Sender, Content filter has detected a sensitive e-mail.
>
> There was not a swear word in my original post but there was a word that
> contained a swear word but is itself not a swear word.  The word is Scu
>
> n
>
> thorpe
>
> and I need a script to allow wordslike this but remove proper swearwords.
>
> I've got a mysql based website with a php scripted fromt end.  I want to
> parse the output the php scripts get from the database before "printing it
> as html" for swear words and substitute these for more acceptable words
(on
> a word for word basis). I need to do it this way as I want to keep the
> original posts in their "rude" form in case I need evidence for misuse of
> the site.  I need to be able to check for words separated by non alpha
> characters in case people get clever and write obscenities separated w i t
h
> s p a c e s or with o_t_h_e_r characters or even new
> l
> i
> n
> e
> s
> or wordsruntogetherintoonelongword.
> I also want a list of permitted words that contain swearwords such as
> "Sc%%thorpe" which won't get changed.
>
> Has anybody done this?  I have a feeling that there is a 1 line regular
> expression out there that will do this nicely.
>
> Any help appreciated
>
> Feeling rusty at coding...
>
> CJ
>
>



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




Re: [PHP] speed comparison

2002-11-19 Thread Marek Kilimajer
I like to see html highlighting, so I prefer first method, but for some 
small snippets I also use echo

Ernest E Vogelsinger wrote:

As Maxim pointed out a couple of days ago, this is just a matter of
nanosecs, it shouldn't be really noticeable from performance.

The fastest was to display non-PHP output is to escape from PHP and enter
plain HTML, like
   $a = 'World';
   ?>
   Hello !
   

This is quite ugly to read and write, and it prohibits to separate content
from output. So the next fast way to output would be
   echo 'Hello World!';
Note the single quotes - they are (_very_slightly_) faster than double quotes.

If you need to display variables you must revert to
   echo "Hello $a!";
to parse the string (note the double quotes here).

I would always prefer to have to buy a faster server and use the second or
third method than having to escape from PHP for any output, for what it's
worth.


 



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




[PHP] Display character 'x' times

2002-11-19 Thread Tjoumaidis Tasos
Hello to everybody,

I just want to display a character like D x times like DDD where x is a 
$variable i get from the database i cannot make it work like it is on 
perl (i don't even know if it is working the same way) and i can't find 
a reference in the manual on php.net, maybe it's a silly question but i 
am stuck at this moment.

Thx in advance.


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



[PHP] What is the best site for PHP news, articles, resources etc....

2002-11-19 Thread Phil Schwarzmann
Let's say you had one site and one site only to get the latest PHP/MySQL
news, articles, reviews, resources, tutorials, advanced stuff etc.
 
What would it be?!?



[PHP] Has anyone used O'Reilly's "Safari" online book thingy for PHP/MySQL?

2002-11-19 Thread Phil Schwarzmann
Has anyone used book publisher O'Reilly's new "Safari" online book site
for PHP/MySQL books?  I was hoping to use it so I could download whole
books and possibly print them out.is it capable of doing something
like this or is it next to impossible? 



[PHP] Re: problem with code (almost fixed)

2002-11-19 Thread Tularis
Yan Grossman wrote:


Hi,
I fixed my code to handle forms using $_REQUEST. Just having problem with
the fields with multiple contents...
the one you have to call  like field[0], field[1],etc...

How do I use the brackets inside brackets?
my case is this:
Thanks.
I have fixed everything with $_REQUEST
but I am having problem with the multiple fields, like this:
$message .= ("hotel = " . $_REQUEST['pac_hot[0]'] . " - ".
$_REQUEST['pac_hot[1]']. " - " .$_REQUEST['pac_hot[2]'] . " -
".$_REQUEST['pac_hot[3]'] . "\n");

How am I going to use the brackets inside the brackets?
Thanks



first, change this: $_REQUEST['pac_hot[0]'] to: $_REQUEST["$pac_hot[0]"]
a single quote (  '  ) disallows variable-matching, meaning it won't 
replace $var by what it should be, it just leaves it as it where a real 
character it should show.

that should work on all your request array stuff hope this helps :)


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



[PHP] Re: What is the best site for PHP news, articles, resources etc....

2002-11-19 Thread Tularis
Phil Schwarzmann wrote:


Let's say you had one site and one site only to get the latest PHP/MySQL
news, articles, reviews, resources, tutorials, advanced stuff etc.

What would it be?!?


zend.com :)


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




Re: [PHP] Display character 'x' times

2002-11-19 Thread Khalid El-Kary
hi,

$numtimes=400;
for ($i=1;$i<=400;$i++)
{
echo 'd';
}

---Or---

$numtimes=400;
for ($i=1;$i<=400;$i++)
  echo 'd';

-Or

$numtimes=400;
for ($i=1;$i<=400;$i++)
{?>d



_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


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



[PHP] Re: Display character 'x' times

2002-11-19 Thread Tularis
Tjoumaidis Tasos wrote:


Hello to everybody,

I just want to display a character like D x times like DDD where x is a
$variable i get from the database i cannot make it work like it is on
perl (i don't even know if it is working the same way) and i can't find
a reference in the manual on php.net, maybe it's a silly question but i
am stuck at this moment.

Thx in advance.


there propably is a faster way, but you can use this:
$max = the amount of times you want it to show :) //eg 6 would give dd
while($i <= $max){
	echo 'd'; //or any character you want
	$i++;
}


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




RE: [PHP] Re: problem with code (almost fixed)

2002-11-19 Thread Noor Dawod

> -Original Message-
> From: Tularis [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 12:45 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: problem with code (almost fixed)
>
> first, change this: $_REQUEST['pac_hot[0]'] to:
> $_REQUEST["$pac_hot[0]"]
> a single quote (  '  ) disallows variable-matching, meaning it won't
> replace $var by what it should be, it just leaves it as it
> where a real
> character it should show.
>
> that should work on all your request array stuff hope
> this helps :)
>

That would not work if register_globals is not turned ON. Actually, if
it'd work, it's useless to use $_REQUEST as you already have the
variable available in the global space.

Noor


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




Re: [PHP] Display character 'x' times

2002-11-19 Thread Neil Freeman
str_repeat ()

Tjoumaidis Tasos wrote:


** 

This Message Was Virus Checked With : SAVI 3.61 September 2002 Last 
Updated 15th November 2002
** 


Hello to everybody,

I just want to display a character like D x times like DDD where x is 
a $variable i get from the database i cannot make it work like it is 
on perl (i don't even know if it is working the same way) and i can't 
find a reference in the manual on php.net, maybe it's a silly question 
but i am stuck at this moment.

Thx in advance.



--
--
www.curvedvision.com
--



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




Re: [PHP] Display character 'x' times

2002-11-19 Thread Steel
Hi Tjoumaidis,

Tuesday, November 19, 2002, 1:30:39 PM, I've got:

TT> Hello to everybody,

TT> I just want to display a character like D x times like DDD where x is a 
TT> $variable i get from the database i cannot make it work like it is on 
TT> perl (i don't even know if it is working the same way) and i can't find 
TT> a reference in the manual on php.net, maybe it's a silly question but i 
TT> am stuck at this moment.

TT> Thx in advance.


$str=str_repeat('D',$mult);
This is the equivalent of Perl's "x" (repetition) operator,
for eg.  str_repeat("blah", 8) in PHP does the same thing
as "blah" x 8 in Perl.

Answer from PHP Manual.
Comment by:
[EMAIL PROTECTED] (25-Oct-2001 11:16)

-- 
The Same,
 Steelmailto:[EMAIL PROTECTED]
   http://www.none.ru


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




[PHP] Loooooooooonnnnnnnnnnggggggggg

2002-11-19 Thread Hacook
Hi all,
I made a script that works on a very long charachter chain and its process
is lnggg about 5 minutes !
Do you have any  tips to make it faster ?
Thanks,
Hacook



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




RE: [PHP] Loooooooooonnnnnnnnnnggggggggg

2002-11-19 Thread Jon Haworth
Hi,

> I made a script that works on a very long charachter 
> chain and its process is lnggg about 5 minutes !
> Do you have any  tips to make it faster ?

My mysterious ninja PHP developer powers have told me that you need to
fiddle with lines 23 and 72, that's where it's slowing down.

IOW, it would be helpful if you could post the code for this script.

Without seeing it the only thing I can suggest is you minimise the amount of
string concatenations, as this is a fairly expensive operation.

Cheers
Jon

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




Re: [PHP] Loooooooooonnnnnnnnnnggggggggg

2002-11-19 Thread Justin French
on 19/11/02 10:00 PM, Hacook ([EMAIL PROTECTED]) wrote:

> Do you have any  tips to make it faster ?

The answers will come in faster if you tell us how you're "processing" it.

Justin French

http://Indent.com.au
Web Developent & 
Graphic Design



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




Re: [PHP] Display character 'x' times - Solved

2002-11-19 Thread Tjoumaidis Tasos
Great, That's exactly what i was looking for, thx to the other guys as 
well and sorry for not mentioning the whole problem which was that i 
wanted to pass the value to a variable.


Steel wrote:
Hi Tjoumaidis,

Tuesday, November 19, 2002, 1:30:39 PM, I've got:

TT> Hello to everybody,

TT> I just want to display a character like D x times like DDD where x is a 
TT> $variable i get from the database i cannot make it work like it is on 
TT> perl (i don't even know if it is working the same way) and i can't find 
TT> a reference in the manual on php.net, maybe it's a silly question but i 
TT> am stuck at this moment.

TT> Thx in advance.


$str=str_repeat('D',$mult);
This is the equivalent of Perl's "x" (repetition) operator,
for eg.  str_repeat("blah", 8) in PHP does the same thing
as "blah" x 8 in Perl.

Answer from PHP Manual.
Comment by:
[EMAIL PROTECTED] (25-Oct-2001 11:16)



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




Re: [PHP] Loooooooooonnnnnnnnnnggggggggg

2002-11-19 Thread Marek Kilimajer
die()

but seriosly, if you don't tell us what the script does, we can't tell 
you if it can be made faster

Hacook wrote:

Hi all,
I made a script that works on a very long charachter chain and its process
is lnggg about 5 minutes !
Do you have any  tips to make it faster ?
Thanks,
Hacook



 



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




Re: [PHP] post files array and registered globals off

2002-11-19 Thread Marek Kilimajer
Sorry, now I noticed I forgot to add [$i]:
if(!$_FILES['photo']['tmp_name'][$i]) break;

Marek Kilimajer wrote:


you need to do it another way, e.g.:

for($i=0; $i < MAX_FILES; $i++) {
   if(!$_FILES['photo']['tmp_name']) break;

   ... now work with the file.

}

electroteque wrote:


hi i need to do a foreach on post files array ie



_REQUEST['photo'] or _POST['photo'] doesnt work

only _FILES['photo'] works and if i do a foreach on this it gets the 5
associated array values for it not on the input value array ? say i 
had 2
input files i should get a count of 2 not 5 :|



 






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




[PHP] Have fun! 3 Days for free! or for one month! every day 24 hours!

2002-11-19 Thread hotstuff

Show this line!

http://www.tgpfriendly2.com/members/switzerland/pussyline/

it\'s  an switzerline 

Have fun!  Days for free!

http://www.tgpfriendly2.com/members/switzerland/pussyline/



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




Fw: [PHP] Loooooooooonnnnnnnnnnggggggggg

2002-11-19 Thread Tristan Carron

- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "Tristan Carron" <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 12:23 PM
Subject: Re: [PHP] Loonng


> You should post this to the list, not me direct :)
>
> Justin
>
>
> on 19/11/02 10:10 PM, Tristan Carron ([EMAIL PROTECTED]) wrote:
>
> > sorry i forgot the script (excuse me, but i'm dumb)
> >
> > As the full code is too long, i'll just give u a function that i think
could
> > be better, there you go (good luck):
> >
> > function conte($string){
> >
> > $number=l($string);
> > $i=0;
> > $url_modif="";
> >
> > while($i<$number-1){
> >
> > if($string[$i]=="*"){
> >
> >
> > for($j=0;$j<=$i-1;$j++){
> >
> > $url_modif=$url_modif.$string[$j];
> >
> > }
> > return $url_modif;
> > break;
> >
> > }
> > else{
> >
> > $i++;
> >
> > }
> >
> > }
> >
> > if(($string!=$url_modif) && ((strlen($url_modif))=="0")){
> >
> > return $string;
> >
> > }
> >
> > else {
> >
> > return $url_modif;
> >
> > }
> >
> > }
> >
> > - Original Message -
> > From: "Justin French" <[EMAIL PROTECTED]>
> > Newsgroups: php.general
> > To: "Hacook" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Tuesday, November 19, 2002 12:09 PM
> > Subject: Re: [PHP] Loonng
> >
> >
> >> on 19/11/02 10:00 PM, Hacook ([EMAIL PROTECTED]) wrote:
> >>
> >>> Do you have any  tips to make it faster ?
> >>
> >> The answers will come in faster if you tell us how you're "processing"
it.
> >>
> >> Justin French
> >> 
> >> http://Indent.com.au
> >> Web Developent &
> >> Graphic Design
> >> 
> >>
> >
> >
>
> Justin French
> 
> http://Indent.com.au
> Web Developent &
> Graphic Design
> 
>


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




Re: [PHP] is this not possible?

2002-11-19 Thread Mark
I'd say you've already determined the simplest way to do it. 
When the page is generated by PHP, have it insert the 
necessary data into appropriate places in a javascript function.

When a user clicks the 'recharge' button, they are prompted for
the amount they wish to use to recharge, and then are shown another
javascript pop-up confirming the changes. The javascript function
then refreshes the calling page, with the appropriate values,
using one of the functions Ernest mentioned.

When you say "it can take sometime for this page load at times",
do you mean that all page requests take a while sometimes, or simply
that page because of the amount of data it shows, and certain processing
that needs to be done in order to display that page?

If it's the latter, then you could redirect the user to a much
simpler page for the purposes of recharging their card, and do away
with javascript completely (which means you don't have to worry
about people disabling javascript).

-Mark


- Original message -
From: "Jeff Bluemel" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Mon, 18 Nov 2002 17:24:52 -0700
Subject: Re: [PHP] is this not possible?

here's the URL if case somebody decides to look at it;

http://obi-wan.domintcom.com
user: guest
pass: domintcom

go to customer service, prepaid pin, and then look up 3077876962  -
activate, deactivate, and recharge

this is for customer service of prepaid phone cards.

now - when I reload this page to refresh the information sometimes it can
really take awhile.

I need to somehow get the information from the user on how much to
recharge
the pin for.  now, before I refresh the page I need to get how much the
user
wants to recharge, process the recharge, and then refresh the page that
all
of this started on.

I thought it would be the simplest if I could somehow use javascript to
prompt the user for a value, confirm if the user wants to recharge
x
pin for $xx.xx, recharge the pin, and then refresh the calling page so it
now reflects the new balance.

I don't want to refresh original page until this is all done because it
can
take sometime for this page load at times.

is everybody lost now?

"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> At 22:39 18.11.2002, Jeff Bluemel spoke out and said:
> [snip]
> >I'm been ignored on this question for 4-5 days now.  even if it is not
> >possible could somebody please verify this?
> >
> >is it possible to pass a variable from javascript directly to php WITHOUT
> >using either a link, or a form submit to pass the variables?  I've gotten
a
> >work around to call an image that's actually a php file, but run my
script,
> >and then return an image file.
> >
> >is this the only way?
> [snip]
>
> Generally spoken, yes - the browser needs to pass the data back to the
> server somehow.
>
> What are you really up to? Do you want to transmit data to the server
> without the user clicking on a link or a button?
>
> You can always use JavaScript to submit a form (even a hidden-only form),
> or to reload the document with the same or a different URL.
>
> URL-Reload:
>
> document.location.href = url;
>
> Form submit:
>
> document.forms[formname].submit();
>
>
> --
>>O Ernest E. Vogelsinger
>(\) ICQ #13394035
> ^ http://www.vogelsinger.at/
>



-- 
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] Misbehaved Script...

2002-11-19 Thread Kondwani Spike Mkandawire
Hi folks:

Have any of you guys encountered the following error:

CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:

My Scripts that require user interaction and
self modification often encounter this.  I have no clue as to
what's going on.  I have to reboot the server when
this happens and it seems to fix the problem...
I don't think this has anything to do with my scripts...
Could someone please suggest whats wrong...

My Server has Microsoft IIS 4.0 on Win NT 4 and
is running PHP 4.2.1.

Thanks in advance.

Spike



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




Re: [PHP] New commercial software needs beta testers

2002-11-19 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

hmmI hope you're happy cause you certainly gave Intravative Software a 
bad public image. I wouldn't buy/try betas from your company for NOTHING
~Paul

On Wednesday 13 November 2002 05:14 pm, Jeremy Wilson wrote:
> Well fine... by reading a bunch of your other posts when you talk to
> people, it looks like you are just a rude SOB... so I am really not
> offended.
>
>
>
> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 13, 2002 2:20 PM
> To: Jeremy Wilson
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] New commercial software needs beta testers
>
> You spammed 6 different lists with the same message.  What in the world
> does it have to do with PHP Installation issues, for example?  It's
> spam,
> and your domain has been blocked.
>
> -Rasmus
>
> On Wed, 13 Nov 2002, Jeremy Wilson wrote:
> > Hey it isn't spam. This is php specific
> >
> > -Original Message-
> > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, November 13, 2002 2:15 PM
> > To: [EMAIL PROTECTED]
> > Cc: Jeremy Wilson
> > Subject: Re: [PHP] New commercial software needs beta testers
> >
> > Argh!  That's the second commercial spam message to hit multiple php
> > lists
> > in a couple of days.
> >
> > This company has been blocked from further posting as well now.
> >
> > -Rasmus
> >
> > On Wed, 13 Nov 2002, Jeremy Wilson wrote:
> > > Intravative Software Corporation will be releasing a new commercial
> > > software
> > > application in January 2003 called iIPN. The software enables paypal
> > > sellers
> > > to sell and automatically deliver digital and non-digital products
> >
> > from
> >
> > > their web site. The software is currently the most robust out of any
> > > other
> > > commercial grade pay pal software and was designed with software
> > > publishers
> > > and music producers in mind for distributing their goods and
>
> services.
>
> > > We are performing consumer based beta testing for the month of
> >
> > December
> >
> > > 2002
> > > and are accepting applications for people who would like to
> >
> > participate
> >
> > > in
> > > the beta program.
> > >
> > > Accepted Beta testers receive a free domain license and fully
> >
> > functional
> >
> > > software for this product to test with. You must provide your own
> >
> > server
> >
> > > and
> > > equipment to do the beta testing with.
> > >
> > > At the end of the beta testing period for this program, beta testers
> > > will
> > > receive a free copy of the final release software and a single
>
> domain
>
> > > license for using the software.
> > >
> > > Application URL: http://www.intravative.com/v2/iipn_betatester.php

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
[EMAIL PROTECTED]
www.webpowerdesign.net
"The webthe way you want it!"


"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE92jjkDyXNIUN3+UQRAiF+AJ0b9HNVs+NTtl4PdAwVlfEM9VROowCeJZsZ
Ri60PGpO3iJ+nzavXuJu3yQ=
=HZet
-END PGP SIGNATURE-

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




Re: Fw: [PHP] Loooooooooonnnnnnnnnnggggggggg

2002-11-19 Thread Marek Kilimajer
Your function seems to return string before first occurence of '*'.
This should be faster:

function conte($string) {
   return substr($string,0,strrpos($string,'*'));
}

Tristan Carron wrote:


- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "Tristan Carron" <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 12:23 PM
Subject: Re: [PHP] Loonng


 

You should post this to the list, not me direct :)

Justin


on 19/11/02 10:10 PM, Tristan Carron ([EMAIL PROTECTED]) wrote:

   

sorry i forgot the script (excuse me, but i'm dumb)

As the full code is too long, i'll just give u a function that i think
 

could
 

be better, there you go (good luck):

function conte($string){

$number=l($string);
$i=0;
$url_modif="";

while($i<$number-1){

if($string[$i]=="*"){


for($j=0;$j<=$i-1;$j++){

$url_modif=$url_modif.$string[$j];

}
return $url_modif;
break;

}
else{

$i++;

}

}

if(($string!=$url_modif) && ((strlen($url_modif))=="0")){

return $string;

}

else {

return $url_modif;

}

}

- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: "Hacook" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 12:09 PM
Subject: Re: [PHP] Loonng


 

on 19/11/02 10:00 PM, Hacook ([EMAIL PROTECTED]) wrote:

   

Do you have any  tips to make it faster ?
 

The answers will come in faster if you tell us how you're "processing"
   

it.
 

Justin French

http://Indent.com.au
Web Developent &
Graphic Design


   

 

Justin French

http://Indent.com.au
Web Developent &
Graphic Design


   



 



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




[PHP] Free MySQL Hosting :)

2002-11-19 Thread PHP Mailing List
As a project I'm working on that will later manifest into something more, 
I'm offering free MySQL hosting on one of my servers. Just enter the 
desired username and password, and 3 databases will be created for you to 
use from your PHP scripts. The info you'll need to connect to the MySQL 
server will be provided.

Don't expect some grand website when you click the URL, it's just a 
simple page I put up that does nothing but create the databases. :)

http://64.53.137.236:82/


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




[PHP] Re: Distance Based on Zip Code

2002-11-19 Thread UberGoober
Another resource to check out:
http://www.onlamp.com/pub/a/php/2002/11/07/php_map.html


"Vernon" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Does anyone know how I can set something up that tells the distance
between
> one Zip Code and another? I'm needing to be able to set something up where
> one user's record is compared to another and a distance is measured. Any
> have any ideas?



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




[PHP] New Site to submit your scripts to..

2002-11-19 Thread PHP Mailing List
I've recently finished creating a Script Index (almost identical to 
HotScripts) for people to submit their PHP (and Perl) scripts. The 
database right now is over 7,000 (both PHP and Perl), but only because 
I've collected the data from other sites. If you have a script, I ask of 
you to submit it here. :) Think of it as one more place to have your 
script noticed, and rank one notch higher in the search engines, as well 
as helping out another script index site. :)

PHP Scripts: http://www.nukedweb.com/php/
Perl Scripts: http://www.nukedweb.com/perl/
You can submit scripts by browsing to the correct category and clicking 
the Add a Script link at the top. Indexes are recompiled a few times a 
day. :)

Also, if you have a website directed at other webmasters, feel free to 
submit it to the Website Resources Index at 
http://www.nukedweb.com/webresources/ :)


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




Re: [PHP] How I Got PHP4.2.2, Apache 2.0, mySQL and RedHat 8.0 towork

2002-11-19 Thread Adam Williams
Not to burst your bubble, but I'have had all of this working since the day
RedHat 8.0 was released.  Though I compiled everything by hand instead of
using RedHat's RPMs.  Just read the comments on php.net under the
apache/unix install and did what they said to add to httpd.conf for PHP.

Adam

On Mon, 18 Nov 2002, Daevid Vincent wrote:

> Well, it seems there are some glitches with and snags and other fun
> stuff to deal with when doing a straight RedHat 8.0 install. It turns
> out you have to edit your /etc/php.ini and uncomment out the
> "extension=mysql.so" line for starters. It also helps to set
> "short_open_tag = On".
>
> Another fun thing to contend with is the fact that "register_globals" is
> now off by default, s, read this page:
> http://www.zend.com/zend/art/art-sweat4.php to see how to get around
> this (without turning RG on of course).
>
> I have some sites that use .php and some that use .phtml and you'd think
> it would be as simple as modifying /etc/httpd/conf.d/php.conf, dupe the
> entry and change the extension. Wrong. What I did was change it to:
>
> 
> SetOutputFilter PHP
> SetInputFilter PHP
> LimitRequestBody 524288
> 
> DirectoryIndex index.php index.phtml
>
> I use virtual hosts but none use SSL currently, and haven't figured that
> part out with the SSL.conf so I just renamed it to ssl.conf.disabled and
> created a virtual-hosts.conf that looks like this:
>
> 
> DocumentRoot /home/foo/public_html
> ServerName foo.com
> ServerAlias ww.foo.com *.foo.*
> ErrorLog logs/foo-error_log
> CustomLog logs/foo-access_log common
> 
>
> And at the end of the httpd.conf file you have to turn VH on by
> uncommenting "NameVirtualHost *"
> And I also added this at the bottom to catch all that don't match with
> an entry in my virtual-hosts.conf file above:
>
> 
> ServerAdmin webmaster@localhost
> DocumentRoot /var/www/html
> ServerName localhost
> ErrorLog /etc/httpd/logs/error_log
> CustomLog /etc/httpd/logs/access_log common
> 
>
> I also went ahead and installed mySQL-MAX, so you need to create a
> /etc/my.cnf file and put something like:
>
> [mysqld]
>
> # You can write your other MySQL server options here
> # ...
>
> innodb_data_home_dir=
>
> #  Data file(s) must be able to
> #  hold your data and indexes.
> #  Make sure you have enough
> #  free disk space.
> innodb_data_file_path = ibdata1:10M:autoextend
>
> #  Set buffer pool size to
> #  50 - 80 % of your computer's
> #  memory
> set-variable = innodb_buffer_pool_size=70M
> set-variable = innodb_additional_mem_pool_size=10M
>
> #  Set the log file size to about
> #  25 % of the buffer pool size
> set-variable = innodb_log_file_size=20M
> set-variable = innodb_log_buffer_size=8M
>
> #  Set ..flush_log_at_trx_commit
> #  to 0 if you can afford losing
> #  some last transactions
> innodb_flush_log_at_trx_commit=1
>
> set-variable = innodb_lock_wait_timeout=50
> #innodb_flush_method=fdatasync
> #set-variable = innodb_thread_concurrency=5
>
> skip-locking
> set-variable = max_connections=200
> #set-variable = read_buffer_size=1M
> set-variable = sort_buffer=1M
> #  Set key_buffer to 5 - 50%
> #  of your RAM depending on how
> #  much you use MyISAM tables, but
> #  keep key_buffer + InnoDB
> #  buffer pool size < 80% of
> #  your RAM
> set-variable = key_buffer=10M
>
> Somehow the pretty "/etc/rc.d/init.d/mysql" script has changed (probably
> due to mysqlMax) I like the old one with the green [ OK ] messages like
> everything else there and I'm not sure how to get it back :( but it
> works for now and I have innoDB tables, so I can't complain too much.
>
> Hope this helps someone and saves them the nearly 7 hours I've spent
> today getting it all working. Most of that is sifting through a million
> web pages and trying to find the magic incantation on Google to get the
> solutions.
>
> DÆVID.
> http://daevid.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] catching a robot or spider

2002-11-19 Thread Wilbert Enserink
Hi all,


does anybody know a way to make a distinction between robots and users?
should I use the user agent? Or is this not a safe method.
If the visitor is a spider/robot I want to include some script containing extra URL's 
for the robot.

regards Wilbert


-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


Re: [PHP] Free MySQL Hosting :)

2002-11-19 Thread Adam Voigt
Dude, you rock, way to give to the community.

On Tue, 2002-11-19 at 08:34, PHP Mailing List wrote:
> As a project I'm working on that will later manifest into something more, 
> I'm offering free MySQL hosting on one of my servers. Just enter the 
> desired username and password, and 3 databases will be created for you to 
> use from your PHP scripts. The info you'll need to connect to the MySQL 
> server will be provided.
> 
> Don't expect some grand website when you click the URL, it's just a 
> simple page I put up that does nothing but create the databases. :)
> 
> http://64.53.137.236:82/
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


Re: [PHP] Has anyone used O'Reilly's "Safari" online book thingyfor PHP/MySQL?

2002-11-19 Thread Jason Sheets
I'm currently subsribed to Oreilly's Safari.

I find it very useful for coming up to speed quickly but even though the
complete book is available online it is still no replacement for a hard
copy of a book.  I usually read the book online then buy it if I like
it.

I have not read any of the MySQL books online but I have read several
PostgreSQL and C/C++ books.

Jason


On Tue, 2002-11-19 at 03:48, Phil Schwarzmann wrote:
> Has anyone used book publisher O'Reilly's new "Safari" online book site
> for PHP/MySQL books?  I was hoping to use it so I could download whole
> books and possibly print them out.is it capable of doing something
> like this or is it next to impossible? 


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




[PHP] test

2002-11-19 Thread shi ziye
test post only

_
Ãâ·ÑÏÂÔØ MSN Explorer:  http://explorer.msn.com/lccn/


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




[PHP] about processing time of function INCLUDE

2002-11-19 Thread Bryan
Is it will increase the processing time when too many "include" process in a
program?



Bryan





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




[PHP] about processing time of function INCLUDE

2002-11-19 Thread Bryan
Is it will increase the processing time when too many "include" process in a
program?



Bryan




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




[PHP] Capturing multiple select with Javascript - nearly there

2002-11-19 Thread Phoebe Bright
I want to use Javascript to move items from a source list to a 
destination list and then PHP to retrieve the items in the destination 
list.  After much head bashing and pointers from various forum archives 
I am nearly there!  Can anyone help me?

My  remaining problem is that the array that PHP sees only has the final 
few characters of the values it should have.

This is the result of print_r after selecting two items (analysis1 and 
analysis3):

 Array ( [0] => ysis1 [1] => ysis3 )

expecting:

 Array ( [0] => analysis1 [1] => analysis3 )


Here is the code:



Edit Preferences print_r($_POST['destList']); ?> Current Order   New Order Product Source Contact Order Date Gross VAT Nett     -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] New generation of PHP Program, reaction to ASP.NET

2002-11-19 Thread shi ziye
WOOP (Web Object Of Php)
Have you write PHP program like this ?

// begin
class TForm extends System_UI_Form
{
	function init()
	{
		$this->label1 = & new System_UI_Label("label1", &$this);
		$this->button1 = & new System_UI_Button("button1", &$this);
		$this->button2 = & new System_UI_Button("button2", &$this);
		
		$this->label1->caption = "23";

		$this->button1->caption = "number+1";
		$this->button1->onclick = "button1click";
		
		$this->button2->caption = "number-1";
		$this->button2->onclick = "button2click";
	}

	function button1click()
	{
		$this->label1->caption++;
	}
	
	
	function button2click()
	{
		$this->label1->caption--;
	}	
}

$form1 = & new TForm("form1");
$form1->init();

//end

to see the result of this program
Goto http://www.shiziye.net/woop

I need your help to finish this system together!!!



_
Ãâ·ÑÏÂÔØ MSN Explorer:  http://explorer.msn.com/lccn/


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




[PHP] which PHP debugger?

2002-11-19 Thread Otakar Kverka
Hi all,
please which PHP debugger is the "best one"? (fast keyboard commands,
variables, includes, reliability etc.).
Which PHP debugger works well under Windows, which under Linux?

thanks...

---
Odchozí zpráva neobsahuje viry.
Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz).
Verze: 6.0.419 / Virová báze: 235 - datum vydání: 13.11.2002
 


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




Re: [PHP] New generation of PHP Program, reaction to ASP.NET

2002-11-19 Thread 1LT John W. Holmes
Is there a question in here somewhere? What do you need help with?

---John Holmes...

- Original Message -
From: "shi ziye" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 9:20 AM
Subject: [PHP] New generation of PHP Program, reaction to ASP.NET


> WOOP (Web Object Of Php)
> Have you write PHP program like this ?
>
> // begin
> class TForm extends System_UI_Form
> {
> function init()
> {
> $this->label1 = & new System_UI_Label("label1", &$this);
> $this->button1 = & new System_UI_Button("button1", &$this);
> $this->button2 = & new System_UI_Button("button2", &$this);
>
> $this->label1->caption = "23";
>
> $this->button1->caption = "number+1";
> $this->button1->onclick = "button1click";
>
> $this->button2->caption = "number-1";
> $this->button2->onclick = "button2click";
> }
>
> function button1click()
> {
> $this->label1->caption++;
> }
>
>
> function button2click()
> {
> $this->label1->caption--;
> }
> }
>
> $form1 = & new TForm("form1");
> $form1->init();
>
> //end
>
> to see the result of this program
> Goto http://www.shiziye.net/woop
>
> I need your help to finish this system together!!!
>
>
>
> _
> Ãâ·ÑÏÂÔØ MSN Explorer:  http://explorer.msn.com/lccn/
>
>
> --
> 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] which PHP debugger?

2002-11-19 Thread bbonkosk
h...
I *think* PHP is platform independant for the most part, and it is not like it 
is a compiled language where you have fancy debuggers to set breakpoints, step 
through the code, etc...

Why not use the functions built into PHP?
echo " ";
if a mysql problem: mysql_error()

-Brad

> Hi all,
> please which PHP debugger is the "best one"? (fast keyboard commands,
> variables, includes, reliability etc.).
> Which PHP debugger works well under Windows, which under Linux?
> 
> thanks...
> 
> ---
> Odchozí zpráva neobsahuje viry.
> Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz).
> Verze: 6.0.419 / Virová báze: 235 - datum vydání: 13.11.2002
>  
> 
> 
> --
> 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] which PHP debugger?

2002-11-19 Thread Adam Voigt
Actually, I belive you can set breakpoints and step through code with
Zend Studio. (Free download for personal use).

http://www.zend.com


On Tue, 2002-11-19 at 04:35, [EMAIL PROTECTED] wrote:
> h...
> I *think* PHP is platform independant for the most part, and it is not like it 
> is a compiled language where you have fancy debuggers to set breakpoints, step 
> through the code, etc...
> 
> Why not use the functions built into PHP?
> echo " ";
> if a mysql problem: mysql_error()
> 
> -Brad
> 
> > Hi all,
> > please which PHP debugger is the "best one"? (fast keyboard commands,
> > variables, includes, reliability etc.).
> > Which PHP debugger works well under Windows, which under Linux?
> > 
> > thanks...
> > 
> > ---
> > Odchozí zpráva neobsahuje viry.
> > Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz).
> > Verze: 6.0.419 / Virová báze: 235 - datum vydání: 13.11.2002
> >  
> > 
> > 
> > --
> > 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
> 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


Re: [PHP] New generation of PHP Program, reaction to ASP.NET

2002-11-19 Thread shi ziye
I want hackers to help me to finish the whole project!!!
It is only the begining. and it will change our web programing method
Goto www.shiziye.net/woop to see more!
Mail to [EMAIL PROTECTED] if you want to help me.


Is there a question in here somewhere? What do you need help with?

---John Holmes...

- Original Message -
From: "shi ziye" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 9:20 AM
Subject: [PHP] New generation of PHP Program, reaction to ASP.NET


> WOOP (Web Object Of Php)
> Have you write PHP program like this ?
>
> // begin
> class TForm extends System_UI_Form
> {
> function init()
> {
> $this->label1 = & new System_UI_Label("label1", &$this);
> $this->button1 = & new System_UI_Button("button1", &$this);
> $this->button2 = & new System_UI_Button("button2", &$this);
>
> $this->label1->caption = "23";
>
> $this->button1->caption = "number+1";
> $this->button1->onclick = "button1click";
>
> $this->button2->caption = "number-1";
> $this->button2->onclick = "button2click";
> }
>
> function button1click()
> {
> $this->label1->caption++;
> }
>
>
> function button2click()
> {
> $this->label1->caption--;
> }
> }
>
> $form1 = & new TForm("form1");
> $form1->init();
>
> //end
>
> to see the result of this program
> Goto http://www.shiziye.net/woop
>
> I need your help to finish this system together!!!
>
>
>
> _
> Ãâ·ÑÏÂÔØ MSN Explorer:  http://explorer.msn.com/lccn/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



_
ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/lccn/ 


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



Re: [PHP] New generation of PHP Program, reaction to ASP.NET

2002-11-19 Thread 1LT John W. Holmes
WOOP-DE-DO...

---John Holmes...

- Original Message -
From: "shi ziye" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 9:39 AM
Subject: Re: [PHP] New generation of PHP Program, reaction to ASP.NET


> I want hackers to help me to finish the whole project!!!
> It is only the begining. and it will change our web programing method
> Goto www.shiziye.net/woop to see more!
> Mail to [EMAIL PROTECTED] if you want to help me.
>
> >Is there a question in here somewhere? What do you need help with?
> >
> >---John Holmes...
> >
> >- Original Message -
> >From: "shi ziye" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Tuesday, November 19, 2002 9:20 AM
> >Subject: [PHP] New generation of PHP Program, reaction to ASP.NET
> >
> >
> > > WOOP (Web Object Of Php)
> > > Have you write PHP program like this ?
> > >
> > > // begin
> > > class TForm extends System_UI_Form
> > > {
> > > function init()
> > > {
> > > $this->label1 = & new System_UI_Label("label1", &$this);
> > > $this->button1 = & new System_UI_Button("button1", &$this);
> > > $this->button2 = & new System_UI_Button("button2", &$this);
> > >
> > > $this->label1->caption = "23";
> > >
> > > $this->button1->caption = "number+1";
> > > $this->button1->onclick = "button1click";
> > >
> > > $this->button2->caption = "number-1";
> > > $this->button2->onclick = "button2click";
> > > }
> > >
> > > function button1click()
> > > {
> > > $this->label1->caption++;
> > > }
> > >
> > >
> > > function button2click()
> > > {
> > > $this->label1->caption--;
> > > }
> > > }
> > >
> > > $form1 = & new TForm("form1");
> > > $form1->init();
> > >
> > > //end
> > >
> > > to see the result of this program
> > > Goto http://www.shiziye.net/woop
> > >
> > > I need your help to finish this system together!!!
> > >
> > >
> > >
> > > _
> > > Ãâ·ÑÏÂÔØ MSN Explorer:  http://explorer.msn.com/lccn/
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
>
>
> _
> ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/lccn/
>


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




[PHP] date

2002-11-19 Thread Edward Peloke
I am pulling from a datetime field in mysql.  The actual data looks like
this: 2002-11-30 00:00:00  When I output the data to the page, I want it to
appear as 11/30/2002.  I want to use a php date format.  I do not want it
formatted as it comes out of the db. But date("m/d/y", $myrow[departdate])
returns 12/31/69.  How can I do this?

THanks,
Eddie


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




Re: [PHP] date

2002-11-19 Thread Support @ Fourthrealm.com
Eddie,
This is a function that I wrote to handle this same situation:

# --- Function to format date output ---
function makedate($format, $indate)
{
$temp = explode("-", $indate);
$fulldate = mktime(0, 0, 0, $temp[1], $temp[2], $temp[0]);
$temp = date($format, $fulldate);
return ($temp);
}


Call it like this:

echo makedate("m/d/Y", $myrow[departdate]); #  returns  11/30/2002
echo makedate("F d, Y", $myrow[departdate]); #  returns 
November 30, 2002


You can use any of the standard date formatting commands in the function call.

HTH!

Peter



At 10:10 AM 11/19/2002 -0500, Edward Peloke wrote:
I am pulling from a datetime field in mysql.  The actual data looks like
this: 2002-11-30 00:00:00  When I output the data to the page, I want it to
appear as 11/30/2002.  I want to use a php date format.  I do not want it
formatted as it comes out of the db. But date("m/d/y", $myrow[departdate])
returns 12/31/69.  How can I do this?

THanks,
Eddie


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


- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


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




Re: [PHP] date

2002-11-19 Thread 1LT John W. Holmes
> I am pulling from a datetime field in mysql.  The actual data looks like
> this: 2002-11-30 00:00:00  When I output the data to the page, I want it
to
> appear as 11/30/2002.  I want to use a php date format.  I do not want it
> formatted as it comes out of the db. But date("m/d/y", $myrow[departdate])
> returns 12/31/69.  How can I do this?

You have to convert the mysql date into a unix timestamp in order for it to
be used with date. You can do it in your query by selecting
UNIX_TIMESTAMP(your_column) and using what you have above, or you can try
the following with the query you already have.

date('m/d/Y',strtotime($myrow['departdate'])

---John Holmes...


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




[PHP] Expert Paid Help Needed

2002-11-19 Thread Steve Buehler
I have been working on a program and have come up to a block.  A lot of 
people on the PHP list have been able to help me for free already.  But 
what I have left to do would probably be to much to ask for someone to do 
for free.  Are their any EXPERT PHP (with MySQL) programers out there that 
would be willing to help?  If so, please send me privately the following:

Name:
Email:
City:
State:
Country (USA preferred):
Phone Number:
Hourly Rate or (Work for Trade) Server space requirements:

Somebody in the Kansas City Missouri/Kansas area would be preferred, just 
because I would be able to meet with you to discuss this.  But it is NOT a 
requirement.  This project will require me to at least talk with you on the 
phone because it would just take a lot less time than trying to email 
everything.  We can also work out a trade for server space instead of 
payments for someone if that would help.  We have some people that work for 
us JUST for web/server space.


Steve Buehler
IT Director
Internet Business Applications, LLC
11638 W. 90th St.
Overland Park, Kansas 66214
913-438-3074 x 7
steve @ vespro.com



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


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



[PHP] Are objects considered global or do they need registered in a session?

2002-11-19 Thread Phil Schwarzmann
When declaring a new object ( $obj=new Something; ), do they need to be
then registered in a session ( session_register("obj"); ) if you want to
use them for a different script?



[PHP] test

2002-11-19 Thread shi ziye
not sure how to post, sorry!

_
Ãâ·ÑÏÂÔØ MSN Explorer:  http://explorer.msn.com/lccn/


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




Re: [PHP] OOP - transfering object-pointer

2002-11-19 Thread Hatem Ben
It wrks okay here; I guess i'm keeping register_global= On in php.ini !

Try debuging your sample using get_declared_classes and you'll find what
you're missing

class overall {

var $loaded;

function load($class){

eval ("global \$$class;");

eval("\$$class = new $class;");

print_r(get_declared_classes());

return true;

}

}

- Original Message -
From: "Tularis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 10:50 AM
Subject: [PHP] OOP - transfering object-pointer


> Currently, I have the following code:
>
> 
> class overall {
> var $loaded;
>
> function load($class){
> //eval("global \$$class;"); // This didn't work either
> $this->loaded[] = $class;
> eval("\$this->$class = new $class;");
> return true;
> }
> }
>
> class foo {
> var $bar;
>
> // Constructor
> function bar(){
> if(!isset($this->bar)){
> $this->bar = 1;
> }else{
> $this->bar++;
> }
> echo $this->bar."";
> }
> }
>
> // Start actual loading
> $overall = new overall;
> $overall->load('foo');
>
> foreach($overall->loaded as $key=>$val){
> $key =& $overall->$key;
> }
>
> $overall->foo->bar();
> $overall->foo->bar();
> $overall->foo->bar();
> $overall->foo->bar();
>
> // it doesn't understand this
> $foo->bar(); // line 42
> ?>
>
> It all works, except for the $foo->bar(); thing... I am wondering how I
> can turn $overall->foo->bar() to $foo->bar(); as all the things I've
> tried, don't work, they don't give any errors, except for
> Fatal error: Call to a member function on a non-object in
> d:\apache\htdocs\classes.php on line 42...
>
> Could anyone help me with this?
> thanx
>
> - Tularis
>
>
> --
> 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] Capturing multiple select with Javascript - nearly there

2002-11-19 Thread Ford, Mike [LSS]
> -Original Message-
> From: Phoebe Bright [mailto:[EMAIL PROTECTED]]
> Sent: 19 November 2002 14:20
> 
> My  remaining problem is that the array that PHP sees only 
> has the final 
> few characters of the values it should have.
> 
> This is the result of print_r after selecting two items 
> (analysis1 and 
> analysis3):
> 
>   Array ( [0] => ysis1 [1] => ysis3 )
> 
> expecting:
> 
>   Array ( [0] => analysis1 [1] => analysis3 )

Known bug.  A quick search of http://bugs.php.net/ for "character cut off
form array" reveals half a dozen reports for this, of which this is probably
the most informative: http://bugs.php.net/bug.php?id=19518.

Basically, you need to configure PHP without --enable-mbstr-enc-trans (or
install 4.3.0RC1, if that's acceptable for you).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




[PHP] Re: Expert Paid Help Needed

2002-11-19 Thread Jome
> I have been working on a program and have come up to a block.  A lot of
> people on the PHP list have been able to help me for free already.  But
> what I have left to do would probably be to much to ask for someone to do
> for free.  Are their any EXPERT PHP (with MySQL) programers out there that
> would be willing to help?  If so, please send me privately the following:

I think you would help yourself some by specifying what kind of work this
is.

  Jome



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




Re: [PHP] Are objects considered global or do they need registered in a session?

2002-11-19 Thread Ernest E Vogelsinger
At 16:10 19.11.2002, Phil Schwarzmann spoke out and said:
[snip]
>When declaring a new object ( $obj=new Something; ), do they need to be
>then registered in a session ( session_register("obj"); ) if you want to
>use them for a different script?
[snip] 

Phil,

you use an object just as any other variable. You can pass the object
(preferrably by reference) as function parameter, make the object reference
global (e.g. by putting it into the $_GLOBALS array), store it to
$_SESSION, hand it to print_r(), whatever you want to do with it.

Regarding a session: you may always store an object reference as a session
variable. However, before restoring the object instance in start_session()
the necessary implementation classes need to be defined.

Example:

// this will work
class A {
function A() {
}
}
session_start();
if (!is_object($ref_a)) {
$ref_a = new A();
$_SESSION['ref_a'] =& $ref_a;
}

// this will NOT work when reloading the session!
session_start();
class A {
function A() {
}
}
if (!is_object($ref_a)) {
$ref_a = new A();
$_SESSION['ref_a'] =& $ref_a;
}

Hope this helps,

-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



[PHP] Download File

2002-11-19 Thread Michelle
I would like to download a word-document from another site and save it to my
harddrive.
How would I go about doing this?

I tried:
http://host.com/document.doc;

$fd = fopen ($filename, "rb");
$string = fread ($fd, filesize ($filename)); 

ERROR:
Warning: stat failed for http://host.com/document.doc (errno=2 - No such
file or directory) in d:\inetpub\wwwroot\dl-doc.php on line 8

I believe this has something to do with the access rights to the folders or
something...




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




[PHP] Re: Misbehaved Script...

2002-11-19 Thread @ Edwin
Hello,
(B
(B"Kondwani Spike Mkandawire" <[EMAIL PROTECTED]> wrote in message
(B[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
(B> Hi folks:
(B>
(B> Have any of you guys encountered the following error:
(B>
(B> CGI Error
(B> The specified CGI application misbehaved by not returning a complete set
(Bof
(B> HTTP headers. The headers it did return are:
(B>
(B> My Scripts that require user interaction and
(B> self modification often encounter this.  I have no clue as to
(B> what's going on.  I have to reboot the server when
(B> this happens and it seems to fix the problem...
(B> I don't think this has anything to do with my scripts...
(B> Could someone please suggest whats wrong...
(B>
(B> My Server has Microsoft IIS 4.0 on Win NT 4 and
(B> is running PHP 4.2.1.
(B>
(B
(BThis topic regularly comes up--perhaps you can check the archives first...
(B
(B- E
(B
(B
(B-- 
(BPHP General Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Download File

2002-11-19 Thread Adam Voigt
PHP is true and blue in relation to error messages (in this case
anyway):

Warning: stat failed for http://host.com/document.doc (errno=2 - No such
> file or directory) in d:\inetpub\wwwroot\dl-doc.php on line 8

The file either doesn't exist on "host.com" under the root directory
as "document.doc" or the webserver (on the host.com side) doesn't have
sufficient permission to serve "document.doc". Can you go to it in a
web browser?

On Tue, 2002-11-19 at 10:56, Michelle wrote:
> I would like to download a word-document from another site and save it to my
> harddrive.
> How would I go about doing this?
> 
> I tried:
>  $filename = "http://host.com/document.doc;
> 
> $fd = fopen ($filename, "rb");
> $string = fread ($fd, filesize ($filename));  fclose ($fd);
> 
> $fname = "my_saved_doc.doc";
> $fp = fopen ($fname, "wb");
> 
> ?>
> 
> ERROR:
> Warning: stat failed for http://host.com/document.doc (errno=2 - No such
> file or directory) in d:\inetpub\wwwroot\dl-doc.php on line 8
> 
> I believe this has something to do with the access rights to the folders or
> something...
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


Re: [PHP] What is the best site for PHP news, articles, resources etc....

2002-11-19 Thread @ Edwin
Hello,

"Phil Schwarzmann" <[EMAIL PROTECTED]> wrote:

> Let's say you had one site and one site only to get the latest PHP/MySQL
> news, articles, reviews, resources, tutorials, advanced stuff etc.
>  
> What would it be?!?

  http://www.phpbuilder.com/ ?

Give me another choice :)

  http://www.zend.com/

- E


  

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




Re: [PHP] Download File

2002-11-19 Thread Ernest E Vogelsinger
At 16:56 19.11.2002, Michelle spoke out and said:
[snip]
>I would like to download a word-document from another site and save it to my
>harddrive.
>How would I go about doing this?
>
>I tried:
>$filename = "http://host.com/document.doc;
>
>$fd = fopen ($filename, "rb");
>$string = fread ($fd, filesize ($filename)); fclose ($fd);
[snip] 

 From the docs (http://www.php.net/manual/en/function.filesize.php):

This function will not work on remote files; the file to be examined must
be accessible via the server's filesystem.

You can bypass this by reading until EOF:

http://host.com/document.doc';
$fd = fopen($filename, 'rb');
$string = null;
while ($chunk = fread($fd, 64*128))// read blocks at 64 k
   $string .= $chunk;
fclose($fd);
?>

Untested but it should work as expected.



-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



Re: [PHP] Looking for compiled Windows PHP installation with multistring fts support

2002-11-19 Thread @ Edwin
Hello,

"Simon Dedeyne" <[EMAIL PROTECTED]> wrote:

> 
> Hi,
> 
> Does anybody know where to find a pre-compiled Windows (XP) version of
> PHP that includes multistring functions? I checked phpdev on firegpages
> and other sites that usually hold these installations but their versions
> don't support those multistrings yet. Any help/links are appreciated!

What do you exactly mean by "multistrings"?

- E

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




Re: [PHP] test

2002-11-19 Thread Ernest E Vogelsinger
At 01:34 19.11.2002, shi ziye spoke out and said:
[snip]
>not sure how to post, sorry!
[snip] 

Just the way you did :)


-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



Re: [PHP] Getting info from users comp?

2002-11-19 Thread @ Edwin
Hello,

"John Yamokoski" <[EMAIL PROTECTED]> wrote:
> I am new to PHP but wanted to know if its possible to do the following
with
> PHP.
>
> I want to grab the size of the users RAM and the speed of the users CPU.
Is
> this even possible with PHP since its a server side language??
>
> And if its not possible with PHP, what language then?

I don't think this is possible with a server-side language. But of course,
this in NOT impossible with a client-side language (i.e. programs created
with C, Delphi, etc. and run on the users' pc.).

- E

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




[PHP] templates

2002-11-19 Thread Adam
I am developing a site, using XML and PHP for formatting. I want to have one HTML 
template and call up the different XML files from a Javascript menu. 
Ideally i want to be able to call files from a link, such as:
'index.php?action=load&file="file.xml"'

Not sure if this is the right format, but hopefully you get the idea.

Cheers,
Adam.



Re: [PHP] New commercial software needs beta testers

2002-11-19 Thread @ Edwin

"Jeremy Wilson" <[EMAIL PROTECTED]> wrote:

> Well fine... by reading a bunch of your other posts when you talk to
> people, it looks like you are just a rude SOB... so I am really not
> offended.

Who is offending who? You attacked a ml with a spam (yes, it's spam) and now
you're attacking people? And do you expect people here to test your
software?

I think I'm missing something here... Or, maybe I'm in the wrong ml? Is this
the php (general) ml? I better get some rest...

- E

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




Re: [PHP] templates

2002-11-19 Thread Jonathan Sharp
I'm assuming you're trying to have a select list.

Try this:


File XML1
File foo


Just make sure you test the value you get for file, so that someone
doesn't pass you /etc/passwd (just an example).

-js


Adam wrote:
> I am developing a site, using XML and PHP for formatting. I want to have one HTML 
>template and call up the different XML files from a Javascript menu. 
> Ideally i want to be able to call files from a link, such as:
> 'index.php?action=load&file="file.xml"'
> 
> Not sure if this is the right format, but hopefully you get the idea.
> 
> Cheers,
> Adam.
> 




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




RE: [PHP] Free MySQL Hosting :)

2002-11-19 Thread Daniel Masson
AWSOME !!!

Cordialmente
Daniel Massón => Ingeniero de desarollo
[EMAIL PROTECTED]
www.imagine.com.co
Tels: (57)(1) 2182064 - 6163218
Bogotá - Colombia

- Soluciones web para internet e intranet
- Asesoría y Soporte Técnico
- Licenciamiento de Software 

 



-Mensaje original-
De: PHP Mailing List [mailto:[EMAIL PROTECTED]] 
Enviado el: martes, 19 de noviembre de 2002 8:34
Para: [EMAIL PROTECTED]
Asunto: [PHP] Free MySQL Hosting :)


As a project I'm working on that will later manifest into something
more, 
I'm offering free MySQL hosting on one of my servers. Just enter the 
desired username and password, and 3 databases will be created for you
to 
use from your PHP scripts. The info you'll need to connect to the MySQL 
server will be provided.

Don't expect some grand website when you click the URL, it's just a 
simple page I put up that does nothing but create the databases. :)

http://64.53.137.236:82/


-- 
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] templates

2002-11-19 Thread Adam
Cheers for replying.

I have the menu in place already, it is the PHP end i'm not sure about.
Currently I have many php files which only differ in one line:
$filename="file.xml";

I want to be able to pass this value to the script through a link.

A.

- Original Message -
From: "Jonathan Sharp" <[EMAIL PROTECTED]>
To: "Adam" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 4:33 PM
Subject: Re: [PHP] templates


> I'm assuming you're trying to have a select list.
>
> Try this:
>
>  onChange="window.location='?action=load&file=' +
this.value">
> File XML1
> File foo
> 
>
> Just make sure you test the value you get for file, so that someone
> doesn't pass you /etc/passwd (just an example).
>
> -js
>
>
> Adam wrote:
> > I am developing a site, using XML and PHP for formatting. I want to have
one HTML template and call up the different XML files from a Javascript
menu.
> > Ideally i want to be able to call files from a link, such as:
> > 'index.php?action=load&file="file.xml"'
> >
> > Not sure if this is the right format, but hopefully you get the idea.
> >
> > Cheers,
> > Adam.
> >
>
>
>


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




RE: [PHP] Download File

2002-11-19 Thread Van Andel, Robert
If the word document you are trying to download is already on the server,
you could probably just make a link to the file

http://host.com/document.doc";>

When the user clicks on it, they either view the document if they have the
MS Word plugin, or they are asked to download it.  I'm not sure that using
php is warranted.

Robbert van Andel 


-Original Message-
From: Michelle [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 7:57 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Download File


I would like to download a word-document from another site and save it to my
harddrive.
How would I go about doing this?

I tried:
http://host.com/document.doc;

$fd = fopen ($filename, "rb");
$string = fread ($fd, filesize ($filename)); 

ERROR:
Warning: stat failed for http://host.com/document.doc (errno=2 - No such
file or directory) in d:\inetpub\wwwroot\dl-doc.php on line 8

I believe this has something to do with the access rights to the folders or
something...




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


 "The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from all
computers." 





[PHP] ACT Based Contact Management System

2002-11-19 Thread Craig
Does anyone know of any sites that offer a web based contact management
system that works in a similar way to ACT?

I want to implement such a system that connects to a mysql database




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




[PHP] Threads/Processes under Windows

2002-11-19 Thread Noor Dawod
Hello all,

I wish to use threads or processes under Windows. Is there a known .DLL
that I can load and use to do the work in Windows? Any URI for details
and information is highly appreciated.

I know of PHP's internal Process Control functions, but they don't work
outside UNIX.

Thanks in advance.

Noor


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




[PHP] making php and perl talk to each other...

2002-11-19 Thread Kelly Meeks
Is there any way to get a php script to grap the output from a perl script?

Can you reverse that and have a perl script grab the output from a php script?

Kelly



[PHP] Re: ACT Based Contact Management System

2002-11-19 Thread Brian McGarvie
mibbie give us a url to look at ACT? Or atleast a quick out-line of what it
does?

"Craig" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Does anyone know of any sites that offer a web based contact management
> system that works in a similar way to ACT?
>
> I want to implement such a system that connects to a mysql database
>
>
>



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




Re: [PHP] making php and perl talk to each other...

2002-11-19 Thread 1LT John W. Holmes
If they are on the same machine and executable from the command line, then
you can use exec(), system(), backtics, etc to get the output.

If they are on another machine (or not executable) and only available
through a HTTP interface, then just use fopen to open the address and read
the output from it.

$fp = fopen("http://www.domain.com/file.php","r";);

Then use fread or fget to gather the output. Plenty of examples at
www.php.net/fopen

---John Holmes...

- Original Message -
From: "Kelly Meeks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 11:50 AM
Subject: [PHP] making php and perl talk to each other...


Is there any way to get a php script to grap the output from a perl script?

Can you reverse that and have a perl script grab the output from a php
script?

Kelly


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




Re: [PHP] making php and perl talk to each other...

2002-11-19 Thread BigDog
If you are running them as commandline apps you can just pipe "|" the
output to another program

i.e. phpapp.php | perlapp.pl

That should work as long as you deal with the arguments properly...

On Tue, 2002-11-19 at 09:50, Kelly Meeks wrote:
> Is there any way to get a php script to grap the output from a perl script?
> 
> Can you reverse that and have a perl script grab the output from a php script?
> 
> Kelly
-- 
.: B i g D o g :.



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




Re: [PHP] templates

2002-11-19 Thread Ernest E Vogelsinger
At 18:04 19.11.2002, Adam spoke out and said:
[snip]
>Cheers for replying.
>
>I have the menu in place already, it is the PHP end i'm not sure about.
>Currently I have many php files which only differ in one line:
>$filename="file.xml";
>
>I want to be able to pass this value to the script through a link.
[snip] 

How about
$files = array('file1.xml' => 'Go to file 1',
   'file2.xml' => 'Go to file 2',
   'file3.xml' => 'Go to file 3',
   'file4.xml' => 'Go to file 4');
foreach ($files as $filename => $text) {
// you should put your actual menu code here
echo '', htmlentities($text), '';
}


-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



[PHP] Returning an array in a function

2002-11-19 Thread Van Andel, Robert
How would I return an array of data with a function?

Robbert van Andel 




 "The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from all
computers." 





Re: [PHP] Returning an array in a function

2002-11-19 Thread Ernest E Vogelsinger
At 18:23 19.11.2002, Van Andel, Robert spoke out and said:
[snip]
>How would I return an array of data with a function?
[snip] 

// returns a copy of the array
function return_an_array() {
   $a = array('oranges','apples','bananas');
   return $a;
}

// returns a reference to the array
function &return_an_arrayref() {
   $a = array('oranges','apples','bananas');
   return $a;
}

// get the copied array
$ar = return_an_array();
// get the referenced array
$ar =& get_an_arrayref();
// get a copy even if a reference is returned
$ar = get_an_arrayref();


-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



[PHP] PHP SAPI modules

2002-11-19 Thread Chris Edwards
Does anyone know if the PHP SAPI modules are better in the newer releases?
Are they currently stable enough for production websites?

--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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




Re: [PHP] templates

2002-11-19 Thread Adam
Thanks, but not sure if this is what i'm looking for

I just want to setup the PHP script so that the variable $filename can be changed via 
a link such as 'index.php?filename="file.xml"',
causing the script to parse the appropriate file.

Adam.
  - Original Message - 
  From: Ernest E Vogelsinger 
  To: Adam 
  Cc: Jonathan Sharp ; [EMAIL PROTECTED] 
  Sent: Tuesday, November 19, 2002 5:17 PM
  Subject: Re: [PHP] templates


  At 18:04 19.11.2002, Adam spoke out and said:
  [snip]
  >Cheers for replying.
  >
  >I have the menu in place already, it is the PHP end i'm not sure about.
  >Currently I have many php files which only differ in one line:
  >$filename="file.xml";
  >
  >I want to be able to pass this value to the script through a link.
  [snip] 

  How about
  $files = array('file1.xml' => 'Go to file 1',
 'file2.xml' => 'Go to file 2',
 'file3.xml' => 'Go to file 3',
 'file4.xml' => 'Go to file 4');
  foreach ($files as $filename => $text) {
  // you should put your actual menu code here
  echo '', htmlentities($text), '';
  }


  -- 
 >O Ernest E. Vogelsinger 
 (\) ICQ #13394035 
  ^ http://www.vogelsinger.at/





RE: [PHP] about processing time of function INCLUDE

2002-11-19 Thread John W. Holmes
> Is it will increase the processing time when too many "include"
process in
> a
> program?

Well, each include() takes up time, so yes. It depends on what you're
including, though, as to how big of an impact it has on your program.

---John Holmes...



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




[PHP] Re: Returning an array in a function

2002-11-19 Thread UberGoober

> How would I return an array of data with a function?

return $array;



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




[PHP] isapi mod on iis

2002-11-19 Thread Chris Edwards
is anyone running the isapi mod on iis?  why does it ask for authenitcation
when I run a script?

--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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




[PHP] Re: PHP SAPI modules

2002-11-19 Thread UberGoober
> Does anyone know if the PHP SAPI modules are better in the newer releases?
> Are they currently stable enough for production websites?

Better than..?
Where you/are you having problems with them currently?

I know many production win32 php environments.



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




[PHP] new php version

2002-11-19 Thread Richard Pijnenburg
When will there be a new release of php?
 
With kind regards,
 
Richard Pijnenburg
Klik-on Internet Solutions
 



[PHP] problems compiling imap-support with kerberos

2002-11-19 Thread Jochen Kächelin
OS:   RedHat 7.3
PHP:  4.3.0RC1 (sources)
IMAP: imap-2001a-10,  imap-devel-2001a-10  (rpms)
Krb:  pam_krb5-1.55-1, krbafs-devel-1.1.1-1, krbafs-1.1.1-1,
  krb5-libs-1.2.4-3, krb5-devel-1.2.4-3 (rpms)


I get the following error-messages:


configure:34127: checking for crypt in -lcrypt
configure:34521: checking whether SSL libraries are needed for c-client
configure:34682: checking whether IMAP works
configure:34715: gcc -o conftest -g -O2  -DLINUX=22 -DNO_DBM_REWRITEMAP 
-DMOD_SSL=208112 -DUSE_HSRE
GEX -DEAPI -DEAPI_MM -DUSE_EXPAT  -Wl,-rpath,/usr/local/ssl/lib -L/usr/local/ssl/lib 
-Wl,-rpath,/us
r/local/lib -L/usr/local/lib -Wl,-rpath,/usr/kerberos/lib -L/usr/kerberos/lib 
-Wl,-rpath,/web/opens
sl/current/lib -L/web/openssl/current/lib conftest.c -lcrypto -lssl -lc-client   
-lcrypt -lt1 -lfre
etype -lpng -lz -ljpeg -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lcrypt 
-lgssapi_krb5 -l
krb5 -lk5crypto -lcom_err 1>&5
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function 
`ssl_onceonlyi
nit':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:286: the use of `tmpnam' 
is dangerous,
better use `mkstemp'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function 
`checkpw':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:124: undefined reference 
to `pam_start'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:124: undefined reference 
to `pam_authen
ticate'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:124: undefined reference 
to `pam_acct_m
gmt'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:124: undefined reference 
to `pam_setcre
d'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:130: undefined reference 
to `pam_setcre
d'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:131: undefined reference 
to `pam_end'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:156: undefined reference 
to `pam_end'
collect2: ld returned 1 exit status

What can I do? Install IMAP from sources?

-- 
Jochen Kaechelin


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




Re: [PHP] templates

2002-11-19 Thread Ernest E Vogelsinger
At 19:10 19.11.2002, Adam said:
[snip]
>Thanks, but not sure if this is what i'm looking for
>
>I just want to setup the PHP script so that the variable $filename can be 
>changed via a link such as 'index.php?filename="file.xml"',
>causing the script to parse the appropriate file.
[snip] 

When you execute the URL
   index.php?filename=file.xml
(note - no quotes)
your PHP script will have this value readily accessible as $filename (if
register_globals is on, as outlined in many threads the last days).

With the latest PHP versions, register_globals defaults to off, so you
don't have "$filename" but rather $_GET['filename'] available.

If your PHP host has register_globals off, but you need parameters as
globals, you can put this little script at the beginning of your PHP file:

foreach ($_REQUEST as $varname => $value) {
$var = '$'.$varname;
global $$var;
$$var = $value;
}

You will then be able to access parameters as if register_globals would be on.


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




RE: [PHP] new php version

2002-11-19 Thread Ford, Mike [LSS]
> -Original Message-
> From: Richard Pijnenburg [mailto:[EMAIL PROTECTED]]
> Sent: 19 November 2002 18:48
> 
> When will there be a new release of php?

Well, http://www.php.net/ says:

  [14-Nov-2002] PHP 4.3.0RC1 has been released. This is the first
  release candidate and 

So, er, soon...?

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 


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




Re: [PHP] isapi mod on iis

2002-11-19 Thread Ernest E Vogelsinger
At 19:37 19.11.2002, Chris Edwards said:
[snip]
>is anyone running the isapi mod on iis?  why does it ask for authenitcation
>when I run a script?
[snip] 

 From the docs (http://www.php.net/manual/en/features.http-auth.php):

[...]
Also note that this does not work using Microsoft's IIS server and the CGI
version of PHP due to a limitation of IIS. 
[...]

So said, HTTP authentication cannot be done on IIS. You need to write your
own login form.


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




Re: [PHP] new php version

2002-11-19 Thread bbonkosk
I think there is a PHP release mailing list, that should keep you in the loop, 
or check php.net.  The news is usually fresh there.
-Brad


> When will there be a new release of php?
>  
> With kind regards,
>  
> Richard Pijnenburg
> Klik-on Internet Solutions
>  
> 





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




Re: [PHP] Capturing multiple select with Javascript - nearly ther

2002-11-19 Thread Phoebe Bright
Many thanks for your reply, I will add the bugs site to my list of 
things to search before posting here!

As I am putting the code onto a number of servers where I can't control 
the PHP settings, I will need to devise a work around.  Good to know 
it's not my poor coding.
Phoebe.

Mike Ford wrote:
-Original Message-
From: Phoebe Bright [mailto:[EMAIL PROTECTED]]
Sent: 19 November 2002 14:20

My  remaining problem is that the array that PHP sees only 
has the final 
few characters of the values it should have.

This is the result of print_r after selecting two items 
(analysis1 and 
analysis3):

 Array ( [0] => ysis1 [1] => ysis3 )

expecting:

 Array ( [0] => analysis1 [1] => analysis3 )


Known bug.  A quick search of http://bugs.php.net/ for "character cut off
form array" reveals half a dozen reports for this, of which this is probably
the most informative: http://bugs.php.net/bug.php?id=19518.

Basically, you need to configure PHP without --enable-mbstr-enc-trans (or
install 4.3.0RC1, if that's acceptable for you).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 


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




[PHP] how to read text file one line at a time

2002-11-19 Thread Kelly Meeks
here's an example of a text file I need to read...

abcd|test1|morevalues|otherstuff
efghijklm|a;kd;laskf;alskdjf;alskdf;askldjasldkf|;askd;lakjl;asdf|al;sdjf;alf

I believe each line is seperated by a carriage return.

How can I read this in one line at a time in to a variable?

I'm assuming that I could then explode that variable using the pipe as the seperator 
text?

Kelly



  1   2   >