Re: [PHP] Encoder price too high (was: Zend hit)

2001-01-25 Thread Adam Wright

We are working on extending the APC cache (http://apc.communityconnect.com)
with an encoder, and already have a pretty much functioning version (though
its a bit of hack job at the moment :). I think the patches we made were
sent to the dev list, but I can send them around at request.

adamw

- Original Message -
From: "Adrian Teasdale" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Uioreanu Calin" <[EMAIL PROTECTED]>
Sent: Thursday, January 25, 2001 10:54 AM
Subject: [PHP] Encoder price too high (was: Zend hit)


>
> "Uioreanu Calin" <[EMAIL PROTECTED]> wrote in message
> > Hello,
> >
> > What do you think about Zend position?
>
> I thought I would reply to the list on this one, basically to see if I am
in
> the minority (and if so, I will shut up!)...
>
> Firstly, many people who use PHP do so to make money - I know I do!
> Therefore, I don't see anything wrong with the guys at Zend developing
> products that make my life easier, make PHP a better product and they can
> get paid for doing so.
>
> However, although I have said the above, I do feel that the price points
> that have been chosen are very disapointing, especially for the Encoder
> Unlimited which is priced at $6000.  The guys at Zend have raised
> expectations for their products since they launched their site and I have
> been looking forward to the Encoder (as it is now called) for most of that
> time.  I can only think that it is the much larger companies that can
afford
> this kind of price and I now feel that I cannot have a "feature" that I
had
> been waiting to use for some time.  Cold Fusion has a method of encryting
> it's code, and it comes like that out of the box (and at a much cheaper
> price).  What the guys at Zend are basically saying is that if you want to
> use the better product (ie PHP) and want the encryption functionality
found
> in products like Cold Fusion, then you are going to have to pay handsomely
> for it!  I would definitely have paid $1000 for the Unlimited Encoder, but
> no more than that.
>
> What does everyone else think?  Am I being unfair here in my assessment?
>
> I know that there has been an argument on the Zend site that "until 2 days
> ago, you were happy using PHP", but I disagree with that because I've been
> waiting so long for the Encoder knowing I needed it, and delaying on
> releasing a couple of low-cost ($20 each) apps until it was ready
>
> Finally, is there anything else out there either a) in the open source
> community or b) commercially available at a more sensible price?  If not,
> are there people on this list who could band together to develop something
> that competes against it?
>
> Any replies always appreciated :)
>
> 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 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] Compiler? (Was Re: [PHP] PHP site on CD-ROM)

2001-01-25 Thread Adam Wright

The compiler has become the encoder, because it's rather hard to meet the
expectations of a 'compiler' (many would expect it to produce binaries and
heavily optimised code). Encoder makes more sense, based on what the product
does.

adamw

- Original Message -
From: "Angus Mann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 25, 2001 11:41 AM
Subject: [PHP] Compiler? (Was Re: [PHP] PHP site on CD-ROM)


> At 22:35 18/01/01 -0800, Rasmus Lerdorf wrote:
>
> >You would need to go through a web server for it to work.
>
> I seem to recall seeing something on the Zend site a while back about a
> "compiler" for PHP that was in the pipeline. After the store was launched
I
> can't find anything. Am I imagining things, or does it look like Zend
> pulled the plug? Did anyone else in here see it? :)
>
> Thanks,
>
> Angus.
>
>
>
> >On Fri, 19 Jan 2001, Philip Apostol wrote:
> >
> > > Can I run a PHP/Apache/MySQL services on a CD-ROM.  We have PHP
scripts
> > that
> > > handle queries on a large database.  We would like to distribute it on
a
> > > CD-ROM so they could access the database offline.  Is it possible? Or
are
> > > there any similar solutions for this?  Im thinking of a text-file
database
> > > and access it via javascript but have no much time to study on
> > this.  If php
> > > can be run on the cd-rom, that would be a better solution.   But any
> > > solution you posted here will be highly appreciated.  Thanks in
advance.
> > >
> > > Philip
>
>
> --
> 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] Simple question!!!

2001-03-02 Thread Adam Wright

