[PHP] Automatic Form Generation with PHP

2002-09-25 Thread debbie_dyer

Hi

We are shortly to release the next version of Form Generator Pro (automatic generation 
of HTML form/PHP processing code) and are looking for some comments on the way in 
which we intend to make the software available.

Due to the fact that we cannot distribute this PHP application without comprising 
copyright (the Zend Encoder is not an affordable option for us - we are a small 
start-up business), the current version of Form Generator Pro is only available for 
use online at the C U Online site which is fine because 1. it only generates mail 
forms and 2. it's free. However this won't work for version 2 because version 2 
automatically generates forms for MySQL databases by querying the database for table 
information (field lengths, types etc). Opening up connections from our server to 
other servers to get database info is not an option - for security reasons (and also 
many MySQL servers are set up to only accept local connections anyway for this reason).

To resolve this problem, the software has been split into 2 parts. The part that 
retrieves the database information sits on the customers server (secured). Field 
definitions are then extracted and sent to the generator which remains on our site. I 
will stress here that no actual database data is sent between the 2 servers, nor any 
MySQL server usernames or passwords - just the field lengths, types etc of the 
selected table. Access to the generator will then be sold as opposed to selling the 
actual software (although mail form generation will remain free). This is not an ideal 
solution but it seems to be the only way to make the software available and at the 
same time protect copyright.

I would be grateful for any thoughts from other businesses/developers on this solution.

Regards
Debbie Dyer
Software Engineer for C U Online



[PHP] RE: PHP Form and Arrays help

2002-09-25 Thread Tim Ward

use a hidden input in front of each checkbox with the same name and
the value '0' (as opposed to '1' for the checkbox).

Tim
www.chessish.com

> -Original Message-
> From: Tom Ray [mailto:[EMAIL PROTECTED]]
> Sent: 24 September 2002 17:24
> To: [EMAIL PROTECTED]
> Subject: PHP Form and Arrays help
> 
> 
> I'm having a small problem with a form I'm designing and I 
> hope someone can
> point me in the right direction here. The form's function is 
> rather simple
> actaully. It's supposed to take the information, run through 
> it to make sure
> all the required fields have data in them, if there is a 
> blank required field
> it is supposed to redraw the form showing the field missed 
> but also store the
> data that was already submitted so you don't have to fill the 
> form out all over
> again. Now I have it so it stores the values of text boxes, 
> drop down menus and
> radio buttons but I'm having a real tough time with the check 
> box values.
> Example of what I'm doing: (Gender Selection with Radio Buttons). 
> 
> I declare an array in my PHP by doing 
> $genderarray=array();
> 
> Then I store the value of the form for the redraw like so:
> $mygender=$HTTP_POST_VARS[gender];
> $genderarray[$mygender]="checked";
> 
> In the actaul form I decalre a global:
> global genderarray();
> 
> And under the gender selection I have:
>  $genderarray["Male"] ?>" >
> (works the same for the Female)
> 
> 
> Now my question is how can I do this with check boxes. I 
> thought I could
> through them all into a single array, then pull out the ones 
> who have values to
> them, but that's not working the way I thought.
> 
> Any thoughts or suggestions?
> 
> 

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




[PHP] Getting a mysql set info

2002-09-25 Thread Henry

Hi All,

I would like to get at the SET information for a particular field in a MySQL
database.

I know how to get the type, length, name and flags alla the manual pages
but;

If I have a field which is of type SET ('one','two','three','four') how can
I get at this information from within PHP in order to generate a collection
of checkboxes for setting the field in HTML.

Any Help Much Appreciated

Henry



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




Re: [PHP] Re: session_start function breaks flush function in 4.2.1

2002-09-25 Thread Chris

Michael,

Thanks for the detailed reply. After some tests of my own I'd realized it
was the trans-sid parameter that was giving me problems. In 4.2.1, php is
compiled with this parameter set by default - it would appear.

I'll give your idea a try - thou' I'll have to reinstate my script, since
I'd written a work around - basically I echo the message, and recall the
script with a meta refresh to do the actual processing.

Thanks again,
Chris

"Michael Sims" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>"Chris Andrew" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> I use a script which initially sends a friendly message to a browser, and
>> then goes about some lengthy processing. The browser is IE and I am aware
>of
>> the 256 byte issue.
>>
>> The script worked nicely in php.4.1.1 but since installing 4.2.1, the
>flush
>> function doesn't do its job. However, it works if I ommit session_start()
>?

I can't speak for the differences between 4.1.1 and 4.2.1, but maybe
the following information will help you:

On my site I have a custom error handler than displays a "friendly"
error message screen and emails me an error report.  I use output
buffering because if an error occurs I don't want this friendly error
message screen to be rendered in the middle of whatever else was going
on when the error occured...I get the contents of the buffer and then
and then call ob_end_clean() to empty it before I display the friendly
error message.

I noticed that this was not working properly on one section of my site
that used sessions.  I noticed that if I called session_start() and
then an error occured, I got the error message in the middle of the
the page, just as if I hadn't cleared the buffer.

I then discovered why...  I am using trans sid support to perpetuate
the session id, and apparently this is implemented internally using an
output buffer.  Trans sid buffers the page output, then rewrites the
hrefs and insert the hidden form values before flushing the buffer to
the screen.  Apparently you can start multiple buffers, and they are
stacked.  If you call a buffer function such as ob_end_clean(), it
*automatically* operates on the last buffer in the stack...i.e. the
buffer that was most recently created.  In my case this buffer what
the trans sid one, and NOT the one that I started.

To make a long story short, I had to end up calling ob_end_clean()
TWICE...once to flush the trans sid buffer and once more to flush
mine.  Maybe something similar is at work with your problem.  Try
calling the flush function twice back to back and see if that makes
any difference...

If anyone knows of a way to determine how many output buffers have
been started or are currently active please let me know...



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




Re: [PHP] Getting a mysql set info

2002-09-25 Thread debbie_dyer

You need to use SHOW COLUMNS FROM table LIKE 'yoursetfieldname'

You can then retrieve the values from the ["Type"] column which will look
like - set('val1','val2'...etc) - you will need to parse this string

Debbie

- Original Message -
From: "Henry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 25, 2002 8:57 AM
Subject: [PHP] Getting a mysql set info


> Hi All,
>
> I would like to get at the SET information for a particular field in a
MySQL
> database.
>
> I know how to get the type, length, name and flags alla the manual pages
> but;
>
> If I have a field which is of type SET ('one','two','three','four') how
can
> I get at this information from within PHP in order to generate a
collection
> of checkboxes for setting the field in HTML.
>
> Any Help Much Appreciated
>
> Henry
>
>
>
> --
> 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] Newsletter Script

2002-09-25 Thread Sascha Braun

Hi,

I wanted to write an Newsletter script. So I created two tables in my Database. One is 
storing the Newsletters and one is Storing the bunch of folks who want to have them.

Everything works fine, I can write the Newsletter very easy in my selfwritten admin 
tool, but when I send the Newsletter
only the first person in the list it getting this awfull Newsletter.

Here is the script which sends out the Newsletter:

