[PHP] ImageTTFText Error

2001-01-17 Thread Gabriele Fain

Hello,
Did someone as experiences of crash when use ImageTTFText ?
I have a Linux Mandrake 7.2 with Php 4.0.4

Thanks

--
Gabriele Fain

Fineware snc - Vendita computer, produzione software e Hardware
EMail: mailto:[EMAIL PROTECTED]  http://www.fineware.it
Via Matteotti, 66 - 34071 Cormons (GO).
TEL +39-0481-630810FAX: +39-0481-630132



-- 
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] [PHP-DB] PHP+MySQL charset problem

2001-01-17 Thread Roman Serbski

Good day all!

Please help me with charset. I have some strange trouble.
I use FreeBSD 4.2 STABLE and MySQL 3.23.28-gamma (compiled from FreeBSD
ports) and PHP 4.04.
Latin1 is a default charset in MySQL. So, I wanted to add cp1251 or koi8_ru.
Ok, I add --default-character-set=cp1251 to my mysql start-up script.

The problem is:

If I connect from console to mysql and type \s (to get status information)
it shows: Language: cp1251
Everything seems OK, but if I try to connect via phpMyAdmin 2.1.0 or Horde
1.2.3+Imp 2.2.3 (webmail implementation) it returns -

<>
Warning: MySQL Connection Failed: Can't initialize character set 14 (path:
default) in /usr/local/www/htdocs/adm/lib.inc.php on line 255
Error

<>
Warning: Can't initialize character set 14 (path: default) in
/usr/local/lib/phplib/db_mysql.inc on line 73

I don't know where is my mistake? I tried to contact MySQL mailing list -
thay said this problem has nothing to do with MySQL.
I do have sql/share/charsets folder with Index and cp1251.conf. I checked
Index - records are OK.
Should I add something to /usr/local/lib/php.ini file?

Looking forward to hear from you.

Regards,
Roman


-- 
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] random no. between two numbers?

2001-01-17 Thread Angus Mann

At 23:24 16/01/01 -0800, Erick Papadakis wrote:
>hi,
>
>in php, how can i generate a random no. but between
>two numbers? for example, i need to generate any
>integer, randomly, between 1 and 1000.

Check out the manual entry for mt_rand. 
(http://www.php.net/manual/en/function.mt-rand.php) e.g. you could use 
mt_rand(1, 1000) - note that would you need to use mt_srand first to 
generate the seed for mt_rand.

HTH,

Angus.


-- 
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] please help: PHP4 + GD 1.8.3 + PNG

2001-01-17 Thread Neil Zanella


Hello,

I just finished upgrading my Red Hat 5.2 box from PHP3 to PHP4
with MySQL support and I also upgraded GD from 1.3 to 1.8.3
so that now I have according to  support
for both of them but I have the following problem. I pasted
the PNG code from the manual and tried to view the corresponding
PHP file with netscape but no image appeared and when I clicked
on view page source netscape just crashed. I don't know if this
is the problem but could it be that since I have both gd 1.3
and gd 1.8.3 installed that somehow PHP4 is finding the wrong
version of GD?

[nzanella@tulip nzanella]$ rpm -q gd
gd-1.3-6
gd-1.8.3-4
[root@tulip public_html]# rpm -e gd-1.3-6
error: removing these packages would break dependencies:
libgd.so.1 is needed by linuxconf-1.17r2-6
libgd.so.1 is needed by gnuplot-3.7.1-5

But PHP info says:

PHP Version 4.0.1pl2

gd

GD Support enabled
GD Version 1.6.2 or higher
FreeType Support   enabled
FreeType Linkage   with TTF library
PNG Supportenabled
JPG Supportenabled

Why am I having this problem? Is there a problem with the sample
code from the manual or did I misconfigure something? I did
not specify anything after the --with-gd flag since I did
not know whether to specify /usr/lib or /usr/include as my
gd installation directory as Red Hat (correctly) installs gd
files all over the place.

Thanks!

Neil

BTW, here is the PNG code from the manual:





-- 
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] Creating a text file

2001-01-17 Thread Wade Halsey

Hi

I have the following code in Delphi:
procedure TFormConfirmAllocation.CreateTxt;
var TxFile : TextFile;
 Buffer : string;
 x : integer;
begin

AssignFile(TxFile,'\SkyTrac.sky');


Rewrite(TxFile);

with FormConfirmAllocation.Query1  do begin
open;
while not Eof do begin
for x :=  0 to fields.Count - 1 do begin
Buffer := Fields[x].AsString;
Writeln(TxFile, Buffer);
end;
next;
end;
end;//with
CloseFile(TxFile);
end;

Now I want to create the same sort of thing in Php, could someone please help!
Thanks
Wade
[EMAIL PROTECTED]

 



[PHP] session_start() and cache problem ...

2001-01-17 Thread Samuel Tran

Hello everybody,

I have two websites that use Apache-1.3.12 + PHP-4.0.2 + Oracle8i on
Linux RedHat servers.

One of them doesn't use the session_start() function. If I do a telnet
on port 80 and type in "HEAD /  HTTP/1.0" I get the following :

HTTP/1.1 200 OK
Date: Wed, 17 Jan 2001 08:50:34 GMT
Server: Apache/1.3.12 (Unix)  (Red Hat/Linux) PHP/4.0.2
X-Powered-By: PHP/4.0.2
Connection: close
Content-Type: text/html


The other website does use session_start(). A "HEAD /  HTTP/1.0" gives
me :

HTTP/1.1 302 Found
Date: Wed, 17 Jan 2001 08:55:49 GMT
Server: Apache/1.3.12 (Unix) PHP/4.0.2
X-Powered-By: PHP/4.0.2
Set-Cookie: PHPSESSID=f986837823e67afe58b37bc6e45fd958; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-cache, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: gstr_cookies=Stockage%3DDISQUE; expires=Thu, 18-Jan-01
08:55:50 GMT; path=/
location: /index.php?tester=FALSE
Connection: close
Content-Type: text/html

I have the extra lines : Expires, Cache-Control, Pragama.

I would like to get rid of those 3 lines : is it possible and how could
I achieve that ?

I would appreciate any help.

Many thanks.
Best Regards.

Sam




Re: [PHP] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread Daniel Grace

>"Murph" <[EMAIL PROTECTED]> wrote in message
>003201c08027$e886c480$[EMAIL PROTECTED]">news:003201c08027$e886c480$[EMAIL PROTECTED]...
>
>-- snip --
>
>Anyone out there using an HTML editor that they'd like to recommend?
>Why? Are there any FAQs I should be reading for this answer?
>
>Yours,
>Murph

I prefer NoteTab Light -- http://www.notetab.com/ -- which is a very
powerful text editor. While it can't do all the GUI design and doesn't
have syntax highlighting, everything else altogether makes it worth it.

It allows you to have multiple files open at the same time using a
tabbed interface (hence the name), and will (optionally) open all the
files you had open your last editing session when you start it up. My
favorite feature is the Match Brackets feature, which is nice for making
sure you're not missing braces, etc.

for example, given this piece of code ( (cursorhere) marks the cursor
position):

 function foo() {
   if($somecondition || (cursorhere) someothercondition) { do_this(); }
 }

ctrl+M (shortcut key to match brackets) would highlight everything
between the parenthesis in the if. Using it again with that highlighted
would highlight everything in the function.

NoteTab can also do other useful things, like count word occurance,
search/replace across all open files, read (to some extent) binary files,
trim whitespace, sort lines alphabetically, and all that neat stuff. It
automatically recognizes EBCDIC (remember that) and will automatically
convert to and from UNIX/Mac/DOS/Windows line endings. All and all, my
favorite text editor by far even without the syntax highlighting. It even
has a 'replace notepad/restore notepad' option that you may find yourself
using.

NoteTab Light is free. There are other versions (NoteTab Standard and
NoteTab Pro) that are not free, but I have never had a use for them. I
have heard of a library for it that colorizes HTML but have not yet seen
it/played with it, and if it does exist and work well it'd be nice to
have one for PHP. Personally, I'd love something like the Visual Studio-
like function declaration tooltips and/or a way to navigate to any
function in the project (Venura 
currently runs 94 functions in 5994 lines of code -- and that's with the
mass optimizations I've been doing the last couple weeks.) However,
I think NoteTab is written with the html author/developer.

DISCLAIMER: The author of this email is in no way shape or form affiliated
with NoteTab and/or it's authors, except for happening to love the program.

Side note: Out of all the people I've recommended NoteTab too, almost all of
them like it.

--
 - Daniel Grace 

  "Space may be the final frontier but its made in a Hollywood basement."
- Red Hot Chili Peppers - Californication




-- 
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] effect of --enable-trans-sid

2001-01-17 Thread Olivier Guieu

Dear all,
I am using PHP 4.0.3-pl1 on a Red Hat 6.2 platform
with the --enable-trans-sid option activated. 
URLs are rewritten fine (they contain the PHPSESSID
value whenever necessary), however images are also
re-written!, i.e.  get changed
to .
Could someone tell me whether this behaviour is
correct and if not, if it has been corrected in 4.0.4
pl1 ? (I could not find anything relevant in the BUG
DB).
Thanx in advance,
Olivier



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

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




Re: [PHP] WML/WAP and PHP

2001-01-17 Thread Rick Hodger


"Pavel Kalian" <[EMAIL PROTECTED]> wrote in message
008b01c07fd8$0ce0daa0$8361d4c2@pavelk">news:008b01c07fd8$0ce0daa0$8361d4c2@pavelk...
> are you sure that there's nothing in the file in before you call the
> header() function? The situation you describe could happen if there was an
> empty line at the begining of the file and the warnings were turned off.
> When I tried your code it worked as expected:

I dunnoif I try it from the command line on the linux machines in work,
it works fine. If I try it on the Windows98SE + Apache + PHP4.04 setup on my
laptop, it doesn't work. I think it must be something in the
setup...although AFAIK they should both be near enough the same. I'll have
to experiment.

--
Rick Hodger



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




Fw: [PHP] Images ???

2001-01-17 Thread Miguel Loureiro


-Original Message-
From: Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
To: Miguel Loureiro <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, January 16, 2001 7:36 PM
Subject: Re: [PHP] Images ???


>On Tue, 16 Jan 2001, Miguel Loureiro wrote:
>
>> Hello,
>> I want to show a list of images ( but in a small size - should I use
ImageCopyResized ? how ?  ), existed in a directory ( they are uploaded to
dir, and the name of each image is also inserted into a DataBase ), with a
link to the respective image and real size. To work with images  ( I think
its the only way... ) I declare a Header telling that the content is an
image, but the kind of image can be different (*.jpeg,*.png, *.gif, ...), so
( I think ...) should I have a different Headders ? My other problem is to
show the small copied images in a page that already have other
information(ex: the name of the user, for that I'm using sessions), so can I
do it, is it possible ?
>> Thanks
>> Miguel Loureiro
>>
>
>That's what databases are for. Store the image data and the image mimetype
>when the image is uploaded.
>
>--
>Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>


Agree, but my real problem is to show the images in a small size, is
ImageCopyResized the solution, because that command thake a part of the
original message, there is another one ?
Thanks your attention
Miguel Loureiro




-- 
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] WML/WAP and PHP

2001-01-17 Thread Rick Hodger


Chris Adams <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On 16 Jan 2001 05:05:18 -0800, Rick Hodger <[EMAIL PROTECTED]> wrote:
> >Here's a fun little thing I discovered, possibly a bug in PHP itself?
> >
> >To output a WAP page you must output a content-type header else the
phone's
> >browser won't recognise the page. Dead simple. Use:
> >
> >header("Content-type: text/vnd.wap.wml");
> >
> >And all is well and good as long as you use echo/printf etc to output
your
> >page. The second you deviate out of PHP and back to HTML the content-type
> >gets overwritten with a text/html, and so the page doesn't work.  ASP
used
> >to be able to cope with this, is it a bug or something I'm doing wrong?
>
> Hmmm - you might need to start checking details of your configuration.
I've had
> no problems doing a lot of WML work in PHP and it's always correctly
returned
> the content-type I've set using header on 4.0.3pl1 (OpenBSD) and 4.0.3 /
4.0.4
> (Win32).

I've come to the conclusion it must be something in the configuration. It
works from the commandline on a couple of Linux machines, but not on my
Windows laptop.

> Do you have anything like output buffering turned on? I doubt that's
causing
> the problem as I use output buffering semi-frequently[0] but it can't hurt
to
> check.

That was one of the first things I tried, off by default...tried turning it
on but no different. I'll just have to live with echo'ing the pages out
until I can get it sorted.

> [0] neat hack - use ob_content_length() to tell when you've output almost
as
> much data as the phone can handle (find this by doing a browser detect) so
you
> can stop looping over a recordset and emit the Next/Prev page headers
instead).

Oohhadn't actually thought of that one. I'll have to make a note. Cheers
:)

--
Rick Hodger



-- 
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] FW: Cookies, Dammit!

2001-01-17 Thread CC Zona

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] ("Richard S. Crawford") wrote:

> The problem is that the main page doesn't use an include file of any sort;
> it's straight HTML which is frequently updated by hand.  I agree that it
> would be nice if /index.htm had an include file that contained most of the
> content, and if I could convince my boss that it would be the best way to
> go, then I'd be set.  :)  Unfortunately, that's not the route that we've
> chosen to go (in fact, I'm still at the stage where I'm trying to convince
> people around here that PHP is a much better way to go than straight HTML
> for some of these documents).  So, if I were using an include file to build
> /index.htm, then I would use it in microsite45/index.htm.  But since I'm
> not, I can't.  I've got permission to use document.write in /index.htm, so I
> was looking for a solution which would allow /index.htm to remain nothhing
> but static HTML (with the exception of some JavaScript).

