Re: [PHP] Owner

2002-09-25 Thread John Taylor-Johnston

Justin,

> Best advice is to post strictly to the newsgroup with a dud email address,

Unfortunately, that doesn't work. I had a hotmail address, but not acceptable. Someone 
did not put it on the "accepted' list. Someone back there needs to accept that address 
to allow that poster to post when using news://news.php.net/php.general. Been through 
that. That's what I want to do now. Who is he? I would like to work something out with 
him.

> filter out anything to that address which doesn't have [PHP] in the subject

I've been filtering :)

> Using 'nospam' in your address' prolly doesn't help as much as it used to,

True, But I could work around that too, when I talk with the chap in charge :)

> Fun huh?

Giggle loads :p

Thanks,
John



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




Re: [PHP] Owner

2002-09-25 Thread Justin French

The problem is NOT the list, but the services like marc that archive the
lists activities... this means your email address sits there in plain view
on MANY web pages for bots to find.

Best advice is to post strictly to the newsgroup with a dud email address,
or use a specific email address for your activities on the PHP list, and
filter out anything to that address which doesn't have [PHP] in the subject
line, which is what I plan to do soon.

Using 'nospam' in your address' prolly doesn't help as much as it used to,
because it's common practice these days, hence spiders probably attempt to
parse it out.

Your spam may be originating from somewhere entirely different from the PHP
list... if your address is on ANY web page accessed via GET (URL, not POST),
it's within reach of the spiders...

Fun huh?


Justin






on 26/09/02 3:30 PM, John Taylor-Johnston ([EMAIL PROTECTED])
wrote:

> Hi,
> 
> Who is the forum's owner?
> 
> I want to post questions using [EMAIL PROTECTED] and
> [EMAIL PROTECTED] in my from: and reply-to:
> 
> I post infrequently to this list using news://news.php.net/php.general NOT
> [EMAIL PROTECTED]
> This is about the only list I post to. I've been receiving a lot of spam from
> Korea lately and what to put a stop to it, or at least slow it down.
> 
> John
> 


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




[PHP] Owner

2002-09-25 Thread John Taylor-Johnston

Hi,

Who is the forum's owner?

I want to post questions using [EMAIL PROTECTED] and 
[EMAIL PROTECTED] in my from: and reply-to:

I post infrequently to this list using news://news.php.net/php.general NOT 
[EMAIL PROTECTED]
This is about the only list I post to. I've been receiving a lot of spam from Korea 
lately and what to put a stop to it, or at least slow it down.

John


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




[PHP] Looking for a forum

2002-09-25 Thread John Taylor-Johnston

Hi,
I'm looking for some forum script, a bit like this:
http://www.chevelles.com/cgi-bin/forum/Ultimate.cgi
Can anyone post a link to something useful?
John


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




Re: [PHP] Re: PEAR or not PEAR

2002-09-25 Thread Rasmus Lerdorf

No DB abstraction layer, including MetaBase offers true database
abstraction.  No layer will make stored procedures portable.  No layer
will make your fancy Oracle DECODE() query portable.  No layer will
magically make your MS-SQL triggers work anywhere else.

For any moderately complex database work, you are going to have to write
database-specific code and if you are doing that you might as well cut out
the middle-man and use the faster direct DB calls.

My standard approach is to do functionality abstraction.  Stuff like,
get_user_record(), update_scores(), etc.  Implement these functions for
each database you wish to support and stick them in separate include
files.  Then include the appropriate set based on a config setting so the
user can switch the app between the supported databases.

-Rasmus

On Thu, 26 Sep 2002, Manuel Lemos wrote:

> Hello,
>
> On 09/24/2002 11:15 AM, Joshua E Minnie wrote:
> > I was reading an article at PHPBuilder.com (not very recent, 01/15/2001)
> > about PEAR DB, and was wondering if anyone had any experience using PEAR
> > rather than the functions dedicated specifically to each type of DB (i.e.
> > mysql_, mssql_, pg_, msql_, etc.).  Also, if anyone has any reasons why to
> > go with one or the other.
> >
> > The reason I ask, is because I recently downloaded QuerySim so I could
> > simulate my db info while the db is still in development and not have to
> > slow down the process.  QuerySim uses PEAR DB functions, and after the db
> > development is finished it is an easy conversion.  Simply change the line
> > that tells which db is being accessed.
> >
> > [code snippet]
> > $db = DB::connect( "mssql://$dbuser:$dbpass@$dbhost/$dbname" ); // for MSSQL
> > $db = DB::connect( "mysql://$dbuser:$dbpass@$dbhost/$dbname" ); // for MySQL
> > //instead of
> >
> > $conn = DB::connect('querysim');
> > [/code snippet]
> >
> > And my querys would still remain relatively the same.  I hope you can shed
> > some light on this because I am not really sure which one to use.
>
> No PEAR-DB does not guarantee true database portability. Among other
> things, think about for instance date and time fields that are formatted
> differently between databases. PEAR-DB does not assure that you only
> deal with a single format, so you would always have to handle eventual
> differences in format representation in your application which is what
> you want to avoid.
>
> If you are looking for true database portability, you may want to look
> at Metabase which is a much more mature database abstraction package
> that not only deals with data type representation format differences to
> make your database applications really portable, but it also manages
> your database schemas so you don't have to write database specific SQL
> scripts to create tables and other database objects.
>
> All you need to do is to specify a schema in a database independent
> format based on XML and Metabase creates any tables, fields, indexes,
> sequences for you.
>
> Metabase is Open Source and you may find it here:
>
> http://www.phpclasses.org/metabase
>
> --
>
> Regards,
> Manuel Lemos
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] Re: PEAR or not PEAR

2002-09-25 Thread Manuel Lemos

Hello,

On 09/24/2002 11:15 AM, Joshua E Minnie wrote:
> I was reading an article at PHPBuilder.com (not very recent, 01/15/2001)
> about PEAR DB, and was wondering if anyone had any experience using PEAR
> rather than the functions dedicated specifically to each type of DB (i.e.
> mysql_, mssql_, pg_, msql_, etc.).  Also, if anyone has any reasons why to
> go with one or the other.
> 
> The reason I ask, is because I recently downloaded QuerySim so I could
> simulate my db info while the db is still in development and not have to
> slow down the process.  QuerySim uses PEAR DB functions, and after the db
> development is finished it is an easy conversion.  Simply change the line
> that tells which db is being accessed.
> 
> [code snippet]
> $db = DB::connect( "mssql://$dbuser:$dbpass@$dbhost/$dbname" ); // for MSSQL
> $db = DB::connect( "mysql://$dbuser:$dbpass@$dbhost/$dbname" ); // for MySQL
> //instead of
> 
> $conn = DB::connect('querysim');
> [/code snippet]
> 
> And my querys would still remain relatively the same.  I hope you can shed
> some light on this because I am not really sure which one to use.

No PEAR-DB does not guarantee true database portability. Among other 
things, think about for instance date and time fields that are formatted 
differently between databases. PEAR-DB does not assure that you only 
deal with a single format, so you would always have to handle eventual 
differences in format representation in your application which is what 
you want to avoid.

If you are looking for true database portability, you may want to look 
at Metabase which is a much more mature database abstraction package 
that not only deals with data type representation format differences to 
make your database applications really portable, but it also manages 
your database schemas so you don't have to write database specific SQL 
scripts to create tables and other database objects.

All you need to do is to specify a schema in a database independent 
format based on XML and Metabase creates any tables, fields, indexes, 
sequences for you.

Metabase is Open Source and you may find it here:

http://www.phpclasses.org/metabase

-- 

Regards,
Manuel Lemos


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




[PHP] Re: Mail() and Attachments

2002-09-25 Thread Manuel Lemos

Hello,

On 09/25/2002 07:00 PM, Tom Ray wrote:
> I was wondering with mail() how do you attach a file to the message you are
> sending? I have to take the data from the form and write it to a CSV file that
> needs to be mailed to the client, I got everything put how to attach the CSV
> file to the mail when the script runs..

You may want to try this class that can compose and send a MIME message 
just like you need attaching any files you need among other things.

http://www.phpclasses.org/mimemessage

-- 

Regards,
Manuel Lemos


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




Re: [PHP] Configure php for windows

2002-09-25 Thread Khalid El-Kary

hi,

please tell me about your Apache version, PHP version, the changes you made 
to the httpd.conf and error messages of returned

thanx




_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




[PHP] Example script : Employee schedule

2002-09-25 Thread Faisal Abdullah

Hi people.
Does anyone happen to know whether there is a sample script/application out
there which can tell me (and everyone else in the organisation) of what
"john doe"
is doing, and where & when he's doing it?

I don't know a proper name for this type of application, therefor I haven't
found anything in google.
Thanks.

Sincerely,
Faisal

__


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




Re: [PHP] Configure php for windows

2002-09-25 Thread Uma Shankari T.





On Thu, 26 Sep 2002, Justin French wrote:

JF>What test are you running?
JF>
JF>Justin

I am running this code only..




Regards,
Uma


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




Re: [PHP] replacing literal " in string

2002-09-25 Thread Tom Rogers

Hi,

Thursday, September 26, 2002, 12:02:29 AM, you wrote:
RM> Could somebody help me with the correct syntax for an ereg_replace to
RM> replace literal occurences of the quote character in a string.  I can't
RM> seem to get it right.

RM> In other words, I have a form input variable -- that literally may look
RM> like this:  "some_value", and I want it to literally look like this:
RM> some_value.

RM> I tried:
RM> $key=str_replace ("\"", "", "$key");
RM> and other variations but can't get it to work.

RM> What am I missing?

RM> Thanks!


try $key = str_replace('"', '', $key);

-- 
regards,
Tom


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




Re: [PHP] Configure php for windows

2002-09-25 Thread Justin French

What test are you running?

Justin

on 26/09/02 12:10 PM, Uma Shankari T. ([EMAIL PROTECTED])
wrote:

> 
> Hello,
> 
> 
> I have installed php in windows machine and configure php according to
> the manual given in the net..While running test program it is not displaying
> the result properly and not showing any error also..Apache is
> running..Can any one pls tell me how to go about with this..??
> 
> Regards,
> Uma
> 


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




[PHP] Configure php for windows

2002-09-25 Thread Uma Shankari T.


Hello,


   I have installed php in windows machine and configure php according to 
the manual given in the net..While running test program it is not displaying
 the result properly and not showing any error also..Apache is 
running..Can any one pls tell me how to go about with this..??

Regards,
Uma


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




Re: [PHP] How to test if a number is negative

2002-09-25 Thread Miles Thompson

Or, as my teenage son, who is smarter than me, suggests ...

 1 / $x + abs( $x )

which yields 1/0 if $x is neg.  (He didn't go into trapping for the error 
... sigh.)

Miles

At 11:07 PM 9/25/2002 -0300, Miles Thompson wrote:
>$x = -1;
>if ($x < 0 ){
> echo "Negative";
>else
> echo "Positive";
>}
>
>Or am I missing something?
>
>Miles
>
>At 07:02 PM 9/25/2002 -0700, Mike Dunlop wrote:
>>I've look through all the numerican functions but can't readily see a way 
>>to test for a negative number e.g -7
>>
>>Any ideas on how to do this?
>>
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] RE: negative numbers

2002-09-25 Thread Mike Dunlop

Nevermind,

I have been using if($number<0) { //negative number...
but it wasn't working correctly due to a str_replace statement that 
removing zeros which was screwing it up

ok

later


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




Re: [PHP] How to test if a number is negative

2002-09-25 Thread Miles Thompson

$x = -1;
if ($x < 0 ){
 echo "Negative";
else
 echo "Positive";
}

Or am I missing something?

Miles

At 07:02 PM 9/25/2002 -0700, Mike Dunlop wrote:
>I've look through all the numerican functions but can't readily see a way 
>to test for a negative number e.g -7
>
>Any ideas on how to do this?
>
>
>
>--
>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] How to test if a number is negative

2002-09-25 Thread Mike Dunlop

I've look through all the numerican functions but can't readily see a 
way to test for a negative number e.g -7

Any ideas on how to do this?



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




Re: [PHP] Encrypt data...

2002-09-25 Thread Tom Rogers

Hi,

Thursday, September 26, 2002, 4:45:04 AM, you wrote:
SF> How do I encrypt the data and decrypt it back using PHP?  I do know that hte
SF> random number can not be used becuase it will make it impossible to decrypt
SF> it.

SF> Thanks!

