php-general Digest 13 Feb 2003 08:07:17 -0000 Issue 1880

Topics (messages 135350 through 135395):

Re: Passing PostgreSQL resource
        135350 by: Joshua Moore-Oliva
        135351 by: Joshua Moore-Oliva

Re: php & javascript drop down menu???
        135352 by: Jeff Bluemel

Re: setcookie on PHP??
        135353 by: Daniel Masson

string to array
        135354 by: Kevin Waterson
        135356 by: Leif K-Brooks
        135357 by: Steve Werby

Announcement: Smarty template engine 2.4.2 released
        135355 by: Monte Ohrt

How do you... get a text stream into IMAP parsing...
        135358 by: Les Barstow

when is OOP a good choice?
        135359 by: anders thoresson
        135369 by: Le Yang
        135371 by: Vladimir Galkov
        135388 by: php.errorcode.com

Re: PHP & JavaScript
        135360 by: Greg

Re: Failed opening
        135361 by: Ernest E Vogelsinger

PGP and PHP together???
        135362 by: MIKE YRABEDRA
        135384 by: David T-G
        135385 by: Jason Sheets
        135386 by: David T-G

undefined function - crypt()
        135363 by: Anthony Ritter
        135364 by: Greg
        135365 by: Barajas, Arturo
        135367 by: Anthony Ritter

Re: restricting access to files using PHP
        135366 by: Ernest E Vogelsinger

Re: MySQL Login Setup not working with PHP
        135368 by: Ernest E Vogelsinger

Re: Learning PHP
        135370 by: Ernest E Vogelsinger

IS PEAR Secure?
        135372 by: MIKE YRABEDRA

Re: var_export() strips slashes
        135373 by: Shawn McKenzie

Database problem - works in Windows - not Linux
        135374 by: Lee P. Reilly
        135378 by: Chris Hewitt
        135392 by: Mike Mannakee

ftp_get()
        135375 by: Muti
        135376 by: Barajas, Arturo
        135389 by: Tom Rogers

Pspell
        135377 by: John Nichel

Output Compression stops working after a while
        135379 by: Zavier Sheran

$$ Variable?
        135380 by: jtx.hatesville.com
        135381 by: Philip Hallstrom
        135382 by: jtx.hatesville.com
        135383 by: Ernest E Vogelsinger

Re: File not rewritable - why? Help needed.
        135387 by: Paul Dunkel

IIS
        135390 by: Joe Njeru

GD and 4.3
        135391 by: Joseph Bannon
        135393 by: Kevin Waterson

Q: file writing problem - help desperately needed
        135394 by: Paul Dunkel

cookie problem....
        135395 by: Terry Lau

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]


----------------------------------------------------------------------
--- Begin Message ---
There's really no other way to do it...

You can't serialize a connection or resultset since they are both resources...

If you really wanted you could turn a recordset into an array and store that 
as a serialised object and pass it around...  but

a) Depending on how much data a recordset returned it could be quite a 
slowdown on page viewing.
b) It could be a security breach in case there was data int he recordset you 
never show to the public btu you need for calculations.
c) Changes made to the database since the last retrieval would not display.

A server is meant to store and serve data..  There really is no other way 
about it =).

Josh.

On February 12, 2003 01:52 pm, Lucas Lain wrote:
> i will use it for the moment but i was thinking in a "light" solution
> ... i dont like the idea of creating a temp table for each page...
>
--- End Message ---
--- Begin Message ---
Oh btw, you will have to remove those isString and isint functions..  they are 
other parts of my library that just check the type of a variable...

and log a message through an error handling system I've set up..  I'd have the 
library up now but it's not that well commented..

Josh.

On February 12, 2003 01:30 pm, Joshua Moore-Oliva wrote:
> Try this function...  it's one part of a php class I've been thinking about
> making open-source.  Give it any sql statement and a page (0 based for the
> page) and a number of records for a page and you are set.
>
> I've only tested this on postgresql.
>
> function pageSql( $sql, $page, $recs_per_page ) {
>
>   $this->isString( '$sql', $sql );
>   $this->isInt( '$page', $page );
>   $this->isInt( '$recs_per_page', $recs_per_page );
>
>   $sql = trim( $sql );
>   $sql = substr( $sql, strlen( "SELECT" ) );
>
>   if ( $sql[strlen($sql)-1] != ";" ) {
>       $sql .= ";";
>   }
>
>   $sql = sprintf( "CREATE TEMP SEQUENCE temp_sequence;\n"
>                 . "CREATE TEMP TABLE temp_table AS\n"
>                 . "    SELECT nextval( 'temp_sequence' ) AS temporary_idASDF,
> %s\n"
>                                                       . "SELECT ( SELECT COUNT(*) 
>FROM temp_table\n"
>                                                 . "                                  
>         WHERE temporary_idASDF > %d ) AS recs_remaining, \n"
>                 . "                           * FROM temp_table\n"
>                                                       . "  WHERE temporary_idASDF > 
>%d\n"
>                 . "    AND temporary_idASDF < %d\n"
>                 . "  ORDER BY temporary_idASDF;"
>
>                 , $sql
>                 , ( $page + 1 ) * $recs_per_page + 1
>                 , $page * $recs_per_page
>                 , ( $page + 1 ) * $recs_per_page + 1 );
>
>   return $sql;
> }
>
> On February 12, 2003 11:58 am, Lucas Lain wrote:
> > Hi.. i'm new at this mailing list and you can say that i'm a newbie in
> > Php programming :)
> > i dont know how to pass a connection to a database between pages. I want
> > to show the results in multiple pages with a unique connection.
> > can anyone help me?
> > Thanks in advance.
> > Lucas
> >
> > --
> > Lucas Lain
> > [EMAIL PROTECTED]
> > Argentina

