php-general Digest 17 Jan 2001 15:29:07 -0000 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 "display" formats changing.

2) You can use a DTD (Document Type Definition) to create the compliance
    part of what I like to call a "data contract" - two or more parties can
    agree on a data format that suits them. The contract is "if you give
    me data in this format I can process" it. XML allows you to
     (a) have a standard way to write these "contracts"
     (b) provided standard tools to check whether the "contract
         conditions" have been met

3) If you are creating more than one kind of output, you need to be able
     to store the original content in such a way that it is easy to
     create the different kinds of output.

What this means is that one of the most currently useful places to use XML
a *storage* format. If all you are doing with you data is delivering
it in a bland way to Web browsers, then you may as well just use HTML.
If you have to deliver two kinds of HTML ( eg: frames/ no frames ) and
set of PDF files, then XML is an excellent way to store your data - there
are heaps of tools out there than can easily do the transformations.


Re Tools: the other posters have done quite a good job of summarising
    some of the tools and standards. I will only add a couple of
    things.

1) Calling "DOM" the big brother of "SAX" is not really correct - they
    are more like cousins. They each have their place and used for
    different things. If you need to be able to arbitrarily rearrange
    the elements of an XML "tree" into weird and interesting shapes then
    go with the "DOM" but don't expect to process anything larger than
    about 1MB. When speed and size are an issue, you need to use
    a serial/event driven processor such as Omnimark or a SAX tool.

2) What I understand about XSLT is
     a) It is a tree based processor so you have all the limitation
         of the "DOM"
     b) It is an absolute pig to write code in by hand
    but other than that it's fine .....



Regs

Brian White
-------------------------
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy

http://www.steptwo.com.au/
[EMAIL PROTECTED]





On Tue, 16 Jan 2001, Alex Black wrote:

> for example, a DTD for that bookmark example above is unly useful if a bunch
> of people agree on it as a standard, otherwise it doesn't do any real good.

And to cite an example for this example, I'll point out XBEL, because as
bookmark DTD goes, I think this one has done an excellent job of being
well defined, and yet easy to extend in the same breath.

http://pyxml.sourceforge.net/topics/xbel/

Matt





You could loop it with foreach (which I think is the same way Perl handles
the ex you gave).

foreach ($myArr as $myStr) {
    $myStr = ereg_replace($regexp, $myStr);
}

Note quite "one statement", but if you really wanted to shorted it (and in
the opinion of most sacrafice readability), you could say:

foreach ($myArr as $myStr) $myStr = ereg_replace(...etc...);

--Toby

----- Original Message -----
From: "Elliot L. Tobin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 11:59 AM
Subject: [PHP] regexps


> Is there a way to call one regexp on multiple variables, in one
statement?
> In Perl, I'd do:
>
> s/this/that for ($var1, $var2, $var3);
>
> tia.. and please reply directly.
>
> [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]
>
>





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

On Monday, January 15, 2001, at 04:03 PM, Thomas Deliduka wrote:

> When I look at the website (http://www.zend.com/zend/optimizer/) it says it 
> works with PHP Version 4.0.3 or 4.0.3pl1 it says no early or later versions 
> of PHP are supported so I would htink that is the reason why it's not 
> working. 
>  
> On 1/15/01 3:07 PM this was written: 
>  
> > I have download the Zend Optimizer (Running Apache 1.3.14 and PHP 4.04) and 
> > untarred it. Then I copied the ZendOptimizer.so to usr/local/Zend/lib Then I 
> > edited the PHP.ini and added: 
> >  
> > zend_optimizer.optimization_level=15 
> > zend_extension="/usr/local/Zend/lib/ZendOptimizer.so" 
> >  
> > Somewhere near the top. Then I restarted the server using apachectl restart. I 
> > also tried stopping and starting as well. It still isn't running? Any ideas. 
> > Is there anything else that needs to be done? 
>  
> --  
>  
> Thomas Deliduka 
> IT Manager 
>      ------------------------- 
> New Eve Media 
> The Solution To Your Internet Angst 
> http://www.neweve.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] 
>  
>  

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A. Peters
Abriasoft Senior Developer

(510)  623-9726x357
Fax: (510) 249-9125





"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






Having used both FrontPage and Dreamweaver in the past I have resorted back to a text 
editor.  Not that either was bad or good.  Just found that I had the best control when 
doing the writing myself. 

I currently use EditPlus2 for text editing.  It has everything I need and cost very 
little.  I use it for PERL, PHP, JavaScript, Java and even mySQL.  It allows you to 
format your own syntax highlighting and templates.

But no matter what you use, it's my belief that you must know how to code by hand if 
your going to get anywhere.  All the slamming people do around here about one editor 
(or platform) vs. another is kind-a childish.  Would anyone dog Rasmus Lerdorf if he 
used FrontPage or Larry Wall if he used a windows platform instead of a *nix.  I don't 
think so.  This guys got the respect they have not by what they used but what they 
developed. (Not that I know what they used and personally don't care)

So my point, if you made it this far, is use what's best for you and try different 
things till your satisfied.  Someone has already explain how to get FrontPage to work 
so I'll leave it at that.


James




A sincere "thank you" to James ;) I completely agree.

I thought about saying something but I'm so sick of the editor wars I
decided not to...

--Toby

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


Having used both FrontPage and Dreamweaver in the past I have resorted back
to a text editor.  Not that either was bad or good.  Just found that I had
the best control when doing the writing myself.

I currently use EditPlus2 for text editing.  It has everything I need and
cost very little.  I use it for PERL, PHP, JavaScript, Java and even mySQL.
It allows you to format your own syntax highlighting and templates.

But no matter what you use, it's my belief that you must know how to code
by hand if your going to get anywhere.  All the slamming people do around
here about one editor (or platform) vs. another is kind-a childish.  Would
anyone dog Rasmus Lerdorf if he used FrontPage or Larry Wall if he used a
windows platform instead of a *nix.  I don't think so.  This guys got the
respect they have not by what they used but what they developed. (Not that
I know what they used and personally don't care)

So my point, if you made it this far, is use what's best for you and try
different things till your satisfied.  Someone has already explain how to
get FrontPage to work so I'll leave it at that.


James






> Having used both FrontPage and Dreamweaver in the past I have resorted
back to a text editor.  Not that either was bad or good.  Just found that I
had the best control when doing the writing myself.



Hi, James.

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

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.

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.

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.

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

Yours,
Murph





>"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 <http://dewin.oldbattery.com/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 <http://dewin.oldbattery.com/>

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







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 <http://dewin.oldbattery.com/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 <http://dewin.oldbattery.com/>
>
>   "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]
>





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





> 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

  <link href="css/styles.css" rel="stylesheet" type="text/css">

in your <head>..</head> 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




hello!

What is the best user authentication methd for linux (apache)? and for windows (IIS)? 




fellas,
i built and tested my site on a linux machine, debian 2.2, with mysql 3.22.32
and php 4 (late something, standard debian 2.2) and now i have it on the net. i
am recieving this error, whereas it worked corretly locally

Warning: Supplied argument is not a valid MySQL result resource in
./comments.php on line 6


here is the code where this is coming from.

        mysql_select_db("jamesmc",$db);
        $result = mysql_query("SELECT * FROM comment WHERE pid='$poid' ORDER by
cid desc",$db);
        $comm = mysql_fetch_array($result);

any ideas?? i cannot think of what could be doing it. tried a while loop, no
good.

have a look at the site on the net,
http://www.kryptonlinux.com/jamesmc2/index.php


thanks,
jamesmc





Hey! adding to the question above: as a cgi version what are the authentications 
methods available?





Hi Guys!!

Below is my code:(which works but See the ourput on this page....please...

http://dhaval.isamillionaire.com/loop.php

<form action="<?php echo"$PHP_SELF"; ?>" method="post">
<input type="hidden" name="flag" value="0">
<select name="recepients" onchange="javascript:submit();">
      <option value="">--</option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      </select></form></td>
       </tr>
      </table>
<form action="sendmail.php">
 <?php
 if(isset($flag))
 {
 for($i=1; $i<=$recepients; $i++)
 {
 echo "<input type=\"text\" name=\"$i\">"  ."<br>";
 }
}
 else
 {
echo "<input type=\"text\" name=\"1\">";
 }
 
echo " <input type=\"submit\" value=\"Does it work\"></form>";
 ?>

I want to accomplish the above..any idea how is it possible..?

 

 

Thanx everybody..

Dhaval Desai

 

 

 

 



---------------------------------
Do You Yahoo!?
Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.




Hi

I have the following code which is created in a loop.

<tr>
  <td><?php print $SkyAccNo; ?></td>
  <td><?php print $SkyDateAss; ?></td>
  <td><?php print $SkyDateResult; ?></td>
  <td><input type="checkbox" name="<?php echo$SkyAccNo;?>" value="ON"></td>
</tr>

For example there will be three rows with different values and each checkbox will have 
a unique name.
On the next page once a submit button has been pushed I want to do:
sqlExecute( "Select * from SkyDiary where AccNo = (Here I want the value of the 
checkbox)

Do I use HTTP_POST_VARS here and if so how??
Thanks

Wade Halsey
[EMAIL PROTECTED]






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





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]




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






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





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





Thanx
This should make live a bit easier :) 


----- Original Message ----- 
From: "Niel Zeeman" <[EMAIL PROTECTED]>
To: "php gen list" <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 7:46 AM
Subject: [PHP] HELP! Date formatting


Hi

Ive gotto format a date such as 30/12/1956 to format 30-Dec-1956,
I can not use mktime cause that only provides the timestamp from 1970.
Is there any other method of getting this right.

thnx
Niel Zeeman
Tel(W): (043)7014247
Cell: 082 651 4083
eMail: [EMAIL PROTECTED]







Try this and see how far you get...

Niel Zeeman

----- Original Message ----- 
From: "Serge Montmarquette" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 7:54 PM
Subject: [PHP] win 2000 nt 5.0 and IIS


> 
> how can I make php work with this now!?
> 
> 
> -- 
> 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]
> 
> 
Installation Procedures for PHP4 on a Windows2K server

1)Copy the PHP files to a directory ( preferably a dos compatible named directory) on 
the server.

