php-general Digest 28 Mar 2001 19:22:38 -0000 Issue 594

Topics (messages 45843 through 45945):

Re: How to send attachment with email with php?
        45843 by: Michael Hall
        45844 by: Yasuo Ohgaki
        45845 by: Jack Dempsey

HOWTO: arrays with forms
        45846 by: Philip Olson

ab post file
        45847 by: Paul Juliano

Re: Blah I'm Stupid
        45848 by: Tim Ward
        45862 by: Christian Reiniger

Re: Spacing between $row["City"],$row["State"]
        45849 by: Matt Williams

Re: New PHP-GTK Site
        45850 by: elias
        45939 by: Joe Stump

Post but not Post
        45851 by: elias
        45879 by: Maxim Maletsky
        45886 by: elias

Re: Sessions to password protect directory?
        45852 by: Kyutums
        45912 by: PHPBeginner.com

how can I set up session
        45853 by: Jacky
        45857 by: elias

JavaScript and Submit
        45854 by: elias
        45869 by: Renze Munnik
        45900 by: elias

file deletions ....
        45855 by: Steve Brett
        45858 by: Phil Driscoll
        45859 by: Steve Brett
        45936 by: Joe Stump

Re: GZip + NS + Print = Trouble
        45856 by: Renze Munnik
        45911 by: Michael Kimsal
        45914 by: Renze Munnik
        45922 by: Michael Kimsal

comparing dates works sometimes and fails another time!
        45860 by: kaab kaoutar
        45866 by: Renze Munnik
        45883 by: elias

odd
        45861 by: Andrius Lokotash
        45875 by: Yasuo Ohgaki
        45876 by: Felix Kronlage

Re: Curious
        45863 by: Christian Reiniger

session handling
        45864 by: \[Inf\] F!RE-WALL
        45867 by: Andrius Lokotash
        45868 by: Pavel Kalian
        45870 by: Pavel Kalian
        45871 by: \[Inf\] F!RE-WALL

Re: Passing Special Characters in Query String
        45865 by: Christian Reiniger
        45919 by: Thomas Edison Jr.

FTP without FTP module
        45872 by: Mauro Biraghi
        45884 by: elias
        45930 by: Matt McClanahan

About php
        45873 by: vishak tomy
        45887 by: elias
        45888 by: Pavel Kalian
        45909 by: Tim McGuire

Re: Help with Posting Data
        45874 by: Tobias Talltorp

Re: Caller's Line number?
        45877 by: Yasuo Ohgaki
        45882 by: elias

Cookie not getting set in IE 5 but no problem in Netscape
        45878 by: Floyd Piedad

MySQL Schema
        45880 by: KPortsmout.aol.com
        45881 by: elias

custody
        45885 by: Theo Richel

Is there way how to get line number from which function was called ???
        45889 by: Milan Mlynarcik
        45892 by: Neil Kimber
        45902 by: elias

Active-X
        45890 by: AJDIN BRANDIC
        45891 by: elias
        45897 by: AJDIN BRANDIC
        45904 by: elias
        45906 by: Simon Ould
        45913 by: Adrian Murphy
        45938 by: Christian Cresante

POP3 read raw message
        45893 by: Miguel Carvalho

php or phtml???
        45894 by: Costas
        45895 by: elias
        45896 by: Tyler Longren
        45898 by: Jon Haworth
        45899 by: Dominick Vansevenant

unix system
        45901 by: Scott Novinger
        45903 by: Dominick Vansevenant
        45926 by: Michael Kimsal

removing $HTTP_POST_VARS
        45905 by: Matt Williams
        45907 by: Jon Rosenberg
        45908 by: Renze Munnik

Re: "DF" output
        45910 by: Steven Shepherd

pattern match help
        45915 by: Costas

Re: $myfile[$count]_type?!
        45916 by: Daniel B I

mailing-list-log-on
        45917 by: MMATTES.de.ibm.com

install-problem
        45918 by: MMATTES.de.ibm.com

Q: php.ini
        45920 by: Joe Rice
        45923 by: Cal Evans
        45924 by: Jon Rosenberg
        45933 by: Joe Rice

Problems of conversion with strftime()
        45921 by: Evelio Martinez
        45934 by: Yasuo Ohgaki

alternate pattern match
        45925 by: Costas
        45935 by: Yasuo Ohgaki
        45940 by: Christian Cresante
        45943 by: Philip Olson

Extracting just the filename from REQUEST_URI
        45927 by: Clayton Dukes
        45929 by: FvH
        45931 by: Clayton Dukes

Locating where PHP is on my server.
        45928 by: Brandon Orther

function knows where call came from?
        45932 by: Peter Van Dijck
        45937 by: Reuben D Budiardja

remote acces
        45941 by: Glenda Robalino

Header problems
        45942 by: Chris

--with-imap-ssl
        45944 by: Nate Mueller

IP of server?
        45945 by: Lance Lovette

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]


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



Use a mime_mail class. Have a look at the mail() function in the annotated
PHP manual. There are a few mime_mail classes mentioned there with links. 

Mick

On Wed, 28 Mar 2001, Carfield Yim wrote:

> How to send attachment with email with php?
> 
> -- 
> 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]
> 
> 





Nothing special. You can compose and send with mail().
Read related RFC or grab code does that from elsewhere on net.

--
Yasuo Ohgaki


"Carfield Yim" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How to send attachment with email with php?
>
> --
> 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]
>





this has been on the list many many times...check the e-mail functions at
php.net and check the archives at http://marc.theaimsgroup.com

-jack

-----Original Message-----
From: Carfield Yim [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 11:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to send attachment with email with php?


How to send attachment with email with php?

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






--------------------------------------------------------------------------
HOWTO : Information on using arrays with forms  (part 1 of n)            :
--------------------------------------------------------------------------

A few array/form questions have popped up recently so here begins a HOWTO 
on dealing with them.  We'll be using $form within our examples so without
further ado, let's talk a little about arrays and forms.

Arrays can be called as usual, such as :

  <input type="text" name="form[]">
  <input type="text" name="form[]">
  <input type="text" name="form[]">

To create this with PHP use a for loop OR quickly try this :

  $max = 3;
  echo str_repeat('<input type="text" name="form[]">',$max);
  
When submitted by the user this will create an array with 3 elements
named 0-2, it'll look something like :

  $form = array( 0 => 'philip', 1 => '[EMAIL PROTECTED]', 2 => 'me.com' );
  
Also, associative arrays work with forms, like this :

  <input type="text" name="form[name]">
  <input type="text" name="form[email]">
  <input type="text" name="form[url]">

Here's a quick simple way to create this form with PHP :

  $names = array('name','email','url');
  foreach ($names as $name) {
    echo '<input type="text" name="form['. $name .']">';
  }

Upon submittion this gives us an associative array similar to :

  $form = array( 'name'=>'philip', 'email'=>'[EMAIL PROTECTED]', 'url'=>'me.com' );
  
In both cases, our form processor reads this submitted array and does its
thing.  It's here we get creative and make the user well aware of what's
happening and what needs to happen.  Doing so means printing existing
values within the form when resubmition is required.  We want to inform
the user what went wrong (not long enough, must be alphanumeric, etc.) and
what to do about it (<b>fill this out!</b>).  We'll deal with this later.

It's good to know about these (and other) PHP and Environment variables :

  REQUEST_METHOD   = What method the form has made, such as POST and GET
  HTTP_POST_VARS   = Array of POSTed information
  HTTP_GET_VARS    = Array of GETed information
  QUERY_STRING     = String of GET information ?a=b&c=d&e=f
  GLOBALS          = An array that contains all global variables.  This is
                     freely available within functions too.

More are seen through a call to phpinfo() and listed here :

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

It's also good to know about these (and other) settings :
  
  register_globals = When enabled, variables automatically enter the 
                     GLOBAL space. If enabled, $form can be called
                     directly otherwise the variables are to be read by
                     other means, like with HTTP_GET_VARS and
                     QUERY_STRING.  Something like this :

                         $form_data_array = $HTTP_POST_VARS['form'];

  magic_quotes_gpc = If on, data is escaped automagically on Get,Post and
                     Cookies (GPC).  This can also be done manually with 
                     addslashes() and if data is viewed while slashes
                     still exist use stripslashes() to strip them first.
                     Also get_magic_quotes_gpc() tells us the current
                     setting.

Read about php.ini settings here :

  http://www.php.net/manual/en/configuration.php
  
Current settings can be seen through phpinfo().  In our next installment 
(when?) we'll talk a little about processing our form arrays.

All words welcome.

Regards,
Philip






Hello,

I have a php page that accepsts posted data.  I'd like to benchmark it
using ab (apache benchmark).  In the ab man page, it has a -p POSTFILE option.
Does anyone here know what format should this post file contain?

Thanks.

__________________________________
www.edsamail.com




if (isset($url) && isset($text))
{       $fp = fopen("file.txt", "w");
        $anothervar = fputs($fp, "<a href='$url'>$text</a><br>", "r+");
        $anothervar = fclose($fp);
}

echo "<form method='post' action='#'>";
echo "<input type='text' name='url' size=20" value='http://'>";
echo "<input type='text' name='text' size=20>";
echo "<input type='submit' name='submit' value='Generate New Link'>";
 
echo "</form>";

        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 herring [mailto:[EMAIL PROTECTED]]
> Sent: 28 March 2001 06:17
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Blah I'm Stupid
> 
> 
> ok here's the script i have, and i keep getting errors
> 
> <?
> $fp = fopen("file.txt", "w");
> $fp = fputs("file.txt", "<a href=\"$url\">$text</a><br>", "r+");
> $fp = fclose("file.txt");
> 
> echo "<form method=\"post\" action=\"$fp\">";
> echo "<input type=\"text\" name=\"url\" size=\"20\" 
> value=\"http://\">";
> echo "<input type=\"text\" name=\"text\" size=\"20\">";
> echo "<input type=\"submit\" name=\"submit\" value=\"Generate 
> New Link\">";
> 
> echo "</form>";
> ?>
> 
> what's wrong with it. it says it's with the fputs and fclose things.
> ----- Original Message -----
> From: "David Robley" <[EMAIL PROTECTED]>
> To: "chris herring" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Tuesday, March 27, 2001 11:06 PM
> Subject: Re: [PHP] Blah I'm Stupid
> 
> 
> > On Wed, 28 Mar 2001 14:31, chris herring wrote:
> > > ----- Original Message -----
> > > From: "David Robley" <[EMAIL PROTECTED]>
> > > To: "chris herring" <[EMAIL PROTECTED]>;
> > > <[EMAIL PROTECTED]>
> > > Sent: Tuesday, March 27, 2001 10:19 PM
> > > Subject: Re: [PHP] Blah I'm Stupid
> > >
> > > > On Wed, 28 Mar 2001 13:44, chris herring wrote:
> > > > > > I got a question here. How would you go about 
> calling variables
> > > > > > from a
> > > > >
> > > > > form. I'm sure this is super-easy, but I'm a newbie. 
> Any help would
> > > > > be greatly appreciated.
> > > >
> > > > Just prefix the form object names with $
> > > >
> > > > Say you have a text box set up like so:
> > > >
> > > > <FORM ACTION=check.php METHOD=GET>
> > > > <input type="text" name="avail" value="">
> > > > <INPUT TYPE=SUBMIT>
> > > > </FORM>
> > > >
> > > > and in check.php
> > > >
> > > > <?php echo $avail; ?>
> > > >
> > > > will show the value entered in the text box
> >
> > > how would you go about writing that data do a text file then?
> >
> > File system functions. fopen the file you want to put the 
> data in, fwrite
> > the values from the variable(s) to the file and fclose the 
> file at the
> > end of the process.
> >
> > Note the ways you can open a file with fopen; and be aware of file
> > permission problems because this is done as the user the 
> web server runs
> > as (*nix, dunno about windows).
> >
> > --
> > David Robley                        | WEBMASTER & Mail List Admin
> > RESEARCH CENTRE FOR INJURY STUDIES  | 
> http://www.nisu.flinders.edu.au/
> > AusEinet                            | 
> http://auseinet.flinders.edu.au/
> >             Flinders University, ADELAIDE, SOUTH AUSTRALIA
> 
> 




On Wednesday 28 March 2001 07:17, you wrote:
> ok here's the script i have, and i keep getting errors
>
> <?
> $fp = fopen("file.txt", "w");
> $fp = fputs("file.txt", "<a href=\"$url\">$text</a><br>", "r+");
> $fp = fclose("file.txt");

re-read the documentation of these functions.


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

/* you are not expected to understand this */

- from the UNIX V6 kernel source





> Is there a way to get spacing between
> $row["City"],$row["State"] in the html output?
> I've tried echo "$row["City"], nbsp; $row["State"]";
> and a bunch of other things and get Parse error: parse
> error, expecting `STRING' or `NUM_STRING' or `'$'' . 

Try

echo $row["City"]." ".$row["State"];


M@




What is PHP-GTK?
Can you just write me a short list of what it can do?

"Joe Stump" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've noticed there isn't really a jumping off point for the PHP-GTK
beginners
> and users. I spent the last few hours throwing a site together that has
the
> basics to fill this void.
>
> It has:
>
> 1.) An application archive
> 2.) News
> 3.) Discussion
> 4.) Helpful Links
>
> I've put up one of my initial apps and plan to put up a few others and
maybe
> a small HOWTO. I'd like the people who have been posting apps to take a
few
> minutes to post their apps here as well. Also, anyone who was thinking of
> posting their apps it might be better served if we posted them in a more
> central location. Finally, if anyone wants to help out (admin, howtos,
etc.)
> please feel free to contact me.
>
> As for me, I'm tired and plan on working on it more tomarrow :o)
>
> --Joe
>
>
> /*****************************\
>  *    Joe Stump              *
>  *    www.Care2.com          *
>  *    Office: 650.328.0198   *
>  *    Extension: 122         *
> \*****************************/
>         www.miester.org
>
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.12
> GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$
> N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
> 5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)!
> ------END GEEK CODE BLOCK------
>
>
> --
> 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-GTK, for those who don't know, is an implementation of GTK using the PHP
language. It basically allows you to program GUI applications in PHP on Windows,
Linux, and basically any other OS that GTK and PHP will compile on.