--- End Message ---
--- Begin Message ---
thanks Jason, between this & the other suggestions I was emailed I believe I
can make this all work like I need to.

Jeff

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wednesday 12 February 2003 08:47, Jeff Bluemel wrote:
> > OK...  I have a dynamic menu system, and I have to maintain a dynamic
menu.
> > however, the amount of content I need in my menu is going to be rapidly
> > outgrown.  I believe my only solution is to deploy a javascript drop
down
> > menu (users have to be javascript compatible anyway for some other
issues
> > in my pages).
> >
> > however, it seems like anytime I try to integrate php & javascript I run
> > into a total nightmare.  the php & javascript do not need to integrate
at
> > the client level, but just on the server side to actually deploy the
menu
> > to the user.  (have if then statements of info from a database that will
> > determine if the item is displayed to the user or not, so should be
pretty
> > easy to accomodate)
> >
> > does anybody have any sample code of a javascript menu across the top of
> > the page that will have menu, and submenu's they are deploying with php
> > echo statements?
>
> Try this:
>
>   http://phplayersmenu.sourceforge.net/
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> The difference between this place and yogurt is that yogurt has a live
> culture.
> */
>


--- End Message ---
--- Begin Message ---
Send some pieces of code.

Daniel E Massón.
Ingeniero de desarrollo
[EMAIL PROTECTED]
____________________________________
Imagine S.A. 
Su Aliado Efectivo en Internet
www.imagine.com.co
(57 1)2182064 - (57 1)6163218
Bogotá - Colombia 
____________________________________
- Soluciones web para Internet e Intranet
- Soluciones para redes
- Licenciamiento de Software
- Asesoría y Soporte Técnico
____________________________________
 

-----Mensaje original-----
De: Balaravi, Bala (Ravi), ALABS [mailto:[EMAIL PROTECTED]] 
Enviado el: miércoles, 12 de febrero de 2003 12:41
Para: [EMAIL PROTECTED]
Asunto: [PHP] setcookie on PHP??

I need to set a cookie within a document in PHP? setcookie didn't work.
I guess it works only in PHP3 & PHP4
Any good ideas??

Thanks
Rave

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

--- End Message ---
--- Begin Message ---
What is the best method to convert a string to an array

I need to able to loop through each letter of the string
not just use $string[47]

Is there a definitive method to do this?

Kevin

-- 
 ______                              
(_____ \                             
 _____) )  ____   ____   ____   ____ 
