Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Robert Cummings
On Sat, 2003-09-20 at 01:53, Dan Anderson wrote:
> I find your responses to my e-mails quite humorous.  Upon review --
> aside from a single WTF -- I don't think I was condescending in any way
> shape or form.  I was just trying to offer help.

The particular shape of your help was non newbie friendly. I think that,
combined with your incorrect assessments made it all the more annoying.
And yes, "WTF" and "you really need to read the documentation" played a
key part also since they were quite condescending, and inappropriate
given your incorrect answers and knowledge of functionality.

> After reading about wrappers, I find it doubly humorous that you didn't
> just disregard my e-mail when I asked you why you were using "php://". 
> It's not like I said: "php://" isn't a valid protocol.  "http://"; and
> "ftp://"; are all PHP supports.  I just said "Why are you using php://"
> below?
> 
> And I also qualified my statements about fsockopen() and
> set_stream_blocking by saying "I seem to remember" and "If I remember
> correctly".  And, yes, in PHP 3.0 or whatever it was that was true. 
> Hence the "if I remember".

Yes a lovely weasel statement if ever I saw one.

> 
> So, it would seem to me that as soon as you got to the WTF you should
> have said, "This guy thinks I am a noob".  And at that point you should
> have just said "thanks but you're wrong". 

Actually at that point I thought, "this guy thinks I'm an noob" and he's
being an arse about it. That's no way to treat noobs that post
appropriate questions.

> And, just for the record, you never explicitly stated that you needed a
> reason to read in only one character at a time.  You just sent a bunch
> of code down the pipe.  So it seems quite natural to assume you're just
> making a noobish mistake -- reading a char at a time when a string will
> do.

I certainly explained quite well what the problem was. And as you
assumed I was making a noobish mistake and sent a scathing response to
my problem, I also assumed you were an ass, and needed some kind of
clarification.

> Anyways, you are running an infinite loop and I don't quite see how this
> is exiting:

YES, this is the original question. Why is it exiting. To which you gave
me a whole set of unrequested answers that weren't even on the topic of
my post.

> while (1) 
> {
> if ()
> else
> }
> 
> But, hey, more power to you if you've gotten to the level where you
> don't understand why people who don't understand some esoteric function
> are such muppets.

If you don't understand the function, then why are you posting answers
as though you do? Someone asks me about quantum physics, I don't pretend
to know and confuse the whole issue.

> 
> BTW: If you insist on keeping up with the flamethrowers kindly e-mail me
> off list so as not to bother others on the listserv.

Yes, if you reply I'll be sure to take the next one off list, but since
you made this public, I'm sure readers would love to see the backdraft.
The above statement is actually an underhanded attempt to get the last
public word while preventing me from a public response. If you were so
keen to have it off the list, then this email I'm responding to, should
have been off-list itself.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Robert Cummings
On Sat, 2003-09-20 at 02:02, Curt Zirzow wrote:
> hmm.. on second thought...
> 
> * Thus wrote Robert Cummings ([EMAIL PROTECTED]):
> > [...]
> > if( ($char = fread( $stdin, 1 )) !== false )
> 
> How are you calling this script?  I'm not sure how cgi will handle
> fread 
> 
> With a traditional CGI script  is what is read on POST data
> from a form, and php takes care of this.
> 
> That is where my confusion is now.

I'm calling it as "php -qC foo.php". The fread() should work since it
works on input when I don't have stdin in non-blocking mode. Perhaps
it's a bug. I took a look at the doc on streams again, and it uses
php://input as the POST stream. Maybe it's a bug.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Do PHP boolean operators short circuit?

2003-09-19 Thread Curt Zirzow
* Thus wrote Jason Wong ([EMAIL PROTECTED]):
> On Saturday 20 September 2003 10:57, John W. Holmes wrote:
> 
> [snip]
> 
> >  From my experience, it will work that way. I don't know if it's that
> > way for every version or not, though.
> 
> manual > Migrating from PHP/FI 2 to PHP 3

heh... i havn't seen a PHP/FI reference in a long while, thanks for
reminding us how far php has come along today :)


cheers.

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

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



Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Curt Zirzow
* Thus wrote Dan Anderson ([EMAIL PROTECTED]):
> I find your responses to my e-mails quite humorous.  Upon review --

hmm... its almost (is) saturday lets all drop it.

cheers.

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

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



Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Curt Zirzow
hmm.. on second thought...

* Thus wrote Robert Cummings ([EMAIL PROTECTED]):
> [...]
> if( ($char = fread( $stdin, 1 )) !== false )

How are you calling this script?  I'm not sure how cgi will handle
fread 

With a traditional CGI script  is what is read on POST data
from a form, and php takes care of this.

That is where my confusion is now.

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

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



Re: [PHP] Do PHP boolean operators short circuit?

2003-09-19 Thread Jason Wong
On Saturday 20 September 2003 10:57, John W. Holmes wrote:

[snip]

>  From my experience, it will work that way. I don't know if it's that
> way for every version or not, though.

manual > Migrating from PHP/FI 2 to PHP 3

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Flirting is the gentle art of making a man feel pleased with himself.
-- Helen Rowland
*/

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



Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Dan Anderson
I find your responses to my e-mails quite humorous.  Upon review --
aside from a single WTF -- I don't think I was condescending in any way
shape or form.  I was just trying to offer help.

After reading about wrappers, I find it doubly humorous that you didn't
just disregard my e-mail when I asked you why you were using "php://". 
It's not like I said: "php://" isn't a valid protocol.  "http://"; and
"ftp://"; are all PHP supports.  I just said "Why are you using php://"
below?

And I also qualified my statements about fsockopen() and
set_stream_blocking by saying "I seem to remember" and "If I remember
correctly".  And, yes, in PHP 3.0 or whatever it was that was true. 
Hence the "if I remember".

So, it would seem to me that as soon as you got to the WTF you should
have said, "This guy thinks I am a noob".  And at that point you should
have just said "thanks but you're wrong". 

And, just for the record, you never explicitly stated that you needed a
reason to read in only one character at a time.  You just sent a bunch
of code down the pipe.  So it seems quite natural to assume you're just
making a noobish mistake -- reading a char at a time when a string will
do.

Anyways, you are running an infinite loop and I don't quite see how this
is exiting:

while (1) 
{
if ()
else
}

But, hey, more power to you if you've gotten to the level where you
don't understand why people who don't understand some esoteric function
are such muppets.

BTW: If you insist on keeping up with the flamethrowers kindly e-mail me
off list so as not to bother others on the listserv.

-Dan

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



Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Robert Cummings
On Sat, 2003-09-20 at 01:52, Curt Zirzow wrote:
> * Thus wrote Robert Cummings ([EMAIL PROTECTED]):
> > I wanted t play around with the CGI (not CLI) version of PHP and get a
> > feel for the I/O stuff, specifically STDIN. So I whipped up the
> > following script:
> > 
> > ///
> > 
> > #!/usr/bin/php -qC
> >  >   
> > if( ($stdin = fopen( 'php://stdin', 'r' )) === false )
> > { 
> > echo 'Failed to open STDIN'."\n";
> > exit();
> > }  
> >  
> > stream_set_blocking( $stdin, false );
> 
> I believe this is not needed, stdin is nonblocking all the time.

My original test script didn't set the blocking state to non blocking. I
determined from that that stdin is initally in a blocking state. Since I
typed several characters and none where printed till I hit enter.

> 
> >  
> > $count = 0;  
> > while( 1 ) 
> 
> this will never exit until php runs out of memory, and most likely
> will lead to unexpected results.

Yeah, it was just a test script. But still, if the memory had been
exhausted, it wouldn't be in under a second, and I'd get a core dump
like I usually do when I have a runaway recursive function.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Curt Zirzow
* Thus wrote Robert Cummings ([EMAIL PROTECTED]):
> I wanted t play around with the CGI (not CLI) version of PHP and get a
> feel for the I/O stuff, specifically STDIN. So I whipped up the
> following script:
> 
> ///
> 
> #!/usr/bin/php -qC
>
> if( ($stdin = fopen( 'php://stdin', 'r' )) === false )
> { 
> echo 'Failed to open STDIN'."\n";
> exit();
> }  
>  
> stream_set_blocking( $stdin, false );

I believe this is not needed, stdin is nonblocking all the time.

>  
> $count = 0;  
> while( 1 ) 

this will never exit until php runs out of memory, and most likely
will lead to unexpected results.

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

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



Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Robert Cummings
On Sat, 2003-09-20 at 01:01, Dan Anderson wrote:
> One more thing:
> 
> gdb doesn't do a damned thing for debugging PHP scripts.  Look for the
> errors and warnings output to the browser.  (or tty if you're using
> /usr/bin/php).  

Oh you had to tie another on on. I guess I look really stupid. Hmmm
maybe I forgot to run gdb on the PHP binary instead of on the script. Oh
yes, that's got to be it. I ran gdb on the script, and once again I'm
stupid. Now I'm off to say a prayer that you don't inundate me with more
crap.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Robert Cummings
On Sat, 2003-09-20 at 00:59, Dan Anderson wrote:
> Why are you using php:// below?  If stdin is a file './stdin' will

Because it is the correct way to retrieve input from standard input.

http://www.php.net/wrappers.php

> suffice (or the path instead of ./).  If you want to run the PHP script
> in stdin you should use one of the following:
> include()
> include_once()
> require()
> require_once()
> See the manual at php.net for pertinent sections...

I don't want to run a script from stdin, I want to retrieve user input
from the keyboard. What the heck are you smoking?

> > if( ($stdin = fopen( 'php://stdin', 'r' )) === false )
> > { 
> > echo 'Failed to open STDIN'."\n";
> > exit();
> > }  
> 
> I seem to remember stream_set_blocking being either experimental or deprecated.
> If I remember correctly its for use with the function fsock_open().
> > stream_set_blocking( $stdin, false );

No stream_set_blocking() is the correct function. The others are
deprecated because they are less generic for streams:

This function was previously called as set_socket_blocking()
and later socket_set_blocking() but this usage is deprecated.

> > $count = 0;  
> WTF are you thinking?  You really need to read the documentation. 
> Instead of this:

You sir, are a moron, you are calling me a moron and yet you are the one
who doesn't know what you are talking about.

