php-general Digest 29 Dec 2001 13:44:47 -0000 Issue 1080

Topics (messages 78988 through 79013):

Including files & variables ...
        78988 by: Evansville Scene
        78989 by: Bogdan Stancescu
        78996 by: Dennis Moore

WebServer
        78990 by: rick
        78991 by: Miles Thompson

Re: PEAR vs PHPLIB
        78992 by: Manuel Lemos

Session troubles
        78993 by: Sean LeBlanc

Re: Security bulletin?
        78994 by: David

could not create new mailbox: Permission denied
        78995 by: gaukia 345

Licensing??
        78997 by: Andrew V. Romero
        78998 by: Bogdan Stancescu
        78999 by: Rasmus Lerdorf
        79000 by: Bogdan Stancescu
        79001 by: Matthew Walker

Which is which??
        79002 by: Gerard Samuel

Formats with PHP
        79003 by: Steve Maroney
        79009 by: DL Neil

WYSIWYG editors for HTML
        79004 by: Dennis Gearon

Control Panel , Webmin or similar Written in PHP
        79005 by: rick
        79006 by: rick

Re: concurrent users
        79007 by: Björn Schotte

NNTP
        79008 by: Kris
        79012 by: Serge Yatsenko

Windows 2000 Browse/upload problem
        79010 by: Ben Edwards

Re: protecting your php code from other peeping toms?
        79011 by: Ben Edwards

File upload memory useage.
        79013 by: Jim Broughton

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 ---
I'm having problems passing variables into included PHP files.  How can I do this?
--- End Message ---
--- Begin Message ---
I may be repeating myself -- use the Nike solution: just do it! :-)

Global variables are implicitly passed to includes. Please provide more info if that's
not the case (not globals/globals somehow not being passed).

Bogdan

Evansville Scene wrote:

> I'm having problems passing variables into included PHP files.  How can I do this?

--- End Message ---
--- Begin Message ---
Make sure you include the tags <?php  ?> in your include file for PHP
parsing.  Included files are assumed to be text otherwise.  You need to
provide more information if you have another problem.



----- Original Message -----
From: "Evansville Scene" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 9:54 PM
Subject: [PHP] Including files & variables ...


I'm having problems passing variables into included PHP files.  How can I do
this?


--- End Message ---
--- Begin Message ---
 
Dear Members  ,

                          Does anybody of you have a webserver at home 
using ADSL or other connections ?

If any , could you tell me What would be the acceptable Hardware to run 
5 or more sites  at home with an
256 k ADSL ? (Memory , proccesor , etc etc )


Do I have to have Two Servers ? (The WebServer ) and the Intranet Server 
to access through my computer ?

Would you help me please in a near future with a few questions about how 
to set up and so on .....???


Thanks  guys in advance

Ricardo


--- End Message ---
--- Begin Message ---
Rick,

Comments intersperesed below ...
On Friday 28 December 2001 09:30 am, rick wrote:
> Dear Members  ,
>
>                           Does anybody of you have a webserver at home
> using ADSL or other connections ?

The answer is "that depends" For example my telco has me behind their own firewall, 
and the IP number my NIC is seeing is 10.38.73.5 but the outside world sees as
142.177.238.56. Ah, the magic of NAT.

This can be overcome by using one of the, for lack of a better term, IP aliasing 
services, 
like dynamicdns.org.  Their software constantly monitors the IP you come from and 
maintains
a routing table. Thus someone looking for www.mysite.ca, would first of all be 
directed to them, 
and then to my IP.

If you are fortunate enough to have a fixed IP number, the above is moot.

>
> If any , could you tell me What would be the acceptable Hardware to run
> 5 or more sites  at home with an
> 256 k ADSL ? (Memory , proccesor , etc etc )

Depends on traffic and what you're serving and the level of traffic. If mostly static 
web 
pages, almost anything from a P100 on up. RAM is always good. Many phone companies
meter traffic and allow only so many free gigabytes permonth, then they start 
charging. 