if ($_REQUEST['action'] == 'send') {

 $Query = "SELECT * FROM newsletters_db WHERE id = '".$_REQUEST['id']."'";
 $Result = mysql_query($Query, $connect);
 $arrResult = mysql_fetch_array($Result, MYSQL_ASSOC);
  $MailQuery = "SELECT * FROM newsletter_db";
  $MailResult = mysql_query($MailQuery, $connect);
  $subject = $arrResult['head'];
  $message = $arrResult['text'];
  while ($arrMailResult = mysql_fetch_array($MailResult, MYSQL_ASSOC)) {
  
   mail($arrMailResult['address'], $subject, $message,
 "From: webmaster@$SERVER_NAME\r\n"
."Reply-To: info@$SERVER_NAME\r\n"
."X-Mailer: PHP/" . phpversion()) or die(mysql_error());
  }
 echo 'Newsletter erfolgreich verschickt.';
}

Would be nice if i could get a hint =O)

Sascha



Re: [PHP] Getting a mysql set info

2002-09-25 Thread Henry

Thanks Debbie,

Your a star

Henry

"Debbie_dyer" <[EMAIL PROTECTED]> wrote in message
00dc01c2646f$06223dd0$19153c3e@homepc">news:00dc01c2646f$06223dd0$19153c3e@homepc...
> You need to use SHOW COLUMNS FROM table LIKE 'yoursetfieldname'
>
> You can then retrieve the values from the ["Type"] column which will look
> like - set('val1','val2'...etc) - you will need to parse this string
>
> Debbie
>
> - Original Message -
> From: "Henry" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 25, 2002 8:57 AM
> Subject: [PHP] Getting a mysql set info
>
>
> > Hi All,
> >
> > I would like to get at the SET information for a particular field in a
> MySQL
> > database.
> >
> > I know how to get the type, length, name and flags alla the manual pages
> > but;
> >
> > If I have a field which is of type SET ('one','two','three','four') how
> can
> > I get at this information from within PHP in order to generate a
> collection
> > of checkboxes for setting the field in HTML.
> >
> > Any Help Much Appreciated
> >
> > Henry
> >
> >
> >
> > --
> > 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] Ftp_size returns wrong file size

2002-09-25 Thread Rudolf Visagie

Hi everybody,

Does anybody know why ftp_size returns the wrong file size? I get 1069602
bytes instead of  1065635 (which it should be) and 10458669 instead of
10419043. A difference of 3967 and 39626 does not really give me any clues.
I know the manual says that not all servers support this feature, but then I
suppose I should get -1 and not a numeric size.

Regards

Rudolf Visagie
Principal Software Developer
Digital Healthcare Solutions

Tel: 011 6901019
Cell: 082 895 1598
 


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




[PHP] Re: Automatic Form Generation with PHP

2002-09-25 Thread Henry

Hi Debbie,

What are you going to do about customers who don't have PHP? To run the
field definition extractor part of the system.

Henry




"Debbie_dyer" <[EMAIL PROTECTED]> wrote in message
00a001c26468$80a50530$19153c3e@homepc">news:00a001c26468$80a50530$19153c3e@homepc...
Hi

We are shortly to release the next version of Form Generator Pro (automatic
generation of HTML form/PHP processing code) and are looking for some
comments on the way in which we intend to make the software available.

Due to the fact that we cannot distribute this PHP application without
comprising copyright (the Zend Encoder is not an affordable option for us -
we are a small start-up business), the current version of Form Generator Pro
is only available for use online at the C U Online site which is fine
because 1. it only generates mail forms and 2. it's free. However this won't
work for version 2 because version 2 automatically generates forms for MySQL
databases by querying the database for table information (field lengths,
types etc). Opening up connections from our server to other servers to get
database info is not an option - for security reasons (and also many MySQL
servers are set up to only accept local connections anyway for this reason).

To resolve this problem, the software has been split into 2 parts. The part
that retrieves the database information sits on the customers server
(secured). Field definitions are then extracted and sent to the generator
which remains on our site. I will stress here that no actual database data
is sent between the 2 servers, nor any MySQL server usernames or passwords -
just the field lengths, types etc of the selected table. Access to the
generator will then be sold as opposed to selling the actual software
(although mail form generation will remain free). This is not an ideal
solution but it seems to be the only way to make the software available and
at the same time protect copyright.

I would be grateful for any thoughts from other businesses/developers on
this solution.

Regards
Debbie Dyer
Software Engineer for C U Online




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




Re: [PHP] Visual Studio .NET as PHP IDE

2002-09-25 Thread Krzysztof Dziekiewicz

> Does anyone use VStudio .NET as your IDE in developing
> PHP Scripts?  If so, have you found a way to make it so
> that it understands PHP?  In particular color coding and the
> understanding of where functions start and end (for the
> solution explorer, etc).

I was not using VStudio .NET but if I know Microsoft they try to cut using any
other no-microsoft technologies.


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




Re: [PHP] Why my php pages are cached in browsers?

2002-09-25 Thread Krzysztof Dziekiewicz

> In browsers, my php pages are cached. All the code that is returned by php
> are stored. In version 4.1 this not ocurred, anybody can help me?

First: Check if you send headers:
  header('Pragma: no-cache');
  header('Expires: Thu, 01 Jan 1970 01:00:00 GMT');
  header('Cache-Control: no-cache, must-revalidate, private');

Second: If your appache sends "HTTP 1.0" try to change to "HTTP 1.1".
"HTTP 1.0" "do not know" Cache-Control.


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




Re: [PHP] Why my php pages are cached in browsers?

2002-09-25 Thread Sascha Braun

In the german apache Mailinglist somebody wrote some like this:

a) aktivate the modul mod_expires.so
b) Fill in the lines
# enable expirations
ExpiresActive On
# expire php pages after a minute in the client's cache
ExpiresByType text/php A6

into httpd.conf

But I don't really know if it works (:0

Thought about I maybe have to write

application/x-httpd-php

instead of text/php

Please tell me if it works

Sascha




> > In browsers, my php pages are cached. All the code that is returned by
php
> > are stored. In version 4.1 this not ocurred, anybody can help me?
>
> First: Check if you send headers:
>   header('Pragma: no-cache');
>   header('Expires: Thu, 01 Jan 1970 01:00:00 GMT');
>   header('Cache-Control: no-cache, must-revalidate, private');
>
> Second: If your appache sends "HTTP 1.0" try to change to "HTTP 1.1".
> "HTTP 1.0" "do not know" Cache-Control.
>
>
> --
> 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: Automatic Form Generation with PHP

2002-09-25 Thread debbie_dyer

Hi Henry

Well the software generates the code to process the forms as well (eg for an
insert form the code to check required fields are not empty, perform any
data validation and insert the record into the db) as well as the forms
themselves and this code is in PHP. You can choose to generate a sticky form
where you would get 1 PHP page (containing a mixture of PHP and HTML) or
non-sticky where you would get separate HTML & PHP pages for the
forms/processing. Because all this generated processing code is in PHP
customers who don't have PHP either wouldn't be interested in the software
or if they were interested in the software they would need to install it -
both to use the software and also to be able to use the processing code that
it generated.