To find out more information check out:

http://www.gtk.org
http://gtk.php.net
http://gtk.php-coder.net

--Joe

On Wed, Mar 28, 2001 at 11:19:24AM -0800, elias wrote:
> What is PHP-GTK?
> Can you just write me a short list of what it can do?
> 
> "Joe Stump" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I've noticed there isn't really a jumping off point for the PHP-GTK
> beginners
> > and users. I spent the last few hours throwing a site together that has
> the
> > basics to fill this void.
> >
> > It has:
> >
> > 1.) An application archive
> > 2.) News
> > 3.) Discussion
> > 4.) Helpful Links
> >
> > I've put up one of my initial apps and plan to put up a few others and
> maybe
> > a small HOWTO. I'd like the people who have been posting apps to take a
> few
> > minutes to post their apps here as well. Also, anyone who was thinking of
> > posting their apps it might be better served if we posted them in a more
> > central location. Finally, if anyone wants to help out (admin, howtos,
> etc.)
> > please feel free to contact me.
> >
> > As for me, I'm tired and plan on working on it more tomarrow :o)
> >
> > --Joe
> >
> >
> > /*****************************\
> >  *    Joe Stump              *
> >  *    www.Care2.com          *
> >  *    Office: 650.328.0198   *
> >  *    Extension: 122         *
> > \*****************************/
> >         www.miester.org
> >
> > -----BEGIN GEEK CODE BLOCK-----
> > Version: 3.12
> > GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$
> > N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
> > 5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)!
> > ------END GEEK CODE BLOCK------
> >
> >
> > --
> > 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]
/*****************************\
 *    Joe Stump              *
 *    www.Care2.com          *   
 *    Office: 650.328.0198   *
 *    Extension: 122         *
\*****************************/
        www.miester.org

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12 
GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)!
------END GEEK CODE BLOCK------





Hello.

we all know that we can send variables to another PHP file via <form> tag
and with post method.
now i wonder if i can send variables from a script to another like POST
method but not using form tags.
like my question is how can i transfer data from form to form like the POST
of the <form> tag, but w/o session variables or cookies, or url parameters
(like the GET method), and w/o forms ofcourse?

Currently, i'm doing this via hidden forms and automatic posting via
JavaScript, but is there is any clean and better way?

Thanks.






no other way.

Unless you identify the user somehow VERY WELL, write the staff into the
file, and then read the file on other page.

But, basically - the values are being passed with - urls, forms, cookies,
sessions (still cookies or urls). No other ways are out there.

Let me know if you'll find a SECURE one :-)

Cheers,
Maxim Maletsky



-----Original Message-----
From: elias [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 4:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Post but not Post


Hello.

we all know that we can send variables to another PHP file via <form> tag
and with post method.
now i wonder if i can send variables from a script to another like POST
method but not using form tags.
like my question is how can i transfer data from form to form like the POST
of the <form> tag, but w/o session variables or cookies, or url parameters
(like the GET method), and w/o forms ofcourse?

Currently, i'm doing this via hidden forms and automatic posting via
JavaScript, but is there is any clean and better way?

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]




Maxim,

I just want them to be passed same as if passed via a <form> with a POST
method.
can i simulate the POST?
Like i tried to put then in the $HTTP_POST_VARS[] but ofcourse, won't be for
any good,
unless...hmm... i never tried it though, and i have no good knowledge about
it, but here's my idea:
ususaly, we use Header() to go to another page, what if by this header() i
compose the whole header string including the post variables to be posted to
the second page, and the do Header("Location: newloc.php") ?
Theorically, this should work, but i have no idea how the header that have
the posted variables is composed....

If any one can help I would appreciate that.

-elias

"Maxim Maletsky" <[EMAIL PROTECTED]> wrote in message
DC017B079D81D411998C009027B7112A015ED021@EXC-TYO-01">news:DC017B079D81D411998C009027B7112A015ED021@EXC-TYO-01...
> no other way.
>
> Unless you identify the user somehow VERY WELL, write the staff into the
> file, and then read the file on other page.
>
> But, basically - the values are being passed with - urls, forms, cookies,
> sessions (still cookies or urls). No other ways are out there.
>
> Let me know if you'll find a SECURE one :-)
>
> Cheers,
> Maxim Maletsky
>
>
>
> -----Original Message-----
> From: elias [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 4:25 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Post but not Post
>
>
> Hello.
>
> we all know that we can send variables to another PHP file via <form> tag
> and with post method.
> now i wonder if i can send variables from a script to another like POST
> method but not using form tags.
> like my question is how can i transfer data from form to form like the
POST
> of the <form> tag, but w/o session variables or cookies, or url parameters
> (like the GET method), and w/o forms ofcourse?
>
> Currently, i'm doing this via hidden forms and automatic posting via
> JavaScript, but is there is any clean and better way?
>
> 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]
>






Will this be able to protect the images in the directory? For example, if
someone tries to access an image in the directory, will the "auth.php" be
executed?

Thanks for everything.

- Kyutums

"PHPBeginner.com" wrote:

> All you need is to add this into .htaccess
>
> php_value auto_prepend auth.php
>
> when any file under that directory is being accessed, auth.php will come on
> top, there - make your own script to pass-protect yourself..
>
> Sincerely,
>
>  Maxim Maletsky
>  Founder, Chief Developer
>
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
>
> -----Original Message-----
> From: Kyutums [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 23, 2001 10:28 AM
> To: Php-General
> Subject: [PHP] Sessions to password protect directory?
>
> Good day to all!
>
> Before, I was able to password protect html and php files via a username
> and passowrd script which used sessions. Now, I need to password protect
> a folder (via .htaccess) that has images (for a family album thing). Can
> this be done via sessions (or even cookies)? I don't want to
> authenticate the user via forms and not via the pop-up that a browser
> presents when using an .htaccess file. Any scripts that already do this
> (password protect a directory)?
>
> Thanks for all your help.
>
> - Kyutums
>
> --
> 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, it won't. This is for PHP files only.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

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




-----Original Message-----
From: Kyutums [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 5:25 PM
To: PHPBeginner.com; Php-General
Subject: Re: [PHP] Sessions to password protect directory?


Will this be able to protect the images in the directory? For example, if
someone tries to access an image in the directory, will the "auth.php" be
executed?

Thanks for everything.

- Kyutums

"PHPBeginner.com" wrote:

> All you need is to add this into .htaccess
>
> php_value auto_prepend auth.php
>
> when any file under that directory is being accessed, auth.php will come
on
> top, there - make your own script to pass-protect yourself..
>
> Sincerely,
>
>  Maxim Maletsky
>  Founder, Chief Developer
>
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
>
> -----Original Message-----
> From: Kyutums [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 23, 2001 10:28 AM
> To: Php-General
> Subject: [PHP] Sessions to password protect directory?
>
> Good day to all!
>
> Before, I was able to password protect html and php files via a username
> and passowrd script which used sessions. Now, I need to password protect
> a folder (via .htaccess) that has images (for a family album thing). Can
> this be done via sessions (or even cookies)? I don't want to
> authenticate the user via forms and not via the pop-up that a browser
> presents when using an .htaccess file. Any scripts that already do this
> (password protect a directory)?
>
> Thanks for all your help.
>
> - Kyutums
>
> --
> 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]






Very stupid question, but I have one variable, say $name = "foo"; and I want that to 
assign on to session, reditect that to one cgi page and then go to one html page, and 
I want to have that session value here at this html page, see what I mean? I am using 
php3. How do I set session up at the first page befoer the redirect happen?
Note, query string is not preferred solution here.
cheers 
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"




I don't think PHP3 support sessions variables.
but if you want a tricky but working solution to pass variables from page to
page try this:

file1.php
<html>
.....you file is here...
<form name="myform" method="post" action="file2.php">
<input type=hidden name="name" value="foo">
</form>
<script>
  // this will automatically submit and redirect!
  document.myform.submit();
</script>
If you don't want redirection to be automatic, you can link this previous
script with any JavaScript event.

Now in file2.php, you can read as echo $name ....

hope it helps.

""Jacky"" <[EMAIL PROTECTED]> wrote in message
008301c0b7cd$601d8560$[EMAIL PROTECTED]">news:008301c0b7cd$601d8560$[EMAIL PROTECTED]...
Very stupid question, but I have one variable, say $name = "foo"; and I want
that to assign on to session, reditect that to one cgi page and then go to
one html page, and I want to have that session value here at this html page,
see what I mean? I am using php3. How do I set session up at the first page
befoer the redirect happen?
Note, query string is not preferred solution here.
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"







Actually, when I want to submit a form programmatically i do myform.submit()
but what if i got like 3 submit buttons and each one with a name?
ie: submit1 button, submit2 button, and submit3 button.
if the users clicks on of them, i can check in the action file like:
if (isset($submit1)) { ... }
elseif (isset($submit2)) { ... }

but programmatically, how can i write a code that simulates the submit2
click, so the last check (i just wrote) can really say that submit2 was
clicked and continues?

Sorry for poor english, hope i expressed my idea as I'm asking...

-elias






Ehhh... do you want to have them all go to the same page after a
submit?

With real submit buttons:
If you don't, you can just change the 'action' of your form at the
moment that someone pushes one of the submit-buttons.

With 'fake' submit buttons:
Otherwise (if they all have to go to the same page) I'd say you can
just add a hidden field e.g. and set the value to either 'sbm_1',
'sbm_2' or whatever, at the moment someone pushes the button. Then
at the 'result-page' you can check that field and look what the
value is. Another way is (if you want to use the exact check as
you've described) to create three hidden fields (submit1, submit2
and submit3) and assign a value to the one corresponding to the
pushed button.

RenzE


elias wrote:
> 
> Actually, when I want to submit a form programmatically i do myform.submit()
> but what if i got like 3 submit buttons and each one with a name?
> ie: submit1 button, submit2 button, and submit3 button.
> if the users clicks on of them, i can check in the action file like:
> if (isset($submit1)) { ... }
> elseif (isset($submit2)) { ... }
> 
> but programmatically, how can i write a code that simulates the submit2
> click, so the last check (i just wrote) can really say that submit2 was
> clicked and continues?
> 
> Sorry for poor english, hope i expressed my idea as I'm asking...
> 
> -elias
> 
> --
> 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]




Exactly, that how i'm doing at the moment, adding a hidden form that get
changed after the onclick event of any of my fake submit buttons and even my
<a href="#"> objects.

"Renze Munnik" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Ehhh... do you want to have them all go to the same page after a
> submit?
>
> With real submit buttons:
> If you don't, you can just change the 'action' of your form at the
> moment that someone pushes one of the submit-buttons.
>
> With 'fake' submit buttons:
> Otherwise (if they all have to go to the same page) I'd say you can
> just add a hidden field e.g. and set the value to either 'sbm_1',
> 'sbm_2' or whatever, at the moment someone pushes the button. Then
> at the 'result-page' you can check that field and look what the
> value is. Another way is (if you want to use the exact check as
> you've described) to create three hidden fields (submit1, submit2
> and submit3) and assign a value to the one corresponding to the
> pushed button.
>
> RenzE
>
>
> elias wrote:
> >
> > Actually, when I want to submit a form programmatically i do
myform.submit()
> > but what if i got like 3 submit buttons and each one with a name?
> > ie: submit1 button, submit2 button, and submit3 button.
> > if the users clicks on of them, i can check in the action file like:
> > if (isset($submit1)) { ... }
> > elseif (isset($submit2)) { ... }
> >
> > but programmatically, how can i write a code that simulates the submit2
> > click, so the last check (i just wrote) can really say that submit2 was
> > clicked and continues?
> >
> > Sorry for poor english, hope i expressed my idea as I'm asking...
> >
> > -elias
> >
> > --
> > 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]
>