If you're not supposed to be running a web server on your connection, that's how 
they'll find you.

> Do I have to have Two Servers ? (The WebServer ) and the Intranet Server
> to access through my computer ?

This is really off  topic for the list, and better addressed through a security site. 
Do a Google
search on "firewall DMZ" and you will find some very comprehensive articles, ranging 
from
general overviews to specific recommendations.

Generally the stuff at risk is on the web server and beyond, or on, your firewall 
machine. 
Important stuff is behind the firewall. 
>
> Would you help me please in a near future with a few questions about how
> to set up and so on .....???

That's not really PHP specific, and would be better addressed on a security or 
webserver
list. (Note how apolitical I'm being, not assuming you are using Linux or BSD and 
Apache.)

> Thanks  guys in advance

You're welcome. There is some really good stuff out there.

Miles Thompson
--- End Message ---
--- Begin Message ---
Hello,

Mark Charette wrote:
> 
> > From: Manuel Lemos [mailto:[EMAIL PROTECTED]]
> > Unlike PEAR-DB and PHPlib, Metabase provides true database independence
> > to your applications.
> 
> Actually - no. Querys/conformance to specs/sequences/stored procs and more
> are different from DB to DB. While the abstration layers help a little, they
> really don't help a lot.

If you want to write applications that take advantage of things that are
specific to one database, database abastraction layers are of no user to
you.

Although if you give up on some things, you can write database
independent applications making them more maintainable and take less
time to release them letting you reach a broader market. It is a
strategy that may worthy a lot of money if you run a software company.
For instance, Siebel CRM packages AFAIK does not use stored procedures
to be able to reach a wider market in less time.

Anyway, back to PHP database abstraction packages, Metabase abstracts
things that are possible to provide in a portable way, like data type
mapping, and even things that others have been copying like sequences
and limiting the range of rows that are returned by a select query which
are important things for Web development. Metabase also abstracts
database schema installation and maintenance which is a real time saver.

Regards,
Manuel Lemos
--- End Message ---
--- Begin Message ---
I asked this on php-install list, but got no response so here goes...

I simply cannot get session to work correctly. Here's the test script:

include("incl.php");
session_start();
$mine++;
session_register("mine");
echo $mine;

incl.php includes code to save/retrieve session information to/from DB.  It
calles session_set_save_handler at the end.

What happens is I get an error because it is trying to read the variable out
and I get a DB error, but my session writing routine is never called...I
know, because I have a print in there. And of course, the var doesn't
increment upon refreshes - it remains 1.

I've seen this before, and it was fixed, but I forget how it was done, as I
didn't actually implement the solution (I hear and I forget, I do and I
remember, I guess). About my system:

FreeBSD 4.4
Apache 1.3.20
PHP 4.0.6

Any and all help appreciated.


-- 
Sean LeBlanc:[EMAIL PROTECTED] Yahoo:seanleblancathome 
ICQ:138565743 MSN:seanleblancathome AIM:sleblancathome 
A billion hours ago, human life appeared on earth. A billion minutes ago, 
Christianty emerged. A billion Coca-Colas ago was yesterday morning. 
-1996 Coca-Cola Company annual report 
Management QOTD:No one doubts that we should right size and analyze progress
on the market forces.

--- End Message ---
--- Begin Message ---
 this is a great idea, maybe the admins can setup a php.security or something like 
that?

>Hello everybody! 
>
>Apart from the usual best wishes for 2002, I have a >question: does 
>anyone know of a good security list/newsletter/bulletin >for PHP? 
>Actually, any kind of good source would be great, even if >it\'s net 
>security in general -- what I\'m looking for is: 
>1. Mostly PHP security (including PHP packages with >vulnerabilities) 
>and 
>2. A good source (I\'d like to subscribe to an active 
>list/newsletter/bulletin so they publish info from other >sources as well 
>-- not only original data they found out without any >external info). 
>
>Too much to ask? :-) 
>
>Bogdan 
--- End Message ---
--- Begin Message ---
I'm new to cyrus IMAP server and PHP4. I wanted to create a user for cyrus.
So I copied & modified the example of imap_createmailbox at
http://www.php.net/manual/en/function.imap-createmailbox.php
It was done with necessary substitution of for IMAP server and using "cyrus"
as user.