|  ____/  / _  ) / _  | / ___) / _  )
| |      ( (/ / ( ( | |( (___ ( (/ / 
|_|       \____) \_||_| \____) \____)
Kevin Waterson
Port Macquarie, Australia
--- End Message ---
--- Begin Message --- There's no built-in function, but try this (copied from manual):

$chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);


Kevin Waterson wrote:

>What is the best method to convert a string to an array
>
>I need to able to loop through each letter of the string
>not just use $string[47]
>
>Is there a definitive method to do this?
>
>Kevin
>
>
>

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




--- End Message ---
--- Begin Message ---
"Kevin Waterson" <[EMAIL PROTECTED]> wrote:
> What is the best method to convert a string to an array
>
> I need to able to loop through each letter of the string
> not just use $string[47]

You can find out how long it is using strlen(), then loop through it using
your favorite looping construct.  You could also easily convert it to an
array at that point, but unless you need each character as an array element
for a later operation it doesn't seem very efficient.  I don't think
explode() will let you use a separator of '', but you might look at that as
well.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


--- End Message ---
--- Begin Message ---
Hello!

Smarty 2.4.2 now supports the ability to access objects within the
templates, a long awaited feature. Two methods are available, one which
closely follows Smartys existing syntax conventions, and another that
follows more traditional object syntax for those familiar with PHP.

The regex parsing was rewritten to be more strict, secure and
maintainable. Config files are now compiled instead of parsed. Assigned
variables are no longer extracted to PHP namespace saving extract()
calls. There is now support for applying modifiers to static values and
functions. You can now access constants with $smarty.const.VAR. If you
use the security features of Smarty be sure to upgrade, the previous
not-so-strict parser opened the possibility of executing PHP in the
templates. Other misc things are in the change log.

Have fun!
-Monte

Homepage: 
http://smarty.php.net/

Release Notes: 
http://smarty.php.net/misc/RELEASE_NOTES

ChangeLog: 
http://smarty.php.net/misc/NEWS

Download: 
http://smarty.php.net/download.php

--- End Message ---
--- Begin Message ---
Is there any way to send an email message which is already in PHP (in a
string, array, or I/O stream) through the IMAP parser without putting it
into a file first?

Thanks in advance,
--
Les Barstow           |
System Administrator  | "A society of sheep must in time beget
Jaleco Entertainment  |      a government of wolves."
http://www.jaleco.com |           -- Bertrand de Jouvenel

--- End Message ---
--- Begin Message --- I've just started to read about - and will soon try to write - object oriented code. I think I've got the basics both from the PHP-books I have, and from various sources on the web.

But nowhere have I read a good explanation to two of my questions:

1. What are the main benefits from OOP?
2. When is OOP a good choice for a PHP script, and when is ordinary functions a better call?

--
anders thoresson
--- End Message ---
--- Begin Message ---
Object oriented programming in php has better logic thus is more
suitable for more complex jobs. It also makes maintenance easier,
although you have to write a bit more code

-----Original Message-----
From: anders thoresson [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 12, 2003 3:50 PM
To: [EMAIL PROTECTED]
Subject: [PHP] when is OOP a good choice?

I've just started to read about - and will soon try to write - object 
oriented code. I think I've got the basics both from the PHP-books I
have, 
and from various sources on the web.

But nowhere have I read a good explanation to two of my questions:

 1. What are the main benefits from OOP?
 2. When is OOP a good choice for a PHP script, and when is ordinary 
functions a better call?

-- 
anders thoresson

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



--- End Message ---
--- Begin Message ---
if you work in comand its good thing.

"Anders Thoresson" <[EMAIL PROTECTED]> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've just started to read about - and will soon try to write - object
> oriented code. I think I've got the basics both from the PHP-books I have,
> and from various sources on the web.
>
> But nowhere have I read a good explanation to two of my questions:
>
>  1. What are the main benefits from OOP?
>  2. When is OOP a good choice for a PHP script, and when is ordinary
> functions a better call?
>
> --
> anders thoresson


--- End Message ---
--- Begin Message ---
On 12 Feb 2003 at 21:50, anders thoresson wrote:

> I've just started to read about - and will soon try to write - object 
> oriented code. I think I've got the basics both from the PHP-books I have, 
> and from various sources on the web.
> 
> But nowhere have I read a good explanation to two of my questions:
> 
>  1. What are the main benefits from OOP?
>  2. When is OOP a good choice for a PHP script, and when is ordinary 
> functions a better call?


Whenever it's obvious :) ... Actually I think there is a BIG 
difference between simply using object oriented syntax and actually 
*developing* in OO.  Personally, I've been doing OO in Perl for quite 
awhile and use it for PHP as well, but I still do it more in a 
modular sense. imho, OO is a paradigm shift in thinking about how you 
will architect (of course I've seen some work that just throws 
everything in one file and repeats the exact same code every 50 
lines) your application. I'm trying to squeeze myself into fully 
understanding the OO way. I like it. 

In the end, TMTOWTDI, don't get caught by the hype but the apps that 
I've had the most success with evolving and debugging where those 
written more like the OO way than just any old way. 

Peter
"Reality is that which, when you stop believing in it, doesn't go 
away".
-- Philip K. Dick

--- End Message ---
--- Begin Message ---
Thank you so much, that worked perfectly...I know it's off topic, but do you
know how to automatically select all elements of a select multiple box and
then submit the form using a submit button?  Thanks!
-Greg

"John Nichel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> document.forms[0].elements['select1[]']
>
> Assuming the form is your first form on the page, reference the element
>   in JavaScript as above.
>
> Greg wrote:
> > I have a problem with 2 select multiple boxes in my PHP pages.  In order
for
> > PHP to pass multiple values to a page that it is posted to, the name of
the
> > select box must have [] at the end of it.  My problem is that when I do
that
> > for select1[] in my page that breaks the syntax of the JavaScript code
that
> > performs operations on it.  Is there any way around this?  I'm looking
for
> > either a PHP or a JavaScript solution.
> > Thanks,
> > Greg
> >
> >
> >
>
>


--- End Message ---
--- Begin Message ---
At 13:14 12.02.2003, thkiat said:
--------------------[snip]--------------------
>Hi can someone explain to me what is this and how to fix it:-
>
>Warning: Failed opening '../language/english/admin.php' for inclusion
>(include_path='.;c:\apache\php\pear') in
>c:\apache\htdocs\exoops\modules\sitemap\admin\admin_header.php on line 19
--------------------[snip]-------------------- 

Well...

I am almost sure that PHP is unable to open the file
'../language/english/admin.php' for inclusion. This file gets included in
c:\apache\htdocs\exoops\modules\sitemap\admin\admin_header.php on line 19.

Pretty cool, hm?


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/


--- End Message ---
--- Begin Message ---


Is it possible to use php and pgp together? Are there any good tutorials out
there?


-- 
Mike Yrabedra
President

323 Enterprises 
Home of The MacDock and The MacSurfshop
[http://macdock.com] : [http://macsurfshop.com]
VOICE: 770.382.1195
iChat/AIM: ichatmacdock
_______________________________________________________________________
"in all your ways acknowledge Him and He will direct your paths."
Proverbs 3:6 NIV
<{{{><
--


--- End Message ---
--- Begin Message ---
Mike --

...and then MIKE YRABEDRA said...
% 
% Is it possible to use php and pgp together? Are there any good tutorials out
% there?

It's absolutely possible.  What do you want to do?  The only thing that
most people find a little tricky is that you have to think as the web
server and not as yourself, so the web server has to be able to find the
keys and such.

I don't know of any tutorials in particular but it's like calling any
other external program.  It might be fun to have some pgp/gpg functions
built into a class, but I'm not clever enough to write that [yet ;-]


HTH & HAND

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

Attachment: msg96747/pgp00000.pgp
Description: PGP signature

--- End Message ---
--- Begin Message ---
There is a PHP extension named GPGext for PHP, it uses the gnupg made
easy library to make gpg functions available to PHP without executing
external programs.

It is available at: http://www.sourceforge.net/projects/gpgext/

Jason
On Wed, 2003-02-12 at 20:34, David T-G wrote:
> Mike --
> 
> ...and then MIKE YRABEDRA said...
> % 
> % Is it possible to use php and pgp together? Are there any good tutorials out
> % there?
> 
> It's absolutely possible.  What do you want to do?  The only thing that
> most people find a little tricky is that you have to think as the web
> server and not as yourself, so the web server has to be able to find the
> keys and such.
> 
> I don't know of any tutorials in particular but it's like calling any
> other external program.  It might be fun to have some pgp/gpg functions
> built into a class, but I'm not clever enough to write that [yet ;-]
> 
> 
> HTH & HAND
> 
> :-D
> -- 
> David T-G                      * There is too much animal courage in 
> (play) [EMAIL PROTECTED] * society and not sufficient moral courage.
> (work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
> http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
> 

--- End Message ---
--- Begin Message ---
Jason, et al --

...and then Jason Sheets said...
% 
% There is a PHP extension named GPGext for PHP, it uses the gnupg made
% easy library to make gpg functions available to PHP without executing
% external programs.

Way cool!  I'm not suprised, but I hadn't heard of it before.  Can't wait
to see what functions it offers.


% 
% It is available at: http://www.sourceforge.net/projects/gpgext/

Thanks a *bunch* for the link.  I'll very eagerly surf over!


% 
% Jason


Thanks & HAND

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

Attachment: msg96747/pgp00001.pgp
Description: PGP signature

--- End Message ---
--- Begin Message ---
Using MS Win98 / PHP /Apache

I'm getting a undefined function error - crypt()

The following scripts were taken from Larry Ullman's book on PHP on page
60-61.

Any advice would be helpful.
Thank you.

Tony Ritter
..................................................

//ullmanform.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>HTML Form</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY>
<FORM action=ullmanpassword2.php method=post>First Name <INPUT
name=FirstName><BR>Last Name <INPUT size=40 name=LastName><BR>
E-mail Address <INPUT size=60 name=Email><BR>
Comments <TEXTAREA name=Comments rows=5 cols=40>
</TEXTAREA><BR>
<INPUT type=submit value=Submit! name=SUBMIT>
</FORM></BODY></HTML>

............
// ullmanpassword2.php
<HTML>
<HEAD>
<TITLE>
Form Results/Using Strings</TITLE>
</HEAD>
<BODY>
<?php /* This page receives and handles
the data generated by "ullmanform.html". */

$FirstName = trim($FirstName);
$LastName = trim($LastName);
$Email = trim($Email);
$Comments = trim($Comments);
$Name = $FirstName . " " . $LastName;
print ("Your name is $Name.<BR>\n");
print ("Your E-mail address is $Email.<BR>\n");
print ("This is what you had to say:<BR>\n $Comments<BR>\n");
$CryptName = crypt($Name);
print ("<P>This is the crypt() version of your name: $CryptName\n");
?>
</BODY>
</HTML>
..............


Fatal error: Call to undefined function: crypt()
in c:\program files\apache group\apache\htdocs\ullmanpassword2.php




--- End Message ---
--- Begin Message ---
I believe you need to have mcrypt installed.
-Greg

"Anthony Ritter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Using MS Win98 / PHP /Apache
>
> I'm getting a undefined function error - crypt()
>
> The following scripts were taken from Larry Ullman's book on PHP on page
> 60-61.
>
> Any advice would be helpful.
> Thank you.
>
> Tony Ritter
> ..................................................
>
> //ullmanform.html
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD><TITLE>HTML Form</TITLE>
> <META http-equiv=Content-Type content="text/html; charset=windows-1252">
> <META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
> <BODY>
> <FORM action=ullmanpassword2.php method=post>First Name <INPUT
> name=FirstName><BR>Last Name <INPUT size=40 name=LastName><BR>
> E-mail Address <INPUT size=60 name=Email><BR>
> Comments <TEXTAREA name=Comments rows=5 cols=40>
> </TEXTAREA><BR>
> <INPUT type=submit value=Submit! name=SUBMIT>
> </FORM></BODY></HTML>
>
> ............
> // ullmanpassword2.php
> <HTML>
> <HEAD>
> <TITLE>
> Form Results/Using Strings</TITLE>
> </HEAD>
> <BODY>
> <?php /* This page receives and handles
> the data generated by "ullmanform.html". */
>
> $FirstName = trim($FirstName);
> $LastName = trim($LastName);
> $Email = trim($Email);
> $Comments = trim($Comments);
> $Name = $FirstName . " " . $LastName;
> print ("Your name is $Name.<BR>\n");
> print ("Your E-mail address is $Email.<BR>\n");
> print ("This is what you had to say:<BR>\n $Comments<BR>\n");
> $CryptName = crypt($Name);
> print ("<P>This is the crypt() version of your name: $CryptName\n");
> ?>
> </BODY>
> </HTML>
> ..............
>
>
> Fatal error: Call to undefined function: crypt()
> in c:\program files\apache group\apache\htdocs\ullmanpassword2.php
>
>
>
>


--- End Message ---
--- Begin Message ---
Tony,

You have to compile PHP with the "crypt" option, I don't remember the exact syntax 
(--enable-crypt? --with-crypt=/path?)

Something along those lines...
--
Un gran saludo/Big regards...
   Arturo Barajas, IT/Systems PPG MX (SJDR)
   (427) 271-9918, x448

> -----Original Message-----
> From: Anthony Ritter [mailto:[EMAIL PROTECTED]]
> Sent: Miercoles, 12 de Febrero de 2003 03:00 p.m.
> To: [EMAIL PROTECTED]
> Subject: [PHP] undefined function - crypt()
> 
> 
> Using MS Win98 / PHP /Apache
> 
> I'm getting a undefined function error - crypt()
> 
> The following scripts were taken from Larry Ullman's book on 
> PHP on page
> 60-61.
> 
> Any advice would be helpful.
> Thank you.
> 
> Tony Ritter
> ..................................................
> 
> //ullmanform.html
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD><TITLE>HTML Form</TITLE>
> <META http-equiv=Content-Type content="text/html; 
> charset=windows-1252">
> <META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
> <BODY>
> <FORM action=ullmanpassword2.php method=post>First Name <INPUT
> name=FirstName><BR>Last Name <INPUT size=40 name=LastName><BR>
> E-mail Address <INPUT size=60 name=Email><BR>
> Comments <TEXTAREA name=Comments rows=5 cols=40>
> </TEXTAREA><BR>
> <INPUT type=submit value=Submit! name=SUBMIT>
> </FORM></BODY></HTML>
> 
> ............
> // ullmanpassword2.php
> <HTML>
> <HEAD>
> <TITLE>
> Form Results/Using Strings</TITLE>
> </HEAD>
> <BODY>
> <?php /* This page receives and handles
> the data generated by "ullmanform.html". */
> 
> $FirstName = trim($FirstName);
> $LastName = trim($LastName);
> $Email = trim($Email);
> $Comments = trim($Comments);
> $Name = $FirstName . " " . $LastName;
> print ("Your name is $Name.<BR>\n");
> print ("Your E-mail address is $Email.<BR>\n");
> print ("This is what you had to say:<BR>\n $Comments<BR>\n");
> $CryptName = crypt($Name);
> print ("<P>This is the crypt() version of your name: $CryptName\n");
> ?>
> </BODY>
> </HTML>
> ..............
> 
> 
> Fatal error: Call to undefined function: crypt()
> in c:\program files\apache group\apache\htdocs\ullmanpassword2.php
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
Greg wrote in message:
> I believe you need to have mcrypt installed.
> -Greg

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

Not sure what mcrypt is.

Please advise.

In Ullman's textbook, it says that decrypt() and encrypt(0 fuctions will not
work if PHP is not installed as a module.

However, in his example in the book, it was with crypt().

It does seem to work by calling the md5() function.

TR



--- End Message ---
--- Begin Message ---
At 10:46 12.02.2003, Shams said:
--------------------[snip]--------------------
>i've written a secure PHP login script which will allow users to login to a
>directory such as this:
>
>smezone.com/members/index.php
>
>however, how do I restrict people from accessing HTML files in that
>directory (which they can easily do so by typing the URL into their
>browser), such as:
>
>smezone.com/members/document1.html
>
>?
>
>Since its a regular HTML files (and we have lots), I can't check whether the
>user has a valid session as I would do in a PHP file.
--------------------[snip]-------------------- 

If you have access to the servers directory structure (and either shell
access or a helpful admin) you could also consider a different approach by
moving the files outside the webservers path and including them in your
access script.

BEFORE (assumed)
    /~shams
    /~shams/www
    /~shams/www/members

now, do
    cd /~shams
    mkdir www.members
    mv -r www/members/* www.members
    # and make sure that the http process has read permission on files,
    # and read/execute permission on directories and subdirs

so we have AFTER
    /~shams
    /~shams/www.members   <-- not accessible via http
    /~shams/www           <-- webserver root folder 

In your login script, you would then (after a valid login check)
    $file = '../www.members/' . $_REQUEST['file'];
    $hf = fopen($file);
    if ($hf) {
        echo fread($hf, filesize($file));
        fclose($hf);
    }
    else die 'cannot open file ' . $_REQUEST['file'];

assuming you pass the requested filename via a "file" parameter, which you
could easily accomplish by using either ErrorDocument or mod_rewrite in
your apache config.

HTH,


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/


--- End Message ---
--- Begin Message ---
At 14:31 12.02.2003, Tim Burgan said:
--------------------[snip]--------------------
>The problem is that I don't know what my USERNAME or PASSWORD for MyDQL are.
>How do I find this information out?
--------------------[snip]-------------------- 

You need to ask your SysAdmin...


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/


--- End Message ---
--- Begin Message ---
At 16:14 12.02.2003, Greg Luce said:
--------------------[snip]--------------------
>Could anyone recommend a fast track for learning php for an experienced
>ColdFusion developer? I'm working my way through the tutorials on
>php.net and free2code.net, but they seem pretty kindergarten. Any
>advice?
--------------------[snip]-------------------- 

Well, when I made my move to PHP (coming from Tango you probably know,
being a CF guy) I was successful by simply eating the online docs. They
have good value (not perfect, but...) and sometimes very interesting user
comments.

When I found some snippets I liked I simply tried them out and played
around with the code. Got up and running in less than a week.


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/


--- End Message ---
--- Begin Message ---

I am looking into installing PEAR on my production server running 4.3.

Are there any PEAR security issues to be concerned about?



-- 
Mike Yrabedra
President

323 Enterprises 
Home of The MacDock and The MacSurfshop
[http://macdock.com] : [http://macsurfshop.com]
VOICE: 770.382.1195
iChat/AIM: ichatmacdock
_______________________________________________________________________
"in all your ways acknowledge Him and He will direct your paths."
Proverbs 3:6 NIV
<{{{><
--


--- End Message ---
--- Begin Message ---
Is this a real bug, or am I just doing something stupid?  :-)

Thanks!
Shawn

> Seems that var_export() strips slashes from my array keys even though the
> docs say that it returns valid PHP code. This is bad if I want to use $b
> below to define another array, gives a parse error on the single quote in
> the key.
>
> $a = array('it\'s here' => 'single, \' double "');
> $b = var_export($a, TRUE);
> echo $b;
>
> Displays:
> array ( 'it's here' => 'single, \' double "', )
>
> And:
> $c = eval($b);
>
> generates a parse error in the eval'ed code.
>
> Any help???
>
> TIA,
> -Shawn
>
>
>


--- End Message ---
--- Begin Message ---
Hi there,

I'm moving an application from Windows -> Linux, and am having a problem
with the database. I have the following script to test my database
connection (Linux):
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

$connection = mysql_connect("localhost","","") or die ("Couldn't
connect.");
$dbs = mysql_list_dbs($connection) or die("Couldn't list databases.");
$db_list = "<ul>";
$i = 0;
while ($i < mysql_num_rows($dbs))
{
   $db_names[$i] = mysql_tablename($dbs,$i);
   $db_list .= "<li>$db_names[$i]</li>";
   $i++;
}

$db_list .= "</ul>";
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

This works fine and displays:
   * mysql
   * sasdap
   * test
   * testDB


However, the code that I developed under Windows doesn't work in Linux:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

function db_connect()
{
        // the connection string (host, user, password)
        $result = mysql_pconnect("localhost", "", "");

        if (!$result)
                return false;

        if (!mysql_select_db("sasdap"))
                return false; // false is returned!

        return $result;
}
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Which is called like so:
   // connect to db
   $conn = db_connect();
   if (!$conn)
     return 0;

Any thoughts on why this is happening?


--- End Message ---
--- Begin Message ---
Lee P. Reilly wrote:

Hi there,

I'm moving an application from Windows -> Linux, and am having a problem
with the database. I have the following script to test my database
connection (Linux):
-=-=-=-=-=-=-=-=-=-=-=-=-=- snip =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

I'd put in a mysql_error() and see what the error message is. The username/password could be different. There were some posts here a while ago about problems with mysql_pconnect(), I don't know if they may be relevant but you could have a look through the archives and see.

HTH
Chris

--- End Message ---
--- Begin Message ---
Your MySQL servers may be set to refuse anonymous connections.

Mike


"Chris Hewitt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Lee P. Reilly wrote:
>
> >Hi there,
> >
> >I'm moving an application from Windows -> Linux, and am having a problem
> >with the database. I have the following script to test my database
> >connection (Linux):
> >-=-=-=-=-=-=-=-=-=-=-=-=-=- snip
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >
> I'd put in a mysql_error() and see what the error message is. The
> username/password could be different. There were some posts here a while
> ago about problems with mysql_pconnect(), I don't know if they may be
> relevant but you could have a look through the archives and see.
>
> HTH
> Chris
>


--- End Message ---
--- Begin Message ---
I am trying to ftp_get($con,"/tmp/download.tmp","/remote/file
dir/file.txt",FTP_ASCII).  I am getting errors because of the space in the
remote filename.  I tried using "/remote/file\ dir/file.txt" as the
filename, but that also fails.  I also tried to ftp_chdir() to the directory
first and get file.txt to no avail.  Does anyone have any ideas on how to
GET a file that is in a directory with a space in it?

-Chris

--- End Message ---
--- Begin Message ---
Chris,

Wouldn't work if you urlencode the path to the file?

Something like:

ftp_get($con,"/tmp/download.tmp", urlencode("/remote/file dir/file.txt"), FTP_ASCII)

THT
--
Un gran saludo/Big regards...
   Arturo Barajas, IT/Systems PPG MX (SJDR)
   (427) 271-9918, x448

> -----Original Message-----
> From: Muti [mailto:[EMAIL PROTECTED]]
> Sent: Miércoles, 12 de Febrero de 2003 05:17 p.m.
> To: [EMAIL PROTECTED]
> Subject: [PHP] ftp_get()
> 
> 
> I am trying to ftp_get($con,"/tmp/download.tmp","/remote/file
> dir/file.txt",FTP_ASCII).  I am getting errors because of the 
> space in the
> remote filename.  I tried using "/remote/file\ dir/file.txt" as the
> filename, but that also fails.  I also tried to ftp_chdir() 
> to the directory
> first and get file.txt to no avail.  Does anyone have any 
> ideas on how to
> GET a file that is in a directory with a space in it?
> 
> -Chris
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
Hi,

Thursday, February 13, 2003, 9:17:17 AM, you wrote:
M> I am trying to ftp_get($con,"/tmp/download.tmp","/remote/file
M> dir/file.txt",FTP_ASCII).  I am getting errors because of the space in the
M> remote filename.  I tried using "/remote/file\ dir/file.txt" as the
M> filename, but that also fails.  I also tried to ftp_chdir() to the directory
M> first and get file.txt to no avail.  Does anyone have any ideas on how to
M> GET a file that is in a directory with a space in it?

M> -Chris


Try escaping it $dir = "/remote/file\ dir/";

-- 
regards,
Tom

--- End Message ---
--- Begin Message --- Hi guys,

Having a problem here getting php4.3 to compile with pspell. I have the new aspell (aspell-0.50.2) installed, and according to the aspell site, aspell and pspell are now one. Php configures fine, but durning make, I get these errors....

-lcrypt -lresolv -lm -ldl -lnsl -lcrypt -o sapi/cli/php
ext/mysql/libmysql/my_tempnam.o: In function `my_tempnam':
/usr/local/src/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of `tempnam' is dangerous, better use `mkstemp'
ext/pspell/pspell.o: In function `zif_pspell_new':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:129: undefined reference to `new_pspell_config'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:131: undefined reference to `pspell_config_replace'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:136: undefined reference to `pspell_config_replace'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:143: undefined reference to `pspell_config_replace'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:150: undefined reference to `pspell_config_replace'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:165: undefined reference to `pspell_config_replace'
ext/pspell/pspell.o:/usr/local/src/php-4.3.0/ext/pspell/pspell.c:170: more undefined references to `pspell_config_replace' follow
ext/pspell/pspell.o: In function `zif_pspell_new':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:174: undefined reference to `new_pspell_manager'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:175: undefined reference to `delete_pspell_config'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:177: undefined reference to `pspell_error_number'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:178: undefined reference to `pspell_error_message'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:182: undefined reference to `to_pspell_manager'
ext/pspell/pspell.o: In function `zif_pspell_new_personal':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:206: undefined reference to `new_pspell_config'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:209: undefined reference to `pspell_config_replace'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:210: undefined reference to `pspell_config_replace'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:213: undefined reference to `pspell_config_replace'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:218: undefined reference to `pspell_config_replace'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:225: undefined reference to `pspell_config_replace'
ext/pspell/pspell.o:/usr/local/src/php-4.3.0/ext/pspell/pspell.c:232: more undefined references to `pspell_config_replace' follow
ext/pspell/pspell.o: In function `zif_pspell_new_personal':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:256: undefined reference to `new_pspell_manager'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:257: undefined reference to `delete_pspell_config'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:259: undefined reference to `pspell_error_number'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:260: undefined reference to `pspell_error_message'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:264: undefined reference to `to_pspell_manager'
ext/pspell/pspell.o: In function `zif_pspell_new_config':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:291: undefined reference to `new_pspell_manager'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:293: undefined reference to `pspell_error_number'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:294: undefined reference to `pspell_error_message'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:298: undefined reference to `to_pspell_manager'
ext/pspell/pspell.o: In function `zif_pspell_check':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:326: undefined reference to `pspell_manager_check'
ext/pspell/pspell.o: In function `zif_pspell_suggest':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:362: undefined reference to `pspell_manager_suggest'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:364: undefined reference to `pspell_word_list_elements'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:367: undefined reference to `pspell_string_emulation_next'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:368: undefined reference to `delete_pspell_string_emulation'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:370: undefined reference to `pspell_manager_error_message'
ext/pspell/pspell.o: In function `zif_pspell_store_replacement':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:399: undefined reference to `pspell_manager_store_replacement'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:400: undefined reference to `pspell_manager_error_number'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:403: undefined reference to `pspell_manager_error_message'
ext/pspell/pspell.o: In function `zif_pspell_add_to_personal':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:436: undefined reference to `pspell_manager_add_to_personal'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:437: undefined reference to `pspell_manager_error_number'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:440: undefined reference to `pspell_manager_error_message'
ext/pspell/pspell.o: In function `zif_pspell_add_to_session':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:473: undefined reference to `pspell_manager_add_to_session'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:474: undefined reference to `pspell_manager_error_number'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:477: undefined reference to `pspell_manager_error_message'
ext/pspell/pspell.o: In function `zif_pspell_clear_session':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:504: undefined reference to `pspell_manager_clear_session'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:505: undefined reference to `pspell_manager_error_number'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:508: undefined reference to `pspell_manager_error_message'
ext/pspell/pspell.o: In function `zif_pspell_save_wordlist':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:535: undefined reference to `pspell_manager_save_all_word_lists'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:537: undefined reference to `pspell_manager_error_number'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:540: undefined reference to `pspell_manager_error_message'
ext/pspell/pspell.o: In function `zif_pspell_config_create':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:562: undefined reference to `new_pspell_config'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:564: undefined reference to `pspell_config_replace'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:569: undefined reference to `pspell_config_replace'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:576: undefined reference to `pspell_config_replace'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:583: undefined reference to `pspell_config_replace'
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:589: undefined reference to `pspell_config_replace'
ext/pspell/pspell.o:/usr/local/src/php-4.3.0/ext/pspell/pspell.c:619: more undefined references to `pspell_config_replace' follow
ext/pspell/pspell.o: In function `php_pspell_close':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:87: undefined reference to `delete_pspell_manager'
ext/pspell/pspell.o: In function `php_pspell_close_config':
/usr/local/src/php-4.3.0/ext/pspell/pspell.c:94: undefined reference to `delete_pspell_config'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

--- End Message ---
--- Begin Message ---
I enabled output comression in php.ini with

zlib.output_compression = On
zlib.output_compression_level = -1

also, I loaded the gzip module in httpd.conf with

LoadModule gzip_module modules/mod_gzip-1.3.19.1a.so

Now, when I restart Apache, I get compressed output. But after an hour or so
Apache stops compressing the output and sends it uncompressed.

I check compression with phpinfo() and also by plain browsing the difference
in speed is obvious.

Any ideas what could cause this???

Any input appreciated!

-Zavier


--- End Message ---
--- Begin Message ---
I'm trying to piece apart someone's code to see exactly what it is they're
trying to do - This code was written for PHP 3.x, so it's not quite as
nice as 4 (with $_POST, $_GET, $_SESSION, etc).  There's this one part in
particular that I have no idea what's trying to be done:

if (isset ($cookie)) {
   while (list ($name, $value) = each ($cookie)) {
      $$name = $value;
    }
}

I'm assuming the $cookie array has cookie info stored in it, and it's
trying to pull the data out of the array.  The 2 parts of this I don't
really understand are lines 2 and 3, 3 in particular.  I'm guessing it's
assigning $name the index, $value the element - What's really stumping me
here though is the $$name = $value.  What is a variable with $$ in front
of it signify, and what is this trying to do?  Any thoughts on this one?
Thanks.



--- End Message ---
--- Begin Message ---
Check the manual for sure, but assuming:

$cookie = array("foo" => "bar", "red" => "blue")

once this is done you'll have the following variable defined:

$foo = "bar";
$red = "blue";

I think that's how it works anyway.

On Wed, 12 Feb 2003 [EMAIL PROTECTED] wrote:

> I'm trying to piece apart someone's code to see exactly what it is they're
> trying to do - This code was written for PHP 3.x, so it's not quite as
> nice as 4 (with $_POST, $_GET, $_SESSION, etc).  There's this one part in
> particular that I have no idea what's trying to be done:
>
> if (isset ($cookie)) {
>    while (list ($name, $value) = each ($cookie)) {
>       $$name = $value;
>     }
> }
>
> I'm assuming the $cookie array has cookie info stored in it, and it's
> trying to pull the data out of the array.  The 2 parts of this I don't
> really understand are lines 2 and 3, 3 in particular.  I'm guessing it's
> assigning $name the index, $value the element - What's really stumping me
> here though is the $$name = $value.  What is a variable with $$ in front
> of it signify, and what is this trying to do?  Any thoughts on this one?
> Thanks.
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Ok, but what does the $$name signify?  Looking on php.net I couldn't find
anything regarding it.  Maybe I'm looking in the wrong place?

On Wed, 12 Feb 2003, Philip Hallstrom wrote:

> Check the manual for sure, but assuming:
>
> $cookie = array("foo" => "bar", "red" => "blue")
>
> once this is done you'll have the following variable defined:
>
> $foo = "bar";
> $red = "blue";
>
> I think that's how it works anyway.
>
> On Wed, 12 Feb 2003 [EMAIL PROTECTED] wrote:
>
> > I'm trying to piece apart someone's code to see exactly what it is they're
> > trying to do - This code was written for PHP 3.x, so it's not quite as
> > nice as 4 (with $_POST, $_GET, $_SESSION, etc).  There's this one part in
> > particular that I have no idea what's trying to be done:
> >
> > if (isset ($cookie)) {
> >    while (list ($name, $value) = each ($cookie)) {
> >       $$name = $value;
> >     }
> > }
> >
> > I'm assuming the $cookie array has cookie info stored in it, and it's
> > trying to pull the data out of the array.  The 2 parts of this I don't
> > really understand are lines 2 and 3, 3 in particular.  I'm guessing it's
> > assigning $name the index, $value the element - What's really stumping me
> > here though is the $$name = $value.  What is a variable with $$ in front
> > of it signify, and what is this trying to do?  Any thoughts on this one?
> > Thanks.
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
At 03:49 13.02.2003, [EMAIL PROTECTED] said:
--------------------[snip]--------------------
>Ok, but what does the $$name signify?  Looking on php.net I couldn't find
>anything regarding it.  Maybe I'm looking in the wrong place?
--------------------[snip]-------------------- 

In the example Philip gave, $name resolves to "foo", so $$name will
reference the variable named "$foo". This is called "variable variables"
and can be found in the manual at
http://www.php.net/manual/en/language.variables.variable.php.


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/


--- End Message ---
--- Begin Message ---
Marek Kilimajer wrote:
use
chmod 755 directory
on each directory that is in the way to your file

I tried that, too. Didn't help.

Here is the code, stripped to the original, straight from the tutorial. And I can't get it work. What's wrong here?


$somecontent = 'PERKELE\n';
$filename = 'teksti.txt';
$handle = fopen($filename, 'wb');
fwrite($handle, $somecontent);
fclose($handle);

I've tried this in two totally different servers, tomorrow I'll try on the third one.

All help absolutely welcome!

Paul Dunkel
--
pdunkel.nic.fi

--- End Message ---
--- Begin Message ---
Hi,

I'm using IIS on win2k.

Joe Njeru


--- End Message ---
--- Begin Message ---
I hear GD is included in 4.3. What does it all
support? Does it support gif?

Joseph



__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
--- End Message ---
--- Begin Message ---
This one time, at band camp,
Joseph Bannon <[EMAIL PROTECTED]> wrote:

> I hear GD is included in 4.3. What does it all
> support? Does it support gif?

read only gif support
http://www.php.net/manual/en/ref.image.php

Kevin

-- 
 ______                              
(_____ \                             
 _____) )  ____   ____   ____   ____ 
|  ____/  / _  ) / _  | / ___) / _  )
| |      ( (/ / ( ( | |( (___ ( (/ / 
|_|       \____) \_||_| \____) \____)
Kevin Waterson
Port Macquarie, Australia
--- End Message ---
--- Begin Message --- Newbie question:

I try to modify a txt-file but get "not writable" error.
(just like in http://www.php.net/manual/en/function.fwrite.php )

Here is the code, stripped to the original, straight from the tutorial. And I can't get it work. What's wrong here?

$somecontent = 'PERKELE\n';
$filename = 'teksti.txt';
$handle = fopen($filename, 'wb');
fwrite($handle, $somecontent);
fclose($handle);

I've tried this in two totally different servers, today I'll try on the third one.

All help absolutely welcome!

Paul Dunkel
--
pdunkel.nic.fi

--- End Message ---
--- Begin Message --- Hello,
I created a PHP page that included cookie, here is the PHP code:
<?php
if (isset($HTTP_POST_VARS['Name'])) {
setcookie("Name", $HTTP_POST_VARS['Name'], time()+86400*10);
}
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>

<body>
<form name="form1" method="post" action="request.php">
<p>Name: <input name="Name" type="text" id="Name">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
</body>
</html>

But when I called the cookie variable in another page, it showed "Notice: Undefined index: Name in....". Here is the PHP code in another page:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>

<body>
HI!! <?php echo $HTTP_COOKIE_VARS['Name']; ?> </body>
</html>

Any problems in my PHP pages? How to solve it?
THANKS!!
Terry



_________________________________________________________________
MSN ¬Ûï´£¨Ñ±z³Ì²³æªº¤è¦¡¤À¨É¨Ã¦C¦L±zªº¬Û¤ù¡A½Ð²¾¦Ü : http://photos.msn.com.hk/support/worldwide.aspx
--- End Message ---

Reply via email to