hi,

i need to delete files in my web folder so i can 'tidy' them up. i have a
username and password that has ftp access and so far i've tried system(),
unlink() and setting up an ftp connection (they use php 4.03 whihc seems to
have ftp access closed).

i have no problem listing the files i want to delete but seem unable to
delete them.

can anyone help ?

Steve






Steve

unlink works fine for me (on my nt boxes) providing the anonymous web user
has permission to delete the files. Note that under IIS and possibly PWS,
the damn server keeps files open for a few minutes after it has served them
up, and consequently nobody can delete or modify the files during this
period.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org







""Phil Driscoll"" <[EMAIL PROTECTED]> wrote in message
001201c0b768$60da60a0$0c800001@philsntserver">news:001201c0b768$60da60a0$0c800001@philsntserver...
> Steve
>
> unlink works fine for me (on my nt boxes) providing the anonymous web user
> has permission to delete the files. Note that under IIS and possibly PWS,

i think that may be the problem. the site is on a server on an  ISP and the
web user does not have permission to delete the files.
i was hoping to use ftp_connect but don't think that's suported either ...
maybe sudo via system() would work ....

> the damn server keeps files open for a few minutes after it has served
them
> up, and consequently nobody can delete or modify the files during this
> period.
>
> Cheers
> --
> Phil Driscoll
> Dial Solutions
> +44 (0)113 294 5112
> http://www.dialsolutions.com
> http://www.dtonline.org
>
>
>
> --
> 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]
>






Make sure that the PHP user (usually nobody) has the access to delete those
files - I usually just do `rm -fr /path/to/file.foo`; and it works fine.

--Joe

On Wed, Mar 28, 2001 at 09:42:36AM +0100, Steve Brett wrote:
> hi,
> 
> i need to delete files in my web folder so i can 'tidy' them up. i have a
> username and password that has ftp access and so far i've tried system(),
> unlink() and setting up an ftp connection (they use php 4.03 whihc seems to
> have ftp access closed).
> 
> i have no problem listing the files i want to delete but seem unable to
> delete them.
> 
> can anyone help ?
> 
> Steve
> 
> 
> 
> -- 
> 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]
/*****************************\
 *    Joe Stump              *
 *    www.Care2.com          *   
 *    Office: 650.328.0198   *
 *    Extension: 122         *
\*****************************/
        www.miester.org

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12 
GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)!
------END GEEK CODE BLOCK------





Thanks for bringing up this solution. However... I already thought
of this option myself. Problem, though, is that _ALL_ my pages
should be printable. Maybe a very small number of pages will not
have to be printable, but those are so small that the compression
isn't realy necesary. Besides that I don't realy like sites that use
separate 'printer-friendly' pages. When I'm looking at some page I
just want to be able to print it rightaway. And I want to give my
clients this opportunity to. That's why I also have a separate
(extra/own) print-button on my sites. The user can just use that
without realy having to know how the browser works (concerning
printing). Because you will just not believe how 'stupid' some users
are.

But anyway... any other solutions are ofcourse _very_ much welcome
and I'll keep y'all posted a.s.a. I get some more info about this
subject.


RenzE


On Wed, Mar 28, 2001 at 09:49:45AM +0100, Jurian wrote:
> Hehe, I've seen that before, stupid netscape :-)
> We're using output compression as well, what we did, was make an option to 
> disable compression (http://site/file.html?skip_compress=true) in the 
> compression function. Then have a "printer friendly page" button on pages 
> you want to be printable, that links to the current page, with the 
> skip_compress=true option. That way the browser gets the uncompresses 
> version, and prints ok again. I haven't been able to get netscape to print 
> the uncompressed text when the output is compressed, if you somehow find a 
> way that doesn't require reloading the page with an option like 
> skip_compress, please, let me know :-)
> 
> Hope this helps,
> 
> Jurian
> 




If you're using a templating system of some sort,
if should be pretty easy to check the USER_AGENT and only
compress if it's IE.  Or NOT compress is it's NS.

That's about the only way to do it easily that I can think of,
and we're planning on implementing.

<rant mode="on">

I WANT to like netscape.  REALLY.  But they've pretty much made it
impossible by not fixing things.  Historically, NS had an edge on features
over IE, imo, till the 4 series.  Neck and neck, again, imo.  But
without any significant changes in years its just way behind the times.

Reloading a page to do 'view source'?  (Sorry - POSTED data!)
Reloading a page to print?
Reloading a page after a browser resize?

Just ridiculous engineering, imo.  Even more so when you figure that,
when this was first out, every one was on 14.4 modems.

<rant mode="off">

Hopt that helps.

Renze Munnik wrote:

> Thanks for bringing up this solution. However... I already thought
> of this option myself. Problem, though, is that _ALL_ my pages
> should be printable. Maybe a very small number of pages will not
> have to be printable, but those are so small that the compression
> isn't realy necesary. Besides that I don't realy like sites that use
> separate 'printer-friendly' pages. When I'm looking at some page I
> just want to be able to print it rightaway. And I want to give my
> clients this opportunity to. That's why I also have a separate
> (extra/own) print-button on my sites. The user can just use that
> without realy having to know how the browser works (concerning
> printing). Because you will just not believe how 'stupid' some users
> are.
>
> But anyway... any other solutions are ofcourse _very_ much welcome
> and I'll keep y'all posted a.s.a. I get some more info about this
> subject.
>
> RenzE
>
> On Wed, Mar 28, 2001 at 09:49:45AM +0100, Jurian wrote:
> > Hehe, I've seen that before, stupid netscape :-)
> > We're using output compression as well, what we did, was make an option to
> > disable compression (http://site/file.html?skip_compress=true) in the
> > compression function. Then have a "printer friendly page" button on pages
> > you want to be printable, that links to the current page, with the
> > skip_compress=true option. That way the browser gets the uncompresses
> > version, and prints ok again. I haven't been able to get netscape to print
> > the uncompressed text when the output is compressed, if you somehow find a
> > way that doesn't require reloading the page with an option like
> > skip_compress, please, let me know :-)
> >
> > Hope this helps,
> >
> > Jurian
> >
>
> --
> 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]





A well... what shall I say. I have to agree with you _A LOT_!!!
Netscape ruled, but doesn't anymore. It's a damn shame. They pretty
much stick to the standards (which I like very much) but the program
(browser) is f*cked up.

Anyway... My pages contain some tables about three within each
other. And NS can't handle tables to good. So if there is any
browser I'd want to use compression for... it'd be NS. That way the
data would be faster there and NS should have more time to process
it. So I'm not realy looking for I solution that only works for IE.
Because only compressing it for IE was something I'd thought about
already, but I don't realy think it's a reasonable option.

But... Thanks for spending your time to my problem!

RenzE


On Wed, Mar 28, 2001 at 09:51:09AM -0500, Michael Kimsal wrote:
> If you're using a templating system of some sort,
> if should be pretty easy to check the USER_AGENT and only
> compress if it's IE.  Or NOT compress is it's NS.
> 
> That's about the only way to do it easily that I can think of,
> and we're planning on implementing.
> 
> <rant mode="on">
> 
> I WANT to like netscape.  REALLY.  But they've pretty much made it
> impossible by not fixing things.  Historically, NS had an edge on features
> over IE, imo, till the 4 series.  Neck and neck, again, imo.  But
> without any significant changes in years its just way behind the times.
> 
> Reloading a page to do 'view source'?  (Sorry - POSTED data!)
> Reloading a page to print?
> Reloading a page after a browser resize?
> 
> Just ridiculous engineering, imo.  Even more so when you figure that,
> when this was first out, every one was on 14.4 modems.
> 
> <rant mode="off">
> 
> Hopt that helps.
> 




No problem.  Understood about the table issue, but it's normally not
the downloading of the HTML that's as much a problem as the rendering,
in my experience, with netscape.

I'm the last person who would adopt this attitude, but...

Check your stats?  How many IE users?  How many NS users?
The 'solution' is one which by definition CAN'T work with NS.
It may not be an IE only thing - not sure about opera or lynx or
konqueror with gzip stuff.  But don't look at it like an IE only thing.
Just a non-NS thing.  It's their own damn fault.