Don't use die (die just stops everything, nothing else gets send). 

> 
> Some Title
> 
>  $var = 1;
> if ($var == 1) {
> echo ("I'm dead");
> } else {
> echo "I'm alive";
> }
> ?>
> 
> 

- Original Message - 
From: "Ricardo D'Aguiar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 10:54 AM
Subject: [PHP] Simple question!!!


> Hi,
> Imagine the following script:
> 
> 
> Some Title
> 
>  $var = 1;
> if ($var == 1) {
> die ("I'm dead");
> }
> echo "I'm alive";
> ?>
> 
> 
> 
> If I try to execute via Internet Explorer ("5.x") apparently every thing
> works fine.
> It shows the string "I'm dead".
> 
> But if I use the Netscape 4.7x, I get a blank screen.
> When I view the Source Code ("HTML code in Netscape") it shows:
> 
> 
> Some Title
> 
> I'm dead
> 
> Netscape can't render the page if its missing the  and 
> tags in the end.
> I already used 'return' end 'exit' functions but with the same result.
> 
> There is some configuration parameter to the PHP server to send the rest
> of HTML code after exit the script or workaround?
> 
> 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] GTK-PHP install doubt?

2001-03-08 Thread Adam Wright

Make sure you're building against a 4.0.5 build of PHP. I tried this
afternoon with the latest PHP from snaps.php.net and the GTK bindings, and
it worked flawlessly.

adamw

- Original Message -
From: "Celestino Roberto Alejandro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 08, 2001 2:22 PM
Subject: [PHP] GTK-PHP install doubt?


> Friends,
>  i get the source of the GTK-PHP module, or library, as you want to say,
> but, when i going to do, the steps that describe in their
> ebpage( http://gtk.php.net/), i do
>
> phpize
> ./configure
> make (This failed)
> make install (obviously failed)
>
> When i do the make, this say that the function  php_if_gdk_window_new_dc
in
> php_gtk_types.c have too many arguments to function
> zend_hash_get_current_key_ex (316line)
> and all-recursive Error.
> Why could be this?
> 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] Generate Random Letters?

2001-03-09 Thread Adam Wright

I use something like...

function randString($sequence_length = 7)
  $possible_letters = "abcdefghijklmnopqrstuvwxzy";
  $sequence = ""

  while ($sequence_length--) {
$sequence .= $possible_letters[rand(0, strlen($possible_letters) - 1)];
  }

  return $sequence;
}

To create random strings. Just fill in $possible_letters with anything you
like

adamw


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 09, 2001 3:12 PM
Subject: [PHP] Generate Random Letters?