Debbie

- Original Message -
From: "Henry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 25, 2002 10:05 AM
Subject: [PHP] Re: Automatic Form Generation with PHP


> Hi Debbie,
>
> What are you going to do about customers who don't have PHP? To run the
> field definition extractor part of the system.
>
> Henry
>
>
>
>
> "Debbie_dyer" <[EMAIL PROTECTED]> wrote in message
> 00a001c26468$80a50530$19153c3e@homepc">news:00a001c26468$80a50530$19153c3e@homepc...
> Hi
>
> We are shortly to release the next version of Form Generator Pro
(automatic
> generation of HTML form/PHP processing code) and are looking for some
> comments on the way in which we intend to make the software available.
>
> Due to the fact that we cannot distribute this PHP application without
> comprising copyright (the Zend Encoder is not an affordable option for
us -
> we are a small start-up business), the current version of Form Generator
Pro
> is only available for use online at the C U Online site which is fine
> because 1. it only generates mail forms and 2. it's free. However this
won't
> work for version 2 because version 2 automatically generates forms for
MySQL
> databases by querying the database for table information (field lengths,
> types etc). Opening up connections from our server to other servers to get
> database info is not an option - for security reasons (and also many MySQL
> servers are set up to only accept local connections anyway for this
reason).
>
> To resolve this problem, the software has been split into 2 parts. The
part
> that retrieves the database information sits on the customers server
> (secured). Field definitions are then extracted and sent to the generator
> which remains on our site. I will stress here that no actual database data
> is sent between the 2 servers, nor any MySQL server usernames or
passwords -
> just the field lengths, types etc of the selected table. Access to the
> generator will then be sold as opposed to selling the actual software
> (although mail form generation will remain free). This is not an ideal
> solution but it seems to be the only way to make the software available
and
> at the same time protect copyright.
>
> I would be grateful for any thoughts from other businesses/developers on
> this solution.
>
> Regards
> Debbie Dyer
> Software Engineer for C U Online
>
>
>
>
> --
> 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] exec("echo ... issuse

2002-09-25 Thread Mario Ohnewald

Hello!
I want to write a line into a file (called $script) wich goes like that:

 echo "`date` 192.168.10.123 is down, lets call the admin. I was
sleeping for 10 Minutes | smbclient -M Computer

This is what i have tried:
exec("echo "echo "`date` ===> $ip is down, lets call the admin. I
was sleeping for $var_timer_rechner1 Minutes" | smbclient -M $popup_1" >>
$script");

The problem is that after
exec("echo "
its command ends due to that ".

I tried \" to let php ignore this " but then it doesn´t write my " anymore:
 exec("echo \"echo \"`date` ===> $ip is down, lets call the admin. I
was sleeping for $var_timer_rechner1\" | smbclient -M $popup_1\" >>
$script");

this is the result:
echo Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is down, lets call the
admin. I was sleeping for  | smbclient -M Server

but i want:
echo "Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is down, lets call the
admin. I was sleeping for" | smbclient -M Server

^^
^^
missing
missing


Can anyone tell me where the my mistake is?


Cheers, Mario


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




Re: [PHP] Re: Automatic Form Generation with PHP

2002-09-25 Thread Henry

Hi Debbie,

That's fair enough. How are you ensure that only valid servers request
information from the field enquiry part?

Otherwise people might be able to use this part to gain access to the
database structure if not the actual data.

Henry.

"Debbie_dyer" <[EMAIL PROTECTED]> wrote in message
00f501c26476$49fcd4a0$19153c3e@homepc">news:00f501c26476$49fcd4a0$19153c3e@homepc...
> Hi Henry
>
> Well the software generates the code to process the forms as well (eg for
an
> insert form the code to check required fields are not empty, perform any
> data validation and insert the record into the db) as well as the forms
> themselves and this code is in PHP. You can choose to generate a sticky
form
> where you would get 1 PHP page (containing a mixture of PHP and HTML) or
> non-sticky where you would get separate HTML & PHP pages for the
> forms/processing. Because all this generated processing code is in PHP
> customers who don't have PHP either wouldn't be interested in the software
> or if they were interested in the software they would need to install it -
> both to use the software and also to be able to use the processing code
that
> it generated.
>
> Debbie
>
> - Original Message -
> From: "Henry" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 25, 2002 10:05 AM
> Subject: [PHP] Re: Automatic Form Generation with PHP
>
>
> > Hi Debbie,
> >
> > What are you going to do about customers who don't have PHP? To run the
> > field definition extractor part of the system.
> >
> > Henry
> >
> >
> >
> >
> > "Debbie_dyer" <[EMAIL PROTECTED]> wrote in message
> > 00a001c26468$80a50530$19153c3e@homepc">news:00a001c26468$80a50530$19153c3e@homepc...
> > Hi
> >
> > We are shortly to release the next version of Form Generator Pro
> (automatic
> > generation of HTML form/PHP processing code) and are looking for some
> > comments on the way in which we intend to make the software available.
> >
> > Due to the fact that we cannot distribute this PHP application without
> > comprising copyright (the Zend Encoder is not an affordable option for
> us -
> > we are a small start-up business), the current version of Form Generator
> Pro
> > is only available for use online at the C U Online site which is fine
> > because 1. it only generates mail forms and 2. it's free. However this
> won't
> > work for version 2 because version 2 automatically generates forms for
> MySQL
> > databases by querying the database for table information (field lengths,
> > types etc). Opening up connections from our server to other servers to
get
> > database info is not an option - for security reasons (and also many
MySQL
> > servers are set up to only accept local connections anyway for this
> reason).
> >
> > To resolve this problem, the software has been split into 2 parts. The
> part
> > that retrieves the database information sits on the customers server
> > (secured). Field definitions are then extracted and sent to the
generator
> > which remains on our site. I will stress here that no actual database
data
> > is sent between the 2 servers, nor any MySQL server usernames or
> passwords -
> > just the field lengths, types etc of the selected table. Access to the
> > generator will then be sold as opposed to selling the actual software
> > (although mail form generation will remain free). This is not an ideal
> > solution but it seems to be the only way to make the software available
> and
> > at the same time protect copyright.
> >
> > I would be grateful for any thoughts from other businesses/developers on
> > this solution.
> >
> > Regards
> > Debbie Dyer
> > Software Engineer for C U Online
> >
> >
> >
> >
> > --
> > 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: Newsletter Script

2002-09-25 Thread Henry

Shouldn't you have some selection criteria after

$MailQuery = "SELECT * FROM newsletter_db";

such as WHERE `newsletterID`=$_REQUEST['id'];

??

Other than that if its not dying and you actuall do have more than one
recipient I cannot see it.

Henry


"Sascha Braun" <[EMAIL PROTECTED]> wrote in message
001901c26470$3c6fcd70$0a7652d9@squitta">news:001901c26470$3c6fcd70$0a7652d9@squitta...
Hi,

I wanted to write an Newsletter script. So I created two tables in my
Database. One is storing the Newsletters and one is Storing the bunch of
folks who want to have them.

Everything works fine, I can write the Newsletter very easy in my
selfwritten admin tool, but when I send the Newsletter
only the first person in the list it getting this awfull Newsletter.

Here is the script which sends out the Newsletter:

if ($_REQUEST['action'] == 'send') {

 $Query = "SELECT * FROM newsletters_db WHERE id = '".$_REQUEST['id']."'";
 $Result = mysql_query($Query, $connect);
 $arrResult = mysql_fetch_array($Result, MYSQL_ASSOC);
  $MailQuery = "SELECT * FROM newsletter_db";
  $MailResult = mysql_query($MailQuery, $connect);
  $subject = $arrResult['head'];
  $message = $arrResult['text'];
  while ($arrMailResult = mysql_fetch_array($MailResult, MYSQL_ASSOC)) {

   mail($arrMailResult['address'], $subject, $message,
 "From: webmaster@$SERVER_NAME\r\n"
."Reply-To: info@$SERVER_NAME\r\n"
."X-Mailer: PHP/" . phpversion()) or die(mysql_error());
  }
 echo 'Newsletter erfolgreich verschickt.';
}

Would be nice if i could get a hint =O)

Sascha




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




[PHP] Re: exec("echo ... issuse

2002-09-25 Thread Henry

use \" instead of " so that you don't actually end the string

Henry

"Mario Ohnewald" <[EMAIL PROTECTED]> wrote in message
001801c2647a$070aa100$350aa8c0@W2KDP">news:001801c2647a$070aa100$350aa8c0@W2KDP...
> Hello!
> I want to write a line into a file (called $script) wich goes like that:
>
>  echo "`date` 192.168.10.123 is down, lets call the admin. I was
> sleeping for 10 Minutes | smbclient -M Computer
>
> This is what i have tried:
> exec("echo "echo "`date` ===> $ip is down, lets call the admin. I
> was sleeping for $var_timer_rechner1 Minutes" | smbclient -M $popup_1" >>
> $script");
>
> The problem is that after
> exec("echo "
> its command ends due to that ".
>
> I tried \" to let php ignore this " but then it doesn´t write my "
anymore:
>  exec("echo \"echo \"`date` ===> $ip is down, lets call the admin.
I
> was sleeping for $var_timer_rechner1\" | smbclient -M $popup_1\" >>
> $script");
>
> this is the result:
> echo Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is down, lets call
the
> admin. I was sleeping for  | smbclient -M Server
>
> but i want:
> echo "Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is down, lets call
the
> admin. I was sleeping for" | smbclient -M Server
>
> ^^
> ^^
> missing
> missing
>
>
> Can anyone tell me where the my mistake is?
>
>
> Cheers, Mario
>



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




[PHP] Re: exec("echo ... issuse

2002-09-25 Thread Henry

Oops, I didn't read on Sorry

Henry

"Henry" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> use \" instead of " so that you don't actually end the string
>
> Henry
>
> "Mario Ohnewald" <[EMAIL PROTECTED]> wrote in message
> 001801c2647a$070aa100$350aa8c0@W2KDP">news:001801c2647a$070aa100$350aa8c0@W2KDP...
> > Hello!
> > I want to write a line into a file (called $script) wich goes like that:
> >
> >  echo "`date` 192.168.10.123 is down, lets call the admin. I was
> > sleeping for 10 Minutes | smbclient -M Computer
> >
> > This is what i have tried:
> > exec("echo "echo "`date` ===> $ip is down, lets call the admin.
I
> > was sleeping for $var_timer_rechner1 Minutes" | smbclient -M $popup_1"
>>
> > $script");
> >
> > The problem is that after
> > exec("echo "
> > its command ends due to that ".
> >
> > I tried \" to let php ignore this " but then it doesn´t write my "
> anymore:
> >  exec("echo \"echo \"`date` ===> $ip is down, lets call the
admin.
> I
> > was sleeping for $var_timer_rechner1\" | smbclient -M $popup_1\" >>
> > $script");
> >
> > this is the result:
> > echo Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is down, lets call
> the
> > admin. I was sleeping for  | smbclient -M Server
> >
> > but i want:
> > echo "Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is down, lets call
> the
> > admin. I was sleeping for" | smbclient -M Server
> >
> > ^^
> > ^^
> > missing
> > missing
> >
> >
> > Can anyone tell me where the my mistake is?
> >
> >
> > Cheers, Mario
> >
>
>



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




[PHP] Re: exec("echo ... issuse

2002-09-25 Thread Henry

Have you tried using single quotes arround the main string?

i.e. 'echo "echo blah blah"'

Henry

"Henry" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> use \" instead of " so that you don't actually end the string
>
> Henry
>
> "Mario Ohnewald" <[EMAIL PROTECTED]> wrote in message
> 001801c2647a$070aa100$350aa8c0@W2KDP">news:001801c2647a$070aa100$350aa8c0@W2KDP...
> > Hello!
> > I want to write a line into a file (called $script) wich goes like that:
> >
> >  echo "`date` 192.168.10.123 is down, lets call the admin. I was
> > sleeping for 10 Minutes | smbclient -M Computer
> >
> > This is what i have tried:
> > exec("echo "echo "`date` ===> $ip is down, lets call the admin.
I
> > was sleeping for $var_timer_rechner1 Minutes" | smbclient -M $popup_1"
>>
> > $script");
> >
> > The problem is that after
> > exec("echo "
> > its command ends due to that ".
> >
> > I tried \" to let php ignore this " but then it doesn´t write my "
> anymore:
> >  exec("echo \"echo \"`date` ===> $ip is down, lets call the
admin.
> I
> > was sleeping for $var_timer_rechner1\" | smbclient -M $popup_1\" >>
> > $script");
> >
> > this is the result:
> > echo Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is down, lets call
> the
> > admin. I was sleeping for  | smbclient -M Server
> >
> > but i want:
> > echo "Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is down, lets call
> the
> > admin. I was sleeping for" | smbclient -M Server
> >
> > ^^
> > ^^
> > missing
> > missing
> >
> >
> > Can anyone tell me where the my mistake is?
> >
> >
> > Cheers, Mario
> >
>
>



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




RE: [PHP] Re: exec("echo ... issuse

2002-09-25 Thread Mario Ohnewald

Hi Henry,


>  From: Henry [mailto:[EMAIL PROTECTED]]
>
>
> Have you tried using single quotes arround the main string?
>
> i.e. 'echo "echo blah blah"'

I have tried serveral of version, maybe you could give me your example from
the lines below.
I couldnt work it out ;(


>
> Henry
>
> "Henry" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > use \" instead of " so that you don't actually end the string
> >
> > Henry
> >
> > "Mario Ohnewald" <[EMAIL PROTECTED]> wrote in message
> > 001801c2647a$070aa100$350aa8c0@W2KDP">news:001801c2647a$070aa100$350aa8c0@W2KDP...
> > > Hello!
> > > I want to write a line into a file (called $script) wich
> goes like that:
> > >
> > >  echo "`date` 192.168.10.123 is down, lets call
> the admin. I was
> > > sleeping for 10 Minutes | smbclient -M Computer
> > >
> > > This is what i have tried:
> > > exec("echo "echo "`date` ===> $ip is down, lets
> call the admin.
> I
> > > was sleeping for $var_timer_rechner1 Minutes" | smbclient
> -M $popup_1"
> >>
> > > $script");
> > >
> > > The problem is that after
> > > exec("echo "
> > > its command ends due to that ".
> > >
> > > I tried \" to let php ignore this " but then it doesn´t write my "
> > anymore:
> > >  exec("echo \"echo \"`date` ===> $ip is down,
> lets call the
> admin.
> > I
> > > was sleeping for $var_timer_rechner1\" | smbclient -M
> $popup_1\" >>
> > > $script");
> > >
> > > this is the result:
> > > echo Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is
> down, lets call
> > the
> > > admin. I was sleeping for  | smbclient -M Server
> > >
> > > but i want:
> > > echo "Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is
> down, lets call
> > the
> > > admin. I was sleeping for" | smbclient -M Server
> > >
> > > ^^
> > > ^^
> > > missing
> > > missing
> > >
> > >
> > > Can anyone tell me where the my mistake is?
> > >
> > >
> > > Cheers, Mario
> > >
> >
> >
>

mario


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




[PHP] looping through array with list()/each()

2002-09-25 Thread Kevin Porter

OK so I've done this hundreds of times, but this time I cannot get it to
work.

Please cast an eye over the following code and output and tell me why $k and
$v are not being set:


Code:
-

$ser = array( 'first', 'second', 'third', 'fourth', 'fifth' );

reset($ser);
while ( list($key, $val) = each($ser) );
{
echo "\$key = $key, \$val = $val";
}

-


Output:
--

$key = , $val =

--

I tried giving the $ser array numeric keys and string keys, both made no
difference.


thanks,

- Kev


**
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] looping through array with list()/each()

2002-09-25 Thread Kevin Porter

I meant $key and $val of course :o)

- Kev

> -Original Message-
> From: Kevin Porter [SMTP:[EMAIL PROTECTED]]
> Sent: 25 September 2002 12:00
> To:   '[EMAIL PROTECTED]'
> Subject:  [PHP] looping through array with list()/each()
> 
> OK so I've done this hundreds of times, but this time I cannot get it to
> work.
> 
> Please cast an eye over the following code and output and tell me why $k
> and
> $v are not being set:
> 
> 
> Code:
> -
> 
> $ser = array( 'first', 'second', 'third', 'fourth', 'fifth' );
> 
> reset($ser);
> while ( list($key, $val) = each($ser) );
> {
> echo "\$key = $key, \$val = $val";
> }
> 
> -
> 
> 
> Output:
> --
> 
> $key = , $val =
> 
> --
> 
> I tried giving the $ser array numeric keys and string keys, both made no
> difference.
> 
> 
> thanks,
> 
> - Kev
> 
> 
> **
> 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] looping through array with list()/each()

2002-09-25 Thread Karl Phillipson

while ( list($key, $val) = each($ser) ); <--- ; should not be here

-Original Message-
From: Kevin Porter [mailto:[EMAIL PROTECTED]]
Sent: 25 September 2002 12:13
To: Kevin Porter; '[EMAIL PROTECTED]'
Subject: RE: [PHP] looping through array with list()/each()


I meant $key and $val of course :o)

- Kev

> -Original Message-
> From: Kevin Porter [SMTP:[EMAIL PROTECTED]]
> Sent: 25 September 2002 12:00
> To:   '[EMAIL PROTECTED]'
> Subject:  [PHP] looping through array with list()/each()
> 
> OK so I've done this hundreds of times, but this time I cannot get it to
> work.
> 
> Please cast an eye over the following code and output and tell me why $k
> and
> $v are not being set:
> 
> 
> Code:
> -
> 
> $ser = array( 'first', 'second', 'third', 'fourth', 'fifth' );
> 
> reset($ser);
> while ( list($key, $val) = each($ser) );
> {
> echo "\$key = $key, \$val = $val";
> }
> 
> -
> 
> 
> Output:
> --
> 
> $key = , $val =
> 
> --
> 
> I tried giving the $ser array numeric keys and string keys, both made no
> difference.
> 
> 
> thanks,
> 
> - Kev
> 
> 
> **
> 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


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




RE: [PHP] looping through array with list()/each()

2002-09-25 Thread Kevin Porter

Thank you, thank you, thank you.

And, er, "D'oh!" :o)

- Kev

> -Original Message-
> From: Karl Phillipson [SMTP:[EMAIL PROTECTED]]
> Sent: 25 September 2002 12:13
> To:   [EMAIL PROTECTED]
> Subject:  RE: [PHP] looping through array with list()/each()
> 
> while ( list($key, $val) = each($ser) ); <--- ; should not be here
> 
> -Original Message-
> From: Kevin Porter [mailto:[EMAIL PROTECTED]]
> Sent: 25 September 2002 12:13
> To: Kevin Porter; '[EMAIL PROTECTED]'
> Subject: RE: [PHP] looping through array with list()/each()
> 
> 
> I meant $key and $val of course :o)
> 
> - Kev
> 
> > -Original Message-
> > From:   Kevin Porter [SMTP:[EMAIL PROTECTED]]
> > Sent:   25 September 2002 12:00
> > To: '[EMAIL PROTECTED]'
> > Subject:[PHP] looping through array with list()/each()
> > 
> > OK so I've done this hundreds of times, but this time I cannot get it to
> > work.
> > 
> > Please cast an eye over the following code and output and tell me why $k
> > and
> > $v are not being set:
> > 
> > 
> > Code:
> > -
> > 
> > $ser = array( 'first', 'second', 'third', 'fourth', 'fifth' );
> > 
> > reset($ser);
> > while ( list($key, $val) = each($ser) );
> > {
> > echo "\$key = $key, \$val = $val";
> > }
> > 
> > -
> > 
> > 
> > Output:
> > --
> > 
> > $key = , $val =
> > 
> > --
> > 
> > I tried giving the $ser array numeric keys and string keys, both made no
> > difference.
> > 
> > 
> > thanks,
> > 
> > - Kev
> > 
> > 
> > **
> > 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
> 
> 
> -- 
> 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] Re: Automatic Form Generation with PHP

2002-09-25 Thread debbie_dyer

Hi Henry

On set up of the side of the software that sits on the customers server a
table is created for users. Adminstration screens are provided for
adding/deleting users and a user can only gain access by logging in and they
can only log in if a record exists in this table. The whole thing (on this
side) is secured by cookies. After logging in the software attempts to
connect to a MySQL database using the host, username, pass & db name
specified in a mysqlvars.php file - these vars are never passed across the
network. No usernames/passwords either for MySQL or access to the software
are stored in the cookie - the cookie is authenticated using a checksum
value.

The generator side is secured by sessions but again no MySQL vars are sent
across nor any access usernames/passwords for the customer software. What is
sent between the servers is: 1. the customers email address and password for
the generator (encoded and different from their MySQL/customer software
username/passwords) and. 2. table structure information which has been
retrieved. This information could of course be intercepted but could be of
no use to a hacker without a valid username and password for the MySQL
database.

If you disagree please tell me. It's this aspect of the software (security)
that causes most concern as with any application enabling online access to
databases.

Debbie

- Original Message -
From: "Henry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 25, 2002 11:14 AM
Subject: Re: [PHP] Re: Automatic Form Generation with PHP


> Hi Debbie,
>
> That's fair enough. How are you ensure that only valid servers request
> information from the field enquiry part?
>
> Otherwise people might be able to use this part to gain access to the
> database structure if not the actual data.
>
> Henry.
>
> "Debbie_dyer" <[EMAIL PROTECTED]> wrote in message
> 00f501c26476$49fcd4a0$19153c3e@homepc">news:00f501c26476$49fcd4a0$19153c3e@homepc...
> > Hi Henry
> >
> > Well the software generates the code to process the forms as well (eg
for
> an
> > insert form the code to check required fields are not empty, perform any
> > data validation and insert the record into the db) as well as the forms
> > themselves and this code is in PHP. You can choose to generate a sticky
> form
> > where you would get 1 PHP page (containing a mixture of PHP and HTML) or
> > non-sticky where you would get separate HTML & PHP pages for the
> > forms/processing. Because all this generated processing code is in PHP
> > customers who don't have PHP either wouldn't be interested in the
software
> > or if they were interested in the software they would need to install
it -
> > both to use the software and also to be able to use the processing code
> that
> > it generated.
> >
> > Debbie
> >
> > - Original Message -
> > From: "Henry" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, September 25, 2002 10:05 AM
> > Subject: [PHP] Re: Automatic Form Generation with PHP
> >
> >
> > > Hi Debbie,
> > >
> > > What are you going to do about customers who don't have PHP? To run
the
> > > field definition extractor part of the system.
> > >
> > > Henry
> > >
> > >
> > >
> > >
> > > "Debbie_dyer" <[EMAIL PROTECTED]> wrote in message
> > > 00a001c26468$80a50530$19153c3e@homepc">news:00a001c26468$80a50530$19153c3e@homepc...
> > > Hi
> > >
> > > We are shortly to release the next version of Form Generator Pro
> > (automatic
> > > generation of HTML form/PHP processing code) and are looking for some
> > > comments on the way in which we intend to make the software available.
> > >
> > > Due to the fact that we cannot distribute this PHP application without
> > > comprising copyright (the Zend Encoder is not an affordable option for
> > us -
> > > we are a small start-up business), the current version of Form
Generator
> > Pro
> > > is only available for use online at the C U Online site which is fine
> > > because 1. it only generates mail forms and 2. it's free. However this
> > won't
> > > work for version 2 because version 2 automatically generates forms for
> > MySQL
> > > databases by querying the database for table information (field
lengths,
> > > types etc). Opening up connections from our server to other servers to
> get
> > > database info is not an option - for security reasons (and also many
> MySQL
> > > servers are set up to only accept local connections anyway for this
> > reason).
> > >
> > > To resolve this problem, the software has been split into 2 parts. The
> > part
> > > that retrieves the database information sits on the customers server
> > > (secured). Field definitions are then extracted and sent to the
> generator
> > > which remains on our site. I will stress here that no actual database
> data
> > > is sent between the 2 servers, nor any MySQL server usernames or
> > passwords -
> > > just the field lengths, types etc of the selected table. Access to the
> > > generator will then be sold as opposed to s

Re: [PHP] Re: exec("echo ... issuse

2002-09-25 Thread Henry

How about

 $ip is down, lets call the admin. I
was sleeping for $var_timer_rechner1 Minutes\" | smbclient -M $popup_1 >>
$script";
exec("echo \"$command\"");
?>


"Mario Ohnewald" <[EMAIL PROTECTED]> wrote in message
001901c26480$5e280df0$350aa8c0@W2KDP">news:001901c26480$5e280df0$350aa8c0@W2KDP...
> Hi Henry,
>
>
> >  From: Henry [mailto:[EMAIL PROTECTED]]
> >
> >
> > Have you tried using single quotes arround the main string?
> >
> > i.e. 'echo "echo blah blah"'
>
> I have tried serveral of version, maybe you could give me your example
from
> the lines below.
> I couldnt work it out ;(
>
>
> >
> > Henry
> >
> > "Henry" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > use \" instead of " so that you don't actually end the string
> > >
> > > Henry
> > >
> > > "Mario Ohnewald" <[EMAIL PROTECTED]> wrote in message
> > > 001801c2647a$070aa100$350aa8c0@W2KDP">news:001801c2647a$070aa100$350aa8c0@W2KDP...
> > > > Hello!
> > > > I want to write a line into a file (called $script) wich
> > goes like that:
> > > >
> > > >  echo "`date` 192.168.10.123 is down, lets call
> > the admin. I was
> > > > sleeping for 10 Minutes | smbclient -M Computer
> > > >
> > > > This is what i have tried:
> > > > exec("echo "echo "`date` ===> $ip is down, lets
> > call the admin.
> > I
> > > > was sleeping for $var_timer_rechner1 Minutes" | smbclient
> > -M $popup_1"
> > >>
> > > > $script");
> > > >
> > > > The problem is that after
> > > > exec("echo "
> > > > its command ends due to that ".
> > > >
> > > > I tried \" to let php ignore this " but then it doesn´t write my "
> > > anymore:
> > > >  exec("echo \"echo \"`date` ===> $ip is down,
> > lets call the
> > admin.
> > > I
> > > > was sleeping for $var_timer_rechner1\" | smbclient -M
> > $popup_1\" >>
> > > > $script");
> > > >
> > > > this is the result:
> > > > echo Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is
> > down, lets call
> > > the
> > > > admin. I was sleeping for  | smbclient -M Server
> > > >
> > > > but i want:
> > > > echo "Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is
> > down, lets call
> > > the
> > > > admin. I was sleeping for" | smbclient -M Server
> > > >
> > > > ^^
> > > > ^^
> > > > missing
> > > > missing
> > > >
> > > >
> > > > Can anyone tell me where the my mistake is?
> > > >
> > > >
> > > > Cheers, Mario
> > > >
> > >
> > >
> >
>
> mario
>



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




Re: [PHP] MyPHPNuke1.8.8-1 *** Nuked ***

2002-09-25 Thread Miles Thompson

Some themes are not as fully worked out as they should be. At the MySQL 
console, use this to reset the them to PostnukeSilver.

mysql> update nuke_module_vars set pn_value = 's:14:"PostNukeSilver";' 
where pn_id = '9'

The "s" denotes a string
The "14" is the length of the theme name
Make certain the name you use matches the case used in the directory 
holding the theme.
The closing ";" must be included.

I also tried clicking and swearing, but the system would not respond. 

Hope this helps - Miles Thompson

At 03:58 AM 9/25/2002 +0100, James Redfern wrote:
>I used Update System on my E-smith server to install
>dmc-mitel-myphpnuke-1.8.8.-1.noarch.rpm without errors.  Looked good
>but I thought I'd change the theme, so after having read the manual
>for 30 minutes, logged in as "God" and selected a yellow one.  It
>started to load and then stopped with just a header.  And that's as
>far as I got.
>
>Now I have no access to the interface or admin as there are no working
>links on the page.  No amount of clicking, refreshing or swearing at
>it seems to work.
>
>Any ideas?
>
>I even tried to uninstall it but RPM reports an error and says it
>isn't installed.
>
>It seems I'm damned if I do and damned if I don't!
>
>JR.
>
>--
>James Redfern [The Redfern Organization]
>PGP Auto-responder 
>Fingerprint: 6809 FE89 4CEF E76F C6DF  04BF 46DC 58B9 CB81 E8E8
>
>...You always suppress momentary anger at something you deeply and 
>permanently hate"--Robert M. Persig
>
>--
>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: looping through array with list()/each()

2002-09-25 Thread Erwin

> Please cast an eye over the following code and output and tell me why
> $k and $v are not being set:
> 
> 
> Code:
> -
> 
> $ser = array( 'first', 'second', 'third', 'fourth', 'fifth' );
> 
> reset($ser);
> while ( list($key, $val) = each($ser) );
> {
> echo "\$key = $key, \$val = $val";
> }

Small typo:

while ( list($key, $val) = each($ser) );

change into:

while ( list($key, $val) = each($ser) )

Remove the ";"

HTH
Erwin

P.S.: Take a break ;-))

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




[PHP] slashes added before '

2002-09-25 Thread Khalid El-Kary

this code snippet:

function save($file)
{
   $my_file=fopen($file,"wb");
   $my_status=fwrite($my_file,$text);
   fclose($my_file);
}

is intended to overwrite a file or create a file and write to it from a 
string that's already containing text.

the problem is the after the script writes the file i find "\" before all 
single and double qoutes in the whole file

this problem occured on red hat linux but in windows it didn't happen.

can any one help?

khalid


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




RE: [PHP] table-wide or database-wide search and replace?

2002-09-25 Thread John Holmes

> -Original Message-
> From: Justin French [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 25, 2002 1:19 AM
> To: [EMAIL PROTECTED]; 'php'
> Subject: Re: [PHP] table-wide or database-wide search and replace?
[snip]
> > Give it a database name, the program find all the names of the
tables,
> > then loops through them all. It find all the rows for each table
(maybe
> > limit to just text based ones, to be fancy), and makes an sql
statement
> > to call the ereg. To really be feasible, you'd want to use the
replace
> > and regex functions already in MySQL. Only issues you may run into
is
> > the 30 second time limit...
> 
> good point... specifically, is that a time limit imposed by mysql, php
or
> the browser you are referring to?

PHP limitation that scripts have 30 seconds to complete. This can be
changed in PHP.ini or with a function call at the beginning of the
script.

> because i could do this on the command line (once off), and could also
> break
> the process into individual tables, or even groups of 50 rows or
something
> if needed -- although i'd do almost anything to avoid it :)

---John Holmes...


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




RE: [PHP] slashes added before '

2002-09-25 Thread John Holmes

Use stripslashes() on the text before you write it to the file. Where is
this text coming from? The slashes are probably getting added by
magic_quotes.

---John Holmes...

> -Original Message-
> From: Khalid El-Kary [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 25, 2002 8:08 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] slashes added before '
> 
> this code snippet:
> 
> function save($file)
> {
>$my_file=fopen($file,"wb");
>$my_status=fwrite($my_file,$text);
>fclose($my_file);
> }
> 
> is intended to overwrite a file or create a file and write to it from
a
> string that's already containing text.
> 
> the problem is the after the script writes the file i find "\" before
all
> single and double qoutes in the whole file
> 
> this problem occured on red hat linux but in windows it didn't happen.
> 
> can any one help?
> 
> khalid
> 
> 
> _
> Send and receive Hotmail on your mobile device: http://mobile.msn.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] XSLT

2002-09-25 Thread Geoff

I was able to  pass parameters to the xsl stylesheet like this:


Then in the stylesheet do this (The parameter must be defined before any
template is declared):

http://www.w3.org/1999/XSL/Transform";>





Your html page








This will print "parameter_to_pass" to the browser

On Tue, 2002-09-24 at 22:33, [EMAIL PROTECTED] wrote:
> 
> I'm wondering if there is a way to include a query string parameter in an xsl
> stylesheet.
> 
> I have a script that does this:
> 
> xslt_process($xsltprocessor,$xml,$xsl);
> 
> I'd like to include the value of a variable passed to this script via a query
> string (eg. xmlscript.php?p=3 ), whereby the value '3' is passed to the xsl
> stylesheet somehow. The xsl stylesheet should then only process section 3 of the
> xml document.
> 
> I've played about with extra arguments to xslt_process and 
>  to no avail.
> 
> Hope this is clear enough.
> 
> TIA
> 
> Mick
> 
> 
> MICHAEL HALL Web Development Officer
> Batchelor Institute of Indigenous Tertiary Education
> W: [EMAIL PROTECTED](08) 8951 8352
> H: [EMAIL PROTECTED](08) 8953 1442
> 
> 
> -- 
> 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] pretty simple problem in mailing a dynamic page

2002-09-25 Thread usha

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



Re: [PHP] slashes added before '

2002-09-25 Thread debbie_dyer

You probably have magic_quotes_gpc in php.ini off on your Windows platform
and on on your Linux platform

Magic_quotes_gpc automatically applies addslashes to POST, GET and cookie
data if its on.

Use stripslashes to remove it or to write code thats portable - write a
function like:-

function stripData($data) {
  return ini_get('magic_quotes_gpc') ? stripslashes($data) : $data;
}

Debbie

- Original Message -
From: "Khalid El-Kary" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 25, 2002 1:07 PM
Subject: [PHP] slashes added before '


> this code snippet:
>
> function save($file)
> {
>$my_file=fopen($file,"wb");
>$my_status=fwrite($my_file,$text);
>fclose($my_file);
> }
>
> is intended to overwrite a file or create a file and write to it from a
> string that's already containing text.
>
> the problem is the after the script writes the file i find "\" before all
> single and double qoutes in the whole file
>
> this problem occured on red hat linux but in windows it didn't happen.
>
> can any one help?
>
> khalid
>
>
> _
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] Session testing on local machine

2002-09-25 Thread Will Marshall

Hi,
 
I was wondering if somebody could tell me how to get sessions to work on
my local machine.
 
I am using easyPhp 1.6 to run my design platform, but have been unable
to get the sessions to work.
I tried the pages on a website and all worked so its not the scripts.
 
Any suggestions appreciated.
 
Thanks
 
Will
 

--
 
ICQ # 133565401
===
"So many times it's hopeless dark and grey
 No way out
 And other times it's hope that saves the day"
 - - Jon Schaffer (Demons & Wizards / Iced Earth) 
 
 



RE: [PHP] Re: exec("echo ... issuse

2002-09-25 Thread Mario Ohnewald

Hi Henry!


> From: Henry [mailto:[EMAIL PROTECTED]]
>
> How about
>
>  $command="\"`date` ===> $ip is down, lets call the admin. I
> was sleeping for $var_timer_rechner1 Minutes\" | smbclient -M
> $popup_1 >>
> $script";
> exec("echo \"$command\"");
> ?>

Nope, hasnt worked either ;(

any other idea?
this is quite important ;)

Cheers, Mario
>
>
> "Mario Ohnewald" <[EMAIL PROTECTED]> wrote in message
> 001901c26480$5e280df0$350aa8c0@W2KDP">news:001901c26480$5e280df0$350aa8c0@W2KDP...
> > Hi Henry,
> >
> >
> > >  From: Henry [mailto:[EMAIL PROTECTED]]
> > >
> > >
> > > Have you tried using single quotes arround the main string?
> > >
> > > i.e. 'echo "echo blah blah"'
> >
> > I have tried serveral of version, maybe you could give me
> your example
> from
> > the lines below.
> > I couldnt work it out ;(
> >
> >
> > >
> > > Henry
> > >
> > > "Henry" <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > use \" instead of " so that you don't actually end the string
> > > >
> > > > Henry
> > > >
> > > > "Mario Ohnewald" <[EMAIL PROTECTED]> wrote in message
> > > > 001801c2647a$070aa100$350aa8c0@W2KDP">news:001801c2647a$070aa100$350aa8c0@W2KDP...
> > > > > Hello!
> > > > > I want to write a line into a file (called $script) wich
> > > goes like that:
> > > > >
> > > > >  echo "`date` 192.168.10.123 is down, lets call
> > > the admin. I was
> > > > > sleeping for 10 Minutes | smbclient -M Computer
> > > > >
> > > > > This is what i have tried:
> > > > > exec("echo "echo "`date` ===> $ip is down, lets
> > > call the admin.
> > > I
> > > > > was sleeping for $var_timer_rechner1 Minutes" | smbclient
> > > -M $popup_1"
> > > >>
> > > > > $script");
> > > > >
> > > > > The problem is that after
> > > > > exec("echo "
> > > > > its command ends due to that ".
> > > > >
> > > > > I tried \" to let php ignore this " but then it
> doesn´t write my "
> > > > anymore:
> > > > >  exec("echo \"echo \"`date` ===> $ip is down,
> > > lets call the
> > > admin.
> > > > I
> > > > > was sleeping for $var_timer_rechner1\" | smbclient -M
> > > $popup_1\" >>
> > > > > $script");
> > > > >
> > > > > this is the result:
> > > > > echo Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is
> > > down, lets call
> > > > the
> > > > > admin. I was sleeping for  | smbclient -M Server
> > > > >
> > > > > but i want:
> > > > > echo "Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is
> > > down, lets call
> > > > the
> > > > > admin. I was sleeping for" | smbclient -M Server
> > > > >
> > > > > ^^
> > > > > ^^
> > > > > missing
> > > > > missing
> > > > >
> > > > >
> > > > > Can anyone tell me where the my mistake is?
> > > > >
> > > > >
> > > > > Cheers, Mario
> > > > >
> > > >
> > > >
> > >
> >
> > mario
> >
>
>
>
> --
> 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] pretty simple problem in mailing a dynamic page

2002-09-25 Thread Petre Agenbag

You need to add another header telling it the content type = text/html

On Wed, 2002-09-25 at 17:04, usha 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




Re: [PHP] Re: exec("echo ... issuse

2002-09-25 Thread Marek Kilimajer

this must work:

exec('echo "`date` 192.168.10.123 is down, lets call the admin. I was 
sleeping for 10 minutes" | smbclient -M '. $compname);

Mario Ohnewald wrote:

>Hi Henry!
>
>
>  
>
>>From: Henry [mailto:[EMAIL PROTECTED]]
>>
>>How about
>>
>>>$command="\"`date` ===> $ip is down, lets call the admin. I
>>was sleeping for $var_timer_rechner1 Minutes\" | smbclient -M
>>$popup_1 >>
>>$script";
>>exec("echo \"$command\"");
>>?>
>>
>>
>
>Nope, hasnt worked either ;(
>
>any other idea?
>this is quite important ;)
>
>Cheers, Mario
>  
>
>>"Mario Ohnewald" <[EMAIL PROTECTED]> wrote in message
>>001901c26480$5e280df0$350aa8c0@W2KDP">news:001901c26480$5e280df0$350aa8c0@W2KDP...
>>
>>
>>>Hi Henry,
>>>
>>>
>>>  
>>>
 From: Henry [mailto:[EMAIL PROTECTED]]


Have you tried using single quotes arround the main string?

i.e. 'echo "echo blah blah"'


>>>I have tried serveral of version, maybe you could give me
>>>  
>>>
>>your example
>>from
>>
>>
>>>the lines below.
>>>I couldnt work it out ;(
>>>
>>>
>>>  
>>>
Henry

"Henry" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


>use \" instead of " so that you don't actually end the string
>
>Henry
>
>"Mario Ohnewald" <[EMAIL PROTECTED]> wrote in message
>001801c2647a$070aa100$350aa8c0@W2KDP">news:001801c2647a$070aa100$350aa8c0@W2KDP...
>  
>
>>Hello!
>>I want to write a line into a file (called $script) wich
>>
>>
goes like that:


>> echo "`date` 192.168.10.123 is down, lets call
>>
>>
the admin. I was


>>sleeping for 10 Minutes | smbclient -M Computer
>>
>>This is what i have tried:
>>exec("echo "echo "`date` ===> $ip is down, lets
>>
>>
call the admin.
I


>>was sleeping for $var_timer_rechner1 Minutes" | smbclient
>>
>>
-M $popup_1"


>>$script");
>>
>>The problem is that after
>>exec("echo "
>>its command ends due to that ".
>>
>>I tried \" to let php ignore this " but then it
>>
>>
>>doesn´t write my "
>>
>>
>anymore:
>  
>
>> exec("echo \"echo \"`date` ===> $ip is down,
>>
>>
lets call the
admin.


>I
>  
>
>>was sleeping for $var_timer_rechner1\" | smbclient -M
>>
>>
$popup_1\" >>


>>$script");
>>
>>this is the result:
>>echo Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is
>>
>>
down, lets call


>the
>  
>
>>admin. I was sleeping for  | smbclient -M Server
>>
>>but i want:
>>echo "Wed Sep 25 12:29:17 CEST 2002 ===> 192.168.10.1 is
>>
>>
down, lets call


>the
>  
>
>>admin. I was sleeping for" | smbclient -M Server
>>
>>^^
>>^^
>>missing
>>missing
>>
>>
>>Can anyone tell me where the my mistake is?
>>
>>
>>Cheers, Mario
>>
>>
>>
>  
>
>>>mario
>>>
>>>  
>>>
>>
>>--
>>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] replacing literal " in string

2002-09-25 Thread ROBERT MCPEAK

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] replacing literal " in string

2002-09-25 Thread ROBERT MCPEAK

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




[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




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




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




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




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




[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  

 



[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




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




[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




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




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




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




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




[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

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




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

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




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




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




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




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




  1   2   >