If you've got a lot of traffic, the gzip can save a lot of bandwidth.
Especially if 80% of your traffic is IE anyway.

Good luck.


Renze Munnik wrote:

> A well... what shall I say. I have to agree with you _A LOT_!!!
> Netscape ruled, but doesn't anymore. It's a damn shame. They pretty
> much stick to the standards (which I like very much) but the program
> (browser) is f*cked up.
>
> Anyway... My pages contain some tables about three within each
> other. And NS can't handle tables to good. So if there is any
> browser I'd want to use compression for... it'd be NS. That way the
> data would be faster there and NS should have more time to process
> it. So I'm not realy looking for I solution that only works for IE.
> Because only compressing it for IE was something I'd thought about
> already, but I don't realy think it's a reasonable option.
>
> But... Thanks for spending your time to my problem!





Hi!

$date1="2001-1-7";$date2="2001-1-14";
if ($date1>=$date2) echo "date1 is greater then date2";
else echo "date2 is greater then date1";
the result is the first :(
but it works for other dates!

Thanks

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





If you _do_ want to use this method for comparing dates (which isn't
realy a usual way of doing it... there date-functions) you should
fill up with leading 0's, like:

$date1="2001-01-07"; $date2="2001-01-14";

The reason is _very_ simple... You performing a text-compare here.
And let's face it... the characters "-1" (day of date2) are
"smaller" than "-7" (day in date1).

So...

RenzE


kaab kaoutar wrote:
> 
> Hi!
> 
> $date1="2001-1-7";$date2="2001-1-14";
> if ($date1>=$date2) echo "date1 is greater then date2";
> else echo "date2 is greater then date1";
> the result is the first :(
> but it works for other dates!
> 
> Thanks
> 
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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]




What are appropriate functions to do Date and Time comparison?
like:
  Date difference
  Date Comparison?
  Adding 'n' days to current date string value, Removing 'n' month, etc.....
 Where can i find the date integer enconding used in PHP?
 Like i know how it's done in Delphi (as stored as a Double value)
 but in PHP, the date integer how is it encoded?

thanks.

"Renze Munnik" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> If you _do_ want to use this method for comparing dates (which isn't
> realy a usual way of doing it... there date-functions) you should
> fill up with leading 0's, like:
>
> $date1="2001-01-07"; $date2="2001-01-14";
>
> The reason is _very_ simple... You performing a text-compare here.
> And let's face it... the characters "-1" (day of date2) are
> "smaller" than "-7" (day in date1).
>
> So...
>
> RenzE
>
>
> kaab kaoutar wrote:
> >
> > Hi!
> >
> > $date1="2001-1-7";$date2="2001-1-14";
> > if ($date1>=$date2) echo "date1 is greater then date2";
> > else echo "date2 is greater then date1";
> > the result is the first :(
> > but it works for other dates!
> >
> > Thanks
> >
> >
_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.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]
>






Hi.

It seems that PHP don't clean up it's temporary session files, is this a
"feature" or bug?

PHP versions used 4.0.1pl1 to 4.0.4-pl1





What is your

session.gc_probability
session.gc_maxlifetime

Garbage collection is affected by these.
Garbage collection will not be performed unless someone is using session and
garbage collection is performed. So answer to your question is it is PHP4
session restriction that PHP does not delete session files unless garbage
collection is performed. It will be deleted eventually, though.

Try higher gc_probability if you have problem with that.

--
Yasuo Ohgaki


""Andrius Lokotash"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi.

It seems that PHP don't clean up it's temporary session files, is this a
"feature" or bug?

PHP versions used 4.0.1pl1 to 4.0.4-pl1


--
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 Wed, Mar 28, 2001 at 12:03:55PM +0200, Andrius Lokotash wrote:

> It seems that PHP don't clean up it's temporary session files, is this a
> "feature" or bug?

it cleans them in certain intervals.

from php.ini:

|session.gc_maxlifetime    = 1440    ; after this number of seconds, stored
|                                    ; data will be seen as 'garbage' and
|                                    ; cleaned up by the gc process

-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 

PGP signature





On Wednesday 28 March 2001 08:18, you wrote:

> in general, I avoid using quotes where possible (such as in the
> following) <font size=3 face=Arial> (instead of <font size=\"3\"
> face=\"Arial\">)

Remember that XHTML *requires* quotes around every attribute value.

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

/* you are not expected to understand this */

- from the UNIX V6 kernel source




Every time I want to initiate a session i get this:

Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR) failed: m
(2) in e:\webserver\phptest\page1.php on line 2

Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR) failed: m
(2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the
current setting of session.save_path is correct (/tmp) in Unknown on line 0

I run an Apache webserver under Windows and I have the latest version of
PHP. I looked up the "session.save_path" in the php.ini file and it sais:

[Session]
session.save_handler      = files   ; handler used to store/retrieve data
session.save_path         = /tmp    ; argument passed to save_handler
                                    ; in the case of files, this is the
                                    ; path where data files are stored
session.use_cookies       = 1       ; whether to use cookies
session.name              = PHPSESSID
                                    ; name of the session
                                    ; is used as cookie name
session.auto_start        = 0       ; initialize session on request startup
session.cookie_lifetime   = 1814400       ; lifetime in seconds of cookie
                                    ; or if 0, until browser is restarted
session.cookie_path       = /       ; the path the cookie is valid for
session.cookie_domain     =         ; the domain the cookie is valid for
session.serialize_handler = php     ; handler used to serialize data
                                    ; php is the standard serializer of PHP
session.gc_probability    = 1       ; percentual probability that the
                                    ; 'garbage collection' process is
started
                                    ; on every session initialization
session.gc_maxlifetime    = 1440    ; after this number of seconds, stored
                                    ; data will be seen as 'garbage' and
                                    ; cleaned up by the gc process
session.referer_check     =         ; check HTTP Referer to invalidate
                                    ; externally stored URLs containing ids
session.entropy_length    = 0       ; how many bytes to read from the file
session.entropy_file      =         ; specified here to create the session
id
; session.entropy_length    = 16
; session.entropy_file      = /dev/urandom
session.cache_limiter     = nocache ; set to {nocache,private,public} to
                                    ; determine HTTP caching aspects
session.cache_expire      = 180     ; document expires after n minutes
session.use_trans_sid     = 1       ; use transient sid support if enabled
                                    ; by compiling with --enable-trans-sid
url_rewriter.tags         =
"a=href,area=href,frame=src,input=src,form=fakeentry"

What's wrong with /tmp ? Where's that map located? Do I need to change the
entry? Should I create the dir? If so, where?






if you use windows then paht myst be c:\tmp or somthing like that.

the difference between unix & windows systems are directory adressing
symbols, unix uses / windows on the oder hand \, fix this in php.ini and
it will work

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf
Of [Inf] F!RE-WALL
Sent: Wednesday, March 28, 2001 12:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] session handling


Every time I want to initiate a session i get this:

Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR)
failed: m
(2) in e:\webserver\phptest\page1.php on line 2

Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR)
failed: m
(2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the
current setting of session.save_path is correct (/tmp) in Unknown on
line 0

I run an Apache webserver under Windows and I have the latest version of
PHP. I looked up the "session.save_path" in the php.ini file and it
sais:

[Session]
session.save_handler      = files   ; handler used to store/retrieve
data
session.save_path         = /tmp    ; argument passed to save_handler
                                    ; in the case of files, this is the
                                    ; path where data files are stored
session.use_cookies       = 1       ; whether to use cookies
session.name              = PHPSESSID
                                    ; name of the session
                                    ; is used as cookie name
session.auto_start        = 0       ; initialize session on request
startup
session.cookie_lifetime   = 1814400       ; lifetime in seconds of
cookie
                                    ; or if 0, until browser is
restarted
session.cookie_path       = /       ; the path the cookie is valid for
session.cookie_domain     =         ; the domain the cookie is valid for
session.serialize_handler = php     ; handler used to serialize data
                                    ; php is the standard serializer of
PHP
session.gc_probability    = 1       ; percentual probability that the
                                    ; 'garbage collection' process is
started
                                    ; on every session initialization
session.gc_maxlifetime    = 1440    ; after this number of seconds,
stored
                                    ; data will be seen as 'garbage' and
                                    ; cleaned up by the gc process
session.referer_check     =         ; check HTTP Referer to invalidate
                                    ; externally stored URLs containing
ids
session.entropy_length    = 0       ; how many bytes to read from the
file
session.entropy_file      =         ; specified here to create the
session
id
; session.entropy_length    = 16
; session.entropy_file      = /dev/urandom
session.cache_limiter     = nocache ; set to {nocache,private,public} to
                                    ; determine HTTP caching aspects
session.cache_expire      = 180     ; document expires after n minutes
session.use_trans_sid     = 1       ; use transient sid support if
enabled
                                    ; by compiling with
--enable-trans-sid
url_rewriter.tags         =
"a=href,area=href,frame=src,input=src,form=fakeentry"

What's wrong with /tmp ? Where's that map located? Do I need to change
the
entry? Should I create the dir? If so, where?



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





----- Original Message -----
From: "[Inf] F!RE-WALL" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 12:10 PM
Subject: [PHP] session handling


> Every time I want to initiate a session i get this:
>
> Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR) failed:
m
> (2) in e:\webserver\phptest\page1.php on line 2
>
> Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR) failed:
m
> (2) in Unknown on line 0
>
> Warning: Failed to write session data (files). Please verify that the
> current setting of session.save_path is correct (/tmp) in Unknown on line
0
>
> I run an Apache webserver under Windows and I have the latest version of
> PHP. I looked up the "session.save_path" in the php.ini file and it sais:
>
> [Session]
> session.save_handler      = files   ; handler used to store/retrieve data
> session.save_path         = /tmp    ; argument passed to save_handler
>                                     ; in the case of files, this is the
>                                     ; path where data files are stored
> session.use_cookies       = 1       ; whether to use cookies
> session.name              = PHPSESSID
>                                     ; name of the session
>                                     ; is used as cookie name
> session.auto_start        = 0       ; initialize session on request
startup
> session.cookie_lifetime   = 1814400       ; lifetime in seconds of cookie
>                                     ; or if 0, until browser is restarted
> session.cookie_path       = /       ; the path the cookie is valid for
> session.cookie_domain     =         ; the domain the cookie is valid for
> session.serialize_handler = php     ; handler used to serialize data
>                                     ; php is the standard serializer of
PHP
> session.gc_probability    = 1       ; percentual probability that the
>                                     ; 'garbage collection' process is
> started
>                                     ; on every session initialization
> session.gc_maxlifetime    = 1440    ; after this number of seconds, stored
>                                     ; data will be seen as 'garbage' and
>                                     ; cleaned up by the gc process
> session.referer_check     =         ; check HTTP Referer to invalidate
>                                     ; externally stored URLs containing
ids
> session.entropy_length    = 0       ; how many bytes to read from the file
> session.entropy_file      =         ; specified here to create the session
> id
> ; session.entropy_length    = 16
> ; session.entropy_file      = /dev/urandom
> session.cache_limiter     = nocache ; set to {nocache,private,public} to
>                                     ; determine HTTP caching aspects
> session.cache_expire      = 180     ; document expires after n minutes
> session.use_trans_sid     = 1       ; use transient sid support if enabled
>                                     ; by compiling with --enable-trans-sid
> url_rewriter.tags         =
> "a=href,area=href,frame=src,input=src,form=fakeentry"
>
> What's wrong with /tmp ? Where's that map located? Do I need to change the
> entry? Should I create the dir? If so, where?
>
>
>
> --
> 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]
>