Here is a simple class for encoding and decoding:

class encrypt_class{
var $secret;
function encrypt_class(){
$this->secret = 'this is a very long key, even too long for the 
cipher';
}
Function encode($id){
$eid = $iv = 0;
$len = strlen($id);
$id = $len.'-'.$id;
$td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, "");
$key = substr($this->secret, 0, mcrypt_enc_get_key_size ($td));
$iv = pack("a".mcrypt_enc_get_iv_size($td),$iv);
mcrypt_generic_init ($td, $key, $iv);
$eid = base64_encode(mcrypt_generic ($td, $id));
mcrypt_generic_deinit($td);
  return $eid;
}
Function decode($eid){
$id = $iv = 0;
$td = mcrypt_module_open (MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, "");
$key = substr($this->secret, 0, mcrypt_enc_get_key_size ($td));
$iv = pack("a".mcrypt_enc_get_iv_size($td),$iv);
mcrypt_generic_init ($td, $key, $iv);
$id = mdecrypt_generic ($td, base64_decode($eid));
$len = strtok($id,'-');
$id = substr($id,(strlen($len)+1),$len);
mcrypt_generic_deinit($td);
return $id;
}
}


Usage

encode($word);
echo "encrypted = $encrypted ";
$decrypted = $e->decode($encrypted);
echo "decrypted = $decrypted ";
if($word == $decrypted){
echo "They match ";
}
else{
echo "Oops they don't match ";
}
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Re: Cronjob

2002-09-25 Thread Daren Cotter

OH MY GOD. I searched the php.ini file twice, and
didn't see that freaking variable. Thank you so much
Tom!!!

--- Tom Rogers <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Thursday, September 26, 2002, 9:50:28 AM, you wrote:
> DC> Philip,
> 
> DC> Running test.php arg1 arg2 > test.txt
> 
> DC> Then searching test.txt for arg1, it was found
> here:
> 
> DC> HTTP_GET_VARS["test_php_arg1_arg2"]
> 
> DC> Nowhere else.
> 
> DC> Gotta be a server issue?
> 
> 
> DC> --- Philip Hallstrom <[EMAIL PROTECTED]>
> wrote:
> >> Then try a script with:
> >> 
> >>  >> phpinfo();
> >> ?>
> >> 
> >> in it and run it as:
> >> 
> >> % php script.php arg1 arg2 arg3
> >> 
> >> and then search the output for arg1 and find out
> >> where it is.  It's got to
> >> be there somewhere.
> >> 
> >> -philip
> >> 
> >> On Wed, 25 Sep 2002, Daren Cotter wrote:
> >> 
> >> > Don,
> >> >
> >> > It was not there anywhere.
> >> >
> >> > --- Don Read <[EMAIL PROTECTED]> wrote:
> >> > >
> >> > > On 25-Sep-2002 Daren Cotter wrote:
> >> > > > This just prints out a bunch of info (seems
> to
> >> be
> >> > > > unimportant)...what am I looking for in
> this?
> >> > > >
> >> > >
> >> > > You're looking for your argument string
> "blah"
> >> > >
> >> > > --
> >> > > Don Read
> >> > > [EMAIL PROTECTED]
> >> > > -- "Beer is proof that God loves us and wants
> us
> >> to
> >> > > be happy."
> >> >
> >> >
> >> >
> __
> >> > Do you Yahoo!?
> >> > New DSL Internet Access from SBC & Yahoo!
> >> > http://sbc.yahoo.com
> >> >
> >> > --
> >> > PHP General Mailing List (http://www.php.net/)
> >> > To unsubscribe, visit:
> >> http://www.php.net/unsub.php
> >> >
> >> 
> 
> 
> DC>
> __
> DC> Do you Yahoo!?
> DC> New DSL Internet Access from SBC & Yahoo!
> DC> http://sbc.yahoo.com
> 
> 
> make sure that register_argc_argv in your php.ini is
> set to true
> 
> -- 
> regards,
> Tom
> 


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




[PHP] Who is online script example

2002-09-25 Thread Research and Development

Hello. Has anyone noticed that some sites can display a list of users 
currently looking at their site? I would like to see the code to do 
such things.

Thanks in advance.


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




[PHP] cookies from cgi script

2002-09-25 Thread Roger Thomas

Dear all,
I have a cgi script that create cookie with the cookie path set to /cgi-bin/

How do I access the value of that cookie from a php-script ?
I have tried $_COOKIE["cookiename"] but the value is blank. From my NS cookie
manager, I know that there is value associated with that cookie.

Please advise.

--
roger


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




Re: [PHP] RFE: Multiple auto_prepend_file statements to work in Apache

2002-09-25 Thread Alex Vincent

John Holmes wrote:
> Even if it's only one file, have that file include the other necessary
> files... so two.php would include one.php, three.php, etc. You could
> even build the logic into two.php so it decides which other files to
> include based on any number of conditions. 
> 
> ---John Holmes...

That's not quite what I meant.  *sigh*

Okay, maybe I need to reexamine the problem a bit.  Maybe if I had a 
special file name throughout the file system that a master control 
script could look for in each parent directory.  That would do the trick.

I was mainly hoping for a native solution, though, along the lines of 
what I suggested.


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




Re: [PHP] Re: Re: Cronjob

2002-09-25 Thread Tom Rogers

Hi,

Thursday, September 26, 2002, 9:50:28 AM, you wrote:
DC> Philip,

DC> Running test.php arg1 arg2 > test.txt

DC> Then searching test.txt for arg1, it was found here:

DC> HTTP_GET_VARS["test_php_arg1_arg2"]

DC> Nowhere else.

DC> Gotta be a server issue?


DC> --- Philip Hallstrom <[EMAIL PROTECTED]> wrote:
>> Then try a script with:
>> 
>> > phpinfo();
>> ?>
>> 
>> in it and run it as:
>> 
>> % php script.php arg1 arg2 arg3
>> 
>> and then search the output for arg1 and find out
>> where it is.  It's got to
>> be there somewhere.
>> 
>> -philip
>> 
>> On Wed, 25 Sep 2002, Daren Cotter wrote:
>> 
>> > Don,
>> >
>> > It was not there anywhere.
>> >
>> > --- Don Read <[EMAIL PROTECTED]> wrote:
>> > >
>> > > On 25-Sep-2002 Daren Cotter wrote:
>> > > > This just prints out a bunch of info (seems to
>> be
>> > > > unimportant)...what am I looking for in this?
>> > > >
>> > >
>> > > You're looking for your argument string "blah"
>> > >
>> > > --
>> > > Don Read
>> > > [EMAIL PROTECTED]
>> > > -- "Beer is proof that God loves us and wants us
>> to
>> > > be happy."
>> >
>> >
>> > __
>> > Do you Yahoo!?
>> > New DSL Internet Access from SBC & Yahoo!
>> > http://sbc.yahoo.com
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit:
>> http://www.php.net/unsub.php
>> >
>> 


DC> __
DC> Do you Yahoo!?
DC> New DSL Internet Access from SBC & Yahoo!
DC> http://sbc.yahoo.com


make sure that register_argc_argv in your php.ini is set to true

-- 
regards,
Tom


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




RE: [PHP] PHP POST arrar is dropping 4 characters

2002-09-25 Thread John Holmes

This was just talked about last week, search the archives. IIRC, it was
a bug, so maybe search the buglist, too.

---John Holmes...

> -Original Message-
> From: David Busby [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 25, 2002 7:29 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP POST arrar is dropping 4 characters
> 
> List,
>   I'm using PHP on my RH73 box and when I post it drops 4
characters
> out of
> the post array.  Can someone look at the code below and tell me if I'm
> missing something?  Why would it cut four characters off?  Perhaps
cause
> the name is four chars?  Bug?
> 
> TIA
> /B
> 
> HTML that is sent to browser
> 
>  value="24033CD9-7C60-4AB0-9D7D-180D885DC857" />Item One
>  value="8D86D6B8-A42E-4B19-B930-826AAECA2AB4" />Item Two
>  value="3D6A7538-55ED-47C9-9447-0083EE6525F5" />Item Three
>  value="9CAC5C80-AEAA-4EF3-9B96-750994A3E787" />Item Four
> 
> PHP that reads the post:
> 
> $ar_ei = $_POST['ei'];
> if (is_array($ar_ei))
> {
> $c = sizeof($ar_ei);
> for ($i=0;$i<$c;$i++)
> {
>   // Right here is where the first four characters are cut off
from
>   // the 'ei[]' value, should be
>   // "24033CD9-7C60-4AB0-9D7D-180D885DC857" but instead is
>   // "3CD9-7C60-4AB0-9D7D-180D885DC857"
>   echo $ar_ei[$i]."";
> }
> }
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] Re: Re: Cronjob

2002-09-25 Thread Daren Cotter

Philip,

Running test.php arg1 arg2 > test.txt

Then searching test.txt for arg1, it was found here:

HTTP_GET_VARS["test_php_arg1_arg2"]

Nowhere else.

Gotta be a server issue?


--- Philip Hallstrom <[EMAIL PROTECTED]> wrote:
> Then try a script with:
> 
>  phpinfo();
> ?>
> 
> in it and run it as:
> 
> % php script.php arg1 arg2 arg3
> 
> and then search the output for arg1 and find out
> where it is.  It's got to
> be there somewhere.
> 
> -philip
> 
> On Wed, 25 Sep 2002, Daren Cotter wrote:
> 
> > Don,
> >
> > It was not there anywhere.
> >
> > --- Don Read <[EMAIL PROTECTED]> wrote:
> > >
> > > On 25-Sep-2002 Daren Cotter wrote:
> > > > This just prints out a bunch of info (seems to
> be
> > > > unimportant)...what am I looking for in this?
> > > >
> > >
> > > You're looking for your argument string "blah"
> > >
> > > --
> > > Don Read
> > > [EMAIL PROTECTED]
> > > -- "Beer is proof that God loves us and wants us
> to
> > > be happy."
> >
> >
> > __
> > Do you Yahoo!?
> > New DSL Internet Access from SBC & Yahoo!
> > http://sbc.yahoo.com
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit:
> http://www.php.net/unsub.php
> >
> 


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




RE: [PHP] dynamic website

2002-09-25 Thread Don Read


On 25-Sep-2002 Donahue Ben wrote:
> I have a general question of a dynamic website using
> PHP4 and mysql database.  If there are many, many
> users visiting a dynamic website at once, will it
> cause the database to be bogged down with so many
> users visiting the website?  If so, how do you around
> this problem.
> 

Yes it could.
To get around it : benchmark & optimize your indexes and queries.

Check into using persistant connections, it is normally a good idea in 
general -but watch out that you don't exhaust kernel resources ...

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- "Beer is proof that God loves us and wants us to be happy."

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




Re: [PHP] What other list are there?

2002-09-25 Thread Kevin Stone

All signs point to..
www.php.net

- Original Message -
From: "Chuck Payne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 25, 2002 3:23 PM
Subject: [PHP] What other list are there?


> Hi,
>
> I am getting ready to start another project that will have to do a lot of
> math. So I need to ask some question on how to get php and mysql to do
that.
> So can you tell what mailing list there because I think that I might have
to
> ask other list since this is general list, I am I think this might be a
> little more advance. Hey, if I am wrong sorry, just thing to make sure a
> head of time.
>
> Thanks,
>
> Chuck Payne
> Magi Design and Support
>
>
> --
> 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] What other list are there?

2002-09-25 Thread Chuck Payne

Hi,

I am getting ready to start another project that will have to do a lot of
math. So I need to ask some question on how to get php and mysql to do that.
So can you tell what mailing list there because I think that I might have to
ask other list since this is general list, I am I think this might be a
little more advance. Hey, if I am wrong sorry, just thing to make sure a
head of time.

Thanks,

Chuck Payne
Magi Design and Support


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




[PHP] Calling an external C function under Unix

2002-09-25 Thread Anna Sotnichenko

Hello All!

I want to transfer a PHP script with minimum changes from IIS under Win2000
to Unix. My ISAPI PHP script calls some external C-functions through PHP
W32api extension.
Is there a way to call external C-function from PHP-script under UNIX?

Thanks in advance.



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




[PHP] Re: [PHP-NOTES] note 25493 added to function.define

2002-09-25 Thread Friedhelm Betz


> I can't find a "redefine" or "undefine" clause. Does it exists ?
> I need to redefine a constant and PHP reports a notice on it.

Please read the fine manual carefully and follow the link section on
constants. Your note will be removed.


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