The error message was
Newname will be 'phpnewbox'
could not create new mailbox: Permission denied

I logged in as cyrus on the server I'm working on. I typed "cyradm" but this
error message came out

Can't locate Cyrus/IMAP/Shell.pm in @INC (@INC contains:
/usr/lib/perl5/5.6.0/i5
86-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i586-linux
/usr/lib
/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .).
BEGIN failed--compilation aborted.

Could the problem be the misconfig of IMAP server. Pls advise. Thanx.

Gaukia



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

--- End Message ---
--- Begin Message ---
I am looking into installing php on some of our hospital servers and was
wondering about licensing issues.  Are you suppose to purchase any type
of license for installing php on a commercial server?  It seems a little
on the strange side that they (the php people) would just let you
install and use their product for free, what do they get out of it?
Thanks for any information,
    Andrew V. Romero

--- End Message ---
--- Begin Message ---
LOL! You may want to read this for clarification:
http://www.gnu.org/philosophy/free-sw.html

Bogdan

"Andrew V. Romero" wrote:

> what do they get out of it?

--- End Message ---
--- Begin Message ---
Well, PHP is not under the GPL.  But you still don't need to buy any sort 
of license.

-Rasmus

On Sat, 29 Dec 2001, Bogdan Stancescu wrote:

> LOL! You may want to read this for clarification:
> http://www.gnu.org/philosophy/free-sw.html
> 
> Bogdan
> 
> "Andrew V. Romero" wrote:
> 
> > what do they get out of it?
> 
> 
> 

--- End Message ---
--- Begin Message ---
Ok, I was misled by the manual copyright at
http://www.php.net/manual/en/copyright.php -- anyway, it's the same sprit, I
believe.

Bogdan

Rasmus Lerdorf wrote:

> Well, PHP is not under the GPL.  But you still don't need to buy any sort
> of license.

--- End Message ---
--- Begin Message ---
Welcome to the world of free software.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-----Original Message-----
From: Andrew V. Romero [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 28, 2001 9:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Licensing??

I am looking into installing php on some of our hospital servers and was
wondering about licensing issues.  Are you suppose to purchase any type
of license for installing php on a commercial server?  It seems a little
on the strange side that they (the php people) would just let you
install and use their product for free, what do they get out of it?
Thanks for any information,
    Andrew V. Romero


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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001
 
--- End Message ---
--- Begin Message ---
I got a fairly big script with a lot of functions.
Which is more effiecient to pass global information to functions

ie
50 variables
50 constants
or 1 array with 50 values

Thanks

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


Hey guys,

Im need to generate an email and Im trying  to keep the  exact spacing
I use when I define the body of the email. When the email is sent and i
view it with Outlick Express or simply use Pine, the spacing is all out
of wack. (Too many spaces here, not enough spaces there)

I think i need something like  Perl's Format features but not sure.

Any advice ?


Thank you,
Steve Maroney




--- End Message ---
--- Begin Message ---
Hey Steve,

> Im need to generate an email and Im trying  to keep the  exact spacing
> I use when I define the body of the email. When the email is sent and i
> view it with Outlick Express or simply use Pine, the spacing is all out
> of wack. (Too many spaces here, not enough spaces there)
>
> I think i need something like  Perl's Format features but not sure.
>
> Any advice ?


Is this a plain text email message or MIME encoded, eg HTML? If the former, then the 
spaces have been inserted
by 'authoring' program. If by spacing you are referring to vertical spacing/wrapping, 
then that is limited by
some email clients.

Have you ECHOed the message body prior to message transmission to verify when/where 
the spaces are
added/subtracted?

=dn

--- End Message ---
--- Begin Message ---
What WYSIWYG editors are you guys using with PHP templates? I'd like to
layout pages, frames, multiple levels of graphics with a WYSIWYG editor.

I looked at an online template from the macromedia site, and it is
completely unformatted and has some unprintable character in it at every
<b>. It is completely useless for putting PHP template information in. I
don't know if their program 'dreamweaver' actually MAKES the templates
that way. I'm downloading their trial version as I type, (24 meg
COMPRESSED!) They also obfuscate, or use incomprehensible jargon for
every single action to make people be in their own mind set. Everything
from ftp'ing, to graphic insertion has a 'macromedia name'. I'll play
with it, but so far, from the help links on their site, I'm not
impressed. They did get THE BEST REVIEW from WebMonkey though.