Sorry, hit the submit button too soon :-)

The session.save_path must exist on your system.
Try session.save_path = C:\winnt\temp (if you're on NT/2000) or
C:\windows\temp instead of /tmp

Pavel

----- Original Message -----
From: "Pavel Kalian" <[EMAIL PROTECTED]>
To: "[Inf] F!RE-WALL" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 12:17 PM
Subject: Re: [PHP] session handling


>
> ----- Original Message -----
> From: "[Inf] F!RE-WALL" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 28, 2001 12:10 PM
> Subject: [PHP] session handling
>
>
> > Every time I want to initiate a session i get this:
> >
> > Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR)
failed:
> m
> > (2) in e:\webserver\phptest\page1.php on line 2
> >
> > Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR)
failed:
> m
> > (2) in Unknown on line 0
> >
> > Warning: Failed to write session data (files). Please verify that the
> > current setting of session.save_path is correct (/tmp) in Unknown on
line
> 0
> >
> > I run an Apache webserver under Windows and I have the latest version of
> > PHP. I looked up the "session.save_path" in the php.ini file and it
sais:
> >
> > [Session]
> > session.save_handler      = files   ; handler used to store/retrieve
data
> > session.save_path         = /tmp    ; argument passed to save_handler
> >                                     ; in the case of files, this is the
> >                                     ; path where data files are stored
> > session.use_cookies       = 1       ; whether to use cookies
> > session.name              = PHPSESSID
> >                                     ; name of the session
> >                                     ; is used as cookie name
> > session.auto_start        = 0       ; initialize session on request
> startup
> > session.cookie_lifetime   = 1814400       ; lifetime in seconds of
cookie
> >                                     ; or if 0, until browser is
restarted
> > session.cookie_path       = /       ; the path the cookie is valid for
> > session.cookie_domain     =         ; the domain the cookie is valid for
> > session.serialize_handler = php     ; handler used to serialize data
> >                                     ; php is the standard serializer of
> PHP
> > session.gc_probability    = 1       ; percentual probability that the
> >                                     ; 'garbage collection' process is
> > started
> >                                     ; on every session initialization
> > session.gc_maxlifetime    = 1440    ; after this number of seconds,
stored
> >                                     ; data will be seen as 'garbage' and
> >                                     ; cleaned up by the gc process
> > session.referer_check     =         ; check HTTP Referer to invalidate
> >                                     ; externally stored URLs containing
> ids
> > session.entropy_length    = 0       ; how many bytes to read from the
file
> > session.entropy_file      =         ; specified here to create the
session
> > id
> > ; session.entropy_length    = 16
> > ; session.entropy_file      = /dev/urandom
> > session.cache_limiter     = nocache ; set to {nocache,private,public} to
> >                                     ; determine HTTP caching aspects
> > session.cache_expire      = 180     ; document expires after n minutes
> > session.use_trans_sid     = 1       ; use transient sid support if
enabled
> >                                     ; by compiling
with --enable-trans-sid
> > url_rewriter.tags         =
> > "a=href,area=href,frame=src,input=src,form=fakeentry"
> >
> > What's wrong with /tmp ? Where's that map located? Do I need to change
the
> > entry? Should I create the dir? If so, where?
> >
> >
> >
> > --
> > 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]
> >
>





thanx m8
IT WORKS!!!!

""Andrius Lokotash"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
if you use windows then paht myst be c:\tmp or somthing like that.

the difference between unix & windows systems are directory adressing
symbols, unix uses / windows on the oder hand \, fix this in php.ini and
it will work

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf
Of [Inf] F!RE-WALL
Sent: Wednesday, March 28, 2001 12:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] session handling


Every time I want to initiate a session i get this:

Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR)
failed: m
(2) in e:\webserver\phptest\page1.php on line 2

Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR)
failed: m
(2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the
current setting of session.save_path is correct (/tmp) in Unknown on
line 0

I run an Apache webserver under Windows and I have the latest version of
PHP. I looked up the "session.save_path" in the php.ini file and it
sais:

[Session]
session.save_handler      = files   ; handler used to store/retrieve
data
session.save_path         = /tmp    ; argument passed to save_handler
                                    ; in the case of files, this is the
                                    ; path where data files are stored
session.use_cookies       = 1       ; whether to use cookies
session.name              = PHPSESSID
                                    ; name of the session
                                    ; is used as cookie name
session.auto_start        = 0       ; initialize session on request
startup
session.cookie_lifetime   = 1814400       ; lifetime in seconds of
cookie
                                    ; or if 0, until browser is
restarted
session.cookie_path       = /       ; the path the cookie is valid for
session.cookie_domain     =         ; the domain the cookie is valid for
session.serialize_handler = php     ; handler used to serialize data
                                    ; php is the standard serializer of
PHP
session.gc_probability    = 1       ; percentual probability that the
                                    ; 'garbage collection' process is
started
                                    ; on every session initialization
session.gc_maxlifetime    = 1440    ; after this number of seconds,
stored
                                    ; data will be seen as 'garbage' and
                                    ; cleaned up by the gc process
session.referer_check     =         ; check HTTP Referer to invalidate
                                    ; externally stored URLs containing
ids
session.entropy_length    = 0       ; how many bytes to read from the
file
session.entropy_file      =         ; specified here to create the
session
id
; session.entropy_length    = 16
; session.entropy_file      = /dev/urandom
session.cache_limiter     = nocache ; set to {nocache,private,public} to
                                    ; determine HTTP caching aspects
session.cache_expire      = 180     ; document expires after n minutes
session.use_trans_sid     = 1       ; use transient sid support if
enabled
                                    ; by compiling with
--enable-trans-sid
url_rewriter.tags         =
"a=href,area=href,frame=src,input=src,form=fakeentry"

What's wrong with /tmp ? Where's that map located? Do I need to change
the
entry? Should I create the dir? If so, where?



--
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 Wednesday 28 March 2001 08:36, you wrote:
> I'm facing a problem with Special Characters ($, %, &,
> \, /, ;, :, ", ') etc......
> We are sending a varibale in a query string like this
>
>
> <a href="add_pro_team.php3?title=<? echo
> urlencode($title) ?>">

try rawurlencode()

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

/* you are not expected to understand this */

- from the UNIX V6 kernel source




I've tried everything :
rawurlencode, urldecode, htmlentities,
htmlspecialchars - nothing is working. and come 2
think of it - it seems like such a basic problem...

Help!
T. Edison jr.
--- Christian Reiniger <[EMAIL PROTECTED]> wrote:
> On Wednesday 28 March 2001 08:36, you wrote:
> > I'm facing a problem with Special Characters ($,
> %, &,
> > \, /, ;, :, ", ') etc......
> > We are sending a varibale in a query string like
> this
> >
> >
> > <a href="add_pro_team.php3?title=<? echo
> > urlencode($title) ?>">
> 
> try rawurlencode()
> 
> -- 
> Christian Reiniger
> LGDC Webmaster (http://sunsite.dk/lgdc/)
> 
> /* you are not expected to understand this */
> 
> - from the UNIX V6 kernel source
> 
> --
> 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]
> 


=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text




How can I do FTP without FTP module?
Thanks.






Maybe you can try implementing the RFC of the FTP.
Using plain socket functions, reading, receiving............writing....

good luck.

""Mauro Biraghi"" <[EMAIL PROTECTED]> wrote in message
99se7u$906$[EMAIL PROTECTED]">news:99se7u$906$[EMAIL PROTECTED]...
> How can I do FTP without FTP module?
> 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]
>






On Wed, Mar 28, 2001 at 12:30:06PM +0200, Mauro Biraghi wrote:

> How can I do FTP without FTP module?
> Thanks.

You can open files over FTP with the fopen wrappers, however this will
only work for connecting to FTP servers that support passive mode.

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

Matt




Hello,
        I have a doubt about multi select from drop down, if i set it as
<select name="number[]"> then how could I check it for javascript
validation. for this select, If any alternative for this please inform
me.

Vishak

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1




Please re-phrase, i might be able to help you.
give me an example too.

"vishak tomy" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello,
        I have a doubt about multi select from drop down, if i set it as
<select name="number[]"> then how could I check it for javascript
validation. for this select, If any alternative for this please inform
me.

Vishak

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

--
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 only reference such elements using it's indexes in javascript.

try formName.elements[3].value //(replace 3 with the index of your <select>)

Pavel

>
> "vishak tomy" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>         I have a doubt about multi select from drop down, if i set it as
> <select name="number[]"> then how could I check it for javascript
> validation. for this select, If any alternative for this please inform
> me.
>
> Vishak
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
> --
> 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]
>





Here is a post from a few months ago that has an idea about your question:
Tim
______________________________________________________________
Quick answer: Nothing, if it works.

Which browser supports it?


Anthony

-----Original Message-----
From: Ignacio Vazquez-Abrams [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 28, 2000 11:40 AM
To: Anthony Martin
Cc: '[EMAIL PROTECTED]' 
Subject: Re: [PHP] Great javascript function


On Thu, 28 Dec 2000, Anthony Martin wrote:

> Ever use associative arrays to name a form element?
>
>   <INPUT type="submit" name="doThis[foo]" value="Do Foo">
>
> Ever try to use that name with javascript?
>
>   alert ( document.myform.doThis['foo'].value ) ;
>
> It doesn't work.  Or at least, I don't see how it would.  The brackets are
>

Quick question: What's wrong with document.myform["dothis[foo]"].value?


>>> vishak tomy <[EMAIL PROTECTED]> 03/28/01 04:39AM >>>
Hello,
        I have a doubt about multi select from drop down, if i set it as
<select name="number[]"> then how could I check it for javascript
validation. for this select, If any alternative for this please inform
me.

Vishak

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1 

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






Sorry, a post MUST come from the client. The only way I know, is to use
JavaScript for this...

// Tobias


""Peter Phillips"" <[EMAIL PROTECTED]> wrote in message
99p6a2$vou$[EMAIL PROTECTED]">news:99p6a2$vou$[EMAIL PROTECTED]...
> Hi,
> I need a way to POST data to another script on another server, without
using
> a form and without using GET (i.e. foobar.php?name=value), I then need the
> user to be sent to that page (which now has the data).
>
> Is that possible? I found some functions (PostToHost), but they only POST
> the data and do now direct the user to the site.
>
> Any help would be appreciated.
>
> Thanks
>
> BTW: I can't use sessions or anything like that.
>
>
>
> --
> 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]
>






Not sure what you really mean. __LINE__ contains current line number in the script wherever it is used. So if you want caller's line number function foo($line) { echo 'Line number: '. $line; } foo(__LINE__); You can get the caller's line number. (Line number of foo(__LINE__);) Regards, -- Yasuo Ohgaki ""elias"" <[EMAIL PROTECTED]> wrote in message 99s17u$fd7$[EMAIL PROTECTED]">news:99s17u$fd7$[EMAIL PROTECTED]... > Hello, > > can i make a function that displays the __LINE__ of it's caller? > > ie: > > function show_caller_s_line() > { > echo "my caller's line is:" . __LINE__; > } > > 1: blahblahblah > 2: show_caller_s_line() > 3: blahblah > > output should be: > my caller's line is: 3 > > > is that possible? > > thanks. > -elias > > > > -- > 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] >