Is this on Apache?   I'm wondering if you couldn't 
use an Apache  directive to turn on PHP's auto-append feature for 
that one page.  Then the people who need to tinker with the HTML could do 
so freely without the possiblity of messing with the include; in fact, 
they'd never have to know about the include file's existance, it'd just 
happened "automagically" as far as they (and the boss) are concerned.

-- 
CC

-- 
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] MySQL + PWS Problems

2001-01-17 Thread Phil Driscoll

>Whenever I try to connect with ANY Mysql code on my cpu, I get an error
saying it can't connect.
>I installed usingthe 4.04 win32 installer(heresey I know) which has mysql
built in. Do I have to edit
>anything to all me to try the scripts on my personal cpu?

Chris

Reading between the lines, I suspect you haven't installed mysql. The php
binaries have support for mysql built in (ie the ability to talk to mysql)
but not the database itself.

You can get mysql from www.mysql.com

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


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




Re: [PHP] Anything similar to phpmyedit?

2001-01-17 Thread Alain Fontaine

Hi,

Speaking of dbtools, I don't know what is so awesome about it. It doesn't
properly support mySQL's ENUM type, and if you happen to have an error in
your table creation, it just errors out and you have to start all over
again.



"Maxim Maletsky" <[EMAIL PROTECTED]> a écrit dans le message news:
[EMAIL PROTECTED]
> www.heraut.demon.nl is a good tool for database design/presentation,
> then DBTools http://dbtools.vila.bol.com.br/ is also awsome for managing
the
> databases...
>
> non of these is written in PHP, they are for your local machine, but I
> personally like it this way better...
>
> Cheers,
> Maxim Maletsky.
>
> -Original Message-
> From: Gerry Chu [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 17, 2001 2:44 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Anything similar to phpmyedit?
>
>
> I'm looking for something exactly like phpmyedit (mysql database
> displayer/editor) but where I can edit more than one database row at a
> time.  Is there anything like this?
>
> Thanks,
>
> Gerry
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] WML/WAP and PHP

2001-01-17 Thread Thierry Coopman

At 9:08 AM -0800 1/16/01, Chris Adams wrote:
>On 16 Jan 2001 05:05:18 -0800, Rick Hodger <[EMAIL PROTECTED]> wrote:

>
>[0] neat hack - use ob_content_length() to tell when you've output almost as
>much data as the phone can handle (find this by doing a browser detect) so you
>can stop looping over a recordset and emit the Next/Prev page
>headers instead).
>

This is indeed very neat (and shows that PHP is made with the web in 
mind, and not just another language that can add interaction to the 
web).

Please bear in mind that output buffering seems to be buggy on some 
platforms (http://bugs.php.net/?id=8709)
Since WAP implies *many* short connections this would turn the server 
to stop responding quickly.

I haven't have time to verify more, but it seems the size of the 
apache deamons in memory are smaller too (they used over 80MB per 
process before), when I stopped using output buffering the size of 
the process dropped to 12-13MB (still big, but that's about the size 
they get on a RISC system)

-- 
Thierry Coopman - [EMAIL PROTECTED]
My opinions are personal, and have really nothing or nothing to do 
with Keytrade!

You know that you are drinking too much coffee if:
... Instant coffee takes too long.

-- 
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] Forcing renaming of download file (want output from a php file being saved as some particular file by browser)

2001-01-17 Thread Pankaj Gupta

Forcing renaming of download file (want output from a php file being saved
as some particular file by browser)

Hello
I have a php file abc.php which outputs some data (which it collects from a
database somhow). Now I want to force a download/open dialogue box and to
give a name to the file in which the browser will store that date.
Forcing a download is easy, but how can I tell the browser to name that file
to something particular, say data1.txt
Is there a header for that?
One way around would be to store the data in a temporary file accessible to
that user and then redirect the browser to that file. But there might be a
better and more secure way.
Regards
Pankaj


---
Pankaj Gupta
Senior Undergraduate,
Deptt. of Computer Science and Engineering,
Indian Institute of Technology, Kanpur.
http://www.waytobiz.com/pankajresume1.php3

---



-- 
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] mail list archive

2001-01-17 Thread Taras Vasylkevych

Hi,

is it possible to review the archive of this mailing list. And if possible then where?

Thanks,

Taras

Mit freundlichen Grüßen

Taras Vasylkevych
team in medias GmbH
Aachen, Berlin, Köln
0241-4090909
http://www.frohe-weihnachten.de

***
Unsere aktuellen Projekte

mit Kurzerläuterung:
http://www.inmedias.de/referenz

oder direkt:
http://www.elsa.de
http://www.nachbarland-niederlande.de
http://www.datavision.de
http://www.strabag.de






RE: [PHP] Mail problems

2001-01-17 Thread Jon Haworth

Have a look at http://www.php.net/mail - you need to do something like

$sendto = "[EMAIL PROTECTED]";
$subject = "Oh how I love PHP";
$message =  "I really really do.\n\nI mean I REALLY do.\n\nDo be do be
do.\n";
mail ($sendto, $subject, $message);


HTH
Jon

-Original Message-
From: Todd H MacPherson [mailto:[EMAIL PROTECTED]]
Sent: 17 January 2001 00:08
To: [EMAIL PROTECTED]
Subject: [PHP] Mail problems


Hello

I am doing a job for a client who has a host that just installed php4 on a
WinNT system. He can not get the mail program to work properly.

The server that php is on and the mail server are different computers. He,
the host, asked me to try and by-pass the the mail utility and send directly
to the mail server. He gave me the ip address. Is it possible? If so how?

Thanks

Todd


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




RE: [PHP] mail list archive

2001-01-17 Thread Maxim Maletsky

here:
http://marc.theaimsgroup.com/?l=php-general&r=1&w=2

have fun!

Maxim Maletsky

-Original Message-
From: Taras Vasylkevych [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 7:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] mail list archive


Hi,

is it possible to review the archive of this mailing list. And if possible
then where?

Thanks,

Taras

Mit freundlichen Grüßen

Taras Vasylkevych
team in medias GmbH
Aachen, Berlin, Köln
0241-4090909
http://www.frohe-weihnachten.de

***
Unsere aktuellen Projekte

mit Kurzerläuterung:
http://www.inmedias.de/referenz

oder direkt:
http://www.elsa.de
http://www.nachbarland-niederlande.de
http://www.datavision.de
http://www.strabag.de




--
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] REGEX for tag attributes?

2001-01-17 Thread Thomas Angst

Howdy,

I need to divide several attributes of a tag.

how can I do this without too many time lost?
Is it possible to do this with a regular expression?

Thomas


-- 
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] Cookies still store old value(Help!!)

2001-01-17 Thread Hendry Sumilo

Dear Expert,

I have to store user detail and password in the cookies so that i can detect 
if particular user is allowed to enter certain website
Example is like this:

User "A" is allowed to enter student page
User "B" is allowed to enter lecturer page

Both have to enter password with login at login page

When User "A" enter ,the cookies will store User "A" name,when he enters the 
lecturer page,he will be directed to login page again(because he is not 
allowed to enter lecturer page) and so do User "B".
BUT THE PROBLEM HAPPENS LIKE THIS:
When User "A" enters ,and then User "B" enters,User "B" CAN ENTER THE 
STUDENT PAGE AND THE COOKIES STORE USER USER "A" VALUE.BUT WHEN I REFRESH IT 
,THE COOKIES WILL STORE NOTHING AND REDIRECT TO LOGIN PAGE.
Can i know what the problem is?

Thank you very much,it is really annoying me because someone can enter other 
page if other has used that before


Sincerely Yours

Hendry Sumilo
[EMAIL PROTECTED]
http://members.tripodasia.com.my/hsumilo

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


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




[PHP] Images ??? ok,but...

2001-01-17 Thread Miguel Loureiro

Sorry all,
I can see... I mean, the images appears, now, is it possible when uploading images, do 
a copy to a small file, ie I will have 2 files for each image, but with different 
sizes, where the small one is a small size of the original image...confused. This is 
because I'm trying another approach.
Best Regards.
Miguel Loureiro < [EMAIL PROTECTED]  >



Re: [PHP] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread Adrian Murphy

as with most other things ... homesite is king.for a variety of reasons.
it's customisable.i've added a whole load of custom buttons for php.u can
choose your own colour coding.find/replace ,snippets.
my favourite is it allows u to do server mappings so u can browse and edit
pages with one program.v.cool.it's not free but pretty cheap i imagine(it
comes free with dreamweaver,which i never use).
and ,of course,it doesn't do any thing it's not told to do with your code.
www.allaire.com

- Original Message -
From: Daniel Grace <[EMAIL PROTECTED]>
To: PHP General <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 9:10 AM
Subject: Re: [PHP] I love/hate FrontPage - need another HTML editor.


> >"Murph" <[EMAIL PROTECTED]> wrote in message
> >003201c08027$e886c480$[EMAIL PROTECTED]">news:003201c08027$e886c480$[EMAIL PROTECTED]...
> >
> >-- snip --
> >
> >Anyone out there using an HTML editor that they'd like to recommend?
> >Why? Are there any FAQs I should be reading for this answer?
> >
> >Yours,
> >Murph
>
> I prefer NoteTab Light -- http://www.notetab.com/ -- which is a very
> powerful text editor. While it can't do all the GUI design and doesn't
> have syntax highlighting, everything else altogether makes it worth it.
>
> It allows you to have multiple files open at the same time using a
> tabbed interface (hence the name), and will (optionally) open all the
> files you had open your last editing session when you start it up. My
> favorite feature is the Match Brackets feature, which is nice for making
> sure you're not missing braces, etc.
>
> for example, given this piece of code ( (cursorhere) marks the cursor
> position):
>
>  function foo() {
>if($somecondition || (cursorhere) someothercondition) { do_this(); }
>  }
>
> ctrl+M (shortcut key to match brackets) would highlight everything
> between the parenthesis in the if. Using it again with that highlighted
> would highlight everything in the function.
>
> NoteTab can also do other useful things, like count word occurance,
> search/replace across all open files, read (to some extent) binary files,
> trim whitespace, sort lines alphabetically, and all that neat stuff. It
> automatically recognizes EBCDIC (remember that) and will automatically
> convert to and from UNIX/Mac/DOS/Windows line endings. All and all, my
> favorite text editor by far even without the syntax highlighting. It even
> has a 'replace notepad/restore notepad' option that you may find yourself
> using.
>
> NoteTab Light is free. There are other versions (NoteTab Standard and
> NoteTab Pro) that are not free, but I have never had a use for them. I
> have heard of a library for it that colorizes HTML but have not yet seen
> it/played with it, and if it does exist and work well it'd be nice to
> have one for PHP. Personally, I'd love something like the Visual Studio-
> like function declaration tooltips and/or a way to navigate to any
> function in the project (Venura 
> currently runs 94 functions in 5994 lines of code -- and that's with the
> mass optimizations I've been doing the last couple weeks.) However,
> I think NoteTab is written with the html author/developer.
>
> DISCLAIMER: The author of this email is in no way shape or form affiliated
> with NoteTab and/or it's authors, except for happening to love the
program.
>
> Side note: Out of all the people I've recommended NoteTab too, almost all
of
> them like it.
>
> --
>  - Daniel Grace 
>
>   "Space may be the final frontier but its made in a Hollywood basement."
> - Red Hot Chili Peppers - Californication
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




[PHP] Question concerning performance

2001-01-17 Thread jeremy

Greetings all.

I've got a quick question, and please forgive me if this is off topic,
but...

I've got several applications that I'm trying to do some general
tweaking on, and I've got a question, as well as a general purpose
coding style for php.

Is it faster to remain within _parsing mode_ while grinding through a
script, or faster to drop in and out of parse vs html?  I know this is
kind of a mute point next to things such as database queries, etc. But,
I'm just trying to make sure that if it can be improved, that I'm trying
to do so.

I'm sure my terms are incorrect, but, I think you all understand my
question.

I'll give some examples below.


Example ONE:  (in just parse mode)
[cut]---
blah blah blah blah blah blah blah";
print "" . $Var1 . "" . $Var2 . "";
?>
[/cut]--

Example TWO:  (in html && parse mode)
[cut]---
blah blah blah blah blah blah blah

[/cut]--

Now, let me elaborate. I'm quite aware that the above 2 code segments
will both be fast enough for me not to care.  BUT, within an application
that has 1000 lines of code per page (hypothetically), everything begins
to matter, and the more cpu-clicks I can save, the happier I'll be.

The 2 examples will turn out the same results to the browser, but which
will do it faster?

Thanks for any comments/suggestions you can provide on this.

jeremy

--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.


-- 
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] Protecting my code

2001-01-17 Thread Enrico Olivelli

Hi,
I have a little question..
I developed a PHP application and a I want to distribute it without 
distributing my source code in plain text (for commercial reasons).

Can I encode (compile???) my files, letting PHP to execute them anyway ?
Thanks


Enrico Olivelli

Diennea Telematica
http://www.informatica.it
http://www.mag-news.it


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

2001-01-17 Thread mailing_list

Hi!

a general php-question!
do I have to care about the web-browser reloading a php-page automatically
and not taking a cached one!
For example submit.php (the conent changes every second!):


CLICK


what do I have to do, to guarentee that the client has got the actual
page?
 - or does the browser know - ordering a .php page means "really fetch it,
and don't take the cached one!
but what about proxy-server out there???

thanks for any hint
witty

-- 
Sent through GMX FreeMail - http://www.gmx.net


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




RE: [PHP] refresh Browser

2001-01-17 Thread jeremy