2)Copy the "php4ts.dll" to the \winnt\system32 directory.

3)If Interbase support in required and Interbase itself is not installed on the server 
copy the "gds32.dll" file that resides in the "dlls" directory of you PHP installation 
to the \winnt\system32.
3.1) Modify the php.ini file and set the "extension_dir" to the folder containing the 
extensions (e.g. extension_dir = C:\php\extensions ).
3.2) Uncomment the "extension=php_interbase.dll" line in the php.ini file.

4)Copy the php.ini to the winnt directory.

5)Open up the "Internet Services Manager"  under "Administrative Tools" on the start 
up menu.

6)Open up the "server name" to reveal the servers that are running.

7)Stop the "Default Web Site" server.

8)Right click on it and go to properties.

9)Under the "Default Web Site Properties" dialog select the "ISAPI Filters" Tab.

10)Click "Add" to add a new filter. 

11)In the "Filter Name" field enter "PHP" and in the "Executable" field use the 
"Browse" button to navigate to the "sapi" directory under the php installation and 
select the "php4isapi.dll" file.

12)Click "Apply" and "OK" on the "Filter Properties" dialog and click "Apply"  on the 
"Default Web Site Properties" dialog.

13)Next Click on the "Home Directory" tab and click the "Configuration" button to open 
up the "Application Configuration" dialog.

14)Click the "Add" button to add a new "Application Mapping".

15)On the "Add/Edit Application Extension Mapping" dialog click the "Browse" button, 
and navigate to the "php4isapi.dll" file as before.

16)Next enter the extension that you are going to use ( ".php" ).

17)Make sure that the "Script Engine" is ticket, and leave the rest as is.

18)Click "OK" and the "Apply" and "Close" on the "Application Configuration" dialog 
and then click "Apply" and "Close" on the "Default Web Site Properties" dialog as well.

19)Start the "Default Web Site" server again and you should have PHP installed and 
running. 




hi,

here you see our FLASHBOOK

its just flash4, php and mysql

www.artfuntasy.com

greetings

andre

----- Original Message -----
From: "Murph" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 3:45 AM
Subject: Re: [PHP] I love/hate FrontPage - need another HTML editor. ->
Dreamweaver 4