Look at this example:

1:
2:  write_debug_string("i'm here");
3:
4:
5: write_debug_string("now i'm here");
6:

function write_debug_string($message)
{
  echo sprintf("[DEBUG AT LINE %d] %s", get_callers_line(), $message);
}

this should output:
[DEBUG AT LINE 2]: i'm here
[DEBUG AT LINE 5]: now i'm here

so basically, as if passing to the write_debug_string() a hidden parameter =
__LINE__
but i don't want to pass it everytime.
maybe in C language i could have written a macro that passes the __LINE__
for me.

btw, any macros in PHP like in C? (#define xyz...)


""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message
99sgbp$t8p$[EMAIL PROTECTED]">news:99sgbp$t8p$[EMAIL PROTECTED]...
> Not sure what you really mean.
>
> __LINE__ contains current line number in the script wherever it is used.
So if
> you want caller's line number
>
> function foo($line) {
>  echo 'Line number: '. $line;
> }
>
> foo(__LINE__);
>
> You can get the caller's line number. (Line number of foo(__LINE__);)
>
> Regards,
> --
> Yasuo Ohgaki
>
>
> ""elias"" <[EMAIL PROTECTED]> wrote in message
> 99s17u$fd7$[EMAIL PROTECTED]">news:99s17u$fd7$[EMAIL PROTECTED]...
> > Hello,
> >
> > can i make a function that displays the __LINE__ of it's caller?
> >
> > ie:
> >
> > function show_caller_s_line()
> > {
> >    echo "my caller's line is:" . __LINE__;
> > }
> >
> > 1: blahblahblah
> > 2: show_caller_s_line()
> > 3: blahblah
> >
> > output should be:
> >   my caller's line is: 3
> >
> >
> > is that possible?
> >
> > thanks.
> > -elias
> >
> >
> >
> > --
> > 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]
>






My program works really well with Netscape.  But with some Internet Explorer
installs, the cookie does not get remembered?  I already set the Security
options to Allow Cookies (both).  When I set it to prompted, it even asked me if
I wanted to accept the cookie, replied yes, but still the cookie cannot be read
by the PHP program?

Thanks,

Floyd





Hi,

Is there any way in PHP to print out the schema of my database tables?

Cheers
Ade




Hmm....how you mean schema?
you can always list all databases then recurse into tables and fields and
display them as however you want!

see: mysql_list_dbs(), mysql_list_fields(), mysql_list_tables()

<[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> Is there any way in PHP to print out the schema of my database tables?
>
> Cheers
> Ade
>
> --
> 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 a dutch organisation of fathers with custody/visitation problems I run a
2000+ records database of newspaper clippings under Mysql/PHP. We are very
much in need of a PHP-script to regulate access to the database (for data
entry) with passwords and store the user-id's in the database. Are there any
fathers or other people out there who sympatize with our goals (more justice
for men) and feel capable of writing such a script for free? We would be
immensely grateful.

Theo Richel
[EMAIL PROTECTED]







Is there way how to get line number from which function was called ???

Milan Mlynarcik





No.
You could pass the constant __LINE__ to your function, but I assume that you
want this feature to be generically available within all functions. If you
really want to be able to track your call-stack then you'd be better off
using a development environment like the Zend IDE and debugger.
Alternatively you could request a function to the PHP developers mailing
list that would return an array containing the current call-stack.

You can register your own error handler and assert handler - these guys
receive the calling LINE as a parameter.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Milan Mlynarcik
Sent: 28 March 2001 14:43
To: [EMAIL PROTECTED]
Subject: [PHP] Is there way how to get line number from which function
was called ???


Is there way how to get line number from which function was called ???

Milan Mlynarcik


--
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.
That was an answer to my post with this subject: "[PHP] Caller's Line
number?"
Can you answer too my last question in that post?

""Neil Kimber"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> No.
> You could pass the constant __LINE__ to your function, but I assume that
you
> want this feature to be generically available within all functions. If you
> really want to be able to track your call-stack then you'd be better off
> using a development environment like the Zend IDE and debugger.
> Alternatively you could request a function to the PHP developers mailing
> list that would return an array containing the current call-stack.
>
> You can register your own error handler and assert handler - these guys
> receive the calling LINE as a parameter.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Milan Mlynarcik
> Sent: 28 March 2001 14:43
> To: [EMAIL PROTECTED]
> Subject: [PHP] Is there way how to get line number from which function
> was called ???
>
>
> Is there way how to get line number from which function was called ???
>
> Milan Mlynarcik
>
>
> --
> 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]
>






Off topic but does anyone know how to detect if user/visitor has ActiveX 
OFF and if so then load a designated page.

I had a few complaints that they cannot view my menu (done in flash) so 
I want to display a simple version of my menu for people with ActiveX OFF.

Thanks

Ajdin




I think JavaScript can, / document.plugins property.... check it out.

"AJDIN BRANDIC" <[EMAIL PROTECTED]> wrote in message
Pine.OSF.3.91.1010328135544.29822A-100000@leofric">news:Pine.OSF.3.91.1010328135544.29822A-100000@leofric...
> Off topic but does anyone know how to detect if user/visitor has ActiveX
> OFF and if so then load a designated page.
>
> I had a few complaints that they cannot view my menu (done in flash) so
> I want to display a simple version of my menu for people with ActiveX OFF.
>
> Thanks
>
> Ajdin
>
> --
> 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 Elias but have you got a url that I could look at.
I have tried www.javascript.com and www.javascripts.com but could not 
find anything.

Ajdin

On Wed, 28 Mar 2001, elias wrote:

> I think JavaScript can, / document.plugins property.... check it out.
> 
> "AJDIN BRANDIC" <[EMAIL PROTECTED]> wrote in message
> Pine.OSF.3.91.1010328135544.29822A-100000@leofric">news:Pine.OSF.3.91.1010328135544.29822A-100000@leofric...
> > Off topic but does anyone know how to detect if user/visitor has ActiveX
> > OFF and if so then load a designated page.
> >
> > I had a few complaints that they cannot view my menu (done in flash) so
> > I want to display a simple version of my menu for people with ActiveX OFF.
> >
> > Thanks
> >
> > Ajdin
> >
> > --
> > 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]
> 
> 




http://www.asphyxia.com/PHP_BD/PHPClientSniffer.phps
try it, that's all i got...

"AJDIN BRANDIC" <[EMAIL PROTECTED]> wrote in message
Pine.OSF.3.91.1010328144458.29822C-100000@leofric">news:Pine.OSF.3.91.1010328144458.29822C-100000@leofric...
> Thanks Elias but have you got a url that I could look at.
> I have tried www.javascript.com and www.javascripts.com but could not
> find anything.
>
> Ajdin
>
> On Wed, 28 Mar 2001, elias wrote:
>
> > I think JavaScript can, / document.plugins property.... check it out.
> >
> > "AJDIN BRANDIC" <[EMAIL PROTECTED]> wrote in message
> > Pine.OSF.3.91.1010328135544.29822A-100000@leofric">news:Pine.OSF.3.91.1010328135544.29822A-100000@leofric...
> > > Off topic but does anyone know how to detect if user/visitor has
ActiveX
> > > OFF and if so then load a designated page.
> > >
> > > I had a few complaints that they cannot view my menu (done in flash)
so
> > > I want to display a simple version of my menu for people with ActiveX
OFF.
> > >
> > > Thanks
> > >
> > > Ajdin
> > >
> > > --
> > > 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]
>






The following code snippet was copied from
http://javascript.internet.com/miscellaneous/check-mimes.html
Looking at it, I guess that it only works with Netscape.
Maybe for a less UA specific solution you could have a start page that
contains a small flash movie that redirects the user to the flash enhanced
version of your site. 
If they aren't redirected then they don't have a flash enabled UA: redirect
them to a standard HTML version of your site.

Regards,

Simon.
<!-- ONE STEP TO INSTALL CHECK MIMES:

   1.  Add the specified coding into the BODY of your HTML document  -->

<!-- STEP TWO: Put this code into the BODY of your HTML document  -->

<BODY>

<CENTER>
<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
document.writeln("<TABLE BORDER=1><TR VALIGN=TOP>",
"<TH ALIGN=left>i",
"<TH ALIGN=left>type",
"<TH ALIGN=left>description",
"<TH ALIGN=left>suffixes</TR>")
for (i=0; i < navigator.mimeTypes.length; i++) {
document.writeln("<TR VALIGN=TOP><TD>",i,
"<TD>",navigator.mimeTypes[i].type,
"<TD>",navigator.mimeTypes[i].description,
"<TD>",navigator.mimeTypes[i].suffixes,
"</TR>")
  }
document.writeln("</TABLE>")
// End -->
</SCRIPT>
</CENTER>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size:  0.87 KB  -->

> -----Original Message-----
> From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 28, 2001 14:46
> To: elias
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Active-X
> 
> 
> Thanks Elias but have you got a url that I could look at.
> I have tried www.javascript.com and www.javascripts.com but could not 
> find anything.
> 
> Ajdin
... snip ...




allegedly this works,but i haven't tried it and can't remember where i got
it but i used google,of course:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0
,0"
 id=ebusiness width=191 height=174>
        <param name=movie value="movie.swf">
        <param name=quality value=high>
        <param name=bgcolor value=#000000>
  <SCRIPT LANGUAGE="JavaScript">
<!--

file://If this browser understands the mimeTypes property and recognizes the
MIME Type file://"application/futuresplash"...
if (navigator.mimeTypes &&
navigator.mimeTypes["application/x-shockwave-flash"]){

   file://...write out the following <EMBED> tag into the document.
   document.write('<embed src="movie.swf" quality=high bgcolor=#000000
width=191 height=174 type="application/x-shockwave-flash"></embed> ');
}

file://Otherwise,...
else {

   file://...write out the following <IMG> tag into the document. The image
need
   file://not be the same size as the Flash movie, but it may help you lay
out the

   document.write('<img src="images/log1.gif" width="50" height="50" alt=""
border="0">');
}
-->

</SCRIPT>

      </object>
----- Original Message -----
From: Simon Ould <[EMAIL PROTECTED]>
To: 'AJDIN BRANDIC' <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 3:36 PM
Subject: RE: [PHP] Active-X


> The following code snippet was copied from
> http://javascript.internet.com/miscellaneous/check-mimes.html
> Looking at it, I guess that it only works with Netscape.
> Maybe for a less UA specific solution you could have a start page that
> contains a small flash movie that redirects the user to the flash enhanced
> version of your site.
> If they aren't redirected then they don't have a flash enabled UA:
redirect
> them to a standard HTML version of your site.
>
> Regards,
>
> Simon.
> <!-- ONE STEP TO INSTALL CHECK MIMES:
>
>    1.  Add the specified coding into the BODY of your HTML document  -->
>
> <!-- STEP TWO: Put this code into the BODY of your HTML document  -->
>
> <BODY>
>
> <CENTER>
> <SCRIPT LANGUAGE="JavaScript">
>
> <!-- This script and many more are available free online at -->
> <!-- The JavaScript Source!! http://javascript.internet.com -->
>
> <!-- Begin
> document.writeln("<TABLE BORDER=1><TR VALIGN=TOP>",
> "<TH ALIGN=left>i",
> "<TH ALIGN=left>type",
> "<TH ALIGN=left>description",
> "<TH ALIGN=left>suffixes</TR>")
> for (i=0; i < navigator.mimeTypes.length; i++) {
> document.writeln("<TR VALIGN=TOP><TD>",i,
> "<TD>",navigator.mimeTypes[i].type,
> "<TD>",navigator.mimeTypes[i].description,
> "<TD>",navigator.mimeTypes[i].suffixes,
> "</TR>")
>   }
> document.writeln("</TABLE>")
> // End -->
> </SCRIPT>
> </CENTER>
>
> <p><center>
> <font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
> by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
> </center><p>
>
> <!-- Script Size:  0.87 KB  -->
>
> > -----Original Message-----
> > From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 28, 2001 14:46
> > To: elias
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Active-X
> >
> >
> > Thanks Elias but have you got a url that I could look at.
> > I have tried www.javascript.com and www.javascripts.com but could not
> > find anything.
> >
> > Ajdin
> ... 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]
>





you need to use VBscript.  if its mac IE 5+, you can
use the plugins object from javascript.  the vbscript
is fairly simple.

--- AJDIN BRANDIC <[EMAIL PROTECTED]> wrote:
> Off topic but does anyone know how to detect if
> user/visitor has ActiveX 
> OFF and if so then load a designated page.
> 
> I had a few complaints that they cannot view my menu
> (done in flash) so 
> I want to display a simple version of my menu for
> people with ActiveX OFF.
> 
> Thanks
> 
> Ajdin
> 
> -- 
> 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]
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text