[PHP] listing of directories into links

2002-09-25 Thread Bryan Koschmann - GKT

Hi,

I need to do something where my page is a generated list of directories.
Say, I want to easily make links to all user pages
(/home/user1/public_html, /home/user2/public_html, and so on).

Can anyone give me any ideas?

Thanks,

Bryan


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




Re: [PHP] Encrypt data...

2002-09-25 Thread Scott Fletcher

Well, I meant a script.  I do have mcrypt but I don't feel comfortable with
that becuase if I upgrade PHP or Mcrypt, then it could affected the encrypt
data.


"Mike Dunlop" <[EMAIL PROTECTED]> wrote in message
news:a05100304b9b7b58c8d3b@[65.106.126.146]...
> http://php.net/mcrypt
>
> >How do I encrypt the data and decrypt it back using PHP?  I do know that
hte
> >random number can not be used becuase it will make it impossible to
decrypt
> >it.
> >
> >Thanks!
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> Mike Dunlop
> Webmaster
> Animation World Network
> [EMAIL PROTECTED]
> http://www.awn.com
> (323) 606-4238 office
> (323) 466-6619 fax
> 6525 Sunset Blvd.  GS10 Los Angeles, CA  90028
> USA
>



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




[PHP] Re: Explorer-like "drill down" interface

2002-09-25 Thread Philip Hallstrom

On Wed, 25 Sep 2002, Mike Dunlop wrote:

> >I have two questions:
> >
> >2. I have allowed packets through my firewall destined for port
> >3306, the mysql server. So I can connect to the server from a remote
> >machine. Are there any known security vulnerabilities in the mySQL
> >server?

> I would recommend using javascript for the expanding/contracting list
> stuff and I don't know of any vulnerablilities in MySQL Server...

Other than the usual caveats of making sure you're not sending your
password via clear text that is... :)

-philip




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




[PHP] Re: Re: Cronjob

2002-09-25 Thread Philip Hallstrom

Then try a script with:



in it and run it as:

% php script.php arg1 arg2 arg3

and then search the output for arg1 and find out where it is.  It's got to
be there somewhere.

-philip

On Wed, 25 Sep 2002, Daren Cotter wrote:

> Don,
>
> It was not there anywhere.
>
> --- Don Read <[EMAIL PROTECTED]> wrote:
> >
> > On 25-Sep-2002 Daren Cotter wrote:
> > > This just prints out a bunch of info (seems to be
> > > unimportant)...what am I looking for in this?
> > >
> >
> > You're looking for your argument string "blah"
> >
> > --
> > Don Read
> > [EMAIL PROTECTED]
> > -- "Beer is proof that God loves us and wants us to
> > be happy."
>
>
> __
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] help with apache2.0.40 and php 4.2.3

2002-09-25 Thread Robert Cummings

[EMAIL PROTECTED] wrote:
> 
> I have run into a snag with apache and php4 it consists of me not
> being able to specify where my config file should be and it will not
> unload the libphp4.so module.  Every time apachectl is run it
> comkplains that the module is already loaded even on a fres boot
> with out loading any version of apache.  I am stumped please tell
> me what needs to be done to fix this.

Try doing a search for libphp4 in your http.conf file. I know everytime
I recompile PHP and do a 'make install' it seems to think it is smarter
than me and inserts it's own module include line, which I always find
myself deleting. It might be you have it being included twice into your
httpd.conf file.

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




[PHP] help with apache2.0.40 and php 4.2.3

2002-09-25 Thread meaje

I have run into a snag with apache and php4 it consists of me not 
being able to specify where my config file should be and it will not 
unload the libphp4.so module.  Every time apachectl is run it 
comkplains that the module is already loaded even on a fres boot 
with out loading any version of apache.  I am stumped please tell 
me what needs to be done to fix this.

Jeff Means
[EMAIL PROTECTED]

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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter

Don,

It was not there anywhere.

--- Don Read <[EMAIL PROTECTED]> wrote:
> 
> On 25-Sep-2002 Daren Cotter wrote:
> > This just prints out a bunch of info (seems to be
> > unimportant)...what am I looking for in this?
> > 
> 
> You're looking for your argument string "blah"
> 
> -- 
> Don Read  
> [EMAIL PROTECTED]
> -- "Beer is proof that God loves us and wants us to
> be happy."


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Don Read


On 25-Sep-2002 Daren Cotter wrote:
> This just prints out a bunch of info (seems to be
> unimportant)...what am I looking for in this?
> 

You're looking for your argument string "blah"

-- 
Don Read   [EMAIL PROTECTED]
-- "Beer is proof that God loves us and wants us to be happy."

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




RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Jay Blanchard

[snip]
OK. One of the silly classes fails, saying --

Fatal error: No parent class available in this context in biff.php on line
52

line 52 is --

49 function BiffWriter()
50  {
51  error_reporting (E_ALL);
52  parent::BiffBase();
53  $this->_fill_AA_notation();
54  }

This is on a server with PHP 4.04. Does anyone have any clues as to why it
might not work?
[/snip]

I actually identified this in the above post without realizing it. The 4.04
version of PHP does not support the parent:: directive. Ah well, looks like
we're going to have to clear some time for an upgrade.

Thanks!

Jay



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




RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Beau Hartshorne

> Can you get the server to write it to a file, and then let the client
> download the file normally?
> [/snip]
> 
> Believe me, if I could have taken that way out I would have done it. I
am
> researching some classes, but they all seem to take just as long to
create
> the spreadsheet.

What about something like this:

1. Script loads. Script writes everything to some file.
2. Script is finished writing everything to file.
4. Script does a browser redirect and the user starts downloading the
file normally.

It just seems like the server doesn't want to have to deal with
streaming a large database result set to a web browser.

Beau



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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter

This just prints out a bunch of info (seems to be
unimportant)...what am I looking for in this?

--- Don Read <[EMAIL PROTECTED]> wrote:
> 
> On 25-Sep-2002 Daren Cotter wrote:
> > Holy wowsers...about 5 pages of jibberish printed
> out,
> > and at the end:
> > 
> > Warning:  Nesting level too deep -
> recursive
> > dependency? in test.php on line
> 3
> > 
> > There isn't even a line 3 in the script:
> > 
> >  > var_dump($argv);
> > var_dump($GLOBALS);
> > ?>
> > 
> 
> Sorry my mistake, make that :
> 
> print_r($GLOBALS);
> 
> 
> 
> -- 
> Don Read  
> [EMAIL PROTECTED]
> -- "Beer is proof that God loves us and wants us to
> be happy."


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Don Read


On 25-Sep-2002 Daren Cotter wrote:
> Holy wowsers...about 5 pages of jibberish printed out,
> and at the end:
> 
> Warning:  Nesting level too deep - recursive
> dependency? in test.php on line 3
> 
> There isn't even a line 3 in the script:
> 
>  var_dump($argv);
> var_dump($GLOBALS);
> ?>
> 

Sorry my mistake, make that :

print_r($GLOBALS);



-- 
Don Read   [EMAIL PROTECTED]
-- "Beer is proof that God loves us and wants us to be happy."

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




[PHP] Re: hidden PATH_INFO

2002-09-25 Thread Joel Boonstra

> Hi there. I'm trying to come up with a way to do
> PATH_INFO urls without having to call a script. Let me
> explain.
>
> I know how to make it work with a url like this:
>
> http://foo.com/bar.php/arg1/arg2/etc
>
> or even:
>
> http://foo.com/bar/arg1/arg2/etc
>
> What I'm trying to figure out is how to make it call
> index.php without specifying it, like this:
>
> http://foo.com/arg1/arg2/etc
>
> Any pointers?

This is something that will need to be done on the Apache level with
rewrites, I believe.  The PATH_INFO hack is a useful one, but if you
don't want to call a script directly, I think you'll need a rewrite.

There also may be another way to do it in Apache, but I don't think
there's anything in PHP you can do to accomplish this.

-- 
[ joel boonstra | [EMAIL PROTECTED] ]


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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter

Holy wowsers...about 5 pages of jibberish printed out,
and at the end:

Warning:  Nesting level too deep - recursive
dependency? in test.php on line 3

There isn't even a line 3 in the script:



--- Don Read <[EMAIL PROTECTED]> wrote:
> 
> On 25-Sep-2002 Daren Cotter wrote:
> > Jason,
> > 
> > That's exactly what I'm trying to do, and it's not
> > working:
> > 
> > My Script: 
> >#!/usr/bin/php -f
> >  > $test = $argv[1];
> > print $test;
> > $demo = "This Works";
> > print $demo;
> > ?>
> > 
> > Running:
> > ./test.php blah
> > 
> > Yiels only "This Works", but not "blah".
> > 
> > I'm using version 4.0.6
> > 
> 
> try 
> 
> var_dump($argv);
> var_dump($GLOBALS);
> > 
> > --- Jason Young <[EMAIL PROTECTED]> wrote:
> >> I can't say I'm really too familiar with the php
> >> commandline..
> >> 
> >> You're using /usr/bin/php (or equivalent) and
> >> attempting to use your 
> >> exec() that way?
> >> 
> >> If you do 'php -?' you'll get a list of commands
> >> that you can use, and I 
> >> don't see a way to pass cmdline arguments as
> >> variables..
> >> 
> >> Having said that, I Just went and looked further
> >> into it.. if I make a 
> >> test script, and at the top I put:
> >> $hi = $argv[1];
> >> 
> >> then $hi becomes whatever you've specified as the
> >> first argument.. I'm 
> >> assuming this is what you want?
> >> 
> >> To clarify:
> >> phpfile.php contains:
> >>  >> $hi = $argv[1];
> >> echo $hi;
> >> ?>
> >> 
> >> Running the command "php -f phpfile.php test"
> >> returns "test"
> >> 
> >> Does this help at all??
> >> 
> >> -Jason
> >> 
> >> Daren Cotter wrote:
> >> > Jason,
> >> > 
> >> > I'm not using a web script any longer, I'm
> using
> >> > command-line (I determined that it is installed
> on
> >> the
> >> > server).
> >> > 
> >> > I read about $argc and $argv, but when I call
> the
> >> > script passing two arguments, both $argc and
> $argv
> >> are
> >> > blank. Is this a php.ini setting I need to
> change
> >> or
> >> > somethign?
> >> > 
> >> > --- Jason Young <[EMAIL PROTECTED]> wrote:
> >> > 
> >> >>Sorry to butt in :)
> >> >>
> >> >>Arguments to web scripts are done in the
> format:
> >> >>page.php?arg1=data1&arg2=data2
> >> >>
> >> >>So you would use that full string as the lynx
> >> path.
> >> >>
> >> >>Hope this helps :)
> >> >>-Jason
> >> >>
> >> >>Daren Cotter wrote:
> >> >>
> >> >>>Thanks for the info Chris, it works!
> >> >>>
> >> >>>How do I pass arguments to the script? I'm
> >> >>
> >> >>assuming
> >> >>
> >> >>>it'd just be:
> >> >>>
> >> >>>test.php arg1 arg2
> >> >>>
> >> >>>The stuff I've read says $argc should be the
> >> count
> >> >>
> >> >>of
> >> >>
> >> >>>the # of arguments, and $argv should be an
> array
> >> >>>holding them...but when I do a simple:
> >> >>>print "# of Arguments: $argc\n";
> >> >>>It prints nothing, not even 0
> >> >>>
> >> >>>
> >> >>>--- Chris Hewitt <[EMAIL PROTECTED]>
> >> >>
> >> >>wrote:
> >> >>
> >> >On Wed, 25 Sep 2002, Daren Cotter wrote:
> >> >
> >> >
> >> >
> >> >>My problem, is that I absolutely NEED to
> run a
> >> >
> >> >>PHP
> >> >>
> >> >>script using crontab. The script needs to
> send
> >> >>numerous queries to a database every hour.
> Is
> >> >
> >> there
> >> 
> >> 
> >> >>any way I can accomplish this, directly or
> >> >
> >> indirectly?
> >> 
> >> Are you sure its not already there? Commonly
> in
> >> /usr/bin. Try a "which 
> >> php" and see if it finds anything?
> >> 
> >> HTH
> >> Chris
> >> 
> >> >>>
> >> >>>
> >> >>>
> >>
>
__
> >> >>>Do you Yahoo!?
> >> >>>New DSL Internet Access from SBC & Yahoo!
> >> >>>http://sbc.yahoo.com
> >> >>
> >> >>
> >> >>-- 
> >> >>PHP General Mailing List (http://www.php.net/)
> >> >>To unsubscribe, visit:
> >> http://www.php.net/unsub.php
> >> >>
> >> > 
> >> > 
> >> > 
> >> >
> __
> >> > Do you Yahoo!?
> >> > New DSL Internet Access from SBC & Yahoo!
> >> > http://sbc.yahoo.com
> >> 
> >> 
> >> -- 
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit:
> http://www.php.net/unsub.php
> >> 
> > 
> > 
> > __
> > Do you Yahoo!?
> > New DSL Internet Access from SBC & Yahoo!
> > http://sbc.yahoo.com
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit:
> http://www.php.net/unsub.php
> 
> -- 
> Don Read  
> [EMAIL PROTECTED]
> -- "Beer is proof that God loves us and wants us to
> be happy."


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




[PHP] PHP and M$ Access

2002-09-25 Thread Reuben D. Budiardja


Hello,
Sorry if this seems like a dumb question. But can PHP work with MS Access, for 
example if I want to develop a web database application? Does the API exist 
for that?
The system is going to be like Linux/Apache/PHP as the web server, and 
Win2k/NT with M$ Access as the database. I am wondering if php can access the 
database, just like the way it does with MySQL, for example. 

I am not really familiar with M$ stuff, since I usually use MySQL or Oracle. 
But I have a client who insist to use M$ Access. 

Thanks for any respond.
Reuben D. Budiardja

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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Robert Cummings

Daren Cotter wrote:
> 
> In any case, register_globals is ON for my server.
> 
> I don't understand why this isn't working? I'm doing
> exactly what the manual says. What could I be missing?

No idea the following worked as expected for me:

Script:


Execute:
php foo.php blah

Output:
X-Powered-By: PHP/4.1.2
Content-type: text/html

blahThis Works


Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Don Read


On 25-Sep-2002 Daren Cotter wrote:
> Jason,
> 
> That's exactly what I'm trying to do, and it's not
> working:
> 
> My Script: 
>#!/usr/bin/php -f
>  $test = $argv[1];
> print $test;
> $demo = "This Works";
> print $demo;
> ?>
> 
> Running:
> ./test.php blah
> 
> Yiels only "This Works", but not "blah".
> 
> I'm using version 4.0.6
> 

try 

var_dump($argv);
var_dump($GLOBALS);
> 
> --- Jason Young <[EMAIL PROTECTED]> wrote:
>> I can't say I'm really too familiar with the php
>> commandline..
>> 
>> You're using /usr/bin/php (or equivalent) and
>> attempting to use your 
>> exec() that way?
>> 
>> If you do 'php -?' you'll get a list of commands
>> that you can use, and I 
>> don't see a way to pass cmdline arguments as
>> variables..
>> 
>> Having said that, I Just went and looked further
>> into it.. if I make a 
>> test script, and at the top I put:
>> $hi = $argv[1];
>> 
>> then $hi becomes whatever you've specified as the
>> first argument.. I'm 
>> assuming this is what you want?
>> 
>> To clarify:
>> phpfile.php contains:
>> > $hi = $argv[1];
>> echo $hi;
>> ?>
>> 
>> Running the command "php -f phpfile.php test"
>> returns "test"
>> 
>> Does this help at all??
>> 
>> -Jason
>> 
>> Daren Cotter wrote:
>> > Jason,
>> > 
>> > I'm not using a web script any longer, I'm using
>> > command-line (I determined that it is installed on
>> the
>> > server).
>> > 
>> > I read about $argc and $argv, but when I call the
>> > script passing two arguments, both $argc and $argv
>> are
>> > blank. Is this a php.ini setting I need to change
>> or
>> > somethign?
>> > 
>> > --- Jason Young <[EMAIL PROTECTED]> wrote:
>> > 
>> >>Sorry to butt in :)
>> >>
>> >>Arguments to web scripts are done in the format:
>> >>page.php?arg1=data1&arg2=data2
>> >>
>> >>So you would use that full string as the lynx
>> path.
>> >>
>> >>Hope this helps :)
>> >>-Jason
>> >>
>> >>Daren Cotter wrote:
>> >>
>> >>>Thanks for the info Chris, it works!
>> >>>
>> >>>How do I pass arguments to the script? I'm
>> >>
>> >>assuming
>> >>
>> >>>it'd just be:
>> >>>
>> >>>test.php arg1 arg2
>> >>>
>> >>>The stuff I've read says $argc should be the
>> count
>> >>
>> >>of
>> >>
>> >>>the # of arguments, and $argv should be an array
>> >>>holding them...but when I do a simple:
>> >>>print "# of Arguments: $argc\n";
>> >>>It prints nothing, not even 0
>> >>>
>> >>>
>> >>>--- Chris Hewitt <[EMAIL PROTECTED]>
>> >>
>> >>wrote:
>> >>
>> >On Wed, 25 Sep 2002, Daren Cotter wrote:
>> >
>> >
>> >
>> >>My problem, is that I absolutely NEED to run a
>> >
>> >>PHP
>> >>
>> >>script using crontab. The script needs to send
>> >>numerous queries to a database every hour. Is
>> >
>> there
>> 
>> 
>> >>any way I can accomplish this, directly or
>> >
>> indirectly?
>> 
>> Are you sure its not already there? Commonly in
>> /usr/bin. Try a "which 
>> php" and see if it finds anything?
>> 
>> HTH
>> Chris
>> 
>> >>>
>> >>>
>> >>>
>>
__
>> >>>Do you Yahoo!?
>> >>>New DSL Internet Access from SBC & Yahoo!
>> >>>http://sbc.yahoo.com
>> >>
>> >>
>> >>-- 
>> >>PHP General Mailing List (http://www.php.net/)
>> >>To unsubscribe, visit:
>> http://www.php.net/unsub.php
>> >>
>> > 
>> > 
>> > 
>> > __
>> > Do you Yahoo!?
>> > New DSL Internet Access from SBC & Yahoo!
>> > http://sbc.yahoo.com
>> 
>> 
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
> 
> 
> __
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Don Read   [EMAIL PROTECTED]
-- "Beer is proof that God loves us and wants us to be happy."

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




RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Jay Blanchard

[snip]
 I am researching some classes 
[/snip]

OK. One of the silly classes fails, saying --

Fatal error: No parent class available in this context in biff.php on line
52

line 52 is --

49 function BiffWriter()
50  {
51  error_reporting (E_ALL);
52  parent::BiffBase();
53  $this->_fill_AA_notation();
54  }

This is on a server with PHP 4.04. Does anyone have any clues as to why it
might not work?
ACCCK! I am so frustrated at this point that I would almost rather write
spreadsheets by hand!

Thanks for your help!

Jay



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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter

In any case, register_globals is ON for my server.

I don't understand why this isn't working? I'm doing
exactly what the manual says. What could I be missing?


--- Robert Cummings <[EMAIL PROTECTED]>
wrote:
> Nope, $GLOBALS remains as always...
> 
>
>
http://www.php.net/manual/en/language.variables.predefined.php#language.variables.superglobals
> 
> Cheers,
> Rob.
> 
> Jason Young wrote:
> > 
> > Jeez.. pardon me..  $_GLOBALS .. I don't know
> where I got SERVER from..
> > *sleeps before posting from now on*
> > 
> > -J
> > 
> > Jason Young wrote:
> > > Correction.. isn't it $_SERVER and not $SERVER
> > >
> > > Jason Young wrote:
> > >
> > >> Daren,
> > >>
> > >> This post from Robert explains why you're
> having trouble :)
> > >>
> > >> I forgot the PHP version on my machine doesn't
> have the
> > >> register_globals problem.
> > >>
> > >> THAT should work.
> > >>
> > >> -Jason
> > >>
> > >>>
> > >>> I'm think you're all forgetting about
> register_globals being off by
> > >>> default these days... The following may help:
> > >>>
> > >>> $argc = $GLOBALS['HTTP_SERVER_VARS']['argc'];
> > >>> $argv = $GLOBALS['HTTP_SERVER_VARS']['argv'];
> > >>>
> > >>> HTH,
> > >>> Rob.
> > >>
> > >>
> > >>
> > >
> > 
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit:
> http://www.php.net/unsub.php
> 
> -- 
> .-.
> | Robert Cummings |
> :-`.
> | Webdeployer - Chief PHP and Java Programmer  |
> :--:
> | Mail  : mailto:[EMAIL PROTECTED] |
> | Phone : (613) 731-4046 x.109 |
> :--:
> | Website : http://www.webmotion.com   |
> | Fax : (613) 260-9545 |
> `--'
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Robert Cummings

Nope, $GLOBALS remains as always...


http://www.php.net/manual/en/language.variables.predefined.php#language.variables.superglobals

Cheers,
Rob.

Jason Young wrote:
> 
> Jeez.. pardon me..  $_GLOBALS .. I don't know where I got SERVER from..
> *sleeps before posting from now on*
> 
> -J
> 
> Jason Young wrote:
> > Correction.. isn't it $_SERVER and not $SERVER
> >
> > Jason Young wrote:
> >
> >> Daren,
> >>
> >> This post from Robert explains why you're having trouble :)
> >>
> >> I forgot the PHP version on my machine doesn't have the
> >> register_globals problem.
> >>
> >> THAT should work.
> >>
> >> -Jason
> >>
> >>>
> >>> I'm think you're all forgetting about register_globals being off by
> >>> default these days... The following may help:
> >>>
> >>> $argc = $GLOBALS['HTTP_SERVER_VARS']['argc'];
> >>> $argv = $GLOBALS['HTTP_SERVER_VARS']['argv'];
> >>>
> >>> HTH,
> >>> Rob.
> >>
> >>
> >>
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




Re: [PHP] Encrypt data...

2002-09-25 Thread Mike Dunlop

http://php.net/mcrypt

>How do I encrypt the data and decrypt it back using PHP?  I do know that hte
>random number can not be used becuase it will make it impossible to decrypt
>it.
>
>Thanks!
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
Mike Dunlop
Webmaster
Animation World Network
[EMAIL PROTECTED]
http://www.awn.com
(323) 606-4238 office
(323) 466-6619 fax
6525 Sunset Blvd.  GS10 Los Angeles, CA  90028
USA


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




[PHP] RE: ? (FIXED) (Errr... problem uploading files)

2002-09-25 Thread Jose Fandos

Hi there!

> Hi - it seems from your PHPinfo output that you have not specified, in
> your
> PHP.ini file, a directory where the server can put the uploaded files.
If
> this is not specified by a system defaul, you need to specifiy it
here.
> This means that : they will disappear into oblivion (at best).
Specifying
> C://temp or D://WINNT//Temp is a good place to start.
> 
> upload_tmp_dir  no valueno value

Yes!!! That did it. It doesn't work all the time. For some reason it
fails at times, even with the same image being uploaded, but it does at
least work now. I saw that option, but given that the following text was
preceeding it, didn't give it further thought.

; Temporary directory for HTTP uploaded files (will use system default
if not
; specified).
upload_tmp_dir = c:\\windows\\temp


> Also - your temp files will not have the name of the file you
uploaded,
> because they might interfere with other files uploaded into the temp
dir.
> They are usually named sequentially, while session files usually have
a
> MD5
> based name (long string of alpha characters)
> 
> Consequently the filenames might be like "php29.tmp" or whatever - not
> what
> you sent the file as. To recover the filename , check
> 
> $HTTP_POST_FILES["fieldname"]["name"]
> 
> Where fieldname is the name of the browse field that you gave in the
forms
> HTML.

Yep. That was taken care of. 

Thanks again,