> > I use Macromedia Dreamweaver 4 - it's the best ever for HTML and others.
> It
> > recognizes the PHP extension and checks for syntax errors though it
> doesn't
> > check for errors in the PHP-languages.
>
>
> It seems like there's an awful lot of people jumping on the Macromedia
> editor bandwagon and after visiting their site, I can see why! Holy smoke!
> There's an awful lot there to recommend that product.
>
> My thanks to Kath for helping me get FrontPage up and running for my
> immediate needs and to everyone else who recommended their favorite
editor.
>
> Dreamweaver is on the pricey side at $300 bucks for their basic version
but
> to buy the editor AND have access to the flashy Flash technology for a few
> more bucks really makes it rather attractive.
>
> Has anyone gone whole-hog and developed a site with Flash graphics AND a
> database? THAT would be something to see. Hell, I'd pimp my mother to be
> able to do something like THAT!
>
> Only kidding, Mom! I love you!
>
> Yours,
> Murph
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





hi,

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/




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.





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





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-630810        FAX: +39-0481-630132






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 -

<<For phpMyAdmin>>
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

<<For Horde>>
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





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 -
>
> <<For phpMyAdmin>>
> 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
>
> <<For Horde>>
> 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]>






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 <?php phpinfo(); ?> 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 Support        enabled
JPG Support        enabled

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
                      Header("Content-type: image/png");
                      $string=implode($argv," ");
                      $im = imageCreateFromPng("images/button1.png");
                      $orange = ImageColorAllocate($im, 220, 210, 60);
                      $px = (imagesx($im)-7.5*strlen($string))/2;
                      ImageString($im,3,$px,9,$string,$orange);
                      ImagePng($im);
                      ImageDestroy($im);
?>






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]

 




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





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. <IMG SRC=/pix/dummy.gif> get changed
to <IMG SRC=/pix/dummy.gif?PHPSESSID=hqsgqsgsqg>.
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/




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. <IMG SRC=/pix/dummy.gif> get changed
>to <IMG SRC=/pix/dummy.gif?PHPSESSID=hqsgqsgsqg>.
>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







"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 dunno....if 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







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).

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

--
Rick Hodger






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.





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







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

 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




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?  <warning: untested idea> I'm wondering if you couldn't 
use an Apache <FILES> 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




>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





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






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





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






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






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]




Howdy,

I need to divide several attributes of a tag.
<div key1=val1 key2 = val2 key3='val3' key4 = "val4">
how can I do this without too many time lost?
Is it possible to do this with a regular expression?

Thomas





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.





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




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]---------------
<?
print "<html-tag>blah blah blah blah blah blah blah</html-tag>";
print "<html-tag>" . $Var1 . "</html-tag><b-tag>" . $Var2 . "</b-tag>";
?>
--------[/cut]--------------

Example TWO:  (in html && parse mode)
--------[cut]---------------
<html-tag>blah blah blah blah blah blah blah</html-tag>
<html-tag><?=$Var1;?></html-tag><b-tag><?=$Var2;?></b-tag>
--------[/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.





On Wednesday 17 January 2001 11:37, jeremy wrote:
> Example ONE:  (in just parse mode)
> --------[cut]---------------
> <?
> print "<html-tag>blah blah blah blah blah blah blah</html-tag>";
> print "<html-tag>" . $Var1 . "</html-tag><b-tag>" . $Var2 . "</b-tag>";
> ?>
> --------[/cut]--------------
>
> Example TWO:  (in html && parse mode)
> --------[cut]---------------
> <html-tag>blah blah blah blah blah blah blah</html-tag>
> <html-tag><?=$Var1;?></html-tag><b-tag><?=$Var2;?></b-tag>
> --------[/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




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





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






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!):
<html><body>
<? if (isset($x) and ($x=="A")) echo time();?>
<p><a href="submit.php?x=A">CLICK</a></p>
</body></html>

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






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





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




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.




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?






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:

<p>This page is copyright blah blah blah</p>
<p><a href="mailto:[EMAIL PROTECTED]">E-mail the webmaster</a></p>

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.




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





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:
<Files ~ "\.inc$">
    Order allow,deny
    Deny from all
</Files>

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




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:
> <Files ~ "\.inc$">
>     Order allow,deny
>     Deny from all
> </Files>
>
> 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]
>





<Files *.inc>
    Order allow,deny
    Deny from all
</Files>

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:
>
> <p>This page is copyright blah blah blah</p>
> <p><a href="mailto:[EMAIL PROTECTED]">E-mail the webmaster</a></p>
>
> 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]
>





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                         






Why not:

   <Files *.inc>
      order deny,allow
      deny from all
   </Files>


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."




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





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





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






> 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






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





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




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





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/




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]



Reply via email to