php-general Digest 3 Nov 2001 04:05:17 -0000 Issue 972

Topics (messages 73273 through 73322):

Re: PHP Highlighting Text Editors
        73273 by: Chris Bailey
        73275 by: Johnson, Kirk
        73279 by: Mike Frazer

Re: Sessions & Header PROBLEM again!
        73274 by: Steve Cayford

Simulating POST with GET and Location:
        73276 by: Nathan Cassano

dlls
        73277 by: Raidell Avello Martinez

Re: Problem with non us caracters and "strtr"
        73278 by: Rodrigo Peres
        73312 by: Yasuo Ohgaki

Re: select+uploading multiple files
        73280 by: Shane Wright
        73287 by: fitiux

Re: comments
        73281 by: Jason Stechschulte

How to get Usernames
        73282 by: lists.mhess.qn.net
        73284 by: Shane Wright
        73285 by: lists.mhess.qn.net
        73290 by: Martn Marqus
        73314 by: Shane Wright

mail() - s/mime - certificates & PDFs
        73283 by: Miles Thompson

Re: simple array tutorial wanted
        73286 by: Mike Frazer

How to use Clibpdf
        73288 by: Carlo Loiudice

Questions about php.ini
        73289 by: jennyw
        73294 by: Patrik Wallstrom
        73305 by: Jason Wood
        73321 by: jennyw

Cookies won't stick
        73291 by: jennyw
        73293 by: Johnson, Kirk
        73295 by: Mike Frazer

Re: LINE BREAK HELL
        73292 by: John Steele

Can this be done?
        73296 by: Micah Huerta

Trainers / Instructors
        73297 by: Gerard Onorato

php and mcrypt
        73298 by: Scott
        73299 by: Brian Clark
        73300 by: Brian Clark
        73303 by: Scott
        73309 by: Brian Clark
        73311 by: Brian Clark

Windows/UNIX differences?
        73301 by: Ben Edwards
        73302 by: jimw.apache.org
        73304 by: Mark

Session_destroy problems...
        73306 by: richard phynga

Date problems
        73307 by: Raymond C. Rodgers

Re: Can you AUTO "Post/Submit" on a mixed HTML/PHP  form
        73308 by: Arf

Mail and mime and attachments
        73310 by: Kraa de Simon

Re: how to make IE show client side JavaScript output?
        73313 by: Yasuo Ohgaki

Password File
        73315 by: lists.mhess.qn.net
        73320 by: Brian Clark

Query Database and list in Columns
        73316 by: Kacey A. Murphy
        73317 by: CC Zona

Re: fopen for ftp transfers
        73318 by: Scott

Deleting Array elements
        73319 by: HEW Staff
        73322 by: Liz Fulghum

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]


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


Also, Visual SlickEdit works on Windows (in addition to Linux as mentioned),
and FreeBSD, OS/390, and a slew of others.

There is a list of editors out there somewhere, I know someone has posted a
link before.  There are many editors that do this.