> what do I have to do, to guarentee that the client has got the actual
> page?
>  - or does the browser know - ordering a .php page means
> "really fetch it,
> and don't take the cached one!
> but what about proxy-server out there???

Try using headers that expire your page if you're really worried about
the browser getting a cached version.

But, even then, I've seen browsers ignore this for some odd reason
(you've got to love the internet and the rules it plays by.)

--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.


-- 
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] effect of --enable-trans-sid

2001-01-17 Thread Jani Taskinen

On Wed, 17 Jan 2001, Olivier Guieu wrote:

>URLs are rewritten fine (they contain the PHPSESSID
>value whenever necessary), however images are also
>re-written!, i.e.  get changed
>to .
>Could someone tell me whether this behaviour is
>correct and if not, if it has been corrected in 4.0.4

Please check your php.ini (or php.ini-dist from the package)
for this directive (this is from latest CVS's php.ini-dist):

url_rewriter.tags =  "a=href,area=href,frame=src,input=src,form=fakeentry"

With this directive you can control which tags get rewritten.
This directive was added in PHP 4.0.4, so yes, this has been fixed. :)

--Jani



-- 
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] random no. between two numbers?

2001-01-17 Thread Frederico Augusto Costa

Have you tried rand(1,100) ?


Frederico Augusto Costa
[EMAIL PROTECTED]


On Tue, 16 Jan 2001, Erick Papadakis wrote:

> hi,
>
> in php, how can i generate a random no. but between
> two numbers? for example, i need to generate any
> integer, randomly, between 1 and 1000.
>
> thanks a lot!
>
> regards/erick
>
>
> __
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP] Zend Optimizer

2001-01-17 Thread Rick Hodger


"Michael A. Peters" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

I can confirm this. The currently available Zend Optimizer only works with
4.0.3/4.0.3pl1

The bit that got me, was that you have to make sure you are *not* running a
debug enabled version of PHP. If you are, it won't load the optimiser.

--
Rick Hodger



-- 
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] Errors Compiling with --enable-sockets (php-4.0.3pl1)

2001-01-17 Thread Stephen Maher

Hi, Does anyone know why I would get this error??