Any advice on this would be much appreciated. I am sick and tired of
hand coding HTML. It is FAR from logical. That's why I like php, good
logic, power, and flexibility. Usually, it does what I tell it to, DAMN
IT! Not HTML, though.
-- 
-----------------------------------------------------------------
Look lovingly upon the present,
for it holds the only things that are forever true.
-----------------------------------------------------------------
How many Microsoft programmers does it take to screw in a light bulb?
None. Let's define darkness as the new industry standard
-----------------------------------------------------------------
                                Sincerely, Dennis Gearon (Kegley)
--- End Message ---
--- Begin Message ---
Hi  guys , 


             I was Wondering if it would be possible to write a proyect like Control 
Panel or  WebMin (both are in Perl ) using  PHP instead or PERL ? 

Would it be possible ? 

PHP has the power and flexibility like Perl to write TRUE Systems programs that
could be able to manage all the aspects related to System Administration ?? 

If there any proyect I would like to hear about it and join it . 

Thanks , I would like your opinion about this topic . 

Ger Karcher 




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


             I was Wondering if it would be possible to write a proyect like Control 
Panel , WebMin (both are in Perl ) using PHP instead of PERL ? 

Would it be possible ? 

PHP has the power and flexibility like Perl to write TRUE Systems programs that
could be able to manage all the aspects related to System Administration ?? 

If there any proyect I would like to hear about it and join it . 

Thanks , I would like your opinion about this topic . 

Ger Karcher 



--- End Message ---
--- Begin Message ---
* Jamie Fields wrote:
> toward PHP.  The one thing I really need to know is how many concurrent
> users PHP can handle at one time.

That depends on your application. With intelligent caching
on the user level (i.e. caching HTML output in the file system)
there are some PHP applications who can handle 17 reqs/s
easily. I'm sure there are also PHP applications who can handle
more reqs/s.

If that doesn't suit you, then you can deploy caching systems
on the ZendEngine level, i.e. tools like PHP Accelerator (free),
APC Cache (free) or the commercial ZendAccelerator.

Finally, if this isn't enough, you should scale by hardware.

Furthermore you should be aware of that tuning PHP is not the
only thing you have to do. Most bottlenecks are the database
you use (i.e. wrong table design, no indexes on relevant fields
etc.) and finally you should drive into tuning your webserver.

For MySQL you should try to use HEAP tables (tables that are
completely in RAM) when having many SELECTs.

If your website is delivering many static pictures (<img ...>),
then you should make a subdomain images.foobar.com. Put a small
webserver like thttpd on images.foobar.com and let it deliver
those images.

Don't use <img src="makemyimage.php?id=5"> because that creates
one PHP request per <img> Tag inside your HTML code. Instead, try
to cache your pictures in the filesystem (on the images.foobar.com
server) and let it be <img src="http://images.foobar.com/cachedimage5.jpg";>.

Have your eyes on the whole thing (webserver, DB, html code,
images, ...), not only on PHP when tuning.