Jose

 
> Cheers,
> Neil Smith.
> 
> At 00:39 25/09/2002 +, you wrote:
> >From: "Jose Fandos" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>,
> > <[EMAIL PROTECTED]>
> >Date: Tue, 24 Sep 2002 19:22:14 +0100
> >Message-ID: <000401c263f7$50dfa060$2000a8c0@YAL>
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> > charset="us-ascii"
> >Content-Transfer-Encoding: 7bit
> >Subject: Errr... problem uploading files
> >
> >Hi,
> >
> >Under PHP 4.2.3 and 4.2.2 with Apache 1.3.6, all under Windows XP,
when
> >a
> >form has a file input field, if I browse and upload, all the
information
> >going with the post to the server gets lost!!! There is no trace of
it
> >(and
> >this is what's really frustating me, no trace in any log of any
errors).
> >var_dump's show everything empty. If I submit without browsing (i.e.
no
> >file
> >selected), I do see the $_FILES array signaling an error, but
otherwise
> >complete, and everything else (though, on further testing, it seems
that
> 
> __
> 
> VideoChat with friends online, get Freshly Toasted every day at
> http://www.fresh-toast.net : NetMeeting solutions for a connected
world.



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




[PHP] Encrypt data...

2002-09-25 Thread Scott Fletcher

How do I encrypt the data and decrypt it back using PHP?  I do know that hte
random number can not be used becuase it will make it impossible to decrypt
it.

Thanks!



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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Jason Young

Jeez.. pardon me..  $_GLOBALS .. I don't know where I got SERVER from..
*sleeps before posting from now on*

-J

Jason Young wrote:
> Correction.. isn't it $_SERVER and not $SERVER
> 
> Jason Young wrote:
> 
>> Daren,
>>
>> This post from Robert explains why you're having trouble :)
>>
>> I forgot the PHP version on my machine doesn't have the 
>> register_globals problem.
>>
>> THAT should work.
>>
>> -Jason
>>
>>>
>>> I'm think you're all forgetting about register_globals being off by
>>> default these days... The following may help:
>>>
>>> $argc = $GLOBALS['HTTP_SERVER_VARS']['argc'];
>>> $argv = $GLOBALS['HTTP_SERVER_VARS']['argv'];
>>>
>>> HTH,
>>> Rob.
>>
>>
>>
> 


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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Jason Young

Correction.. isn't it $_SERVER and not $SERVER

Jason Young wrote:
> Daren,
> 
> This post from Robert explains why you're having trouble :)
> 
> I forgot the PHP version on my machine doesn't have the register_globals 
> problem.
> 
> THAT should work.
> 
> -Jason
> 
>>
>> I'm think you're all forgetting about register_globals being off by
>> default these days... The following may help:
>>
>> $argc = $GLOBALS['HTTP_SERVER_VARS']['argc'];
>> $argv = $GLOBALS['HTTP_SERVER_VARS']['argv'];
>>
>> HTH,
>> Rob.
> 
> 


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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Jason Young

Daren,

This post from Robert explains why you're having trouble :)

I forgot the PHP version on my machine doesn't have the register_globals 
problem.

THAT should work.

-Jason

> 
> I'm think you're all forgetting about register_globals being off by
> default these days... The following may help:
> 
> $argc = $GLOBALS['HTTP_SERVER_VARS']['argc'];
> $argv = $GLOBALS['HTTP_SERVER_VARS']['argv'];
> 
> HTH,
> Rob.


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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter

Robert,

This does not work, but thanks anyway  =)

Script:


Command Line:
/usr/bin/php -f test.php blah

Output:
This Works


--- Robert Cummings <[EMAIL PROTECTED]>
wrote:
> Jason Young wrote:
> > 
> > I can't say I'm really too familiar with the php
> commandline..
> > 
> > You're using /usr/bin/php (or equivalent) and
> attempting to use your
> > exec() that way?
> > 
> > If you do 'php -?' you'll get a list of commands
> that you can use, and I
> > don't see a way to pass cmdline arguments as
> variables..
> > 
> > Having said that, I Just went and looked further
> into it.. if I make a
> > test script, and at the top I put:
> > $hi = $argv[1];
> > 
> > then $hi becomes whatever you've specified as the
> first argument.. I'm
> > assuming this is what you want?
> > 
> > To clarify:
> > phpfile.php contains:
> >  > $hi = $argv[1];
> > echo $hi;
> > ?>
> > 
> > Running the command "php -f phpfile.php test"
> returns "test"
> > 
> > Does this help at all??
> > 
> > -Jason
> > 
> > Daren Cotter wrote:
> > > Jason,
> > >
> > > I'm not using a web script any longer, I'm using
> > > command-line (I determined that it is installed
> on the
> > > server).
> > >
> > > I read about $argc and $argv, but when I call
> the
> > > script passing two arguments, both $argc and
> $argv are
> > > blank. Is this a php.ini setting I need to
> change or
> > > somethign?
> > >
> 
> I'm think you're all forgetting about
> register_globals being off by
> default these days... The following may help:
> 
> $argc = $GLOBALS['HTTP_SERVER_VARS']['argc'];
> $argv = $GLOBALS['HTTP_SERVER_VARS']['argv'];
> 
> HTH,
> Rob.
> -- 
> .-.
> | Robert Cummings |
> :-`.
> | Webdeployer - Chief PHP and Java Programmer  |
> :--:
> | Mail  : mailto:[EMAIL PROTECTED] |
> | Phone : (613) 731-4046 x.109 |
> :--:
> | Website : http://www.webmotion.com   |
> | Fax : (613) 260-9545 |
> `--'
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




[PHP] dynamic website

2002-09-25 Thread Donahue Ben

I have a general question of a dynamic website using
PHP4 and mysql database.  If there are many, many
users visiting a dynamic website at once, will it
cause the database to be bogged down with so many
users visiting the website?  If so, how do you around
this problem.
  

  Thanks, Ben

__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter

I'm using a PHP script. I got a PHP script to run
mysql queries no problem, but the trouble is I need to
pass off arguments to the script (those arguments
shape the queries).

--- Mike Dunlop <[EMAIL PROTECTED]> wrote:
> Darren,
> 
> Do you want to use a shell script or a php page to
> run your queries?
> 
>   - MD
> 
> >Jason,
> >
> >I'm not using a web script any longer, I'm using
> >command-line (I determined that it is installed on
> the
> >server).
> >
> >I read about $argc and $argv, but when I call the
> >script passing two arguments, both $argc and $argv
> are
> >blank. Is this a php.ini setting I need to change
> or
> >somethign?
> >
> >--- Jason Young <[EMAIL PROTECTED]> wrote:
> >>  Sorry to butt in :)
> >>
> >>  Arguments to web scripts are done in the format:
> >>  page.php?arg1=data1&arg2=data2
> >>
> >>  So you would use that full string as the lynx
> path.
> >>
> >>  Hope this helps :)
> >>  -Jason
> >>
> >>  Daren Cotter wrote:
> >>  > Thanks for the info Chris, it works!
> >>  >
> >>  > How do I pass arguments to the script? I'm
> >>  assuming
> >>  > it'd just be:
> >>  >
> >>  > test.php arg1 arg2
> >>  >
> >>  > The stuff I've read says $argc should be the
> count
> >>  of
> >>  > the # of arguments, and $argv should be an
> array
> >>  > holding them...but when I do a simple:
> >>  > print "# of Arguments: $argc\n";
> >>  > It prints nothing, not even 0
> >>  >
> >>  >
> >>  > --- Chris Hewitt <[EMAIL PROTECTED]>
> >>  wrote:
> >>  >
> >>  >>>
> >>  >>>On Wed, 25 Sep 2002, Daren Cotter wrote:
> >>  >>>
> >>  >>>
> >>  My problem, is that I absolutely NEED to run
> a
> >>  PHP
> >>  script using crontab. The script needs to
> send
> >>  numerous queries to a database every hour.
> Is
> >>  >>>
> >>  >>there
> >>  >>
> >>  any way I can accomplish this, directly or
> >>  >>>
> >>  >>indirectly?
> >>  >>
> >>  >>Are you sure its not already there? Commonly
> in
> >>  >>/usr/bin. Try a "which
> >>  >>php" and see if it finds anything?
> >>  >>
> >>  >>HTH
> >>  >>Chris
> >>  >>
> >>  >
> >>  >
> >>  >
> >>  >
> __
> >>  > Do you Yahoo!?
> >>  > New DSL Internet Access from SBC & Yahoo!
> >>  > http://sbc.yahoo.com
> >>
> >>
> >>  --
> >>  PHP General Mailing List (http://www.php.net/)
> >>  To unsubscribe, visit:
> http://www.php.net/unsub.php
> >>
> >
> >
> >__
> >Do you Yahoo!?
> >New DSL Internet Access from SBC & Yahoo!
> >http://sbc.yahoo.com
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> -- 
> Mike Dunlop
> Webmaster
> Animation World Network
> [EMAIL PROTECTED]
> http://www.awn.com
> (323) 606-4238 office
> (323) 466-6619 fax
> 6525 Sunset Blvd.  GS10 Los Angeles, CA  90028
> USA
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter

Jason,

That's exactly what I'm trying to do, and it's not
working:

My Script: 
#!/usr/bin/php -f


Running:
./test.php blah

Yiels only "This Works", but not "blah".

I'm using version 4.0.6


--- Jason Young <[EMAIL PROTECTED]> wrote:
> I can't say I'm really too familiar with the php
> commandline..
> 
> You're using /usr/bin/php (or equivalent) and
> attempting to use your 
> exec() that way?
> 
> If you do 'php -?' you'll get a list of commands
> that you can use, and I 
> don't see a way to pass cmdline arguments as
> variables..
> 
> Having said that, I Just went and looked further
> into it.. if I make a 
> test script, and at the top I put:
> $hi = $argv[1];
> 
> then $hi becomes whatever you've specified as the
> first argument.. I'm 
> assuming this is what you want?
> 
> To clarify:
> phpfile.php contains:
>  $hi = $argv[1];
> echo $hi;
> ?>
> 
> Running the command "php -f phpfile.php test"
> returns "test"
> 
> Does this help at all??
> 
> -Jason
> 
> Daren Cotter wrote:
> > Jason,
> > 
> > I'm not using a web script any longer, I'm using
> > command-line (I determined that it is installed on
> the
> > server).
> > 
> > I read about $argc and $argv, but when I call the
> > script passing two arguments, both $argc and $argv
> are
> > blank. Is this a php.ini setting I need to change
> or
> > somethign?
> > 
> > --- Jason Young <[EMAIL PROTECTED]> wrote:
> > 
> >>Sorry to butt in :)
> >>
> >>Arguments to web scripts are done in the format:
> >>page.php?arg1=data1&arg2=data2
> >>
> >>So you would use that full string as the lynx
> path.
> >>
> >>Hope this helps :)
> >>-Jason
> >>
> >>Daren Cotter wrote:
> >>
> >>>Thanks for the info Chris, it works!
> >>>
> >>>How do I pass arguments to the script? I'm
> >>
> >>assuming
> >>
> >>>it'd just be:
> >>>
> >>>test.php arg1 arg2
> >>>
> >>>The stuff I've read says $argc should be the
> count
> >>
> >>of
> >>
> >>>the # of arguments, and $argv should be an array
> >>>holding them...but when I do a simple:
> >>>print "# of Arguments: $argc\n";
> >>>It prints nothing, not even 0
> >>>
> >>>
> >>>--- Chris Hewitt <[EMAIL PROTECTED]>
> >>
> >>wrote:
> >>
> >On Wed, 25 Sep 2002, Daren Cotter wrote:
> >
> >
> >
> >>My problem, is that I absolutely NEED to run a
> >
> >>PHP
> >>
> >>script using crontab. The script needs to send
> >>numerous queries to a database every hour. Is
> >
> there
> 
> 
> >>any way I can accomplish this, directly or
> >
> indirectly?
> 
> Are you sure its not already there? Commonly in
> /usr/bin. Try a "which 
> php" and see if it finds anything?
> 
> HTH
> Chris
> 
> >>>
> >>>
> >>>
>
>>>__
> >>>Do you Yahoo!?
> >>>New DSL Internet Access from SBC & Yahoo!
> >>>http://sbc.yahoo.com
> >>
> >>
> >>-- 
> >>PHP General Mailing List (http://www.php.net/)
> >>To unsubscribe, visit:
> http://www.php.net/unsub.php
> >>
> > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > New DSL Internet Access from SBC & Yahoo!
> > http://sbc.yahoo.com
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Jay Blanchard

[snip]
> I guess that this means I am out of luck here. Anyone know a cleaner
> method for delivering spreadsheets?

Can you get the server to write it to a file, and then let the client
download the file normally?
[/snip]

Believe me, if I could have taken that way out I would have done it. I am
researching some classes, but they all seem to take just as long to create
the spreadsheet.

Jay



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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Robert Cummings

Jason Young wrote:
> 
> I can't say I'm really too familiar with the php commandline..
> 
> You're using /usr/bin/php (or equivalent) and attempting to use your
> exec() that way?
> 
> If you do 'php -?' you'll get a list of commands that you can use, and I
> don't see a way to pass cmdline arguments as variables..
> 
> Having said that, I Just went and looked further into it.. if I make a
> test script, and at the top I put:
> $hi = $argv[1];
> 
> then $hi becomes whatever you've specified as the first argument.. I'm
> assuming this is what you want?
> 
> To clarify:
> phpfile.php contains:
>  $hi = $argv[1];
> echo $hi;
> ?>
> 
> Running the command "php -f phpfile.php test" returns "test"
> 
> Does this help at all??
> 
> -Jason
> 
> Daren Cotter wrote:
> > Jason,
> >
> > I'm not using a web script any longer, I'm using
> > command-line (I determined that it is installed on the
> > server).
> >
> > I read about $argc and $argv, but when I call the
> > script passing two arguments, both $argc and $argv are
> > blank. Is this a php.ini setting I need to change or
> > somethign?
> >

I'm think you're all forgetting about register_globals being off by
default these days... The following may help:

$argc = $GLOBALS['HTTP_SERVER_VARS']['argc'];
$argv = $GLOBALS['HTTP_SERVER_VARS']['argv'];

HTH,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Beau Hartshorne

> I guess that this means I am out of luck here. Anyone know a cleaner 
> method for delivering spreadsheets?

Can you get the server to write it to a file, and then let the client
download the file normally?

Beau



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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Mike Dunlop

Darren,

Do you want to use a shell script or a php page to run your queries?

  - MD

>Jason,
>
>I'm not using a web script any longer, I'm using
>command-line (I determined that it is installed on the
>server).
>
>I read about $argc and $argv, but when I call the
>script passing two arguments, both $argc and $argv are
>blank. Is this a php.ini setting I need to change or
>somethign?
>
>--- Jason Young <[EMAIL PROTECTED]> wrote:
>>  Sorry to butt in :)
>>
>>  Arguments to web scripts are done in the format:
>>  page.php?arg1=data1&arg2=data2
>>
>>  So you would use that full string as the lynx path.
>>
>>  Hope this helps :)
>>  -Jason
>>
>>  Daren Cotter wrote:
>>  > Thanks for the info Chris, it works!
>>  >
>>  > How do I pass arguments to the script? I'm
>>  assuming
>>  > it'd just be:
>>  >
>>  > test.php arg1 arg2
>>  >
>>  > The stuff I've read says $argc should be the count
>>  of
>>  > the # of arguments, and $argv should be an array
>>  > holding them...but when I do a simple:
>>  > print "# of Arguments: $argc\n";
>>  > It prints nothing, not even 0
>>  >
>>  >
>>  > --- Chris Hewitt <[EMAIL PROTECTED]>
>>  wrote:
>>  >
>>  >>>
>>  >>>On Wed, 25 Sep 2002, Daren Cotter wrote:
>>  >>>
>>  >>>
>>  My problem, is that I absolutely NEED to run a
>>  PHP
>>  script using crontab. The script needs to send
>>  numerous queries to a database every hour. Is
>>  >>>
>>  >>there
>>  >>
>>  any way I can accomplish this, directly or
>>  >>>
>>  >>indirectly?
>>  >>
>>  >>Are you sure its not already there? Commonly in
>>  >>/usr/bin. Try a "which
>>  >>php" and see if it finds anything?
>>  >>
>>  >>HTH
>>  >>Chris
>>  >>
>>  >
>>  >
>>  >
>>  > __
>>  > Do you Yahoo!?
>>  > New DSL Internet Access from SBC & Yahoo!
>>  > http://sbc.yahoo.com
>>
>>
>>  --
>>  PHP General Mailing List (http://www.php.net/)
>>  To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>
>__
>Do you Yahoo!?
>New DSL Internet Access from SBC & Yahoo!
>http://sbc.yahoo.com
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
Mike Dunlop
Webmaster
Animation World Network
[EMAIL PROTECTED]
http://www.awn.com
(323) 606-4238 office
(323) 466-6619 fax
6525 Sunset Blvd.  GS10 Los Angeles, CA  90028
USA


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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Jason Young

I can't say I'm really too familiar with the php commandline..

You're using /usr/bin/php (or equivalent) and attempting to use your 
exec() that way?

If you do 'php -?' you'll get a list of commands that you can use, and I 
don't see a way to pass cmdline arguments as variables..

Having said that, I Just went and looked further into it.. if I make a 
test script, and at the top I put:
$hi = $argv[1];

then $hi becomes whatever you've specified as the first argument.. I'm 
assuming this is what you want?

To clarify:
phpfile.php contains:


Running the command "php -f phpfile.php test" returns "test"

Does this help at all??

-Jason

Daren Cotter wrote:
> Jason,
> 
> I'm not using a web script any longer, I'm using
> command-line (I determined that it is installed on the
> server).
> 
> I read about $argc and $argv, but when I call the
> script passing two arguments, both $argc and $argv are
> blank. Is this a php.ini setting I need to change or
> somethign?
> 
> --- Jason Young <[EMAIL PROTECTED]> wrote:
> 
>>Sorry to butt in :)
>>
>>Arguments to web scripts are done in the format:
>>page.php?arg1=data1&arg2=data2
>>
>>So you would use that full string as the lynx path.
>>
>>Hope this helps :)
>>-Jason
>>
>>Daren Cotter wrote:
>>
>>>Thanks for the info Chris, it works!
>>>
>>>How do I pass arguments to the script? I'm
>>
>>assuming
>>
>>>it'd just be:
>>>
>>>test.php arg1 arg2
>>>
>>>The stuff I've read says $argc should be the count
>>
>>of
>>
>>>the # of arguments, and $argv should be an array
>>>holding them...but when I do a simple:
>>>print "# of Arguments: $argc\n";
>>>It prints nothing, not even 0
>>>
>>>
>>>--- Chris Hewitt <[EMAIL PROTECTED]>
>>
>>wrote:
>>
>On Wed, 25 Sep 2002, Daren Cotter wrote:
>
>
>
>>My problem, is that I absolutely NEED to run a
>
>>PHP
>>
>>script using crontab. The script needs to send
>>numerous queries to a database every hour. Is
>
there


