[PHP] DESPERADED HELP NEEDED, PLEASE PLEASE PLEASE

2001-04-07 Thread Gustavo Vieira Goncalves Coelho Rios

Hi folks!

have anyone already used FastTemplate over php4 (with the necessary
patches applied) ?

I am facing error when using dymanic macros, have anyone experienced any
problem ?

Thanks a lot for your help!

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




[PHP] FastTemplate strange Error

2001-04-06 Thread Gustavo Vieira Goncalves Coelho Rios

Hi folks, i writing in order to get a simple problem i am facing with
FastTemplate PHP lib.

I am trying to get my template parsed, but when i access the url, i get
an error:

Warning: Undefined property: table in
/usr/home/grios/.public_html/php_inc/FastTemplate.inc on line 376
0 0
1 10
2 20
3 30
4 40
5 50
6 60
7 70
8 80
9 90


Here is my t.php:

?
require ("FastTemplate.inc");
 
$tpl = new FastTemplate("tpl");
 
$tpl-define(array("table" = "t.tpl"));
$tpl-define_dynamic("row", "table");
 
for ($i = 0; $i  10; $i++) {
$tpl-assign(array("NUMBER" = $i, "RESULT" = $i * 10));
$tpl-parse("ROWS", ".row");
}

$tpl-parse("MAIN", "table");
$tpl-FastPrint();
 
?


Here is my template t.tpl:

table

!-- BEGIN DYNAMIC BLOCK: row --
tr
td{NUMBER}/td
td{RESULT}/td
/tr
!-- END DYNAMIC BLOCK: row --

/table


Very simple, no? But what is wrong?
May some one in this mailing list help me?

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




Re: [PHP] PHP coding question

2001-04-06 Thread Gustavo Vieira Goncalves Coelho Rios

Rory O'Connor wrote:
 
 I'm not a real programmer, so I am wondering if anyone can help me translate
 this psuedo-code into php code:
 
 if ($page_num is a multiple of 8) {
 
 do this
 
 }
 
 If you want to know what I'm trying to do...
 I have a left frame showing a recordset of 8 records at a time.  the frame
 on the right shows the detail (more info) of one record at a time.  if the
 user clicks "next record" in the right frame and the record goes beyond the
 8 on the left, I want to be able to refresh the left frame to show the next
 8 records.
 
 Thanks!
 
 Rory
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


if ($page_num  15)
;
else {
do this
}


My best guess!

Tell me your results!

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

2001-03-01 Thread Gustavo Vieira Goncalves Coelho Rios

Would it be a good features if php had all programs executed with
system,exec,passthrouth and `program_name` wrapped by apache suexec ?

What you think about that ?

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




[PHP] security approach?

2001-03-01 Thread Gustavo Vieira Goncalves Coelho Rios

Hi folks!

I am facing a common problem, related to allowing my shell users to use
php. I would like to prevent them from forking process. How can this be
accomplished?

Is there any way to get the proccess creation wrapped by suexec?

-- 
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] wrapper (simple questions)

2001-03-01 Thread Gustavo Vieira Goncalves Coelho Rios

Is there any way to have process started by a php script wrapped by a
similar suexec utility (like in apache)?
Plans to support such a funcionality? When?

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




Re: [PHP] good ide?

2001-02-27 Thread Gustavo Vieira Goncalves Coelho Rios

Dan Cleveland wrote:
 
 A good ide specifically for PHP is being developed rather rapidly.  It's
 called PHP Studio and once version 2.0 is complete (should be within 2
 weeks) an announcement will be posted to this list.  Good luck until then
 
 Dan Cleveland
 PHP Studio Programmer
 
 --
 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]

Why not VIM?

VIM is a hell of editor!

-- 
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] mysql_info()

2001-02-25 Thread Gustavo Vieira Goncalves Coelho Rios

Am i wrong or php does not support mysql_info() function ?

Is there plans to support it?

thanks in advance!

-- 
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] C vs PHP

2001-02-24 Thread Gustavo Vieira Goncalves Coelho Rios

Hi folks!

I am a used C programmer and now my company decide to switch every non
performance critical web stuf to php. Since i am just a php beginner i
have some questions i could not find anywhere!

As you may know, C does not provide any kind of support for garbage
collection, every thing you want to be done you have to tell (in C) by
yourself. But in PHP i have no ideia about how it manages memory. for
instance:


In C:

str = (char *) malloc(10u);

if i decide to alloc new memory for str (just for explanation purposes),
and i do:

str = (char *) malloc(33u);

i would be in trouble, cause the reference for the previous allocated
pool of memory would be lost.
The approach could be to save the previous references or use realloc.

Now, my doubt: How PHP deals with this:

$query = "select * from apm where id=3";

/* do my processing */

/* and set query to a new string */

$query = "Query done without errors";


What will happen with the previous allocated memory for $query?
I don't like my application eating memory without releasing it after
they are no need any more.

May some one explain how to prevent such scenarios ?

Thanks a lot for your time and cooperation.

best regrads.

Gustavo Rios

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




Re: [PHP] Please help - File Uploads, 2nd try

2001-02-24 Thread Gustavo Vieira Goncalves Coelho Rios

Ed Lazor wrote:
 
 I upgraded my web server and now file uploads don't work.  A test script is
 listed below.  It puts the file on the server, but the file has
 
 Content-Type: image/pjpeg^M
 ^M
 
 pre-pended to it, thus breaking the file.  Do you know why it's doing this
 and how to fix it?
 

This happens because you are dealing with DOS text in a unix
environment.
You can use dos2unix utility in order to correct this problem. Remenber,
always transfer text files unix-dos-unix using ascii mode.

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

2001-02-22 Thread Gustavo Vieira Goncalves Coelho Rios

May some suggest a kick ass book on php?

Thanks a lot for your time and cooperation.

best regards,
Gustavo Rios


PS: Any one here from Brazil/South America ?

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

2001-02-22 Thread Gustavo Vieira Goncalves Coelho Rios

How may i prevent my users from reading others php scripts?

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




Re: [PHP] security

2001-02-22 Thread Gustavo Vieira Goncalves Coelho Rios

Javier Muniz wrote:
 
 Encode them, or set filesystem permissions in such a way (suggest using
 groups) to allow apache to read files but not other users.
 
 For instance, if your users are all members of the users group, and apache
 runs as nobody, then set your files to be owned by the user with the nobody
 group (chown user:nobody file) then set it to be readable by group, but
 not others (chmod 640 file).
 
 -jm
 
 -Original Message-
 From: Gustavo Vieira Goncalves Coelho Rios [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 21, 2001 9:15 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] security
 

Thanks, but i am considering such an approach! Isn't there any other way
out?
May i consider using php in a shell server environment a stupid thing to
do ? Since security is very critical in such environments!

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