sockets.c: In function `php_minit_sockets':
sockets.c:189: `MSG_WAITALL' undeclared (first use in this function)
sockets.c:189: (Each undeclared identifier is reported only once
sockets.c:189: for each function it appears in.)
make[1]: *** [sockets.lo] Error 1
make[1]: Leaving directory
`/home/testthus/apache_1.3.12/php-4.0.3pl1/ext/sockets'
make: *** [all-recursive] Error 1

Steve Maher



Re: [PHP] Protecting my code

2001-01-17 Thread Pankaj Gupta

Check out the Zend site: www.zend.com
They have a product that does exactly what you want (called zend encoder)
Hope that helps
Cheers
Pankaj

--

---
Pankaj Gupta
Senior Undergraduate,
Deptt. of Computer Science and Engineering,
Indian Institute of Technology, Kanpur.
http://www.waytobiz.com/pankajresume1.php3

---
"Enrico Olivelli" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
> I have a little question..
> I developed a PHP application and a I want to distribute it without
> distributing my source code in plain text (for commercial reasons).
>
> Can I encode (compile???) my files, letting PHP to execute them anyway ?
> Thanks
>
>
> Enrico Olivelli
>
> Diennea Telematica
> http://www.informatica.it
> http://www.mag-news.it
>
>
> --
> 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]




Re: [PHP] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread Kath

ROFLMAO =D

- Kath

- Original Message -
From: "Chris Aitken" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 8:11 PM
Subject: Re: [PHP] I love/hate FrontPage - need another HTML editor.


> At 09:06 PM 16/01/2001, Kath wrote:
> >Hey,
> >
> >To get Frontpage to recognize PHP files (at least to let you edit them),
do
> >the following (I'm assuming FP2000):
> >
> >1 - Open FP
> >2 - Click on Tools
> >3 - Click on Options
> >4 - Click on the Configure Editors tab
> >5 - Hit Add
> >6 - Make file type "php"
> >7 - Make editor name "FrontPage"
> >8 - Make command "frontpg.exe"
> >9 - Hit ok
> >10 - It should work :D
>
>
> There is a much easier and simpler way to handle Frontpage and PHP than
this ..
>
> 1 - Open Control Panel
> 2 - Open Add/Remove Programs
> 3 - Click on Frontpage 2000
> 4 - Click on Uninstall
> 5 - Uninstall
> 6 - Click on Start
> 7 - Click on Run
> 8 - Type 'Notepad'
> 9 - Press Enter
> 10 - It DOES work :)
>
>
> A much more realistic windows solution in half the time (and about a
> thousandth of the HD space :) You can add in a Step 11 if needed which is
> to Slap yourself over the wrist 5 times for wanting to use Frontpage in
the
> first place.
>
>
>
>
> Chris
>
>
> --
> 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]




Re: [PHP] Anything similar to phpmyedit?

2001-01-17 Thread Kath

I like phpMyAdmin

- Kath

- Original Message - 
From: "Gerry Chu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 12:44 AM
Subject: [PHP] Anything similar to phpmyedit?


> I'm looking for something exactly like phpmyedit (mysql database
> displayer/editor) but where I can edit more than one database row at a
> time.  Is there anything like this?
> 
> Thanks,
> 
> Gerry
> 
> 
> -- 
> 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]




Re: Fw: [PHP] Images ???

2001-01-17 Thread php3

Addressed to: "Miguel Loureiro" <[EMAIL PROTECTED]>
  [EMAIL PROTECTED] <[EMAIL PROTECTED]>

** Reply to note from "Miguel Loureiro" <[EMAIL PROTECTED]> Wed, 17 Jan 2001 
09:39:08 -

 Agree, but my real problem is to show the images in a small size, is
> ImageCopyResized the solution, because that command thake a part of
> the original message, there is another one ?


If you are going to send the small images very often, you should store
both sizes on the server.

Just in time resizes require the server to load the large image from
disk, then do all the calculations to resize them before the can even
start to send the image.  Do you want all your visitors to have to wait
every time the hit the site, or just let the person
uploading/maintianing the images have the inconvienence?

Mogrify takes about 10 sec per image on my server to resize a 1152X864
megapixel image down to 150X112.  I don't want my visitors to have to
wait for that.





Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com

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




[PHP-CVS] cvs: php4 /ext/sablot sablot.c

2001-01-17 Thread Jani Taskinen

sniper  Wed Jan 17 03:43:18 2001 EDT

  Modified files:  
/php4/ext/sablotsablot.c 
  Log:
  Make sablot compile again. Typo?
  
Index: php4/ext/sablot/sablot.c
diff -u php4/ext/sablot/sablot.c:1.29 php4/ext/sablot/sablot.c:1.30
--- php4/ext/sablot/sablot.c:1.29   Tue Jan 16 04:02:47 2001
+++ php4/ext/sablot/sablot.cWed Jan 17 03:43:17 2001
@@ -886,7 +886,7 @@
SABLOTLS_FETCH();
 
if (argc < 2 || argc > 3 ||
-   zend_get_parameters_ex(argc, &xh, &scheme, &base,) == FAILURE) {
+   zend_get_parameters_ex(argc, &xh, &scheme, &base) == FAILURE) {
WRONG_PARAM_COUNT;
}




-- 
PHP CVS 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] how do i hide my .inc files in apache??

2001-01-17 Thread Jamie Burns

hi..

can anyone tell me how i get apache to never send out the contents of my include files 
(*.inc) to users?

i dont want my source sode to be visible to browsers.

thanks,

jamie.



[PHP-CVS] cvs: php4 / configure.in

2001-01-17 Thread Sascha Schumann

sas Wed Jan 17 04:32:46 2001 EDT

  Modified files:  
/php4   configure.in 
  Log:
  Fix vpath builds on freebsd
  
  
Index: php4/configure.in
diff -u php4/configure.in:1.212 php4/configure.in:1.213
--- php4/configure.in:1.212 Tue Jan 16 17:15:11 2001
+++ php4/configure.in   Wed Jan 17 04:32:45 2001
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.212 2001/01/17 01:15:11 elixer Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.213 2001/01/17 12:32:45 sas Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -823,6 +823,7 @@
 
 PHP_GEN_CONFIG_VARS
 
+$php_shtool mkdir -p pear/scripts
 ALL_OUTPUT_FILES="php4.spec Zend/Makefile main/build-defs.h \
 pear/scripts/pear pear/scripts/phpize pear/scripts/php-config pear/PEAR.php \
 TSRM/Makefile $PHP_OUTPUT_FILES"



-- 
PHP CVS 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] Forcing renaming of download file (want output from a phpfile being saved as some particular file by browser)

2001-01-17 Thread bard

On Wed, 17 Jan 2001, Pankaj Gupta wrote:
> Forcing a download is easy, but how can I tell the browser to name that file
> to something particular, say data1.txt
> Is there a header for that?

There sure is:

header("Content-disposition: filename=data1.txt"); 

BTW, I've been using that for a while, but I'm pretty sure I originally got
it from reading the user comments on http://php.net/header.

You can learn a lot from the people who post comments there. Whenever I 
look up syntax, I ALWAYS check them.

Cheers,

brad


-- 
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] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread Jon Haworth

> But, you know, the look and feel of a site is pretty important and an HTML
> editor goes a long way toward managing that part. If you can find an
editor
> that helps you set up some style sheets that carry across all your pages
> without you having to type in all the code for every page, you're golden.
If
> you can get some reports that check to be sure that you don't have any
> dead-ends, man, you're saving you and your users from some serious
> frustration. And, better yet, if you can see a bird's-eye view of your
site
> with some easy-to-check tree charts, you can check on the logical layout
of
> the site.

Eek. You shouldn't have to "type in all the code" for each page for your
styles anyway. The line

  

in your .. will bring the same style rules into every document
and give you the advantage of smaller pages.

You can get link checkers such as Xenu which work superbly, even building
you an HTML site map you can cut 'n' paste into your own site.

I can't see the advantages of using an editor over hand code so far.


> See, all our fancy-schmancy work with databases and power-code is for
naught
> if it's not easily accessible to the visitor and I think we all overlook
> that to our peril. What was that British fashion site that recently folded
> because they delayed launching because they wanted to "get it just right?"
> Then, their site was so bloated and took so long to load that people just
> surfed away... I think that a good HTML editor will display how long a
page
> will load using various modem speeds and allow me to choose whether I want
> to spring that kind of burden on my visitors.

Well, yes, in the same way Photoshop displays how long an image is supposed
to take to load. But, in my experience, most HTML editors write code that is
considerably more long-winded than a well-coded page should be - so the only
benefit you get is an accurate picture of how much your editor has messed up
your code.

If you design your pages well and code them properly, you can avoid many of
the long download times associated with most websites today. If you run an
image-intensive site, optimising your pictures is as (more?) important than
having tight code - and an HTML editor doesn't help with this.

It was boo.com that went under, incidentally.


> So, you've used both products and you know what I mean when I say that I
can
> apply a "theme" with FrontPage. Can you do likewise with Dreamweaver? If
you
> set up a site that specializes in fireworks, for instance, will a button
> that you design once with a pretty exploding shell carry across all your
> pages without having to insert or "include" it on all your pages? With
> FrontPage, you just set up one "theme" and all the elements carry across
> without having to manually include them. That's the kind of drudgery I'd
> like to get away from so that all I have to do is open up the editor and
> stick some PHP in there that interacts with MySQL.

Without having to insert or include it? You have two options, if you want
the same stuff on several pages.

1. Have the code on each page. (ugh - if you want to change it you have to
change all of them, and each page is bigger).
2. Have an include file of some sort (.css, .inc, .whatever) and link to it.


I don't see (2) as being more drudgery than (1), quite the reverse in fact.

> Do you think I'm living in La-La Land?

Not really - there's a time and a place for editors (marketing people who
want to "just design a quick page for the Intranet"), but for anything
serious, I'd like to quote your first sentence again.

> There's no question that hand-coding is the way to go. I'm with you 110%
on
> that score!


Cheers
Jon

-- 
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] how do i hide my .inc files in apache??

2001-01-17 Thread Tim Zickus

Combine these options:

http://httpd.apache.org/docs/mod/mod_access.html#allow
http://httpd.apache.org/docs/mod/core.html#files

to exclude access to anything matching *.inc.

The safest/easiest thing is to move the files outside of the document path
and add that directory to your php include path.  That way you're not
relying on a special apache configuration if you were to move to a new
server, etc...your files could become inadvertently unprotected.

- Tim
  http://www.phptemplates.org

>can anyone tell me how i get apache to never send out the contents of my
>include files (*.inc) to users?



-- 
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] how do i hide my .inc files in apache??

2001-01-17 Thread Jon Haworth

I take it you're talking about normal html .inc files, and not the PHP
include() function? If so, this is well off-list, try the
comp.infosystems.www.servers heirarchy for this sort of thing.

But...

You can't, AFAIK. The whole *point* of an include file is that the entire
contents of that file are included in whatever document you call it from.
You use them for holding repetitive information that you don't want to type
out for every page, such as a footer, eg:

This page is copyright blah blah blah
mailto:[EMAIL PROTECTED]">E-mail the webmaster

would be a candidate for a .inc file.

If I have completely missed the point, please forgive me.


Cheers
Jon


-Original Message-
From: Jamie Burns [mailto:[EMAIL PROTECTED]]
Sent: 17 January 2001 12:48
To: [EMAIL PROTECTED]
Subject: [PHP] how do i hide my .inc files in apache??


hi..

can anyone tell me how i get apache to never send out the contents of my
include files (*.inc) to users?

i dont want my source sode to be visible to browsers.

thanks,

jamie.

-- 
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] how do i hide my .inc files in apache??

2001-01-17 Thread jeremy

don't name them .inc files.


Name them blahblah.inc.php or something that will be parsed, and
therefore not just gurped up by the server.


blest,
jeremy

--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.

> -Original Message-
> From: Jamie Burns [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 17, 2001 13:48
> To: [EMAIL PROTECTED]
> Subject: [PHP] how do i hide my .inc files in apache??
>
>
> hi..
>
> can anyone tell me how i get apache to never send out the
> contents of my include files (*.inc) to users?
>
> i dont want my source sode to be visible to browsers.
>
> thanks,
>
> jamie.
>


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




AW: [PHP] how do i hide my .inc files in apache??

2001-01-17 Thread Sebastian Stadtlich

why don't you rename your include files to 
*.inc.php

so they are parsed by php and no valuable information would be given out.
also you could use folowing lines in a .htaccess


# .inc-files not readable:

Order allow,deny
Deny from all


sebastian



> -Ursprüngliche Nachricht-
> Von: Jamie Burns [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 17. Januar 2001 13:48
> An: [EMAIL PROTECTED]
> Betreff: [PHP] how do i hide my .inc files in apache??
> 
> 
> hi..
> 
> can anyone tell me how i get apache to never send out the 
> contents of my include files (*.inc) to users?
> 
> i dont want my source sode to be visible to browsers.
> 
> thanks,
> 
> jamie.
> 

--
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] From Cold Fusion back to PHP...

2001-01-17 Thread W Luke

Hi,

I started PHP in 1999, and wrote just one Web Site based on it. I started to
have a good feel for it and found it easy to implement, as well as it being
powerful. Shortly after that though, I was given the opportunity to learn
Cold Fusion, and haven't looked back since today.

I've got a possible contrat that I'm interested in taking on, in PHP and
MySql. What I would like to discuss with everyone, (it might more relevant
to past or current CF programmers - I apologise if it's a litte OT), is the
best way to get back into PHP from CF?

When I got into CF, I found it so much easier than PHP - I loved
Datasources, as they are so simple to connect to the database. Just give it
a name and - bingo. I also found it so much easier, and quicker, coming up
with code for querying and retrieving data from DBs, and displaying it in a
Table. And combining it with HTML is a dream, when with PHP I found I was
getting errors, and horrible ugly Tables.

Are my fears in "re-learning" PHP well founded - or might my experience in
Cold Fusion have helped?

I'd be really interested to hear your comments.

Will


-- 
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] how do i hide my .inc files in apache??

2001-01-17 Thread jeremy

Yes,

Making .inc parsable is a _potential_ solution.  The problem is that why
should we as app programmers expect sysadmins to modify their default
apache installation to get around a problem that we can fix?

My vote is still just for include files to have a standard (already
accepted) extension.


--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.

> -Original Message-
> From: Sebastian Stadtlich [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 17, 2001 14:10
> To: 'Jamie Burns'; 'Php-General (E-Mail)
> Subject: AW: [PHP] how do i hide my .inc files in apache??
>
>
> why don't you rename your include files to
> *.inc.php
>
> so they are parsed by php and no valuable information would
> be given out.
> also you could use folowing lines in a .htaccess
>
>
> # .inc-files not readable:
> 
> Order allow,deny
> Deny from all
> 
>
> sebastian
>
>
>
> > -Ursprüngliche Nachricht-
> > Von: Jamie Burns [mailto:[EMAIL PROTECTED]]
> > Gesendet: Mittwoch, 17. Januar 2001 13:48
> > An: [EMAIL PROTECTED]
> > Betreff: [PHP] how do i hide my .inc files in apache??
> >
> >
> > hi..
> >
> > can anyone tell me how i get apache to never send out the
> > contents of my include files (*.inc) to users?
> >
> > i dont want my source sode to be visible to browsers.
> >
> > thanks,
> >
> > jamie.
> >
>
> --
> 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]




Re: [PHP] From Cold Fusion back to PHP...

2001-01-17 Thread Frédéric Mériot

Hello, I'am a french CF developper and I've just started to dev in PHP.
You're right! Cold fusion is much easier than PHP but I think it's just a
question of "experience".

It's true, cold fusion is easier but it's due (partialy) to Cold fusion
studio. The Allaire Editor simplifies the work of the developer.

I'am waiting for an editor like CFstudio for PHP (and also a good debuger)
and I'am sure that it will be one of the most important language in the
future.


- Original Message -
From: "W Luke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 2:20 PM
Subject: [PHP] From Cold Fusion back to PHP...


> Hi,
>
> I started PHP in 1999, and wrote just one Web Site based on it. I started
to
> have a good feel for it and found it easy to implement, as well as it
being
> powerful. Shortly after that though, I was given the opportunity to learn
> Cold Fusion, and haven't looked back since today.
>
> I've got a possible contrat that I'm interested in taking on, in PHP and
> MySql. What I would like to discuss with everyone, (it might more relevant
> to past or current CF programmers - I apologise if it's a litte OT), is
the
> best way to get back into PHP from CF?
>
> When I got into CF, I found it so much easier than PHP - I loved
> Datasources, as they are so simple to connect to the database. Just give
it
> a name and - bingo. I also found it so much easier, and quicker, coming up
> with code for querying and retrieving data from DBs, and displaying it in
a
> Table. And combining it with HTML is a dream, when with PHP I found I was
> getting errors, and horrible ugly Tables.
>
> Are my fears in "re-learning" PHP well founded - or might my experience in
> Cold Fusion have helped?
>
> I'd be really interested to hear your comments.
>
> Will
>
>
> --
> 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]




Re: [PHP] Question concerning performance

2001-01-17 Thread Christian Reiniger

On Wednesday 17 January 2001 11:37, jeremy wrote:
> Example ONE:  (in just parse mode)
> [cut]---
>  print "blah blah blah blah blah blah blah";
> print "" . $Var1 . "" . $Var2 . "";
> ?>
> [/cut]--
>
> Example TWO:  (in html && parse mode)
> [cut]---
> blah blah blah blah blah blah blah
> 
> [/cut]--
>
> Now, let me elaborate. I'm quite aware that the above 2 code segments
> will both be fast enough for me not to care.  BUT, within an
> application that has 1000 lines of code per page (hypothetically),
> everything begins to matter, and the more cpu-clicks I can save, the
> happier I'll be.

With big applications the *main* thing that matters is maintainability. 
In other words: Make it work, make it work well, make it maintainable and 
*then* make it as fast as possible while *keeping* it maintainable (and 
working of course)

> The 2 examples will turn out the same results to the browser, but which
> will do it faster?

Don't care about it. The difference is most lileky in th 0.1% range.
Look at bigger optimizations first, then benchmark and if it still is too 
slow (and only then) optimize further.

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

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka", but "That's funny..."

- Isaac Asimov

--
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] how do i hide my .inc files in apache??

2001-01-17 Thread Matt Williams


Order allow,deny
Deny from all


in either your httpd.conf or a .htaccess file will deny users access to your
*.inc files

M@

> -Original Message-
> From: Jon Haworth [mailto:[EMAIL PROTECTED]]
> Sent: 17 January 2001 13:01
> To: 'Jamie Burns'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: [PHP] how do i hide my .inc files in apache??
>
>
> I take it you're talking about normal html .inc files, and not the PHP
> include() function? If so, this is well off-list, try the
> comp.infosystems.www.servers heirarchy for this sort of thing.
>
> But...
>
> You can't, AFAIK. The whole *point* of an include file is that the entire
> contents of that file are included in whatever document you call it from.
> You use them for holding repetitive information that you don't
> want to type
> out for every page, such as a footer, eg:
>
> This page is copyright blah blah blah
> mailto:[EMAIL PROTECTED]">E-mail the webmaster
>
> would be a candidate for a .inc file.
>
> If I have completely missed the point, please forgive me.
>
>
> Cheers
> Jon
>
>
> -Original Message-
> From: Jamie Burns [mailto:[EMAIL PROTECTED]]
> Sent: 17 January 2001 12:48
> To: [EMAIL PROTECTED]
> Subject: [PHP] how do i hide my .inc files in apache??
>
>
> hi..
>
> can anyone tell me how i get apache to never send out the contents of my
> include files (*.inc) to users?
>
> i dont want my source sode to be visible to browsers.
>
> thanks,
>
> jamie.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




[PHP] calling static class functions using a function variable

2001-01-17 Thread Shaun Batterton

Hi all,
Hope you can help.  I have an class called xml and a class method called
hi_handler.  I am able to call this method statically as follows:

xml::hi_handler($attrs);

but when I try to call it like this, it fails miserably:

$junk="xml::hi_handler";
$junk();

Fatal error: Call to undefined function: xml::hi_handler() 

Any ideas - besides the obvious way of using a dummy instance.  I am using
php 4.0.3pl1

Thanks,
Shaun
-- 


-- 
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[2]: [PHP] how do i hide my .inc files in apache??

2001-01-17 Thread Andrew Sitnikov

Hello jeremy,

j> don't name them .inc files.


j> Name them blahblah.inc.php or something that will be parsed, and
j> therefore not just gurped up by the server.

I think, more secure is move inc file out www tree.

/home/user/public_html/index.php
/home/user/include/lib.inc

index.php



Best regards,
 Andrew Sitnikov 



-- 
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-CVS] cvs: php4 /ext/ldap ldap.c

2001-01-17 Thread Stig Venaas

venaas  Wed Jan 17 05:43:40 2001 EDT

  Modified files:  
/php4/ext/ldap  ldap.c 
  Log:
  Making parallel search allow different filter for each link
  
  
Index: php4/ext/ldap/ldap.c
diff -u php4/ext/ldap/ldap.c:1.80 php4/ext/ldap/ldap.c:1.81
--- php4/ext/ldap/ldap.c:1.80   Sat Jan 13 02:00:27 2001
+++ php4/ext/ldap/ldap.cWed Jan 17 05:43:39 2001
@@ -23,7 +23,7 @@
  */
  
 
-/* $Id: ldap.c,v 1.80 2001/01/13 10:00:27 venaas Exp $ */
+/* $Id: ldap.c,v 1.81 2001/01/17 13:43:39 venaas Exp $ */
 #define IS_EXT_MODULE
 
 #include "php.h"
@@ -235,7 +235,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "LDAP Support", "enabled" );
-   php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.80 2001/01/13 
10:00:27 venaas Exp $" );
+   php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.81 2001/01/17 
+13:43:39 venaas Exp $" );
php_info_print_table_row(2, "Total Links", maxl );
 #ifdef LDAP_API_VERSION
snprintf(ldapapiversion, 31, "%d", LDAP_API_VERSION);
@@ -671,11 +671,10 @@
ldap_attrs[num_attribs] = NULL;

case 3 :
-   convert_to_string_ex(filter);
-   ldap_filter = (*filter)->value.str.val;
-
/* parallel search? */
if (Z_TYPE_PP(link) != IS_ARRAY) {
+   convert_to_string_ex(filter);
+   ldap_filter = Z_STRVAL_PP(filter);
convert_to_string_ex(base_dn);
ldap_base_dn = Z_STRVAL_PP(base_dn);
}
@@ -688,7 +687,7 @@
 
/* parallel search? */
if (Z_TYPE_PP(link) == IS_ARRAY) {
-   int i, nlinks, nbases, *rcs;
+   int i, nlinks, nbases, nfilters, *rcs;
LDAP **links;
zval **entry;

@@ -717,6 +716,22 @@
ldap_base_dn = Z_STRLEN_PP(base_dn) < 1 ? NULL : 
Z_STRVAL_PP(base_dn);
}
 
+   if (Z_TYPE_PP(filter) == IS_ARRAY) {
+   nfilters = zend_hash_num_elements(Z_ARRVAL_PP(filter));
+   if (nfilters != nlinks) {
+   php_error(E_WARNING, "LDAP: Filter must either be a 
+string, or an array with the same number of elements as the links array");
+   if (ldap_attrs != NULL) {
+   efree(ldap_attrs);
+   }
+   RETURN_FALSE;
+   }
+   zend_hash_internal_pointer_reset(Z_ARRVAL_PP(filter));
+   } else {
+   nfilters = 0; /* this means string, not array */
+   convert_to_string_ex(filter);
+   ldap_filter = Z_STRVAL_PP(filter);
+   }
+
links = emalloc(nlinks * sizeof(*links));
rcs = emalloc(nlinks * sizeof(*rcs));

@@ -737,6 +752,12 @@
zend_hash_move_forward(Z_ARRVAL_PP(base_dn));
convert_to_string_ex(entry);
ldap_base_dn = Z_STRLEN_PP(entry) < 1 ? NULL : 
Z_STRVAL_PP(entry);
+   }
+   if (nfilters != 0) { /* filter an array? */
+   zend_hash_get_current_data(Z_ARRVAL_PP(filter), (void 
+**)&entry);
+   zend_hash_move_forward(Z_ARRVAL_PP(filter));
+   convert_to_string_ex(entry);
+   ldap_filter = Z_STRVAL_PP(entry);
}
 
php_set_opts(ldap, ldap_sizelimit, ldap_timelimit, ldap_deref);



-- 
PHP CVS 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-CVS] cvs: php4 /ext/sablot sablot.c

2001-01-17 Thread Sterling Hughes

sterlingWed Jan 17 06:14:22 2001 EDT

  Modified files:  
/php4/ext/sablotsablot.c 
  Log:
  Fix (well it works) the error display with sablotron.
  
  
  
Index: php4/ext/sablot/sablot.c
diff -u php4/ext/sablot/sablot.c:1.30 php4/ext/sablot/sablot.c:1.31
--- php4/ext/sablot/sablot.c:1.30   Wed Jan 17 03:43:17 2001
+++ php4/ext/sablot/sablot.cWed Jan 17 06:14:22 2001
@@ -1394,27 +1394,16 @@
 
 static void _php_sablot_standard_error(php_sablot_error *errors, php_sablot_error 
errors_start, int code, int level)
 {
-int len = 0,
-pos = 0;
 char *errstr = NULL;
 SABLOTLS_FETCH();
 
 errors = errors_start.next;
 while (errors) {
-len = pos + strlen(errors->key) + sizeof(": ") + strlen(errors->value) + 
sizeof("\n");
-
-/** 
- * Could be a problem, I just hate looping through strings
- * more than I have to ;-)
- */
-if (pos)
-errstr = erealloc(errstr, len);
-else
-errstr = emalloc(len+1);
-
-sprintf(errstr + pos, "%s: %s\n", errors->key, errors->value);
-
-pos = len;
+   if (strcmp(errors->key, "msg") == 0) {
+   errstr = estrdup(errors->value);
+   break;
+   }
+
 errors = errors->next;
 }
 
@@ -1427,6 +1416,8 @@
 php_error(E_WARNING, errstr);
 break;
 }
+
+efree(errstr);
 }
 
 /* }}} */



-- 
PHP CVS 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] Press R: Letting you know about Emma

2001-01-17 Thread Justice For Emma

Emma may not have received quite as much publicity as Elian Gonzalez did, b=
ut=20
her story is similar. International Child Abduction: US and Canadian privat=
e=20
social services abducts Emma and protects its secrecy...the first of its ki=
nd=20
in history! Why do they want to keep Emma's name secret?

Emma needs your Attention:
http://members.tripod.com/justiceforemma/index.htm



-- 
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] Anything similar to phpmyedit?

2001-01-17 Thread Gerry Chu

Oh, something lightweight.  I'm using phpmyadmin too for database admin,
but I need something for inexpericed users to edit specific parts of the
database.

Thanks

Gerry

On 17 Jan 2001 10:55:50 +0100, Alain Fontaine wrote:
> Hi,
> 
> Speaking of dbtools, I don't know what is so awesome about it. It doesn't
> properly support mySQL's ENUM type, and if you happen to have an error in
> your table creation, it just errors out and you have to start all over
> again.
> 
> 
> 
> "Maxim Maletsky" <[EMAIL PROTECTED]> a écrit dans le message news:
> [EMAIL PROTECTED]
> > www.heraut.demon.nl is a good tool for database design/presentation,
> > then DBTools http://dbtools.vila.bol.com.br/ is also awsome for managing
> the
> > databases...
> >
> > non of these is written in PHP, they are for your local machine, but I
> > personally like it this way better...
> >
> > Cheers,
> > Maxim Maletsky.
> >
> > -Original Message-
> > From: Gerry Chu [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 17, 2001 2:44 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Anything similar to phpmyedit?
> >
> >
> > I'm looking for something exactly like phpmyedit (mysql database
> > displayer/editor) but where I can edit more than one database row at a
> > time.  Is there anything like this?
> >
> > Thanks,
> >
> > Gerry
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


--
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: Re[2]: [PHP] how do i hide my .inc files in apache??

2001-01-17 Thread Jim Jagielski

Why not:

   
  order deny,allow
  deny from all
   


Andrew Sitnikov wrote:
> 
> Hello jeremy,
> 
> j> don't name them .inc files.
> 
> 
> j> Name them blahblah.inc.php or something that will be parsed, and
> j> therefore not just gurped up by the server.
> 
> I think, more secure is move inc file out www tree.
> 
> /home/user/public_html/index.php
> /home/user/include/lib.inc
> 
> index.php
>include('/home/user/include/lib.inc');
> ?>
> 
> 
> Best regards,
>  Andrew Sitnikov 
> 
> 
> 
> -- 
> 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]
> 


-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  "Casanova will have many weapons; To beat him you will
  have to have more than forks and flatulence."

-- 
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-DB] PHP+MySQL charset problem

2001-01-17 Thread Ignacio Vazquez-Abrams

On Wed, 17 Jan 2001, Roman Serbski wrote:

> Good day all!
>
> Please help me with charset. I have some strange trouble.
> I use FreeBSD 4.2 STABLE and MySQL 3.23.28-gamma (compiled from FreeBSD
> ports) and PHP 4.04.
> Latin1 is a default charset in MySQL. So, I wanted to add cp1251 or koi8_ru.
> Ok, I add --default-character-set=cp1251 to my mysql start-up script.
>
> The problem is:
>
> If I connect from console to mysql and type \s (to get status information)
> it shows: Language: cp1251
> Everything seems OK, but if I try to connect via phpMyAdmin 2.1.0 or Horde
> 1.2.3+Imp 2.2.3 (webmail implementation) it returns -
>
> <>
> Warning: MySQL Connection Failed: Can't initialize character set 14 (path:
> default) in /usr/local/www/htdocs/adm/lib.inc.php on line 255
> Error
>
> <>
> Warning: Can't initialize character set 14 (path: default) in
> /usr/local/lib/phplib/db_mysql.inc on line 73
>
> I don't know where is my mistake? I tried to contact MySQL mailing list -
> thay said this problem has nothing to do with MySQL.
> I do have sql/share/charsets folder with Index and cp1251.conf. I checked
> Index - records are OK.
> Should I add something to /usr/local/lib/php.ini file?
>
> Looking forward to hear from you.
>
> Regards,
> Roman
>

Three solutions:

1) Use an external MySQL client library.

2) Wait until the recently-submitted internal MySQL client library patch gets
committed.

3) Grab the recently-submitted internal MySQL client library patch and apply
it yourself.

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>


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




[PHP] Problems compiling LDAP into php 4.0.2

2001-01-17 Thread Bill . Hoffman

Here is my environment:

System Linux [EMAIL PROTECTED] 2.2.5-15 #1 Mon Apr 19 22:21:09 EDT 1999
i586 unknown
Build Date Sep 7 2000
Configure Command './configure' '--with-apxs=/usr/local/apache/bin/apxs' '
--with-config-file-path=/usr/local/apache/conf' '--enable-versioning' '
--with-mysql' '--enable-ftp' '--with-gd=/usr/local/gd' '
--enable-bcmath=yes' '--disable-debug' '--enable-memory-limit=yes' '
--enable-track-vars' '
--with-openlink=/usr/local/odbc'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/apache/conf
ZEND_DEBUG disabled
Thread Safety disabled


When I attempted to recompile with LDAP
During the make I get the following errors:

Making all in ldap
make[2]: Entering directory `/usr/local/php-4.0.2/ext/ldap'
make[3]: Entering directory `/usr/local/php-4.0.2/ext/ldap'
/bin/sh /usr/local/php-4.0.2/libtool --silent --mode=compile gcc  -I.
-I/usr/local/php-4.0.2/ext/ldap -I/usr/local/php-4.0.2
-I/usr/local/php-4.0.2/main -I/usr/local/apache/include
-I/usr/local/php-4.0.2/Zend -I/usr/local/php-4.0.2 -I/usr/local/gd
-I/usr/local/ldap/include
-I/usr/local/php-4.0.2/ext/mysql/libmysql -I/usr/local/odbc/odbcsdk/include
-I/usr/local/php-4.0.2/ext/xml/expat/xmltok
-I/usr/local/php-4.0.2/ext/xml/expat/xmlparse  -DXML_BYTE_ORDER=12 -g -O2
-c ldap.c
ldap.c: In function `php_ldap_do_search':
ldap.c:620: dereferencing pointer to incomplete type
ldap.c:629: dereferencing pointer to incomplete type
ldap.c:638: dereferencing pointer to incomplete type
make[3]: *** [ldap.lo] Error 1
make[3]: Leaving directory `/usr/local/php-4.0.2/ext/ldap'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/php-4.0.2/ext/ldap'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/php-4.0.2/ext'
make: *** [all-recursive] Error 1

I am using Netscape 3.0 like the php.net docs told me to.
ldapsearch works fine from the command line.

Thanx in advance for any help
Please respond to my email directly - I am off list.


BEH


-- 
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] From Cold Fusion back to PHP...

2001-01-17 Thread W Luke


> Hello, I'am a french CF developper and I've just started to dev in PHP.
> You're right! Cold fusion is much easier than PHP but I think it's just a
> question of "experience".

That's one reason yeah.  But aside from all the advanages of PHP, it seems a
task that would take one step in Cold Fusion takes two in PHP.

> It's true, cold fusion is easier but it's due (partialy) to Cold fusion
> studio. The Allaire Editor simplifies the work of the developer.

That's true - it's a great tool.  The best feature though is the embedded
documentation.  I wonder when or if there will be such a tool for PHP?

Will

--
[EMAIL PROTECTED] -=- www.lukrative.com
Classifieds -=- www.localbounty.com



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




[PHP-I18N] Press R: Letting you know about Emma

2001-01-17 Thread Justice For Emma

Emma may not have received quite as much publicity as Elian Gonzalez did, b=
ut=20
her story is similar. International Child Abduction: US and Canadian privat=
e=20
social services abducts Emma and protects its secrecy...the first of its ki=
nd=20
in history! Why do they want to keep Emma's name secret?

Emma needs your Attention:
http://members.tripod.com/justiceforemma/index.htm



-- 
PHP Internationalization 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] string replace

2001-01-17 Thread Monte Ohrt

If you're looking to strip off just the file extension, you can use
pathinfo() to get that. I don't think it is a documented function, so
use var_dump(pathinfo($var)) to see what it outputs.

Tait Grove wrote:
> 
> How can I strip everything past a certain character in a string?
> 
> i.e.:
> 
> $foo = "test.gif";
> 
> // strip past the .gif
> 
> $foo = "test";
> 
> // again
> 
> $foo2 = "test.jpeg";
> 
> // strip past the .jpeg
> 
> $foo2 = "test";
> 
> Tait

--
Monte Ohrt <[EMAIL PROTECTED]>
http://www.ispi.net/

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




RE: Re[2]: [PHP] how do i hide my .inc files in apache??

2001-01-17 Thread jeremy

> j> Name them blahblah.inc.php or something that will be parsed, and
> j> therefore not just gurped up by the server.
>
> I think, more secure is move inc file out www tree.
>

I agree with this completely.  The only thing about that is that some
admins want a quick and dirty install.  And, so it's just been my
experience that you can limit your vulnerabilities by renaming them to
.php.

If you can do both, it's ideal.  I've seen (and found) some security
holes where it was possible to read files on the file system by using
the webserver process.  If that file is just a list of $var="blah" or
function definitions, and does not end with a parsable extension (.php)
then the file is presented to the browser in completely readable format.
If it is parsed, then all the browser gets is a blank page.

That's kind of what I was saying.

You're right though, that out of the webserver tree is better.

jeremy

--
Jeremy Kelley <[EMAIL PROTECTED]>  pgp keyid 0xAECBA355
Phil 1:21  www.ganooz.com
Car pour moi, la vie c'est le Christ, et la mort est un gain.

> -Original Message-
> From: Andrew Sitnikov [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 17, 2001 15:39
> To: jeremy
> Cc: Jamie Burns; [EMAIL PROTECTED]
> Subject: Re[2]: [PHP] how do i hide my .inc files in apache??
>
>
> Hello jeremy,
>
> j> don't name them .inc files.
>
>
> j> Name them blahblah.inc.php or something that will be parsed, and
> j> therefore not just gurped up by the server.
>
> I think, more secure is move inc file out www tree.
>
> /home/user/public_html/index.php
> /home/user/include/lib.inc
>
> index.php
>include('/home/user/include/lib.inc');
> ?>
>
>
> Best regards,
>  Andrew Sitnikov
>
>


-- 
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] Php and FDF

2001-01-17 Thread Erick Schmidt

I am looking for a good start to get php working with the FDF toolkit. I am
running php on SuSE for the PowerPC.

Any help at all will greatly be appreciated.

[EMAIL PROTECTED]


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




php-general Digest 17 Jan 2001 15:29:07 -0000 Issue 460

2001-01-17 Thread php-general-digest-help


php-general Digest 17 Jan 2001 15:29:07 - Issue 460

Topics (messages 34974 through 35049):

Re: XML, what is that supposed to do?
34974 by: Brian White
34979 by: Matt McClanahan

Re: regexps
34975 by: Toby Butzon

Re: Zend Optimizer
34976 by: Michael A. Peters
35021 by: Rick Hodger

Re: I love/hate FrontPage - need another HTML editor.
34977 by: James McLaughlin
34978 by: Toby Butzon
34980 by: Murph
34998 by: Daniel Grace
35014 by: Adrian Murphy
35024 by: Kath
35029 by: Jon Haworth

best user authentication method?
34981 by: Romulo Roberto Pereira

mysql error
34982 by: James Mclean

Addendum to the question: as a cgi version...
34983 by: Romulo Roberto Pereira

Integers are not Variables..???
34984 by: Dhaval Desai

HTTP_POST???
34985 by: Wade Halsey

Anything similar to phpmyedit?
34986 by: Gerry Chu
34988 by: Maxim Maletsky
35005 by: Alain Fontaine
35025 by: Kath
35042 by: Gerry Chu

Re: HELP! Date formatting
34987 by: Niel Zeeman

Re: win 2000 nt 5.0  and IIS
34989 by: Niel Zeeman

Re: I love/hate FrontPage - need another HTML editor. -> Dreamweaver 4
34990 by: andreas \(.work\)

random no. between two numbers?
34991 by: Erick Papadakis
34994 by: Angus Mann
35020 by: Frederico Augusto Costa

ImageTTFText Error
34992 by: Gabriele Fain

[PHP-DB] PHP+MySQL charset problem
34993 by: Roman Serbski
35044 by: Ignacio Vazquez-Abrams

please help: PHP4 + GD 1.8.3 + PNG
34995 by: Neil Zanella

Creating a text file
34996 by: Wade Halsey

session_start() and cache problem ...
34997 by: Samuel Tran

effect of --enable-trans-sid
34999 by: Olivier Guieu
35019 by: Jani Taskinen

Re: WML/WAP and PHP
35000 by: Rick Hodger
35002 by: Rick Hodger
35006 by: Thierry Coopman

Re: Images ???
35001 by: Miguel Loureiro
35026 by: php3.developersdesk.com

Re: Cookies, Dammit!
35003 by: CC Zona

Re: MySQL + PWS Problems
35004 by: Phil Driscoll

Forcing renaming of download file (want output from a php file being saved as some 
particular file by browser)
35007 by: Pankaj Gupta
35028 by: bard

mail list archive
35008 by: Taras Vasylkevych
35010 by: Maxim Maletsky

Re: Mail problems
35009 by: Jon Haworth

REGEX for tag attributes?
35011 by: Thomas Angst

Cookies still store old value(Help!!)
35012 by: Hendry Sumilo

Images ??? ok,but...
35013 by: Miguel Loureiro

Question concerning performance
35015 by: jeremy
35037 by: Christian Reiniger

Protecting my code
35016 by: Enrico Olivelli
35023 by: Pankaj Gupta

refresh Browser
35017 by: mailing_list.gmx.at
35018 by: jeremy

Errors Compiling with --enable-sockets (php-4.0.3pl1)
35022 by: Stephen Maher

how do i hide my .inc files in apache??
35027 by: Jamie Burns
35030 by: Tim Zickus
35031 by: Jon Haworth
35032 by: jeremy
35033 by: Sebastian Stadtlich
35035 by: jeremy
35038 by: Matt Williams
35040 by: Andrew Sitnikov
35043 by: Jim Jagielski
35048 by: jeremy

>From Cold Fusion back to PHP...
35034 by: W Luke
35036 by: Frédéric Mériot
35046 by: W Luke

calling static class functions using a function variable
35039 by: Shaun Batterton

Press R: Letting you know about Emma
35041 by: Justice For Emma

Problems compiling LDAP into php 4.0.2
35045 by: Bill.Hoffman.walgreens.com

Re: string replace
35047 by: Monte Ohrt

Php and FDF
35049 by: Erick Schmidt

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]


--



I thought I might weigh into this debate in a small way. My background
is a little different. I have spent the last five years playing with
SGML ( Standard Generalised Markup Language ) which is the ancestor of
XML - basically, XML was invented by elements of the SGML community to
create a "lighter" form of SGML that could be used in client side
apps and didn't require a CRAY to be able to do things quickly.

The primary benefit of XML is that you have more control over the
markup of your data. This has several aspects

1) You can markup a piece of data to describe what it *actually is*
rather just marking it up how you would like it displayed in one
particular media - it puts some intelligence in the data and allows
you to mark up some of the context that us humans are generally
able to infer. This also "future proofs" your data against
the "displa

Re: [PHP] XML, what is that supposed to do?

2001-01-17 Thread Chris Lee

To everyone that wrote in answering this question, thanks. The answers were
very interesting and well writen, I didn't post the origonal question but I
am glad he did, Ive learned alot about something I allways wondered about :)

On a side note, anyone ever see any good tutorials for XML - php ?

Chris Lee
Mediawaveonline.com


"Brandon Orther" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello Everybody,
>
> I have seen a lot of people ask for XML support for PHP.  I was wondering
> what it does that makes it good for PHP.
>
> Thank you,
>
> 
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> 
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] Re: How can I get a random number

2001-01-17 Thread Chris Lee

This might not be quite what your looking for, but I often have then need
for a unique number in an incrementing order. random isnt quite the word for
it, unique is :)

 function mtime()
 {
   $mtime = microtime();
   $mtime = str_replace("\.", '', $mtime);
   $mtime = explode(' ', $mtime);
   $mtime = $mtime[1] . $mtime[0];
  return($mtime);
 }

Chris Lee
Mediawaveonline.com



"Angela" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I see that you got a lot of responses, but I didn't see anyone using
> what I use.  I had problems using rand() because it wasn't quite random
> enough.  The following code is as random as you can get (at least from
> what I've seen).
>
> mt_srand ((double) microtime() * 100);
> $myrandomnumber = mt_rand($min_number, $max_number);
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP] Hello

2001-01-17 Thread Karl J. Stubsjoen

Hello,

I'm an ASP guy gone PHP.  So, be patient with me as I struggle my way with
PHP.  I have a some experience with writing C like syntax, as with
JavaScript and TCL.  I hope to pick up PHP quickly.

2 Questions:
How to declare function and sub routines.
How to call functions and sub routines.

Thanks!




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




Re: [PHP] Hello

2001-01-17 Thread Augusto Cesar Castoldi

You can take a look here:

http://www.php.net/manual/en/html/functions.html

It's the documentation of PHP.

regards,

Augusto Cesar Castoldi

On Wed, 17 Jan 2001, Karl J. Stubsjoen wrote:

> Hello,
> 
> I'm an ASP guy gone PHP.  So, be patient with me as I struggle my way with
> PHP.  I have a some experience with writing C like syntax, as with
> JavaScript and TCL.  I hope to pick up PHP quickly.
> 
> 2 Questions:
> How to declare function and sub routines.
> How to call functions and sub routines.
> 
> Thanks!
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


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




Re: [PHP] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread Chris Lee

I use ultraedit 8.0 this editor rocks :)

on a side note as someone else posted, 'everyone to their own' it dont
matter what editor you love as long as the work gets done.

Chris Lee
Mediawaveonline.com


""Murph"" <[EMAIL PROTECTED]> wrote in message
003201c08027$e886c480$[EMAIL PROTECTED]">news:003201c08027$e886c480$[EMAIL PROTECTED]...
Hi.

FrontPage sucks for working with PHP.

I've been doing all my coding by hand and that's fine as far as it goes but
I just got a promotion at work where everyone uses FrontPage so I bought it
to see how I can use it to show these old dogs some new tricks.

Nice program. Allows for workgroups where different people can work on
different parts of a project. That'll come in handy. It also has some nice
tree charts to show you where the project is branching out and generates
some useful reports like where the dead links are.

What I *really* liked about it was the ability to apply a common theme
across all my pages. Man, that was pretty cool. Plus, let's face it, using
an HTML editor really takes some of the drudgery out of designing your
pages.

The problem is, if the web page that is designed with FrontPage doesn't end
with a regularly accepted filename extension like *.htm, FrontPage doesn't
seem to really know how to handle it and I need it to handle pages that end
with *.php.

What are my options? I don't think I missed anything with FrontPage after
scouring the manual and online and inline help pages.

Anyone out there using an HTML editor that they'd like to recommend? Why?
Are there any FAQs I should be reading for this answer?

Maybe I should just use a style sheet for a common look and for the rest,
suck it up and take it like a man?

Yours,
Murph

www.murphatnight.com
__
Brian Murphy - 193A Lowell St., Apt. 24 - Methuen, MA 01844 - (978) 725-6654





-- 
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] Matching irregular cases

2001-01-17 Thread jalist

I think this'll be an easy one for you fellas...
I'm writing a search function for my site. The code to search the mysql db's
are in place and working but here's the problem. For any matches that are
displayed, I want to change the search query so it stands out in the result
list. I'm just using...
ereg_replace($search_query, "$search_query", $row[6]);
...at the moment, but it wont match results where the case doesn't match.
Ie if the search query is "blah", the mysql search will return both "blah"
and "Blah" but the ereg_replace will only add the  tag to the "blah"
result, not the "Blah" one.

Thanks in advance.

Steve


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




Re: [PHP] Question concerning performance

2001-01-17 Thread Toby Butzon

> Example ONE:  (in just parse mode)
> [cut]---
>  print "blah blah blah blah blah blah blah";
> print "" . $Var1 . "" . $Var2 . "";
> ?>
> [/cut]--

Ran a pretty rough benchmark: 10040 lines of code (5020 repetitions of the
above example) 10 times with an average execution time of 6.07904628515244
seconds.


> Example TWO:  (in html && parse mode)
> [cut]---
> blah blah blah blah blah blah blah
> 
> [/cut]--

Same benchmark, except these two lines were used instead of the two lines
in the above case (obviously). Again, 10 executions; this time the average
execution time was 6.40339350700379 seconds.

There are 100 ways error could've been introduced into this test; even so,
the results seem to lean towards not switching between html & php modes...
although, you're talking about 1000 lines of code, and the test used 10
times that, and the resulting difference was a little more than 3 tenths of
a second... if you compared it with 1/10th of the code (your 1000 line
file), you'd probably have a difference in the hundredths-of-a-second
range.

It's up to you, but I agree with what Christian said - I'd probably shoot
for being able to maintain the code; with such a little speed difference
you might as well set up more servers than optimize for 1/5th of a second
in execution time.

--Toby


-- 
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] Matching irregular cases

2001-01-17 Thread Robert Collins

Steve,

Try the ereg_replace()somthing like this:

eregi_replace($search_query, "$search_query", $row[6]);


Robert W. Collins
Web Developer II
Insight / TC Computers
www.insight.com
www.tccomputers.com


-Original Message-
From: jalist [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 8:47 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Matching irregular cases


I think this'll be an easy one for you fellas...
I'm writing a search function for my site. The code to search the mysql db's
are in place and working but here's the problem. For any matches that are
displayed, I want to change the search query so it stands out in the result
list. I'm just using...
ereg_replace($search_query, "$search_query", $row[6]);
...at the moment, but it wont match results where the case doesn't match.
Ie if the search query is "blah", the mysql search will return both "blah"
and "Blah" but the ereg_replace will only add the  tag to the "blah"
result, not the "Blah" one.

Thanks in advance.

Steve


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



RE: [PHP] Matching irregular cases

2001-01-17 Thread jalist

(/me smacks head) thanks, completely forgot about that.

Steve

-Original Message-
From: Robert Collins [mailto:[EMAIL PROTECTED]]
Sent: 17 January 2001 15:57
To: 'jalist'; [EMAIL PROTECTED]
Subject: RE: [PHP] Matching irregular cases


Steve,

Try the ereg_replace()somthing like this:

eregi_replace($search_query, "$search_query", $row[6]);


Robert W. Collins
Web Developer II
Insight / TC Computers
www.insight.com
www.tccomputers.com



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




Re: [PHP] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread Jerry

In article <008301c0803a$ff59af20$[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] ("Murph") wrote:
> But, you know, the look and feel of a site is pretty important and an 
> HTML editor goes a long way toward managing that part. If you can 
> find an editor that helps you set up some style sheets that carry 
> across all your pages without you having to type in all the code for 
> every page, you're golden. 

Why would you type in style sheet code on every page if you do it by 
hand? Doesn't that defeat half the purpose of style sheets?

Jerry
-- 
http://www.hoboes.com/jerry/
"Give a man a fish and you feed him for a day. Teach him to fish, and you've
depleted the lake."--It Isn't Murder If They're Yankees
(http://www.hoboes.com/jerry/Murder/)

-- 
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] Matching irregular cases

2001-01-17 Thread Toby Butzon

> displayed, I want to change the search query so it stands out in the
result
> list. I'm just using...
> ereg_replace($search_query, "$search_query", $row[6]);
> ...at the moment, but it wont match results where the case doesn't match.

Try eregi_replace...

php.net/eregi_replace

--Toby


-- 
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-i18n Digest 17 Jan 2001 14:46:53 -0000 Issue 45

2001-01-17 Thread php-i18n-digest-help


php-i18n Digest 17 Jan 2001 14:46:53 - Issue 45

Topics (messages 101 through 101):

Press R: Letting you know about Emma
101 by: Justice For Emma

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]


--



Emma may not have received quite as much publicity as Elian Gonzalez did, b=
ut=20
her story is similar. International Child Abduction: US and Canadian privat=
e=20
social services abducts Emma and protects its secrecy...the first of its ki=
nd=20
in history! Why do they want to keep Emma's name secret?

Emma needs your Attention:
http://members.tripod.com/justiceforemma/index.htm




[PHP] Change the session timeout within a php-script

2001-01-17 Thread Jens Rehpöhler

Hi,

is it possible to change the session timeout from within a script. I can't
change it in the *.ini-file because I have not the sufficient access rights.

Jens




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

2001-01-17 Thread Karl J. Stubsjoen

Okay,
There aren't Sub Routines, just Functions?  I've been to the manual
recommended by Augusto *thank you*, that is helping!
I created a function called Foo with a single argument (and I set it up as
optional, that is way cool, I can't do that in ASP) ... and my question is:

I can call foo like this

echo foo(dog);// outputs "This is a dog"
or like this
echo foo('dog');// outputs "This is a dog"
or like this
echo foo("dog");// outputs "This is a dog"

Does it matter which way I pass my arguments to foo?  All arguments were
passed as a string variable.


-- 
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] Problem with Exec()

2001-01-17 Thread Zbyněk Škvor

Hello,

Is there anybody in this conference who can tell me whether exec() will work
under WinNT in future PHP releases?

I am bound to use Windows. Currently I am working this around so that I have a
daemon under NT. Daemon watches out for commands, written by PHP into a file,
and does the exec() job on his own. PHP then reads results from another file

It works, but I hate it 

Thanks Zbynek

Jon Haworth wrote:

> |
> | It should also be noted that the system interaction functions (namely,
> | passthru(), exec(), system() and popen()) are
> | broken/incorrectly implemented,
> | actually, its windows that's incorrectly implemented, but be
> | that as it may, the
> | functions do not work with windows).
>
> Well, I guess that clears that up... cheers Mr. Gates
>
> |
> | To the original poster:
> |
>
> Hello
>
> |   Use PHP's built-in mail() function instead, don't fork
> | out to sendmail,
> | actually, better yet, use linux :-).
>
> I spotted the mail() function about ten minutes after I posted... (and I
> would be on a linux box if I could persuade my boss)
>
> Cheers
> Jon
>
> --
> 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]

--
---
 Zbynek Skvor
 Coordinator
 Region 8 IEEE Voluntary Contribution Fund
mail:  [EMAIL PROTECTED]
fax:   +420-2-3119958
www:   http://www.cvut.cz/ascii/fee/k317/personnel/skvor



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

2001-01-17 Thread Toby Butzon

> echo foo(dog);// outputs "This is a dog"

This is an example of using a "bareword" - PHP doesn't recognize _dog_ as
any sort of reserved word or constant, so it sends it like a quoted string.
I don't recommend using this because it's ambiguous whether you mean "dog"
or if _dog_ is a constant or whatever else is possible.

> echo foo('dog');// outputs "This is a dog"

Single-quoted string: this is good for strings that don't need to be
"interpretted" by the parser; it's the ideal way to pass the string 'dog'
to foo() in this case.

> echo foo("dog");// outputs "This is a dog"

Double-quoted string: this WILL be interpretted by the parser; for example,
if you had to pass the whole string "This is a dog" to the function, but
"dog" could actually be any word contained in $thing, then you'd do
something like this:

echo foo("This is a $thing");

Et cetera...

>
> Does it matter which way I pass my arguments to foo?  All arguments were
> passed as a string variable.

There are some very slight performance changes between these, but mostly
it's a matter of style.

--Toby


-- 
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] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread Matthew Aznoe

Have any of you tried using EditPlus?  (www.editplus.com)  This is a great
little editor for HTML, JavaScript, and PHP.  You can download extra modules
for color syntax hilighting of practically any language you can think of
including many different databases.  It has some nice useful HTML features
and good handling of multiple documents... and most importantly, you don't
have to worry about it mangling your code.  It is helpful while also staying
out of your way.  The more I use it, the more I like it.  It is simple,
elegant, and it gives me all the control that I want.  Its inexpensive and
comes with a thirty day trial.  Check it out.

BTW, I do not work for EditPlus or have any association with them other than
that of a satisfied customer.

Matthew Aznoe



-- 
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] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread Dan Wright

Homesite from Allaire - although $99US is what I have been using for years.

I really like it for editing PHP, HTML, and JavaScript.

Dan

""Murph"" <[EMAIL PROTECTED]> wrote in message
003201c08027$e886c480$[EMAIL PROTECTED]">news:003201c08027$e886c480$[EMAIL PROTECTED]...
Hi.

FrontPage sucks for working with PHP.

I've been doing all my coding by hand and that's fine as far as it goes but
I just got a promotion at work where everyone uses FrontPage so I bought it
to see how I can use it to show these old dogs some new tricks.

Nice program. Allows for workgroups where different people can work on
different parts of a project. That'll come in handy. It also has some nice
tree charts to show you where the project is branching out and generates
some useful reports like where the dead links are.

What I *really* liked about it was the ability to apply a common theme
across all my pages. Man, that was pretty cool. Plus, let's face it, using
an HTML editor really takes some of the drudgery out of designing your
pages.

The problem is, if the web page that is designed with FrontPage doesn't end
with a regularly accepted filename extension like *.htm, FrontPage doesn't
seem to really know how to handle it and I need it to handle pages that end
with *.php.

What are my options? I don't think I missed anything with FrontPage after
scouring the manual and online and inline help pages.

Anyone out there using an HTML editor that they'd like to recommend? Why?
Are there any FAQs I should be reading for this answer?

Maybe I should just use a style sheet for a common look and for the rest,
suck it up and take it like a man?

Yours,
Murph

www.murphatnight.com
__
Brian Murphy - 193A Lowell St., Apt. 24 - Methuen, MA 01844 - (978) 725-6654





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




Re: [PHP] Change the session timeout within a php-script

2001-01-17 Thread Toby Butzon

set_time_limit($seconds)

--Toby

- Original Message -
From: "Jens Rehpöhler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 9:02 AM
Subject: [PHP] Change the session timeout within a php-script


> Hi,
>
> is it possible to change the session timeout from within a script. I
can't
> change it in the *.ini-file because I have not the sufficient access
rights.
>
> Jens
>
>
>
>
> --
> 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]




RE: [PHP] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread Scott Gerhardt

It is NOT ported to Linux is it?
I couldn't find any information on the website indicating weather it was
compiled for *NIX or not.

- Scott

> Have any of you tried using EditPlus?  (www.editplus.com)  This is a great
> little editor for HTML, JavaScript, and PHP.  You can download
> extra modules
> for color syntax hilighting of practically any language you can think of
> including many different databases.  It has some nice useful HTML features
> and good handling of multiple documents... and most importantly, you don't
> have to worry about it mangling your code.  It is helpful while
> also staying
> out of your way.  The more I use it, the more I like it.  It is simple,
> elegant, and it gives me all the control that I want.  Its inexpensive and
> comes with a thirty day trial.  Check it out.
>
> BTW, I do not work for EditPlus or have any association with them
> other than
> that of a satisfied customer.
>
> Matthew Aznoe
>
>


-- 
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] ASP to PHP

2001-01-17 Thread Karl J. Stubsjoen

Is there such thing as program that will convert ASP code to PHP code?  I
have built some nice libraries with ASP and am interested in converting
those over to PHP, rather than rewriting them!

Thanks!


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




Re: [PHP] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread Toby Butzon

Nope. EditPlus is Windows-only.

--Toby

- Original Message -
From: "Scott Gerhardt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Php-General-Digest"
<[EMAIL PROTECTED]>; "Chris Aitken" <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 11:54 AM
Subject: RE: [PHP] I love/hate FrontPage - need another HTML editor.


> It is NOT ported to Linux is it?
> I couldn't find any information on the website indicating weather it was
> compiled for *NIX or not.
>
> - Scott
>
> > Have any of you tried using EditPlus?  (www.editplus.com)  This is a
great
> > little editor for HTML, JavaScript, and PHP.  You can download
> > extra modules
> > for color syntax hilighting of practically any language you can think
of
> > including many different databases.  It has some nice useful HTML
features
> > and good handling of multiple documents... and most importantly, you
don't
> > have to worry about it mangling your code.  It is helpful while
> > also staying
> > out of your way.  The more I use it, the more I like it.  It is simple,
> > elegant, and it gives me all the control that I want.  Its inexpensive
and
> > comes with a thirty day trial.  Check it out.
> >
> > BTW, I do not work for EditPlus or have any association with them
> > other than
> > that of a satisfied customer.
> >
> > Matthew Aznoe
> >
> >
>
>
> --
> 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]




Re: [PHP] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread Alexander Wagner

Scott Gerhardt wrote:
> It is NOT ported to Linux is it?
> I couldn't find any information on the website indicating weather it was
> compiled for *NIX or not.

Use emacs. Or vi. Or quanta. Or something else.

Wagner

-- 
One maniac alone can do what 20 together cannot

-- 
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] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread Matthew Aznoe

Sadly, no.  As far as I know, it is a completely windows product.  I am
currently developing on a Windows box using Samba to access the files on my
UNIX box from windows.  Its not necessarily the best way of doing things and
it requires two computers, but it seems to get the job done, and since I
need to use Windows anyway for my company's standards of MS Office and
Outlook, its tolerable.

When running exclusively in UNIX, I run Elvis, a graphical vi with syntax
hilighting.  XEmacs also is not a bad option, but Elvis is much faster.

Matthew Aznoe


-Original Message-
From: Scott Gerhardt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 9:54 AM
To: [EMAIL PROTECTED]; Php-General-Digest; Chris Aitken
Subject: RE: [PHP] I love/hate FrontPage - need another HTML editor.


> It is NOT ported to Linux is it?
> I couldn't find any information on the website indicating weather it was
> compiled for *NIX or not.
>
>   - Scott

>> Have any of you tried using EditPlus?  (www.editplus.com)  This is a
great
>> little editor for HTML, JavaScript, and PHP.  You can download
>> extra modules
>> for color syntax hilighting of practically any language you can think of
>> including many different databases.  It has some nice useful HTML
features
>> and good handling of multiple documents... and most importantly, you
don't
>> have to worry about it mangling your code.  It is helpful while
>> also staying
>> out of your way.  The more I use it, the more I like it.  It is simple,
>> elegant, and it gives me all the control that I want.  Its inexpensive
and
>> comes with a thirty day trial.  Check it out.
>>
>> BTW, I do not work for EditPlus or have any association with them
>> other than
>> that of a satisfied customer.
>>
>> Matthew Aznoe
>>
>>



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

2001-01-17 Thread Michael Zornek

I'm a PHP newbie and am looking into using the include statement to 
put things like the header and footer in so they are always the same.

I do this now with SSI. In SSI I'll use the following statement:



I like this cause it lets me use the same statement all over the site 
and I don't have to worry about where the document is and how many 
directories i have to go up an into "../../../../../"

I was guessing PHP's version would be:



However I get an error. If I put the absolute it works:



which is scary cause this worked too:



doesn't this seem like a huge security hole?

Well what I want is to use something like /inc/footer.html so i can 
use the same PHP statements in any document and not worry about 
getting it "../../../"

Any suggestions.
Mike


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

2001-01-17 Thread Adam Wright

This is because the PHP include statement is ment to include other blocks of
PHP code, rather than bits of HTML. Hence, it includes things from anywhere
on the system. To include things from under your current htdocs directory,
use...

include($DOCUMENT_ROOT . "/includes/metatags.include");

though the more 'correct' method would be

readfile($DOCUMENT_ROOT . "/includes/metatags.include");

adamw

- Original Message -
From: "Michael Zornek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 5:04 PM
Subject: [PHP] include statement


> I'm a PHP newbie and am looking into using the include statement to
> put things like the header and footer in so they are always the same.
>
> I do this now with SSI. In SSI I'll use the following statement:
>
> 
>
> I like this cause it lets me use the same statement all over the site
> and I don't have to worry about where the document is and how many
> directories i have to go up an into "../../../../../"
>
> I was guessing PHP's version would be:
>
>  include("/includes/metatags.include");
> ?>
>
> However I get an error. If I put the absolute it works:
>
>  include("/home/httpd/includes/metatags.include");
> ?>
>
> which is scary cause this worked too:
>
>  include("/usr/local/apache/conf/httpd.conf");
> ?>
>
> doesn't this seem like a huge security hole?
>
> Well what I want is to use something like /inc/footer.html so i can
> use the same PHP statements in any document and not worry about
> getting it "../../../"
>
> Any suggestions.
> Mike
>
>
> --
> 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]




Re: [PHP] include statement

2001-01-17 Thread Toby Butzon

This all depends on your include_path set in the PHP config files; see the
manual section on config for more info.

About the security hole... yes it would be dangerous on a system where
accounts are given to untrusted users (ie, customers), but there are ways
to make PHP secure for multi-account environments as well; this is also is
described in the manual.

php.net/manual

--Toby

- Original Message -
From: "Michael Zornek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 12:04 PM
Subject: [PHP] include statement


> I'm a PHP newbie and am looking into using the include statement to
> put things like the header and footer in so they are always the same.
>
> I do this now with SSI. In SSI I'll use the following statement:
>
> 
>
> I like this cause it lets me use the same statement all over the site
> and I don't have to worry about where the document is and how many
> directories i have to go up an into "../../../../../"
>
> I was guessing PHP's version would be:
>
>  include("/includes/metatags.include");
> ?>
>
> However I get an error. If I put the absolute it works:
>
>  include("/home/httpd/includes/metatags.include");
> ?>
>
> which is scary cause this worked too:
>
>  include("/usr/local/apache/conf/httpd.conf");
> ?>
>
> doesn't this seem like a huge security hole?
>
> Well what I want is to use something like /inc/footer.html so i can
> use the same PHP statements in any document and not worry about
> getting it "../../../"
>
> Any suggestions.
> Mike
>
>
> --
> 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]




Re: [PHP] include statement

2001-01-17 Thread Alexander Wagner

Michael Zornek wrote:
> which is scary cause this worked too:
>
>  include("/usr/local/apache/conf/httpd.conf");
> ?>
>
> doesn't this seem like a huge security hole?

No. If you know can trust your scripts, this is possible, but trusted scripts 
won't do any abuse, will they?
If you can't trust your scripts, use safe-mode, and it isn't possible any 
more.

Wagner

-- 
One maniac alone can do what 20 together cannot

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

2001-01-17 Thread Michael Zornek

Adam(and everyone else who answers in 5 minutes, god i love this list),

thanks for the help.

Why is readfile more 'correct'?

Just wondering?
Mike

At 5:07 PM + 1/17/01, Adam Wright wrote:
>This is because the PHP include statement is ment to include other blocks of
>PHP code, rather than bits of HTML. Hence, it includes things from anywhere
>on the system. To include things from under your current htdocs directory,
>use...
>
>include($DOCUMENT_ROOT . "/includes/metatags.include");
>
>though the more 'correct' method would be
>
>readfile($DOCUMENT_ROOT . "/includes/metatags.include");
>
>adamw
>
>- Original Message -
>From: "Michael Zornek" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, January 17, 2001 5:04 PM
>Subject: [PHP] include statement
>
>
>>  I'm a PHP newbie and am looking into using the include statement to
>>  put things like the header and footer in so they are always the same.
>>
>>  I do this now with SSI. In SSI I'll use the following statement:
>>
>>  
>>
>>  I like this cause it lets me use the same statement all over the site
>>  and I don't have to worry about where the document is and how many
>>  directories i have to go up an into "../../../../../"
>>
>>  I was guessing PHP's version would be:
>>
>>  >  include("/includes/metatags.include");
>>  ?>
>>
>>  However I get an error. If I put the absolute it works:
>>
>>  >  include("/home/httpd/includes/metatags.include");
>>  ?>
>>
>>  which is scary cause this worked too:
>>
>>  >  include("/usr/local/apache/conf/httpd.conf");
>>  ?>
>>
>>  doesn't this seem like a huge security hole?
>>
>>  Well what I want is to use something like /inc/footer.html so i can
>>  use the same PHP statements in any document and not worry about
>>  getting it "../../../"
>>
>>  Any suggestions.
>>  Mike
>>
>>
>>  --
>>  PHP General Mailing List (http://www.php.net/)
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>  To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>>


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




[PHP] Apache .htaccess Help (OT)

2001-01-17 Thread Website4S

Hi,

Sorry this is off topic but I just can`t find anywhere with reliable 
information to help me get my .htaccess working on my server. I have followed 
many tutorials and none of them give me a working password protected dir, so 
if anyone can help I would appreciate it.