> I know it is possible to generate a random number using rand() I don`t
> suppose there is anyway to generate a random letter sequence that anyone
> knows of?
>
> 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 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] Permission denied

2001-03-23 Thread Adam Wright

Don't forget, PHP (in general) runs as the webserver (normally "nobody" or
"apache" for Apache servers). Make sure your webserver has write access to
/home/jalmberg/public_html/qiksys/images/

adamw

- Original Message -
From: "John Almberg" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Friday, March 23, 2001 2:50 PM
Subject: [PHP] Permission denied


> Hi all,
>
> I'm trying to upload a file from a client browser to my server.
>
> On the client side, I've got:
>
> 
> 
> Send this file: 
> 
> 
>
> On the server side, I've got:
>
> echo ("$userfile");
> echo ($HTTP_POST_FILES['userfile']['name'] ."");
> echo ($HTTP_POST_FILES['userfile']['type'] ."");
> echo ($HTTP_POST_FILES['userfile']['size'] ."");
> echo ($HTTP_POST_FILES['userfile']['tmp_name']  ."");
>
> if (move_uploaded_file($userfile,
> "/home/jalmberg/public_html/qiksys/images/temp.jpg"))
> print("moved file");
> else
> print("couldn't move file!");
>
> When I try to use this, I get:
>
> =
> /tmp/phpa21470
> test.jpg
> image/pjpeg
> 21917
> /tmp/phpa21470
>
> Warning: Unable to create
> '/home/jalmberg/public_html/qiksys/images/temp.jpg': Permission denied in
> /home/jalmberg/public_html/qiksys/upload.php on line 57
>
> Warning: Unable to move '/tmp/phpa21470' to
> '/home/jalmberg/public_html/qiksys/images/temp.jpg' in
> /home/jalmberg/public_html/qiksys/upload.php on line 57
> couldn't move file!
> ==
>
> I check the php.ini file and safe mode is turned off. I've also tried with
a
> text file, same result. I have permission to access the above directory .
.
> . the php files working this magic are located in
> /home/jalmberg/public_html/qiksys.
>
> Probably there is a simple answer to this question, but I'm out of ideas!
> Any help???
>
> Thanks in advance.
>
> John
>
>
> --
> 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] Permission denied

2001-03-23 Thread Adam Wright

If you have shell access to the box, you can chgrp some stuff and allow PHP
to write to it. Otherwise, you'll have to talk to the ISP directly (get them
to setup setuid versions of common shell commands for this sort of
requirement). There is no way to make PHP 'login', any as PHP is server
side, nothing you change locally can affect it.

adamw

- Original Message -
From: "John Almberg" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Friday, March 23, 2001 3:27 PM
Subject: RE: [PHP] Permission denied


> Adam,
>
> Just ran phpinfo and you are correct: the Apache User/Group is "nobody".
>
> H'. This sounds like a problem. Hope there is an answer!
>
> - John
>
>
> --
> 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 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 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]




Re: [PHP] include statement

2001-01-17 Thread Adam Wright

Pretty much, yes (within the bounds of the permissions of the files. Most
webservers run as nobody on unix, and hence can only read those files which
nobody can (confusing, huh :)). But, unless you have a mallicious user with
upload access to your server, this isnt an issue. If you do, investigate
"Safe mode" this instant :)

adamw

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


> What about the security issue mentioned?  Is it then possible (using the
> include and/or readfile) to grab anything found on the server?
> 1 More thing:  what if I wanted to place the contents of a file into a
> variable.  How do you achieve that?
>
> Karl *also a newbie, and this is a great group*
>
>
>
>
> - Original Message -
> From: "Adam Wright" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; "Michael Zornek"
> <[EMAIL PROTECTED]>
> Sent: Wednesday, January 17, 2001 10:18 AM
> Subject: Re: [PHP] include statement
>
>
> > 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&#

Re: [PHP] ASP Guy Looking for "Select Case" equivalent

2001-01-19 Thread Adam Wright

switch

adamw

- Original Message - 
From: "Karl J. Stubsjoen" <[EMAIL PROTECTED]>
To: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 3:51 PM
Subject: [PHP] ASP Guy Looking for "Select Case" equivalent


> Hello,
> 
> What is the equivalent command to Select Case as in:
> 
> Select case 10 + 2
> case 10
> 'nope
> case 11
> 'nope
> case 12
> 'yep
> case > 13
> 'yep - but case 12 comes first!
> end select
> 
> 
> -- 
> 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] PATH_TRANSLATED doesn't work correctly !!!

2001-01-19 Thread Adam Wright

Its a PHP bug, I've attached a patch (that they persistantly ignore :).

adamw

- Original Message -
From: "Heino H. Gehlsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 10:42 AM
Subject: [PHP] PATH_TRANSLATED doesn't work correctly !!!


I'm trying to use the clasic CGI environment varable PATH_TRANSLATED via
Apache's Action directive (directing all requests through a script).

But PHP messes PATH_TRANSLATED up and all I end up with a copy of
SCRIPT_FILENAME !

I'm using PHP 4.0.3pl1 on a standard Debian 2.2r2 installation with Apache
httpd 1.3.9 with these directives in httpd.conf:
Options +MultiViews
Action  text/html /script.php

A resuest for "/index" should result in:
PATH_TRANSLATED = /path/to/index.html
PATH_TRANSLATED = /path/to/index.en.html (for the English version)
PATH_TRANSLATED = /path/to/index.X.html (for the X version)

BUT what I get is:
PATH_TRANSLATED = /path/to/script.php (no matter what i request !)

Can anyone help me getting the real Apache PATH_TRANSLATED (which is actualy
shown in phpinfo() under "Apache Environment" but not under "PHP Variables")


Yours hopefully
Heino H. Gehlsen


--
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] Recursively create directories

2001-05-15 Thread Adam Wright

This should do what you want...

$dir = "dir1/dir2/dir3/dir4";
$dir_array = explode("/",$dir);
$full_path = "";

foreach($dir_array as $current_dir) {
  $full_path .= "/$current_dir";

   if (!is_dir($DOCUMENT_ROOT . $full_path)) {
  mkdir($DOCUMENT_ROOT."/" .$full_path,0700);
   }
}

adamw

- Original Message - 
From: "Darin Isola" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 14, 2001 8:01 PM
Subject: [PHP] Recursively create directories


> hi all,
> 
> does anyone have a function to recursively create directories?
> 
> heres what I have so far:
> 
> $dir = "dir1/dir2/dir3/dir4";
> $dir_array = explode("/",$dir);
> 
> foreach($dir_array as $current_dir) {
>if(! is_dir($DOCUMENT_ROOT."/".$current_dir) ) {
>   mkdir($DOCUMENT_ROOT."/".$current_dir,0700);
>}
> }
> 
> which works, but this will only create these dirs off the document
> root, not recursivley underneth one another.  im getting stuck on how
> to remember what directory has been created and travel down from there.
> 
> can anyone help a brother out?
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.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] removing double backslashes and leaving singles

2001-05-22 Thread Adam Wright

Don't forget you need to escape the backslashes both for PHP and the regular
expression engine. So, if you want to match \\, you need  to escape for
php, then escape them both again for regex .  matches just one
real backslash :)

adamw

- Original Message -
From: "Dennis Gearon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 22, 2001 5:10 PM
Subject: [PHP] removing double backslashes and leaving singles


> I've tried this and it doesn't work, any ideas?
>
> $illegal_chars="[^a-zA-Z0-9._\\:]|";
> $dir="c:\\t.e.s.t.7.";
> $dir_name = ereg_replace($illegal_chars, "", $dir_name);
>
> it removes the single double slash after :, as well.
>
> this is on version 4.0.3pl1
>
> would some people please test this on their boxes/versions?
>
> I tried preg_replace(), and it did the same thing. I don't think it
> should remove that single backslash, right?
>
> --
> 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] SQL statement for clearing a table

2001-06-22 Thread Adam Wright

DELETE FROM table_name;

adamw

- Original Message -
From: "Wilbert Enserink" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 22, 2001 1:17 PM
Subject: [PHP] SQL statement for clearing a table


> Hi all,
>
> anybody knows the mysql statement for clearing the contents of a table and
> lieving the table itself intact?
>
> Wilbert
>
> -
> Pas de Deux
> Van Mierisstraat 25
> 2526 NM Den Haag
> tel 070 4450855
> fax 070 4450852
> http://www.pdd.nl
> [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] isset() VS if($var)

2001-04-09 Thread Adam Wright

isset actually sees if the variable exists, and has been assigned a value
(where if is obviously checking for boolean truthfulness). Thus...

$a = 0;

if (isSet($a))
  print "A is set"; //This line will execute

if (isSet($b))
  print "B is set"; //This line never will, as B has not been set to
anything every in this script

And...

if ($a)
  print "A is true"; //This line won't execute, A is false

if ($b)
  print "B is true"; //Because B has never been set, $b = 0, and this will
never execute

Hope that helps

adamw





- Original Message -
From: "Jesper Blomström" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 1:56 PM
Subject: [PHP] isset() VS if($var)


> Hi!
>
> Is there any difference between writing:
>
> isset($my_var)
>
> and...
>
> if ($my_var)
>
>
> ??
>
>
> Thanks!
>
>
>
> / Jesper Blomstroem
>
> --
> Jesper Blomström
> [EMAIL PROTECTED]
> Arbete: 08-566 280 08
> Hem:08-669 23 10
> Mobil:  070-30 24 911
>
> --
> 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]