php-general Digest 27 Apr 2001 22:42:18 -0000 Issue 653

Topics (messages 50591 through 50703):

Re: Problem with the HTTP_REFERER
        50591 by: Geir Eivind Mork
        50599 by: Rosen
        50600 by: Simon Ould

please help!
        50592 by: kaab kaoutar

Re: What's wrong with Apache + php + mysql on Windows?
        50593 by: Steven Haryanto
        50612 by: Ivan Porro

Re: Parsing HTML files from an external web server
        50594 by: Tim Ward

session.auto_start problem
        50595 by: Andreas Wolff

Variable (naming them) Functions.
        50596 by: Maxim Maletsky
        50598 by: Maxim Maletsky
        50607 by: SED
        50636 by: PHPBeginner.com
        50650 by: Johnson, Kirk
        50652 by: PHPBeginner.com
        50654 by: Johnson, Kirk
        50661 by: Christian Reiniger
        50672 by: Yasuo Ohgaki
        50676 by: Philip Olson
        50678 by: PHPBeginner.com

Re: Sizeof a multi-dimensional array??
        50597 by: Tim Ward

explode won't explode
        50601 by: Tom Beidler
        50606 by: jdwright.mmm.com
        50662 by: Christian Reiniger

Re: What is this??
        50602 by: Manesh
        50605 by: Jon Haworth
        50623 by: Ivan Porro

Sorry, wrong sebject :)
        50603 by: Manesh
        50624 by: Steven Haryanto

Re: scripts execute as user nobody
        50604 by: Daniel BI

Re: Extracting the body of the http request entity? found it!
        50608 by: nik
        50611 by: Bruin, Bolke de
        50625 by: nik

PHP Book?
        50609 by: Hamed Nik
        50610 by: Johan Holst Nielsen
        50613 by: Angerer, Chad
        50615 by: Ivan Porro
        50637 by: Randal Pitt
        50641 by: Boaz Yahav
        50648 by: Simon Ould
        50667 by: Christian Reiniger
        50673 by: Kath
        50697 by: eschmid+sic.s.netic.de
        50700 by: Christian Reiniger
        50702 by: eschmid+sic.s.netic.de
        50703 by: Alex Piaz

Re: forms and RETURN key
        50614 by: Matt Williams

suggestions for binary data in database
        50616 by: Ray Hilton

Re: Ultradev PHP Server Model
        50617 by: Matt Williams
        50627 by: Ovidiu EFTIMIE

a (simple) question?
        50618 by: Ivan Porro
        50630 by: Michael Kimsal

Re: --enable-trans-sid and forms
        50619 by: Larry Hotchkiss
        50621 by: Boget, Chris
        50639 by: Johnson, Kirk
        50640 by: Boget, Chris
        50642 by: PHPBeginner.com
        50645 by: Johnson, Kirk
        50646 by: PHPBeginner.com
        50647 by: Boget, Chris

Re: PHP+MS Access and/or MS SQL
        50620 by: Ivan Porro
        50626 by: Andrew Hill
        50628 by: Ivan Porro

HELP!! Mail and attachments
        50622 by: Tym Rehm
        50685 by: Chris Anderson
        50687 by: Tym Rehm

Re: Submiting two forms at the same time
        50629 by: John Platte

Re: php4 on RedHat 7.1
        50631 by: .
        50671 by: Peter H. Lemieux
        50682 by: .

how to use Semaphore...
        50632 by: ±èº´°Ç

Re: Build problems
        50633 by: Yasuo Ohgaki

Re: parse error is always on line 1 == error ?
        50634 by: John Platte
        50638 by: Jimmy Lantz

Re: network error
        50635 by: claudia

mysql table speed
        50643 by: Bas Jochems
        50644 by: Jason Murray

Syntax for select statement
        50649 by: Don Pro
        50668 by: Christian Reiniger
        50679 by: Philip Olson

xslt_set_scheme_handler()
        50651 by: Heino H. Gehlsen

A lot of records
        50653 by: mfourny.bluewin.ch
        50660 by: PHPBeginner.com

Grand Opening
        50655 by: Merchandise WholeSale

nesting php
        50656 by: Brendan Caulfield
        50658 by: Jason Brooke

Storing php-code in mysqlDB
        50657 by: heinisch.creaction.de
        50659 by: Jason Murray
        50663 by: PHPBeginner.com

Re: rounding up
        50664 by: Joseph Bannon

line break part2
        50665 by: Gary
        50670 by: PHPBeginner.com
        50675 by: Philip Olson

sending content-type header after session_start()
        50666 by: matt.wong.tumbleweed.com

Re: Variable (naming them) Functions. DONE! DONE! DONE!
        50669 by: PHPBeginner.com

PHP4, .php3 files and Apache
        50674 by: Kath
        50677 by: Philip Olson
        50680 by: Kath

crypting a database
        50681 by: Augusto Cesar Castoldi

MP3
        50683 by: Rafael Faria
        50684 by: PHPBeginner.com

how to include() a string
        50686 by: Luca
        50688 by: Luca

exclusive execution
        50689 by: Nikhil Goyal
        50692 by: John Donagher
        50696 by: Nikhil Goyal
        50699 by: Nikhil Goyal

Win Apache/PHP config triping up virtual directory
        50690 by: Mike Gifford

Is PHP code software?
        50691 by: Kath
        50693 by: Chris Anderson
        50694 by: Kath
        50701 by: Christian Reiniger

How to chop off a char off end?
        50695 by: Dexter
        50698 by: Matthew DeChant

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


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


On Thursday 26 April 2001 13:33, Rosen wrote:
>  main.php:
>  <A HREF=test.php target= _blank>Click here</A>

You need a good deal of beating if you do your markup like that. there are 
something called a standard and that standard would make that line look like 
this:

<a href="test.php" ....

but anyway, make your own referer by using session variables or hardcode it.

-- 
 php developer / CoreTrek AS        | The three questions of greatest concern 
 Sandnes / Rogaland / Norway        | are -- 1. Is it attractive? 2. Is it
 web: http://www.moijk.net/         | amusing?  3. Does it know its place?  




Thanks very much !!!

Rosen Marinov