>>any way I can accomplish this, directly or
>
indirectly?

Are you sure its not already there? Commonly in
/usr/bin. Try a "which 
php" and see if it finds anything?

HTH
Chris

>>>
>>>
>>>
>>>__
>>>Do you Yahoo!?
>>>New DSL Internet Access from SBC & Yahoo!
>>>http://sbc.yahoo.com
>>
>>
>>-- 
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
> 
> 
> 
> __
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com


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




Re: [PHP] Explorer-like "drill down" interface

2002-09-25 Thread Mike Dunlop

I would recommend using javascript for the expanding/contracting list 
stuff and I don't know of any vulnerablilities in MySQL Server...

  - Mike D





>I have two questions:
>
>1. I would like to build a php page that contains a Windows 
>explorer-like drill down mechanism, where clicking the '+' beside an 
>item will expand the sub-items below (which can also have a '+' or 
>'-' on the left) and clicking the '-' will collapse the item. Is 
>there any existing code for that or hints how I can do it?
>
>2. I have allowed packets through my firewall destined for port 
>3306, the mysql server. So I can connect to the server from a remote 
>machine. Are there any known security vulnerabilities in the mySQL 
>server?
>
>Many thanks,
>
>Rich


-- 
Mike Dunlop
Webmaster
Animation World Network
[EMAIL PROTECTED]
http://www.awn.com
(323) 606-4238 office
(323) 466-6619 fax
6525 Sunset Blvd.  GS10 Los Angeles, CA  90028
USA


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




Re: [PHP] Explorer-like "drill down" interface

2002-09-25 Thread Bill Farrell

Hi Richard,

There are a couple out there... I created one for
myself (V1."un") that does something similar...  It
relies on a couple of support files for mime-types and
icons.  Here's the code... if you like the idea, I can
zip up the icons and extension-to-mime folders and
send it to ya.  My website (www.jwfarrell.com) is
supposed to be online later this afternoon (after a
week of promises from my ISP), so you'll be able to
look at the code in action.

B

listtree.php
\n";
?>

Browse the Documentation Tree









Folder contents

\n";

$DocArray = explode( '/', $TargetFolder );
$DocDirectoryArray = array_slice( $DocArray, 1 );
$DocDirectory = implode( '/', $DocDirectoryArray );
$CurrentFolder = "$TargetFolder";

//echo "Doc Directory is $DocDirectory\n";
$FullPath = explode( '/', $DocDirectory );
$PreviousDirectoryArray = array_slice( $FullPath, 0,
count( $FullPath ) - 2 );
$PreviousDirectory = implode( '/',
$PreviousDirectoryArray );

$FullURL = explode( '/', $CurrentFolder );
$PreviousFolderArray = array_slice( $FullURL, 0,
count( $FullURL ) - 1 );
$PreviousFolder = implode( '/', $PreviousFolderArray
);

}
}

// init tree - disallow attempts to go above gaol
if ( ( !isset( $DocDirectory ) ) | ( strlen(
$DocDirectory ) < strlen( $GaolURL ) ) ) {
$DocDirectory = $Gaol;
$DocDirectoryArray = array( $DocDirectory );
$CurrentFolder = $GaolURL;
$PreviousFolderArray = array( "" );
$PreviousFolder = "";
}

if ( ( $Docs = opendir( $DocDirectory ) ) === false )
{ die( "$DocDirectory doesn't exist!" ); }

while ( false !== ( $Subdir = readdir( $Docs ) ) ) {
if ( ( substr( $Subdir, 0, 1 ) != "." ) ) {
if ( is_dir( "$DocDirectory/$Subdir" ) ) {
array_push( $Subdirectories, $Subdir );
} else {
array_push( $SimpleFiles, $Subdir );
}
}
}

sort( $Subdirectories );
sort( $SimpleFiles );

?>

 
 
Name
Size



\n";
echo "\n";
echo " \n";
echo "Documentation Home Page\n";
echo "\n";

echo " \n";

if ( $DocDirectory != $Gaol ) {
echo "\n";
echo "\n";
echo " \n";
echo "Top of the Tree\n";
echo "\n";

echo " \n";

echo "\n";
echo "\n";
echo " \n";
echo "Up one level to $PreviousFolder\n";
echo "\n";

echo " \n";
}
?>


 



\n";
if ( ( $Subdir == $LastFolder ) & ( $LastFile == "" )
) {
echo "\n";
} else {
echo "\n";
}
echo "\n";
echo "$CurrentFolder/$Subdir\n";
echo "\n";

}

foreach ( $SimpleFiles as $SimpleFile ) {
echo "\n";

if ( $SimpleFile == $LastFile ) {
echo "\n";
} else {
echo "\n";
}

// find the right icon for the file type
unset( $Icon );
$SplitName = explode( '.', $SimpleFile );
$NameParts = count( $SplitName );
if ( $NameParts == 1 ) {
$Icon = "generic.gif";
} else {
$NameParts--;
$Extension = $SplitName[ $NameParts ];
if ( is_file( "$MimeTypeFolder/$Extension" ) ) {
list( $MimeType, $TheRest ) = file(
"$MimeTypeFolder/$Extension" );
$MimeType = rtrim( $MimeType );
if ( is_file( "$IconsFolder/mime_$MimeType.gif" ) )
{
$Icon = "mime_$MimeType.gif";
}
}
}

if ( !isset( $Icon ) ) { $Icon = "generic.gif"; }

echo "\n";
echo "$CurrentFolder/$SimpleFile\n";

echo "" .
filesize( "$DocRoot/$CurrentFolder/$SimpleFile" ) .
"";
echo "\n";
}

?>











=
Bill Farrell
Multivalue and *nix Support Specialist

Phone: (828) 667-2245
Fax:   (928) 563-5189
Web:   http://www.jwfarrell.com

__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




[PHP] Explorer-like "drill down" interface

2002-09-25 Thread Richard Fox

I have two questions:

1. I would like to build a php page that contains a Windows explorer-like drill down 
mechanism, where clicking the '+' beside an item will expand the sub-items below 
(which can also have a '+' or '-' on the left) and clicking the '-' will collapse the 
item. Is there any existing code for that or hints how I can do it?

2. I have allowed packets through my firewall destined for port 3306, the mysql 
server. So I can connect to the server from a remote machine. Are there any known 
security vulnerabilities in the mySQL server? 

Many thanks,

Rich




Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter

Jason,

I'm not using a web script any longer, I'm using
command-line (I determined that it is installed on the
server).