I'm sorry if this article has already been discussed in the list, but i
have searched the list archives and www.facts.com with no luck.

Is it possible to get a message( using IMAP/POP functions ) from a pop
server in a raw format ( say, without being parsed , as an array of
bytes)?

I just want to do a script that will check the pop box for messages and
will forward the messages to a different email address ( an
IMAP account ).

Miguel Carvalho





when should i use .php and when should i use .phtml.

Thanks






Always use PHP, phtml are depreciated.

""Costas"" <[EMAIL PROTECTED]> wrote in message
99spad$qbq$[EMAIL PROTECTED]">news:99spad$qbq$[EMAIL PROTECTED]...
> when should i use .php and when should i use .phtml.
>
> 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]
>






It doesn't really matter.  Use whatever you think looks cooler.

Tyler

-----Original Message-----
From: Costas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 7:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php or phtml???


when should i use .php and when should i use .phtml.

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]





Whenever you're working on a server that only parses .php as PHP files, you
should use .php. 

Whenever you're working on a server that only parses .phtml as PHP files,
you should use .phtml.

If you run your own server, or your server parses both .php and .phtml, you
can use either.

HTH
Jon


-----Original Message-----
From: Costas [mailto:[EMAIL PROTECTED]]
Sent: 28 March 2001 14:53
To: [EMAIL PROTECTED]
Subject: [PHP] php or phtml???


when should i use .php and when should i use .phtml.

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]



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

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




You can even use .html ; It just depends on what you make the PHP engine
trigger
in the config file.

D.

-----Original Message-----
From: elias [mailto:[EMAIL PROTECTED]]
Sent: donderdag 29 maart 2001 2:57
To: [EMAIL PROTECTED]
Subject: Re: [PHP] php or phtml???


Always use PHP, phtml are depreciated.

""Costas"" <[EMAIL PROTECTED]> wrote in message
99spad$qbq$[EMAIL PROTECTED]">news:99spad$qbq$[EMAIL PROTECTED]...
> when should i use .php and when should i use .phtml.
>
> 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]






what are the minimum hardware requirements one would suggest for setting
up a web server running php, mysql, and apache?

thank you,

scott
[EMAIL PROTECTED]





Presumed on unix or windows?

For testing/educational purposes, an old Pentium 133 with 32MB or 64MB
memory is enough but you will
see the difference with a faster machine especially with larger scripts.

D.

-----Original Message-----
From: Scott Novinger [mailto:[EMAIL PROTECTED]]
Sent: woensdag 28 maart 2001 15:47
To: [EMAIL PROTECTED]
Subject: [PHP] unix system


what are the minimum hardware requirements one would suggest for setting
up a web server running php, mysql, and apache?

thank you,

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






A 'minimum' is hard to recommend with out usage requirements.

The minimum specs really depend on what you're doing with it -
intranet?  public web server?  how much traffic do you expect?

You don't state an OS preference here, but I'd think hardware
requirements would be similar for both unix/linux and windows.

For a production machine I'd go with something with at least
512 megs and a 700mhz or higher processor (dual would be nice
but definitely not required).

Multiple drives would also be a plus - not necessarily in a
RAID config, just muliples.  Put MySQL on one drive, and
Apache on the other.

The large RAM (768 is even nicer) can definitely help with
keeping things in memory.  Use mmap with apache to keep your
graphics in RAM, and/or use HEAP table with session stuff in MySQL
to keep those tables in RAM as well.


Scott Novinger wrote:

> what are the minimum hardware requirements one would suggest for setting
> up a web server running php, mysql, and apache?
>
> thank you,
>
> scott
> [EMAIL PROTECTED]
>





Hi

Is there a way I can remove all the values of $HTTP_POST_VARS?

I'm trying to check where a form has been posted from and if it's not the
right plac I want to remove all the post vars so they can't any damage.

I've tried unset($HTTP_POST_VARS) but it doesn't seem to do anything.

TIA

M@





You could just check the referrer, as pseudo-code below shows.

if refferer is not valid{
    exit;
    }
else{
do my stuff;
}


----- Original Message ----- 
From: "Matt Williams" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 9:20 AM
Subject: [PHP] removing $HTTP_POST_VARS


> Hi
> 
> Is there a way I can remove all the values of $HTTP_POST_VARS?
> 
> I'm trying to check where a form has been posted from and if it's not the
> right plac I want to remove all the post vars so they can't any damage.
> 
> I've tried unset($HTTP_POST_VARS) but it doesn't seem to do anything.
> 
> TIA
> 
> 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]
> 





The referer isn't always defined though... not even if it would be a
valid one. Some browsers just don't want to cooperate...

RenzE


Jon Rosenberg wrote:
> 
> You could just check the referrer, as pseudo-code below shows.
> 
> if refferer is not valid{
>     exit;
>     }
> else{
> do my stuff;
> }
> 
> ----- Original Message -----
> From: "Matt Williams" <[EMAIL PROTECTED]>
> To: "PHP General List" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 28, 2001 9:20 AM
> Subject: [PHP] removing $HTTP_POST_VARS
> 
> > Hi
> >
> > Is there a way I can remove all the values of $HTTP_POST_VARS?
> >
> > I'm trying to check where a form has been posted from and if it's not the
> > right plac I want to remove all the post vars so they can't any damage.
> >
> > I've tried unset($HTTP_POST_VARS) but it doesn't seem to do anything.
> >
> > TIA
> >
> > 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]
> >
> 
> --
> 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]




Joe -

That is just the thing, other commands (ls, df, du, cat..etc) work
fine.  The fact that it the 'top' works on command line, but not in the
browser initially led me to believe that it had something to do with the
escape characters, after using 'sed' to remove those, I still have nothing
however.  Very strange issue.


On Wed, 28 Mar 2001, Joe Brown wrote:

> Date: Wed, 28 Mar 2001 00:30:11 -0500
> From: Joe Brown <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] "DF" output
> 
> heh,
> dunno, maybe the $PATH  environment var doesn't include /sbin or /usr/sbin.
> 
> Test w 'ls' see if you can get a directory listing, at least?
> 
> "Steven Shepherd" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Brad,
> >
> > Thanks for the response.  Either method they both work via command
> > line.  Neither of them work in the browser.
> >
> > On Tue, 27 Mar 2001, Brad S. Jackson wrote:
> >
> > >
> > > Try $top = `top n 1 b | head -8 | sed 's/[\$|^M]//g'`;
> > >
> > > In my experience, you can't use | in exec calls, you have to use the
> back tick
> > > method.
> > >
> > >
> > > Steven Shepherd <[EMAIL PROTECTED]> wrote:
> > > Bad example (changed to ps and it works actually..but i dont want 'ps',
> I
> > > want 'top').  Ran top using su to the user 'www' from the command line
> and
> > > was able to run it fine.
> > >
> > > On Tue, 27 Mar 2001, Joe Brown wrote:
> > >
> > > > Date: Tue, 27 Mar 2001 12:35:08 -0500
> > > > From: Joe Brown <[EMAIL PROTECTED]>
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: [PHP] "DF" output
> > > >
> > > > nobody has execute permission on ps?
> > > >
> > > > Probably quite the opposite, your webserver user doesn't have execute
> > > > permission on ps, so there is no execution or return value.
> > > >
> > > > "Steven Shepherd" <[EMAIL PROTECTED]> wrote in message
> > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > > I am writing a script, actually modifying PhPSysInfo to include the
> top
> > > > > processes used on a machine.  So far, no matter what I do, I can
> only get
> > > > > it to work via the command line.  I get a blank screen when trying
> it via
> > > > > the browser:
> > > > >
> > > > > Tried this:
> > > > >
> > > > > <?php
> > > > > $data = `ps auxwww`; echo nl2br($data);
> > > > > ?>
> > > > >
> > > > > ------------------------------------------------
> > > > > and this:
> > > > >
> > > > > <TT>
> > > > > <PRE>
> > > > > <?php
> > > > > exec("/usr/bin/top n 1 b | head -8 | sed 's/[\$|^M]//g'", $top);
> > > > > while (list(,$line) = each($top)){
> > > > >  echo $line, "<BR>\n";
> > > > >   }
> > > > >  ?>
> > > > > </PRE>
> > > > > </TT>
> > > > >
> > > > > I used sed to remove control characters..etc.  Again, both examples
> above
> > > > > work via the command line, but not via a browser.  User "www" is
> able to
> > > > > run this command as well, so it's not permissions.  Help?!  :)
> > > > >
> > > > >
> > > > > --
> > >
> > >
> > >
> >
> >
> > --
> > 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]
> 
> 





$str = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";

I need to fetch the 5th charcter after ".....compatible; M" in $str (ie
'5').

- The following gets me the fifth character along (ie 'l')
$variable = substr ($str, 5, 1);

How do i tell the substr to start counting from ".....compatible; M(start
here)"

THanks






There is an easy way  :)

Here you have it, man! use instead:

$myfile_type[$count]     !!! (would you have hought about that?!)

Daniel BI


>Why can't I do $myfile[$count]_type?!
>What schould I do instead?
>---------------------------------
>Fredrik A. Takle
>[EMAIL PROTECTED]










IT-Services and Solutions GmbH                                    business
unit: e-security
IBM Global Services Company                   Phone : +49-221-304-2738 or
-2561, FAX: -2518
Gustav-Heinemann-Ufer 120-122, D-50968 Köln         e-mail:
[EMAIL PROTECTED]








Hello People,

I want to install the version php-4.0.4pl1 on to a RS/6000 with AIX4.3.3.
IBM HTTP Server 1.3.12.0
When I use the configure-script with several parameters I get the outpout
you can see in the attachment.


(See attached file: configure_command.txt)


Thanks for help

Markus Mattes






Hi,
  I made a change to my php.ini and
phpinfo() doesn't reflect the change?

i set
sendmail_path   =       "/usr/lib/sendmail -OIgnoreDots -t"