"Simon Ould" <[EMAIL PROTECTED]> wrote in message
511B289BD436D41199AE0001021A9B5E05C5AB@SERVER">news:511B289BD436D41199AE0001021A9B5E05C5AB@SERVER...
> My interpretation of the problem is:
> You want a link on page A.php which points to B.php,
> B.php does some stuff, then redirects the user to page C.php
>
> You want the value of HTTP_REFERER on page C.php to be A.php
>
> Correct? If so, read on, if not, then delete this email.
>
> I'm using php-4.0.4pl1, apache 1.3.14, IE5.5, win2000, and this works on
my
> system.
>
> My two solutions both use the following 2 files :
> [index.html]
> <HTML>
> <HEAD>
> <TITLE>Test</TITLE>
> </HEAD>
> <BODY>
> <A HREF="test.php" target="_blank">Click here</A>
> </BODY>
> </HTML>
>
> [targetpage.php]
> <HTML>
> <HEAD>
> <TITLE>targetpage.php</TITLE>
> </HEAD>
> <BODY>
> You came to this page from "<?php echo $HTTP_REFERER;?>"
> </BODY>
> </HTML>
>
>
> Solution 1:
> Use the php function "header"
> (http://www.php.net/manual/en/function.header.php)
>
> [test.php]
> <?php
> //... do stuff
> $web= "http://localhost/referer_test/targetpage.php";;
> header ("Location: ".$web);
> ?>
>
> -------------------
> Solution 2:
> Pass HTTP_REFERER in the URL: This also works on my system, but isn't
> exactly the neatest of methods.
>
> [test.php]
> <HTML>
> <HEAD>
> <TITLE>test.php</TITLE>
> </HEAD>
> <BODY>
> <?php
> $web= "localhost/referer_test/targetpage.php";
> $web= $web."?HTTP_REFERER=".$HTTP_REFERER; file://pass HTTP_REFERER
> in the URL
> echo "<SCRIPT
> language=\"javascript\">window.location.href=\"http://$web\";</script>";
> ?>
> </BODY>
> </HTML>
>
>
>
>
> Hope that helped,
>
> Simon.
>
> > -----Original Message-----
> > From: Rosen [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, April 27, 2001 07:56
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Problem with the HTTP_REFERER
> >
> >
> > Is anybody knows how can I redirect to another page
> > and the REFERER to another page to be my page ?
> >
> > Thanks,
> > Rosen Marinov
> ... snip ...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






I guess that this is worth a mention: (Copied from
http://www.php.net/manual/en/function.header.php)
"Remember that the header() function must be called before any actual output
is sent, either by normal HTML tags blank lines in a file, or from PHP. It
is a very common error to read code with include(), or require(), functions,
or another file access function, and have spaces or empty lines that will
output before header() is called. The same problem exists when using a
single PHP/HTML file." 


> -----Original Message-----
> From: Simon Ould [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 27, 2001 11:12
> To: 'Rosen'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Problem with the HTTP_REFERER

...snip...




Hi!
can u please chek this url http://www.tekora.com/tekora.html
its a flash demo of an online site builder?
do u think we can create a site for someone that way online using ph (fast 
template) ?
thanks
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





Are you referring to delay in executing PHP scripts? If you run PHP
as a CGI binary, that would give significant slowdown. CGI's are
much slower in Windows than in Linux.

Or perhaps you are running out of RAM? That really slows the whole
thing down.

Steve

At 4/27/2001 06:14 AM, Mig wrote:
>Hello, I can't understand the reason apache server running locally on my
>Win98 machine delays so much to respond browser when accesing php
>scripts in the form
>
>http://localhost/myscript.php
>
>When I transfer php scripts to host server via FTP, script execution is
>immediate, even remote server being in another continent.
>
>I was running apache + php + mysql on Win95 and delay was terrible. Now
>I moved to Win98 and delay became still worse.
>
>I know some parameter in httpd.conf or php.ini should be changed, but
>how to kwow which parameter?.
>
>Thanks for any idea.
>
>Mig





Hi,

I've a w2k installation with Apache and it's a very fast and reliable
environment. Ok, still prefer Linux but... My machine is a celeron433
(just pushed to 507) and 128M ram, w2kpro eng. Hope this help you,

bye


Steve Maroney wrote:
> 
> I think the question should be what's wrong with
> Windows?  :)
> 
> Sorry, I can't give you more of an intelligent answer
> 
> Steve
> 
> On Thu, 26 Apr 2001, Mig wrote:
> 
> > Hello, I can't understand the reason apache server running locally on my
> > Win98 machine delays so much to respond browser when accesing php
> > scripts in the form
> >
> > http://localhost/myscript.php
> >
> > When I transfer php scripts to host server via FTP, script execution is
> > immediate, even remote server being in another continent.
> >
> > I was running apache + php + mysql on Win95 and delay was terrible. Now
> > I moved to Win98 and delay became still worse.
> >
> > I know some parameter in httpd.conf or php.ini should be changed, but
> > how to kwow which parameter?.
> >
> > Thanks for any idea.
> >
> > Mig
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
(p)Ivan

Student 
DIST Bio-Lab
Viale Causa 13
16145 Genoa - Italy
 
tel: +39 010 3532789
e-mail: [EMAIL PROTECTED]




Are you looking at the site the calling script is on? I had the same problem
spidering my site to build a search engine. Using "http://localhost/";
instead of the site address got it working.

I find that file() works fine on external pages but falls over (in exactly
the same way as yours) when accessing local pages by web address instead of
localhost.

At the time my guess was that it was something to do with the firewall
thinking it was being spoofed (external call with an internal IP address),
but I'm a bit out of my depth here so that could be complete bollocks.

Anyway, hope this is of some help.

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: James Kneebone [mailto:[EMAIL PROTECTED]]
> Sent: 26 April 2001 12:57
> To: [EMAIL PROTECTED]
> Subject: Parsing HTML files from an external web server
> 
> 
> Hello List.
> 
> I'm having a little trouble with parsing HTML files and 
> inputting the data
> from
> the HTML file into a MySQL database. I get the following 
> error when trying
> toparse the file.
> 
> Warning: file("http://www.server.com/file.htm";) - No error in
> d:\webpages\world\lists.php on line 8
> 
> The following is part of my php code
> 
> <?
> 
> $url = "http://www.server.com/file.htm";;
> 
> $fileArray = file($url);
> 
> $state = 0;
> $line = 0;
> $ProvinceCount = 0;
> 
> $Details = Array();
> 
> ****************
> 
> I then have more code which parses the file and parses the 
> data and puts it in
> an array.
> 
> I was wondering whether anybody could provide information as 
> to what the
> possible problem could be. If you want more information, 
> please contact me
> off-list.
> 
> Thanks,
> 
> James  
> 




hi all,

i'm using PHP on a Win98 machine, and after switching session.auto_start=1,
PHP is enhancing every address with  SessionID's; well, normally I'm
satisfied with this behaviour, but for a single page containing some
javascript I would like to have it turned it off. I red there is a compiling
param for linux etc., but for the precompiled windows distribution i'm using
...
So, any idea's ??

Andreas Wolff





Hello everyone:
 
I was wondering, does anyone of you know a method to declare a function
(give it a name) basing on a value acquired during run time? 
 
I tried using the syntax as of a variable function call:
 
 
<snip>
 
   $fname = 'hello';
   function { sprintf("%s", $fname) }($arg='') {
      Return "I named you : $fname";
   }
   echo $fname($fname);
   # no luck...
 
 
   function {$fname}($arg='') { .... 
   # nope...
 
 
   function $fname($arg='') { .... 
   # neither...
 
</snip>
 
and so on... all parse errors...
 
 
 
Any way to do it?
 
I am looping an array with some function names checking if a function was
declared already, and if not then declare, if yes - give a different name.
 
I also went through these bibles:
   http://www.php.net/manual/en/ref.funchand.php
<http://www.php.net/manual/en/ref.funchand.php> 
but found nothing that helps.
 
Thanks in advance,
Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
  [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
  www.phpbeginner.com <http://www.phpbeginner.com> 

 





got a typo in my previous post:

I was trying this:

   $fname = 'hello';
   function { sprintf("%s", $fname) }($fname='') {
      Return "I named you : $fname";
   }
   echo $fname($fname);

But that doesn't matter...

Thanks,
waiting for your help.

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com





-----Original Message-----
From: Maxim Maletsky 
Sent: Friday, April 27, 2001 8:58 PM
To: 'PHP General List. (E-mail)'
Subject: [PHP] Variable (naming them) Functions.


Hello everyone:
 
I was wondering, does anyone of you know a method to declare a function
(give it a name) basing on a value acquired during run time? 
 
I tried using the syntax as of a variable function call:
 
 
<snip>
 
   $fname = 'hello';
   function { sprintf("%s", $fname) }($arg='') {
      Return "I named you : $fname";
   }
   echo $fname($fname);
   # no luck...
 
 
   function {$fname}($arg='') { .... 
   # nope...
 
 
   function $fname($arg='') { .... 
   # neither...
 
</snip>
 
and so on... all parse errors...
 
 
 
Any way to do it?
 
I am looping an array with some function names checking if a function was
declared already, and if not then declare, if yes - give a different name.
 
I also went through these bibles:
   http://www.php.net/manual/en/ref.funchand.php
<http://www.php.net/manual/en/ref.funchand.php> 
but found nothing that helps.
 
Thanks in advance,
Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
  [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
  www.phpbeginner.com <http://www.phpbeginner.com> 

 





Why not use classes? If I understand you problem correctly, I think classes
should solve your problem. Right?

SED

-----Original Message-----
From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
Sent: 27. apríl 2001 11:58
To: 'PHP General List. (E-mail)'
Subject: [PHP] Variable (naming them) Functions.


Hello everyone:

I was wondering, does anyone of you know a method to declare a function
(give it a name) basing on a value acquired during run time?

I tried using the syntax as of a variable function call:


<snip>

   $fname = 'hello';
   function { sprintf("%s", $fname) }($arg='') {
      Return "I named you : $fname";
   }
   echo $fname($fname);
   # no luck...


   function {$fname}($arg='') { ....
   # nope...


   function $fname($arg='') { ....
   # neither...

</snip>

and so on... all parse errors...



Any way to do it?

I am looping an array with some function names checking if a function was
declared already, and if not then declare, if yes - give a different name.

I also went through these bibles:
   http://www.php.net/manual/en/ref.funchand.php
<http://www.php.net/manual/en/ref.funchand.php>
but found nothing that helps.

Thanks in advance,
Sincerely,

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
  [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
  www.phpbeginner.com <http://www.phpbeginner.com>








no classes CAN'T solve my problem:

it is an abstraction layer. called as func_hello(); I want, inside
func_hello() {} declare a new function based on what happened before
func_hello() was called. In other words: I of course though about classes,
and there is in fact a work around, but I need to know if 'function
$var($arg) { return; }' syntax exists and what it is.

in the docs there's nothing being said.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-----Original Message-----
From: SED [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 27, 2001 9:53 PM
To: Maxim Maletsky
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Variable (naming them) Functions.


Why not use classes? If I understand you problem correctly, I think classes
should solve your problem. Right?

SED

-----Original Message-----
From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
Sent: 27. apríl 2001 11:58
To: 'PHP General List. (E-mail)'
Subject: [PHP] Variable (naming them) Functions.


Hello everyone:

I was wondering, does anyone of you know a method to declare a function
(give it a name) basing on a value acquired during run time?

I tried using the syntax as of a variable function call:


<snip>

   $fname = 'hello';
   function { sprintf("%s", $fname) }($arg='') {
      Return "I named you : $fname";
   }
   echo $fname($fname);
   # no luck...


   function {$fname}($arg='') { ....
   # nope...


   function $fname($arg='') { ....
   # neither...

</snip>

and so on... all parse errors...



Any way to do it?

I am looping an array with some function names checking if a function was
declared already, and if not then declare, if yes - give a different name.

I also went through these bibles:
   http://www.php.net/manual/en/ref.funchand.php
<http://www.php.net/manual/en/ref.funchand.php>
but found nothing that helps.

Thanks in advance,
Sincerely,

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
  [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
  www.phpbeginner.com <http://www.phpbeginner.com>





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Did you see create_function()? Not sure if this is what you are after, but
http://www.php.net/manual/en/function.create-function.php

Kirk

> -----Original Message-----
> From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
> Subject: [PHP] Variable (naming them) Functions.
> 
> Hello everyone:
>  
> I was wondering, does anyone of you know a method to declare 
> a function
> (give it a name) basing on a value acquired during run time? 




create_function seems not letting you choosing it's name.

am I right, or there's a way to say: create_function($name.$to.be, args,
args, args....)?


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 28, 2001 1:03 AM
To: 'PHP General List. (E-mail)'
Subject: RE: [PHP] Variable (naming them) Functions.


Did you see create_function()? Not sure if this is what you are after, but
http://www.php.net/manual/en/function.create-function.php

Kirk

> -----Original Message-----
> From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
> Subject: [PHP] Variable (naming them) Functions.
>
> Hello everyone:
>
> I was wondering, does anyone of you know a method to declare
> a function
> (give it a name) basing on a value acquired during run time?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






It lets you choose the variable name which you use when referencing the
function, but the actual function name is set by PHP (as lambda_1, lambda_2,
etc.)

<?
$test="myFunction";
$$test = create_function('$a,$b','return log($a * $b);');
echo "myFunction is ".$myFunction(2,2)."<br>";
?> 

Kirk

> -----Original Message-----
> From: PHPBeginner.com [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 27, 2001 10:27 AM
> To: Johnson, Kirk; 'PHP General List. (E-mail)'
> Subject: RE: [PHP] Variable (naming them) Functions.
> 
> 
> create_function seems not letting you choosing it's name.
> 
> am I right, or there's a way to say: 
> create_function($name.$to.be, args,
> args, args....)?
> 
> 
> Sincerely,
> 
>  Maxim Maletsky
>  Founder, Chief Developer
> 
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
> 
> 
> 
> 
> -----Original Message-----
> From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, April 28, 2001 1:03 AM
> To: 'PHP General List. (E-mail)'
> Subject: RE: [PHP] Variable (naming them) Functions.
> 
> 
> Did you see create_function()? Not sure if this is what you 
> are after, but
> http://www.php.net/manual/en/function.create-function.php
> 
> Kirk
> 
> > -----Original Message-----
> > From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
> > Subject: [PHP] Variable (naming them) Functions.
> >
> > Hello everyone:
> >
> > I was wondering, does anyone of you know a method to declare
> > a function
> > (give it a name) basing on a value acquired during run time?
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 
> 




On Friday 27 April 2001 17:08, PHPBeginner.com wrote:
> no classes CAN'T solve my problem:
>
> it is an abstraction layer. called as func_hello(); I want, inside
> func_hello() {} declare a new function based on what happened before
> func_hello() was called. In other words: I of course though about
> classes, and there is in fact a work around, but I need to know if
> 'function $var($arg) { return; }' syntax exists and what it is.
>
> in the docs there's nothing being said.

http://php.net/create_function
(maybe together with a little wrapper:
$foo = create_function (...);
$FNames [$var] = $foo;
function delta ($FuncName, $args) {
  return ${$FNames[$FuncName]} ($args);
}
)

But such a thing is an ugly hack and I'm sure you don't need it.


-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Error 032: Recursion error - see error 032




Variable functions?

<?php
foo () {
  echo 'this is foo';
}

bar () {
  echo 'this is bar';
}

$var = $HTTP_GET_VARS['fname'];

$$var();
?>

http://localhost/some_script.php?fname=foo

prints "this is foo";

http://localhost/some_script.php?fname=bar

print "this is bar"

Regards,
--
Yasuo Ohgaki


"Maxim Maletsky" <[EMAIL PROTECTED]> wrote in message
DC017B079D81D411998C009027B7112A015ED16A@EXC-TYO-01">news:DC017B079D81D411998C009027B7112A015ED16A@EXC-TYO-01...
> Hello everyone:
>
> I was wondering, does anyone of you know a method to declare a function
> (give it a name) basing on a value acquired during run time?
>
> I tried using the syntax as of a variable function call:
>
>
> <snip>
>
>    $fname = 'hello';
>    function { sprintf("%s", $fname) }($arg='') {
>       Return "I named you : $fname";
>    }
>    echo $fname($fname);
>    # no luck...
>
>
>    function {$fname}($arg='') { ....
>    # nope...
>
>
>    function $fname($arg='') { ....
>    # neither...
>
> </snip>
>
> and so on... all parse errors...
>
>
>
> Any way to do it?
>
> I am looping an array with some function names checking if a function was
> declared already, and if not then declare, if yes - give a different name.
>
> I also went through these bibles:
>    http://www.php.net/manual/en/ref.funchand.php
> <http://www.php.net/manual/en/ref.funchand.php>
> but found nothing that helps.
>
> Thanks in advance,
> Sincerely,
>
>  Maxim Maletsky
>  Founder, Chief Developer
>  PHPBeginner.com (Where PHP Begins)
>   [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>   www.phpbeginner.com <http://www.phpbeginner.com>
>
>
>
>


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


> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]






for point of reference regarding this thread :

  http://www.php.net/manual/en/functions.variable-functions.php


regards,
philip


On Sat, 28 Apr 2001, Yasuo Ohgaki wrote:

> Variable functions?
> 
> <?php
> foo () {
>   echo 'this is foo';
> }
> 
> bar () {
>   echo 'this is bar';
> }
> 
> $var = $HTTP_GET_VARS['fname'];
> 
> $$var();
> ?>
> 
> http://localhost/some_script.php?fname=foo
> 
> prints "this is foo";
> 
> http://localhost/some_script.php?fname=bar
> 
> print "this is bar"
> 
> Regards,
> --
> Yasuo Ohgaki
> 
> 
> "Maxim Maletsky" <[EMAIL PROTECTED]> wrote in message
> DC017B079D81D411998C009027B7112A015ED16A@EXC-TYO-01">news:DC017B079D81D411998C009027B7112A015ED16A@EXC-TYO-01...
> > Hello everyone:
> >
> > I was wondering, does anyone of you know a method to declare a function
> > (give it a name) basing on a value acquired during run time?
> >
> > I tried using the syntax as of a variable function call:
> >
> >
> > <snip>
> >
> >    $fname = 'hello';
> >    function { sprintf("%s", $fname) }($arg='') {
> >       Return "I named you : $fname";
> >    }
> >    echo $fname($fname);
> >    # no luck...
> >
> >
> >    function {$fname}($arg='') { ....
> >    # nope...
> >
> >
> >    function $fname($arg='') { ....
> >    # neither...
> >
> > </snip>
> >
> > and so on... all parse errors...
> >
> >
> >
> > Any way to do it?
> >
> > I am looping an array with some function names checking if a function was
> > declared already, and if not then declare, if yes - give a different name.
> >
> > I also went through these bibles:
> >    http://www.php.net/manual/en/ref.funchand.php
> > <http://www.php.net/manual/en/ref.funchand.php>
> > but found nothing that helps.
> >
> > Thanks in advance,
> > Sincerely,
> >
> >  Maxim Maletsky
> >  Founder, Chief Developer
> >  PHPBeginner.com (Where PHP Begins)
> >   [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> >   www.phpbeginner.com <http://www.phpbeginner.com>
> >
> >
> >
> >
> 
> 
> --------------------------------------------------------------------------------
> 
> 
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 





no, I knew that,

my problem was generating functions with dynamic names.

I solved it with a simple eval(), see my last post below;

Thanks, Yasuo,


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 28, 2001 3:27 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Variable (naming them) Functions.


Variable functions?

<?php
foo () {
  echo 'this is foo';
}

bar () {
  echo 'this is bar';
}

$var = $HTTP_GET_VARS['fname'];

$$var();
?>

http://localhost/some_script.php?fname=foo

prints "this is foo";

http://localhost/some_script.php?fname=bar

print "this is bar"

Regards,
--
Yasuo Ohgaki


"Maxim Maletsky" <[EMAIL PROTECTED]> wrote in message
DC017B079D81D411998C009027B7112A015ED16A@EXC-TYO-01">news:DC017B079D81D411998C009027B7112A015ED16A@EXC-TYO-01...
> Hello everyone:
>
> I was wondering, does anyone of you know a method to declare a function
> (give it a name) basing on a value acquired during run time?
>
> I tried using the syntax as of a variable function call:
>
>
> <snip>
>
>    $fname = 'hello';
>    function { sprintf("%s", $fname) }($arg='') {
>       Return "I named you : $fname";
>    }
>    echo $fname($fname);
>    # no luck...
>
>
>    function {$fname}($arg='') { ....
>    # nope...
>
>
>    function $fname($arg='') { ....
>    # neither...
>
> </snip>
>
> and so on... all parse errors...
>
>
>
> Any way to do it?
>
> I am looping an array with some function names checking if a function was
> declared already, and if not then declare, if yes - give a different name.
>
> I also went through these bibles:
>    http://www.php.net/manual/en/ref.funchand.php
> <http://www.php.net/manual/en/ref.funchand.php>
> but found nothing that helps.
>
> Thanks in advance,
> Sincerely,
>
>  Maxim Maletsky
>  Founder, Chief Developer
>  PHPBeginner.com (Where PHP Begins)
>   [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>   www.phpbeginner.com <http://www.phpbeginner.com>
>
>
>
>


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


> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






you need to count all the elements in each of the elements. $x is a simple
array each member of which is an array

<?php
function ArraySize($Array)
{       $count = 0;
        foreach($Array as $Element)
        {       if (is_array($Element))
                {       $count += ArraySize($Element);
                } else
                {       $count++;
                }
        }
        return $count;
}
?>

this should work for any array, although for some reason it falls over if
the array passed in hasn't been predfined as an array.

i.e.
<?php
$fred = array();
$fred[1][1][1] = 5;
$fred[1][2][3] = 5;
$fred[2][2][3] = 5;
echo(ArraySize($fred));
?>
... works
but ...
<?php
$fred[1][1][1] = 5;
$fred[1][2][3] = 5;
$fred[2][2][3] = 5;
echo(ArraySize($fred));
?>
... doesn't. I haven't worked out why, yet.

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: Chris Anderson [mailto:[EMAIL PROTECTED]]
> Sent: 25 April 2001 01:31
> To: PHP
> Subject: Sizeof a multi-dimensional array??
> 
> 
> Alright, count($x) would give me the number of array elements 
> in $x. But how can I get the count of a multi-dimensional 
> array? Count($x[0]) doesn't seem to work. Thanks in advance
> 
> Chris Anderson   aka "Null"    
> --------------------------------------------
> PHP Developer / Nulltech
> PHP-GTK Tester / gtk.php.net
> STA Administrator / www.stronger.org
> DOD Co-Owner / www.dayofdefeat.com
> 
> 




I have the following code that doesn't seem to "explode." I'm trying to make
a field that looks like 21,23,25,27 or small,medium,large,x-large into a
pulldown menu with the individual item broken out.

if (($size != "") && ($size != "n/a")) {
   $sizearry = explode(",", $size);
   while (list($key,$value) = each($sizearry)) {
   $size_option_block .= "<option value=\"$value\">$size</option>\n";
}

The interesting thing (and probably the problem) is that I have very similar
code just before it that works fine. Here's the code that appears just
before and works.

if (($color != "") && ($color != "n/a")) {
   $colorarry = explode(",", $color);
   while (list($key,$value) = each($colorarry)) {
   $color_option_block .= "<option value=\"$value\">$value</option>\n";
}

I'm not that familiar with explode. Are my $key and $value variables
conflicting?


>>.>>.>>>.>>>>>.>>>>>>>>>.>>>>>>>>
Tom Beidler
Orbit Tech Services
805.682.8972 (phone)
805.682.5833 (fax)
[EMAIL PROTECTED]
http://www.orbittechservices.com/
>>.>>.>>>.>>>>>.>>>>>>>>>.>>>>>>>>








Hiya,

> I have the following code that doesn't seem to "explode." I'm trying to make
> a field that looks like 21,23,25,27 or small,medium,large,x-large into a
> pulldown menu with the individual item broken out.
>
> if (($size != "") && ($size != "n/a")) {
>    $sizearry = explode(",", $size);
>    while (list($key,$value) = each($sizearry)) {
>    $size_option_block .= "<option value=\"$value\">$size</option>\n";
> }

I think you've used the wrong varaible between <option></option>. You should
have $value, but you've put in the original variable: $size.

> The interesting thing (and probably the problem) is that I have very similar
> code just before it that works fine. Here's the code that appears just
> before and works.
>
> if (($color != "") && ($color != "n/a")) {
>    $colorarry = explode(",", $color);
>    while (list($key,$value) = each($colorarry)) {
>    $color_option_block .= "<option value=\"$value\">$value</option>\n";
> }
>
> I'm not that familiar with explode. Are my $key and $value variables
> conflicting?
>
>
> >>.>>.>>>.>>>>>.>>>>>>>>>.>>>>>>>>
> Tom Beidler
> Orbit Tech Services
> 805.682.8972 (phone)
> 805.682.5833 (fax)
> [EMAIL PROTECTED]
> http://www.orbittechservices.com/
> >>.>>.>>>.>>>>>.>>>>>>>>>.>>>>>>>>






On Friday 27 April 2001 14:15, Tom Beidler wrote:
> I have the following code that doesn't seem to "explode." I'm trying to
> make a field that looks like 21,23,25,27 or small,medium,large,x-large
> into a pulldown menu with the individual item broken out.
>
> if (($size != "") && ($size != "n/a")) {
>    $sizearry = explode(",", $size);
>    while (list($key,$value) = each($sizearry)) {
>    $size_option_block .= "<option value=\"$value\">$size</option>\n";

Why are yo using $size (the unexploded string) in the last line?

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Error 032: Recursion error - see error 032




I need a free web server that gives me 1 Myslq accound and php hoasting!  if
soneone know of any please tell me.

thx





Try http://members.evolt.org/

HTH
Jon


-----Original Message-----
From: Manesh [mailto:[EMAIL PROTECTED]]
Sent: 27 April 2001 13:35
To: Manesh; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] RE: What is this??


I need a free web server that gives me 1 Myslq accound and php hoasting!  if
soneone know of any please tell me.

thx


**********************************************************************
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**********************************************************************




try

error_reporting(E_ERROR);

on top of script. PHP 4 don't like variable (such i.e. variable checked
in if() ) before u declare or set them (i.e. in one-page only form
management.

by.

(note: u must be sure that the variable is used correctly! this only
kill the annoyng warning)

Manesh wrote:
> 
> where is that?
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jack
> Dempsey
> Sent: Thursday, April 26, 2001 10:38 PM
> To: Manesh
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] What is this??
> 
> Manesh wrote:
> >
> > Warning: Undefined variable
> >
> > How do i get rid of this???
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> if you're sure that its because you didn't initialize first before
> using, then look in your php.ini file...there are options there where
> you can error strictness...
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
(p)Ivan

Student 
DIST Bio-Lab
Viale Causa 13
16145 Genoa - Italy
 
tel: +39 010 3532789
e-mail: [EMAIL PROTECTED]







I need a free web server that gives me 1 Myslq accound and php hoasting!  if
soneone know of any please tell me.

thx






At 4/27/2001 07:35 PM, Manesh wrote:



>I need a free web server that gives me 1 Myslq accound and php hoasting!  if
>soneone know of any please tell me.
>
>thx


search php knowlegde base at www.faqts.com, you'll find a bunch
of such links there.

--
sh





If you are compiling php as an apache module,
you may configure apache with the options:
--server-uid=asduk 
and
--server-gid=asdukgrp
(or what you want..)

if you don't compile them at all, may try to
set the directory's group as asdukgrp like this:

chgrp asdukgrp -R path-to-your-php-scripts-dir

it should work.

Daniel BI

==original message==
I have a problem with my PHP scripts on my web-hot, all my php scripts are
running as the user nobody (group nobody).

Whenever I login via ftp/telnet I am logged in as the user asduk (group
asdukgrp).

The problem I have is that I cannot delete my files because the permissions
on the directory is set to 775. I cannot change to the user nobody  my host
will not allow that.

If I change the permissions on the directories to 777 then I can delete the
files, but have read that this is dangerous.

If anyone has suggestions on how to get round this problem I'd appreciate
them (or let me know if a user browsing a php site in directories with
permission 777 can exploit this).

I am using PHP 3.0.14 (when using PHP4.05 RC1 on a different host I don't
get this problem - but need this working with PHP 3.0.14)

Thanks for any help
Mr. Adam ALLEN.








>
> According to the w3c docs, POSTed  content is sent in the "request
> entity body".  Since the request has a header, it's logical that it can
> have a body too :-) but I don't see any PHP functionality for getting at
> it. Someone in another group suggested accessing a variable called
> $HTTP_RAW_POST_DATA, but that doesn't seem to exist when I POST data to
> either of my test systems, which are Linux/Apache or Win98/PWS.
>
> PHP itself must be able to extract the POSTed data - it does so when
> saving a POSTed file to its temporary location - but this function don't
> seem to be exposed in the API... is it?

Sorry to answer my own question!

If you POST an html form with input elements, these are parsed by PHP into
variables, and the data is discarded.  BUT if you POST raw data from a
generic http component, without sending name-value pairs, this data is
exposed in $HTTP_RAW_POST_DATA.

nik






I would like to add a note to this, that this works in general, but
the thing which actually triggers the setting of $HTTP_POST_RAW_DATA
is a not recognized mime-type.

Bolke

-----Oorspronkelijk bericht-----
Van: nik [mailto:[EMAIL PROTECTED]]
Verzonden: Friday, April 27, 2001 3:04 PM
Aan: [EMAIL PROTECTED]
Onderwerp: Re: [PHP] Extracting the body of the http request entity?
found it!


>
> According to the w3c docs, POSTed  content is sent in the "request
> entity body".  Since the request has a header, it's logical that it can
> have a body too :-) but I don't see any PHP functionality for getting at
> it. Someone in another group suggested accessing a variable called
> $HTTP_RAW_POST_DATA, but that doesn't seem to exist when I POST data to
> either of my test systems, which are Linux/Apache or Win98/PWS.
>
> PHP itself must be able to extract the POSTed data - it does so when
> saving a POSTed file to its temporary location - but this function don't
> seem to be exposed in the API... is it?

Sorry to answer my own question!

If you POST an html form with input elements, these are parsed by PHP into
variables, and the data is discarded.  BUT if you POST raw data from a
generic http component, without sending name-value pairs, this data is
exposed in $HTTP_RAW_POST_DATA.

nik


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






> I would like to add a note to this, that this works in general, but
> the thing which actually triggers the setting of $HTTP_POST_RAW_DATA
> is a not recognized mime-type.
>

Aha!  Blinding light of understanding - THANKYOU!

nik






Hey everyone...

I've been programming in perl for about 3 years now, i have installed php
and have been working on it for about three weeks. I started by converting
some of the programs I've written in Perl to PHP.... it seems its pretty
similar to Perl and not very hard to learn for a perl programmer... but i
need some reference book with some practical examples so i could work
with... and probably something that gives me ideas on different types of
programs and things that i could do in PHP... something that covers
everything in PHP... and is NOT copied from the manual! :))

I am sure most of you in this group have got some sort of a PHP book... can
you please tell me out of your experience which ones are good for me to buy?

Regards
Hamed Nik







> Hey everyone...
>
> I've been programming in perl for about 3 years now, i have installed php
> and have been working on it for about three weeks. I started by converting
> some of the programs I've written in Perl to PHP.... it seems its pretty
> similar to Perl and not very hard to learn for a perl programmer... but i
> need some reference book with some practical examples so i could work
> with... and probably something that gives me ideas on different types of
> programs and things that i could do in PHP... something that covers
> everything in PHP... and is NOT copied from the manual! :))
>
> I am sure most of you in this group have got some sort of a PHP
> book... can
> you please tell me out of your experience which ones are good for
> me to buy?

Try "Core PHP Programmning", it's have a lot of good stuff!

/Johan





Professional PHP by WROX.  Great book.  It provides you with some real world
examples.

Chad Angerer
HTML Programmer
Internet Broadcasting Systems
651.365.4006


-----Original Message-----
From: Hamed Nik [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 27, 2001 8:10 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Book?


Hey everyone...

I've been programming in perl for about 3 years now, i have installed php
and have been working on it for about three weeks. I started by converting
some of the programs I've written in Perl to PHP.... it seems its pretty
similar to Perl and not very hard to learn for a perl programmer... but i
need some reference book with some practical examples so i could work
with... and probably something that gives me ideas on different types of
programs and things that i could do in PHP... something that covers
everything in PHP... and is NOT copied from the manual! :))

I am sure most of you in this group have got some sort of a PHP book... can
you please tell me out of your experience which ones are good for me to buy?

Regards
Hamed Nik




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Hi,

i suggest three:

o) Beginning PHP4 by Chris Lea et. al. Editors ISBN and so on at:

www.amazon.com/exec/obidos/search-handle-form/107-8101819-4534115

o) PHP poket reference by Rasmus Leedorf, O'Reilly. OK 4 a brief fuction
reference and fundamentals (it's the best choice when you learn
something about php but u dn.t want to go out with a 5 inch manual.


o) www.phpbuilder.com  they have tutorials from beginners (i.e. php
programming with MySQL) to advanced (page caching & compression). I've
learned a lot of php on Web.


Hamed Nik wrote:
> 
> Hey everyone...
> 
> I've been programming in perl for about 3 years now, i have installed php
> and have been working on it for about three weeks. I started by converting
> some of the programs I've written in Perl to PHP.... it seems its pretty
> similar to Perl and not very hard to learn for a perl programmer... but i
> need some reference book with some practical examples so i could work
> with... and probably something that gives me ideas on different types of
> programs and things that i could do in PHP... something that covers
> everything in PHP... and is NOT copied from the manual! :))
> 
> I am sure most of you in this group have got some sort of a PHP book... can
> you please tell me out of your experience which ones are good for me to buy?
> 
> Regards
> Hamed Nik
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
(p)Ivan

Student 
DIST Bio-Lab
Viale Causa 13
16145 Genoa - Italy
 
tel: +39 010 3532789
e-mail: [EMAIL PROTECTED]




I used 'Professional PHP Programming' by WROX Press first, but to learn more
about what PHP can do and the best way to do it, I recommend 'Web
Application Development with PHP4', you can get both from Amazon.

Randal.


"Hamed Nik" wrote in message <9cbr3a$mkc$[EMAIL PROTECTED]>...
>Hey everyone...
>
>I've been programming in perl for about 3 years now, i have installed php
>and have been working on it for about three weeks. I started by converting
>some of the programs I've written in Perl to PHP.... it seems its pretty
>similar to Perl and not very hard to learn for a perl programmer... but i
>need some reference book with some practical examples so i could work
>with... and probably something that gives me ideas on different types of
>programs and things that i could do in PHP... something that covers
>everything in PHP... and is NOT copied from the manual! :))
>
>I am sure most of you in this group have got some sort of a PHP book... can
>you please tell me out of your experience which ones are good for me to
buy?
>
>Regards
>Hamed Nik
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






You can check for PHP / MySQL books at :

PHP:
====
http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg
ory%3D156%26SubCategory%3D106%26SubCategoryName%3DPHP%26MainCategoryName%3DB
ooks

MySQL:
======
http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg
ory%3D156%26SubCategory%3D1%26SubCategoryName%3DMySQL%26MainCategoryName%3DB
ooks


And you can also check the Articles / tutorials and examples on weberdev as
a very good reference.

Sincerely

      berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.

-----Original Message-----
From: Hamed Nik [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 27, 2001 3:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Book?


Hey everyone...

I've been programming in perl for about 3 years now, i have installed php
and have been working on it for about three weeks. I started by converting
some of the programs I've written in Perl to PHP.... it seems its pretty
similar to Perl and not very hard to learn for a perl programmer... but i
need some reference book with some practical examples so i could work
with... and probably something that gives me ideas on different types of
programs and things that i could do in PHP... something that covers
everything in PHP... and is NOT copied from the manual! :))

I am sure most of you in this group have got some sort of a PHP book... can
you please tell me out of your experience which ones are good for me to buy?

Regards
Hamed Nik




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




"PHP Developers Cookbook", by Sterling Hughes
I like it: as the name might suggest, it is packed with real-World examples.

I also bought "Beginning PHP Programming" (Wrox press). Mistake. Big
mistake. It is aimed at people who are *completely* new to programming. The
review that I read of it didn't convey this aspect :(

For example, in chapter 5 or 6 there is a paragraph along the lines of:
"You know that we told you to make your code reusable? Here's why: you can
use something called a function......." 
I actually found it vaguely funny, whilst I was banging my head against the
wall.

> -----Original Message-----
> From: Hamed Nik [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 27, 2001 14:10
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP Book?
> 
> 
> Hey everyone...
> 
> I've been programming in perl for about 3 years now, i have 
> installed php
> and have been working on it for about three weeks. I started 
> by converting
> some of the programs I've written in Perl to PHP.... it seems 
> its pretty
> similar to Perl and not very hard to learn for a perl 
> programmer... but i
> need some reference book with some practical examples so i could work
> with... and probably something that gives me ideas on 
> different types of
> programs and things that i could do in PHP... something that covers
> everything in PHP... and is NOT copied from the manual! :))
> 
> I am sure most of you in this group have got some sort of a 
> PHP book... can
> you please tell me out of your experience which ones are good 
> for me to buy?
> 
> Regards
> Hamed Nik
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




On Friday 27 April 2001 15:15, Johan Holst Nielsen wrote:
> > Hey everyone...
> >
> > I've been programming in perl for about 3 years now, i have installed
> > php and have been working on it for about three weeks. I started by

> Try "Core PHP Programmning", it's have a lot of good stuff!

That book is definitely the wrong choice for someone with 3 years perl 
experience (perhaps unless there's a second edition).  The copy I 
unfortunately bought is built somehow like that:

5 pages useful intro
45 pages explaining basic language contructs [1]
4 pages explaining classes
11 pages giving a (small) overview of using print(), getting data from 
forms, file upoads, env-vars, cookies, include/require and file IO
340 pages function references (copied from the manual) [2]

After that comes the somehow useful part - overviews of common task areas 
- using databases, string munging, ...
But that's only quick overviews, and some of the topics are just about 
generic (language independent) stuff, e.g. the description of basic 
sorting algorithms (the stuff you do *not* want to use in PHP :)

Well, it gets one plus point because it includes an ASCII chart :)

So: forget about that book. If at all, you'll quickly glance over it and 
then let it collect dust forever.


[1]: Perl is very similar in this area. Just looking through the manual 
will be better (and quicker) than reading that book section

[2]: completely uses - the online manual is much quicker to search and 
much more up to date (the book only covers PHP3)


-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Error 032: Recursion error - see error 032




I agree 100% with Professional PHP Programming.  It was my first book.

Also "php fast and easy web development" by Julie Meloni.

- Kath

----- Original Message -----
From: "Angerer, Chad" <[EMAIL PROTECTED]>
To: "'Hamed Nik'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, April 27, 2001 9:21 AM
Subject: RE: [PHP] PHP Book?


> Professional PHP by WROX.  Great book.  It provides you with some real
world
> examples.
>
> Chad Angerer
> HTML Programmer
> Internet Broadcasting Systems
> 651.365.4006
>
>
> -----Original Message-----
> From: Hamed Nik [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 27, 2001 8:10 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP Book?
>
>
> Hey everyone...
>
> I've been programming in perl for about 3 years now, i have installed php
> and have been working on it for about three weeks. I started by converting
> some of the programs I've written in Perl to PHP.... it seems its pretty
> similar to Perl and not very hard to learn for a perl programmer... but i
> need some reference book with some practical examples so i could work
> with... and probably something that gives me ideas on different types of
> programs and things that i could do in PHP... something that covers
> everything in PHP... and is NOT copied from the manual! :))
>
> I am sure most of you in this group have got some sort of a PHP book...
can
> you please tell me out of your experience which ones are good for me to
buy?
>
> Regards
> Hamed Nik
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





On Fri, Apr 27, 2001 at 08:06:54PM +0200, Christian Reiniger wrote:
> On Friday 27 April 2001 15:15, Johan Holst Nielsen wrote:
> > > Hey everyone...
> > >
> > > I've been programming in perl for about 3 years now, i have installed
> > > php and have been working on it for about three weeks. I started by
> 
> > Try "Core PHP Programmning", it's have a lot of good stuff!
> 
> That book is definitely the wrong choice for someone with 3 years perl 
> experience (perhaps unless there's a second edition).  The copy I 
> unfortunately bought is built somehow like that:

What books are you reading?

> 5 pages useful intro
> 45 pages explaining basic language contructs [1]
> 4 pages explaining classes
> 11 pages giving a (small) overview of using print(), getting data from 
> forms, file upoads, env-vars, cookies, include/require and file IO
> 340 pages function references (copied from the manual) [2]

That is wrong. Leon havent copied 340 pages from the manual. I should know
this myself because I have finished the translation into German. 

> After that comes the somehow useful part - overviews of common task areas 
> - using databases, string munging, ...
> But that's only quick overviews, and some of the topics are just about 
> generic (language independent) stuff, e.g. the description of basic 
> sorting algorithms (the stuff you do *not* want to use in PHP :)
> 
> Well, it gets one plus point because it includes an ASCII chart :)
> 
> So: forget about that book. If at all, you'll quickly glance over it and 
> then let it collect dust forever.
> 
> 
> [1]: Perl is very similar in this area. Just looking through the manual 
> will be better (and quicker) than reading that book section
> 
> [2]: completely uses - the online manual is much quicker to search and 
> much more up to date (the book only covers PHP3)

This is not true. Leon has written his second edition. This edition
contains PHP 4 also. 

Please read books more carefully and don't pester this mailing list with
your nonsense comments. I mean that book with a foreword by Andi Gutmans.

-Egon

-- 
LinuxTag, Stuttgart, Germany: July 5-8 2001: http://www.linuxtag.de/
All known books about PHP and related books: http://php.net/books.php 
Concert Band of the University of Hohenheim: http://www.concert-band.de/
First and second bestselling book in German: http://www.php-buch.de/




On Friday 27 April 2001 22:53, [EMAIL PROTECTED] wrote:

> > > Try "Core PHP Programmning", it's have a lot of good stuff!
> >
> > That book is definitely the wrong choice for someone with 3 years
> > perl experience (perhaps unless there's a second edition).  The copy
> > I unfortunately bought is built somehow like that:
>
> What books are you reading?

None right now (manual and online articles only - and the mailing list of 
course), but I plan to look for a good advanced one soon.

> > IO 340 pages function references (copied from the manual) [2]
>
> That is wrong. Leon havent copied 340 pages from the manual. I should
> know this myself because I have finished the translation into German.

Ok, I guess you're right. sorry. What I wanted to express is that the 
same information is in the online manual.

> > [2]: completely uses - the online manual is much quicker to search
> > and much more up to date (the book only covers PHP3)
>
> This is not true. Leon has written his second edition. This edition
> contains PHP 4 also.

Ah, ok (that's why I wrote "perhaps unless there's a second edition" at 
the beginning). I own the first edition and described that.

> Please read books more carefully and don't pester this mailing list
> with your nonsense comments. I mean that book with a foreword by Andi
> Gutmans.

Well, you just said "Core PHP Programming" and I described that book. But 
you're right in that I know nothing about the second edition.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

I sat laughing snidely into my notebook until they showed me a PC running
Linux. And oh! It was as though the heavens opened and God handed down a
client-side OS so beautiful, so graceful, and so elegant that a million
Microsoft developers couldn't have invented it even if they had a hundred
years and a thousand crates of Jolt cola.

- LAN Times




On Sat, Apr 28, 2001 at 12:01:22AM +0200, Christian Reiniger wrote:
> On Friday 27 April 2001 22:53, [EMAIL PROTECTED] wrote:
> 
> > > > Try "Core PHP Programmning", it's have a lot of good stuff!
> > >
> > > That book is definitely the wrong choice for someone with 3 years
> > > perl experience (perhaps unless there's a second edition).  The copy
> > > I unfortunately bought is built somehow like that:
> >
> > What books are you reading?
> 
> None right now (manual and online articles only - and the mailing list of 
> course), but I plan to look for a good advanced one soon.
> 
> > > IO 340 pages function references (copied from the manual) [2]
> >
> > That is wrong. Leon havent copied 340 pages from the manual. I should
> > know this myself because I have finished the translation into German.
> 
> Ok, I guess you're right. sorry. What I wanted to express is that the 
> same information is in the online manual.

That is also wrong.
 
> > > [2]: completely uses - the online manual is much quicker to search
> > > and much more up to date (the book only covers PHP3)
> >
> > This is not true. Leon has written his second edition. This edition
> > contains PHP 4 also.
> 
> Ah, ok (that's why I wrote "perhaps unless there's a second edition" at 
> the beginning). I own the first edition and described that.
> 
> > Please read books more carefully and don't pester this mailing list
> > with your nonsense comments. I mean that book with a foreword by Andi
> > Gutmans.
> 
> Well, you just said "Core PHP Programming" and I described that book. But 
> you're right in that I know nothing about the second edition.

I haven't start this thread. So be carefull. I have Leons second edition
and you can buy another book at Markt+Technik. The PHP manual is for free
use. Use that if you are not comfortable with Leons book. 

It is not very good to judge some books on this list. I know some authors
who contribute to the PHP manual and write own books. 

-Egon

-- 
LinuxTag, Stuttgart, Germany: July 5-8 2001: http://www.linuxtag.de/
All known books about PHP and related books: http://php.net/books.php 
Concert Band of the University of Hohenheim: http://www.concert-band.de/
First and second bestselling book in German: http://www.php-buch.de/




Hi All!

One of the best books on PHP that I ever read is "Web Application 
Development with PHP 4.0" from New Riders.

It is an advanced book, not recomend it for beginners, but the 
medium/advanced skill programmer will love it.


THat's my 10 reais (brazillian money):-)

[]'s



Alex Piaz
Webmaster
Global Map Internet Marketing
www.globalmap.com
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
"Those who know what's best for us -
  Must rise and save us from ourselves"






> If I run this form using IE, hitting the Return/Enter key submits the form
> but the 'ok' variable is not set; it just redraws the form.  If however, I
> uncomment the third echo line (the one for Name2), then hitting the
> Return/Enter key does have the desired effect in IE.  In NS, the first
> version acts just like IE; the form redraws and that is all. But using the
> second variant with both text fields, hitting the Return key in NS does
> nothing at all.
>

I think this is the way it is.

Rather than testing for the value of submit, I have started adding a hidden
field called formname with the value being which ever form it is.
I then look for this instead of the value of the submit button

HTH

M@





Hi,

I have a site, http://rayh.co.uk which is basically my personal home page
and nothing more than a hobby.

However, on the site, i am currently storing images in the database, purely
because i can.  But i wonder, how much will the server load be affected when
pulling binary data out of the database?  compared to the file system?  i
assume its going to be quite a lot higher.  DO you reckon it would be better
to scrap that and store the images on the file system?

Ray Hilton







> > I was wondering, is anyone aware of a PHP server model, for Ultradev?
> >
> > Or, any leads on how I can create one?
> >
> > I'm developing a site with PHP+MS Access+Ultradev. I wanted to use some
> > of the Ultradev server model features (and convenience), but
> > they only support ASP/JSP/JScript.
>
> I'm not aware of one -- I wish I were!
>
> The book "Extending Dreamweaver 4" from Macromedia documents their API's,
> including server models. I've got the book...it's pretty hefty. I *think*
> it's fairly complete, though I can't immediately determine if it has all
> the info necessary to create a new server model.
>
> I sincerely hope someone does this! I would give it a shot if I weren't so
> green...
>

Check out

http://www.geocities.com/php4ud/

I've never tried it but it was in my bookmarks to have a look at.

I would be grateful of any feedback on it.

Cheers

M@






php4ud became PhAkt (http://www.interakt.ro/phakt)

Ovidiu


> -----Original Message-----
> From: Matt Williams [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 27, 2001 3:59 PM
> To: John Platte; John Monfort
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Ultradev PHP Server Model
>
>
>
> > > I was wondering, is anyone aware of a PHP server model, for Ultradev?
> > >
> > > Or, any leads on how I can create one?
> > >
> > > I'm developing a site with PHP+MS Access+Ultradev. I wanted
> to use some
> > > of the Ultradev server model features (and convenience), but
> > > they only support ASP/JSP/JScript.
> >
> > I'm not aware of one -- I wish I were!
> >
> > The book "Extending Dreamweaver 4" from Macromedia documents
> their API's,
> > including server models. I've got the book...it's pretty hefty.
> I *think*
> > it's fairly complete, though I can't immediately determine if it has all
> > the info necessary to create a new server model.
> >
> > I sincerely hope someone does this! I would give it a shot if I
> weren't so
> > green...
> >
>
> Check out
>
> http://www.geocities.com/php4ud/
>
> I've never tried it but it was in my bookmarks to have a look at.
>
> I would be grateful of any feedback on it.
>
> Cheers
>
> M@
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hi,

anyone know a simple way to realize multiple-upload at once (something
like Msoft CTRL-multiple selection when browsing and uniqe Upload
button). I've found only a multiple file input field in a form but the
numbers of file I'had to upload is unknow.

TIA
-- 
(p)Ivan

Student 
DIST Bio-Lab
Viale Causa 13
16145 Genoa - Italy
 
tel: +39 010 3532789
e-mail: [EMAIL PROTECTED]




You can only do one file in each box - get a yahoo mail account and see how
they
handle file uploading.


Ivan Porro wrote:

> Hi,
>
> anyone know a simple way to realize multiple-upload at once (something
> like Msoft CTRL-multiple selection when browsing and uniqe Upload
> button). I've found only a multiple file input field in a form but the
> numbers of file I'had to upload is unknow.
>
> TIA
> --
> (p)Ivan
>
> Student
> DIST Bio-Lab
> Viale Causa 13
> 16145 Genoa - Italy
>
> tel: +39 010 3532789
> e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





        Its my understanding that PHP appends the SID on the end of the URL
regardless of weather its a form or not. If thats not happening for you,
check your php.ini and make sure you have session.use_trans_sid enabled.



"Boget, Chris" wrote:
> 
> If you have PHP compiled with --enable-trans-sid,
> are the URLs that are part of the form's action supposed
> to be modified to include the SID?  So far that's not
> been happening and I just want to verify that this is
> expected behavior.
> 
> thnx,
> Chris

-- 
Larry Hotchkiss
Universal Capital
612-551-9309
http://www.unicap.com/




>       Its my understanding that PHP appends the SID on the 
> end of the URL regardless of weather its a form or not. If thats 
> not happening for you, check your php.ini and make sure you 
> have  session.use_trans_sid enabled.

It is enabled.  And it's being appended to most URLs (though, not 
all, but that's another problem I posted to another thread).  
However, it's not being appended to any of my form's actions.

Chris




Here is what I see in my FORM with --enable-trans-sid:

<FORM METHOD="POST" ACTION="./test_formRun.php">
<INPUT TYPE="HIDDEN" NAME="PHPSESSID"
VALUE="cbf75d263416e77d773b1772f6e1be89">
<INPUT TYPE="IMAGE"  NAME="image"
SRC="submit.gif?PHPSESSID=cbf75d263416e77d773b1772f6e1be89"  ALIGN="top" >

PHP is adding the HIDDEN field with the session id. For some reason, it also
appends it to the SRC attribute of the image submit button, but doesn't add
it in the ACTION url.

Kirk

> -----Original Message-----
>       Its my understanding that PHP appends the SID on the 
> end of the URL
> regardless of weather its a form or not.




> Here is what I see in my FORM with --enable-trans-sid:
> <FORM METHOD="POST" ACTION="./test_formRun.php">
> <INPUT TYPE="HIDDEN" NAME="PHPSESSID"
> VALUE="cbf75d263416e77d773b1772f6e1be89">
> PHP is adding the HIDDEN field with the session id. For some 
> reason, it also appends it to the SRC attribute of the image submit 
> button, but doesn't add it in the ACTION url.

I'm not getting that, either...  This is sooo funky.  Sometimes
the --enable-trans-sid works and sometimes it doesn't.  I just
wish there was some consistency about it so I could trouble
shoot where the problem is coming from.
*sigh*.

Chris




have you checked your PHP.INI file?

it sais there what links to rewrite.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 28, 2001 12:16 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] --enable-trans-sid and forms


Here is what I see in my FORM with --enable-trans-sid:

<FORM METHOD="POST" ACTION="./test_formRun.php">
<INPUT TYPE="HIDDEN" NAME="PHPSESSID"
VALUE="cbf75d263416e77d773b1772f6e1be89">
<INPUT TYPE="IMAGE"  NAME="image"
SRC="submit.gif?PHPSESSID=cbf75d263416e77d773b1772f6e1be89"  ALIGN="top" >

PHP is adding the HIDDEN field with the session id. For some reason, it also
appends it to the SRC attribute of the image submit button, but doesn't add
it in the ACTION url.

Kirk

> -----Original Message-----
>       Its my understanding that PHP appends the SID on the
> end of the URL
> regardless of weather its a form or not.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Thanks, Maxim, I hadn't seen the url_rewriter.tags entry in php.ini before.
A search of the PHP manual only returns one unhelpful reference, tho. Any
idea where to find some documentation on this?

TIA

Kirk

> -----Original Message-----
> From: PHPBeginner.com [mailto:[EMAIL PROTECTED]]
> 
> have you checked your PHP.INI file?
> 
> it sais there what links to rewrite.




well, in your situation I would go into php-general archives right away.
I think (not that I remember, but...) that this was a topic here before.

try to search there.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com





-----Original Message-----
From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 28, 2001 12:38 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] --enable-trans-sid and forms


Thanks, Maxim, I hadn't seen the url_rewriter.tags entry in php.ini before.
A search of the PHP manual only returns one unhelpful reference, tho. Any
idea where to find some documentation on this?

TIA

Kirk

> -----Original Message-----
> From: PHPBeginner.com [mailto:[EMAIL PROTECTED]]
> 
> have you checked your PHP.INI file?
> 
> it sais there what links to rewrite.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






> have you checked your PHP.INI file?
> it sais there what links to rewrite.

This is what is in my .ini.  

url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" ;
added 3/2/01

Am I missing something here that I should have?  
I don't see anything in the docs about the above 
directive.
Also, note, as I said in a problem I posed in another 
thread, there are some links where the SID is added 
while there are some that it isn't added.  This happens 
in different pages, though.  So while there will be pages 
where *all* the links will have the SID added, there
will be pages where *none* of them have the SID included.  
(though, it is never the case where there is a page
where some have the SID included while some do
not)
And this could be one page right after the other.

This is very odd and *very* frustrating.

Chris




Hi,

www.mysql.com, and check the website for a myaccess or myodbc doc's. I
know (I dwnloaded it) that exist a myaccess plugin to save access dB to
mysql structure files.

>From php side you have a lot of classical dbfunction to access MSAccess
dB, simply using odbc_function and creating a ODBC Data Source Name
using Manage ODBC data source in Control Panel on the 'db server'
machine. Notice that These odbc with MSAccess work ONLY LOCALLY (in
lan,not remotely). U have to use MSSQL server to realize remote dB
storage.

Good Luck,

Ivan

[EMAIL PROTECTED] wrote:
> 
> just point your browser to phpbuilder.net. Alternatively, just send me an email =)
> 
> Date: Wed, 25 Apr 2001 19:02:12 -0700 (PDT)
> From: John Monfort <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Message-ID: <[EMAIL PROTECTED]>
> MIME-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> Subject: PHP+MS Access and/or MS SQL
> 
>  Hello everyone,
> 
>  I'm looking for information on PHP+ MS Access , and PHP+MS SQL.
> 
>  Any recommendations?
> 
>  Thx in advance!
> 
> __________John Monfort_________________
> _+-----------------------------------+_
>      P E P I E  D E S I G N S
>        www.pepiedesigns.com
> "The world is waiting, are you ready?"
> -+___________________________________+-
> 
> On Thu, 26 Apr 2001, Ben Quinn wrote:
> 
> > Hi all,
> >
> > I am trying to copy an image from an external server and save it to my own.
> > I have the following script to do this for a txt file and it works great!
> >
> > ?>
> >
> > $page  = "../temp/yep.txt";
> >
> > $date = date("http:/www.example.com/yep.txt");
> >
> > $cartFile = fopen("$page","a");
> > fwrite($cartFile,$date,strlen($date));
> > fclose($cartFile);
> >
> > ?>
> >
> > But i can't get it to work for image files - the images are saved and
> > displayed on screen as a whole bunch of rubbish.
> >
> > I'd appreciate any help you can give me
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> k.e.l.v.i.n c.h.a.n
> the open web technology company
> www.eXtropia.com
> [EMAIL PROTECTED]
> Tel: 7738550

-- 
(p)Ivan

Student 
DIST Bio-Lab
Viale Causa 13
16145 Genoa - Italy
 
tel: +39 010 3532789
e-mail: [EMAIL PROTECTED]




Hi,

A small correction, remote ODBC DSNs work fine with Access.
It's simply a question of installing appropriate drivers.

Best regards,
Andrew
--------------------------------------
Andrew Hill - OpenLink Software
Director Technology Evangelism
Universal Data Access Integration 
http://www.openlinksw.com

> 
> 
> Hi,
> 
> www.mysql.com, and check the website for a myaccess or myodbc doc's. I
> know (I dwnloaded it) that exist a myaccess plugin to save access dB to
> mysql structure files.
> 
> >From php side you have a lot of classical dbfunction to access MSAccess
> dB, simply using odbc_function and creating a ODBC Data Source Name
> using Manage ODBC data source in Control Panel on the 'db server'
> machine. Notice that These odbc with MSAccess work ONLY LOCALLY (in
> lan,not remotely). U have to use MSSQL server to realize remote dB
> storage.
> 
> Good Luck,
> 
> Ivan
> 
> [EMAIL PROTECTED] wrote:
> > 
> > just point your browser to phpbuilder.net. Alternatively, just 
> send me an email =)
> > 
> > Date: Wed, 25 Apr 2001 19:02:12 -0700 (PDT)
> > From: John Monfort <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Message-ID: 
> <[EMAIL PROTECTED]>
> > MIME-Version: 1.0
> > Content-Type: TEXT/PLAIN; charset=US-ASCII
> > Subject: PHP+MS Access and/or MS SQL
> > 
> >  Hello everyone,
> > 
> >  I'm looking for information on PHP+ MS Access , and PHP+MS SQL.
> > 
> >  Any recommendations?
> > 
> >  Thx in advance!
> > 
> > __________John Monfort_________________
> > _+-----------------------------------+_
> >      P E P I E  D E S I G N S
> >        www.pepiedesigns.com
> > "The world is waiting, are you ready?"
> > -+___________________________________+-
> > 
> > On Thu, 26 Apr 2001, Ben Quinn wrote:
> > 
> > > Hi all,
> > >
> > > I am trying to copy an image from an external server and save 
> it to my own.
> > > I have the following script to do this for a txt file and it 
> works great!
> > >
> > > ?>
> > >
> > > $page  = "../temp/yep.txt";
> > >
> > > $date = date("http:/www.example.com/yep.txt");
> > >
> > > $cartFile = fopen("$page","a");
> > > fwrite($cartFile,$date,strlen($date));
> > > fclose($cartFile);
> > >
> > > ?>
> > >
> > > But i can't get it to work for image files - the images are saved and
> > > displayed on screen as a whole bunch of rubbish.
> > >
> > > I'd appreciate any help you can give me
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> > >
> > >
> > 
> > k.e.l.v.i.n c.h.a.n
> > the open web technology company
> > www.eXtropia.com
> > [EMAIL PROTECTED]
> > Tel: 7738550
> 
> -- 
> (p)Ivan
> 
> Student 
> DIST Bio-Lab
> Viale Causa 13
> 16145 Genoa - Italy
>  
> tel: +39 010 3532789
> e-mail: [EMAIL PROTECTED]
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 




10X a lot !!!

Bye.


Andrew Hill wrote:
> 
> Hi,
> 
> A small correction, remote ODBC DSNs work fine with Access.
> It's simply a question of installing appropriate drivers.
> 
> Best regards,
> Andrew
> --------------------------------------
> Andrew Hill - OpenLink Software
> Director Technology Evangelism
> Universal Data Access Integration
> http://www.openlinksw.com
> 
> >
> >
> > Hi,
> >
> > www.mysql.com, and check the website for a myaccess or myodbc doc's. I
> > know (I dwnloaded it) that exist a myaccess plugin to save access dB to
> > mysql structure files.
> >
> > >From php side you have a lot of classical dbfunction to access MSAccess
> > dB, simply using odbc_function and creating a ODBC Data Source Name
> > using Manage ODBC data source in Control Panel on the 'db server'
> > machine. Notice that These odbc with MSAccess work ONLY LOCALLY (in
> > lan,not remotely). U have to use MSSQL server to realize remote dB
> > storage.
> >
> > Good Luck,
> >
> > Ivan
> >
> > [EMAIL PROTECTED] wrote:
> > >
> > > just point your browser to phpbuilder.net. Alternatively, just
> > send me an email =)
> > >
> > > Date: Wed, 25 Apr 2001 19:02:12 -0700 (PDT)
> > > From: John Monfort <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Message-ID:
> > <[EMAIL PROTECTED]>
> > > MIME-Version: 1.0
> > > Content-Type: TEXT/PLAIN; charset=US-ASCII
> > > Subject: PHP+MS Access and/or MS SQL
> > >
> > >  Hello everyone,
> > >
> > >  I'm looking for information on PHP+ MS Access , and PHP+MS SQL.
> > >
> > >  Any recommendations?
> > >
> > >  Thx in advance!
> > >
> > > __________John Monfort_________________
> > > _+-----------------------------------+_
> > >      P E P I E  D E S I G N S
> > >        www.pepiedesigns.com
> > > "The world is waiting, are you ready?"
> > > -+___________________________________+-
> > >
> > > On Thu, 26 Apr 2001, Ben Quinn wrote:
> > >
> > > > Hi all,
> > > >
> > > > I am trying to copy an image from an external server and save
> > it to my own.
> > > > I have the following script to do this for a txt file and it
> > works great!
> > > >
> > > > ?>
> > > >
> > > > $page  = "../temp/yep.txt";
> > > >
> > > > $date = date("http:/www.example.com/yep.txt");
> > > >
> > > > $cartFile = fopen("$page","a");
> > > > fwrite($cartFile,$date,strlen($date));
> > > > fclose($cartFile);
> > > >
> > > > ?>
> > > >
> > > > But i can't get it to work for image files - the images are saved and
> > > > displayed on screen as a whole bunch of rubbish.
> > > >
> > > > I'd appreciate any help you can give me
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > k.e.l.v.i.n c.h.a.n
> > > the open web technology company
> > > www.eXtropia.com
> > > [EMAIL PROTECTED]
> > > Tel: 7738550
> >
> > --
> > (p)Ivan
> >
> > Student
> > DIST Bio-Lab
> > Viale Causa 13
> > 16145 Genoa - Italy
> >
> > tel: +39 010 3532789
> > e-mail: [EMAIL PROTECTED]
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
(p)Ivan

Student 
DIST Bio-Lab
Viale Causa 13
16145 Genoa - Italy
 
tel: +39 010 3532789
e-mail: [EMAIL PROTECTED]




I have been trying to get this to work for days and I'm confused. I want to
attach a Word document to an email. I found this code on php.net and I'm
trying to modify it to work. I get the email sent, the attached Word
document is filled with junk and not the document I'm trying to send.

Here is the code and sorry for the large email.

<?php
$border="--==================_856811060==_";
#/* recipients */
#$recipient .= "Mary <[EMAIL PROTECTED]>" . ", "; #//note the comma
#$recipient .= "Kelly <[EMAIL PROTECTED]>" . ", ";
#$recipient .= "[EMAIL PROTECTED]";
$recipient = "[EMAIL PROTECTED]";

#/* subject */
$subject = "Birthday Reminders for August";

#/* message */
$message .= "$border\n";
$message .= "Content-Type: text/plain; charset=us-ascii;format=flowed\n";
$message .= "The following email includes a formatted ASCII table\n";
$message .= "Day \t\tMonth \t\tYear\n";
$message .= "3rd \t\tAug \t\t1970\n";
$message .= "17rd\t\tAug \t\t1973\n";
$message .= "$border\n";
#$message .= "Content-Type: application/msword; name=\"/mail/Ftp\ User\
Info.doc\"\n";
#$message .= "Content-Transfer-Encoding: base64\n";
#$message .= "Content-Disposition: attachment; filename=\"/mail/Ftp\ User\
Info.doc\"\n";
#$message .="$border\n";

#/* you can add a stock signature */
$message .= "--\r\n"; //Signature delimiter
$message .= "Birthday reminder copylefted by public domain";

#/* additional header pieces for errors, From cc's, bcc's, etc */

$headers .= "From: Birthday Reminder <[EMAIL PROTECTED]>\n";
$headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: <[EMAIL PROTECTED]>\n";  // Return path for errors
# I added this code
$headers .= "Mime-Version: 1.0\n";
$headers .= "Content-Type: multipart/mixed; boundary=\"$border\"\n";
#$headers .= "Content-Type: text/plain; charset=us-ascii;format=flowed\n";
$headers .= "Content-Type: application/msword; name=\"Ftp\ User\
Info.doc\"\n";
$headers .= "Content-Transfer-Encoding: base64\n";
$headers .= "Content-Disposition: attachment; filename=\"Ftp\ User\
Info.doc\"\n";

#/* If you want to send html mail, uncomment the following line */
#$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type

#$headers .= "cc:[EMAIL PROTECTED]\n"; // CC to
#$headers .= "bcc:[EMAIL PROTECTED], [EMAIL PROTECTED]\n"; // BCCs
to
#$headers .= "cc:[EMAIL PROTECTED]\n"; // CC to
#$headers .= "bcc:[EMAIL PROTECTED],
[EMAIL PROTECTED]\n"; // BCCs to

#/* and now mail it */
mail($recipient, $subject, $message, $headers);
print "<html><head><title>Mail</title></head>\n";
print"<body>\n";
print "<p>Mail Sent?\n";
print"</body></html>\n";
?>

Thanks!!!!!!!!






I would recommend that you send a link instead of the actual doc file.

Chris Anderson   aka "Null"
--------------------------------------------
PHP Developer / Nulltech
PHP-GTK Tester / gtk.php.net
STA Administrator / www.stronger.org
DOD Co-Owner / www.dayofdefeat.com

----- Original Message -----
From: "Tym Rehm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 27, 2001 9:46 AM
Subject: [PHP] HELP!! Mail and attachments


> I have been trying to get this to work for days and I'm confused. I want
to
> attach a Word document to an email. I found this code on php.net and I'm
> trying to modify it to work. I get the email sent, the attached Word
> document is filled with junk and not the document I'm trying to send.
>
> Here is the code and sorry for the large email.
>
> <?php
> $border="--==================_856811060==_";
> #/* recipients */
> #$recipient .= "Mary <[EMAIL PROTECTED]>" . ", "; #//note the comma
> #$recipient .= "Kelly <[EMAIL PROTECTED]>" . ", ";
> #$recipient .= "[EMAIL PROTECTED]";
> $recipient = "[EMAIL PROTECTED]";
>
> #/* subject */
> $subject = "Birthday Reminders for August";
>
> #/* message */
> $message .= "$border\n";
> $message .= "Content-Type: text/plain; charset=us-ascii;format=flowed\n";
> $message .= "The following email includes a formatted ASCII table\n";
> $message .= "Day \t\tMonth \t\tYear\n";
> $message .= "3rd \t\tAug \t\t1970\n";
> $message .= "17rd\t\tAug \t\t1973\n";
> $message .= "$border\n";
> #$message .= "Content-Type: application/msword; name=\"/mail/Ftp\ User\
> Info.doc\"\n";
> #$message .= "Content-Transfer-Encoding: base64\n";
> #$message .= "Content-Disposition: attachment; filename=\"/mail/Ftp\ User\
> Info.doc\"\n";
> #$message .="$border\n";
>
> #/* you can add a stock signature */
> $message .= "--\r\n"; //Signature delimiter
> $message .= "Birthday reminder copylefted by public domain";
>
> #/* additional header pieces for errors, From cc's, bcc's, etc */
>
> $headers .= "From: Birthday Reminder <[EMAIL PROTECTED]>\n";
> $headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
> $headers .= "X-Mailer: PHP\n"; // mailer
> $headers .= "X-Priority: 1\n"; // Urgent message!
> $headers .= "Return-Path: <[EMAIL PROTECTED]>\n";  // Return path for
errors
> # I added this code
> $headers .= "Mime-Version: 1.0\n";
> $headers .= "Content-Type: multipart/mixed; boundary=\"$border\"\n";
> #$headers .= "Content-Type: text/plain; charset=us-ascii;format=flowed\n";
> $headers .= "Content-Type: application/msword; name=\"Ftp\ User\
> Info.doc\"\n";
> $headers .= "Content-Transfer-Encoding: base64\n";
> $headers .= "Content-Disposition: attachment; filename=\"Ftp\ User\
> Info.doc\"\n";
>
> #/* If you want to send html mail, uncomment the following line */
> #$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type
>
> #$headers .= "cc:[EMAIL PROTECTED]\n"; // CC to
> #$headers .= "bcc:[EMAIL PROTECTED], [EMAIL PROTECTED]\n"; // BCCs
> to
> #$headers .= "cc:[EMAIL PROTECTED]\n"; // CC to
> #$headers .= "bcc:[EMAIL PROTECTED],
> [EMAIL PROTECTED]\n"; // BCCs to
>
> #/* and now mail it */
> mail($recipient, $subject, $message, $headers);
> print "<html><head><title>Mail</title></head>\n";
> print"<body>\n";
> print "<p>Mail Sent?\n";
> print"</body></html>\n";
> ?>
>
> Thanks!!!!!!!!
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





I have to send the file. I need the recipient to fill out the form.

----- Original Message -----
From: "Chris Anderson" <[EMAIL PROTECTED]>
To: "Tym Rehm" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, April 27, 2001 10:16 AM
Subject: Re: [PHP] HELP!! Mail and attachments


> I would recommend that you send a link instead of the actual doc file.
>
> Chris Anderson   aka "Null"
> --------------------------------------------
> PHP Developer / Nulltech
> PHP-GTK Tester / gtk.php.net
> STA Administrator / www.stronger.org
> DOD Co-Owner / www.dayofdefeat.com
>
> ----- Original Message -----
> From: "Tym Rehm" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, April 27, 2001 9:46 AM
> Subject: [PHP] HELP!! Mail and attachments
>
>
> > I have been trying to get this to work for days and I'm confused. I want
> to
> > attach a Word document to an email. I found this code on php.net and I'm
> > trying to modify it to work. I get the email sent, the attached Word
> > document is filled with junk and not the document I'm trying to send.
> >
> > Here is the code and sorry for the large email.
> >
> > <?php
> > $border="--==================_856811060==_";
> > #/* recipients */
> > #$recipient .= "Mary <[EMAIL PROTECTED]>" . ", "; #//note the comma
> > #$recipient .= "Kelly <[EMAIL PROTECTED]>" . ", ";
> > #$recipient .= "[EMAIL PROTECTED]";
> > $recipient = "[EMAIL PROTECTED]";
> >
> > #/* subject */
> > $subject = "Birthday Reminders for August";
> >
> > #/* message */
> > $message .= "$border\n";
> > $message .= "Content-Type: text/plain;
charset=us-ascii;format=flowed\n";
> > $message .= "The following email includes a formatted ASCII table\n";
> > $message .= "Day \t\tMonth \t\tYear\n";
> > $message .= "3rd \t\tAug \t\t1970\n";
> > $message .= "17rd\t\tAug \t\t1973\n";
> > $message .= "$border\n";
> > #$message .= "Content-Type: application/msword; name=\"/mail/Ftp\ User\
> > Info.doc\"\n";
> > #$message .= "Content-Transfer-Encoding: base64\n";
> > #$message .= "Content-Disposition: attachment; filename=\"/mail/Ftp\
User\
> > Info.doc\"\n";
> > #$message .="$border\n";
> >
> > #/* you can add a stock signature */
> > $message .= "--\r\n"; //Signature delimiter
> > $message .= "Birthday reminder copylefted by public domain";
> >
> > #/* additional header pieces for errors, From cc's, bcc's, etc */
> >
> > $headers .= "From: Birthday Reminder <[EMAIL PROTECTED]>\n";
> > $headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
> > $headers .= "X-Mailer: PHP\n"; // mailer
> > $headers .= "X-Priority: 1\n"; // Urgent message!
> > $headers .= "Return-Path: <[EMAIL PROTECTED]>\n";  // Return path for
> errors
> > # I added this code
> > $headers .= "Mime-Version: 1.0\n";
> > $headers .= "Content-Type: multipart/mixed; boundary=\"$border\"\n";
> > #$headers .= "Content-Type: text/plain;
charset=us-ascii;format=flowed\n";
> > $headers .= "Content-Type: application/msword; name=\"Ftp\ User\
> > Info.doc\"\n";
> > $headers .= "Content-Transfer-Encoding: base64\n";
> > $headers .= "Content-Disposition: attachment; filename=\"Ftp\ User\
> > Info.doc\"\n";
> >
> > #/* If you want to send html mail, uncomment the following line */
> > #$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime
type
> >
> > #$headers .= "cc:[EMAIL PROTECTED]\n"; // CC to
> > #$headers .= "bcc:[EMAIL PROTECTED], [EMAIL PROTECTED]\n"; //
BCCs
> > to
> > #$headers .= "cc:[EMAIL PROTECTED]\n"; // CC to
> > #$headers .= "bcc:[EMAIL PROTECTED],
> > [EMAIL PROTECTED]\n"; // BCCs to
> >
> > #/* and now mail it */
> > mail($recipient, $subject, $message, $headers);
> > print "<html><head><title>Mail</title></head>\n";
> > print"<body>\n";
> > print "<p>Mail Sent?\n";
> > print"</body></html>\n";
> > ?>
> >
> > Thanks!!!!!!!!
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





As long as you're using the GET variables simply to pass along values (not
allowing the user to change the GET variables), you can stick the values
in the action property of your POST form and get the same result.

So the below code would become:

<form action="bla.php?bar=yehaa" method="post">
    <input type="hidden" name="foo" value="yahoo">
</form>

Hope this helps.

(Hello in Goshen...I grew up in Fort Wayne. My pop's a Taylor FW prof...)

Reuben D Budiardja wrote:

> What I want to do is to 
> have two forms with different method (GET and POST), and then send them
at 
> one time, so that in the next page I get both $HTTP_POST_VARS and 
> $HTTP_GET_VARS. To illustrate this:
> 
>      <FORM ACTION=3D"bla.php" METHOD=3D"post">
>      <INPUT TYPE=3D"hidden" NAME=3D"foo" VALUE=3D"yahoo">
>      </FORM>
> 
>     <FORM ACTION=3D"bla.php" METHOD=3D"GET">
>     <INPUT TYPE=3D"hidden" NAME=3D"bar" VALUE=3D"yehaa">
>     </FORM>
> 
> I want so that after submiting these forms, somehow, in the bla.php I=20
> have
> $HTTP_POST_VARS["foo"] = "yahoo"
> $HTTP_GET_VARS["bar"] = "yehaa"
> 
> at one time. Is this possible at all?

John Platte

"Truth binds the mind to what satisfies it,
but worldly thinking does not satisfy
and therefore ignites curiosity."

               -- St. Theophan the Recluse




Yes, it has that in there right out of the box like this:

<IfDefine HAVE_PHP4>
LoadModule php4_module        modules/libphp4.so
</IfDefine>
#
# AddType: allows you to tweak mime.types without actually editing it, or to
# make certain files to be certain types.
#
# The following is for PHP4 (conficts with PHP/FI, below):
<IfModule mod_php4.c>
  AddType application/x-httpd-php .php4 .php3 .phtml .php
  AddType application/x-httpd-php-source .phps
</IfModule>

It comes like that from a clean install of RH 7.1, but why is it not
working?  Any Ideas?



Ralph Guzman wrote in message ...
>Your httpd.conf configuration should look something like this:
>
>AddType application/x-httpd-php .php .phtml .php3 .php4
>AddType application/x-httpd-php-source .phps
>
>-----Original Message-----
>From: j2n tech [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, April 26, 2001 8:42 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP] php4 on RedHat 7.1
>
>
>I'm trying to get a webmail client to work under RH 7.1 with Apache 1.3.19.
>I downloaded php-4.0.4pl and configured and installed it.  Now when I try
to
>bring up a php page it trys to download it instead of execute.  I added the
>"AddType" line for php4 in my httpd.conf but it made no difference.  I
>noticed Apache 1.3.19 with RH7.1 treats modules differently with the
>IfDefine functions...am i missing something here?  Anybody have any idea
how
>I might be able to get this to work?
>
>Thanks.
>
>--j2n.
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Take a look at /var/log/httpd/error_log.  Is there an entry for the very
first time the server was run (before you installed PHP 4.04pl)?  Does
it list PHP/4.0 as installed?  The initial entry in my error_log from
the "Wolverine" beta of 7.1 shows:

[Fri Apr 27 12:36:13 2001] [notice] Apache/1.3.14 (Unix) 
(Red-Hat/Linux) mod_ssl/2.7.1 OpenSSL/0.9.5a DAV/1.0.2 PHP/4.0.4pl1
mod_perl/1.24_01 configured -- resuming normal operations
[Fri Apr 27 12:36:13 2001] [notice] suEXEC mechanism enabled (wrapper:
/usr/sbin/suexec)

In my case the PHP module was loaded by default (along with ssl and
mod_perl) when I chose the "install everything" option in RedHat.

If it appears in the log, then the module is running.  Put a file called
info.php into /var/www/html with just the line 

<? phpinfo() ?> 

in it.  What happens when you view it from a browser?

If it's still not working, I suggest you try uninstalling your version
of PHP and installing the PHP4 rpm that comes with RedHat instead. 
Works fine for me.  

Peter 



"." wrote:
> 
> Yes, it has that in there right out of the box like this:
> 
> <IfDefine HAVE_PHP4>
> LoadModule php4_module        modules/libphp4.so
> </IfDefine>
> #
> # AddType: allows you to tweak mime.types without actually editing it, or to
> # make certain files to be certain types.
> #
> # The following is for PHP4 (conficts with PHP/FI, below):
> <IfModule mod_php4.c>
>   AddType application/x-httpd-php .php4 .php3 .phtml .php
>   AddType application/x-httpd-php-source .phps
> </IfModule>
> 
> It comes like that from a clean install of RH 7.1, but why is it not
> working?  Any Ideas?
> 
> Ralph Guzman wrote in message ...
> >Your httpd.conf configuration should look something like this:
> >
> >AddType application/x-httpd-php .php .phtml .php3 .php4
> >AddType application/x-httpd-php-source .phps
> >
> >-----Original Message-----
> >From: j2n tech [mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, April 26, 2001 8:42 PM
> >To: [EMAIL PROTECTED]
> >Subject: [PHP] php4 on RedHat 7.1
> >
> >
> >I'm trying to get a webmail client to work under RH 7.1 with Apache 1.3.19.
> >I downloaded php-4.0.4pl and configured and installed it.  Now when I try
> to
> >bring up a php page it trys to download it instead of execute.  I added the
> >"AddType" line for php4 in my httpd.conf but it made no difference.  I
> >noticed Apache 1.3.19 with RH7.1 treats modules differently with the
> >IfDefine functions...am i missing something here?  Anybody have any idea
> how
> >I might be able to get this to work?
> >
> >Thanks.
> >
> >--j2n.
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





""Peter H. Lemieux"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Take a look at /var/log/httpd/error_log.  Is there an entry for the very
> first time the server was run (before you installed PHP 4.04pl)?  Does
> it list PHP/4.0 as installed?  The initial entry in my error_log from
> the "Wolverine" beta of 7.1 shows:
>
> [Fri Apr 27 12:36:13 2001] [notice] Apache/1.3.14 (Unix)
> (Red-Hat/Linux) mod_ssl/2.7.1 OpenSSL/0.9.5a DAV/1.0.2 PHP/4.0.4pl1
> mod_perl/1.24_01 configured -- resuming normal operations
> [Fri Apr 27 12:36:13 2001] [notice] suEXEC mechanism enabled (wrapper:
> /usr/sbin/suexec)
>

I chose the "Install Everything" Option, but when I start Apache, the
error_log reports only this:
Apache/1.3.19 (Red-Hat/Linux) configured -- resuming normal operations

Yet the httpd.conf file would seem to tell me that I have all the modules
installed for php4.  It's confusing.

Also, when I complie php404pl1, does it automatically update the libphp4.so
in the /etc/httpd/modules?  I thought I was getting somewhere after I
complied php404pl1, but when I try to start Apache it now dumps out with the
error:

Unable to load libphp4.so into server:  undefined symbol:  mxdriver.

Sigh, I had this working on my RH 6.2 box, I assumed it would be easier to
set it up on 7.1 but I guess not  :(

Anyway, maybe you can point me in the right direction here?

Thanks.

j2n.












how to use Semaphore... through PHP...

please help me.....






The cause of this error is complier cannot find kernel related headers.
Download kernel source (2.2 not 2.4), and untar under /usr/src/linux.
(or get/install kernel source/header RPM for 6.2)

Regards,
--
Yasuo Ohgaki


"Curtis Maurand" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>   I'm building 4.0.4pl1 on RedHat 6.2 with all updates applied.  It
> configures OK and then when issue "make" i get:
>
> [root@fenris php-4.0.4pl1]# make
> Making all in Zend
> make[1]: Entering directory `/home/curtis/php-4.0.4pl1/Zend'
> /bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I.
> -I../main
>    -DLINUX=2 -DEAPI -DUSE_EXPAT -DXML_BYTE_ORDER=12  -g -O2 -c
> zend_language_sca
> nner.c
> In file included from /usr/include/errno.h:36,
>                  from zend_language_scanner.c:2619:
> /usr/include/bits/errno.h:25: linux/errno.h: No such file or directory
> In file included from /usr/include/bits/posix1_lim.h:126,
>                  from /usr/include/limits.h:30,
>                  from
> /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/li
> mits.h:117,
>                  from
> /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/sy
> slimits.h:7,
>                  from
> /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/li
> mits.h:11,
>                  from zend_language_scanner.c:2620:
> /usr/include/bits/local_lim.h:27: linux/limits.h: No such file or
> directory
> make[1]: *** [zend_language_scanner.lo] Error 1
> make[1]: Leaving directory `/home/curtis/php-4.0.4pl1/Zend'
> make: *** [all-recursive] Error 1
>
> Any one have any clues?  I can't get 3.0.16 to build either and I need
> mysql support.  If anyone knows where I can find functional RPM's that
> would be OK, too.
>
>
>
> Curtis
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





I use BBEdit on the Mac, uploading PHP code to a Unix server, and I get
parse errors on line 1 unless I remember to set line breaks to Unix \n
(rather than Mac and Windows line endings, which use different
characters). You may be running into a similar problem.

Jimmy Lantz wrote:

> Hi, I have a problem,
> that when I get a parse error it always says that it's on line 1 in 
> this or that file.
> Where is the configuration option to set this right?
> I have on another server seen that it's possible to get it to state 
> the actual error line.

John Platte

"Truth binds the mind to what satisfies it,
but worldly thinking does not satisfy
and therefore ignites curiosity."

               -- St. Theophan the Recluse




Yes, thank you you're right this is exactly what it was, I used 
Dreamweaver on a mac to edit the files, but now if I encounter parse 
error I convert them with BBEdit.
Thank you.
Jimmy Lantz

>I use BBEdit on the Mac, uploading PHP code to a Unix server, and I get
>parse errors on line 1 unless I remember to set line breaks to Unix \n
>(rather than Mac and Windows line endings, which use different
>characters). You may be running into a similar problem.
>
>Jimmy Lantz wrote:
>
>>  Hi, I have a problem,
>>  that when I get a parse error it always says that it's on line 1 in
>>  this or that file.
>>  Where is the configuration option to set this right?
>>  I have on another server seen that it's possible to get it to state
>>  the actual error line.
>
>John Platte
>
>"Truth binds the mind to what satisfies it,
>but worldly thinking does not satisfy
>and therefore ignites curiosity."
>
>                -- St. Theophan the Recluse





Hi,

maybe now someone can help me.
While i get a "network error" message from netscape i get no message from
ie. It´s like i make a reload on my page and not that i am sending a lot of
data over with my form.
While testing with ie i figured out that the problem, why ie displays
nothing is, because the variable HTTP_POST_VARS is empty and my script
checks the HTTP_POST_VARS variable.
But how can it happen that sometimes HTTP_POST_VARS has data and sometimes
not? I have a Apache Web-Server.

Any idea?

claudia

> Hi,
>
> has anyone ever seen the message "Network error occured while Netscape
> was receiving data ..."
>
> This happens when i save data in my informix database. The values are
> saved, but i get the error message when the browser trys to load the new
> page. The strange thing is, it happens only sometimes on various sites.
> I think it has something to do with the traffic on the site (ca. 400
> users).
>
> After inserting a flush() into the page, which i want to load, i get
> parts of the new page. I saved this page on disk and had a look at the
> HTML, it´s complete, but my browser can´t show it and i get the network
> error message.
>
> If i make a "View Source" of the uncomplete page i get:
> <TITLE>Missing Post reply data</TITLE>
> <H1>Data Missing</H1>
> This document resulted from a POST operation and has expired from the
> cache. If you wish you can repost the form data to recreate the document
> by pressing the <b>reload</b> button.
>
> I´m working on NT4, php4.0.4pl1, ODBC-> Informix Database
>
> Thanks for any help!
>
> Claudia





i've got a mysql table with about 150.000 record.
i'm getting data out of this table to generate statistic overviews

it seems that this is a problem, cause it takes a long time to generate
these overviews

q:       how can i speed up this table cause 150.000 records is not that
much i suppose?







> i've got a mysql table with about 150.000 record.
> i'm getting data out of this table to generate statistic overviews
> 
> it seems that this is a problem, cause it takes a long time 
> to generate these overviews
> 
> q:       how can i speed up this table cause 150.000 records 
> is not that much i suppose?

You should set up an Index on any fields you commonly search on.

The MySQL documentation has information on how to do this. It's at
www.mysql.com. I would tell you, but a) It's better to learn it, b)
I can't remember, and c) It's 1:30am here and I'm still at work :)

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"What'll Scorpy use wormhole technology for?"
'Faster pizza delivery.'




Hi,

I've written PHP routines to work on MySQL and so far so good.  However,
I have one question.

I have a select routine that has the following syntax (which works fine
thus far):

$queryID = mysql_query("SELECT Country, Agent FROM Ports
                                        WHERE Portname = '$portname'");

My question is, if the variable $portname has the ' character within in,
will this cause an error in my select statement?  If the answer is
"Yes", can someone give me a more robust way of writing it using PHP?

Thanks,
Don





On Friday 27 April 2001 17:56, Don Pro wrote:

> $queryID = mysql_query("SELECT Country, Agent FROM Ports
>                                         WHERE Portname = '$portname'");
>
> My question is, if the variable $portname has the ' character within
> in, will this cause an error in my select statement?  If the answer is
> "Yes", can someone give me a more robust way of writing it using PHP?

Yes.
use addslashes()

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Error 032: Recursion error - see error 032





also note that if magic_quotes_gpc setting (in php.ini) is on, these
quotes will automagically be escaped.  phpinfo() will tell you your
setting, as will get_magic_quotes_gpc().

  http://www.php.net/manual/en/configuration.php#ini.magic-quotes-gpc

run around the manual for more information.

regards,
philip


On Fri, 27 Apr 2001, Christian Reiniger wrote:

> On Friday 27 April 2001 17:56, Don Pro wrote:
> 
> > $queryID = mysql_query("SELECT Country, Agent FROM Ports
> >                                         WHERE Portname = '$portname'");
> >
> > My question is, if the variable $portname has the ' character within
> > in, will this cause an error in my select statement?  If the answer is
> > "Yes", can someone give me a more robust way of writing it using PHP?
> 
> Yes.
> use addslashes()
> 
> -- 
> Christian Reiniger
> LGDC Webmaster (http://sunsite.dk/lgdc/)
> 
> Error 032: Recursion error - see error 032
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 







Would somebody be so kind and tell us how to use the xslt_set_scheme_handler() 
function ?


Heino H. Gehlsen




Hi,

After a querry on a dBase I get to much result to insert them in one
page, so I have to count them in blocks of, let say 20 records; I used
the count() function to get the number of records in result, but I don't
figure what to do after...

Regards and thanks for your help

Marc




search for a such class on the web.

tip: don't select everything, LIMIT your search with LIMIT 100, 20 to select
the records from 100 to 120.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 28, 1998 1:27 AM
To: php-general
Subject: [PHP] A lot of records


Hi,

After a querry on a dBase I get to much result to insert them in one
page, so I have to count them in blocks of, let say 20 records; I used
the count() function to get the number of records in result, but I don't
figure what to do after...

Regards and thanks for your help

Marc

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







        First off I would like to Thank You for taking time to read this 
letter. Second of all your e-mail address was pulled from an on-line 
source, if this was unsolicited from an unclean source we're very sorry, 
but you will not receive any other e-mails from us. This is the only & last 
message you'll receive from us, so you don't have to worry about an 
unsubscribe list or spam. Nor will we give your e-mail out to any one else. 
I'd like to stop, and tell you about a new ON-LINE Retail store. 
Merchandise Wholesale, a retail store that has over 2,000 products  for 
home,travel,jewelry,personal needs etc... Please take time out when you 
have it to browse our ON-LINE directory at  
http://www.merchandisewholesale.com  Click on any images of the item to 
enlarge. Our site is always under constant change for the better. 

Thanks for your precious time, HTTP://MERCHANDISEWHOLESALE.COM
  
   [EMAIL PROTECTED]
   
   




Hello everyone!

I am trying to pass a variable in a url and can't seem to do it.  The problem is, the 
url is already being determined by a php "if" statement.  So, when I get to the part 
where I try to append the url I get parse errors. What I would ideally like to do is 
generate the url using php and append the url with a variable, also using php.  The 
variable is a username, therefore i need to use (urlencode()).  Any ideas.

Thanks, 

Brendan


_________________________________________________________________
Start your day everyday with fellow Sigma Nu brothers. Visit http://www.SigmaNu.com, 
Sigma Nu's exclusive private label start page, where you'll get Fraternity news, New 
York Times news, custom stock portfolios, up-to-the-minute sports scores, current 
weather conditions and five-day forecasts, online shopping with brand name stores, 
web-based Sigma Nu e-mail and much more. This is a free service brought to you by 
Sigma Nu. 




> Hello everyone!
>
> I am trying to pass a variable in a url and can't seem to do it.  The
problem is, the url is already being determined by a php "if" statement.
So, when I get to the part where I try to append the url I get parse errors.
What I would ideally like to do is generate the url using php and append the
url with a variable, also using php.  The variable is a username, therefore
i need to use (urlencode()).  Any ideas.
>
> Thanks,
>
> Brendan

The short answer is 'yes, just do it'
Paste the code that's giving you errors and someone will help you

jason







Hi folks,
I try to store phpcode in a mysql-database, to have them ready, when 
they´ll be needed
When I request these, it seems that they will not be parsed.
Any suggestion?
some code:

// the result comes from an object function
while ($obj -> Fetchinto(&$row)) // as long as there are results
{
        $query=$row[0];         // now the query is in $row[0]

        echo "QUERY $query<br>"; // now you can see the query
// the query shown looks like this
// SELECT count(lfd) FROM $row[0] WHERE yy = $start_y AND mm = $start_m
// but there should be values instead of vars (BTW there are values in the 
vars)
<snipp>

Thanks in advance
Oliver





> I try to store phpcode in a mysql-database, to have them ready, when 
> they´ll be needed
> When I request these, it seems that they will not be parsed.
> Any suggestion?

Eval() it.

http://www.php.net/manual/en/function.eval.php

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"What'll Scorpy use wormhole technology for?"
'Faster pizza delivery.'




YOU ARE GENIUS!

I don't think Jason you have read my previous posts here, but your answer to
Oliver might be able to solve my problem.

still have some BIG doubts on it, but it gave me an idea of a try.

Thanks,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 28, 2001 2:33 AM
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: [PHP] Storing php-code in mysqlDB


> I try to store phpcode in a mysql-database, to have them ready, when
> they´ll be needed
> When I request these, it seems that they will not be parsed.
> Any suggestion?

Eval() it.

http://www.php.net/manual/en/function.eval.php

Jason

--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"What'll Scorpy use wormhole technology for?"
'Faster pizza delivery.'

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






What is the best seamless way to upgrade/update PHP?

Joseph




Thanks for everyone's help on the original question. Now that I have 
gotten the line breaks in a file, How do I get the file out with the 
breaks? Also, does anyone know of a good tutorial on file formatting.


<?php
$location = "log_test.txt";
$toread = fopen($location, "r");
set_magic_quotes_runtime(0);
$content = fread($toread, filesize($location));
fclose($toread);
echo "$content";
?>

TIA
Gary





just do 

$content_str = implode("\n", $content);

at the end of the file.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com



-----Original Message-----
From: Gary [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 28, 2001 2:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] line break part2


Thanks for everyone's help on the original question. Now that I have 
gotten the line breaks in a file, How do I get the file out with the 
breaks? Also, does anyone know of a good tutorial on file formatting.


<?php
$location = "log_test.txt";
$toread = fopen($location, "r");
set_magic_quotes_runtime(0);
$content = fread($toread, filesize($location));
fclose($toread);
echo "$content";
?>

TIA
Gary


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Have a look at file() :

  http://www.php.net/manual/en/function.file.php

  $lines = file('log_test.txt');

  echo $lines[4]; // prints line #5


regards,
philip


On Fri, 27 Apr 2001, Gary wrote:

> Thanks for everyone's help on the original question. Now that I have 
> gotten the line breaks in a file, How do I get the file out with the 
> breaks? Also, does anyone know of a good tutorial on file formatting.
> 
> 
> <?php
> $location = "log_test.txt";
> $toread = fopen($location, "r");
> set_magic_quotes_runtime(0);
> $content = fread($toread, filesize($location));
> fclose($toread);
> echo "$content";
> ?>
> 
> TIA
> Gary
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 






Hello,

please correct me if I'm wrong, but it seems that in PHP 4, after calling
session_start(), you are stuck with serving an HTML page.

What if you want to call session_start(), but you want to send headers
after the session has started? for example, I'd like to deliver a 
downloadable file, but before I deliver that file, I'd like to check the 
user's session and make sure that the user is logged in and that the user 
has proper authorization to access the file.

I've got a workaround for this problem (see below). However, I would prefer
to handle the problem with the built-in session handling functions. Does
anyone know if this can be done?
Thanks
-Matt
<?php
/****
this page serves a request to download a file. The file should
not be served unless the user has authorization to view this file. To
check that authorization, the user must be logged in
****/
function my_session_start() {
// decode session data, if any
if($GLOBALS["PHPSESSID"]) {
$fname = "/tmp/sess_".$GLOBALS["PHPSESSID"]; // file path hardcoded
for this example
$fcontents = @file($fname);
if($fcontents) {
$fcontents = implode("", $fcontents);
include("User.phpc"); // defines the User object stored in the session
session_decode ($fcontents);
}
}
}
/**** start processing the page
get session data, and still allow content type headers to be sent.
why doesn't the built-in session_start() allow this?
****/
my_session_start();
$s_user = &$HTTP_SESSION_VARS["s_user"];
if(!$s_user) {
$err = "user not logged in";
} else {
// pseudo code from here on
if(!$s_user->has_authorization_to_download_requested_file()) {
$err = "user not logged in, or has no authorization to download this
file";
} else {
header("content-type: ".requested_file_mime_type());
output_requested_file_data();
}
}
}
if($err) echo "Error: $err";
?>







Guys,
I think LORD just looked down here in Tokyo, seen me still typing at 3.15am
of Friday night, smoking the third pack of that nasty Marlboros, having no
dinner, with no even a cup coffee remained... and sent to the list that
GENIUS of Jason Murray who solved my problem.

I know, Jason, you didn't mean it, but it REALLY helped me:


  $fname = 'hello';

  $func = sprintf(
  "function %s(\$v='') {
    Return \"\$v<BR>\";
  }",
  $fname
  );

  eval($func);
  echo $fname('Please print it.... please....');

  // And it did!


a dynamic function! I got it.

with eval() I can call it as I wish!

I have no idea, HOW ON THE EARTH could I ever forget about magic EVAL().

I solved it!
Everyone, take a note of this code, as it causes some sleepless nights and
'unhappy' girlfriends to some people. :-)

Thanks everybody,
Jason and Oliver in particular!


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com





-----Original Message-----
From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 28, 2001 2:48 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Variable (naming them) Functions.


On Friday 27 April 2001 17:08, PHPBeginner.com wrote:
> no classes CAN'T solve my problem:
>
> it is an abstraction layer. called as func_hello(); I want, inside
> func_hello() {} declare a new function based on what happened before
> func_hello() was called. In other words: I of course though about
> classes, and there is in fact a work around, but I need to know if
> 'function $var($arg) { return; }' syntax exists and what it is.
>
> in the docs there's nothing being said.

http://php.net/create_function
(maybe together with a little wrapper:
$foo = create_function (...);
$FNames [$var] = $foo;
function delta ($FuncName, $args) {
  return ${$FNames[$FuncName]} ($args);
}
)

But such a thing is an ugly hack and I'm sure you don't need it.


--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Error 032: Recursion error - see error 032

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






I run a Debian 2.2 server with Apache (from stable) and PHP4 (from stable).

I downloaded phpChat in order to setup a chat center on the website.  However, the 
files are named .php3.  

At first I thought I could be cute and just rename the files to .php, as .php is what 
we name our files on our web server.  However, I realized that all the links would not 
work, as the links and includes()/requires() in the files would call to the wrong name.

Now is there anyway to make Apache run a .php3 file with PHP4?  I should just need to 
add that extension somewhere in Apache (srm.conf), but I'm not familiar with how.

- Kath





do something similar to :

  AddType application/x-httpd-php .php .php3 .html .phtml .parsemephp


regards,
philip


On Fri, 27 Apr 2001, Kath wrote:

> I run a Debian 2.2 server with Apache (from stable) and PHP4 (from
> stable).
> 
> I downloaded phpChat in order to setup a chat center on the website.  
> However, the files are named .php3.
> 
> At first I thought I could be cute and just rename the files to .php,
> as .php is what we name our files on our web server.  However, I
> realized that all the links would not work, as the links and
> includes()/requires() in the files would call to the wrong name.
> 
> Now is there anyway to make Apache run a .php3 file with PHP4?  I
> should just need to add that extension somewhere in Apache (srm.conf),
> but I'm not familiar with how.
> 
> - Kath
> 





Thank you!  I wasn't doing the "application/x-httpd-php" part right!

Thanks!

- Kath



----- Original Message ----- 
From: "Philip Olson" <[EMAIL PROTECTED]>
To: "Kath" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, April 27, 2001 2:37 PM
Subject: Re: [PHP] PHP4, .php3 files and Apache


> 
> do something similar to :
> 
>   AddType application/x-httpd-php .php .php3 .html .phtml .parsemephp
> 
> 
> regards,
> philip
> 
> 
> On Fri, 27 Apr 2001, Kath wrote:
> 
> > I run a Debian 2.2 server with Apache (from stable) and PHP4 (from
> > stable).
> > 
> > I downloaded phpChat in order to setup a chat center on the website.  
> > However, the files are named .php3.
> > 
> > At first I thought I could be cute and just rename the files to .php,
> > as .php is what we name our files on our web server.  However, I
> > realized that all the links would not work, as the links and
> > includes()/requires() in the files would call to the wrong name.
> > 
> > Now is there anyway to make Apache run a .php3 file with PHP4?  I
> > should just need to add that extension somewhere in Apache (srm.conf),
> > but I'm not familiar with how.
> > 
> > - Kath
> > 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 






Hi,

Anyone have some function to crypt and text then decrypt?

regards,

Augusto Cesar Castoldi







Have some way to make a script to get the info of mp3 file? like ID3 tag?

---

[ r a f a e l   f a r i a] _____________________
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665





I've seen some on hotscripts.com, sourceforge.net (more chances)


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: Rafael Faria [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 28, 2001 4:26 AM
To: [EMAIL PROTECTED]
Subject: [PHP] MP3




Have some way to make a script to get the info of mp3 file? like ID3 tag?

---

[ r a f a e l   f a r i a] _____________________
[EMAIL PROTECTED]
WebMaster Universo Online - http://www.uol.com.br
Phone # +55 11 3038-8665


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Hi, 
I'm trying to include an HTML string with PHP tags in it, and get 
it parsed just as if it were contained in an include()'d text file. 
For example, let's say I have the string $parse_me = '<p><?php echo 
$REMOTE_ADDR; ?></p>'. How do I include it in the page (*before* it 
gets parsed) without doing any I/O (i.e. writing it to a temp file 
and include()ing that one)? Is it possible in the first place?

Regards,
Luca




Luca <[EMAIL PROTECTED]> wrote:

> How do I include it in the page (*before* it gets parsed) 
> without doing any I/O
                ^^^^^^^
Oops, this should read "any file I/O".

Luca




I need to set up a script such that only one instance of it is running at a
time i.e. in case the script is already executing, it will not be started
again.

My problem is on a script taking a long time to execute (like it should) - I
find that for some reason the script stops somewhere in the middle and
starts to re-execute. I wish to catch this re-execute and halt the script
instead

N







One solution would be to have the script write it's process ID in some .pid
file. Since a process ID is per instance of the script, this should provide you
with the functionality you're looking for.

John

On Fri, 27 Apr 2001, Nikhil Goyal wrote:

> I need to set up a script such that only one instance of it is running at a
> time i.e. in case the script is already executing, it will not be started
> again.
> 
> My problem is on a script taking a long time to execute (like it should) - I
> find that for some reason the script stops somewhere in the middle and
> starts to re-execute. I wish to catch this re-execute and halt the script
> instead
> 
> N
> 
> 
> 
> 

-- 

John Donagher
Application Engineer
Intacct Corp. - Powerful Accounting on the Web
408-395-0989
720 University Ave.
Los Gatos CA 95032
www.intacct.com

Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD





sounds like a good idea. how to I get the process id?

"John Donagher" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> One solution would be to have the script write it's process ID in some
.pid
> file. Since a process ID is per instance of the script, this should
provide you
> with the functionality you're looking for.
>
> John
>
> On Fri, 27 Apr 2001, Nikhil Goyal wrote:
>
> > I need to set up a script such that only one instance of it is running
at a
> > time i.e. in case the script is already executing, it will not be
started
> > again.
> >
> > My problem is on a script taking a long time to execute (like it
should) - I
> > find that for some reason the script stops somewhere in the middle and
> > starts to re-execute. I wish to catch this re-execute and halt the
script
> > instead
> >
> > N
> >
> >
> >
> >
>
> --
>
> John Donagher
> Application Engineer
> Intacct Corp. - Powerful Accounting on the Web
> 408-395-0989
> 720 University Ave.
> Los Gatos CA 95032
> www.intacct.com
>
> Public key available off http://www.keyserver.net
> Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






ok i got getmypid()

Extending the same concept, is it possible for ANOTHER script to check
whether this script has completed execution or is still running?

N

"John Donagher" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> One solution would be to have the script write it's process ID in some
.pid
> file. Since a process ID is per instance of the script, this should
provide you
> with the functionality you're looking for.
>
> John
>
> On Fri, 27 Apr 2001, Nikhil Goyal wrote:
>
> > I need to set up a script such that only one instance of it is running
at a
> > time i.e. in case the script is already executing, it will not be
started
> > again.
> >
> > My problem is on a script taking a long time to execute (like it
should) - I
> > find that for some reason the script stops somewhere in the middle and
> > starts to re-execute. I wish to catch this re-execute and halt the
script
> > instead
> >
> > N
> >
> >
> >
> >
>
> --
>
> John Donagher
> Application Engineer
> Intacct Corp. - Powerful Accounting on the Web
> 408-395-0989
> 720 University Ave.
> Los Gatos CA 95032
> www.intacct.com
>
> Public key available off http://www.keyserver.net
> Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hello,

I have been working to develop the Back-end CMS on Sourceforge:
        https://sourceforge.net/projects/back-end/

I'm running into a bit of a difficulty though folks trying to run the 
code in a windows environment.

To get around the problem with search engines tripping over the ?'s the 
latest code is now using virtual directories to pass the category and 
article ID.  It looks better and provides a shorter URL as well!

Unfortunately, it is harder for folks to understand.  Especially when 
they are trying to install this at home on a local windows machine 
rather than on a linux server....

I suspect that either Apache or PHP hasn't been configured correctly as 
this works on the windows servers:
        http://127.0.0.1/main_file.php?/Articles/4/
but this does not:
        http://127.0.0.1/main_file.php/Articles/4/

The latter has no problems like this on a number of other servers.

I set up this test script to output the various variables that would be 
called on in this script:
http://www.openconcept.on.ca/htdocs/main_file_test.php/Articles/4

In the servers that are providing the errors, neither the Category 
variables or the Article ID's show up.

Does anyone have any suggestions?

Mike
-- 
Mike Gifford, OpenConcept Consulting, http://openconcept.ca
Offering everything your organization needs for an effective web site.
Featured Client: http://rabble.ca - News For the Rest of Us!
If a book doesn't make us better, then what on earth is it for? - Alice 
Walker





Food for thought: Is PHP code software?

- Kath




If it is being sold for profit it is. 

Chris Anderson   aka "Null"    
--------------------------------------------
PHP Developer / Nulltech
PHP-GTK Tester / gtk.php.net
STA Administrator / www.stronger.org
DOD Co-Owner / www.dayofdefeat.com

----- Original Message ----- 
From: "Kath" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 27, 2001 4:29 PM
Subject: [PHP] Is PHP code software?


> Food for thought: Is PHP code software?
> 
> - Kath
> 





What makes something done for free (Say Linux or something infinitely
smaller, the forums I am writing) not software?

Isn't freeware a form of software?

- Kath

----- Original Message -----
From: "Chris Anderson" <[EMAIL PROTECTED]>
To: "Kath" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, April 27, 2001 11:13 AM
Subject: Re: [PHP] Is PHP code software?


> If it is being sold for profit it is.
>
> Chris Anderson   aka "Null"
> --------------------------------------------
> PHP Developer / Nulltech
> PHP-GTK Tester / gtk.php.net
> STA Administrator / www.stronger.org
> DOD Co-Owner / www.dayofdefeat.com
>
> ----- Original Message -----
> From: "Kath" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, April 27, 2001 4:29 PM
> Subject: [PHP] Is PHP code software?
>
>
> > Food for thought: Is PHP code software?
> >
> > - Kath
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





On Friday 27 April 2001 22:29, Kath wrote:
> Food for thought: Is PHP code software?

Sure. Software is...

"instructions that tell a computer what to do. Software comprises the 
entire set of programs, procedures, and routines associated with the 
operation of a computer system. The term was coined to differentiate 
these instructions from hardware-i.e., the physical components of a 
computer system. A set of instructions that directs a computer's hardware 
to perform a task is called a program, or software program."

http://www.britannica.com/eb/article?eu=2214&tocid=0

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

I sat laughing snidely into my notebook until they showed me a PC running
Linux. And oh! It was as though the heavens opened and God handed down a
client-side OS so beautiful, so graceful, and so elegant that a million
Microsoft developers couldn't have invented it even if they had a hundred
years and a thousand crates of Jolt cola.

- LAN Times




Using Perl , I usually say

$string=~s /,$//;

to chop off a particualr char on end.

How do you do this using PHP.

Thanks,

Dexter






$x = "yourtexthere.";

$x = substr($x, 0, -1);

$x will then equal = "yourtexthere"

-m

-----Original Message-----
From: Dexter [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 27, 2001 6:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to chop off a char off end?


Using Perl , I usually say

$string=~s /,$//;

to chop off a particualr char on end.

How do you do this using PHP.

Thanks,

Dexter




Reply via email to