> > while( 1 ) 
> > { 
> > echo 'Foo: '.($count++)."\n";
> > if( ($char = fread( $stdin, 1 )) !== false )
> > {
> > echo $char."\n";
> > }
> > else
> > {
> > echo 'Fooo!'."\n";
> > }
> > }
> 
> Try:
> 
>  
> $stdin = fopen("./stdin","r");
> while ($stdin AND (!(feof($stdin
> { echo fread($stdin,4096); }
> 
> ?>
> 
> Much simpler, correct?

This is not what I want, I want individual keystrokes as they come in
form the keyboard. I'm quite sure I know what I'm doing.

> BTW: The infinite loop you have above could be the reason your script is
> acting erratically.  PHP kills off scripts after they run for so long --
> you may just be catching it in different versions of the loop.

Infinite loop, shmoop, the script ran for less than a second. Long
enough for $count to get as high as 2000 tops. I've run many, MANY
scripts as CGI shell script, and never has it bailed from an infinite
loop successfully in less than a second.

> Also BTW: I understand what you mean when you say CGI but not CLI
> version of PHP, but I really don't think the term CGI applies in this
> case.  CGI means Common Gateway Interface -- or a way to execute
> programs in a special directory designed to keep them from r00ting the
> system.  In PHP things such as headers are automatic -- no need to type:

I use the term CGI for the mode in which PHP was compiled, NOT, AND I
REPEAT NOT, because I'm using it as a Common Gateway interface.

> print "Content-type: text/html\n\n";
> 
> It's a server side scripting language designed to be embedded in things
> like web pages and be able to be run without much security concerns. 
> (i.e. not running a CGI perl scrip as /usr/bin/perl (i.e. not in tainted
> mode) -- ouch!  and these are the silly things users sometimes do)

Thanks for the lesson, I'll be sure to pretend I didn't know what CGI
is. BTW, if I were a newbie at PHP, your message would make me never
want to make another post. Even in the event you are correct, such a
pathetic response is no way to treat those of lesser knowledge. Now go
read the docs, and learn some more before trying to tell me what's what.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Dan Anderson
One more thing:

gdb doesn't do a damned thing for debugging PHP scripts.  Look for the
errors and warnings output to the browser.  (or tty if you're using
/usr/bin/php).  

-Dan

On Sat, 2003-09-20 at 00:33, Robert Cummings wrote:
> I wanted t play around with the CGI (not CLI) version of PHP and get a
> feel for the I/O stuff, specifically STDIN. So I whipped up the
> following script:
> 
> ///
> 
> #!/usr/bin/php -qC
>
> if( ($stdin = fopen( 'php://stdin', 'r' )) === false )
> { 
> echo 'Failed to open STDIN'."\n";
> exit();
> }  
>  
> stream_set_blocking( $stdin, false );
>  
> $count = 0;  
> while( 1 ) 
> { 
> echo 'Foo: '.($count++)."\n";
> if( ($char = fread( $stdin, 1 )) !== false )
> {
> echo $char."\n";
> }
> else
> {
> echo 'Fooo!'."\n";
> }
> }
> 
> 
> 
> Simple enough right?! The problem is the program exits seemingly
> randomly. The last value for $foo can be anywhere from 400 to 1500. Even
> more strange is that running it through gdb indicates a successful exit,
> with no problems or core dumps. Anyone had any similar experiences? I'm
> running PHP 4.3.3 (cgi) -- the latest download version.
> 
> Cheers,
> Rob.
> -- 
> ..
> | InterJinn Application Framework - http://www.interjinn.com |
> ::
> | An application and templating framework for PHP. Boasting  |
> | a powerful, scalable system for accessing system services  |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for   |
> | creating re-usable components quickly and easily.  |
> `'

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



Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Dan Anderson
Why are you using php:// below?  If stdin is a file './stdin' will
suffice (or the path instead of ./).  If you want to run the PHP script
in stdin you should use one of the following:
include()
include_once()
require()
require_once()
See the manual at php.net for pertinent sections...
> if( ($stdin = fopen( 'php://stdin', 'r' )) === false )
> { 
> echo 'Failed to open STDIN'."\n";
> exit();
> }  

I seem to remember stream_set_blocking being either experimental or deprecated.
If I remember correctly its for use with the function fsock_open().
> stream_set_blocking( $stdin, false );
>  
> $count = 0;  
WTF are you thinking?  You really need to read the documentation. 
Instead of this:
> while( 1 ) 
> { 
> echo 'Foo: '.($count++)."\n";
> if( ($char = fread( $stdin, 1 )) !== false )
> {
> echo $char."\n";
> }
> else
> {
> echo 'Fooo!'."\n";
> }
> }

Try:



Much simpler, correct?

BTW: The infinite loop you have above could be the reason your script is
acting erratically.  PHP kills off scripts after they run for so long --
you may just be catching it in different versions of the loop.

Also BTW: I understand what you mean when you say CGI but not CLI
version of PHP, but I really don't think the term CGI applies in this
case.  CGI means Common Gateway Interface -- or a way to execute
programs in a special directory designed to keep them from r00ting the
system.  In PHP things such as headers are automatic -- no need to type:

print "Content-type: text/html\n\n";

It's a server side scripting language designed to be embedded in things
like web pages and be able to be run without much security concerns. 
(i.e. not running a CGI perl scrip as /usr/bin/perl (i.e. not in tainted
mode) -- ouch!  and these are the silly things users sometimes do)

-Dan

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



[PHP] [Newbie Guide] For the benefit of new members

2003-09-19 Thread tech
=
This message is for the benefit of new subscribers and those new to PHP.  
Those who  do not want to be bothered just filter out the [Newbie Guide] 
mails. Please feel free to add more points and send to the list.
==
1. If you have any queries/problems about PHP try http://www.php.net/manual/en 
first. You can download a copy and use it offline also.

2. If you can not get answer here try http://www.google.com next. Try 
searching for "php YOUR QUERY" and you may be lucky to get an answer within 
the first 10 results.

3. Glancing through the list archive at 
http://marc.theaimsgroup.com/?l=php-general , you can find many of the 
common topics discussed repeatedly and can get your answer from those 
discussions. 

4. If you are stuck with a script and do not understand what is wrong, instead 
of posting the whole script, try doing some research yourself. One useful 
trick is to print the variable/sql query using print or echo command and 
check whether you get what you expected. 

After diagnosing the problem, send the details of your efforts (following 
steps 1, 2 & 3) and ask for help.

5. Provide a clear descriptive subject line. Avoid general subjects like 
"Help!!", "A Question" etc.  Especially avoid blank subjects. 

6. When you want to start a new topic, open a new mail and enter the mailing 
list address [EMAIL PROTECTED] instead of replying to an existing 
thread and replacing the subject and body with your message.

7. PHP is a server side scripting language. Whatever processing PHP does takes 
place BEFORE the output reaches the client. Therefore, it is not possible to 
access the users'  computer related information (OS, screen size etc) using 
PHP. You need to go for JavaScript and ask the question in a JavaScript 
list.

8. It's always a good idea to post back to the list once you've solved
your problem. People usually add [SOLVED] to the subject line of their
email when posting solutions. By posting your solution you're helping
the next person with the same question. [contribued by Chris W Parker]

9. Ask smart questions http://catb.org/~esr/faqs/smart-questions.html
[contributed by Jay Blanchard)

Hope you have a good time programming with PHP.

Best regards,

-- 
Integrated Management Tools for leather industry
--
http://www.leatherlink.net

Ma Siva Kumar,
BSG LeatherLink,
No 9, First Main Road,
Jai Nagar, Arumbakkam,
Chennai - 600106
Tel : +91 44 55191757

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



Re: [PHP] Warning during File uploading

2003-09-19 Thread Binay
Hi !
Sorry ... but yesterday couldn't get over it ...

Sorry for inconvinience  caused ..

Binay

- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 19, 2003 12:18 PM
Subject: Re: [PHP] Warning during File uploading


> On Friday 19 September 2003 12:47, Binay wrote:
>
> > I am uploading html,text etc files though HTTP upload form method. In my
> > php.ini file value of upload_max_filesize is 2 MB. Now if the file size
> > exceeds 2 MB i get warning messages saying size of the file exceeds
> > upload_max_filesize value . I want to know how i can suppress this
warning
> > message and is there any method to get the file size before uploading so
as
> > to alert the clients accordingly?
>
> You asked the same question yesterday?
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> At times discretion should be thrown aside,
> and with the foolish we should play the fool.
> -- Menander
> */
>
> --
> 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] Problem with getting non-blocking data from stdin

2003-09-19 Thread Robert Cummings
I wanted t play around with the CGI (not CLI) version of PHP and get a
feel for the I/O stuff, specifically STDIN. So I whipped up the
following script:

///

#!/usr/bin/php -qC
http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Session with various Browser.

2003-09-19 Thread Harry Yau
Thanks Marek!~ I have solved this problem with the exactly suggestion from
you.
session_cache_limiter("private_no_expire");

Marek Kilimajer wrote:

> Experiment with session_cache_limiter(), for example try to set it to
> private_no_expire.
>
> Harry Yau wrote:
>
> > Hi all,
> > I am new to php. At first, I wrote a php script to generate a pdf
> > file from a tex file and load that pdf file to the browser by call a
> > system call of latex -pdftex. After loading the pdf file. I wrote a
> > function to remove all temp file created by latex. It work fine and it
> > did all I expected. The php script work on IE 5, Netscape 4.79 and
> > Mozilla 5.0.
> > However, when I've tried to add a command "session_start" at the
> > beginning of my script and even did set and get those session variables,
> > different functionility of the php script MISSed upon different browse.
> > On Netscape 4.79,  it does generate the pdf file and  remove those
> > temp file, but loading the pdf file to the browser. The Netscape keeps
> > complainning about the pdf file is damaged and could not be repaired.
> > On IE5, the script does load the pdf file, but it does not remove
> > those temp file.
> > Nevertheless, on Mozilla, it works fine for me!!
> > For not loading the pdf on netscape, I thought it is because the
> > script does some output to the browser before I call
> > "header("content-type:application/pdf");" Therefore, I put "ob_start()"
> > before starting session and call "ob_end_clean()" before setting the
> > header for pdf content. It does not correct the problem.
> > I am wondering what exactly the "session_start()" does? How it can
> > have different effect upon various browser? Of simply, please tell me
> > how to correct those problems!~
> > Thank You Very Much!~
> >
> >
> > Best Regards,
> > Harry Yau
> >

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



Re: [PHP] Do PHP boolean operators short circuit?

2003-09-19 Thread John W. Holmes
Dan Anderson wrote:

I am learning perl and my book describes "boolean short circuiting".

Basically:

function1() OR function2();

(function2 never is evaluated if function1 is true).

Will this work in PHP for any function?  
Yes.

From my experience, it will work that way. I don't know if it's that 
way for every version or not, though.

Same thing for AND, too...

function1() AND function2()

If function1() comes out FALSE, then function2() isn't evaluated.

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

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


[PHP] Do PHP boolean operators short circuit?

2003-09-19 Thread Dan Anderson
I am learning perl and my book describes "boolean short circuiting".

Basically:

function1() OR function2();

(function2 never is evaluated if function1 is true).

Will this work in PHP for any function?  

Thanks in advance,

-Dan 

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



RE: [PHP] Reading URL is changed

2003-09-19 Thread Warren Vail
What Dan says is true,,, IF there are other form fields on the form where
your user is making his choices.  Since the hotlink fakes a "Get" type of
header, and does NOT cause the other fields be submitted as well, any last
minute changes to those formfields will be ignored by your form processing
routine.

On the other hand, if the click is the only value to be transfer the hotlink
technique should be adequate.

Warren Vail
[EMAIL PROTECTED]


-Original Message-
From: Dan Anderson [mailto:[EMAIL PROTECTED]
Sent: Friday, September 19, 2003 5:58 PM
To: Dan J. Rychlik
Cc: PHP List
Subject: Re: [PHP] Reading URL is changed


First of all, you can use Javascript to submit a form when the link is
pressed.

Andu has a good idea too, but I figured I'd elaborate:

If you create a form like:

  
  
  


The browser visits the URL:

http://www.foo.com?foo=bar&bar=foo

This is called GET method in a form.  Do a google search.

Note that you will have to URL encode all variables and data.  PHP
manual has a good section.

-Dan

--
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] How can I populate or bypass the mod_auth_mysql prompt

2003-09-19 Thread Curt Zirzow
* Thus wrote Daevid Vincent ([EMAIL PROTECTED]):
> Thanks for the reply, however that seems extremely insecure as both user and
> pw are in the url. Got any other suggestions to try?

It isn't much less secure than if the browser sends them. The only
way to secure this method is using ssl on all pages that are
secured.

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

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



Re: [PHP] fopen() || Execute read file as php page; not plain text

2003-09-19 Thread Curt Zirzow
* Thus wrote CF High ([EMAIL PROTECTED]):
> Re: "So you want to read from a file and write back to it? I don't
> understand what you're trying to accomplish, execute a script and write the
> result to file?"
> 
> Yes, the read file is a nested set of queries that populates a js pop up
> menu, the site navigational structure.  That's why I need the read file to
> be executed.

what exactly is 'a nested set of queries'?


> 
> Got help from a PHP guru -- he suggested shell access

hm.. i see where we stand.


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

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



Re: [PHP] fopen() || Execute read file as php page; not plain text

2003-09-19 Thread andu
On Fri, 19 Sep 2003 21:29:50 -0700
"CF High" <[EMAIL PROTECTED]> wrote:

> Re: "So you want to read from a file and write back to it? I don't
> understand what you're trying to accomplish, execute a script and write the
> result to file?"
> 
> Yes, the read file is a nested set of queries that populates a js pop up
> menu, the site navigational structure.  That's why I need the read file to
> be executed.

So what was wrong with include $include_path? The fact that you include it doesn't
mean you have to display it, just that you have access to its script. You can call
a function from the file and use the result for whatever purpose you may chose
without displaying a thing.

> 
> Got help from a PHP guru -- he suggested shell access
> 
> --Noah
> 
> 
> "Andu" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > On Fri, 19 Sep 2003 18:20:01 -0700
> > "CF High" <[EMAIL PROTECTED]> wrote:
> >
> > > Because I need to write $include_path content to file; not display it in
> the
> > > browser...
> >
> > So you want to read from a file and write back to it? I don't understand
> what
> > you're trying to accomplish, execute a script and write the result to
> file?
> >
> > >
> > > --Noah
> > >
> > >
> > > "Andu" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > > > On Fri, 19 Sep 2003 17:05:47 -0700
> > > > "CF High" <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > Hm..
> > > > >
> > > > > Looks like I was deluding myself.  The only data returned by setting
> a
> > > var =
> > > > > include $include_path, is 0 or 1.  I'm looking for a few hundred
> lines
> > > of
> > > > > evaluated text.  Back to the drawing board.  Christ, this is a pain
> in
> > > > > the.
> > > >
> > > > Why do you need to set the $var, why not just include $include_path
> > > when/where
> > > > you need it in your script.
> > > >
> > > > >
> > > > > --Noah
> > > > >
> > > > >
> > > > > "Jay Blanchard" <[EMAIL PROTECTED]> wrote in
> message
> > > > > news:[EMAIL PROTECTED]
> > > > > [snip]
> > > > > was able to use an absolute reference on my local machine to execute
> > > > > read
> > > > > file contents; e.g. fopen('http://www.mysite.com/index.php', 'a'),
> but
> > > > > on
> > > > > the host webserver no such luck.  Administrator said I can only use
> > > > > relative
> > > > > paths.  Problem is, when I use a relative path, I just get plain
> text;
> > > > > i.e.
> > > > > the read file doesn't get executed as php.
> > > > >
> > > > > eval()'s not an option either, as the read file(s) has apostrophes,
> > > > > quotes
> > > > > top-to-bottom.
> > > > >
> > > > > Basically, I just need the file-to-be-read to have the queries
> within it
> > > > > run
> > > > > as if it were run in the web browser.
> > > > >
> > > > > All clues appreciated as I'm at my wits end here -- can't find didly
> on
> > > > > this
> > > > > subject on the net.
> > > > > [/snip]
> > > > >
> > > > > Is the file PHP code? If so, why not include()?
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > 
> > > > Regards, Andu Novac
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
> >
> >
> > 
> > Regards, Andu Novac
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


-- 
Andu

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



RE: [PHP] How can I populate or bypass the mod_auth_mysql prompt

2003-09-19 Thread Daevid Vincent
Thanks for the reply, however that seems extremely insecure as both user and
pw are in the url. Got any other suggestions to try?
 

> -Original Message-
> From: Paul Nicholson [mailto:[EMAIL PROTECTED] 
> Sent: Friday, September 19, 2003 6:46 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] How can I populate or bypass the 
> mod_auth_mysql prompt
> 
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On Friday 19 September 2003 09:36 pm, Daevid Vincent wrote:
> > I am using mod_auth_mysql to protect some directories. All 
> works great.
> > However, when someone joins up, I send them a username/pw 
> for them to login
> > with. What I'd like is in addition, to shoot them into the protected
> > section so they don't have to login with these credentials 
> (the first
> > time). I tried to set these PHP variables, but I still am 
> prompted. Is
> > there some other trick or way to do this?
> 8< snip
> 
> Hey Daevid,
> Redirect them to the page using: 
> http://username:[EMAIL PROTECTED]/protected_section/
> HTH!  HAND!
> ~Paul 
> 
> - -- 
> ~Paul Nicholson
> Design Specialist @ WebPower Design
> [EMAIL PROTECTED]
> www.webpowerdesign.net
> "The webthe way you want it!"
> 
> 
> "It said uses Windows 98 or better, so I loaded Linux!"
> Registered Linux User #183202 using Register Linux System # 81891
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.7 (GNU/Linux)
> 
> iD8DBQE/a7EcDyXNIUN3+UQRAnr0AJ9LubzjwlqYpv/agFEaDlRGDGUqqACeN3Bw
> yPJzxGXPY7BuXUTZShuRfa0=
> =fr4z
> -END PGP SIGNATURE-
> 
> -- 
> 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] How can I populate or bypass the mod_auth_mysql prompt

2003-09-19 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Friday 19 September 2003 09:36 pm, Daevid Vincent wrote:
> I am using mod_auth_mysql to protect some directories. All works great.
> However, when someone joins up, I send them a username/pw for them to login
> with. What I'd like is in addition, to shoot them into the protected
> section so they don't have to login with these credentials (the first
> time). I tried to set these PHP variables, but I still am prompted. Is
> there some other trick or way to do this?
8< snip

Hey Daevid,
Redirect them to the page using: 
http://username:[EMAIL PROTECTED]/protected_section/
HTH!  HAND!
~Paul 

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


"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/a7EcDyXNIUN3+UQRAnr0AJ9LubzjwlqYpv/agFEaDlRGDGUqqACeN3Bw
yPJzxGXPY7BuXUTZShuRfa0=
=fr4z
-END PGP SIGNATURE-

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



[PHP] How can I populate or bypass the mod_auth_mysql prompt

2003-09-19 Thread Daevid Vincent
I am using mod_auth_mysql to protect some directories. All works great.
However, when someone joins up, I send them a username/pw for them to login
with. What I'd like is in addition, to shoot them into the protected section
so they don't have to login with these credentials (the first time). I tried
to set these PHP variables, but I still am prompted. Is there some other
trick or way to do this?

$_SERVER['PHP_AUTH_USER'] = $login;
$_SERVER['PHP_AUTH_PW'] = $password;

Daevid Vincent
http://daevid.com
 

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



Re: [PHP] fopen() || Execute read file as php page; not plain text

2003-09-19 Thread CF High
Re: "So you want to read from a file and write back to it? I don't
understand what you're trying to accomplish, execute a script and write the
result to file?"

Yes, the read file is a nested set of queries that populates a js pop up
menu, the site navigational structure.  That's why I need the read file to
be executed.

Got help from a PHP guru -- he suggested shell access

--Noah


"Andu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Fri, 19 Sep 2003 18:20:01 -0700
> "CF High" <[EMAIL PROTECTED]> wrote:
>
> > Because I need to write $include_path content to file; not display it in
the
> > browser...
>
> So you want to read from a file and write back to it? I don't understand
what
> you're trying to accomplish, execute a script and write the result to
file?
>
> >
> > --Noah
> >
> >
> > "Andu" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > On Fri, 19 Sep 2003 17:05:47 -0700
> > > "CF High" <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hm..
> > > >
> > > > Looks like I was deluding myself.  The only data returned by setting
a
> > var =
> > > > include $include_path, is 0 or 1.  I'm looking for a few hundred
lines
> > of
> > > > evaluated text.  Back to the drawing board.  Christ, this is a pain
in
> > > > the.
> > >
> > > Why do you need to set the $var, why not just include $include_path
> > when/where
> > > you need it in your script.
> > >
> > > >
> > > > --Noah
> > > >
> > > >
> > > > "Jay Blanchard" <[EMAIL PROTECTED]> wrote in
message
> > > > news:[EMAIL PROTECTED]
> > > > [snip]
> > > > was able to use an absolute reference on my local machine to execute
> > > > read
> > > > file contents; e.g. fopen('http://www.mysite.com/index.php', 'a'),
but
> > > > on
> > > > the host webserver no such luck.  Administrator said I can only use
> > > > relative
> > > > paths.  Problem is, when I use a relative path, I just get plain
text;
> > > > i.e.
> > > > the read file doesn't get executed as php.
> > > >
> > > > eval()'s not an option either, as the read file(s) has apostrophes,
> > > > quotes
> > > > top-to-bottom.
> > > >
> > > > Basically, I just need the file-to-be-read to have the queries
within it
> > > > run
> > > > as if it were run in the web browser.
> > > >
> > > > All clues appreciated as I'm at my wits end here -- can't find didly
on
> > > > this
> > > > subject on the net.
> > > > [/snip]
> > > >
> > > > Is the file PHP code? If so, why not include()?
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > > >
> > >
> > >
> > > 
> > > Regards, Andu Novac
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
>
> 
> Regards, Andu Novac

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



[PHP] Clear ALL Cookies previously set

2003-09-19 Thread Stevie D Peele
How can I clear all cookies that have been previously set?

I want this in an if statement so something like

if ($value == $blue){
clear all cookies;
setcookie("name",time()+3600);
}

Thanks

Re: [PHP] Reading URL is changed

2003-09-19 Thread Dan Anderson
First of all, you can use Javascript to submit a form when the link is
pressed.

Andu has a good idea too, but I figured I'd elaborate:

If you create a form like:

  
  
  


The browser visits the URL:

http://www.foo.com?foo=bar&bar=foo

This is called GET method in a form.  Do a google search.  

Note that you will have to URL encode all variables and data.  PHP
manual has a good section.

-Dan

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



Re: [PHP] Reading URL is changed

2003-09-19 Thread Dan J. Rychlik
That seems to work pretty good.  Thank you for this technique.

-Dan


- Original Message -
From: "Vail, Warren" <[EMAIL PROTECTED]>
To: "Dan J. Rychlik" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, September 19, 2003 7:32 PM
Subject: RE: [PHP] Reading URL is changed


> Not sure if this is what you are looking for, but have you tried;
>
> First Link
> Second Link
>
> and then in this.php
>
> $link = $_GET["L"];
>
> Warren Vail
>
>
> -Original Message-
> From: Dan J. Rychlik [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 19, 2003 5:11 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Reading URL is changed
>
>
> I am trying to figure out the best way to accomplish this task.  I have
one file that performs a certain amount of functions based on a user link
choice.  All the links point to the same document.  I know I need a control
structure that reads what link was read but Im not sure how to do this.
>
> for ex.
> First Link
> Second Link
>
> Im cant figure out how to read "First Link" in php so that I can execute
the needed function.  Has anyone accomplished this?
>
> Thanks so much in advance,
>
> -Dan
>
> --
> 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] Reading URL is changed

2003-09-19 Thread andu
On Fri, 19 Sep 2003 19:10:46 -0500
"Dan J. Rychlik" <[EMAIL PROTECTED]> wrote:

> I am trying to figure out the best way to accomplish this task.  I have one file
> that performs a certain amount of functions based on a user link choice.  All
> the links point to the same document.  I know I need a control structure that
> reads what link was read but Im not sure how to do this.  
> 
> for ex.
> First Link
> Second Link
> 
> Im cant figure out how to read "First Link" in php so that I can execute the
> needed function.  Has anyone accomplished this?
> 
> Thanks so much in advance,
> 
> -Dan

First Link
Second Link

... and then switch $_GET['action'].

Regards, Andu Novac

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



RE: [PHP] Reading URL is changed

2003-09-19 Thread Vail, Warren
Not sure if this is what you are looking for, but have you tried;

First Link
Second Link

and then in this.php

$link = $_GET["L"];

Warren Vail


-Original Message-
From: Dan J. Rychlik [mailto:[EMAIL PROTECTED]
Sent: Friday, September 19, 2003 5:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Reading URL is changed


I am trying to figure out the best way to accomplish this task.  I have one file that 
performs a certain amount of functions based on a user link choice.  All the links 
point to the same document.  I know I need a control structure that reads what link 
was read but Im not sure how to do this.  

for ex.
First Link
Second Link

Im cant figure out how to read "First Link" in php so that I can execute the needed 
function.  Has anyone accomplished this?

Thanks so much in advance,

-Dan

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



Re: [PHP] um...

2003-09-19 Thread Ryan A
Hey,
Never really liked Seinfeld, although he wrote a lot of the stuff he was the
only idiot in that serial, the others were always much funnier and has stand
up comendy stinks too...

As for the mean thing...dont you remember your school days??? let me remind
you...ALL GIRLS ARE MEAN.
 :-D

Cheers,
-Ryan

Of all the things I have lost in my life I miss my memory the most..I
think...

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


- Original Message - 
From: "Chris W. Parker" <[EMAIL PROTECTED]>
To: "Ryan A" <[EMAIL PROTECTED]>; "Raquel Rice"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, September 20, 2003 12:15 AM
Subject: RE: [PHP] um...


Ryan A 
on Friday, September 19, 2003 2:36 PM said:

> Hey comon nowwith a cute name like Raquel let the lady do
> whatever she wants

Raquel eh? Reminds me of Raquel Welch, and as I recall Seinfeld made it
pretty clear that Raquel Welch is very mean. I'd be cautious of anyone
named Raquel.



;)

-- 
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] Reading URL is changed

2003-09-19 Thread Dan J. Rychlik
I am trying to figure out the best way to accomplish this task.  I have one file that 
performs a certain amount of functions based on a user link choice.  All the links 
point to the same document.  I know I need a control structure that reads what link 
was read but Im not sure how to do this.  

for ex.
First Link
Second Link

Im cant figure out how to read "First Link" in php so that I can execute the needed 
function.  Has anyone accomplished this?

Thanks so much in advance,

-Dan

Re: [PHP] fopen() || Execute read file as php page; not plain text

2003-09-19 Thread andu
On Fri, 19 Sep 2003 18:20:01 -0700
"CF High" <[EMAIL PROTECTED]> wrote:

> Because I need to write $include_path content to file; not display it in the
> browser...

So you want to read from a file and write back to it? I don't understand what
you're trying to accomplish, execute a script and write the result to file?

> 
> --Noah
> 
> 
> "Andu" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > On Fri, 19 Sep 2003 17:05:47 -0700
> > "CF High" <[EMAIL PROTECTED]> wrote:
> >
> > > Hm..
> > >
> > > Looks like I was deluding myself.  The only data returned by setting a
> var =
> > > include $include_path, is 0 or 1.  I'm looking for a few hundred lines
> of
> > > evaluated text.  Back to the drawing board.  Christ, this is a pain in
> > > the.
> >
> > Why do you need to set the $var, why not just include $include_path
> when/where
> > you need it in your script.
> >
> > >
> > > --Noah
> > >
> > >
> > > "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > > [snip]
> > > was able to use an absolute reference on my local machine to execute
> > > read
> > > file contents; e.g. fopen('http://www.mysite.com/index.php', 'a'), but
> > > on
> > > the host webserver no such luck.  Administrator said I can only use
> > > relative
> > > paths.  Problem is, when I use a relative path, I just get plain text;
> > > i.e.
> > > the read file doesn't get executed as php.
> > >
> > > eval()'s not an option either, as the read file(s) has apostrophes,
> > > quotes
> > > top-to-bottom.
> > >
> > > Basically, I just need the file-to-be-read to have the queries within it
> > > run
> > > as if it were run in the web browser.
> > >
> > > All clues appreciated as I'm at my wits end here -- can't find didly on
> > > this
> > > subject on the net.
> > > [/snip]
> > >
> > > Is the file PHP code? If so, why not include()?
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
> >
> >
> > 
> > Regards, Andu Novac
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 



Regards, Andu Novac

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



Re: [PHP] PHP Apache (GLOBALS) question

2003-09-19 Thread John Nichel
Frank Tudor wrote:
Thanks for the response.

Ok with php.ini in the ect directory I get a 

Call to undefined function: mysql_connect() 

Without the php.ini file all my functions fail, because Mandrake
linux has all the latest and greatest apache php and mysql
stuff.  so during that build (which doesn't use the php.ini and
frankly I'm not sure where the php stuff is defined in apache),
because before the php.ini files ended up in the etc directory I
had to modify it from the php.ini-dist from the common lib
directory.  

does this help?

Frank
What's the value of "Configuration File (php.ini) Path" when you do a 
phpinfo() page?

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


Re: [PHP] um...

2003-09-19 Thread Raquel Rice
On Fri, 19 Sep 2003 15:15:21 -0700
"Chris W. Parker" <[EMAIL PROTECTED]> wrote:

> Ryan A 
> on Friday, September 19, 2003 2:36 PM said:
> 
> > Hey comon nowwith a cute name like Raquel let the lady do
> > whatever she wants
> 
> Raquel eh? Reminds me of Raquel Welch, and as I recall Seinfeld
> made it pretty clear that Raquel Welch is very mean. I'd be
> cautious of anyone named Raquel.
> 
> 
> 
> ;)
> 

This one is mean only when she needs to be.  *^)

--
Raquel

Being deeply loved by someone gives you strength, while loving
someone deeply gives you courage.
  --Lao Tzu



--
Raquel

Being deeply loved by someone gives you strength, while loving
someone deeply gives you courage.
  --Lao Tzu

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



Re: [PHP] fopen() || Execute read file as php page; not plain text

2003-09-19 Thread CF High
Could you explain what you mean by:

"Then you're not INCLUDEing it inline to the source"

--Noah

"Roger B.A. Klorese" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > Because I need to write $include_path content to file; not
> > display it in the
> > browser...
>
> Then you're not INCLUDEing it inline to the source, are you?

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



Re: [PHP] Need to convert seconds to DD:HH:MM:SS

2003-09-19 Thread Kevin Stone

"Jennifer Goodie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> >can't seem to figure
> > out how to get the number of days integrated in here for $hh that
> > are > 24.
> > to days:hours:minutes:seconds...  This function works for what it
> > does, can
> > someone embelish it to handle days too?
> >
> > function convertToHHMMSS($seconds)
> > {
> > $hoursPerDay = 24;
> > $SecondsPerHour = 3600;
> > $SecondsPerMinute = 60;
> > $MinutesPerHour= 60;
> >
> > $hh = intval($seconds / $SecondsPerHour);
> > $mm = intval($seconds / $SecondsPerMinute) % $MinutesPerHour;
> > $ss = $seconds % $SecondsPerMinute;
> >
> > return $hh."h:".$mm."m:".$ss."s";
> > }
>
> Not quite what you're looking for, but I'm sure you can figure out how to
> customize it
>
> function sec2time($sec){
(snip)
>

This is less code and is tested.

$seconds = 86397; // any starting value
$days = floor($seconds/86400);
$days_mod = $seconds%86400;
$hours = floor($days_mod/3600);
$hours_mod = $days_mod%3600;
$minutes = floor($hours_mod/60);
$minutes_mod = $hours_mod%60;
$seconds = floor($minutes_mod);

- Kevin

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



RE: [PHP] fopen() || Execute read file as php page; not plain text

2003-09-19 Thread Roger B.A. Klorese
> Because I need to write $include_path content to file; not 
> display it in the
> browser...

Then you're not INCLUDEing it inline to the source, are you?

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



Re: [PHP] um...

2003-09-19 Thread Curt Zirzow
* Thus wrote Raquel Rice ([EMAIL PROTECTED]):
> On Fri, 19 Sep 2003 21:07:50 +
> Curt Zirzow <[EMAIL PROTECTED]> wrote:
> 
> > * Thus wrote Raquel Rice ([EMAIL PROTECTED]):
> > > On Thu, 18 Sep 2003 15:37:38 -0400
> > > > > 
> > > > its because of the new PHP virus (PHP.virdrus) and opussoft's
> > > > anti virus 
> > > >program decided not to accept any mails that contains the
> > > >word php. 
> > > > aparently some one from that company subscribed to php lists
> > > > but is not aware of their mail server settings now. I tried to
> > > > mail the tech contact for opussoft.com (
> > > > [EMAIL PROTECTED] as listed in whois) but seems his
> > > > a/c is over quota.
> > > > 
> > > > so unless the person from opussoft is unsubscribed from the
> > > > list, we r going to get this mail each time we post to the
> > > > list.
> > > > 
> > > > R'twick
> > > > 
> > > 
> > > I just fixed my mail server to bounce their post back to them
> > > with a 550 error message telling them to fix their problem.
> > 
> > I'm not so sure that is the proper way to solve the issue.
> 
> That's a rather cryptic response.  Why is it not proper and what is
> your "more proper" solution?  

Yeah I suppose it was :)  There are a couple of reasons.

What they are doing is bad, no email server should autorespond like
that. autoresponders are bad

Now, if they decide to autorespond to your autorespond, you're
going to flood both your network and their network and infinatly
send a message back and forth.

If you don't want to see those messages I would suggest, then, to
have your server send the message to /dev/null.

Ok.. I take that back now.. a 550 should get terminated by the
sender. 

Forget all the above.. cept the first sentence.

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

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



Re: [PHP] fopen() || Execute read file as php page; not plain text

2003-09-19 Thread CF High
Because I need to write $include_path content to file; not display it in the
browser...

--Noah


"Andu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Fri, 19 Sep 2003 17:05:47 -0700
> "CF High" <[EMAIL PROTECTED]> wrote:
>
> > Hm..
> >
> > Looks like I was deluding myself.  The only data returned by setting a
var =
> > include $include_path, is 0 or 1.  I'm looking for a few hundred lines
of
> > evaluated text.  Back to the drawing board.  Christ, this is a pain in
> > the.
>
> Why do you need to set the $var, why not just include $include_path
when/where
> you need it in your script.
>
> >
> > --Noah
> >
> >
> > "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > [snip]
> > was able to use an absolute reference on my local machine to execute
> > read
> > file contents; e.g. fopen('http://www.mysite.com/index.php', 'a'), but
> > on
> > the host webserver no such luck.  Administrator said I can only use
> > relative
> > paths.  Problem is, when I use a relative path, I just get plain text;
> > i.e.
> > the read file doesn't get executed as php.
> >
> > eval()'s not an option either, as the read file(s) has apostrophes,
> > quotes
> > top-to-bottom.
> >
> > Basically, I just need the file-to-be-read to have the queries within it
> > run
> > as if it were run in the web browser.
> >
> > All clues appreciated as I'm at my wits end here -- can't find didly on
> > this
> > subject on the net.
> > [/snip]
> >
> > Is the file PHP code? If so, why not include()?
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
>
> 
> Regards, Andu Novac

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



RE: [PHP] um...

2003-09-19 Thread Chris W. Parker
Ryan A 
on Friday, September 19, 2003 2:36 PM said:

> Hey comon nowwith a cute name like Raquel let the lady do
> whatever she wants

Raquel eh? Reminds me of Raquel Welch, and as I recall Seinfeld made it
pretty clear that Raquel Welch is very mean. I'd be cautious of anyone
named Raquel.



;)

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



Re: [PHP] fopen() || Execute read file as php page; not plain text

2003-09-19 Thread andu
On Fri, 19 Sep 2003 17:05:47 -0700
"CF High" <[EMAIL PROTECTED]> wrote:

> Hm..
> 
> Looks like I was deluding myself.  The only data returned by setting a var =
> include $include_path, is 0 or 1.  I'm looking for a few hundred lines of
> evaluated text.  Back to the drawing board.  Christ, this is a pain in
> the.

Why do you need to set the $var, why not just include $include_path when/where
you need it in your script.

> 
> --Noah
> 
> 
> "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> [snip]
> was able to use an absolute reference on my local machine to execute
> read
> file contents; e.g. fopen('http://www.mysite.com/index.php', 'a'), but
> on
> the host webserver no such luck.  Administrator said I can only use
> relative
> paths.  Problem is, when I use a relative path, I just get plain text;
> i.e.
> the read file doesn't get executed as php.
> 
> eval()'s not an option either, as the read file(s) has apostrophes,
> quotes
> top-to-bottom.
> 
> Basically, I just need the file-to-be-read to have the queries within it
> run
> as if it were run in the web browser.
> 
> All clues appreciated as I'm at my wits end here -- can't find didly on
> this
> subject on the net.
> [/snip]
> 
> Is the file PHP code? If so, why not include()?
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 



Regards, Andu Novac

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



RE: [PHP] Need to convert seconds to DD:HH:MM:SS

2003-09-19 Thread Jennifer Goodie
>can't seem to figure
> out how to get the number of days integrated in here for $hh that
> are > 24.
> to days:hours:minutes:seconds...  This function works for what it
> does, can
> someone embelish it to handle days too?
>
> function convertToHHMMSS($seconds)
> {
>   $hoursPerDay= 24;
>   $SecondsPerHour = 3600;
>   $SecondsPerMinute   = 60;
>   $MinutesPerHour = 60;
>
>   $hh = intval($seconds / $SecondsPerHour);
>   $mm = intval($seconds / $SecondsPerMinute) % $MinutesPerHour;
>   $ss = $seconds % $SecondsPerMinute;
>
>   return $hh."h:".$mm."m:".$ss."s";
> }

Not quite what you're looking for, but I'm sure you can figure out how to
customize it

function sec2time($sec){
$returnstring = " ";
$days = intval($sec/86400);
$hours = intval ( ($sec/3600) - ($days*24));
$minutes = intval( ($sec - (($days*86400)+ ($hours*3600)))/60);
$seconds = $sec - ( ($days*86400)+($hours*3600)+($minutes * 60));

$returnstring .= ($days)?(($days == 1)? "1 day":"$days days"):"";
$returnstring .= ($days && $hours && !$minutes && !$seconds)?" and
":" ";
$returnstring .= ($hours)?( ($hours == 1)?"1 hour":"$hours
hours"):"";
$returnstring .= (($days || $hours) && ($minutes && !$seconds))?"
and ":" ";
$returnstring .= ($minutes)?( ($minutes == 1)?"1 minute":"$minutes
minutes"):"";
$returnstring .= (($days || $hours || $minutes) && $seconds)?" and
":" ";
$returnstring .= ($seconds)?( ($seconds == 1)?"1 second":"$seconds
seconds"):"";
return ($returnstring);
}

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



[PHP] Need to convert seconds to DD:HH:MM:SS

2003-09-19 Thread Daevid Vincent
So clearly I'm being stupid and this seemingly basic math is beyond my
abilities at the moment. I've tried various things, but can't seem to figure
out how to get the number of days integrated in here for $hh that are > 24.
I've googled for code fragments and can't find one. All seem to deal with
the Epoch and dates. I just want to take a number of seconds and convert it
to days:hours:minutes:seconds...  This function works for what it does, can
someone embelish it to handle days too?

function convertToHHMMSS($seconds)
{
$hoursPerDay= 24;
$SecondsPerHour = 3600;
$SecondsPerMinute   = 60;
$MinutesPerHour = 60;

$hh = intval($seconds / $SecondsPerHour);
$mm = intval($seconds / $SecondsPerMinute) % $MinutesPerHour;
$ss = $seconds % $SecondsPerMinute;

return $hh."h:".$mm."m:".$ss."s";
}

Daevid Vincent
http://daevid.com
 

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



Re: [PHP] forcing variable expansion

2003-09-19 Thread Eugene Lee
On Fri, Sep 19, 2003 at 03:50:40PM -0500, Jay Blanchard wrote:
: 
: Eugene Lee asked:
: >
: > If I have a block of text saved in an external text file, e.g.:
: > 
: > All {$badstuff} and no {$goodstuff} makes {$name} a dull
: > {$type}.
: > 
: > after reading the text into a string, is there a way to force variable
: > expansion?  In a sense, it's like having a heredoc for multiline strings
: > with variable expansion while not having the heredoc embedded in PHP
: > code.
: 
: http://us3.php.net/eval maybe?

This will work, thanks!

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



Re: [PHP] um...

2003-09-19 Thread Ryan A



Hey comon nowwith a cute name like Raquel let the lady do whatever she
wants

;-D

Cheers,
Ryan.

/* If we are here to help others...what th @#$% are the others here for???
*/





> > > > >
> > > > its because of the new PHP virus (PHP.virdrus) and opussoft's
> > > > anti virus
> > > >program decided not to accept any mails that contains the
> > > >word php.
> > > > aparently some one from that company subscribed to php lists
> > > > but is not aware of their mail server settings now. I tried to
> > > > mail the tech contact for opussoft.com (
> > > > [EMAIL PROTECTED] as listed in whois) but seems his
> > > > a/c is over quota.
> > > >
> > > > so unless the person from opussoft is unsubscribed from the
> > > > list, we r going to get this mail each time we post to the
> > > > list.
> > > >
> > > > R'twick
> > > >
> > >
> > > I just fixed my mail server to bounce their post back to them
> > > with a 550 error message telling them to fix their problem.
> >
> > I'm not so sure that is the proper way to solve the issue.
> >
> > Curt
> > -- 
>
> That's a rather cryptic response.  Why is it not proper and what is
> your "more proper" solution?
>
> --
> Raquel
> 
> Being deeply loved by someone gives you strength, while loving
> someone deeply gives you courage.
>   --Lao Tzu
>
> -- 
> 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: ming problem

2003-09-19 Thread Shmuel

> My bad. I should have spotted this...you have 
> $flash = new SWFMovie;
> it should be
> $flash = new SWFMovie();

No, it's no that. It doesn't work. comlains the same:
the missing of the class:
Fatal error: Cannot instantiate non-existent class: swfmovie in
C:\Apache\test\flash\index.php on line 3

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



RE: [PHP] Re: ming problem

2003-09-19 Thread Jay Blanchard
[snip]
> where is the require line to include the class definition?
> require("/the/path/to/the/namespace/holding/the/class/definition.foo");

Not following. I don't understand what class defínition I need.
I'm using windows php extension. I'm using a class that is in the dll ?
[/snip]

My bad. I should have spotted this...you have 

$flash = new SWFMovie;

it should be

$flash = new SWFMovie();

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



Re: [PHP] um...

2003-09-19 Thread Raquel Rice
On Fri, 19 Sep 2003 21:07:50 +
Curt Zirzow <[EMAIL PROTECTED]> wrote:

> * Thus wrote Raquel Rice ([EMAIL PROTECTED]):
> > On Thu, 18 Sep 2003 15:37:38 -0400
> > > > 
> > > its because of the new PHP virus (PHP.virdrus) and opussoft's
> > > anti virus 
> > >program decided not to accept any mails that contains the
> > >word php. 
> > > aparently some one from that company subscribed to php lists
> > > but is not aware of their mail server settings now. I tried to
> > > mail the tech contact for opussoft.com (
> > > [EMAIL PROTECTED] as listed in whois) but seems his
> > > a/c is over quota.
> > > 
> > > so unless the person from opussoft is unsubscribed from the
> > > list, we r going to get this mail each time we post to the
> > > list.
> > > 
> > > R'twick
> > > 
> > 
> > I just fixed my mail server to bounce their post back to them
> > with a 550 error message telling them to fix their problem.
> 
> I'm not so sure that is the proper way to solve the issue.
> 
> Curt
> -- 

That's a rather cryptic response.  Why is it not proper and what is
your "more proper" solution?  

--
Raquel

Being deeply loved by someone gives you strength, while loving
someone deeply gives you courage.
  --Lao Tzu

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



RE: [PHP] popups, parents, parameters, and php

2003-09-19 Thread Jay Blanchard
[snip]
> Have a pleasant and educational weekend!

I'm leaning more towards pleasant.

cheers.
[/snip]

Cheers to you as well, I am departing for the neighborhood watering hole
momentarily, and I will lift a pint of Black & Tan to you all!

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



Re: [PHP] Re: ming problem

2003-09-19 Thread Shmuel

> where is the require line to include the class definition?
> require("/the/path/to/the/namespace/holding/the/class/definition.foo");

Not following. I don't understand what class defínition I need.
I'm using windows php extension. I'm using a class that is in the dll ?

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



Re: [PHP] fopen() || Execute read file as php page; not plain text

2003-09-19 Thread CF High
Hm..

Looks like I was deluding myself.  The only data returned by setting a var =
include $include_path, is 0 or 1.  I'm looking for a few hundred lines of
evaluated text.  Back to the drawing board.  Christ, this is a pain in
the.

--Noah


"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
was able to use an absolute reference on my local machine to execute
read
file contents; e.g. fopen('http://www.mysite.com/index.php', 'a'), but
on
the host webserver no such luck.  Administrator said I can only use
relative
paths.  Problem is, when I use a relative path, I just get plain text;
i.e.
the read file doesn't get executed as php.

eval()'s not an option either, as the read file(s) has apostrophes,
quotes
top-to-bottom.

Basically, I just need the file-to-be-read to have the queries within it
run
as if it were run in the web browser.

All clues appreciated as I'm at my wits end here -- can't find didly on
this
subject on the net.
[/snip]

Is the file PHP code? If so, why not include()?


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



Re: [PHP] popups, parents, parameters, and php

2003-09-19 Thread Curt Zirzow
* Thus wrote Jay Blanchard ([EMAIL PROTECTED]):
> [snip]
> Those are the requirements. Should be easy, but I am finding it very
> difficult to tie the pieces together.
> 
> Any advice or url of a relevant tutorial would be greatly appreciated.
> Thanks,
> [/snip]
> 
> phpmyadmin (http://www.phpmyadmin.php) does an admirable job of tying
> the pieces together. Have a look at their source, especially where their
> latest version is concerned (there is a Query Window that exists in a
> pop-up that passes info to one of the frames on the main, Very Cool TM).

It doesn't work so well in opera though :(

> 
> Have a pleasant and educational weekend!

I'm leaning more towards pleasant.


cheers.

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

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



RE: [PHP] Re: ming problem

2003-09-19 Thread Jay Blanchard
[snip]

$flash = new SWFMovie;

[/snip]

where is the require line to include the class definition?

require("/the/path/to/the/namespace/holding/the/class/definition.foo");

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



Re: [PHP] um...

2003-09-19 Thread Curt Zirzow
* Thus wrote Raquel Rice ([EMAIL PROTECTED]):
> On Thu, 18 Sep 2003 15:37:38 -0400
> "R'twick Niceorgaw" <[EMAIL PROTECTED]>
> wrote:
> 
> > Comex said the following on 9/19/2003 3:33 PM>>
> > 
> > > <[EMAIL PROTECTED]>
> > > [EMAIL PROTECTED]:
> > > 
> > >>Please contact your system administrator.
> > >>
> > >>
> > >>The scanned document was deleted.
> > >>
> > >>
> > >>Violation Information:
> > >>The subject violated the content filtering rule PHP as subject
> > >is a>
> > >>>malacious code - Not Allowed.  No attempt was made to repair.
> > > 
> > > umm... since it doesn't come from [EMAIL PROTECTED], spells
> > > things wrong, and raises issues over the subject "Re: [PHP-WIN]
> > > generate img with fonts...", I think it's fake... let me know if
> > > I'm wrong.
> > > 
> > its because of the new PHP virus (PHP.virdrus) and opussoft's anti
> > virus 
> >program decided not to accept any mails that contains the word
> >php. 
> > aparently some one from that company subscribed to php lists but
> > is not aware of their mail server settings now. I tried to mail
> > the tech contact for opussoft.com ( [EMAIL PROTECTED] as
> > listed in whois) but seems his a/c is over quota.
> > 
> > so unless the person from opussoft is unsubscribed from the list,
> > we r going to get this mail each time we post to the list.
> > 
> > R'twick
> > 
> 
> I just fixed my mail server to bounce their post back to them with a
> 550 error message telling them to fix their problem.

I'm not so sure that is the proper way to solve the issue.

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

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



[PHP] Re: ming problem

2003-09-19 Thread Shmuel
this is the code:

$flash = new SWFMovie;



also tried something like this:

$f = new SWFFont("fonts/Verdana.fdb");

$t = new SWFText();

$t->setFont($f);

$t->moveTo(200, 2400);

$t->setColor(0xff, 0xff, 0);

$t->setHeight(1200);

$t->addString("PHP generates Flash with Ming!!");

$m = new SWFMovie();

$m->setDimension(5400, 3600);

$m->add($t);

header('Content-type: application/x-shockwave-flash');

$m->output();

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



[PHP] ming problem

2003-09-19 Thread Shmuel
I'm trying to use ming and I get the following:

Fatal error: Cannot instantiate non-existent class: swfmovie in
C:\Apache\test\flash\index.php on line 3

I'm using w2k and php 4 - latest from snaps.php.net
and I have uncommented the extension, etc.

Any help would be appreciated.

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



[PHP] A test for a Yahoo autoresponder...

2003-09-19 Thread Jay Blanchard
Now I am getting a Yahoo autoresponder

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



RE: [PHP] forcing variable expansion

2003-09-19 Thread Jay Blanchard
[snip]
If I have a block of text saved in an external text file, e.g.:

All {$badstuff} and no {$goodstuff} makes {$name} a dull
{$type}.

after reading the text into a string, is there a way to force variable
expansion?  In a sense, it's like having a heredoc for multiline strings
with variable expansion while not having the heredoc embedded in PHP
code.
[/snip]

http://us3.php.net/eval maybe?

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



Re: [PHP] um...

2003-09-19 Thread Raquel Rice
On Thu, 18 Sep 2003 15:37:38 -0400
"R'twick Niceorgaw" <[EMAIL PROTECTED]>
wrote:

> Comex said the following on 9/19/2003 3:33 PM>>
> 
> > <[EMAIL PROTECTED]>
> > [EMAIL PROTECTED]:
> > 
> >>Please contact your system administrator.
> >>
> >>
> >>The scanned document was deleted.
> >>
> >>
> >>Violation Information:
> >>The subject violated the content filtering rule PHP as subject
> >is a>
> >>>malacious code - Not Allowed.  No attempt was made to repair.
> > 
> > umm... since it doesn't come from [EMAIL PROTECTED], spells
> > things wrong, and raises issues over the subject "Re: [PHP-WIN]
> > generate img with fonts...", I think it's fake... let me know if
> > I'm wrong.
> > 
> its because of the new PHP virus (PHP.virdrus) and opussoft's anti
> virus 
>program decided not to accept any mails that contains the word
>php. 
> aparently some one from that company subscribed to php lists but
> is not aware of their mail server settings now. I tried to mail
> the tech contact for opussoft.com ( [EMAIL PROTECTED] as
> listed in whois) but seems his a/c is over quota.
> 
> so unless the person from opussoft is unsubscribed from the list,
> we r going to get this mail each time we post to the list.
> 
> R'twick
> 

I just fixed my mail server to bounce their post back to them with a
550 error message telling them to fix their problem.

--
Raquel

Being deeply loved by someone gives you strength, while loving
someone deeply gives you courage.
  --Lao Tzu

--
Raquel

Being deeply loved by someone gives you strength, while loving
someone deeply gives you courage.
  --Lao Tzu

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



[PHP] forcing variable expansion

2003-09-19 Thread Eugene Lee
If I have a block of text saved in an external text file, e.g.:

All {$badstuff} and no {$goodstuff} makes {$name} a dull {$type}.

after reading the text into a string, is there a way to force variable
expansion?  In a sense, it's like having a heredoc for multiline strings
with variable expansion while not having the heredoc embedded in PHP code.

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



Re: [PHP] fopen() || Execute read file as php page; not plain text

2003-09-19 Thread CF High
Hey Jay.

Yes, the file is php code.

Um, why not use include()?  I'm ashamed, and very pleased, to admit that
I had no idea I could set a var = to an include file!

Well, one learns something new each day, often with much head banging ;--)

Thanks for clueing me in.

--Noah


"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
was able to use an absolute reference on my local machine to execute
read
file contents; e.g. fopen('http://www.mysite.com/index.php', 'a'), but
on
the host webserver no such luck.  Administrator said I can only use
relative
paths.  Problem is, when I use a relative path, I just get plain text;
i.e.
the read file doesn't get executed as php.

eval()'s not an option either, as the read file(s) has apostrophes,
quotes
top-to-bottom.

Basically, I just need the file-to-be-read to have the queries within it
run
as if it were run in the web browser.

All clues appreciated as I'm at my wits end here -- can't find didly on
this
subject on the net.
[/snip]

Is the file PHP code? If so, why not include()?

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



RE: [PHP] fopen() || Execute read file as php page; not plain text

2003-09-19 Thread Jay Blanchard
[snip]
was able to use an absolute reference on my local machine to execute
read
file contents; e.g. fopen('http://www.mysite.com/index.php', 'a'), but
on
the host webserver no such luck.  Administrator said I can only use
relative
paths.  Problem is, when I use a relative path, I just get plain text;
i.e.
the read file doesn't get executed as php.

eval()'s not an option either, as the read file(s) has apostrophes,
quotes
top-to-bottom.

Basically, I just need the file-to-be-read to have the queries within it
run
as if it were run in the web browser.

All clues appreciated as I'm at my wits end here -- can't find didly on
this
subject on the net.
[/snip]

Is the file PHP code? If so, why not include()?

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



Re: [PHP] Re: Header won't redirect

2003-09-19 Thread Curt Zirzow
* Thus wrote Jonathan Duncan ([EMAIL PROTECTED]):
> Jay,
> 
> Try replying to the group so that your contributions stay with the thread
> instead of being orphaned and lost.

he did.

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

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



[PHP] fopen() || Execute read file as php page; not plain text

2003-09-19 Thread CF High
Any ideas here?

was able to use an absolute reference on my local machine to execute read
file contents; e.g. fopen('http://www.mysite.com/index.php', 'a'), but on
the host webserver no such luck.  Administrator said I can only use relative
paths.  Problem is, when I use a relative path, I just get plain text; i.e.
the read file doesn't get executed as php.

eval()'s not an option either, as the read file(s) has apostrophes, quotes
top-to-bottom.

Basically, I just need the file-to-be-read to have the queries within it run
as if it were run in the web browser.

All clues appreciated as I'm at my wits end here -- can't find didly on this
subject on the net.

--Noah

--

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



[PHP] Re: popups, parents, parameters, and php

2003-09-19 Thread Rich Fox
my colleague just suggested that my popup, on the form submit, can call
another page which just registers the items selected as session variables.
This seems like a good idea. Of course, I will have to reload the original
calling page, edit.php, so it can check those session varibles and amend the
select1 list. I am going to try this, but I would still greatly appreciate
any advice. Thanks, Rich

"Rich Fox" <[EMAIL PROTECTED]>

> I have been asking specific questions, and getting helpful answers, but I
> realized I am getting ahead of myself and thinking about the trees when I
> don't see the forest yet. I would like to describe what it is I want to do
> in general, and then hopefully you can point me in the right direction so
I
> use html, php, and javascript together in some kind of reasonable way. I
> feel like I am re-inventing the wheel, and badly. What I want to do must
> have been done a zillion times by other web programmers already.
>
> I have a php page (edit.php) with a form with some text fields and a
select
> menu (select1). I want users to be able to add entries to the select1
menu,
> and would like to use a popup window to do this. In the popup window, the
> user is presented with a form with a select menu of all possible entries.
> The user can make multiple selections from this list in the popup, and
when
> the popup's form is submitted, I want the select1 menu in edit.php to
> reflect these additional entries selected from the popup.
>
> Those are the requirements. Should be easy, but I am finding it very
> difficult to tie the pieces together.
>
> Any advice or url of a relevant tutorial would be greatly appreciated.
> Thanks,
>
> Rich

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



RE: [PHP] popups, parents, parameters, and php

2003-09-19 Thread Jay Blanchard
[snip]
Those are the requirements. Should be easy, but I am finding it very
difficult to tie the pieces together.

Any advice or url of a relevant tutorial would be greatly appreciated.
Thanks,
[/snip]

phpmyadmin (http://www.phpmyadmin.php) does an admirable job of tying
the pieces together. Have a look at their source, especially where their
latest version is concerned (there is a Query Window that exists in a
pop-up that passes info to one of the frames on the main, Very Cool TM).

Have a pleasant and educational weekend!

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



Re: [PHP] Returns..

2003-09-19 Thread Comex
<[EMAIL PROTECTED]>
Marek Kilimajer:
> The space is there so it does not break some old browsers which could
> thing it is "BR/" tag (yes, it does not exists). Change your logic or
>   do preg_replace(array("\r\n","\n","\r"), '', $string) instead -
> not
> tested
Why not use str_replace instead of preg_replace?

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



[PHP] popups, parents, parameters, and php

2003-09-19 Thread Rich Fox
I have been asking specific questions, and getting helpful answers, but I
realized I am getting ahead of myself and thinking about the trees when I
don't see the forest yet. I would like to describe what it is I want to do
in general, and then hopefully you can point me in the right direction so I
use html, php, and javascript together in some kind of reasonable way. I
feel like I am re-inventing the wheel, and badly. What I want to do must
have been done a zillion times by other web programmers already.

I have a php page (edit.php) with a form with some text fields and a select
menu (select1). I want users to be able to add entries to the select1 menu,
and would like to use a popup window to do this. In the popup window, the
user is presented with a form with a select menu of all possible entries.
The user can make multiple selections from this list in the popup, and when
the popup's form is submitted, I want the select1 menu in edit.php to
reflect these additional entries selected from the popup.

Those are the requirements. Should be easy, but I am finding it very
difficult to tie the pieces together.

Any advice or url of a relevant tutorial would be greatly appreciated.
Thanks,

Rich

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



Re: [PHP] um...

2003-09-19 Thread Comex
<[EMAIL PROTECTED]>
R'Twick Niceorgaw:
because of the new PHP virus (PHP.virdrus) and opussoft's anti
>virus program decided not to accept any mails that contains the
> word php.
$result = str_ireplace("PHP","P*HP",$mail);
-- 
begin  theend

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



Re: [PHP] um...

2003-09-19 Thread R'twick Niceorgaw
Comex said the following on 9/19/2003 3:33 PM>>

<[EMAIL PROTECTED]>
[EMAIL PROTECTED]:
Please contact your system administrator.

The scanned document was deleted.

Violation Information:
The subject violated the content filtering rule PHP as subject is a
malacious code - Not Allowed.  No attempt was made to repair.
umm... since it doesn't come from [EMAIL PROTECTED], spells things wrong, and
raises issues over the subject "Re: [PHP-WIN] generate img with fonts...", I
think it's fake... let me know if I'm wrong.
its because of the new PHP virus (PHP.virdrus) and opussoft's anti virus 
  program decided not to accept any mails that contains the word php. 
aparently some one from that company subscribed to php lists but is not 
aware of their mail server settings now. I tried to mail the tech 
contact for opussoft.com ( [EMAIL PROTECTED] as listed in 
whois) but seems his a/c is over quota.

so unless the person from opussoft is unsubscribed from the list, we r 
going to get this mail each time we post to the list.

R'twick

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


[PHP] Re: um...

2003-09-19 Thread Comex

> Guess what, I got another one.  From posting this.


Never mind, I see another thread. sorry

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



[PHP] Re: um...

2003-09-19 Thread Comex
<[EMAIL PROTECTED]>
Comex:
> <[EMAIL PROTECTED]>
> [EMAIL PROTECTED]:
>> Please contact your system administrator.
>>
>>
>> The scanned document was deleted.
>>
>>
>> Violation Information:
>> The subject violated the content filtering rule PHP as subject is a
>>> malacious code - Not Allowed.  No attempt was made to repair.
> umm... since it doesn't come from [EMAIL PROTECTED], spells things
> wrong, and raises issues over the subject "Re: [PHP-WIN] generate img
> with fonts...", I think it's fake... let me know if I'm wrong.

Guess what, I got another one.  From posting this.

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



[PHP] um...

2003-09-19 Thread Comex
<[EMAIL PROTECTED]>
[EMAIL PROTECTED]:
> Please contact your system administrator.
>
>
> The scanned document was deleted.
>
>
> Violation Information:
> The subject violated the content filtering rule PHP as subject is a
>> malacious code - Not Allowed.  No attempt was made to repair.
umm... since it doesn't come from [EMAIL PROTECTED], spells things wrong, and
raises issues over the subject "Re: [PHP-WIN] generate img with fonts...", I
think it's fake... let me know if I'm wrong.

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



Re: [PHP] Web server file perms || More than I can chew.....

2003-09-19 Thread CF High
Thanks for the informative post, Lowell & Marek.

Our host suggested chmod-ing necessary directories via ftp.  Completely
defeats the purpose of my app which is supposed to allow the client to
maintain the site themselves; not have me mess around with directory/file
perms -- ugggh

In any case, I'm more than a little frustrated that the app works like a
dream locally; now, I have to hack around to get it working live.  I'm not a
huge fan of the latest version of php now either.  I was able to open
external files (e.g. http://somesite.com/index.php) with fopen(); no such
luck in this realease.  Getting a freaking "php_hostconnect: connect failed"
error message now.

My mood is down the tubes at present -- waiting for some divine inspiration
as my efforts to slog it out have me stewing..

--Noah


"Lowell Allen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > On my local machine (win2k pro, apache), no problems -- everything works
> > just as designed.
> >
> > Today I began testing on the live server; i.e. my client's hosting
company
> > (linux, apache 1.3.27, php 4.3.1)  -- that's when the trouble started.
> >
> > The site builder app builds static pages based on changes made by users
in
> > our online administration center.  When I test out creating a new site
> > section; i.e. triggering my make_file function(writes page content to
new
> > file) I receive the following error:
> >
> > Warning: fopen(/local_server_path/file_to_create.php) [function.fopen]:
> > failed to create stream: Permission denied
> >
> > I've attempted to chmod(777) my testing directory via ftp client, which
> > appears to work; however, when I fileperms($file_in_test_dir), I get
> > chmod(644), so clearly I'm not the owner.
> >
> > Pardon my ignorance here, but I as yet know little about dir/file perms.
> > Should I contact the host and have them give me sufficient permissions?
>
> If you create a subdirectory of the root level public HTML directory, then
> PHP can create files there, but not in the root level directory. If you
> change permissions to 777, PHP can create files there, but it's not a good
> idea to have the permissions that wide-open.
>
> You might be able to get your commercial host to change who PHP is running
> as from "nobody" to your login identity, then PHP could write to the root
> level directory, but you might not be able to -- my main host says they're
> changing policy for security reasons to not allow that.
>
> You could put the static files in a subdirectory where PHP will have
> permission to create files. But this might require lots of reworking links
> depending on your site design, and thus not be a viable option.
>
> You could set up a PHP script to be executed by a crontab as a CGI. Done
> this way, PHP can write to the root level directory. This is what I did
> recently for a similar problem. The content management system provides a
> link for updating static HTML pages. That link (script) writes info to the
> database, flagging an update request. Every 5 minutes, a crontab calls the
> PHP CGI script that actually does the update. The script checks the
database
> flag and does the updates if they've been requested (flagged).
>
> Bottom line -- discuss the problem with your commercial host and see what
> they suggest.
>
> --
> Lowell Allen

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



Re: [PHP] Session and Server variable problem

2003-09-19 Thread CPT John W. Holmes
From: "Stephen Schneider" <[EMAIL PROTECTED]>

> Have an interesting problem.  Worked on a web site for a client.  They
> have the server (IIS) set up and we are using php.  Have been working
> with their domain with a .net extension.  To go live, they repointed
> their .com domain to the web folder.  Same spot the .net points to.  But
> now server and session variables aren't working.  They still work if we
> use .net but not .com.  Can't set or read them.  Anyone run into this
> before?

Sessions, by default, rely on cookies to propogate the session ID. You are
somehow setting the "domain" of the cookie to the .net address, more than
likely.

There are a multitude of ways you can do it, though. Check your
session.cookie_domain in php.ini. Check if it's being set with
session_set_cookie_params() or ini_set() or if the cookie is being created
manually with setcookie().

---John Holmes...

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



Re: [PHP] Opening new browser window

2003-09-19 Thread Brent Baisley
Why use a javascript to create a new window? Any link can be directed 
to a new window with a simple target=.



"Industry" would be the reference name of the window. For instance, if 
you wanted to refer to it from another window.

PHP is server side, all it does is serve up a resulting page to a 
client. The client has no idea that PHP is being used, nor does it 
care. To answer your question you can't do it in PHP, but you can do it 
using HTTP, HTML and/or Javascript.

On Friday, September 19, 2003, at 02:13 PM, Rich Fox wrote:

And if you are not in a form? My current code is:


   
 
where popup is my javascript function. But as I said below, the popup
doesn't work as expected and I do not want to use javascript. I can 
also not
be in a form. Suggestions?

Rich

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Opening new browser window

2003-09-19 Thread R'twick Niceorgaw
Rich Fox said the following on 9/19/2003 12:33 PM>>
I would like to open a new browser window from within my php script
(edit.php), a window in which another php page is run (search.php).
search.php should be able to receive $_POST vars etc. from edit.php. I am
not sure that the javascript solution to popup a window is correct, because
then the popup does not behave normally.
By normally, I mean that when I use javascript to popup a new window
(search.php), and in search.php I have a form

 
window is a javascript object and so you should be calling some 
javascript function to set the value here, something like



document.form.caller.value=window.opener.location.href;

  >
  >
 
 

clicking OK or Cancel does absolutely nothing. So, I would like to avoid
javascript and simply open a new browser window to run search.php. What is
the accepted way to do this in php?
btnOK and btnCancel are not instructed to do anything when clicked and 
so there's nothing wrong they are doing! what work these two buttons are 
supposed to do?
I assume
1. btnOK is to post the data to server?
in that case, you should have it as button=submit or
an onClick="javascript function()"?

2. btnCancel is to close the window and go back to the parent page?
in that case also, you should have a onClick function.
HTH
R'twick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Session and Server variable problem

2003-09-19 Thread Stephen Schneider
Hi all,

Have an interesting problem.  Worked on a web site for a client.  They
have the server (IIS) set up and we are using php.  Have been working
with their domain with a .net extension.  To go live, they repointed
their .com domain to the web folder.  Same spot the .net points to.  But
now server and session variables aren't working.  They still work if we
use .net but not .com.  Can't set or read them.  Anyone run into this
before?

Thanks for any thoughts and assistance.

Stephen
 
__
Mind Architecture
[EMAIL PROTECTED]
www.mindarch.com
330-329-8748  phone
mindarchAOL IM

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



Re: [PHP] Opening new browser window

2003-09-19 Thread Rich Fox
And if you are not in a form? My current code is:


   
 

where popup is my javascript function. But as I said below, the popup
doesn't work as expected and I do not want to use javascript. I can also not
be in a form. Suggestions?

Rich

"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message

> 
>
>
> Rich Fox wrote:
>
> > I would like to open a new browser window from within my php script
> > (edit.php), a window in which another php page is run (search.php).
> > search.php should be able to receive $_POST vars etc. from edit.php. I
am
> > not sure that the javascript solution to popup a window is correct,
because
> > then the popup does not behave normally.
> >
> > By normally, I mean that when I use javascript to popup a new window
> > (search.php), and in search.php I have a form
> >
> > 
> >  
> >   >
> >   >
> >  
> >  
> > 
> >
> > clicking OK or Cancel does absolutely nothing. So, I would like to avoid
> > javascript and simply open a new browser window to run search.php. What
is
> > the accepted way to do this in php?
> >
> > tia,
> >
> > Rich
> >

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



[PHP] Re: [PHP-WIN] Re: [PHP] PHP Apache (GLOBALS) question

2003-09-19 Thread Frank Tudor
Also,

On the phpinfo.php

MYSQL_SOCKET /var/lib/mysql/mysql.sock 
MYSQL_INCLUDE -I/usr/include/mysql 
MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient 

ARE MISSING.  

When I run a phpinfo.php page I get all my config info

with my php.ini file put in the etc dir i get no mention of the
above mysql information

with the php.ini file removed or renamed and then running a
phpinfo page I get

MYSQL information in my config file.

So what can I do because the php.ini file just shows config info
I don't think I can modify it to see mysql can I?  doesn't that
have to reply on the rpm install?  or when the php libary was
built?

Frank

--- Frank Tudor <[EMAIL PROTECTED]> wrote:
> Thanks for the response.
> 
> Ok with php.ini in the ect directory I get a 
> 
> Call to undefined function: mysql_connect() 
> 
> Without the php.ini file all my functions fail, because
> Mandrake
> linux has all the latest and greatest apache php and mysql
> stuff.  so during that build (which doesn't use the php.ini
> and
> frankly I'm not sure where the php stuff is defined in
> apache),
> because before the php.ini files ended up in the etc directory
> I
> had to modify it from the php.ini-dist from the common lib
> directory.  
> 
> does this help?
> 
> Frank 
> --- John Nichel <[EMAIL PROTECTED]> wrote:
> > Frank Tudor wrote:
> > > Yes to the php-mysql rpm,
> > > 
> > > But listen I think it was the way it built the initial
> > appach
> > > php mysql configurations  I don't think the php.ini
> refects
> > an
> > > accurate setup of my php mysql setup.
> > > 
> > > Frank
> > 
> > Let's get away from the php.ini for a moment.  Being that
> you
> > did 
> > everything from RPM, the ini file doesn't come into play
> here
> > (you 
> > basically have a default setup, with default settings).  The
> > stock 
> > php.ini file will do just fine.
> > 
> > What is the output of this code on your box.
> > 
> > if ([EMAIL PROTECTED]("your_host", "your_username",
> > "your_password")){
> > echo ( mysql_error() );
> > } else {
> > echo ( "Connection exists" );
> > }
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design
> software
> http://sitebuilder.yahoo.com
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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

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



RE: [PHP] Attention: List Administrator

2003-09-19 Thread Jennifer Goodie
> And I get this:
> 
> [snip]
> Violation Information:
> The subject violated the content filtering rule PHP as subject is a
> malacious code - Not Allowed.  No attempt was made to repair.
> [/snip]
> 
> How can PHP be a code so powerfull it is not even allowed in the 
> subject? I thought PHP was a drug.
> 

Apparently there is a virus written in PHP
http://securityresponse.symantec.com/avcenter/venc/data/php.virdrus.html

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



Re: [PHP] PHP Apache (GLOBALS) question

2003-09-19 Thread Frank Tudor
Thanks for the response.

Ok with php.ini in the ect directory I get a 

Call to undefined function: mysql_connect() 

Without the php.ini file all my functions fail, because Mandrake
linux has all the latest and greatest apache php and mysql
stuff.  so during that build (which doesn't use the php.ini and
frankly I'm not sure where the php stuff is defined in apache),
because before the php.ini files ended up in the etc directory I
had to modify it from the php.ini-dist from the common lib
directory.  

does this help?

Frank 
--- John Nichel <[EMAIL PROTECTED]> wrote:
> Frank Tudor wrote:
> > Yes to the php-mysql rpm,
> > 
> > But listen I think it was the way it built the initial
> appach
> > php mysql configurations  I don't think the php.ini refects
> an
> > accurate setup of my php mysql setup.
> > 
> > Frank
> 
> Let's get away from the php.ini for a moment.  Being that you
> did 
> everything from RPM, the ini file doesn't come into play here
> (you 
> basically have a default setup, with default settings).  The
> stock 
> php.ini file will do just fine.
> 
> What is the output of this code on your box.
> 
> if ([EMAIL PROTECTED]("your_host", "your_username",
> "your_password")){
>   echo ( mysql_error() );
> } else {
>   echo ( "Connection exists" );
> }
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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

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



Re: [PHP] config file

2003-09-19 Thread CPT John W. Holmes
From: "Payne" <[EMAIL PROTECTED]>
> I have a project that I need to write and in the past I would hard code
> a lot of information in pages that I should have put into a config file.
> I am wanting to know if there a website that example how to write a
> config file and how to the php call them.

You can use a php.ini-style config file and quickly and easily parse it with
parse_ini_file().

Only security issue to watch for is storing the file in your webroot and
someone being able to call it up and view it plain text. Config files should
not be in the web root. If you HAVE to store it there for some reason, deny
access to it through an .htaccess file, or give it a .php extension and put
a line it it like:

; 

Notice the semi-colon at the end which will make this a commented out line
for parse_ini_file() purposes. However, when parsed by PHP directly (called
through a browser), PHP will hit the exit; call and terminate the execution
of the file and no other lines will be shown.

Someone else mentioned include(), which would mean you'd have a normal PHP
file that defines variables and just include it. This is useful if a PHP
coder is doing the maintaining, but if someone else is changing things, you
have to ensure they don't mess up the PHP code. Using a php.ini-style file
is easier for others as it's less strict on the syntax.

Hope this helps.

---John Holmes...

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



Re: [PHP] Re: Header won't redirect

2003-09-19 Thread Scott Fletcher
But Jay Blanchard situation wasn't the only one.  It's the same for other
people.

"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Well, I'm using Outlook Express and it looked fine for an hour or so now.
> But not with the ones earlier in the morning.  Strange though!
>
> Scott F.
>
> "Jonathan Duncan" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Perhaps it is just Outlook Express but many of your replies are showing
as
> > ophans.
> >
> > Jonathan
> >
> >
> > "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > [snip]
> > Try replying to the group so that your contributions stay with the
> > thread
> > instead of being orphaned and lost.
> > [/snip]
> >
> > I always do, did something weird happen?

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



Re: [PHP] Web server file perms || More than I can chew.....

2003-09-19 Thread Marek Kilimajer
You can use ftp functions to create the files, so permissions won't be 
problem anymore.

CF High wrote:

Hey all.

Got a problem with a site builder app I've spent three months developing.

On my local machine (win2k pro, apache), no problems -- everything works
just as designed.
Today I began testing on the live server; i.e. my client's hosting company
(linux, apache 1.3.27, php 4.3.1)  -- that's when the trouble started.
The site builder app builds static pages based on changes made by users in
our online administration center.  When I test out creating a new site
section; i.e. triggering my make_file function(writes page content to new
file) I receive the following error:
  Warning: fopen(/local_server_path/file_to_create.php) [function.fopen]:
failed to create stream: Permission denied
I've attempted to chmod(777) my testing directory via ftp client, which
appears to work; however, when I fileperms($file_in_test_dir), I get
chmod(644), so clearly I'm not the owner.
Pardon my ignorance here, but I as yet know little about dir/file perms.
Should I contact the host and have them give me sufficient permissions?
Any help so much appreciated as I am completely handcuffed at the moment.

Thanks,

--Noah

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


Re: [PHP] Re: Header won't redirect

2003-09-19 Thread Scott Fletcher
Well, I'm using Outlook Express and it looked fine for an hour or so now.
But not with the ones earlier in the morning.  Strange though!

Scott F.

"Jonathan Duncan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Perhaps it is just Outlook Express but many of your replies are showing as
> ophans.
>
> Jonathan
>
>
> "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> [snip]
> Try replying to the group so that your contributions stay with the
> thread
> instead of being orphaned and lost.
> [/snip]
>
> I always do, did something weird happen?

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



Re: [PHP] Web server file perms || More than I can chew.....

2003-09-19 Thread Lowell Allen
> On my local machine (win2k pro, apache), no problems -- everything works
> just as designed.
> 
> Today I began testing on the live server; i.e. my client's hosting company
> (linux, apache 1.3.27, php 4.3.1)  -- that's when the trouble started.
> 
> The site builder app builds static pages based on changes made by users in
> our online administration center.  When I test out creating a new site
> section; i.e. triggering my make_file function(writes page content to new
> file) I receive the following error:
> 
> Warning: fopen(/local_server_path/file_to_create.php) [function.fopen]:
> failed to create stream: Permission denied
> 
> I've attempted to chmod(777) my testing directory via ftp client, which
> appears to work; however, when I fileperms($file_in_test_dir), I get
> chmod(644), so clearly I'm not the owner.
> 
> Pardon my ignorance here, but I as yet know little about dir/file perms.
> Should I contact the host and have them give me sufficient permissions?

If you create a subdirectory of the root level public HTML directory, then
PHP can create files there, but not in the root level directory. If you
change permissions to 777, PHP can create files there, but it's not a good
idea to have the permissions that wide-open.

You might be able to get your commercial host to change who PHP is running
as from "nobody" to your login identity, then PHP could write to the root
level directory, but you might not be able to -- my main host says they're
changing policy for security reasons to not allow that.

You could put the static files in a subdirectory where PHP will have
permission to create files. But this might require lots of reworking links
depending on your site design, and thus not be a viable option.

You could set up a PHP script to be executed by a crontab as a CGI. Done
this way, PHP can write to the root level directory. This is what I did
recently for a similar problem. The content management system provides a
link for updating static HTML pages. That link (script) writes info to the
database, flagging an update request. Every 5 minutes, a crontab calls the
PHP CGI script that actually does the update. The script checks the database
flag and does the updates if they've been requested (flagged).

Bottom line -- discuss the problem with your commercial host and see what
they suggest.

--
Lowell Allen

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



[PHP] Media Presentations

2003-09-19 Thread Vail, Warren
I wanted to create web based slideshow and audio media presentations and was 
disappointed by two PHP function sets.  I would love to hear of any others that might 
be available.
 
Tried MING, and discovered that there were at least 3 different versions (all numbered 
version 0.2a) that were incompatible with each other depending on where I installed my 
code.
  Example: 
 
   function swfbitmap 
   1). would in one case accept a string containing image.
   2). in a second case accepted a string containing a file name but not the bitmap
   3). and in a third case only accepted a file handle (returned from fopen) of 
the file containing the bit map and not just the filename.
 
I then tried the SWFlib functions available with PHP and discovered that it is no 
longer supported, and that source is unavailable. (one reason that a version for the 
windows platform is unavailable).  This also means that keeping up with the latest 
shockwave reader features is not possible (which bothers me more).
 
Are there any options I have overlooked?
 
thanks in advance,
 
Warren Vail


Re: [PHP] Attention: List Administrator

2003-09-19 Thread Don Mc Nair
I got 21 emails with attachments today from Microsoft.

Don




"Payne" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Raquel Rice wrote:
>
> >On Fri, 19 Sep 2003 15:39:12 +
> >Curt Zirzow <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >>* Thus wrote Chris Sherwood ([EMAIL PROTECTED]):
> >>
> >>
> >>>To Whom it may concern the following users
> >>>
> >>>[EMAIL PROTECTED]
> >>>[EMAIL PROTECTED]
> >>>
> >>>has been flooding me with viruses. fortunately I have the
> >>>appropriate safeguards in place.
> >>>
> >>>
> >>>
> >>Yes, I was just about to contact the list admins about this.
> >>Although I have gotten virus attatchments from other people as
> >>well.
> >>
> >>And now I'm getting an autoresponder from someone's server saying
> >>that I sent them a virus... egads... this is crazy :)
> >>
> >>
> >>Curt
> >>
> >>
> >>
> >
> >I got one of those too!  Someone's server is going crazy.  FIX IT!
> >
> >==
> >
> >Quoted:  From: [EMAIL PROTECTED]
> >
> >Please contact your system administrator.
> >
> >
> >The scanned document was deleted.
> >
> >
> >Violation Information:
> >The subject violated the content filtering rule PHP as subject is a
> >malacious code - Not Allowed.  No attempt was made to repair.
> >
> >
> >--
> >Raquel
> >
> >If God lived on earth, people would break his windows.
> >  --Jewish Proverb
> >
> >
> >
> Me too, I just got one. I think someone at that server is a member of
> this and got one of those 8 eights e-mails that where suppose to be from
> micrsoft this morning.
>
> Chuck


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/2003

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



Re: [PHP] Re: Header won't redirect

2003-09-19 Thread Jonathan Duncan
Perhaps it is just Outlook Express but many of your replies are showing as
ophans.

Jonathan


"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
Try replying to the group so that your contributions stay with the
thread
instead of being orphaned and lost.
[/snip]

I always do, did something weird happen?

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



Re: [PHP] Opening new browser window

2003-09-19 Thread Marek Kilimajer


Rich Fox wrote:

I would like to open a new browser window from within my php script
(edit.php), a window in which another php page is run (search.php).
search.php should be able to receive $_POST vars etc. from edit.php. I am
not sure that the javascript solution to popup a window is correct, because
then the popup does not behave normally.
By normally, I mean that when I use javascript to popup a new window
(search.php), and in search.php I have a form

 
  >
  >
 
 

clicking OK or Cancel does absolutely nothing. So, I would like to avoid
javascript and simply open a new browser window to run search.php. What is
the accepted way to do this in php?
tia,

Rich

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


RE: [PHP] Attention: List Administrator

2003-09-19 Thread Dan Joseph
Hi,

> s/Norton/linux+qmail/

haha..  that be a good solution for sure!

-Dan Joseph

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



Re: [PHP] Attention: List Administrator

2003-09-19 Thread R'twick Niceorgaw
David T-G said the following on 9/19/2003 12:25 PM>>

Dan, et al --

...and then Dan Joseph said...
% 
% the computer web server.  Kinda hilarious if you ask me.  Good excuse to
% install Norton also.

s/Norton/linux+qmail/

*grin*

:-D
s/linux+qmail/linux+qmail+spamassassin+tmda+f-prot/ :)

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


RE: [PHP] Attention: List Administrator

2003-09-19 Thread Javier Tacon

Yes, I have been flooded today too .. 

The virus is: Worm . Automat . AHB



-Mensaje original-
De: Chris Sherwood [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 19 de septiembre de 2003 17:15
Para: [EMAIL PROTECTED]
Asunto: [PHP] Attention: List Administrator
Importancia: Baja


To Whom it may concern the following users

[EMAIL PROTECTED] 
[EMAIL PROTECTED] 

has been flooding me with viruses. fortunately I have the appropriate safeguards in 
place.

however this does not seem like appropriate activity for users and members of this 
list to attempt on anyone let alone the fellow members of this list as it displays a 
very low maturity level. I would appreciate any appropriate measures taken to stop 
this activity.

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



[PHP] Opening new browser window

2003-09-19 Thread Rich Fox
I would like to open a new browser window from within my php script
(edit.php), a window in which another php page is run (search.php).
search.php should be able to receive $_POST vars etc. from edit.php. I am
not sure that the javascript solution to popup a window is correct, because
then the popup does not behave normally.

By normally, I mean that when I use javascript to popup a new window
(search.php), and in search.php I have a form


 
  >
  >
 
 


clicking OK or Cancel does absolutely nothing. So, I would like to avoid
javascript and simply open a new browser window to run search.php. What is
the accepted way to do this in php?

tia,

Rich

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



Re: [PHP] Attention: List Administrator

2003-09-19 Thread Ryan A
Hey all,

IMHO I think that sites selling you virus software (resellers for norton?)
are sending most of those crappy messages saying that they recieved a mail
from you that contained a virus and $insertVirusName has caught it.

chances are if you are scared enought or dont know enough you will probably
visit their link or see where the email came from and..

Just my $0.2 cents.

cheers,
-Ryan

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

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



Re: [PHP] Attention: List Administrator

2003-09-19 Thread David T-G
Dan, et al --

...and then Dan Joseph said...
% 
% the computer web server.  Kinda hilarious if you ask me.  Good excuse to
% install Norton also.

s/Norton/linux+qmail/

*grin*


:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


  1   2   >