and phpinfo() still shows the default 
sendmail_path   =       "/usr/lib/sendmail -t -i"


how can i get this to work correctly?

Thanks,
joe

Web Admin
www.bigidea.com




Did you bounce Apache after saving the change?

Cal
http://www.calevans.com
 

-----Original Message-----
From: Joe Rice [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 10:34 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Q: php.ini




Hi,
  I made a change to my php.ini and
phpinfo() doesn't reflect the change?

i set
sendmail_path   =       "/usr/lib/sendmail -OIgnoreDots -t"

and phpinfo() still shows the default 
sendmail_path   =       "/usr/lib/sendmail -t -i"


how can i get this to work correctly?

Thanks,
joe

Web Admin
www.bigidea.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]






You need to restart your web server (apache, most likely).

Jon


----- Original Message ----- 
From: "Joe Rice" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 11:34 AM
Subject: [PHP] Q: php.ini


> 
> 
> Hi,
>   I made a change to my php.ini and
> phpinfo() doesn't reflect the change?
> 
> i set
> sendmail_path   =       "/usr/lib/sendmail -OIgnoreDots -t"
> 
> and phpinfo() still shows the default 
> sendmail_path   =       "/usr/lib/sendmail -t -i"
> 
> 
> how can i get this to work correctly?
> 
> Thanks,
> joe
> 
> Web Admin
> www.bigidea.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]
> 





sorry for the lame question, that was what i needed to do.
Thanks,
joe

Jon Rosenberg([EMAIL PROTECTED])@Wed, Mar 28, 2001 at 11:38:19AM -0500:
> You need to restart your web server (apache, most likely).
> 
> Jon
> 
> 
> ----- Original Message ----- 
> From: "Joe Rice" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 28, 2001 11:34 AM
> Subject: [PHP] Q: php.ini
> 
> 
> > 
> > 
> > Hi,
> >   I made a change to my php.ini and
> > phpinfo() doesn't reflect the change?
> > 
> > i set
> > sendmail_path   =       "/usr/lib/sendmail -OIgnoreDots -t"
> > 
> > and phpinfo() still shows the default 
> > sendmail_path   =       "/usr/lib/sendmail -t -i"
> > 
> > 
> > how can i get this to work correctly?
> > 
> > Thanks,
> > joe
> > 
> > Web Admin
> > www.bigidea.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]
> 




<?
setlocale("LC_ALL","es_ES");
$fecha = date("d-m-Y");
print $fecha ."
<br>";                                                    ->
28-03-2001   ok
$fecha = "2001-03-28 18:22:00";
print (date("d m Y H:i:s",$fecha)) ."<br>";                ->01 01 1970
01:33:21    wrong
print (date("Y m d H:i:s",$fecha)) ."<br>";                ->1970 01 01
01:33:21    wrong
print (strftime("%d-%m-%Y %T")) ."<br>";             ->28-03-2001
18:22:24   ok
print (strftime("%d-%m-%Y %T",$fecha)) ."<br>";  -> 01-01-1970 01:33:21
wrong

?>


Who should I convert between date values?

I am using postgresql date fields and the only way to format de date is
using  the SQL functions
instead of formating with PHP functions.

select to_char(date(pg_user.valuntil),'DD-MM-YYYY HH24:MI:SS')  ...

Any idea?

Thanks in advance

--
Evelio Martínez






Optional 2nd param for date() and strftime() is UNIX timestamp (i.e. integer -
seconds from epoch)
So I suppose all works as it should.

--
Yasuo Ohgaki


"Evelio Martinez" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> <?
> setlocale("LC_ALL","es_ES");
> $fecha = date("d-m-Y");
> print $fecha ."
> <br>";                                                    ->
> 28-03-2001   ok
> $fecha = "2001-03-28 18:22:00";
> print (date("d m Y H:i:s",$fecha)) ."<br>";                ->01 01 1970
> 01:33:21    wrong
> print (date("Y m d H:i:s",$fecha)) ."<br>";                ->1970 01 01
> 01:33:21    wrong
> print (strftime("%d-%m-%Y %T")) ."<br>";             ->28-03-2001
> 18:22:24   ok
> print (strftime("%d-%m-%Y %T",$fecha)) ."<br>";  -> 01-01-1970 01:33:21
> wrong
>
> ?>
>
>
> Who should I convert between date values?
>
> I am using postgresql date fields and the only way to format de date is
> using  the SQL functions
> instead of formating with PHP functions.
>
> select to_char(date(pg_user.valuntil),'DD-MM-YYYY HH24:MI:SS')  ...
>
> Any idea?
>
> Thanks in advance
>
> --
> Evelio Martínez
>
>
>





How do i extract the position (integer counting from the left) of the letter
M (beginning 'MSIE'.

$str = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";

NOTE,  i only want a single integer (it is 28, i counted manuallt!!)

Thanks






Is there any reason that you cannot use regular expression? -- Yasuo Ohgaki ""Costas"" <[EMAIL PROTECTED]> wrote in message 99t43c$qr4$[EMAIL PROTECTED]">news:99t43c$qr4$[EMAIL PROTECTED]... > How do i extract the position (integer counting from the left) of the letter > M (beginning 'MSIE'. > > $str = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"; > > NOTE, i only want a single integer (it is 28, i counted manuallt!!) > > 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] >



if all you want to know is the browser's version, why
not use get_browser()

http://www.php.net/manual/en/function.get-browser.php


--- Costas <[EMAIL PROTECTED]> wrote:
> How do i extract the position (integer counting from
> the left) of the letter
> M (beginning 'MSIE'.
> 
> $str = "Mozilla/4.0 (compatible; MSIE 5.01; Windows
> NT 5.0)";
> 
> NOTE,  i only want a single integer (it is 28, i
> counted manuallt!!)
> 
> 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]
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text





> How do i extract the position (integer counting from the left) 
> of the letter M (beginning 'MSIE'.
> $str = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";

This should do it :

  <?php

    $str = 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)';

    print strpos($str,'MSIE');       // prints position of M (25).
    print $str[strpos($str,'MSIE')]; // prints M
    print $str[25];                  // prints M

  ?>

An article that uses regular expressions to deal with this browser
detection hoopla can be seen here :

  http://phpbuilder.com/columns/tim20000821.php3

Be sure to check the user comments too.

Regards,
Philip

On Wed, 28 Mar 2001, Costas wrote:

> How do i extract the position (integer counting from the left) of the letter
> M (beginning 'MSIE'.
> 
> $str = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
> 
> NOTE,  i only want a single integer (it is 28, i counted manuallt!!)
> 
> 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 a REQUEST_URI that comes in,
 
REQUEST_URI=//training/olddata/file.htm
 
How can I extract just the filename? ( $str=file.htm)
 
 
Clayton Dukes
---------------------------------------------------------------------
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net




Start parsing the string from the string-length to the begin. so

//training/olddata/file.htm is 27 chars long

Start at 27 and parse it back till you've found the '/' char for the first
time. Read the positionnr. of the / and copy that position+1...strlen and
you're ready.

[FvH]
From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
Sent: woensdag 28 maart 2001 19:11
To: [EMAIL PROTECTED]
Subject: [PHP] Extracting just the filename from REQUEST_URI



  I have a REQUEST_URI that comes in,

  REQUEST_URI=//training/olddata/file.htm

  How can I extract just the filename? ( $str=file.htm)


  Clayton Dukes
  ---------------------------------------------------------------------
  Download Free Essays, Term Papers and Cisco Training from
http://www.gdd.net




Better yet,

Here's what I'm trying to do:

If someone does a search in a search engine, let's say google...

The user does a search for "foo"

google returns my website with a link to "foo"
which no longer exists (because I've moved it).

How can I get the query string passed from google and put that into my search page?

ie:

User searches for "foo"
Google returns http://www.gdd.net/somedir/somedir/file.html

User clicks on the link and gets a 404.html page

The 404.html page gets the string that the user was searching on and passes that into 
a search form on my website.

        <form action="search.php" method="post">
        Search: <input type="text" name="search" value="$SEARCH">
        </form>
Where $SEARCH was the search that the user entered in Google.

How can I do this?


Clayton Dukes
---------------------------------------------------------------------
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


  ----- Original Message ----- 
  From: Clayton Dukes 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, March 28, 2001 12:11 PM
  Subject: [PHP] Extracting just the filename from REQUEST_URI



  I have a REQUEST_URI that comes in,

  REQUEST_URI=//training/olddata/file.htm

  How can I extract just the filename? ( $str=file.htm)


  Clayton Dukes
  ---------------------------------------------------------------------
  Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


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


  -- 
  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 am trying to write some shell scripts in PHP.  I do not know where it is
because this is a cobalt raq4 and it is embedded with the server when it is
sent.  If anyone know where it is on raq4's or if you know how I can find
out please let me know.

Thank you,

--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
--------------------------------------------





say you include a function in a page, and then you call that function.
Is there a way (without actually passing through the parameters) for that 
function to know which page and which line called it?
That would be VERY cool!
Peter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://liga1.com: building multiple language/culture websites





Yes, that would be really cool. I my self has tried to find a way to do 
this, and throw this question to the list sometimes ago... no repond.

What would be great, if we can do this, is that we can somehow create a 
pseudo-private method for classes (since php OO does not have that), and 
limit only a certain file/page can call that pseudo-private method, by 
checking which page call that method.

Please let me know if you find any further information on this. Thanks in 
advance

Reuben D. Budiardja

At 06:26 PM 3/28/01 +0100, Peter Van Dijck wrote:
>say you include a function in a page, and then you call that function.
>Is there a way (without actually passing through the parameters) for that 
>function to know which page and which line called it?
>That would be VERY cool!
>Peter
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>http://liga1.com: building multiple language/culture websites
>
>
>--
>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]

Reuben D. Budiardja
Web Database Application Programmer / Analyst
Devcorps, ITS
Goshen College, IN 46526





Hi

I'm triying to connect from windows to linux...
do i have to manipulate grant tables on mysql...
what should I do??
thanks
ciao
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





Help,
Why did this suddenly stop working? (only code on page)

<script language="php">
header ("Location: http://www.otherserver.com/index2.htm");
</script>

It was working fine before, now the page just returns:

</body></html> in the source, no error messages.




Does anyone know how to use imap with ssl if this configure option is 
given (4.0.3 and later)?  I can't find anything in the docs.

        --Nate





I want to base the database a PHP script uses on the IP address of the
server running the script. What is the fastest way to get the IP address of
the server from a script? I could use environment variables but they are
unreliable (when run from cron for example, the environment doesn't have all
the variables you would expect). I wrote the following function based on a
Perl firewall script that uses ifconfig, but it has too much overhead to
call every time I connect to the database. All I really want to do is add a
conf variable to php.ini that gets read at startup and is cached from then
on. Any ideas?

Thanks!
Lance

----

// string gethostaddress([string])
//
// Returns the IP address of a network interface for the local host.
// Returns false on error or if the address cannot be determined.
//
// Note: This function shells the ifconfig command so call sparingly.
//
function gethostaddress($interface = "eth0")
{
        $inetaddr = false; // assume failure

        $ifconfig = `/sbin/ifconfig $interface`;
        if (ereg("inet addr:([.0-9]+)", $ifconfig, $ifconfigparts))
                $inetaddr = $ifconfigparts[1];

        return ($inetaddr) ? $inetaddr : false;
}



Reply via email to