If you need further consulting tips, send a private e-mail.

-- 
Sichere PHP Applikationen / Notfall-Consulting mit der
PHP Feuerwehr / Code inspection / Code rehearsal / API
Checkup.                       mailto:[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hi,

Does anyone know where these have gone, or have them archived somewhere?
Google hasn't cached them.

http://www.lerdorf.on.ca/nntp.phps
and
http://www.lerdorf.on.ca/nntp.php3

Alternatively, anyone who has/has done code to take the headers, and
only the headers, of posts in a newsgroup and whack them into (& update
with new entries) a database, that would be nice to save me the coding
time :-)



-- 
Kris | [EMAIL PROTECTED] | ICQ: 10537480
AIM: katticist | MSN: [EMAIL PROTECTED] | YIM: k_j_clarke
PGP: http://home.clara.net/kjclarke/pgpkeys.txt

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

take a look here:
http://www.vhconsultants.com/index.htm

--
Serge Yatsenko, web developer
http://www.design-n1.com


"Kris" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Does anyone know where these have gone, or have them archived somewhere?
> Google hasn't cached them.
>
> http://www.lerdorf.on.ca/nntp.phps
> and
> http://www.lerdorf.on.ca/nntp.php3
>
> Alternatively, anyone who has/has done code to take the headers, and
> only the headers, of posts in a newsgroup and whack them into (& update
> with new entries) a database, that would be nice to save me the coding


--- End Message ---
--- Begin Message ---
[Sorry if this is a re-post but I have been having some email problems and 
cant find original in the archive]

I have a PHP application that is working fine on my Windows 98 system but 
when I try it on my Windows 2000 setup (which has recently had PHP/MySQL 
installed) there is a problem.  When I post from a form with a Browse/File 
field when I check to see if the temp file exists it douse not.  This check 
is being done in the page being posted to. The strange thing is that the 
file the varable is set to is something like E:\WINNT\TEMP\phpD4.tmp and I 
thought PHP used tmp (E:\tmp is where the session data is held).

Any idea what is wrong.

Regards,
Ben

**************************************************************
* Ben Edwards                            +44 (0)7970 269 522 *
* 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   *
**************************************************************

--- End Message ---
--- Begin Message ---
On this front douse anyone know of any companies who will compile an app as 
I cant afford the compiler but will need to do this in the future.  Is it a 
stand alone and is it easy to install?

Ben

At 14:10 15/10/2001, ~~~i LeoNid ~~ wrote:
>On Sat, 13 Oct 2001 16:14:39 -0400 impersonator of [EMAIL PROTECTED]
>(Matthew Loff) planted &I saw in php.general:
> >
> >Are there any open source efforts to clone the Zend PHP compiler, so
> >that PHP scripts can be distributed in binary form?
> >
>I don't know of _common_ efforts in this direction. May be it is against
>open php policy:) (if i do a pre-processOR [not open], it 'll cost half of
>of zend's $$ - 1200/install:))
>
> >There is already the Win32 PHP compiler intended for PHP+GTK scripts...
> >
>No much use if it is only for windows. What/where it is and how $$, btw?
>In any case even it is exits for *unix also it should be in every PHP (say
>4) installment, which is unlikely.



--- End Message ---
--- Begin Message ---
 I am involved with creating a website (i am the systems guy not the 
website programmer) on an older computer, a p133 with 80meg of
ram. Since php is by default loaded with apache in the slackware
installation I have chosen.  I have told the website programmer that he
will have to use php for file uploads to the site as mod_perl is eats too 
much system ram. I have to have setup that will allow the uploading of some
fairly large files > 50mb 
Because this is NOT clear in the php manual on file
uploading I need to know if php uploads the file to a memory cache first 
then flushes the uploaded data to the chosen uploads directory or whether it
writes the file to disk as it is being uploaded?
 If it is the former I will have to look at another solution.

JIM

--- End Message ---

Reply via email to