-----Original Message-----
From: TD - Sales International Holland B.V. [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 10:32 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Highlighting Text Editors


Hey there,

these are the editors given by you guys, thanks for the replies. If somebody
could put this online on php.net it would be great. If you have anything to
add please feel free to email me.

Windows

UltraEdit
ActiveState Komodo
EditPlus
HTML-Kit
Homesite




Linux/Unix

Nedit
(x)emacs
Visual SlickEdit
vim/gvim
ActiveState Komodo
Beaver
Cooledit
KWrite (included with KDE, PHP highlighting since KDE 2.2.1 maybe 2.2.0 also
haven't used that version 2.1.2 doesn't support 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]






Here's a link http://www.itworks.demon.co.uk/phpeditors.htm 

Got this link at http://www.php.net/links.php#TOP.

Kirk

> -----Original Message-----
> From: Chris Bailey [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 8:56 AM
> To: TD - Sales International Holland B.V.; [EMAIL PROTECTED]
> Subject: RE: [PHP] PHP Highlighting Text Editors
> 
> 
> Also, Visual SlickEdit works on Windows (in addition to Linux 
> as mentioned),
> and FreeBSD, OS/390, and a slew of others.
> 
> There is a list of editors out there somewhere, I know 
> someone has posted a
> link before.  There are many editors that do this.
> 
> -----Original Message-----
> From: TD - Sales International Holland B.V. [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 10:32 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP Highlighting Text Editors
> 
> 
> Hey there,
> 
> these are the editors given by you guys, thanks for the 
> replies. If somebody
> could put this online on php.net it would be great. If you 
> have anything to
> add please feel free to email me.
> 
> Windows
> 
> UltraEdit
> ActiveState Komodo
> EditPlus
> HTML-Kit
> Homesite
> 
> 
> 
> 
> Linux/Unix
> 
> Nedit
> (x)emacs
> Visual SlickEdit
> vim/gvim
> ActiveState Komodo
> Beaver
> Cooledit
> KWrite (included with KDE, PHP highlighting since KDE 2.2.1 
> maybe 2.2.0 also
> haven't used that version 2.1.2 doesn't support PHP)




Try checking the PHP section of www.wdvl.com.  There should be a list of
software.

Mike



"Chris Bailey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Also, Visual SlickEdit works on Windows (in addition to Linux as
mentioned),
> and FreeBSD, OS/390, and a slew of others.
>
> There is a list of editors out there somewhere, I know someone has posted
a
> link before.  There are many editors that do this.
>
> -----Original Message-----
> From: TD - Sales International Holland B.V. [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 10:32 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP Highlighting Text Editors
>
>
> Hey there,
>
> these are the editors given by you guys, thanks for the replies. If
somebody
> could put this online on php.net it would be great. If you have anything
to
> add please feel free to email me.
>
> Windows
>
> UltraEdit
> ActiveState Komodo
> EditPlus
> HTML-Kit
> Homesite
>
>
>
>
> Linux/Unix
>
> Nedit
> (x)emacs
> Visual SlickEdit
> vim/gvim
> ActiveState Komodo
> Beaver
> Cooledit
> KWrite (included with KDE, PHP highlighting since KDE 2.2.1 maybe 2.2.0
also
> haven't used that version 2.1.2 doesn't support 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]
>
>






Don't know offhand what the problem is, but a couple thoughts:

1. Why are you using session_name(mysession) instead of 
session_name('mysession')?

2. Assuming you have register_globals on, you're trying to pass $count 
both as a session variable and a post variable. One of these is going to 
get overwritten by the other if I'm not mistaken.

3. Why not have the page 1 form action point directly at page 2 instead 
of being redirected through page 1? Do posted variables follow a 
redirect?

4. If posted variables do follow a redirect then page 1 will see that 
$submit is set and redirect to page 2, which will redirect to page 3, 
which will redirect to page 1, etc... Can you get an infinite 
redirection loop?

5. The form on page 1 includes a hidden count variable, page 2 and page 
3 don't.

What happens when you run this?

-Steve

On Friday, November 2, 2001, at 08:49  AM, Alessandro BOSSI wrote:

> Why in these 3 linked page the var "count"
> does not go through the page if I have the browser sessions disabled???
>
> Where is the mistake?
>
> I see the session_id, changing at every page!
>
> Someone can help me?
> Many thank
> Alessandro Bossi
>
> ---------------------------------
> <?php /* First.php */
> session_name(mysession);
> session_start();
> session_register ("count");
>
> if (isset($submit)){
>  header("Location: Seconda.php?".SID);
> }else{
>  $count++;
> }
>
> print "session_encode=>> ".session_encode()."<BR>";
>
> ?>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD><TITLE> First Page</TITLE></HEAD>
> <BODY BGCOLOR="#A2BBAF">
>
> <H4>First Page</H4>
> Hello visitor, you have seen this page <?=$count; ?> times.<p>
> count = <?= $HTTP_SESSION_VARS["count"] ?><BR>
> <P>
>
> <FORM METHOD=POST ACTION="<?= $PHP_SELF ?>">
> <INPUT TYPE="hidden" NAME="count" value="<?=$count?>">
> <INPUT TYPE="submit" name=submit value="Go to the SECOND page">
> </FORM>
>
> </BODY></HTML>
> ---------------------------------
> <?php /* Second.php */
>
> session_name(mysession);
> session_start();
> session_register('count');
>
> if (isset($submit)){
>  header("Location: Third.php?".SID);
> }
> print "session_encode=>> ".session_encode()."<BR>";
>
> ?>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD><TITLE>Second Page</TITLE></HEAD>
> <BODY BGCOLOR="#A2BBAF">
>
> <H4>Second Page</H4>
> Hello visitor, you have seen this page <?=$count; ?> times.<p>
> count = <?= $HTTP_SESSION_VARS["count"] ?>
> <P>
> <FORM METHOD=POST ACTION="<?= $PHP_SELF ?>">
> <INPUT TYPE="submit" name=submit value="Go to the THIRD Page ">
> </FORM>
>
> </BODY>
> </HTML>
> ---------------------------------
> <?php /* Third.php */
>
> session_name(mysession);
> session_start();
> session_register ("count");
>
>
> if (isset($submit)){
>   header("Location: First.php?".SID);
> }
> print "session_encode=>> ".session_encode()."<BR>";
> ?>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML>
> <HEAD>
> <TITLE>Third Page</TITLE>
> </HEAD>
>
> <BODY BGCOLOR="#A2BBAF">
> <H4>Third Page</H4>
> Hello visitor, you have seen this page <?=$count; ?> times.<p>
> Count = <?= $HTTP_SESSION_VARS["count"] ?>
> <P>
>
> <FORM METHOD=POST ACTION="<?= $PHP_SELF ?>">
> <INPUT TYPE="submit" name=submit value="Go to the FIRST Page ">
> </FORM>
>
> </BODY>
> </HTML>
>
>
> --
> 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 list,
        Don't you just hate the way that the POST method makes browsers
act some times? Expiring pages and asking you if you really want to
reload this page. I have found a solution. Instead of relying on the
POST method to protect pages from being accessed twice, I use GET and at
the end of a processing script using <? header("Location:
next_page.html") ?> redirecting the client to the desired url. So when
the client tries to go back and forth accessing pages with their
browser, the processing page is virtually replaced with the url
"next_page.html", thus stopping an additional posts. Hope this is
useful.

<?

/* Processing script */

if($submit){
        /* Delete something with the database */
        mysql("database", "delete from table where id = $id");

        header("Location: next_page.html");
        exit;
}

?>






 hi everyone

  i'm working with php-IIS5.0 and php-apache in windows,
  but i have a dll isis_dll_php-4.0.6.dll and can't load it with function
dl()
  in both servers, i receve thes warning:

  Warning: Unable to load dynamic library 'c:\php\isis_dll_php-4.0.6.dll' -
The specified module  could not be found. in d:\htdocs\search\demo.php on
line 2

 I copy dll in:
  C:\winnt
  C:\php
  C:\winnt\system32
  C:\php\extensions
  d:\htdocs\search\

  but don't work

  please,  what'up.

  Raidell

----------------------------------------
Raidell Avello Martinez
Analista de Sistemas de Computacion
Centro de Informacion Cientifico Tecnica
Universidad de Cienfuegos, Cuba





Py,

I've tried your method but again, didn't work, here how the word "So Paulo"
appears in the url with get method "S%E3o+Paulo" and the word "z" "z%E9",
maybe there's some clue here.
I'm in a macintosh sys 9.1, IE5 all in english.

Thank's in advance

Rodrigo


on 11/2/01 1:01 PM, pierre-yves at [EMAIL PROTECTED] wrote:

> Hello,
> 
>> can someone has an idea in how to convert for example
>>> a string posted by a form in this format "so paulo" to this "sao
> paulo"??
> 
> function remove_accents( $str ){
> if( strlen( $str ) == 0 )
> return $str;
> else
> $ret = strtr($str,
> "",
> "AAAAAACEEEEIIIIOOOOOUUUUYaaaaaaceeeeiiiioooooouuuuyy");
> return $ret;
> }
> 
> hope it helps,
> py
> 
> ----- Original Message -----
> From: "Stefan Rusterholz" <[EMAIL PROTECTED]>
> To: "Rodrigo Peres" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Friday, November 02, 2001 9:10 AM
> Subject: Re: [PHP] Re: Problem with non us caracters and "strtr"
> 
> 
>> I have little experience with this kind of problem.
>> None of the Browsers I used under mac (IE 4 - 5 and sever NS 4.x) has sent
>> the data different than Windows Browsers. But avoid the meta-tag charset.
> I
>> had serious problems when the HTML-file where the form data came from had
>> that tag set (but I didn't spend a lot of time investigating it).
>> 
>> Anyway: why do you want to translate a  to an a?
>> I made good experiences with storing original chars and using
> htmlentities()
>> (or otherway round if you don't have to edit that stuff)
>> 
>> Stefan Rusterholz, [EMAIL PROTECTED]
>> ----------------------------------
>> interaktion gmbh
>> Stefan Rusterholz
>> Zrichbergstrasse 17
>> 8032 Zrich
>> ----------------------------------
>> T. +41 1 253 19 55
>> F. +41 1 253 19 56
>> W3 www.interaktion.ch
>> ----------------------------------
>> 
>> ----- Original Message -----
>> From: "Rodrigo Peres" <[EMAIL PROTECTED]>
>> To: "Yasuo Ohgaki" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>> Sent: Friday, November 02, 2001 2:51 PM
>> Subject: Re: [PHP] Re: Problem with non us caracters and "strtr"
>> 
>> 
>>> I've tried the recode(), but I think I didn't uderstand it's
>> functionality,
>>> since nothing happens. can someone has an idea in how to convert for
>> example
>>> a string posted by a form in this format "so paulo" to this "sao
> paulo"??
>>> Does anyone knows how Macintosh's browsers send this special caracteres
> to
>>> PHP???
>>> 
>>> Thank's again
>>> 
>>> Rodrigo Peres
>>> 
>>> 
>>> 
>>> 
>>> on 11/1/01 9:17 PM, Yasuo Ohgaki at [EMAIL PROTECTED] wrote:
>>> 
>>>> Rodrigo Peres wrote:
>>>> 
>>>>> Hi list,
>>>>> 
>>>>> I'm in a big trouble. I'm brazilian, so I've made a script to clean
> up
>> the
>>>>> special caracters from our language in order to not mess up my
>> publisher,
>>>>> but this script don't work in Macintosh (macos 9.1, IE 5, all in
>> american
>>>>> english).
>>>>> 
>>>>> This is my code
>>>>> 
>>>>> 
>>>>> <?
>>>>> function myclean(&$name) {
>>>>> $name = strtolower(strtr($name,
>>>>> " ",
>>>>> "aeiouaeiouaeiouaeiouacAEIOUAEIOUAEIOUAEIOUAC"));
>>>>> return $name;
>>>>> }
>>>>> $temp = myclean($name_actor);
>>>>> echo($temp);
>>>>> ?>
>>>>> 
>>>>> What happens is if i try for example to clean up "So Paulo" it
> prints
>> "so
>>>>> paulo". Why??
>>>>> The "$name" will receive a string form a text field in a form. my
> html
>>>>> charset is iso-8859-1
>>>> 
>>>> 
>>>> I think you are better to use recode extension for this.
>>>> Check out recode manual page.
>>>> 
>>>> --
>>>> Yasuo Ohgaki
>>>> 
>>> 
>>> --
>>> 
>>> 
>>> 
>>> --
>>> 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]
>> 
> 

-- 






Rodrigo Peres wrote:

> I've tried the recode(), but I think I didn't uderstand it's functionality,
> since nothing happens. can someone has an idea in how to convert for example
> a string posted by a form in this format "so paulo" to this "sao paulo"??


recode extension may be broken currently. I saw sevral post 
complaining about it...

I'm not sure how latin encodings (ISO-8859-*) are handled in
mbstring module. You might want to try mbstring encoding
conversion functions. You might also want to try iconv module,
see if it helps. (Note: iconv is broken in 4.0.6)

> Does anyone knows how Macintosh's browsers send this special caracteres to
> PHP???


Most browsers are capable of sending data with verious
character encoding (i.e. It's not Mac specific) Check
your http header and meta tag in html doc at first.

Browser may send data with other encoding other than you
specified in HTTP header/META tag. It's server side
script programmers task to make sure convert string,
alert users, etc. If you want to allow only ISO-8859-1,
alerting user would be esiest.

--
Yasuo Ohgaki

> 
> on 11/1/01 9:17 PM, Yasuo Ohgaki at [EMAIL PROTECTED] wrote:
> 
> 
>>Rodrigo Peres wrote:
>>
>>
>>>Hi list,
>>>
>>>I'm in a big trouble. I'm brazilian, so I've made a script to clean up the
>>>special caracters from our language in order to not mess up my publisher,
>>>but this script don't work in Macintosh (macos 9.1, IE 5, all in american
>>>english).
>>>
>>>This is my code
>>>
>>>
>>><?
>>>function myclean(&$name) {
>>>$name = strtolower(strtr($name,
>>>" ",
>>>"aeiouaeiouaeiouaeiouacAEIOUAEIOUAEIOUAEIOUAC"));
>>>return $name;
>>>}
>>>$temp = myclean($name_actor);
>>>echo($temp);
>>>?>
>>>
>>>What happens is if i try for example to clean up "So Paulo" it prints "so
>>>paulo". Why??
>>>The "$name" will receive a string form a text field in a form. my html
>>>charset is iso-8859-1
>>>
>>
>>I think you are better to use recode extension for this.
>>Check out recode manual page.
>>
>>--
>>Yasuo Ohgaki
>>
>>
> 




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





Hi fitiux

I'm sure the list will correct me if I'm wrong, but what you're talking about 
isnt possible, at least not in this way.

This isn't a limitation of PHP - its a limitation of the HTML form element 
that handles the uploads.

You could consider a client-side applet to achieve the result another way.  A 
Java applet would do the job - although you will need to sign it and users 
will need to grant it permission to read their hard drives (I think this is 
how it works, it's been a while...)

Good luck

Shane



On Friday 02 November 2001 3:01 pm, fitiux wrote:
> Hi everybody!
>
> I'm new in the list.
> I'll help anybody if I can  =)
>
> by now I have a little trouble  ;-)
>
> I have to create a php page where users can upload many files
> the idea is that users could select many files by holding down
> the shift key... with this I can avoid to put many input tags in my page.
> When I use an <input type=file ....> and pass to the next page
> a temporary file name ("/var/temp/phpGH65YT") is created..
> but if I try to use another way to send the file name.. this temp file name
> is not created. and I just get an "error: I cannot open the file name
> test.txt in /var/html/pages/test.php for reading"
>
> an alternative is in fact of I know the file names that users must upload.
> I could ask them for the path and then I'd show a list of files to upload
> and users only will have to click on one button.
>
>
>
> is it possible to make more easy the file uploading for users?
> I mean... is it possible to upload many files without to choose one by one
> within a html page with many input tags?
>
> ooh yes.. I cannot use zipped files not even a ftp connection
>
>
> best regards
> from Chile.
>
>
>
> PS:  I apology for my english... I hope that you can understand me   =)

-- 
Shane




Hi Shane..  :-)

thankyou for your help..

I was wondering myself about that.. and I surfed the net for many days just searching 
for a solution...
but now I know what it is the limitation.. thanks again.  =)
I think as you say.. consider a client-side applet.

best regards from Chile


--Patricio
(aka Fitiux)




PS: sorry if my english isn't good..  :-)





On Fri, Nov 02, 2001 at 12:44:16PM +0100, Nikola Karovi? wrote:
> on my web site i have an option that user can add their comments about my
> articles. I have table articles, and table comments. On table comments
> column unique id (auto increment) and articleid. It displays them and sort
> coments by unique id. When i delete eg. comment number 4, next comment is
> eg.comment number 23. That new comment has unique id 23, but it is placed
> instead id comment 4, so i get:
> 
> 1 comment
> 2 comment
> 3 comment
> 23 comment
> 4 comment
> 
> is this wrong?

No, the database can store them internally however it wants.  If you
want your results to be in a certain order you should use the order by
clause in SQL.

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
Suppose you're working on an optimizer to render \X unnecessary (or
rather, redundant, which isn't the same thing in my book).
             -- Larry Wall in <[EMAIL PROTECTED]>




I have a setup where users can access their own pages using a /~username 
here account

I need to put a PHP script in their directoies that will be able to tell 
me what their username is.

I was thinking about $REQUEST_URI however if I go to /~username/dir/page 
it will return it all.

all I want is the username...

Thanks for your help,
Michael





Hi Michael

How about explode()ing it using '/' as the seperator, then finding the 
element in the resulting array that begins with '~', strip that first 
character using substr() and bod's your uncle...

I'd write the code but I've had a long day...

Shane

On Friday 02 November 2001 6:11 pm, [EMAIL PROTECTED] wrote:
> I have a setup where users can access their own pages using a /~username
> here account
>
> I need to put a PHP script in their directoies that will be able to tell
> me what their username is.
>
> I was thinking about $REQUEST_URI however if I go to /~username/dir/page
> it will return it all.
>
> all I want is the username...
>
> Thanks for your help,
> Michael

-- 
Shane





Ok,

How do I do that?

> Hi Michael
> 
> How about explode()ing it using '/' as the seperator, then finding the 
> element in the resulting array that begins with '~', strip that first 
> character using substr() and bod's your uncle...
> 
> I'd write the code but I've had a long day...
> 
> Shane
> 
> On Friday 02 November 2001 6:11 pm, [EMAIL PROTECTED] wrote:
> > I have a setup where users can access their own pages using a /~username
> > here account
> >
> > I need to put a PHP script in their directoies that will be able to tell
> > me what their username is.
> >
> > I was thinking about $REQUEST_URI however if I go to /~username/dir/page
> > it will return it all.
> >
> > all I want is the username...
> >
> > Thanks for your help,
> > Michael
> 
> 





On Vie 02 Nov 2001 15:46, [EMAIL PROTECTED] wrote:
> Ok,
>
> How do I do that?


Man, don't be so lazzy. All you need is to use the functions explode() and 
substr(), as Shane already told you.

RTFM!

> > Hi Michael
> >
> > How about explode()ing it using '/' as the seperator, then finding the
> > element in the resulting array that begins with '~', strip that first
> > character using substr() and bod's your uncle...
> >
> > I'd write the code but I've had a long day...
> >
> > Shane
> >


-- 
Porqu usar una base de datos relacional cualquiera,
si pods usar PostgreSQL?
-----------------------------------------------------------------
Martn Marqus                  |        [EMAIL PROTECTED]
Programador, Administrador, DBA |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------




Okz,

Hows this...

$myarray = explode('/', $REQUEST_URI);

for ($i=0; $i<count($myarray); $i++) {
        $mystr = $myarray[$i];

        if ($mystr[0] = '~') {
                $username = substr($mystr, 1);
                $i = count($myarray);
        };
};

and presto, username in $username

[there are more efficient ways to walk the array, but I've had a long day...]

Hope that helps,

Shane


On Friday 02 November 2001 6:46 pm, [EMAIL PROTECTED] wrote:
> Ok,
>
> How do I do that?
>
> > Hi Michael
> >
> > How about explode()ing it using '/' as the seperator, then finding the
> > element in the resulting array that begins with '~', strip that first
> > character using substr() and bod's your uncle...
> >
> > I'd write the code but I've had a long day...
> >
> > Shane
> >
> > On Friday 02 November 2001 6:11 pm, [EMAIL PROTECTED] wrote:
> > > I have a setup where users can access their own pages using a
> > > /~username here account
> > >
> > > I need to put a PHP script in their directoies that will be able to
> > > tell me what their username is.
> > >
> > > I was thinking about $REQUEST_URI however if I go to
> > > /~username/dir/page it will return it all.
> > >
> > > all I want is the username...
> > >
> > > Thanks for your help,
> > > Michael




I'm asking here, because I don't know where to start ....

A client has a subscription newsletter, presently circulated as a PDF 
mailed to subscribers. It's being circulated widely, but not paid for.

Approach (a) for securing this is to email a link to subscribers. Each 
subscriber will have logged on once, at which time a PHP script will create 
a hashed value of ID and time, store it in the subscriber database, setting 
"logged_in" to true and setting a cookie in the subscriber's browser.

 From then on logins will be automatic as the contents of the cookie will 
be checked against the database and the subscriber automatically 
authenticated. If a login is attempted from another browser, 
username/password will be prompted for, and the data fetched by login 
script will indicated that a key has been generated and the "logged_in" 
flag set. So no access and phone the office if you want this reset.

The PDF will be downloaded from the site, and we'll turn off cutting & 
pasting; it will always have the same name on the browser. So we're OK.

Approach (b) is a little different. The client issues digital certificates 
to each subscriber & stores them on the server. I understand each 
certificate can be used to encrypt (as well as sign) mail to each 
individual subscriber, using the subscriber's public key.

The mail script then creates an email to each subscriber, incorporating the 
subscriber's & sender's name, with the PDF as  an attachment. The 
subscriber's public key (from the certificate?) is used to encrypt the 
message and attachment.

Can this be done with PHP's mail() function? I assume so and I just haven't 
read the correct RFc yet. A pointer in the correct direction will be 
appreciated.

The other question I have is does the subscriber's email client 
automatically decrypt the PDF? If so, if the subscriber forwards the 
message (and attachment) to his own personal list I would assume a 
decrypted PDF goes, rather than an encrypted one.

Some feedback would be appreciated. I'd prefer approach (b), but am 
currently working on (a).

Miles Thompson





PHP is probably the best language around for "in-house" documentation.  The
online manual reads less like a technical manual and more like a tutorial.

Learned PHP 2 years ago.  The only resource I've ever used was the manual.

Mike


"Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> http://www.php.net/manual/en/language.types.array.php
>
> start with that
>
> -----Original Message-----
> From: Justin French [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 12:33 AM
> To: php
> Subject: [PHP] simple array tutorial wanted
>
>
> Hi all,
>
> I really want to get me head around arrays, becuase
> I KNOW there's a better way to do some of the stuff
> i'm doing right now.
>
> I could mess with stuff for a few hours and probably
> get it, but i'd rather have a decent tutorial if
> anyone knows of one...
>
>
> Thanks,
>
> Justin French
>
> --
> 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'm trying to install Clibpdf, but when I compile
the source code, It doesn't seem to be a .so library.
So when I say in php.ini to load the extension, it
give me an error.
Ciao

______________________________________________________________________

Abbonati a Yahoo! ADSL con Atlanet!
Naviga su Internet ad alta velocit, e senza limiti di tempo! 
Avrai sempre il telefono libero e non dovrai pagare il traffico telefonico 
per collegarti a Internet. 
Per saperne di pi vai alla pagina http://adsl.yahoo.it




I've signed up with a dedicated Web host that has PHP installed. The weird
thing is that there is no php.ini anywhere. Is the file optional? Everything
seems to be behaving okay.

I have several Web sites that I'm setting up. Is it possible to use
different php.ini files for each Web site? I'm using apache with mod-php. I
see that PHP will search for php.ini in the working directory first. Does
this mean that the way to accomplish what I want is to put a php.ini file in
each directory that has .php files? It would be better if there was a way to
have a php.ini file affect all files in a site, instead of putting php.ini
files in all subdirectories of the site where there are .php files.

Thanks!

Jen








On Fri, 2 Nov 2001, jennyw wrote:

> I've signed up with a dedicated Web host that has PHP installed. The weird
> thing is that there is no php.ini anywhere. Is the file optional? Everything
> seems to be behaving okay.
>
> I have several Web sites that I'm setting up. Is it possible to use
> different php.ini files for each Web site? I'm using apache with mod-php. I
> see that PHP will search for php.ini in the working directory first. Does
> this mean that the way to accomplish what I want is to put a php.ini file in
> each directory that has .php files? It would be better if there was a way to
> have a php.ini file affect all files in a site, instead of putting php.ini
> files in all subdirectories of the site where there are .php files.

If you have some documentation for the ISP you are using, that would be a
lead... What exactly do you want to change in your php.ini?

--
patrik_wallstrom->foodfight->[EMAIL PROTECTED]>+46-706355528





I host with iServer (now ViaVerio) and we dont have a php.ini file (that we
can get to, anyways) either.   I run phpinfo() and it says that the ini file
is in /usr/local/lib but nuthin's there.

What exactly do you want to use different ini files for anyways?


--
Jason Wood
Chief Technology Officer
Expressive Tek, Inc.
407 Kehrs Mill Road
Ballwin, MO 63011
Phone 636.256.1362
www.expressivetek.com


"Jennyw" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've signed up with a dedicated Web host that has PHP installed. The weird
> thing is that there is no php.ini anywhere. Is the file optional?
Everything
> seems to be behaving okay.
>
> I have several Web sites that I'm setting up. Is it possible to use
> different php.ini files for each Web site? I'm using apache with mod-php.
I
> see that PHP will search for php.ini in the working directory first. Does
> this mean that the way to accomplish what I want is to put a php.ini file
in
> each directory that has .php files? It would be better if there was a way
to
> have a php.ini file affect all files in a site, instead of putting php.ini
> files in all subdirectories of the site where there are .php files.
>
> Thanks!
>
> Jen
>
>
>
>






This is a dedicated server, and I have several sites on it. One of the
things I'd like to be able to set differently for each site is session
expiration. Is there a way to do this without mucking around w/ php.ini?

Thanks!

Jen


"Jason Wood" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I host with iServer (now ViaVerio) and we dont have a php.ini file (that
we
> can get to, anyways) either.   I run phpinfo() and it says that the ini
file
> is in /usr/local/lib but nuthin's there.
>
> What exactly do you want to use different ini files for anyways?
>
>
> --
> Jason Wood
> Chief Technology Officer
> Expressive Tek, Inc.
> 407 Kehrs Mill Road
> Ballwin, MO 63011
> Phone 636.256.1362
> www.expressivetek.com
>
>
> "Jennyw" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I've signed up with a dedicated Web host that has PHP installed. The
weird
> > thing is that there is no php.ini anywhere. Is the file optional?
> Everything
> > seems to be behaving okay.
> >
> > I have several Web sites that I'm setting up. Is it possible to use
> > different php.ini files for each Web site? I'm using apache with
mod-php.
> I
> > see that PHP will search for php.ini in the working directory first.
Does
> > this mean that the way to accomplish what I want is to put a php.ini
file
> in
> > each directory that has .php files? It would be better if there was a
way
> to
> > have a php.ini file affect all files in a site, instead of putting
php.ini
> > files in all subdirectories of the site where there are .php files.
> >
> > Thanks!
> >
> > Jen
> >
> >
> >
> >
>
>






For some reason, when I tried using setcookie(), cookies wouldn't stick
around. When I added an expiration time, cookies started sticking around,
but ... I thought that if you didn't provide an expiration they were
supposed to stick around indefinitely?

Thanks!

Jen








If the cookie lifetime is set to 0, then it is a "session" cookie, and it
persists until the browser is closed.

Kirk

> -----Original Message-----
> From: jennyw [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 12:48 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Cookies won't stick
> 
> 
> For some reason, when I tried using setcookie(), cookies 
> wouldn't stick
> around. When I added an expiration time, cookies started 
> sticking around,
> but ... I thought that if you didn't provide an expiration they were
> supposed to stick around indefinitely?
> 
> Thanks!
> 
> Jen 




I believe it's just the opposite, for the sake of safety.  Besides, good
coding practices in ANY language generally means you include all possible
information, required or not (it's like HTML; you don't have to use quotes
around attributes but to be forward compatible it's recommended).

Mike Frazer
http://www.spyproductions.com/


"Jennyw" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> For some reason, when I tried using setcookie(), cookies wouldn't stick
> around. When I added an expiration time, cookies started sticking around,
> but ... I thought that if you didn't provide an expiration they were
> supposed to stick around indefinitely?
>
> Thanks!
>
> Jen
>
>
>
>






Hello Ren,

  The problem is the implode() function call (you are telling it concatenate all of 
the lines into one).  This is not tested, but try replacing:

> $fcontents_string = implode('', $fcontents);
>
> $fp = fopen($name.".db", "w+");
> fwrite($fp,$fcontents_string);

  with:

for ($i=0; $i <= count($fcontents); $i++)
  fwrite($fp, $fcontents[$i]);

HTH,
  John

>This problem has been driving me insane.  I have a little script that let's
>users enter data into a form, which then gets appended to a file (table) as
>a line (row).  The adding part of the script works fine--and by remembering
>to add a "\n" at the end of each row, when the file (table) is read, PHP
>automagically figures out that each line is actually a row (thanks to the
>"\n"), and organizes the array accordingly (each line becoming an element in
>the array).  The file thus displays fine.  So far, so good.
>
>The problem arrises when I try to update a row (line) in the table (file).
>The good:  The line break character  "\n" at the end of row being updated
>DOES get written properly.  The bad:  The line break characters for all the
>other rows of the table (which I'm not trying to update) disappear and/or
>CHANGE to a different, inscrutable character (square) when the whole
>array-turn-string gets written to the file.
>
>I realize this is confusing without the example code, so here it is...
>
>THE TABLE (FILE.DB) BEFORE THE UPDATE
>========================================================================
>19 Oct 2001, 17:56|Movie|War and Peace|800||Ready|redoctober|
>19 Oct 2001, 17:56|Movie|Hamlet|500||Ready|redoctober|
>19 Oct 2001, 17:56|Movie|Les Miserables|600||Ready|redoctober|
>19 Oct 2001, 17:57|Movie|Fahrenheit 451|||Ready|redoctober|
>========================================================================
>
>THE USER CHANGES HAMLET TO HENRY V, THEN CLICKS SUBMIT
>========================================================================
>19 Oct 2001, 17:56|Movie|War and Peace|800||Ready|redoctober| 19 Oct 2001,
>17:56|Movie|Henry V|500||Ready|redoctober|
>19 Oct 2001, 17:56|Movie|Les Miserables|600||Ready|redoctober| 19 Oct 2001,
>17:57|Movie|Fahrenheit 451|||Ready|redoctober|
>========================================================================
>
>Notice how the first two and last two lines, where there used to be a line
>break, now run together--and only the updated row/line has a line break at
>the end?  WHY?!?!?!?!?!?!    =:-(O)
>
>And here's my crappy-as-usual code that handles the new/update functions
>(thanks to everyone who have helped me get it to even this state):
>========================================================================
>if (isset($submit)) {
>
>       if (isset($update)) {   // UPDATE
>       $affected0 = $started;
>       $affected1 = $type;
>       $affected2 = $title;
>       $affected3 = $size;
>       $affected4 = $res;
>       $affected5 = $status;
>       $affected6 = $by;
>       $updatedstring = $affected0 . "|" . $affected1 . "|" . $affected2 . "|" .
>$affected3 . "|" . $affected4 . "|" . $affected5 . "|" . $affected6 . "|" .
>"\n";
>
>       $fcontents = file($name.".db");
>       $fcontents[$update] = $updatedstring;
>       $fcontents_string = implode('', $fcontents);
>
>       $fp = fopen($name.".db", "w+");
>    fwrite($fp,$fcontents_string);
>    fclose($fp);
>
>       } else {     // ADD
>    $fp = fopen($name.".db", "a");
>    $now = date("j M Y, H:i");
>    $by = $name;
>    $common=$now . "|" . $type . "|" . $title . "|" . $size . "|" . $res .
>"|" . $status ."|". $by . "|" . "\n";
>    fwrite($fp,$common);    // write to the file
>    fclose($fp);            // close the file
>       }
>}
>========================================================================
>
>A million thanks if you can help me crush this bug!
>
>---
>Rene Fournier
>[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]

--
/* SteeleSoft Consulting     John Steele - Systems Analyst/Programmer
 *  We also walk dogs...  Dynamic Web Design  PHP/MySQL/Linux/Hosting
 *  www.steelesoftconsulting.com     [EMAIL PROTECTED]
 */




I need to build the following report.  I need to query an Oracle database,
and list a username and userid, then I need to look at several directories,
and determine which files belong to which user, based on the user id and a
piece of the filename matching.  then I need to count these files, and
calculate the total number of files, the oldest file, the total size of the
files, and the path, per user.  I Also need to be able to sort on all of
this criteria. i.e. by username, file date, total number of files, total
size of files, and path.  Can this be done in PHP 4?  Is this a terribly
daunting task?  Is there a better tool set out there for this task?  can ant
examples of functions used here be sited?

Thx,

*****************************
Micah Huerta
SFA Support Specialist

Accelrys
9685 Scranton Road
San Diego, CA 92121
858-799-5303

SFA SUPPORT INFORMATION
US 858-799-5095
Cambridge +44 1223 402760
[EMAIL PROTECTED]
*****************************





Hello All,

Does anyone know of, or is anyone out there, a trainer or trainers
interested in giving classes in PHP-MYSQL to corporate clients in Feb? This
is not for myself but rather my suitemates. They have a seminar coming up
and are looking for some qualified trainers in PHP or MYSQL. If Anyone out
there is interested, please e-mail me directly and I will forward it on to
them.

Thanks very much,

Gerard Onorato








I'm trying to get mcrypt to work with php, but haven't been able to 
reconfigure php to work with it.  I'm using the version of php that came with 
Mandrake 8.0 and I have downloaded and installed the  2.5.7-1 mdk rpm of  
mcrypt.  

So now I should cd into my php directory and reconfigure php to work with 
mcrypt like this:
./ configure --with-mcrypt
make
make install

Right?  But this isn't working and I think the problem may be something as 
dumb as that I don't have the right directory.  All I get is a message that 
there is no such directory when I run the command. 

As far as I can tell php is installed in /usr/bin and that is the directory I 
tried.  There is not a php directory there though, but a php executable file.
How do I find the right directory?   Anything else I have to do to get this 
working?


Thanks
SW




Hi Scott,

@ 4:13:46 PM on 11/2/2001, Scott wrote:

> I'm trying to get mcrypt to work with php, but haven't been able to
> reconfigure php to work with it. I'm using the version of php that
> came with Mandrake 8.0 and I have downloaded and installed the
> 2.5.7-1 mdk rpm of mcrypt.

> So now I should cd into my php directory and reconfigure php to work with 
> mcrypt like this:
> ./ configure --with-mcrypt
   ^^
   is there really a space between ./ and configure? Try ./configure

And for mcrypt, try either

   --with-mcrypt=/usr

or

   --with-mcrypt=/usr/local

   
> make
> make install


--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.





Hi Scott,

@ 4:13:46 PM on 11/2/2001, Scott wrote:

> As far as I can tell php is installed in /usr/bin and that is the
> directory I tried. There is not a php directory there though, but a
> php executable file. How do I find the right directory? Anything
> else I have to do to get this working?

D'oh, ignore my last message.

Does /usr/bin/php exist?

$ ls /usr/bin/php

or

$ ls `which php`

If not you may have it installed as an apache module, too. Try this:

$ updatedb
$ locate *php*so

If that gets you nothing try:

$ `which httpd` -l | grep php


In any case, in order to build php yourself (ie. ./configure) you need
to download the source tarball (tar.gz) from php.net.

You're using KMail so I'm assuming your web server is running Linux.

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.





 This is my output from $ locate *php*so:

/usr/lib/apache-extramodules/libphp4.so
/usr/lib/php/extensions/dba_gdbm_db3.so
/usr/lib/php/extensions/gd.so
/usr/lib/php/extensions/imap.so
/usr/lib/php/extensions/ldap.so
/usr/lib/php/extensions/mysql.so
/usr/lib/php/extensions/pgsql.so
/usr/lib/php/extensions/readline.so
/usr/lib/php/extensions/tclink.so
/usr/lib/libphp_common.so

This is the rpm install of php that came with M8.0.  Which is the real php 
directory?  Can it be reconfigured with mcrypt?

Thanks,
SW




Hi Scott,

@ 5:01:43 PM on 11/2/2001, Scott wrote:

>  This is my output from $ locate *php*so:

> /usr/lib/apache-extramodules/libphp4.so
> /usr/lib/php/extensions/dba_gdbm_db3.so
> /usr/lib/php/extensions/gd.so
> /usr/lib/php/extensions/imap.so
> /usr/lib/php/extensions/ldap.so
> /usr/lib/php/extensions/mysql.so
> /usr/lib/php/extensions/pgsql.so
> /usr/lib/php/extensions/readline.so
> /usr/lib/php/extensions/tclink.so
> /usr/lib/libphp_common.so

> This is the rpm install of php that came with M8.0.  Which is the real php 
> directory?  Can it be reconfigured with mcrypt?

Locate your Apache httpd.conf file and look for the LoadModule entry
for libphp4. If that is in fact enabled (uncommented) and PHP is
working (In other words, <?php phpinfo(); ?> in a .php file works)
then you should be able to download the source for PHP 4 and build it
using

$ apachectl stop

$ mv /usr/lib/apache-extramodules/libphp4.so \
/usr/lib/apache-extramodules/libphp4.so.bak

$ ./configure --with-apxs [other options here]
$ make
$ make install

$ apachectl start

to upgrade the module located in /usr/lib/apache-extramodules

If apache fails to start then revert to your old libphp4:

$ mv /usr/lib/apache-extramodules/libphp4.bak \
/usr/lib/apache-extramodules/libphp4.so


--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.





@ 6:28:08 PM on 11/2/2001, Brian Clark wrote:

> If apache fails to start then revert to your old libphp4:

> $ mv /usr/lib/apache-extramodules/libphp4.bak \
> /usr/lib/apache-extramodules/libphp4.so

Sorry, make that:

$ mv /usr/lib/apache-extramodules/libphp4.so.bak \
/usr/lib/apache-extramodules/libphp4.so

In case you cut and paste..

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.





Have a regular expression which replaces ' with '' (used to insert ' into db):
   preg_replace("/\'/", "''", $text );
This works great on the UNIX production machine but not on windows 
development environment.  Actually replaces ' with \'' not ''.

Before I write a function that loops thought the whole thing looking at 
each character and replaces ' with '' has anybody got any ideas?

Ben

**************************************************************
* Ben Edwards                                +352 091 429995 *
* Homepage                http://www.gifford.co.uk/~bedwards *
* i-Contact Progressive Video    http://www.videonetwork.org *
* Smashing the Corporate image     http://www.subvertise.org *
* Bristol's radical news            http://www.bristle.co.uk *
* PGP : F0CA 42B8 D56F 28AD 169B  49F3 3056 C6DB 8538 EEF8   *
**************************************************************





Ben Edwards <[EMAIL PROTECTED]> wrote:
> Have a regular expression which replaces ' with '' (used to insert ' into db):
>   preg_replace("/\'/", "''", $text );
> This works great on the UNIX production machine but not on windows 
> development environment.  Actually replaces ' with \'' not ''.
> 
> Before I write a function that loops thought the whole thing looking at 
> each character and replaces ' with '' has anybody got any ideas?

rather than preg_replace behaving differently on windows and unix, it
seems more likely that your windows install of php has
'magic_quotes_gpc' set on in php.ini, and the unix install has it set to
off.

jim




are you using two single quotes when you want a double quote? also
you should probably be using str_replace for this since there's no
regular expressions here.

On Fri, 02 Nov 2001 22:26:07 +0100, Ben Edwards wrote:
>Have a regular expression which replaces ' with '' (used to insert '
>into db):
>  preg_replace("/\'/", "''", $text );
>This works great on the UNIX production machine but not on windows
>development environment.  Actually replaces ' with \'' not ''.
>
>Before I write a function that loops thought the whole thing looking
>at
>each character and replaces ' with '' has anybody got any ideas?
>
>Ben
>
>**************************************************************
>* Ben Edwards                                +352 091 429995 *
>* Homepage                http://www.gifford.co.uk/~bedwards *
>* i-Contact Progressive Video    http://www.videonetwork.org *
>* Smashing the Corporate image     http://www.subvertise.org *
>* Bristol's radical news            http://www.bristle.co.uk *
>* PGP : F0CA 42B8 D56F 28AD 169B  49F3 3056 C6DB 8538 EEF8   *
>**************************************************************
>
>


--
Mark, [EMAIL PROTECTED] on 11/02/2001






Hi all,

I am a log time lurker on this list thanks to all the major contributors
who have helped me learn  :-)

I seem to have a problem with teh session_destroy function in that it
appears not to work for me

I am running RH7.1 (kernel 2.4.10) with php4.0.5
.

here is the code that is not working......

if ($PHPSESSID) {
  session_start();
  session_destroy();
}
unset($PHPSESSID);

...................

could anyone tell me why this does not get rid of the session marker on
the browser.... as my "logout" function is failing and the above is all
that is in the script !...

thanks in advance

richard


__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com




Hi,
  I'm having a bit of a weird problem with the date() function. I am using 
PostgreSQL to store guestbook entries and updating and displaying them with 
Apache 1.3x and PHP4 on OpenBSD. The date information is being stored 
correctly in PostgreSQL, but I'm using the date() function to format the 
date to look nice like so:

         $date=date("l F j, Y n:i a T",strtotime($data->day_time));

to achieve:

         Friday November 2, 2001 11:27 am PST

The problem comes in that the time is a few hours off. In the above 
example, the time should have been 1:27 pm PST. In addition, the time for 
all the entries is off in what appears to be a sequence. The previous entry 
is off by three hours, the one before that is four hours off, and so on.

Any ideas about what might be happening? I know haven't given a lot of 
information, nor the actual URL, but I'm hoping it's just something simple 
that I'm doing wrong.

Thanks,
Raymond

--
Raymond C. Rodgers   [EMAIL PROTECTED]
Home Page:      http://bbnk.dhs.org





Had a look but it was a little too expencive...  but it made me think of
another product that I had seen called WebZinc which does the same and more
and is a fraction of the price for the unlimited developer edittion.

Thanks Jason for putting me on the right track.






Hi,

I've read all docs on how to send multiple attachments with mime headers...

But all I get is the headers in plain text in the resulting e-mail!

No attachments at all!

Could anyone give me short working example please...

Thanks,

Simon.




"show source" feature is broken in many Netscape (and Mozilla).
MSIE is behaving correctly. IMHO.

You cannot change client behaviours like this.

--
Yasuo Ohgaki

Moloko wrote:

> interesting one here for y'all
> 
>  if you use client side JavaScript to write HTML to the browser, eg
> <script language="JavaScript"
> document.write ('<b>Hello world!</b>');
> </script>
> then look at the page source from IE, the page source will show you exactly
> what I've typed above, whereas if you view the page source from Netscape
> 4.7, it shows this in the source:
> <b>Hello world!</b>
> (this is the way I ewould expect and want it work)
> 
> Unfortunately the (rather complex) script I'm writing does completely
> different stuff in Netscrape so looking at the page source thru there to see
> what's going on is hopeless - is there any way to make IE behave like NS in
> this respect and actually show the correct JavaScript output, rather than
> the JavaScript code itself??
> 
> Cannot believe that NS4.7 is actually better at doing something than IE!!!
> 
> --
> Moloko
> 'When the going gets weird, the weird turn pro' - Dr Gonzo
> GCM/CS/IT/MC d-- S++:- a-- C++ U--- P+ L !E W+++$ N+ K+ w+++$ M+ PS+++ PE-
> PGP- t+ 5- X-- R* tv++ b+++ DI++++ D G e h-- r++ y++
> 
> 
> 






I have a redhat 7.1 system, I am using shadow passwords.

Is there a way to authenticate people using thier shadow password?

Michael





@ 8:14:52 PM on 11/2/2001, [EMAIL PROTECTED] wrote:

> Is there a way to authenticate people using thier shadow password?

PHP PAM Extension
ftp://ftp.netexpress.net/pub/pam/php_pam.newest.tgz

Don't ask me how secure it is because I haven't used it. I've only
seen it mentioned as an option. Personally, I'd keep the web server
away from the user database as much as possible.

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.





What I am doing is using Macromedia Ultradev 4 and querying a mySQL database
and using Phakt (PHP) to code the website.

Everything is working as far as pulling the database info and repeating it
down the page but it looks as if it is one column.

This is how I have the table

TABLE
|  COLUMN   |  COLUMN  | COLUMN |
---------------------------------------------
|  ROW 1        |                      |                  |


This is how the data shows

TABLE
|  DATA          |  BLANK COLUMN | BLANK COLUMN
---------------------------------------------------------------
|  DATA         |  BLANK COLUMN | BLANK COLUMN
---------------------------------------------------------------
|  DATA        |  BLANK COLUMN | BLANK COLUMN


This is how I want the data to show

TABLE
|  DATA          |  DATA             |   DATA           |
---------------------------------------------------
|  DATA         |  DATA              |  DATA            |
---------------------------------------------------
|  DATA        |  DATA               | DATA             |


Hope this makes sense. I need some help!






In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Kacey A. Murphy) wrote:

> This is how the data shows
> 
> TABLE
> |  DATA          |  BLANK COLUMN | BLANK COLUMN
> ---------------------------------------------------------------
> |  DATA         |  BLANK COLUMN | BLANK COLUMN
> ---------------------------------------------------------------
> |  DATA        |  BLANK COLUMN | BLANK COLUMN

Uh-huh.  But how about showing the section of *code* that's giving you that 
result?

-- 
CC




Perfect and just what I was looking for!  I was able to finish my program 
today using
it and the boss is wondering how I did it so fast!  HINT:  he thought I was 
using perl.


At 01:59 PM 10/29/2001 -0400, Frewuill Rodriguez wrote:
>what about using ftp functions from PHP?
>
>http://www.php.net/manual/en/ref.ftp.php





I'm looking for some code that will enable me to remove a line from a file.

I have .htaccess which is being filled by a subscription processor, I need
to know how to remove a user from this file once the subscription has either
been cancelled or subscription term complete.

Any help appreciated.
Thanks
Jonno






One idea is to read the file into an array, use substr to match the
existance of the user to be deleted, and if the user isn't to be deleted,
read the line into a new array, then write the new file to the array.

"Hew Staff" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm looking for some code that will enable me to remove a line from a
file.
>
> I have .htaccess which is being filled by a subscription processor, I need
> to know how to remove a user from this file once the subscription has
either
> been cancelled or subscription term complete.
>
> Any help appreciated.
> Thanks
> Jonno
>
>




Reply via email to