My .htaccess file is as follows:

AuthUserFile /usr/home/ukgs/volunteer/.htpasswd 
AuthGroupFile /dev/null 
AuthName Bill's Restaurant 
AuthType Basic 


require user shaun101
 

And My .htpasswd file just contains the user shaun101 with the scrambled up 
password. They are both in the same directory so when I log into my server I 
first click usr then home etc etc. But for some reason no matter what I do I 
still get direct access to the directory volunteer when I go to it in a 
browser.

Anyone have any ideas what I`m doing wrong??

TIA 
Ade

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




[PHP] Can I fork a PHP thread?

2001-01-17 Thread Dylan McNamee

There are occasions when I'd like to execute some long-running task
in the background, in response to some user action.  It seems that
PHP has all the neccesary mechanisms to allow me to do this, but
in my perusing of the manuals/FAQ's/digests, etc, I don't see such 
a facility.  

For example, I'd like to do something like this:

function long_running_background_task() 
{
...
}

function handle_some_action() 
{
...
fork (long_running_background_task);
}

In the cases I'd like to do this, I can manage synchronization
externally...
(i.e., implement join by waiting for a /tmp file to appear or
something),
so I'm not asking for a join, or any sychronization facilities.

Does anyone agree that this would be useful?  Is there another way to
accomplish this? Better yet, does this function already exist, but has
managed to hide for all this time...?

thanks,
dylan

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

2001-01-17 Thread Adam Wright

For your things (where you are including HTML), readfile just reads a file
and dumps it to the screen. This is fine, because you are just dealing with
HTML, so no processing is required. include will actually try and parse the
file as if it has PHP inside somewhere, which your HTML (probably) doesnt.
So, readfile uses less resources, and is much more like the SSI include
statement than PHP's include :)

adamw

- Original Message -
From: "Michael Zornek" <[EMAIL PROTECTED]>
To: "Adam Wright" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 5:14 PM
Subject: Re: [PHP] include statement


> Adam(and everyone else who answers in 5 minutes, god i love this list),
>
> thanks for the help.
>
> Why is readfile more 'correct'?
>
> Just wondering?
> Mike
>
> At 5:07 PM + 1/17/01, Adam Wright wrote:
> >This is because the PHP include statement is ment to include other blocks
of
> >PHP code, rather than bits of HTML. Hence, it includes things from
anywhere
> >on the system. To include things from under your current htdocs
directory,
> >use...
> >
> >include($DOCUMENT_ROOT . "/includes/metatags.include");
> >
> >though the more 'correct' method would be
> >
> >readfile($DOCUMENT_ROOT . "/includes/metatags.include");
> >
> >adamw
> >
> >- Original Message -
> >From: "Michael Zornek" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Wednesday, January 17, 2001 5:04 PM
> >Subject: [PHP] include statement
> >
> >
> >>  I'm a PHP newbie and am looking into using the include statement to
> >>  put things like the header and footer in so they are always the same.
> >>
> >>  I do this now with SSI. In SSI I'll use the following statement:
> >>
> >>  
> >>
> >>  I like this cause it lets me use the same statement all over the site
> >>  and I don't have to worry about where the document is and how many
> >>  directories i have to go up an into "../../../../../"
> >>
> >>  I was guessing PHP's version would be:
> >>
> >>   >>  include("/includes/metatags.include");
> >>  ?>
> >>
> >>  However I get an error. If I put the absolute it works:
> >>
> >>   >>  include("/home/httpd/includes/metatags.include");
> >>  ?>
> >>
> >>  which is scary cause this worked too:
> >>
> >>   >>  include("/usr/local/apache/conf/httpd.conf");
> >>  ?>
> >>
> >>  doesn't this seem like a huge security hole?
> >>
> >>  Well what I want is to use something like /inc/footer.html so i can
> >>  use the same PHP statements in any document and not worry about
> >>  getting it "../../../"
> >>
> >>  Any suggestions.
> >>  Mike
> >>
> >>
> >>  --
> >>  PHP General Mailing List (http://www.php.net/)
> >>  To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>  For additional commands, e-mail: [EMAIL PROTECTED]
> >>  To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> >>
> >>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




[PHP-CVS] cvs: php4 /pear/HTML IT.php ITX.php /pear/PHPDoc prepend.php /pear/PHPDoc/redist IT.php ITX.php

2001-01-17 Thread Sebastian Bergmann

sbergmann   Wed Jan 17 08:15:18 2001 EDT

  Added files: 
/php4/pear/HTML IT.php ITX.php 

  Removed files:   
/php4/pear/PHPDoc/redistIT.php ITX.php 

  Modified files:  
/php4/pear/PHPDoc   prepend.php 
  Log:
  Move IT[x] to HTML/.
  

Index: php4/pear/PHPDoc/prepend.php
diff -u php4/pear/PHPDoc/prepend.php:1.1 php4/pear/PHPDoc/prepend.php:1.2
--- php4/pear/PHPDoc/prepend.php:1.1Sun Oct  8 03:03:18 2000
+++ php4/pear/PHPDoc/prepend.phpWed Jan 17 08:15:18 2001
@@ -44,9 +44,9 @@
 require( PHPDOC_INCLUDE_DIR . "xmlexporter/PhpdocXMLModuleExporter.php" );
 require( PHPDOC_INCLUDE_DIR . "xmlexporter/PhpdocXMLClassExporter.php" );
 
-// Redistributed IT[X] Templates from the PHPLib
-require( PHPDOC_INCLUDE_DIR . "redist/IT.php" );
-require( PHPDOC_INCLUDE_DIR . "redist/ITX.php" );
+// IT[X] Templates
+require_once "HTML/IT.php";
+require_once "HTML/ITX.php";
 
 // XML Reader
 require( PHPDOC_INCLUDE_DIR . "xmlreader/PhpdocXMLReader.php" );

Index: php4/pear/HTML/IT.php
+++ php4/pear/HTML/IT.php
http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to   |
// | obtain it through the world-wide-web, please send a note to  |
// | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
// +--+
// | Authors: Ulf Wendel <[EMAIL PROTECTED]>   |
// +--+
//
// $Id: IT.php,v 1.1 2001/01/17 16:15:17 sbergmann Exp $
//

/**
* Integrated Template - IT
* 
* Well there's not much to say about it. I needed a template class that
* supports a single template file with multiple (nested) blocks inside.
* 
* Usage:
* $tpl = new IntegratedTemplate( [string filerootdir] );
* 
* // load a template or set it with setTemplate()
* $tpl->loadTemplatefile( string filename [, boolean removeUnknownVariables, boolean 
removeEmptyBlocks] )
*
* // set "global" Variables meaning variables not beeing within a (inner) block
* $tpl->setVariable( string variablename, mixed value );
* 
* // like with the Isotopp Templates there's a second way to use setVariable()
* $tpl->setVariable( array ( string varname => mixed value ) );
* 
* // Let's use any block, even a deeply nested one
* $tpl->setCurrentBlock( string blockname );
*
* // repeat this as often as you neer. 
* $tpl->setVariable( array ( string varname => mixed value ) );
* $tpl->parseCurrentBlock();
*
* // get the parsed template or print it: $tpl->show()
* $tpl->get();
* 
* @author Ulf Wendel <[EMAIL PROTECTED]>
* @version  $Id: IT.php,v 1.1 2001/01/17 16:15:17 sbergmann Exp $
* @access   public
* @package  PHPDoc
*/
class IntegratedTemplate {

/**
* Contains the error objects
* @var  array
* @access   public
* @see  halt(), $printError, $haltOnError
*/
var $err = array();

/**
* Print error messages?
* @var  boolean
* @access   public
* @see  halt(), $haltOnError, $err
*/
var $printError = false;

/**
* Call die() on error?
* @var  boolean
* @access   public
* @see  halt(), $printError, $err
*/
var $haltOnError = false;

/**
* Clear cache on get()? 
* @var  boolean
*/ 
var $clearCache = false;

/**
* First character of a variable placeholder ( _{_VARIABLE} ).
* @var  string
* @access   public
* @see  $closingDelimiter, $blocknameRegExp, $variablenameRegExp
*/
var $openingDelimiter = "{";

/**
* Last character of a variable placeholder ( {VARIABLE_}_ ).
* @var  string
* @access   public
* @see  $openingDelimiter, $blocknameRegExp, $variablenameRegExp
*/
var $closingDelimiter   = "}";

/**
* RegExp matching a block in the template. 
* Per default "sm" is used as the regexp modifier, "i" is missing.
* That means a case sensitive search is done.
* @var  string
* @access   public
* @see  $variablenameRegExp, $openingDelimiter, $closingDelimiter
*/
var $blocknameRegExp= "[0-9A-Za-z_-]+";

/**
* RegExp matching a variable placeholder in the template.
* Per default "sm" is used as the regexp modifier, "i" is missing.
* That means a case sensitive search is done.
* @var  string  
* @access   public
* @see  $blocknameRegExp, $openingDelimiter, $closingDelimiter
*/
 

[PHP] Ok thanx sessions that was great, now it's time to go back home!!!

2001-01-17 Thread Brandon Orther

Hello,

I am getting started with session and really love the sessions to death, but
when I try to end a session I get an error.  Can someone give me an example
of code that ends a session.

Thank you,


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



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




[PHP-CVS] cvs: php4 /pear/HTML Processor.php

2001-01-17 Thread Sterling Hughes

sterlingWed Jan 17 08:34:06 2001 EDT

  Added files: 
/php4/pear/HTML Processor.php 
  Log:
  @ Add the HTML_Processor class which provides common functions for processing HTML.
  @ (Sterling)
  
  
  

Index: php4/pear/HTML/Processor.php
+++ php4/pear/HTML/Processor.php
http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to   |
// | obtain it through the world-wide-web, please send a note to  |
// | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
// +--+
// | Authors: Sterling Hughes <[EMAIL PROTECTED]>  |
// +--+
//
// $Id: Processor.php,v 1.1 2001/01/17 16:34:05 sterling Exp $
//
// HTML processing utility functions.
//

/**
 * TODO:
 *   -  Extend the XML_Parser module to provide HTML parsing abilities
 */

require_once('PEAR.php');

// {{{ HTML_Processor

$_HTML_Processor_translation_table = array();

/**
 * The HTML_Processor class facilitates the parsing and processing of
 * HTML.  Currently only some basic functionality to process HTML is 
 * provided..
 *
 * @access public
 * @author Sterling Hughes <[EMAIL PROTECTED]>
 * @since  PHP 4.0.5
 */
class HTML_Processor extends XML_Parser
{
// {{{ HTML_Processor()

function HTML_Processor()
{
global $_HTML_Processor_translation_table;
$_HTML_Processor_translation_table = get_html_translation_table();
}

// }}}
// {{{ ConvertSpecial()

/**
 * Convert special HTML characters (like ©) into their ASCII
 * equivalents.
 *
 * @param  string &$text The text to convert
 *
 * @access public
 * @author Sterling Hughes <[EMAIL PROTECTED]>
 * @since  PHP 4.0.5
 */
function ConvertSpecial(&$text)
{
global $_HTML_Processor_translation_table;

$text = strtr($text, 
  array_keys($_HTML_Processor_translation_table), 
  
array_flip(array_values($_HTML_Processor_translation_table)));
}

// }}}
// {{{ ConvertASCII()

/**
 * Convert ASCII characters into their HTML equivalents (ie, ' to 
 * ").
 *
 * @param  string &$text The text to convert
 *
 * @access public
 * @author Sterling Hughes <[EMAIL PROTECTED]>
 * @since  PHP 4.0.5
 */
function ConvertASCII(&$text)
{
global $_HTML_Processor_translation_table;

$text = strtr($text,
  
array_flip(array_values($_HTML_Processor_translation_table)), 
  array_keys($_HTML_Processor_translation_table));
}

// }}}
}

// }}}
?>


-- 
PHP CVS 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] Ok thanx sessions that was great, now it's time to go backhome!!!

2001-01-17 Thread andy

> I am getting started with session and really love the sessions to death, but
> when I try to end a session I get an error.  Can someone give me an example
> of code that ends a session.

What is the error that you get?  What is the code you're now using that
causes the error?

It's like saying to your mechanic "When I do something in my car, it makes
a noise."

xxo,
Andy

-- 
# Andy Lester  http://www.petdance.com  AIM:petdance
%_=split';','.; Perl ;@;st a;m;ker;p;not;o;hac;t;her;y;ju';
print map $_{$_}, split //,
'[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]




  1   2   3   4   >