I read about $argc and $argv, but when I call the
script passing two arguments, both $argc and $argv are
blank. Is this a php.ini setting I need to change or
somethign?

--- Jason Young <[EMAIL PROTECTED]> wrote:
> Sorry to butt in :)
> 
> Arguments to web scripts are done in the format:
> page.php?arg1=data1&arg2=data2
> 
> So you would use that full string as the lynx path.
> 
> Hope this helps :)
> -Jason
> 
> Daren Cotter wrote:
> > Thanks for the info Chris, it works!
> > 
> > How do I pass arguments to the script? I'm
> assuming
> > it'd just be:
> > 
> > test.php arg1 arg2
> > 
> > The stuff I've read says $argc should be the count
> of
> > the # of arguments, and $argv should be an array
> > holding them...but when I do a simple:
> > print "# of Arguments: $argc\n";
> > It prints nothing, not even 0
> > 
> > 
> > --- Chris Hewitt <[EMAIL PROTECTED]>
> wrote:
> > 
> >>>
> >>>On Wed, 25 Sep 2002, Daren Cotter wrote:
> >>>
> >>>
> My problem, is that I absolutely NEED to run a
> PHP
> script using crontab. The script needs to send
> numerous queries to a database every hour. Is
> >>>
> >>there
> >>
> any way I can accomplish this, directly or
> >>>
> >>indirectly?
> >>
> >>Are you sure its not already there? Commonly in
> >>/usr/bin. Try a "which 
> >>php" and see if it finds anything?
> >>
> >>HTH
> >>Chris
> >>
> > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > New DSL Internet Access from SBC & Yahoo!
> > http://sbc.yahoo.com
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Jason Young

Sorry to butt in :)

Arguments to web scripts are done in the format:
page.php?arg1=data1&arg2=data2

So you would use that full string as the lynx path.

Hope this helps :)
-Jason

Daren Cotter wrote:
> Thanks for the info Chris, it works!
> 
> How do I pass arguments to the script? I'm assuming
> it'd just be:
> 
> test.php arg1 arg2
> 
> The stuff I've read says $argc should be the count of
> the # of arguments, and $argv should be an array
> holding them...but when I do a simple:
> print "# of Arguments: $argc\n";
> It prints nothing, not even 0
> 
> 
> --- Chris Hewitt <[EMAIL PROTECTED]> wrote:
> 
>>>
>>>On Wed, 25 Sep 2002, Daren Cotter wrote:
>>>
>>>
My problem, is that I absolutely NEED to run a PHP
script using crontab. The script needs to send
numerous queries to a database every hour. Is
>>>
>>there
>>
any way I can accomplish this, directly or
>>>
>>indirectly?
>>
>>Are you sure its not already there? Commonly in
>>/usr/bin. Try a "which 
>>php" and see if it finds anything?
>>
>>HTH
>>Chris
>>
> 
> 
> 
> __
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com


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




RE: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Jay Blanchard

[snip]
Output buffering is doing nothing for you in the given example.  It does not
reduce client side resources... if anything it increases the usage
serverside resources.  Perhaps you are thinking of gz compression?  You
might use a combination of ob* functions and gz* functions to minimize
bandwidth requirments.. but there's no guarantee that your user's browsers
supports it.
[/snip]

Fatal error: Call to undefined function: gzcompress() in
/var/lib/apache/htdocs/swbcabs/gen.php on line 89

I guess that this means I am out of luck here. Anyone know a cleaner method
for delivering spreadsheets?

Thanks!

Jay



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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter

Thanks for the info Chris, it works!

How do I pass arguments to the script? I'm assuming
it'd just be:

test.php arg1 arg2

The stuff I've read says $argc should be the count of
the # of arguments, and $argv should be an array
holding them...but when I do a simple:
print "# of Arguments: $argc\n";
It prints nothing, not even 0


--- Chris Hewitt <[EMAIL PROTECTED]> wrote:
> >
> >
> >On Wed, 25 Sep 2002, Daren Cotter wrote:
> >
> >>
> >>My problem, is that I absolutely NEED to run a PHP
> >>script using crontab. The script needs to send
> >>numerous queries to a database every hour. Is
> there
> >>any way I can accomplish this, directly or
> indirectly?
> >>
> Are you sure its not already there? Commonly in
> /usr/bin. Try a "which 
> php" and see if it finds anything?
> 
> HTH
> Chris
> 


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




Re: [PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Kevin Stone

Output buffering is doing nothing for you in the given example.  It does not
reduce client side resources... if anything it increases the usage
serverside resources.  Perhaps you are thinking of gz compression?  You
might use a combination of ob* functions and gz* functions to minimize
bandwidth requirments.. but there's no guarantee that your user's browsers
supports it.

http://www.php.net/manual/en/printwn/function.gzcompress.php

-Kevin

- Original Message -
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 25, 2002 10:45 AM
Subject: [PHP] Output Buffering - Am I using it correctly?


> Howdy group!
>
> I am outputting a rather large data set to an Excel spreadsheet from a
MySQL
> database on a healthy FreeBSD server. The Apache server is on the same
> server as the database. The code looks like this
>
>  /*
> ** SWB CABS Project
> ** USOC Charges Detail
> ** Report By Criteria - Spreadsheet
> */
>
> // open output buffer
> ob_start();
>
> // excel headers
> header("Content-Type:  application/vnd.ms-excel");
> header("Content-Disposition: inline; filename=\"excel.xls\"");
> header("Expires: 0");
> header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
>
> 
> /*
> ** lots of code that gets roughly
> ** 15,000 - 20,000 rows of data
> ** each row is 209 bytes of data
> */
> 
>
> // close output buffer
> ob_end_flush();
> ?>
>
> Now, even though I have set ob_start() the headers get sent (as it says in
> the docs; "While output buffering is active no output is sent from the
> script (other than headers), instead the output is stored in an internal
> buffer. ")
>
> The Task Manager shows that the processes on my local machine for
EXCEL.EXE
> go to the maximum available CPU cycles and stays there until the
spreadsheet
> is either delivered or the system times out. I thought that using output
> buffering would lower use of client system resources. Is this not true?
>
> Thanks!
>
> Jay
>
>
>
> --
> 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] Cronjob

2002-09-25 Thread John Holmes

Use lynx or wget to call your web page.

lynx --dump http://www.domain.com/my_cron_page.php

---John Holmes...

> -Original Message-
> From: Daren Cotter [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 25, 2002 12:36 PM
> To: PHP General Mailing List
> Subject: [PHP] Cronjob
> 
> I have PHP installed on a Cobalt RaQ550. I know there
> are two ways of installing PHP, one as a binary, and
> one as an Apache module. I am pretty sure PHP gets
> installed as an Apache module for the Cobalt
> installation.
> 
> My problem, is that I absolutely NEED to run a PHP
> script using crontab. The script needs to send
> numerous queries to a database every hour. Is there
> any way I can accomplish this, directly or indirectly?
> 
> __
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Philip Hallstrom

-dump is an option to lynx to tell it to output the page and quits.

the rest of it says send all output (and errors) to /dev/null

On Wed, 25 Sep 2002, Daren Cotter wrote:

> What does the "-dump" and ">/dev/null 2>&1" stuff do?
>
> --- Philip Hallstrom <[EMAIL PROTECTED]> wrote:
> > You could setup cron to run lynx or some other
> > command line web browser...
> > something like:
> >
> > 0 * * * * /path/to/lynx -dump
> > http://server/path/to/script.php >/dev/null 2>&1
> >
> > Then as the first thing in that script you will
> > probably want to set the
> > time limit to 0 so it doesn't time out...
> >
> >
> >
> > On Wed, 25 Sep 2002, Daren Cotter wrote:
> >
> > > I have PHP installed on a Cobalt RaQ550. I know
> > there
> > > are two ways of installing PHP, one as a binary,
> > and
> > > one as an Apache module. I am pretty sure PHP gets
> > > installed as an Apache module for the Cobalt
> > > installation.
> > >
> > > My problem, is that I absolutely NEED to run a PHP
> > > script using crontab. The script needs to send
> > > numerous queries to a database every hour. Is
> > there
> > > any way I can accomplish this, directly or
> > indirectly?
> > >
> > > __
> > > Do you Yahoo!?
> > > New DSL Internet Access from SBC & Yahoo!
> > > http://sbc.yahoo.com
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit:
> > http://www.php.net/unsub.php
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> __
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>


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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Chris Hewitt

>
>
>On Wed, 25 Sep 2002, Daren Cotter wrote:
>
>>
>>My problem, is that I absolutely NEED to run a PHP
>>script using crontab. The script needs to send
>>numerous queries to a database every hour. Is there
>>any way I can accomplish this, directly or indirectly?
>>
Are you sure its not already there? Commonly in /usr/bin. Try a "which 
php" and see if it finds anything?

HTH
Chris


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




Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter

What does the "-dump" and ">/dev/null 2>&1" stuff do?

--- Philip Hallstrom <[EMAIL PROTECTED]> wrote:
> You could setup cron to run lynx or some other
> command line web browser...
> something like:
> 
> 0 * * * * /path/to/lynx -dump
> http://server/path/to/script.php >/dev/null 2>&1
> 
> Then as the first thing in that script you will
> probably want to set the
> time limit to 0 so it doesn't time out...
> 
> 
> 
> On Wed, 25 Sep 2002, Daren Cotter wrote:
> 
> > I have PHP installed on a Cobalt RaQ550. I know
> there
> > are two ways of installing PHP, one as a binary,
> and
> > one as an Apache module. I am pretty sure PHP gets
> > installed as an Apache module for the Cobalt
> > installation.
> >
> > My problem, is that I absolutely NEED to run a PHP
> > script using crontab. The script needs to send
> > numerous queries to a database every hour. Is
> there
> > any way I can accomplish this, directly or
> indirectly?
> >
> > __
> > Do you Yahoo!?
> > New DSL Internet Access from SBC & Yahoo!
> > http://sbc.yahoo.com
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit:
> http://www.php.net/unsub.php
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




Re: [PHP] Fw: Speed of the PHP Parser MySQL vs. textfiles

2002-09-25 Thread Holger Heinze, Portalmeister GmbH

Hi,

apologies for the confirmation, didn't even know it was set on this Computer
(not my own) until I got it myself.

I hate it =)

Sorry again,
Holger



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




[PHP] Fw: Speed of the PHP Parser MySQL vs. textfiles

2002-09-25 Thread Holger Heinze, Portalmeister GmbH


Hi people, maybe someone here has experience with this question:

We have to create a CMS System for beginners. For storing data, we have 3
possibilities:


1. Store Data in MySQL, query the database, inlcude the dynamic content via
php.

echo $mysqldata[headline]."\n";

2. Store Data in Textfiles holding the Data like this:



This would mean, we just include the preferences file at the top of the php
script generating the output page. (A lot less coding i think)

3. Generate HTML pages (soc. cache) everytime the user makes changes to his
pages.


I just had an argument with a co-worker and I would like to have your guys'
opinion on this:

Combination 1: Store frequently changed info in 1. MySQL Database and rarely
changed data in 2. Textfiles that are included.

Combination 2: Store frequently changed info in 1. MySQL Database and rarely
changed data in 3. Plain HTML Cache files.

I won't say which one is mine! ;-)

So, which one would you guys prefer, and what do you think is faster ...
Included Textfiles or HTML or MySQL ?

We also of course have to take the time and complexity of the coding into
consideration.

Thanks a lot for any answer!

(Also thankful for urls to php parser benchmarks etc...)

Holger Heinze


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




RE: [PHP] Time is off?

2002-09-25 Thread Jon Haworth

Hi Brandon,

> I did a basic script  and the 
> time is off in that script [...] I have checked the 
> server time and the server hardware clock.  

Well, date("h:I") means "display the hours (in 12-hour format), followed by
a colon, followed by a 1 or a 0 depending on whether daylight saving is in
effect", so you're unlikely to get the correct time from it ;-)

Give either date("h:ia") or date("H:i") a try - these are 12-hour and
24-hour times respectively.

Cheers
Jon

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




[PHP] Output Buffering - Am I using it correctly?

2002-09-25 Thread Jay Blanchard

Howdy group!

I am outputting a rather large data set to an Excel spreadsheet from a MySQL
database on a healthy FreeBSD server. The Apache server is on the same
server as the database. The code looks like this



Now, even though I have set ob_start() the headers get sent (as it says in
the docs; "While output buffering is active no output is sent from the
script (other than headers), instead the output is stored in an internal
buffer. ")

The Task Manager shows that the processes on my local machine for EXCEL.EXE
go to the maximum available CPU cycles and stays there until the spreadsheet
is either delivered or the system times out. I thought that using output
buffering would lower use of client system resources. Is this not true?

Thanks!

Jay



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




[PHP] Re: Cronjob

2002-09-25 Thread Philip Hallstrom

You could setup cron to run lynx or some other command line web browser...
something like:

0 * * * * /path/to/lynx -dump http://server/path/to/script.php >/dev/null 2>&1

Then as the first thing in that script you will probably want to set the
time limit to 0 so it doesn't time out...



On Wed, 25 Sep 2002, Daren Cotter wrote:

> I have PHP installed on a Cobalt RaQ550. I know there
> are two ways of installing PHP, one as a binary, and
> one as an Apache module. I am pretty sure PHP gets
> installed as an Apache module for the Cobalt
> installation.
>
> My problem, is that I absolutely NEED to run a PHP
> script using crontab. The script needs to send
> numerous queries to a database every hour. Is there
> any way I can accomplish this, directly or indirectly?
>
> __
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




FW: RE: [PHP] where's waldo

2002-09-25 Thread Kevin Porter

I received this shortly after posting to this list.

Anyone else get one of these? I'm confused...

thanks,

- Kev

> -Original Message-
> From: [EMAIL PROTECTED]
> [SMTP:[EMAIL PROTECTED]]
> Sent: 25 September 2002 17:10
> To:   [EMAIL PROTECTED]
> Subject:  Re: RE: [PHP] where's waldo
> 
> We have received a request to add your email address to the Interstate
> Auction email notification list.  If you wish to have your email address
> removed, please reply with the word REMOVE followed by your email address
> as the subject.  Thank you.
> 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**


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




[PHP] Cronjob

2002-09-25 Thread Daren Cotter

I have PHP installed on a Cobalt RaQ550. I know there
are two ways of installing PHP, one as a binary, and
one as an Apache module. I am pretty sure PHP gets
installed as an Apache module for the Cobalt
installation.

My problem, is that I absolutely NEED to run a PHP
script using crontab. The script needs to send
numerous queries to a database every hour. Is there
any way I can accomplish this, directly or indirectly?

__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




[PHP] Time is off?

2002-09-25 Thread Brandon Orther

Hello,
 
I am trying to figure out why Squirrel Mail is giving the wrong time.  I
did a basic script   and the time is off in that
script too.  I have checked the server time and the server hardware
clock.  They are both on.  Does anyone know a reason that the php time
would be off?  I am thinking maybe a setting in the php.ini or
something?
 
Thanks for any help,
 
Brandon Orther 
WebIntellects Design/Development Manager
[EMAIL PROTECTED] 800-994-6364
www.webintellects.com  

 



Re: [PHP] authenticating and redirecting with special access

2002-09-25 Thread Bryan Koschmann - GKT

Chris,

That is a very good point. As stupid as it sounds, I forgot about the
include() statement (still new I guess, not used to all this extra cool
stuff!).

When I was suggesting the .htaccess, I was thinking more of the "require
valid-user" and thinking maybe the php could tell it whether it is a valid
user, but now as I look at my logs, the php login doesn't actually log the
same type of username, so I guess that wouldn't work.

I'm curious though, the file I need to include is just an html file, and
also has links to others in that same directory (along with images). ow
will this work, since the links would be trying to point to something in a
web location?

Thanks for all your help!

Bryan


On Tue, 24 Sep 2002, Chris Shiflett wrote:

|Bryan,
|
|A .htaccess file is a Web server configuration file. It cannot know what
|sort of PHP code you have in place to authenticate a user. :-)
|
|As has been suggested by someone else, you should place your restricted
|files outside of document root. In PHP, it is a simple matter of an
|include() to display the file:
|
|include("/path/to/file.inc");
|
|Also, this method keeps you from doing this redirecting you are talking
|about. Unnecessary redirections like that double your traffic, which is
|not a good idea.


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




Re: [PHP] where's waldo

2002-09-25 Thread @ Edwin
Good idea!

And your idea about this is also great:

  

It should work...

I forgot that there was someting like that in HTML... :)

