OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 21 Oct 2003 14:35:41 -0000 Issue 2368

php-general-digest-helplists.php.net
Date: Tue Oct 21 2003 - 09:35:41 CDT


php-general Digest 21 Oct 2003 14:35:41 -0000 Issue 2368

Topics (messages 166872 through 166956):

Re: Session migration problem...
        166872 by: Jake McHenry
        166875 by: Jake McHenry
        166883 by: Chris Shiflett
        166884 by: Curt Zirzow
        166885 by: Chris Shiflett
        166888 by: Curt Zirzow

Re: Tom->Re: [PHP] session hijacking
        166873 by: Ow Mun Heng
        166880 by: Tom Rogers
        166882 by: Ow Mun Heng
        166886 by: Tom Rogers
        166907 by: - Edwin -

Re: Launch Print Dialog Box with PHP?
        166874 by: [-^-!-%-
        166876 by: Justin French
        166878 by: John Nichel
        166879 by: John Nichel
        166881 by: Curt Zirzow
        166919 by: [-^-!-%-
        166929 by: CPT John W. Holmes

Re: passing form data using $_SESSION
        166877 by: Curt Zirzow

Re: Yes!!! BTML v1.0 is here!!!
        166887 by: Curt Zirzow

run exe file
        166889 by: Deependra b. Tandukar
        166890 by: John Nichel
        166891 by: Leif K-Brooks
        166893 by: Colin Kettenacker
        166894 by: John Nichel
        166895 by: Colin Kettenacker

gmdate problem
        166892 by: irinchiang.justeducation.com
        166909 by: Eugene Lee
        166910 by: - Edwin -

php cgi configuration w/ htaccess
        166896 by: Andrew Warner
        166898 by: Curt Zirzow

How does unpack works?
        166897 by: Vincent Elderkamp
        166899 by: Tom Rogers
        166900 by: Tom Rogers

mailing labels from databases
        166901 by: Dennis Gearon
        166912 by: - Edwin -
        166918 by: Marek Kilimajer

Destroying session if not being used from past 10 mins.
        166902 by: Binay
        166916 by: Jason Wong
        166936 by: CPT John W. Holmes
        166946 by: Binay
        166947 by: CPT John W. Holmes

data type conversion in mysql using php
        166903 by: Uma Shankari T.
        166904 by: - Edwin -
        166905 by: Robert Cummings
        166933 by: CPT John W. Holmes

Re: cache control with javascript
        166906 by: - Edwin -
        166951 by: Joshua Minnie

Re: Print mysql errors
        166908 by: Eugene Lee

Test Connection - fsockopen()
        166911 by: Jason Williard
        166913 by: Tom Rogers
        166914 by: - Edwin -
        166917 by: Jason Williard

php_w32api.dll ... fatal error
        166915 by: jon
        166942 by: DvDmanDT

run PHP script in clean memory space
        166920 by: Honza Malik
        166923 by: Marek Kilimajer
        166952 by: Eugene Lee

seems like magic_quotes_gpc is turning itsself on!
        166921 by: William Bailey
        166931 by: CPT John W. Holmes
        166945 by: William Bailey

The page cannot be displayed error
        166922 by: Sudheer Palaparambil
        166924 by: Marek Kilimajer
        166926 by: Sudheer Palaparambil
        166927 by: Marek Kilimajer
        166928 by: Marek Kilimajer
        166932 by: CPT John W. Holmes
        166934 by: Fernando Melo

Re: [cli] ^D
        166925 by: Decapode Azur

Re: Read a file, extract and echo some information
        166930 by: PHP Webmaster
        166954 by: rush

php code
        166935 by: Uma Shankari T.
        166939 by: Jay Blanchard

Run PHP process on receipt of file
        166937 by: Jay Blanchard

[Newbie Guide] For the benefit of new members
        166938 by: Ma Siva Kumar

Allowing specific IP's to bypass security.
        166940 by: Tristan.Pretty.risk.sungard.com
        166941 by: Jon Haworth
        166943 by: Marek Kilimajer

ob_get_length() returns uncompressed buffer length (after ob_start('ob_gzhandler'))
        166944 by: daniel hahler

HTTP 405 - Resource not allowed error
        166948 by: Sudheer Palaparambil
        166949 by: David Otton

Re: Using two XSLT stylesheets
        166950 by: rich

(ANNOUNCE) New PHP mailing list *searchable* archives
        166953 by: Marco Tabini
        166955 by: CPT John W. Holmes
        166956 by: Miles Thompson

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


> -----Original Message-----
> From: Chris Shiflett [mailto:shiflettphp.net]
> Sent: Monday, October 20, 2003 9:56 PM
> To: Jake McHenry; php-generallists.php.net
> Subject: Re: [PHP] Session migration problem...
>
>
> --- Jake McHenry <linuxnittanytravel.com> wrote:
> > $result = mysql_query("SELECT * FROM `users` WHERE `uname` =
> > '".$_POST['username']."'");
>
> Don't put uname in single quotes. Aside from that, don't
> forget that you can interpolate variables with curly braces.
> Depending on your personal preference, you might find it
> easier to read:
>
> "select * from users where uname = '{$_POST['username']}'"
>
> Hope that helps.
>
> Chris
>
> =====
> My Blog
> http://shiflett.org/
> HTTP Developer's Handbook
> http://httphandbook.org/
> RAMP Training Courses
> http://www.nyphp.org/ramp
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

I took the single quotes off of the field name, uname, but still
getting the same error at the same line in the file...

Any other suggestions?

Thanks,

Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com

attached mail follows:


> -----Original Message-----
> From: Jake McHenry [mailto:linuxnittanytravel.com]
> Sent: Monday, October 20, 2003 10:32 PM
> To: php-generallists.php.net
> Subject: RE: [PHP] Session migration problem...
>
>
> > -----Original Message-----
> > From: Chris Shiflett [mailto:shiflettphp.net]
> > Sent: Monday, October 20, 2003 9:56 PM
> > To: Jake McHenry; php-generallists.php.net
> > Subject: Re: [PHP] Session migration problem...
> >
> >
> > --- Jake McHenry <linuxnittanytravel.com> wrote:
> > > $result = mysql_query("SELECT * FROM `users` WHERE `uname` =
> > > '".$_POST['username']."'");
> >
> > Don't put uname in single quotes. Aside from that, don't
> > forget that you can interpolate variables with curly braces.
> > Depending on your personal preference, you might find it
> > easier to read:
> >
> > "select * from users where uname = '{$_POST['username']}'"
> >
> > Hope that helps.
> >
> > Chris
> >
> > =====
> > My Blog
> > http://shiflett.org/
> > HTTP Developer's Handbook
> > http://httphandbook.org/
> > RAMP Training Courses
> > http://www.nyphp.org/ramp
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> I took the single quotes off of the field name, uname, but still
> getting the same error at the same line in the file...
>
> Any other suggestions?
>
>
> Thanks,
>
> Jake McHenry
> Nittany Travel MIS Coordinator
> http://www.nittanytravel.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

HAHA.. Sorry everyone.... I found my problem... The field name in the
table is username, not uname.... I guess I must have changed that as
well. My head is spinning from all the stuff I'm trying to change...

My only other question is can I change from '".."' to `".."`? When I
try to run a query on the table name, it has to be within `` instead
of ''. I just tried it, it looks like it works... Just want to make
sure this is ok.

Thanks,
Jake

attached mail follows:


--- Jake McHenry <linuxnittanytravel.com> wrote:
> I took the single quotes off of the field name, uname, but still
> getting the same error at the same line in the file...
>
> Any other suggestions?

Sure.

Let's look at your original code:

$result = mysql_query("SELECT * FROM `users` WHERE `uname` =
'".$_POST['username']."'");

So, rather than trying to glance at this and figure out what's wrong, I will
instead suggest a debugging technique or two.

1. Put your query in a variable like $sql. This can simplify your statement:

$result = mysql_query($sql);

2. Don't wait until you use $result to find out it's not a valid resource; test
it immediately:

if (!$result = mysql_query($sql))

3. If it's not a valid resource, this conditional statement will be true. You
can echo (or send to a log file) the output of mysql_error() to see what MySQL
thinks the last error was (which will be the error generated by the query, in
this case).

Hope that helps.

Chris

=====
My Blog
     http://shiflett.org/
HTTP Developer's Handbook
     http://httphandbook.org/
RAMP Training Courses
     http://www.nyphp.org/ramp

attached mail follows:


* Thus wrote Jake McHenry (linuxnittanytravel.com):
> > -----Original Message-----
> > From: Chris Shiflett [mailto:shiflettphp.net]
> >
> > --- Jake McHenry <linuxnittanytravel.com> wrote:
> > > $result = mysql_query("SELECT * FROM `users` WHERE `uname` =
> > > '".$_POST['username']."'");
> >
> > "select * from users where uname = '{$_POST['username']}'"
>
> Is there any advantage to the curly brackets over the '".."'?

50% readability. 50% personal prefernce.

Curt
--
"My PHP key is worn out"

  PHP List stats since 1997:
          http://zirzow.dyndns.org/html/mlists/

attached mail follows:


--- Jake McHenry <linuxnittanytravel.com> wrote:
> Is there any advantage to the curly brackets over the '".."'?

There's not enough difference between the two to choose one over the other
based on performance, if that's what you mean. Personally, I find that
concatenation looks clearer in some cases, and interpolation looks clearer in
others. This is just a personal preference thing.

Chris

=====
My Blog
     http://shiflett.org/
HTTP Developer's Handbook
     http://httphandbook.org/
RAMP Training Courses
     http://www.nyphp.org/ramp

attached mail follows:


* Thus wrote Chris Shiflett (shiflettphp.net):
> --- Jake McHenry <linuxnittanytravel.com> wrote:
> > Is there any advantage to the curly brackets over the '".."'?
>
> There's not enough difference between the two to choose one over the other
> based on performance, if that's what you mean. Personally, I find that
> concatenation looks clearer in some cases, and interpolation looks clearer in
> others. This is just a personal preference thing.

Also depends on how you're editor highlights things (not to start a
thread on this.) I tend to use the concate method because I'm
used to programming in php the old school method.

Curt
--
"My PHP key is worn out"

  PHP List stats since 1997:
          http://zirzow.dyndns.org/html/mlists/

attached mail follows:


Hi Tom,

I've got a question for you regarding this encrypt class of yours.. Just
wanted to understand how well it would work against a guy with a sniffer
such as ethereal. (presuming he's on the LAN/wifi to access the app)

How does the encryption happen?? Client side or server side? How does it get
transmitted? I'm curious as to how to prevent ppl from sniffing out the
username/pass combo for these sort of sites that need memberships.

In some instances.. I can see the user/pass combo being passed in plain text

eg : user=someuser&pass=somepass&id=232&......

or in hashed form

eg :eg :
user=someuser&pass=*(^&$&%%&(J83&%#396asjjuwo273314koopu83jskl&id=232&.....
.

How does the hash happen???

<snip>
Save it in encrypt_class.inc
<?
class encrypt_class{
        var $secret;
        function encrypt_class(){
                $this->secret = 'you should change this to something else';
        }
</snip>

attached mail follows:


Hi,

Tuesday, October 21, 2003, 12:52:33 PM, you wrote:
OMH> Hi Tom,

OMH> I've got a question for you regarding this encrypt class of yours.. Just
OMH> wanted to understand how well it would work against a guy with a sniffer
OMH> such as ethereal. (presuming he's on the LAN/wifi to access the app)

OMH> How does the encryption happen?? Client side or server side? How does it get
OMH> transmitted? I'm curious as to how to prevent ppl from sniffing out the
OMH> username/pass combo for these sort of sites that need memberships.

OMH> In some instances.. I can see the user/pass combo being passed in plain text

OMH> eg : user=someuser&pass=somepass&id=232&......

OMH> or in hashed form

OMH> eg :eg :
OMH> user=someuser&pass=*(^&$&%%&(J83&%#396asjjuwo273314koopu83jskl&id=232&.....
OMH> .

OMH> How does the hash happen???

The encryption happens server side and is really only intended to encrypt
variables that are passed to web client such as product id and stuff. The only
way to do secure login and prevent sniffing is to use ssl which will encrypt the
traffic to and from the client. I suppose javascript could be used to fudge
encryption but that would be extremely weak way to do it. To protect hidden
variables you will still need to use some form of server side encryption. If you
have more than one hidden variable a good way is to put them in an array,
serialize it and encrypt the result and put that in a single hidden field. It
would almost be impossible to interfere with those. Something like this:

$e = new encrypt_class();
$hidden = array();
$hidden['username'] = $username;
$hidden['access'] = 'admin';

$sh = $e->encode(serialize($hidden));

echo '<input type="hidden" name="access" value="'.$sh.'">';

Then on the return:

$e = new encrypt_class();
$access=array();
if(isset($_POST['access']))
  $access = unserialize($e->decode($_POST['access']));
}
if(isset($access['username'])){
  //good chance data is valid
}else{
  echo 'Data corrupted';
  exit;
}

There is no single fix security as there is always some one smarter :)
--
regards,
Tom

attached mail follows:


>>The encryption happens server side and is really only intended to encrypt
>>variables that are passed to web client such as product id and stuff. The
only
>>way to do secure login and prevent sniffing is to use ssl which will
encrypt the
>>traffic to and from the client. I suppose javascript could be used to
fudge
>>encryption but that would be extremely weak way to do it. To protect
hidden
>>variables you will still need to use some form of server side encryption.
If you
>>have more than one hidden variable a good way is to put them in an array,
>>serialize it and encrypt the result and put that in a single hidden field.
It
>>would almost be impossible to interfere with those. Something like this:

Hmm.. Thanks for the answer.. This question was mainly asked because I was
paranoid about using Wifi to access my Yahoo Webmail.

No more accessing _anything_ private over wifi or rather.. I'll have to
re-think my password/privacy policy with regard to ssl/non ssl (http vs
https) sites..

Better be paranoid..

One other thing.. What's the difference in $$ for a site to be https rather
than http?? Cos you need to get a verisign cert or something?? Just
asking..

Cheers, .^.
Mun Heng, Ow /V\
H/M Engineering /( )\
Western Digital M'sia ^^-^^
DID : 03-7870 5168 The Linux Advocate

        

attached mail follows:


Hi,

Tuesday, October 21, 2003, 1:40:20 PM, you wrote:

OMH> One other thing.. What's the difference in $$ for a site to be https rather
OMH> than http?? Cos you need to get a verisign cert or something?? Just
OMH> asking..

I use bulkregister.com and if you are a member the cost is $88.00 per year
Verisign used to be $450.00 per year not sure anymore.

If the site is for your own members you can create and sign your own certificate and warn
them to accept the cert when the browser pops up with unknown agency warning.
Cost is only the time to figure out how the hell you sign your own certs :)

--
regards,
Tom

attached mail follows:


Hi,

On Tue, 21 Oct 2003 14:02:58 +1000
Tom Rogers <trogerskwikin.com> wrote:

> Hi,
>
> Tuesday, October 21, 2003, 1:40:20 PM, you wrote:
>
> OMH> One other thing.. What's the difference in $$ for a site to be
> OMH> https rather than http?? Cos you need to get a verisign cert
> OMH> or something?? Just asking..
>
> I use bulkregister.com and if you are a member the cost is $88.00
> per year Verisign used to be $450.00 per year not sure anymore.

Not as inexpensive but I think http://www.geotrust.com/ is a good
place to check...

> If the site is for your own members you can create and sign your own
> certificate and warn them to accept the cert when the browser pops
> up with unknown agency warning. Cost is only the time to figure out
> how the hell you sign your own certs :)

If you (general "you") have compiled your own Apache, I'm sure you've
already gone through this... :)

- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

attached mail follows:


J Holmes,

I don't know who, or what, crown you king of this list. But, so far I've
yet to see you answer any questions constructively or contribute
positively to any user's questions. What's the problem? Did you wake up
on the wrong side of the bed or something? Are you sexually frustrated,
need attention, or what? In case you failed to noticed, this is a public forum.
Questions will be asked. The more people know about the language, the more
they will use it. That is a good thing.

Do me a favor, if you don't have an answer to a question, then just
ignore it. There's no need for your sarcasm or any other issues
that you may be dealing with at the time. It doesn't help anything and is
only adding noise to the list. Ignore the question is a lot more
productive then replying with some garbage. If you must answer, to satisfy
you own urges, then a simple NO would suffice.

While I thank you for offering to hold my hand, I must say that I'm
doing quite well by myself. Perhaps if you spent a little more time with
the
question, you'd notice that I was looking for an alternative and not
handout. Thanks for the generous offer. But, I don't think I'll need it.

_John <-The other one :-)

P.S.
This comment

> [-^-!-%- wrote:
>
> > Is is possible to launch the windows print dialog box, with PHP?
> > Perhaps with a specific HEADER() code? I know it's possible to force
> > download with HEADER(), but can you do the same for printing?
> >
> > I'm looking for something that does the same as the windows.print()
> > function in Javascript.
> >
> > Please advise.
>
> Here, take hold of my hand, and repeat after me. PHP is server side, PHP
> is server side, PHP is server side. Printing is client-side, FYI. So, no.
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals – www.phparch.com
>
>
>
>

attached mail follows:


On Tuesday, October 21, 2003, at 11:44 AM, John W. Holmes wrote:

> [-^-!-%- wrote:
>
>> Is is possible to launch the windows print dialog box, with PHP?
>> Perhaps with a specific HEADER() code? I know it's possible to force
>> download with HEADER(), but can you do the same for printing?
>> I'm looking for something that does the same as the windows.print()
>> function in Javascript.
>> Please advise.
>
> Here, take hold of my hand, and repeat after me. PHP is server side,
> PHP is server side, PHP is server side. Printing is client-side, FYI.
> So, no.

John, I'm *sure* the OP is aware that PHP is server side -- in fact,
he/she asks if PHP can send any specific headers to the browser (like
the headers that tell a client-side browser to open the save as
dialogue) which will open the print dialogue.

*I* know it can't be done, *you* know it can't be done, and we both
know there's quite a big difference between "save as" and "print" --
but he/she does not.

A simple "no" would have been fine *in this case*.

Justin French

attached mail follows:


[-^-!-%- wrote:
> J Holmes,
>
> I don't know who, or what, crown you king of this list.

I crowned him king. I was tired of wearing that big heavy thing on my head.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

attached mail follows:


Justin French wrote:
<snip>
> A simple "no" would have been fine *in this case*.
>
>
> Justin French
>

It was simple. He used real small words. Maybe the OP should have
searched the archives?

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

attached mail follows:


* Thus wrote [-^-!-%- (monfortengineering.sdsu.edu):
>
> J Holmes,
>
> I don't know who, or what, crown you king of this list. But, so far I've
> yet to see you answer any questions constructively or contribute
> positively to any user's questions. What's the problem? Did you wake up
> on the wrong side of the bed or something? Are you sexually frustrated,
> need attention, or what? In case you failed to noticed, this is a public forum.

and public forums shouldn't be used to flame someone!

>
> Do me a favor, if you don't have an answer to a question, then just
> ignore it. There's no need for your sarcasm or any other issues
> that you may be dealing with at the time. It doesn't help anything and is
> only adding noise to the list. Ignore the question is a lot more
> productive then replying with some garbage. If you must answer, to satisfy
> you own urges, then a simple NO would suffice.

RTFA!

You're sitting here whining about the very exact thing you just
said. How hypocrytical can you get.

Curt
--
"My PHP key is worn out"

  PHP List stats since 1997:
          http://zirzow.dyndns.org/html/mlists/

attached mail follows:


So you're to blame for him going after my head.

Well, at least who's doing the crowning :-)

-john

 Web Developement. Database. Hosting. Multimedia.

On Mon, 20 Oct 2003, John Nichel wrote:

> [-^-!-%- wrote:
> > J Holmes,
> >
> > I don't know who, or what, crown you king of this list.
>
> I crowned him king. I was tired of wearing that big heavy thing on my head.
>
> --
> By-Tor.com
> It's all about the Rush
> http://www.by-tor.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


From: "[-^-!-%-" <monfortkahuna.sdsu.edu>
> If you must answer, to satisfy
> you own urges, then a simple NO would suffice.

The answer is No, then. Try not to take things so personally; I'm not here
to "get you"

---John Holmes...

attached mail follows:


* Thus wrote Chris W. Parker (cparkerswatgear.com):
> Hiya.
>
> The way I do my forms is I create a form page and a corresponding
> processing page. I don't like to post forms to themself so I always make
> a processing page that header("Location: ...")'s back to the original
> page.
>
> if(the name is blank)
> {
> $errors = "e_name=Name cannot be blank&";
> }
>
> $location = "originalpage.php?$errors";
>
> So then I redirect with the $location variable.
>
> But instead of passing it back through the querystring, what about
> assigning the values to the $_SESSION array and simply checking for the
> existence of those values on the original form?

I usually handle error's within session and go back with the
location by the referer (or a hidden input var) and display the
errors on the form. I usually designate a namespace for errors.

For example:

validate.php
if(field isn't valid) {
  $_SESSION['errors'] = array('field', 'The field isnt valid');
}

form.php:
if (!empty($_SESSION['errors'])) {
  include('common_error_handler.php');
}

common_error_handler.php:
foreach ($_SESSION['errors'] as $field => $desc) {
  echo "$field: $desc<br>";
}
unset($_SESSION['errors']);

I do the same with messages (ie 'Data has been saved'). Cept I
usually designate different html div tags with css classes, so the
colors and stuff can be changed for error's vs. messages.

> I think it will work fine (and even better than posting everything) but
> I'm wondering if there's something I'm not considering that makes this
> Not A Good Idea(tm)?

There are some gotchas and isn't the most elegant way to handle
errors, but It is much better than using a GET var to pass back
errors to the form.

Curt
--
"My PHP key is worn out"

  PHP List stats since 1997:
          http://zirzow.dyndns.org/html/mlists/

attached mail follows:


* Thus wrote Comex (ngxemoc.cjb.net):
> <20031019043004.GI51024bagend.shire>
> Curt Zirzow:
> > * Thus wrote Comex (ngxemoc.cjb.net):
>
> > All this is is a xml, yet it breaks all xml rules, ironic as
> > it sounds.
> >
> > Curt
>
> I don't know much about XML, so clue me in.

http://www.w3.org/XML/ is a good place to start.

Curt
--
"My PHP key is worn out"

  PHP List stats since 1997:
          http://zirzow.dyndns.org/html/mlists/

attached mail follows:


Dear all,

Is there anyway that I can put .exe file on the web, and allow visitors
only to run it, not download it.

Regards,
DT

attached mail follows:


Deependra b. Tandukar wrote:
> Dear all,
>
> Is there anyway that I can put .exe file on the web, and allow visitors
> only to run it, not download it.
>
> Regards,
> DT
>

*Checks list address* Yep, php list. In a word, no.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

attached mail follows:


Deependra b. Tandukar wrote:

> Is there anyway that I can put .exe file on the web, and allow
> visitors only to run it, not download it.

No.

--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

attached mail follows:


>> Dear all,
>>
>> Is there anyway that I can put .exe file on the web, and allow visitors
>> only to run it, not download it.
>>
>> Regards,
>> DT
>>
>
> *Checks list address* Yep, php list. In a word, no.

Well how about, in a word, it depends. Okay that's 2 words:)

Check out:

http://www.php.net/manual/en/language.operators.execution.php
http://www.php.net/manual/en/function.shell-exec.php
http://www.php.net/manual/en/function.exec.php

It may be what you are looking for.

ck
--
Cheap Domain Registration | Web Hosting | Email Packages | + more
Fantastic prices -- Even better service.
http://www.hosttohost.net

attached mail follows:


Colin Kettenacker wrote:
>>>Dear all,
>>>
>>>Is there anyway that I can put .exe file on the web, and allow visitors
>>>only to run it, not download it.
>>>
>>>Regards,
>>>DT
>>>
>>
>>*Checks list address* Yep, php list. In a word, no.
>
>
> Well how about, in a word, it depends. Okay that's 2 words:)
>
> Check out:
>
> http://www.php.net/manual/en/language.operators.execution.php
> http://www.php.net/manual/en/function.shell-exec.php
> http://www.php.net/manual/en/function.exec.php
>
> It may be what you are looking for.
>
> ck

Those are all fine and dandy if you want to run the file (*.exe or
whatever) on the same machine that php is running on. However, to run
it on the remote machine, it IS going to be downloaded. Even though the
OP was not clear about where the program was to be run, I would have to
guess that he/she is refering to the remote (client) machine. So, no,
it can't be done.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

attached mail follows:


John Nichel jnichelby-tor.com on 10/20/03 9:42 PM wrote:

> Those are all fine and dandy if you want to run the file (*.exe or
> whatever) on the same machine that php is running on. However, to run
> it on the remote machine, it IS going to be downloaded.

That's why I said it depends:)

> Even though the
> OP was not clear about where the program was to be run, I would have to
> guess that he/she is refering to the remote (client) machine. So, no,
> it can't be done.

If your assumption is correct then yes, your answer is correct. But no harm
in presenting both options as the original question was unclear.

ck
--
Cheap Domain Registration | Web Hosting | Email Packages | + more
Fantastic prices -- Even better service.
http://www.hosttohost.net

attached mail follows:


Hi all,
       Having some problem with 'gmdate' here. However, the time doesn't match
with the current time on the system. What could be the problem? Do I have to set
any timezone or stuff like that?...Hope to get some help here.

Tue, 21st Oct 2003, 04:25

<?php
echo gmDate("D, dS M Y, H:i");
?>

attached mail follows:


On Tue, Oct 21, 2003 at 12:44:38PM +0800, irinchiangjusteducation.com wrote:
:
: Having some problem with 'gmdate' here. However, the time doesn't
: match with the current time on the system. What could be the problem?
: Do I have to set any timezone or stuff like that?...Hope to get some
: help here.
:
: Tue, 21st Oct 2003, 04:25
:
: <?php
: echo gmDate("D, dS M Y, H:i");
: ?>

gmdate() returns the the GMT/UTC time (i.e. timezone 0). Unless your
system's timezone is zero because it is in Greenwich, gmdate() does not
adjust its result to your local timezone and you will not get the answer
you expected. What's wrong with date()?

attached mail follows:


Hi,

On Tue, 21 Oct 2003 12:44:38 +0800
irinchiangjusteducation.com wrote:

>
> Hi all,
> Having some problem with 'gmdate' here. However, the time
> doesn't match
> with the current time on the system. What could be the problem? Do I
> have to set any timezone or stuff like that?...Hope to get some help
> here.

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

[quote]
  Identical to the date() function except that the time returned is
  Greenwich Mean Time (GMT).
[/quote]

So, I guess, you have to make sure first that your server (system) is
located inside the GMT time zone :)

- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

attached mail follows:


My ISP hosted website uses the php apache module version, but I'm
trying to use php cgi version for the part of my site edit
application that actually creates and edits files on the site. This
will avoid all the permision and chmod hassle when php tries to
create and edit files. My ISP has placed a php cgi binary in my home
directory so it can run as my user id.

I've never used php cgi version, and all the httacces configuration
I've tried to map .phpc files to the php cgi binary hasn't worked
right. I need an example htacces file or an example of a script
header line with php location.

drew

attached mail follows:


* Thus wrote Andrew Warner (awarnercalendarserve.com):
> I've never used php cgi version, and all the httacces configuration
> I've tried to map .phpc files to the php cgi binary hasn't worked
> right. I need an example htacces file or an example of a script
> header line with php location.

With cgi you don't map the file to the php cgi binary. You have to
set up a directory with a 'Script-Alias' directive to point to a
paticular folder for running files as cgi. Hopefully this is
already done and there is a cgi-bin outside your web tree.

See apache's documentation on doing this.

Once you have the cgi-bin set up you put your php file in the
cgi-bin with the top of the php file with something like:

#!/path/to/your/home/php
<?php
echo "hello world<br>\n";
?>

Set this file permission bit to be executable and it should all
work. All of this is done from memory so a bit might be a bit off
but some searching the archives and google'in will help out.

HTH,

Curt
--
"My PHP key is worn out"

  PHP List stats since 1997:
          http://zirzow.dyndns.org/html/mlists/

attached mail follows:


Hi,

I'm trying to extract an binary file with unpack but I don't understand
how it works...

The F6FBB program makes the file...
It is a hamradio program http://www.f6fbb.org/

This is the structure of 1 record in the file :
struct inf_struct
{ char callsign[8]; /* Callsign */
   char dummy1[64];
   long lastmes;
   long connects; /* Number of connexions */
   long hcon;
   long lastyap;
   int flags;
   int on_base;
   char nbl;
   char lang;
   long newbanner;
   int download;
   char free[20];
   char thema;
   char nom[18];
   char prenom[13];
   char adres[61];
   char ville[31];
   char teld[13];
   char telp[13];
   char home[41];
   char gra[7];
   char priv[13];
   char filtre[7];
   char pass[13];
   char zip[1];
} inf; /* 360 bytes = lenght of one record */

Can somebody help me?

Regards,

Vincent

attached mail follows:


Hi,

Tuesday, October 21, 2003, 3:12:47 PM, you wrote:
VE> Hi,

VE> I'm trying to extract an binary file with unpack but I don't understand
VE> how it works...

VE> The F6FBB program makes the file...
VE> It is a hamradio program http://www.f6fbb.org/

VE> This is the structure of 1 record in the file :
VE> struct inf_struct
VE> { char callsign[8]; /* Callsign */
VE> char dummy1[64];
VE> long lastmes;
VE> long connects; /* Number of connexions */
VE> long hcon;
VE> long lastyap;
VE> int flags;
VE> int on_base;
VE> char nbl;
VE> char lang;
VE> long newbanner;
VE> int download;
VE> char free[20];
VE> char thema;
VE> char nom[18];
VE> char prenom[13];
VE> char adres[61];
VE> char ville[31];
VE> char teld[13];
VE> char telp[13];
VE> char home[41];
VE> char gra[7];
VE> char priv[13];
VE> char filtre[7];
VE> char pass[13];
VE> char zip[1];
VE> } inf; /* 360 bytes = lenght of one record */

VE> Can somebody help me?

VE> Regards,

VE> Vincent

Try this (assumes little endian byte ordering, if big endian V = N v = n)

$array = unpack("
  a8callsign/
  a64dummy1/
  Vlastmes/
  Vconnects/
  V/hcon/
  V/lastyap/
  vflags/
  von_base/
  cnbl/
  clang/
  Vnewbanner/
  vdownload/
  a20free/
  cthema/
  a8nom/
  a13prenom/
  a61adres/
  a31ville/
  a13teld/
  a13telp/
  a41home/
  a7gra/
  a13priv/
  a7filtre/
  a13pass/
  czip",$input);
print_r($array);

--
regards,
Tom

attached mail follows:


Hi,

Tuesday, October 21, 2003, 3:36:35 PM, you wrote:
TR> Hi,

TR> Tuesday, October 21, 2003, 3:12:47 PM, you wrote:
VE>> Hi,

VE>> I'm trying to extract an binary file with unpack but I don't understand
VE>> how it works...

VE>> The F6FBB program makes the file...
VE>> It is a hamradio program http://www.f6fbb.org/

VE>> This is the structure of 1 record in the file :
VE>> struct inf_struct
VE>> { char callsign[8]; /* Callsign */
VE>> char dummy1[64];
VE>> long lastmes;
VE>> long connects; /* Number of connexions */
VE>> long hcon;
VE>> long lastyap;
VE>> int flags;
VE>> int on_base;
VE>> char nbl;
VE>> char lang;
VE>> long newbanner;
VE>> int download;
VE>> char free[20];
VE>> char thema;
VE>> char nom[18];
VE>> char prenom[13];
VE>> char adres[61];
VE>> char ville[31];
VE>> char teld[13];
VE>> char telp[13];
VE>> char home[41];
VE>> char gra[7];
VE>> char priv[13];
VE>> char filtre[7];
VE>> char pass[13];
VE>> char zip[1];
VE>> } inf; /* 360 bytes = lenght of one record */

VE>> Can somebody help me?

VE>> Regards,

VE>> Vincent

TR> Try this (assumes little endian byte ordering, if big endian V = N v = n)

TR> $array = unpack("
TR> a8callsign/
TR> a64dummy1/
TR> Vlastmes/
TR> Vconnects/
TR> V/hcon/
TR> V/lastyap/
TR> vflags/
TR> von_base/
TR> cnbl/
TR> clang/
TR> Vnewbanner/
TR> vdownload/
TR> a20free/
TR> cthema/
TR> a8nom/
TR> a13prenom/
TR> a61adres/
TR> a31ville/
TR> a13teld/
TR> a13telp/
TR> a41home/
TR> a7gra/
TR> a13priv/
TR> a7filtre/
TR> a13pass/
TR> czip",$input);
TR> print_r($array);

TR> --
TR> regards,
TR> Tom

oops .. some stray / in there

$array = unpack("
  a8callsign/
  a64dummy1/
  Vlastmes/
  Vconnects/
  Vhcon/
  Vlastyap/
  vflags/
  von_base/
  cnbl/
  clang/
  Vnewbanner/
  vdownload/
  a20free/
  cthema/
  a8nom/
  a13prenom/
  a61adres/
  a31ville/
  a13teld/
  a13telp/
  a41home/
  a7gra/
  a13priv/
  a7filtre/
  a13pass/
  czip",$input);
print_r($array);

--
regards,
Tom

attached mail follows:


I'm on digest, please CC me.

What output document format are people using for doing mailing labels
from databases?

I have thought about HTML, but it doesn't do multiple pages to the
printer well.
OperOffice Writer would be nice, can PHP do that?
Probably better would be PDF files, since it's really compressed
Postcript, a printer langauge.

Is it possible to set postions of characters, lines, tables, etc in PDF via:
    pixels
    page percentages
    absolute distances
using PHP?

--
"You are behaving like a man",
is an insult from some women,
a compliment from an good woman.

attached mail follows:


Hello,

On Mon, 20 Oct 2003 22:48:20 -0700
Dennis Gearon <gearondfireserve.net> wrote:

...[snip]...

> Is it possible to set postions of characters, lines, tables, etc in
> PDF via:
> pixels
> page percentages
> absolute distances
> using PHP?

  -> http://www.php.net/manual/en/ref.pdf.php

- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

attached mail follows:


Dennis Gearon wrote:
> I'm on digest, please CC me.
>
>
> Is it possible to set postions of characters, lines, tables, etc in PDF
> via:
> pixels
no

> page percentages
yes

> absolute distances
yes

> using PHP?
>
and www.fpdf.org

attached mail follows:


Hi all,

How can I configure the session to get destroyed, if not being used from past 10 mins.

Thanks in advance
binay

attached mail follows:


On Tuesday 21 October 2003 13:55, Binay wrote:

> How can I configure the session to get destroyed, if not being used from
> past 10 mins.

Sessions are destroyed automatically. You set the session life-time in php.ini
with "session.gc_maxlifetime".

If you want to force the issue, then you'll probably have to check the session
files yourself (assuming you're using the default session handler), which
means you'll have to check the filemtime() of each of the session files and
delete those older than 10 minutes.

--
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
------------------------------------------
/*
Vote anarchist.
*/

attached mail follows:


From: "Binay" <binayoliveinternet.com>

> How can I configure the session to get destroyed,
> if not being used from past 10 mins.

If you're using the default session handler, the session files are cleaned
up after not being used for 1440 seconds (by default), and the session is
basically destroyed. You can adjust the session.gc_maxlifetime setting in
php.ini to adjust the time.

This time isn't exact, though. The cleanup process is based upon a
probability that is 1% by default. That means the process has a 1% chance of
being started when there is a request to your site. So the files may be
older than 1440 seconds and just waiting for the garbage collection process
to be initiated.

If you need it to be exactly 10 minutes of inactivity, the best method is to
just store the time of the last request as a session variable and do the
checking yourself upon each request. If the last request was more than 10
minutes ago, then handle it accordingly.

---John Holmes...

attached mail follows:


Thanks alotttttttt.......
Is it possible to increase the probability which is by default 1% to 99 %
and make sure that session are destroyed after 10 mins by setting
session.gc_maxlifetime to 600.

Binay
----- Original Message -----
From: "CPT John W. Holmes" <holmes072000charter.net>
To: "Binay" <binayoliveinternet.com>; <php-generallists.php.net>
Sent: Tuesday, October 21, 2003 5:08 PM
Subject: Re: [PHP] Destroying session if not being used from past 10 mins.

> From: "Binay" <binayoliveinternet.com>
>
> > How can I configure the session to get destroyed,
> > if not being used from past 10 mins.
>
> If you're using the default session handler, the session files are cleaned
> up after not being used for 1440 seconds (by default), and the session is
> basically destroyed. You can adjust the session.gc_maxlifetime setting in
> php.ini to adjust the time.
>
> This time isn't exact, though. The cleanup process is based upon a
> probability that is 1% by default. That means the process has a 1% chance
of
> being started when there is a request to your site. So the files may be
> older than 1440 seconds and just waiting for the garbage collection
process
> to be initiated.
>
> If you need it to be exactly 10 minutes of inactivity, the best method is
to
> just store the time of the last request as a session variable and do the
> checking yourself upon each request. If the last request was more than 10
> minutes ago, then handle it accordingly.
>
> ---John Holmes...

attached mail follows:


From: "Binay" <binayoliveinternet.com>

> Is it possible to increase the probability which is by default 1% to 99 %
> and make sure that session are destroyed after 10 mins by setting
> session.gc_maxlifetime to 600.

I wouldn't recommend that, but you could. The setting to 600 is fine, but I
wouldn't adjust the probability.

Like I said, if you need a hard and fast 10 minute rule, then keep track of
the time yourself within your session.

$_SESSION['last_access'] = time();

If the session variable doesn't exist or it's been over 10 minutes (600
seconds) since the last access, then make them log in again or whatever.

---John Holmes...

attached mail follows:


Hello,
  
   Is it possible to update the float value of mysql to varchar field by
using php ??

Regards,
Uma

attached mail follows:


Hello,

On Tue, 21 Oct 2003 11:45:30 +0530 (IST)
"Uma Shankari T." <umashankarilantana.tenet.res.in> wrote:

> Hello,
>
> Is it possible to update the float value of mysql to varchar
> field by
> using php ??

'Not sure if I understood the question correctly but if you want to
change the column type of a "float field" to a "varchar field" then,
yes, it's possible--provided that you have the permission to do so.

- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

attached mail follows:


On Tue, 2003-10-21 at 02:15, Uma Shankari T. wrote:
>
>
> Hello,
>
> Is it possible to update the float value of mysql to varchar field by
> using php ??

You can issue an ALTER TABLE query via mysql_query().

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. |
`------------------------------------------------------------'

attached mail follows:


From: "Uma Shankari T." <umashankarilantana.tenet.res.in>
> Is it possible to update the float value of mysql to varchar field by
> using php ??

mysql_query('ALTER TABLE MyTable CHANGE COLUMN old_column_name
new_column_name VARCHAR(25)');

---John Holmes...

attached mail follows:


On Mon, 20 Oct 2003 14:44:50 -0400
"Joshua Minnie" <joshacsurf.net> wrote:

> Does anybody know how I can make force a javascript file (written in
> PHP) to be cached if the user agent allows it?
>
> Here is the situation:
> I am creating a dropdown menu system that contains a customer list,
> loaded from a database. This list is written to the javascript file
> for the menu. The menu can be quite large as the data grows. What I
> would like to do, is force it to be cached (unless of course the
> user agent doesn't allow it) so that it doesn't have to make the
> call to generate the file each time.

What is the second "it" in the last sentence above? A browser wouldn't
make the call to "generate" the javascript file each time.

> I have searched through the php.net website and even through the
> HTTP/1.1 protocols. I am continuing to look, but have not found a
> definite answer as to whether or not what I am trying to do is
> possible.

Just make sure that the javascript is on a separate file (i.e.
whatever.js) and that it's NOT being generated by your (php) script
each time. Then, "call" that file from inside your html/php page.

- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

attached mail follows:


The "it" that you were asking about was the server. The javascript file is
actually a PHP file that produces the JavaScript that I need. I only have
one access to a database and a while loop to generate the code. Here is the
code pieces:

[code]
// already connected to the db
$sql = "SELECT * FROM Customers ORDER BY LastName ASC, FirstName ASC";
$result = mysql_query($sql) or die(mysql_error());

while($row = mysql_fetch_assoc($result)) {
    // generate the javascript
}
[/code]

The customer database can get potentially large so that this file could take
a while to generate. Currently there are only 300 records but I anticipate
many more. Does anyone have any recommendations that might speed this up?

Josh

"- Edwin -" <copperwa11syahoo.co.jp> wrote:
> > Does anybody know how I can make force a javascript file (written in
> > PHP) to be cached if the user agent allows it?
> >
> > Here is the situation:
> > I am creating a dropdown menu system that contains a customer list,
> > loaded from a database. This list is written to the javascript file
> > for the menu. The menu can be quite large as the data grows. What I
> > would like to do, is force it to be cached (unless of course the
> > user agent doesn't allow it) so that it doesn't have to make the
> > call to generate the file each time.
>
> What is the second "it" in the last sentence above? A browser wouldn't
> make the call to "generate" the javascript file each time.
>
> > I have searched through the php.net website and even through the
> > HTTP/1.1 protocols. I am continuing to look, but have not found a
> > definite answer as to whether or not what I am trying to do is
> > possible.
>
> Just make sure that the javascript is on a separate file (i.e.
> whatever.js) and that it's NOT being generated by your (php) script
> each time. Then, "call" that file from inside your html/php page.

attached mail follows:


On Mon, Oct 20, 2003 at 05:28:08PM -0500, Joseph Bannon wrote:
:
: How do you print the error message sent back from MySQL?
:
: $resultCC = mysql_query($queryCC) or die("???");

Stop using stupid Perl syntax.

        $res = mysql_query($query);
        if ($res === false)
        {
                # print error to stdout
                #
                echo mysql_errno() . ": " . mysql_error(). "\n";
        }

attached mail follows:


I am trying to create a remote status page for my website. So far, I
have found the fsockopen() function and used the example code to create
the following basic script:

<?php
$fp = fsockopen ("xxx.xxx.xxx.xxx", 80, $errno, $errstr, 30);
if (!$fp) {
         echo "Down\n";
}
else {
         echo "Up\n";
         fclose ($fp);
}
?>

While this works when the server is UP, I get the following error when
it is down along with the 'Down' output:

Warning: fsockopen(): php_hostconnect: connect failed in
/****/public_html/status/test.php on line 2

Warning: fsockopen(): unable to connect to xxx.xxx.xxx.xxx:80 in
/****/public_html/status/test.php on line 2
Down

Can anyone help me out here?

Thanks,
Jason Williard

attached mail follows:


Hi,

Tuesday, October 21, 2003, 5:04:14 PM, you wrote:
JW> I am trying to create a remote status page for my website. So far, I
JW> have found the fsockopen() function and used the example code to create
JW> the following basic script:

JW> <?php
JW> $fp = fsockopen ("xxx.xxx.xxx.xxx", 80, $errno, $errstr, 30);
JW> if (!$fp) {
JW> echo "Down\n";
JW> }
JW> else {
JW> echo "Up\n";
JW> fclose ($fp);
JW> }
?>>

JW> While this works when the server is UP, I get the following error when
JW> it is down along with the 'Down' output:

JW> Warning: fsockopen(): php_hostconnect: connect failed in
JW> /****/public_html/status/test.php on line 2

JW> Warning: fsockopen(): unable to connect to xxx.xxx.xxx.xxx:80 in
JW> /****/public_html/status/test.php on line 2
JW> Down

JW> Can anyone help me out here?

JW> Thanks,
JW> Jason Williard

change your call to fsockopen() which will tell it to ignore errors

--
regards,
Tom

attached mail follows:


On Tue, 21 Oct 2003 00:04:14 -0700
Jason Williard <jasonjanix.net> wrote:

> I am trying to create a remote status page for my website. So far,
> I have found the fsockopen() function and used the example code to
> create the following basic script:
>
> <?php
> $fp = fsockopen ("xxx.xxx.xxx.xxx", 80, $errno, $errstr, 30);
> if (!$fp) {
> echo "Down\n";
> }
> else {
> echo "Up\n";
> fclose ($fp);
> }
> ?>
>
> While this works when the server is UP, I get the following error
> when it is down along with the 'Down' output:
>
> Warning: fsockopen(): php_hostconnect: connect failed in
> /****/public_html/status/test.php on line 2
>
> Warning: fsockopen(): unable to connect to xxx.xxx.xxx.xxx:80 in
> /****/public_html/status/test.php on line 2
> Down
>
> Can anyone help me out here?

Not sure what kind of help you're looking for but if you just want to
suppress errors, try this instead:

  $fp = fsockopen("xxx.xxx.xxx.xxx", 80, $errno, $errstr, 30);

Or, adjust error_reporting level: http://www.php.net/error-reporting

- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

attached mail follows:


Thank you. That worked perfectly.

Jason

-----Original Message-----
From: Tom Rogers [mailto:trogerskwikin.com]
Sent: Tuesday, October 21, 2003 12:34 AM
To: Jason Williard
Cc: php-generallists.php.net
Subject: Re: [PHP] Test Connection - fsockopen()

Hi,

Tuesday, October 21, 2003, 5:04:14 PM, you wrote:
JW> I am trying to create a remote status page for my website. So far,
I
JW> have found the fsockopen() function and used the example code to
create
JW> the following basic script:

JW> <?php
JW> $fp = fsockopen ("xxx.xxx.xxx.xxx", 80, $errno, $errstr, 30);
JW> if (!$fp) {
JW> echo "Down\n";
JW> }
JW> else {
JW> echo "Up\n";
JW> fclose ($fp);
JW> }
?>>

JW> While this works when the server is UP, I get the following error
when
JW> it is down along with the 'Down' output:

JW> Warning: fsockopen(): php_hostconnect: connect failed in
JW> /****/public_html/status/test.php on line 2

JW> Warning: fsockopen(): unable to connect to xxx.xxx.xxx.xxx:80 in
JW> /****/public_html/status/test.php on line 2
JW> Down

JW> Can anyone help me out here?

JW> Thanks,
JW> Jason Williard

change your call to fsockopen() which will tell it to ignore errors

--
regards,
Tom

attached mail follows:


When trying to run the following script, it returns the following error
"...Fatal error: Call to undefined function: w32api_register_function()...".
Does this w32api extension work?

// Define constants needed, taken from
// Visual Studio/Tools/Winapi/WIN32API.txt
define("MB_OK", 0);

// Load the extension in
dl("php_w32api.dll");

// Register the GetTickCount function from kernel32.dll
w32api_register_function("kernel32.dll",
  "GetTickCount",
                         "long");

attached mail follows:


One of the notes tells you about how to use it... It is somewhat changed
from what the documentation says...

$api = new win32;

$api->definetype("MEMORYSTATUS {
long dwLength;
long dwMemoryLoad;
long dwTotalPhys;
long dwAvailPhys;
long dwTotalPageFile;
long dwAvailPageFile;
long dwTotalVirtual;
long dwAvailVirtual;
}");
$api->registerfunction("long GlobalMemoryStatus (MEMORYSTATUS &a) From
kernel32.dll");
$api->registerfunction("long memstat_phys (long &a1,long &a2) From
w32apitest.dll");
$api->registerfunction("long memstat_pf (long &a1,long &a2) From
w32apitest.dll");
$api->registerfunction("long cool (MEMORYSTATUS a1) From w32apitest.dll");
$a=$api->InitType("MEMORYSTATUS");
$api->GlobalMemoryStatus($a); // call a w32api function

--
// DvDmanDT
MSN: dvdmandthotmail.com
Mail: dvdmandttelia.com
"Jon" <jzuazoaeuskalnet.net> skrev i meddelandet
news:20031021074722.80440.qmailpb1.pair.com...
> When trying to run the following script, it returns the following error
> "...Fatal error: Call to undefined function:
w32api_register_function()...".
> Does this w32api extension work?
>
> // Define constants needed, taken from
> // Visual Studio/Tools/Winapi/WIN32API.txt
> define("MB_OK", 0);
>
> // Load the extension in
> dl("php_w32api.dll");
>
> // Register the GetTickCount function from kernel32.dll
> w32api_register_function("kernel32.dll",
> "GetTickCount",
> "long");

attached mail follows:


Hi,

I want to give administrators of our CMS the possibility to use PHP commands
in HTML templates. Templates are parsed by our PHP script.

The problem is, that I don't want administrators to be able to list our
$GLOBALS (where is database password) or call our functions. Is there the
possibility to run administrator's PHP code (from our PHP) in clean
environment? Other solution?

   Thanks,
             Honza

attached mail follows:


The only way I can see is exec('php ...');

Honza Malik wrote:
> Hi,
>
> I want to give administrators of our CMS the possibility to use PHP commands
> in HTML templates. Templates are parsed by our PHP script.
>
> The problem is, that I don't want administrators to be able to list our
> $GLOBALS (where is database password) or call our functions. Is there the
> possibility to run administrator's PHP code (from our PHP) in clean
> environment? Other solution?
>
> Thanks,
> Honza
>

attached mail follows:


On Tue, Oct 21, 2003 at 02:48:09AM +0200, Honza Malik wrote:
:
: I want to give administrators of our CMS the possibility to use PHP commands
: in HTML templates. Templates are parsed by our PHP script.
:
: The problem is, that I don't want administrators to be able to list our
: $GLOBALS (where is database password) or call our functions. Is there the
: possibility to run administrator's PHP code (from our PHP) in clean
: environment? Other solution?

PHP doesn't really have the concept of a "safe interpreter". The next
best thing is to take a look at PHP's safe mode stuff and see what you
can tweek:

        http://www.php.net/manual/en/features.safe-mode.php

attached mail follows:


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi All,

        I have a strange problem with one of the sites i work on and provide
support for. I the following block of code that checks to see if
magic_quotes_gpc is enabled and if it is it dies with an error message:

if((integer)ini_get('magic_quotes_gpc')!=0){
~ debug('Magic Quotes GPC is currently active. Please disable.');
}

The debug functoin just displays a sorry message on the browser and
emails the description and the serialized $GLOBALS variable back to me.

in the php.ini i have the following:

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

Now every so often say at most 1 in 100 hits a user will see the sorry
screen and i get a call back email and every time its the same issue
'Magic Quotes GPC is currently active. Please disable.'

Anybody have any ideas on where to look?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/lP+zzSfrYDJMXmERAsiiAJ47tIqPJAnleJ8IuWNqsiStD7lOwgCfcO2n
ooo0+PKIf5T96UoWcqIQVWc=
=hIFY
-----END PGP SIGNATURE-----

attached mail follows:


From: "William Bailey" <wbpro-net.co.uk>

> I have a strange problem with one of the sites i work on and provide
> support for. I the following block of code that checks to see if
> magic_quotes_gpc is enabled and if it is it dies with an error message:
>
> if((integer)ini_get('magic_quotes_gpc')!=0){
> ~ debug('Magic Quotes GPC is currently active. Please disable.');
> }
>
> The debug functoin just displays a sorry message on the browser and
> emails the description and the serialized $GLOBALS variable back to me.
>
> in the php.ini i have the following:
>
> ; Magic quotes for incoming GET/POST/Cookie data.
> magic_quotes_gpc = Off
>
> Now every so often say at most 1 in 100 hits a user will see the sorry
> screen and i get a call back email and every time its the same issue
> 'Magic Quotes GPC is currently active. Please disable.'

Is it only for certain pages or random ones? Examing $GLOBALS doesn't give
any clues, I presume? Nothing strange in the query string, etc?

---John Holmes...

attached mail follows:


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It can be on any page.

The magic_quotes_gpc check takes place in a settings.php file which is
always the first thing included for every php page for this site. It has
a number of define statements and a few other includes and thats about
it. No database connections or anything else apart from class and
function declarations have taken place.

CPT John W. Holmes wrote:

| From: "William Bailey" <wbpro-net.co.uk>
|
|>I have a strange problem with one of the sites i work on and provide
|>support for. I the following block of code that checks to see if
|>magic_quotes_gpc is enabled and if it is it dies with an error message:
|>
|>if((integer)ini_get('magic_quotes_gpc')!=0){
|>~ debug('Magic Quotes GPC is currently active. Please disable.');
|>}
|>
|>The debug functoin just displays a sorry message on the browser and
|>emails the description and the serialized $GLOBALS variable back to me.
|>
|>in the php.ini i have the following:
|>
|>; Magic quotes for incoming GET/POST/Cookie data.
|>magic_quotes_gpc = Off
|>
|>Now every so often say at most 1 in 100 hits a user will see the sorry
|>screen and i get a call back email and every time its the same issue
|>'Magic Quotes GPC is currently active. Please disable.'
|
|
| Is it only for certain pages or random ones? Examing $GLOBALS doesn't give
| any clues, I presume? Nothing strange in the query string, etc?
|
| ---John Holmes...
|
|

- --
Regards,
        William Bailey.
        Pro-Net Internet Services Ltd.
        http://www.pro-net.co.uk/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/lR68zSfrYDJMXmERArIOAKCW7GgGw1+tp6q+mNNEY3tBtA0hAACgx0mD
8YVju4wwttUPFJtBz+EBwJk=
=xVnS
-----END PGP SIGNATURE-----

attached mail follows:


Hi,

  I am calling insert_user.php like this

<form method="post" name="form" action="insert_user.php" onsubmit="return
verifyIt(this);">

  This file and the index.php are kept in the same directory. But the
browser returns

  "The page cannot be displayed error"

  Where should I keep the insert_user.php

  Please help

Thank you.

_________________________________________________________________
Get Married! http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Search
from 7 lakh Brides & Grooms.

attached mail follows:


Try it with another browser and not IE to get a more meaningfull error
message.

Sudheer Palaparambil wrote:
> Hi,
>
> I am calling insert_user.php like this
>
> <form method="post" name="form" action="insert_user.php"
> onsubmit="return verifyIt(this);">
>
> This file and the index.php are kept in the same directory. But the
> browser returns
>
> "The page cannot be displayed error"
>
> Where should I keep the insert_user.php
>
> Please help
>
> Thank you.
>
> _________________________________________________________________
> Get Married! http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74
> Search from 7 lakh Brides & Grooms.
>

attached mail follows:


Hi,

  I tried Opera, it showed the following error.

      The page cannot be displayed
      The page you are looking for cannot be displayed because the page
address is incorrect.

      Please try the following:
      If you typed the page address in the Address bar, check that it is
entered correctly.

      Open the www.etooss.com home page and then look for links to the
information you want.
      HTTP 405 - Resource not allowed
      Internet Information Services

      Technical Information (for support personnel)
      More information:
      Microsoft Support

Sudheer

>From: Marek Kilimajer <kilimajerwebglobe.sk>
>To: Sudheer Palaparambil <p_sudheershotmail.com>
>CC: php-generallists.php.net
>Subject: Re: [PHP] The page cannot be displayed error
>Date: Tue, 21 Oct 2003 11:53:59 +0200
>
>Try it with another browser and not IE to get a more meaningfull error
>message.
>
>Sudheer Palaparambil wrote:
>>Hi,
>>
>> I am calling insert_user.php like this
>>
>><form method="post" name="form" action="insert_user.php" onsubmit="return
>>verifyIt(this);">
>>
>> This file and the index.php are kept in the same directory. But the
>>browser returns
>>
>> "The page cannot be displayed error"
>>
>> Where should I keep the insert_user.php
>>
>> Please help
>>
>>Thank you.
>>
>>_________________________________________________________________
>>Get Married! http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74
>>Search from 7 lakh Brides & Grooms.
>>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>

_________________________________________________________________
Contact brides & grooms FREE! http://www.shaadi.com/ptnr.php?ptnr=hmltag
Only on www.shaadi.com. Register now!

attached mail follows:


Hi,

Please post your replies to the list. You will have a much higher chance
to get help. For example I can't help you now because this seems to be
configuration error with IIS server and I don't know nothing about IIS.
Search the web for "HTTP 405 - Resource not allowed", this page seems to
have one possible answer: http://forums.devshed.com/archive/5/2002/4/4/34093

Sudheer Palaparambil wrote:
> Hello
>
> I tried Opera, it showed
>
> The page cannot be displayed
> The page you are looking for cannot be displayed because the page
> address is incorrect.
>
> Please try the following:
> If you typed the page address in the Address bar, check that it is
> entered correctly.
>
> Open the www.etooss.com home page and then look for links to the
> information you want.
> HTTP 405 - Resource not allowed
> Internet Information Services
>
> Technical Information (for support personnel)
> More information:
> Microsoft Support
>
>
> Please help
>
> Thank you.
>
> Sudheer
>
>
>
>
>> From: Marek Kilimajer <kilimajerwebglobe.sk>
>> To: Sudheer Palaparambil <p_sudheershotmail.com>
>> CC: php-generallists.php.net
>> Subject: Re: [PHP] The page cannot be displayed error
>> Date: Tue, 21 Oct 2003 11:53:59 +0200
>>
>> Try it with another browser and not IE to get a more meaningfull error
>> message.
>>
>> Sudheer Palaparambil wrote:
>>
>>> Hi,
>>>
>>> I am calling insert_user.php like this
>>>
>>> <form method="post" name="form" action="insert_user.php"
>>> onsubmit="return verifyIt(this);">
>>>
>>> This file and the index.php are kept in the same directory. But the
>>> browser returns
>>>
>>> "The page cannot be displayed error"
>>>
>>> Where should I keep the insert_user.php
>>>
>>> Please help
>>>
>>> Thank you.
>>>
>>> _________________________________________________________________
>>> Get Married! http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74
>>> Search from 7 lakh Brides & Grooms.
>>>
>>
>
> _________________________________________________________________
> Get Married! http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74
> Search from 7 lakh Brides & Grooms.
>

attached mail follows:


I am sorry, I did not mean to offend you. Your reply from the list was late.

attached mail follows:


From: "Sudheer Palaparambil" <p_sudheershotmail.com>
> I am calling insert_user.php like this
>
> <form method="post" name="form" action="insert_user.php" onsubmit="return
> verifyIt(this);">
>
> This file and the index.php are kept in the same directory. But the
> browser returns
>
> "The page cannot be displayed error"
>
> Where should I keep the insert_user.php

The files are in the right place. You may not be able to use POST, try GET
for your form method and see if that works.

---John Holmes...

attached mail follows:


Is there perhaps a redirect in the insert_user.php? If so, that could be the
problem.

-----Original Message-----
From: CPT John W. Holmes [mailto:holmes072000charter.net]
Sent: 21 October 2003 13:31
To: Sudheer Palaparambil; php-generallists.php.net
Subject: Re: [PHP] The page cannot be displayed error

From: "Sudheer Palaparambil" <p_sudheershotmail.com>
> I am calling insert_user.php like this
>
> <form method="post" name="form" action="insert_user.php" onsubmit="return
> verifyIt(this);">
>
> This file and the index.php are kept in the same directory. But the
> browser returns
>
> "The page cannot be displayed error"
>
> Where should I keep the insert_user.php

The files are in the right place. You may not be able to use POST, try GET
for your form method and see if that works.

---John Holmes...

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

attached mail follows:


> > Is there a way, for a cli script, to detect Ctrl_D or Ctrl_Z ?
[...]
> Take a look at pcntl functions, namely pcntl_signal.
> But this extension is not enabled by default.

Ok thanks a lot.

Will those functions be integrated in the next main release?
This question is just to know if I distribute such a php script,
will allways the users have to recompile PHP to use it?

attached mail follows:


"Chris W. Parker" <cparkerswatgear.com> wrote in message
news:001BD19C96E6E64E8750D72C2EA0ECEE2B81AAati-ex-01.ati.local...
PHP Webmaster <mailto:phpwadminphpwebmaster.co.uk>
    on Monday, October 20, 2003 4:36 PM said:

> As you can see, the above code will not work as the $title variable
> has not been set yet. So, I need a way of opening up the home.php
> file, extracting the line containing the $title variable and putting
> that information inbetween the <title></title> tags.

In that case do it backwards:

index.php:

<?php

$title = "page title";

include "header.php";

echo "<p>Welcome to the home page of our website.</p>\n"
."<p>Blah, blah and more blah!</p>\n";

include "footer.php";

?>

header.php:

<html>
<head>
<title><?php echo $title; ?></title>
</head>
<body>

footer.php:

</body>
</html>

Hope this helps!!

Chris.

--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

The above would work OK, but in the index.php file, where I have:

<?php
require("home.php");
?>

The required file will be changing all the time, that's why I want to set
the title in the individual pages and get the main page to read that
information.

attached mail follows:


"Php Webmaster" <phpwadminphpwebmaster.co.uk> wrote in message
news:20031020233506.78692.qmailpb1.pair.com...
> Anyway, the following code is inside of home.php:
> As you can see, the above code will not work as the $title variable has
not
> been set yet. So, I need a way of opening up the home.php file, extracting
> the line containing the $title variable and putting that information
> inbetween the <title></title> tags.

I do not completely get why are you doing things the way you are doing and
what exactly you tra to accomplish, but I guess you could have home-head.php
that defines the varibale, and include that before you use title variable.

But it seems to me that in the longer run you could consider some php
template system to approach such problems.

rush
--
http://www.templatetamer.com/

attached mail follows:


Hello,

  Actually i have created the field type as varchar..i am need to insert
some decimal values in that varchar field and use that values for
calculation...so it is possible to store the float value eventhough i
specified as varchar ?..and also i can use that values for calculation ??

Regards,
Uma

attached mail follows:


[snip]
  Actually i have created the field type as varchar..i am need to insert
some decimal values in that varchar field and use that values for
calculation...so it is possible to store the float value eventhough i
specified as varchar ?..and also i can use that values for calculation
??
[/snip]

This is more of a SQL question, but the short answer (with PHP) is yes,
you can use 'values' stored in varchar fields for calculation in PHP.
You may have to retrieve the value from the DB and then cast it to your
liking. See http://www.php.net/settype (it may be set_type, I am working
on less than one cup of coffee this morning thus far.

attached mail follows:


This is more than likely OT, but I am hoping that someone has seen
something like this. I am in of need something that will monitor a
directory for file receipts and execute a PHP script on each file as it
is received. A small daemon of some sort. I am STFW I we 'speak', but
this group knows so much that

A little more in-depth...
We receive several hundred XML files each day that describe groups of
services. I want/need to process each of those XML files in 'real-time'
as they are received. For reasons too numerous to go into I cannot use a
frequently running CRON job for this. Each file comes in via an FTP
process started by the sender, I need to see the file when it is
complete and then process it via the PHP script. So, the daemon would
'see' the completion of the file's arrival and would then call the
appropriate PHP script.

Can anyone point me in the right direction?

TVMIA!

attached mail follows:


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

You can also try http://www.php.net/manual/faq.php to get answers to
frequently answered questions about PHP (added by Christophe Chisogne).

2. 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 php-generallists.php.net 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)

10. One of the repeatedly discussed question in the list is "Best PHP editor".
Everyone has his/her favourite editor. You can get all the opinions by going
through the list archives. If you want a list try this link :
http://phpeditors.linuxbackup.co.uk/ (contributed by Christophe Chisogne).

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 (P) Ltd,
Chennai - 600106

attached mail follows:


Hi all...
I have a form that captures data, before then showing a few download
links...
However, If the user is in our office, I want to bypass the form...
so at the very top of my page, I've put this...
(details_captured is my variable I use on the form as a hidden field, to
confirm that the form has been submitted)

if ($REMOTE_ADDR == '111.222.333.444') {
        $_SESSION['details_captured'] == FALSE;
        $_SESSION['details_captured'] == "yes";
}

reset the session variable:
$_SESSION['details_captured'] == FALSE;

Re-asign it to yes:
$_SESSION['details_captured'] == "yes";

I'm new to sessions, but to me, this should work.. yet it doesn't..?
(Naturally, I've used an easy to read IP for this example)

*********************************************************************
The information contained in this e-mail message is intended only for
the personal and confidential use of the recipient(s) named above.
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.
***********************************************************************

attached mail follows:


Hi Tris,

> reset the session variable:
> $_SESSION['details_captured'] == FALSE;
>
> Re-asign it to yes:
> $_SESSION['details_captured'] == "yes";

You're using ==, which is the comparison operator - give it a go with just a
single = instead.

Cheers
Jon

attached mail follows:


$_SESSION['details_captured'] = "yes";

single =, and there is no need to "reset" the session variable.

Tristan.Prettyrisk.sungard.com wrote:
> Hi all...
> I have a form that captures data, before then showing a few download
> links...
> However, If the user is in our office, I want to bypass the form...
> so at the very top of my page, I've put this...
> (details_captured is my variable I use on the form as a hidden field, to
> confirm that the form has been submitted)
>
> if ($REMOTE_ADDR == '111.222.333.444') {
> $_SESSION['details_captured'] == FALSE;
> $_SESSION['details_captured'] == "yes";
> }
>
> reset the session variable:
> $_SESSION['details_captured'] == FALSE;
>
> Re-asign it to yes:
> $_SESSION['details_captured'] == "yes";
>
> I'm new to sessions, but to me, this should work.. yet it doesn't..?
> (Naturally, I've used an easy to read IP for this example)
>
> *********************************************************************
> The information contained in this e-mail message is intended only for
> the personal and confidential use of the recipient(s) named above.
> If the reader of this message is not the intended recipient or an agent
> responsible for delivering it to the intended recipient, you are hereby
> notified that you have received this document in error and that any
> review, dissemination, distribution, or copying of this message is
> strictly prohibited. If you have received this communication in error,
> please notify us immediately by e-mail, and delete the original message.
> ***********************************************************************
>
>

attached mail follows:


Hello PHP,

I found this small demonstration code on the net, that shows it really
good.

<?php
ob_start('ob_gzhandler');

print "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; // 30 a's
print "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; // 30 b's
print "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; // 30 a's

header('Content-Length: '.ob_get_length());
ob_end_flush();
?>

Call it with:
wget --header="Accept-Encoding: gzip" --header="Connection: close" -S http://localhost/test.php

on php-bugs I found that this is defined as "bogus", as the
compression takes place after all output is collected.

But I did not find an answer, how to correct this.. - using
ob_implicit_flush(); did also not help.

--
shinE!
http://www.thequod.de ICQ#152282665
PGP 8.0 key: http://thequod.de/danielhahler.asc

attached mail follows:


Hi,

<form method="post" name="form" action="insert_user.php" onsubmit="return
verifyIt(this);">

   This file and the index.php are kept in the same directory. But the
   browser returns

  I tried GET also, but not inserting the data to mysql db.

This is my insert_user.php

*---------------------------------
<html>
<body>
<?
$sFName = AddSlashes( $_POST['first_name'] );
$sLName = AddSlashes( $_POST['last_name'] );
$sEMail = AddSlashes( $_POST['e_mail'] );
mysql_connect( "localhost", "dbuser", "dbpwd" ) or die( "Failure" );
mysql_select_db( "users" );
$query = "INSERT INTO users( fname, lname, email, comments )
          VALUES ( '$sFName', '$sLName', '$sEMail', '$sComments' )";
$result = mysql_query( $query ) or die ( "Unable to insert user.." );
mysql_close( "users" );
header( "Location:index.php" );
?>
</body>
</html>
*------------------------------------------------------------

  Thank you.

Sudheer

_________________________________________________________________
He's the fastest Indian.He's Narain Karthikeyan.
http://server1.msn.co.in/sp03/tataracing/index.asp Will he make it to F1?

attached mail follows:


On Tue, 21 Oct 2003 18:22:26 +0530, you wrote:

><form method="post" name="form" action="insert_user.php" onsubmit="return
>verifyIt(this);">
>
> This file and the index.php are kept in the same directory. But the
> browser returns

405 is Method Not Allowed. My first guess would be that your web server
won't allow you to do POSTs to that resource.

If Apache, check httpd.conf or .htaccess within the directory. In any case,
not a PHP problem.

attached mail follows:


Aha!

I've worked out a (better?) way of doing:
<?
parse_str($_SERVER['QUERY_STRING']);
$params = array("keywords" => $keywords);

$library_xml_file = "library.xml";
$search_xsl_file = "simple-search.xsl";
$display_xsl_file = "display-results.xsl";

$library_xml_string = join('', file($library_xml_file));
$search_xsl_string = join('', file($search_xsl_file));
$display_xsl_string = join('', file($display_xsl_file));

$arg_buffer = array("/xml" => $library_xml_string, "/xslt" =>
$search_xsl_string);

$xh = xslt_create();

$results_xml_string = xslt_process($xh, "arg:/xml", "arg:/xslt", NULL,
$arg_buffer, $params);
xslt_free($xh);

$arg_buffer = array("/xml" => $results_xml_string, "/xslt" =>
$display_xsl_string);

$xh = xslt_create();

$results_html_string = xslt_process($xh, "arg:/xml", "arg:/xslt", NULL,
$arg_buffer);
echo $results_html_string;
xslt_free($xh);
?>

Thanks for all your suggestions!
--
Rich.
UEA/MUS::Record Library

attached mail follows:


Hello Everyone--

I wanted to let you know about a new initiative that php|architect has
launched: the Searchable PHP Mailing List Archive, which can be found at
http://phparch.com/mailinglists.

This is a fully searchable archive of the PHP mailing lists with an
attempt to build proper threading, keyword highlight, automatic quoted
text indentation and a few other features.

It's still a bit experimental, and some features don't work as best as
they could. However, it should be fairly functional, and the full-text
search engine can be helpful if you're looking for fast answers to
problems that are often asked on the mailing lists. It's there for
everyone to try, and please feel free to drop me a note if you think
something doesn't quite work the way it should or if you have ideas
about possible enhancement. At the present time, one of the things we're
working on is filtering the messages trough SpamAssassin and allowing
for the possibility to exclude messages marked as spam from the search
results.

We built our archive because we found it difficult to find a good search
resource dedicated only to the PHP mailing lists. I hope it will help
you, as well.

Cheers,

Marco Tabini
php|architect

attached mail follows:


From: "Marco Tabini" <marcottabini.ca>

> This is a fully searchable archive of the PHP mailing lists with an
> attempt to build proper threading, keyword highlight, automatic quoted
> text indentation and a few other features.

Everyone go check it out. The thread view and highlighting really make the
search results useful. You can never have to many archives; now if we can
just get people (new people) using them. ;)

Ma Siva Kumar,
Any chance you can add this to the [Newbie Guide] you regularly send out?

Thanks,

---John Holmes...

attached mail follows:


V. nice.
All the more importnat ot NOT HIJAC threads.
Miles

At 10:07 AM 10/21/2003 -0400, Marco Tabini wrote:
>Hello Everyone--
>
>I wanted to let you know about a new initiative that php|architect has
>launched: the Searchable PHP Mailing List Archive, which can be found at
>http://phparch.com/mailinglists.
>
>This is a fully searchable archive of the PHP mailing lists with an
>attempt to build proper threading, keyword highlight, automatic quoted
>text indentation and a few other features.
>
>It's still a bit experimental, and some features don't work as best as
>they could. However, it should be fairly functional, and the full-text
>search engine can be helpful if you're looking for fast answers to
>problems that are often asked on the mailing lists. It's there for
>everyone to try, and please feel free to drop me a note if you think
>something doesn't quite work the way it should or if you have ideas about
>possible enhancement. At the present time, one of the things we're working
>on is filtering the messages trough SpamAssassin and allowing for the
>possibility to exclude messages marked as spam from the search results.
>
>We built our archive because we found it difficult to find a good search
>resource dedicated only to the PHP mailing lists. I hope it will help you,
>as well.
>
>Cheers,
>
>
>Marco Tabini
>php|architect
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php