- E

On Thursday, September 26, 2002 12:55 AM
Subject: RE: [PHP] where's waldo
Kevin Porter wrote:

> One more thing... if you store your 'waldo co-ordinates' data in a text
> file, make sure it is in a directory outside of the webtree...
> 


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


Re: [PHP] replacing literal " in string

2002-09-25 Thread Kevin Stone

Robert,

That str_replace() you wrote should work.  But you might also try these
variations..

$key = str_replace('"', '', $key);
$key = str_replace(chr(34), '', $key);

Good luck,
Kevin


- Original Message -
From: "ROBERT MCPEAK" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 25, 2002 7:52 AM
Subject: [PHP] replacing literal " in string


> Could somebody help me with the correct syntax for an ereg_replace to
> replace literal occurences of the quote character in a string.  I can't
> seem to get it right.
>
> In other words, I have a form input variable -- that literally may look
> like this:  "some_value", and I want it to literally look like this:
> some_value.
>
> I tried:
> $key=str_replace ("\"", "", "$key");
> and other variations but can't get it to work.
>
> What am I missing?
>
> 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




RE: [PHP] where's waldo

2002-09-25 Thread Kevin Porter

One more thing... if you store your 'waldo co-ordinates' data in a text
file, make sure it is in a directory outside of the webtree...

- Kev

> -Original Message-
> From: Kevin Porter [SMTP:[EMAIL PROTECTED]]
> Sent: 25 September 2002 16:52
> To:   '@ Edwin'; Marek Kilimajer
> Cc:   [EMAIL PROTECTED]
> Subject:  RE: [PHP] where's waldo
> 
> Or, a simple way...
> 
> When you show your image, make sure it is a form submit button of
> 'type=image'. On the PHP side you know the X and Y co-ordinates of waldo.
> When the user clicks on the image, the place they clicked on the image is
> passed along the URL in 'x' and 'y' variables. On the PHP side, check if
> their co-ordinates are close enough, if so give them the next (harder)
> image. If they're not near enough, make sure they get served a 'sorry -
> try
> again' message followed by the same image.
> 
> That should work, yeah? I used to do spot the ball competitions this way
> at
> least...
> 
> HTH,
> 
> - Kev
> 
> > -Original Message-
> > From:   @ Edwin [SMTP:[EMAIL PROTECTED]]
> > Sent:   25 September 2002 16:40
> > To: Marek Kilimajer
> > Cc: [EMAIL PROTECTED]
> > Subject:Re: [PHP] where's waldo
> > 
> > True. Perhaps.
> > 
> > But, I think, you can actually do something like that WITH php. Say
> > PHP+Flash or PHP+Javascript...
> > 
> > Of course, if you're able to do something like this just by using
> > PHP+Javascript (and HTML only), most probably, you can just take a peek
> at
> > the code and find out where "waldo" is... ;)
> > 
> > - E
> > 
> > On Thursday, September 26, 2002 12:12 AM
> > Marek Kilimajer wrote:
> > 
> > > This is for java, javascript, or flash, not much to do for php.
> > >
> > > Kenneth Love wrote:
> > >
> > > >hi all.
> > > >
> > > >i'm interested in creating a php game that generates a page of random
> > (ish)
> > > >images, one of which is waldo (or the like). when the player clicks
> on
> > > >waldo, they're taken to the next, slightly harder level.
> > > >
> > > >anyone think that sounds fun?
> > > >any pointers, tips, advice, criticisms?
> > > >
> > > >--
> > > >->-> http://kennethlove.onewingedangel.com <-<-
> > > >
> > > >
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> **
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
> www.mimesweeper.com
> **
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**


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




Re: [PHP] where's waldo

2002-09-25 Thread @ Edwin

True. Perhaps.

But, I think, you can actually do something like that WITH php. Say
PHP+Flash or PHP+Javascript...

Of course, if you're able to do something like this just by using
PHP+Javascript (and HTML only), most probably, you can just take a peek at
the code and find out where "waldo" is... ;)

- E

On Thursday, September 26, 2002 12:12 AM
Marek Kilimajer wrote:

> This is for java, javascript, or flash, not much to do for php.
>
> Kenneth Love wrote:
>
> >hi all.
> >
> >i'm interested in creating a php game that generates a page of random
(ish)
> >images, one of which is waldo (or the like). when the player clicks on
> >waldo, they're taken to the next, slightly harder level.
> >
> >anyone think that sounds fun?
> >any pointers, tips, advice, criticisms?
> >
> >--
> >->-> http://kennethlove.onewingedangel.com <-<-
> >
> >

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




RE: [PHP] Stress Test Script?

2002-09-25 Thread Jon Haworth

Hi Jay,

> Does anyone have a good php script that will 
> test (i.e. benchmark) my MySQL machine and my 
> Web server?

Give ab a go - it comes with Apache, you should find it in your bin/
directory.

"man ab" for all the gory details.

Cheers
Jon

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




RE: [PHP] Set a default global - $_GET[]

2002-09-25 Thread John Holmes

> How do i set a default value for a url parameter ($_GET[".."]) in PHP
4.1?
> I currently have a class that sets a default global value but this
does
> not
> work in this version - the script displays an error if no url value is
> passed in the url.

if(!isset($_GET['...']))
{ $_GET['...'] == "default value"; }

---John Holmes...


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




Re: [PHP] where's waldo

2002-09-25 Thread Marek Kilimajer

This is for java, javascript, or flash, not much to do for php.

Kenneth Love wrote:

>hi all.
>
>i'm interested in creating a php game that generates a page of random (ish)
>images, one of which is waldo (or the like). when the player clicks on
>waldo, they're taken to the next, slightly harder level.
>
>anyone think that sounds fun?
>any pointers, tips, advice, criticisms?
>
>--
>->-> http://kennethlove.onewingedangel.com <-<-
>
>
>
>  
>


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




[PHP] Stress Test Script?

2002-09-25 Thread Jay

Does anyone have a good php script that will test (i.e. benchmark) my MySQL
machine and my Web server?

Thanks!


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




[PHP] Set a default global - $_GET[]

2002-09-25 Thread Patrick Lebon

How do i set a default value for a url parameter ($_GET[".."]) in PHP 4.1?
I currently have a class that sets a default global value but this does not
work in this version - the script displays an error if no url value is
passed in the url.

Thanks



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




[PHP] pdflib output reolution higher than 72 dpi possible?

2002-09-25 Thread andy

Hi there,

I would like to output a pdf with pdflib with 300 dpi

How could I define the output resolution? Default seems to be 72 dpi

Thanx for any hint,

Andy







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




[PHP] where's waldo

2002-09-25 Thread Kenneth Love

hi all.

i'm interested in creating a php game that generates a page of random (ish)
images, one of which is waldo (or the like). when the player clicks on
waldo, they're taken to the next, slightly harder level.

anyone think that sounds fun?
any pointers, tips, advice, criticisms?

--
->-> http://kennethlove.onewingedangel.com <-<-



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




Re: [PHP] pretty simple problem in mailing a dynamic page

2002-09-25 Thread Justin French

Multipart Mime messages... you can't just put HTML source in an email...

See Manuel's class on phpclasses.org for

Regards,

Justin French


on 26/09/02 3:04 AM, usha ([EMAIL PROTECTED]) wrote:

> I just want to email a dynamic page ( So I designed a page consisting  of
> datas pulled from db and are formated with html tags: here in below code $d is
> such variable to be mailed)
> 
> But the problem is that, instead the code contained in $d is sent.
> 
> The code is as such:
> $ebody="$d";
> mail("[EMAIL PROTECTED]", "The subject",$ebody,"From:
> [EMAIL PROTECTED]\r\n");
> 
> Cna anyone give me solution for this pretty simple problem.
> Regards
> Usha
> 


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




[PHP] Question

2002-09-25 Thread Roman Duriancik

I have variables $sk1,$fr2,$fr3,$sk4,
how i write values in this variables in statement for...

roman



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




[PHP] Authentication on NT??

2002-09-25 Thread Per Lundkvist

Hi
I have installed PHP on a Windows NT Server 4.0 and it works (almost) fine!
The thing is that I get the "Enter network password" - prompt when I first
go to a PHP-file. Not if I go to an ASP file.

So if I just hit enter in the prompt, I get in to the PHP-page and can
continue surfing.
I guess it has something with Anonymous user to do, but I dont know what?!

Per L.



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




  1   2   >