SV: [PHP] converting str with \n to one line str??

2001-08-21 Thread Jens Schodt

nl2br is not working in this case. It does put a  with every new line,
but it does not remove the new line. The string will still have the line
changes and it will not work in Javascript.


Jens

-Oprindelig meddelelse-
Fra: Artwithin [mailto:[EMAIL PROTECTED]]
Sendt: 20. august 2001 20:09
Til: Jens
Cc: [EMAIL PROTECTED]
Emne: Re: [PHP] converting str with \n to one line str??


use nl2br()
http://www.php.net/nl2br

or, alternatively, use a regex to strip out the newlines

hope this helps.

- Original Message -
From: Jens <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 20, 2001 11:15
Subject: [PHP] converting str with \n to one line str??


> When I use Javascript with PHP i run into one problem. When I get the data
i
> need from the database it often has a lot of  and \n (new lines) in
it.
> The  are no problem when converting a string to a Javascript string,
but
> the \n are. The string has to be all in one line.
>
> example:
>  I
> am"; ?>
>
> var temp =  
>
> This is not working!! But this would :
>
> 
>
> var temp = ''; 
>
> Can you help me please?
>
> thanks Jens
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




SV: [PHP] converting str with \n to one line str??

2001-08-21 Thread Jens Schodt


$temp = str_replace("\n","test",$temp) is doing the same thing. It is still
a string in several lines if you look in the source :-(

jens

-Oprindelig meddelelse-
Fra: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sendt: 20. august 2001 20:20
Til: Jens
Cc: [EMAIL PROTECTED]
Emne: Re: [PHP] converting str with \n to one line str??


You could use str_replace().

--
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Mon, 20 Aug 2001 20:15:54 +0200
"Jens" <[EMAIL PROTECTED]> wrote:

> When I use Javascript with PHP i run into one problem. When I get the
> data i
> need from the database it often has a lot of  and \n (new lines) in
> it.
> The  are no problem when converting a string to a Javascript string,
> but
> the \n are. The string has to be all in one line.
> 
> example:
>  I
> am"; ?>
> 
> var temp =  
> 
> This is not working!! But this would :
> 
> 
> 
> var temp = ''; 
> 
> Can you help me please?
> 
> thanks Jens
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




[PHP] Re: ADODB?

2001-08-21 Thread Jarosław Jankowski



Jochen Kaechelin wrote:

> is there a source for further information
> connecting to databases with ADODB for PHP4?
>
> I only know http://php.weblogs.com/ADODB
>
> --

I thing this is the only one, but you can try asking on php.weblog.com
Jarek


-- 
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] converting str with \n to one line str??

2001-08-21 Thread Lawrence . Sheed

just a thought - \r\n?

try stripping out \r's as well.  windows does \r\n  (carriage return, line
feed) for text, unix only \n's



-Original Message-
From: Jens Schodt [mailto:[EMAIL PROTECTED]]
Sent: August 21, 2001 3:20 PM
To: 'Tyler Longren'
Cc: '[EMAIL PROTECTED]'
Subject: SV: [PHP] converting str with \n to one line str??



$temp = str_replace("\n","test",$temp) is doing the same thing. It is still
a string in several lines if you look in the source :-(

jens

-Oprindelig meddelelse-
Fra: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sendt: 20. august 2001 20:20
Til: Jens
Cc: [EMAIL PROTECTED]
Emne: Re: [PHP] converting str with \n to one line str??


You could use str_replace().

--
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Mon, 20 Aug 2001 20:15:54 +0200
"Jens" <[EMAIL PROTECTED]> wrote:

> When I use Javascript with PHP i run into one problem. When I get the
> data i
> need from the database it often has a lot of  and \n (new lines) in
> it.
> The  are no problem when converting a string to a Javascript string,
> but
> the \n are. The string has to be all in one line.
> 
> example:
>  I
> am"; ?>
> 
> var temp =  
> 
> This is not working!! But this would :
> 
> 
> 
> var temp = ''; 
> 
> Can you help me please?
> 
> thanks Jens
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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

-- 
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] Importing a GIF image and making it transparent

2001-08-21 Thread David Robley

On Tue, 21 Aug 2001 16:24, Ben Quinn wrote:
> Hi Chris,
>
> Thanks for the speedy reply.  In the GD section here
> http://www.bsch.au.com/admin/phpinfo.php
> it says "GIF support - enabled"
>
> I'm starting to wonder though if PHP can do this? I looked up the
> imagecolourtransparent function on the PHP site and it says:
>
> int imagecolortransparent (int im [, int col])
>
> ImageColorTransparent() sets the transparent color in the im image to
> col. Im is the image identifier returned by ImageCreate() and col is a
> color identifier returned by ImageColorAllocate().
>
> Note "Im is the image identifier returned by ImageCreate()" - does this
> mean this function only works with images PHP has created?

I wonder if it might not work on the image identifier returned from 
ImageCreateFromGIF, which is presumably what you are using?

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   A diplomat thinks twice before saying nothing.

-- 
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] multiple select question

2001-08-21 Thread David Robley

On Tue, 21 Aug 2001 15:38, Raphael Pirker wrote:
> Hi,
>
> I have a dynamic multiple select where data is added to using the
> JavaScript found here:
>
> http://javascript.internet.com/forms/menu-swapper.html
>
> I have a question: How do I read all the values into an array or
> something else? My select has the NAME "read".
>
> TIA,
>
> Raphael

Without checking that URL: the usual way to return the contents of  
multiple select box as an array is to name the selct as an array with 
name[] - so in your case,  etc

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Can't learn to do something well? Learn to enjoy doing it badly!

-- 
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] converting str with \n to one line str??

2001-08-21 Thread David Robley

On Tue, 21 Aug 2001 16:49, Jens Schodt wrote:
> $temp = str_replace("\n","test",$temp) is doing the same thing. It is
> still a string in several lines if you look in the source :-(
>
> jens
>
> -Oprindelig meddelelse-
> Fra: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sendt: 20. august 2001 20:20
> Til: Jens
> Cc: [EMAIL PROTECTED]
> Emne: Re: [PHP] converting str with \n to one line str??
>
>
> You could use str_replace().
>
> --
> Tyler Longren
> Captain Jack Communications
> [EMAIL PROTECTED]
> www.captainjack.com
>
>
>
> On Mon, 20 Aug 2001 20:15:54 +0200
>
> "Jens" <[EMAIL PROTECTED]> wrote:
> > When I use Javascript with PHP i run into one problem. When I get the
> > data i
> > need from the database it often has a lot of  and \n (new lines)
> > in it.
> > The  are no problem when converting a string to a Javascript
> > string, but
> > the \n are. The string has to be all in one line.
> >
> > example:
> >  > I
> > am"; ?>
> >
> > var temp =  
> >
> > This is not working!! But this would :
> >
> > 
> >
> > var temp = ''; 
> >
> > Can you help me please?
> >
> > thanks Jens

Regular expressions? There is an example for ereg_replace in the manual 
that does just this:

$string = ereg_replace ("\n", "", $string);
/* Get rid of any newline characters in $string. */

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   "Yes, I have been reading Voltaire," Tom admitted candidly.

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

2001-08-21 Thread Renze Munnik

On Mon, Aug 20, 2001 at 03:42:34PM -0400, Gerard Samuel wrote:
> $file = basename ($path);
> $file = $file.php3;
> 

You might want to consider using,

$file = basename ($path);
$file = "$file.php3";   // <-- !

instead, if you don't like warnings.

$file = $file.php3

isn't the way to do it! You _could_ use

$file = $file.".php3";

though.

-- 
* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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

2001-08-21 Thread Evan Nemerson

Well, I hope nobody will ever have to do what I just did, so here you go. I 
got them from the apache/conf/mime.types

Have fun!



$extensions = Array("ez" => "application/andrew-inset",
"hqx" => "application/mac-binhex40",
"cpt" => "application/mac-compactpro",
"doc" => "application/msword",
"bin" => "application/octet-stream",
"dms" => "application/octet-stream",
"lha" => "application/octet-stream",
"lzh" => "application/octet-stream",
"exe" => "application/octet-stream",
"class" => "application/octet-stream",
"oda" => "application/oda",
"pdf" => "application/pdf",
"ai" => "application/postscript",
"eps" => "application/postscript",
"ps" => "application/postscript",
"smi" => "application/smil",
"smil" => "application/smil",
"mif" => "application/vnd.mif",
"xls" => "application/vnd.ms-excel",
"ppt" => "application/vnd.ms-powerpoint",
"wbxml" => "application/vnd.wap.wbxml",
"wmlc" => "application/vnd.wap.wmlc",
"wmlsc" => "application/vnd.wap.wmlscriptc",
"bcpio" => "application/x-bcpio",
"vcd" => "application/x-cdlink",
"pgn" => "application/x-chess-pgn",
"cpio" => "application/x-cpio",
"csh" => "application/x-csh",
"dcr" => "application/x-director",
"dir" => "application/x-director",
"dxr" => "application/x-director",
"dvi" => "application/x-dvi",
"spl" => "application/x-futuresplash",
"gtar" => "application/x-gtar",
"hdf" => "application/x-hdf",
"js" => "application/x-javascript",
"skp" => "application/x-koan",
"skd" => "application/x-koan",
"skt" => "application/x-koan",
"skm" => "application/x-koan",
"latex" => "application/x-latex",
"nc" => "application/x-netcdf",
"cdf" => "application/x-netcdf",
"sh" => "application/x-sh",
"shar" => "application/x-shar",
"swf" => "application/x-shockwave-flash",
"sit" => "application/x-stuffit",
"sv4cpio" => "application/x-sv4cpio",
"sv4crc" => "application/x-sv4crc",
"tar" => "application/x-tar",
"tcl" => "application/x-tcl",
"tex" => "application/x-tex",
"texinfo" => "application/x-texinfo",
"texi" => "application/x-texinfo",
"t" => "application/x-troff",
"tr" => "application/x-troff",
"roff" => "application/x-troff",
"man" => "application/x-troff-man",
"me" => "application/x-troff-me",
"ms" => "application/x-troff-ms",
"ustar" => "application/x-ustar",
"src" => "application/x-wais-source",
"zip" => "application/zip",
"au" => "audio/basic",
"snd" => "audio/basic",
"mid" => "audio/midi",
"midi" => "audio/midi",
"kar" => "audio/midi",
"mpga" => "audio/mpeg",
"mp2" => "audio/mpeg",
"mp3" => "audio/mpeg",
"aif" => "audio/x-aiff",
"aiff" => "audio/x-aiff",
"aifc" => "audio/x-aiff",
"ram" => "audio/x-pn-realaudio",
"rm" => "audio/x-pn-realaudio",
"rpm" => "audio/x-pn-realaudio-plugin",
"ra" => "audio/x-realaudio",
"wav" => "audio/x-wav",
"pdb" => "chemical/x-pdb",
"xyz" => "chemical/x-xyz",
"bmp" => "image/bmp",
"gif" => "image/gif",
"ief" => "image/ief",
"jpeg" => "image/jpeg",
"jpg" => "image/jpeg",
"jpe" => "image/jpeg",

Re: [PHP] mime types

2001-08-21 Thread Brad Hubbard

On Tue, 21 Aug 2001 18:01, Evan Nemerson wrote:
> Well, I hope nobody will ever have to do what I just did, so here you go. I
> got them from the apache/conf/mime.types
>
> Have fun!
>
>
>
> $extensions = Array(  "ez" => "application/andrew-inset",


What are you using them for Evan?

Brad

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




[PHP] Re:

2001-08-21 Thread PHP Accelerator

Yes, and it works fine. It basically replaces the parser/compiler with a 
cache lookup when it determines that it can, and so the real scope for error 
is if it doesn't correctly restore the original post compilation/pre 
execution state from when the compiler was run. But at the moment it seems 
to, at least enough so that things work.

As an aside, and about dynanmic content - I also have client side code for 
transparent PHP database query caching, and display (e.g. HTML) rendering 
code that actually rewrites itself as more optimal code to a cache on the 
fly, all as an aid to get speed improvements. I wanted classes that 
implemented renderers, e.g. a label object, a block of html with a title, a 
border object that can put a border around other renderers. This makes page 
development much less an HTML writing job, and more a programming and 
component based job. This was great, but the cost of such dynamic generation 
was a performance hit, when in reality, most of what was now dynamically 
dynamically rendered HTML was really static, most, if not all the time. So I 
have a client side optimiser that can traverse a hierarchy of renderers, ask 
them whether they render statically, dynamically based on the state of data 
elements, or always dynamically. It then emits simpler code for the purely 
static elements, and either dynamic code or simpler code for the dynamic 
elements if their dependent data items are in a known state.  PHP makes it 
really feasible to do this kind of stuff.

So the dynamic display rendering works well, but it became clear that was 
really slowing things down was the fact that there was simply a lot of code 
to now parse and process, even with with conditional inclusion wherever it 
made logical sense. Hence the accelerator.

Nick

>From: "Christopher CM Allen" <[EMAIL PROTECTED]>
>Reply-To: "Christopher CM Allen" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Date: Tue, 21 Aug 2001 01:27:28 -0500
>
>Sounds great nick<> Did you sites run with dynamic content? IE database 
>querys, if so what did you find for results?


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


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

2001-08-21 Thread Gerard Samuel

Oh yes, I dont like warnings.  Thanks for pointing that out

Renze Munnik wrote:
> On Mon, Aug 20, 2001 at 03:42:34PM -0400, Gerard Samuel wrote:
> 
>>$file = basename ($path);
>>$file = $file.php3;
>>
>>
> 
> You might want to consider using,
> 
> $file = basename ($path);
> $file = "$file.php3"; // <-- !
> 
> instead, if you don't like warnings.
> 
> $file = $file.php3
> 
> isn't the way to do it! You _could_ use
> 
> $file = $file.".php3";
> 
> though.
> 
> 



-- 
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] Re: flash and php

2001-08-21 Thread Tribun

I can't describe it very well in english, but I try it once again:

1. You cant combine Flash and MySQL.

2. Therefore you must add an interface.

3. You can fabricate this interface using a PHP-File, which reads out the
Database and
send this data to Flash.

3.1. Use a normal php-code to read out the content.

3.2. echo() an output with the variables and their values.

3.3. do that in this format: "&variablename=variablevalue&var2=val2&"

4. Open a flash keyframe and add the following Action-Script:

Actions >
Click on "Load Movie"
Change the option from (I use a german-flash version, so I don't know the
correct names)
"Load Movie from"  to   "Load Variables from"
(the first to the third point)

4.2 type in the URL-Field the filename of the interface-file.

4.3. May be you should change the "Ebene" frm "1" to "0".

4.4. If you want to tell the interface-file, that it should load a specific
data, add to the URL
field the following string:
?varoption=dothat&blabla=wuff

4.5. If this must be a dynamic variable, you must change the "abc" to "="
and the field must be changed again:

"interface.php?do="&dynamicvariable

5. to read the retrieved variables via flash, just handle them like

_level0:variablename


I hope that was a little bit clearer. If you have anyhow any problems, feel
free to ask me again ;)

MöfG,
Tribun (Patrick Lehnen)
---
www.mp3o.net


- Original Message -
From: "Jack" <[EMAIL PROTECTED]>
To: "Tribun" <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2001 4:46 PM
Subject: ref: flash and php


> Dear Tribun
> I tried to understand what you explained but realised I may need more
> information about this. Is there anyway I can go to look up for more info
> about what you explained?
> Jack
> [EMAIL PROTECTED]
> "Love your enemies, it will drive them nuts"
> - Original Message -
> From: "Tribun" <[EMAIL PROTECTED]>
> To: "Jack" <[EMAIL PROTECTED]>
> Sent: Monday, August 20, 2001 7:43 AM
> Subject: Re: flash and php
>
>
> > Simply user the GetVariable function in Flash.
> >
> > The targeting file must be a PHP-File.
> >
> > This File should reads out the Informations you want.
> >
> > If the requests are also variable, call the file through
> > GET and add "?query=date" to the filename.
> >
> > The file must echo this...
> > &variable=something&cat=dog&
> >
> > Hope you understand my short introduction..
> >
> > MöfG,
> > Tribun(Patrick Lehnen)
> > ---
> > www.mp3o.net
> >
> >
> > "Jack" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > 017701c129a4$6dff2e60$[EMAIL PROTECTED]">news:017701c129a4$6dff2e60$[EMAIL PROTECTED]...
> > I know this issue has been talk a lot already, but can anyone guide me
> where
> > can I find information about how to build a dynamic content flash file
> > driven by database?
> > Jack
> > [EMAIL PROTECTED]
> > "Love your enemies, it will drive them nuts"
> >
> >
> >
> >
> >
>
>



-- 
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] begginer how to make integer ?

2001-08-21 Thread Andras Kende

Hello,
 
 I have a query but it not creating integer result:
 
 $saleprice=$amyrow["saleprice"]+$saleprice;
$squarefeet=$amyrow["squarefeet"]+$squarefeet; 
 $dom=$amyrow["dom"]+$dom; 
  result:
Total listings: 18 -- Average Price: $339166.6667
Average Square Foot: 1596.61
Average DOM: 52.5556
Average Price Per Square Feet: 212.42910330909
 
But I need Integer numbers like 339166 , 1596 

Thanks :)
 
Andras


-- 
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] RE: How to download an entire dynamic website?

2001-08-21 Thread Tim Ward

Do you mean make an html copy?
If so this is a simplified copy of what I use as the start of building a
search engine database for my web site, I think it'll only work on the local
database and in this case needs to be in the document root directory to
work...

Tim


function GetPage($file, $root, $db)
{   $flines = file("http://localhost/$root$file";);
$filetext = "";
$inscript = false;
foreach ($flines as $line) $filetext = $filetext . " " .
trim($line);

// now do what you want with the html, save it to db or as file in
html version of site
...
...
} // end of fn GetPage

function spider($root, $db)
{   $dhandle = opendir($root);
while ($ddFile = readdir($dhandle))
{   if ($ddFile != "." && $ddFile != "..")
{   if (is_dir("$root/$ddFile"))
{   spider("$root$ddFile/", $db);
} else
{   if (substr($ddFile, -5) === ".html" ||
substr($ddFile, -4) === ".php") GetPage($ddFile, $root, $db);
}
}
}
closedir($dhandle);
} // end of fn spider

function SearchBuild($thissite = "")
{   $db = new DbConnect();
spider("$thissite", $thissite, $db);
$db->Close();
} // end of fn SearchBuild

--
From:  Josh [SMTP:[EMAIL PROTECTED]]
Sent:  20 August 2001 18:27
To:  [EMAIL PROTECTED]
Subject:  How to download an entire dynamic website?

Does anyone know some good programs (or other ways) to download an
entire
dynamic website?

Thanks



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




Re: [PHP] begginer how to make integer ?

2001-08-21 Thread

On Tue, Aug 21, 2001 at 02:08:06AM -0700, Andras Kende wrote:
> Hello,
>  
>  I have a query but it not creating integer result:
>  
>  $saleprice=$amyrow["saleprice"]+$saleprice;
> $squarefeet=$amyrow["squarefeet"]+$squarefeet; 
>  $dom=$amyrow["dom"]+$dom; 
>   result:
> Total listings: 18 -- Average Price: $339166.6667
> Average Square Foot: 1596.61
> Average DOM: 52.5556
> Average Price Per Square Feet: 212.42910330909
>  
> But I need Integer numbers like 339166 , 1596 
> 
> Thanks :)
>  
> Andras


Try: round()

http://www.php.net/round

Eg.: $myInt = (integer)round($nonInteger);

-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




SV: [PHP] converting str with \n to one line str??

2001-08-21 Thread Jens Schødt

Yes!! This was the solution...
With str_replace you can use an array as the search argument. Like this

$arrReplace = array ("\n","\r");
$temp = str_replace($arrReplace,"",$temp);
$temp = addcslashes($temp,"'"); // just to make sure that the string will
work as my JS string

thanks for the help :-)

jens

-Oprindelig meddelelse-
Fra: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sendt: 21. august 2001 09:31
Til: Jens Schødt; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Emne: RE: [PHP] converting str with \n to one line str??


just a thought - \r\n?

try stripping out \r's as well.  windows does \r\n  (carriage return, line
feed) for text, unix only \n's



-Original Message-
From: Jens Schodt [mailto:[EMAIL PROTECTED]]
Sent: August 21, 2001 3:20 PM
To: 'Tyler Longren'
Cc: '[EMAIL PROTECTED]'
Subject: SV: [PHP] converting str with \n to one line str??



$temp = str_replace("\n","test",$temp) is doing the same thing. It is still
a string in several lines if you look in the source :-(

jens

-Oprindelig meddelelse-
Fra: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sendt: 20. august 2001 20:20
Til: Jens
Cc: [EMAIL PROTECTED]
Emne: Re: [PHP] converting str with \n to one line str??


You could use str_replace().

--
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Mon, 20 Aug 2001 20:15:54 +0200
"Jens" <[EMAIL PROTECTED]> wrote:

> When I use Javascript with PHP i run into one problem. When I get the
> data i
> need from the database it often has a lot of  and \n (new lines) in
> it.
> The  are no problem when converting a string to a Javascript string,
> but
> the \n are. The string has to be all in one line.
> 
> example:
>  I
> am"; ?>
> 
> var temp =  
> 
> This is not working!! But this would :
> 
> 
> 
> var temp = ''; 
> 
> Can you help me please?
> 
> thanks Jens
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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

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




SV: [PHP] converting str with \n to one line str??

2001-08-21 Thread Jens Schødt

Allmost, but you have to look for the \r ass well!
With str_replace you can use an array as the search argument. Like this

$arrReplace = array ("\n","\r");
$temp = str_replace($arrReplace,"",$temp);
$temp = addcslashes($temp,"'"); // just to make sure that the string will
work as my JS string

thanks for the help :-)

jens

-Oprindelig meddelelse-
Fra: David Robley [mailto:[EMAIL PROTECTED]]
Sendt: 21. august 2001 09:43
Til: Jens Schødt
Cc: '[EMAIL PROTECTED]'
Emne: Re: [PHP] converting str with \n to one line str??


On Tue, 21 Aug 2001 16:49, Jens Schodt wrote:
> $temp = str_replace("\n","test",$temp) is doing the same thing. It is
> still a string in several lines if you look in the source :-(
>
> jens
>
> -Oprindelig meddelelse-
> Fra: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sendt: 20. august 2001 20:20
> Til: Jens
> Cc: [EMAIL PROTECTED]
> Emne: Re: [PHP] converting str with \n to one line str??
>
>
> You could use str_replace().
>
> --
> Tyler Longren
> Captain Jack Communications
> [EMAIL PROTECTED]
> www.captainjack.com
>
>
>
> On Mon, 20 Aug 2001 20:15:54 +0200
>
> "Jens" <[EMAIL PROTECTED]> wrote:
> > When I use Javascript with PHP i run into one problem. When I get the
> > data i
> > need from the database it often has a lot of  and \n (new lines)
> > in it.
> > The  are no problem when converting a string to a Javascript
> > string, but
> > the \n are. The string has to be all in one line.
> >
> > example:
> >  > I
> > am"; ?>
> >
> > var temp =  
> >
> > This is not working!! But this would :
> >
> > 
> >
> > var temp = ''; 
> >
> > Can you help me please?
> >
> > thanks Jens

Regular expressions? There is an example for ereg_replace in the manual 
that does just this:

$string = ereg_replace ("\n", "", $string);
/* Get rid of any newline characters in $string. */

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   "Yes, I have been reading Voltaire," Tom admitted candidly.

--
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] RE: Multi-dimensional array issue

2001-08-21 Thread Tim Ward

The first thing is that 2-dimensional arrays don't really exist in  php. Any
element of any array can be another array. The second important point is
that all php arrays are associative. If you don't declare the key of an
element (e.g. $out[] = "fred") when creating it you get the next integer
available as the key. Your initial declaration creates ...

$out[0] = $name;
$out[1] = $srch;
$out[2] = $sel;
$out[3] = $case;
$out[$qvalues][0] = $vals;
$out[$qvalues][1] = $valtypes;

with $name, etc. being whatever the variables are at the time the array is
initialised.

What I think you wanted (I'm not entirely sure) is more along the lines of
...
for ($i=0; $I < $num_out; $I++)
$out[] = array("name"=>$name, "srch"=>$srch, "sel"=>$sel,
"case"=>$case, $qvalues => array($vals, $valtypes));

I'm not entirely sure what you're trying to do but I hope this points you in
the right direction. 

Tim
--
From:  Ken Hopkins [SMTP:[EMAIL PROTECTED]]
Sent:  20 August 2001 21:02
To:  [EMAIL PROTECTED]
Subject:  Multi-dimensional array issue

Hi from a recent PHP convert,

Having a heck of a time declaring and accessing 2 dimensional info
in an array.
any input on where to start looking for the answer would be greatly
appreciated.

I want to have a base array of 5 elements. The first 4 elements are
variables, and the fifth is an array of 2 elements.
seemed harmless enough at the time;)

Coding conventions suggest access to the first level of elements is:
$basearray[base_numerical_offset][$basearray_variable]
and this works great for accessing the first 4 elements of the base
array.

Accessing the fifth elements' variables in the next dimension is
where it fails for me:

$basearray[base_numerical_offset][$subarray][sub_numerical_offset][$subarray
_variable]

The documentation/snippets/samples, etc. have been to no avail;
still can't get to elements in the
second dimension properly. Attempts to populate the second level
array trahses the entire structure.

I have the following declaration:
$out => array($name, $srch, $sel, $case, $qvalues => array($vals,
$valtypes);
$out is the name of the base array
$qvalues is the name of the sub-array under the base array
"$out"
I need for each $out array to consist of a name, srch, sel, case and
then a variable number of qvalues array elements that each have single vals
and valtypes elements.

Use the following snippet to see what happens; it's not what I had
hoped to see.
I hope I'm just doing something wrong..

Thanks, Ken.
mailto:[EMAIL PROTECTED]

 array($vals,
$valtypes));
echo "";
 $out[0][$name] = "free";
 $out[1][$name] = "next";
 for ($i=0; $i<2; $i++)
{
   echo "   OutIndex: ", $i, " Name: ", $out[$i][$name];
}

   $out[0][$srch] = "outfreesrch";
   $out[0][$sel] = "outfreesel";
   $out[0][$case] = "outfreecase";
   $out[0][$qvalues][0][$vals] = "outfreeqval0";
   $out[0][$qvalues][0][$valtypes] = "outfreeqtype0";
   $out[0][$qvalues][1][$vals] = "outfreeqval1";
   $out[0][$qvalues][1][$valtypes] = "outfreeqtype1";
   echo "Basearray index : ", 0, "\n";
   echo "   name : ", $out[0][$name], "\n";
   echo "   srch : ", $out[0][$srch], "\n";
   echo "   sel  : ", $out[0][$sel], "\n";
   echo "   case : ", $out[0][$case], "\n";
   echo "   Subarray index  : 0 \n";
   echo "  vals : ",
$out[0][$qvalues][0][$vals], "\n";
   echo "  valtypes : ",
$out[0][$qvalues][0][$valtypes], "\n";
   echo "   Subarray index  : 1 \n";
   echo "  vals : ",
$out[0][$qvalues][1][$vals], "\n";
   echo "  valtypes : ",
$out[0][$qvalues][2][$valtypes], "\n";
   echo"";
   $out[1][$srch] = "outnextsrch";
   $out[1][$sel] = "outnextsel";
   $out[1][$case] = "outnextcase";
   $out[1][$qvalues][0][$vals] = "outnextqval0";
   $out[1][$qvalues][0][$valtypes] = "outnextqtype0";
   $out[1][$qvalues][1][$vals] = "outnextqval1";
   $out[1][$qvalues][1][$valtypes] = "outnextqtype1";
   echo "Basearray index : ", 1, "\n";
   echo "   name : ", $out[1][$name], "\n";
   echo "   srch : ", $out[1][$srch], "\n";
   echo "   sel  : ", $out[1][$sel], "\n";
   echo "   case : ", $out[1][$case], "\n";
   echo "   Subarray index  : 0 \n";
   echo "  vals : ",
$out[1][$qvalues][0][$vals], "\n";
   echo "  valtypes : ",
$out[1][$qvalues][0][$valtypes], "\n";
   

[PHP] Returning a string from a function

2001-08-21 Thread Richard Kurth

Could somebody tell me way this function will not work I know the
script inside the function works because I have tested it but when I
put it in a function all I get back when I call it is a 1


function &getpath($search) {
Global $search,$path;
$a = `/bin/ls -al /home/sites/ | awk {'print $9" "$10" "$11" "'} | grep $search`;
$items = explode ("www.", $a);
 For($i = 0; $i< (count($items)/1); $i +=1){
 $path=strstr(($items[$i]), '/');
 return $path;
}
}

 $path=&getpath($search);









Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




Re: [PHP] RE: Multi-dimensional array issue

2001-08-21 Thread Nick Davies



>   --
>   From:  Ken Hopkins [SMTP:[EMAIL PROTECTED]]
>   Sent:  20 August 2001 21:02
>   To:  [EMAIL PROTECTED]
>   Subject:  Multi-dimensional array issue
> 
>   Hi from a recent PHP convert,
> 
>   Having a heck of a time declaring and accessing 2 dimensional info
> in an array.
>   any input on where to start looking for the answer would be greatly
> appreciated.
> 
>   I want to have a base array of 5 elements. The first 4 elements are
> variables, and the fifth is an array of 2 elements.
>   seemed harmless enough at the time;)
> 
>   Coding conventions suggest access to the first level of elements is:
>   $basearray[base_numerical_offset][$basearray_variable]
>   and this works great for accessing the first 4 elements of the base
> array.

The first level of element will be 

$basearray[$key] = $value
$basearray[$key2] = $value
$basearray[$key3] = $value
$basearray[$key4] = $value

the extra array

$basearray[$key5][$extraarraykey1] = $value
$basearray[$key5][$extraarraykey2] = $value

> 
>   Accessing the fifth elements' variables in the next dimension is
> where it fails for me:
>   
> $basearray[base_numerical_offset][$subarray][sub_numerical_offset][$subarray
> _variable]
> 
>   The documentation/snippets/samples, etc. have been to no avail;
> still can't get to elements in the
>   second dimension properly. Attempts to populate the second level
> array trahses the entire structure.
> 
>   I have the following declaration:
>   $out => array($name, $srch, $sel, $case, $qvalues => array($vals,
> $valtypes);
>   $out is the name of the base array
>   $qvalues is the name of the sub-array under the base array
> "$out"
>   I need for each $out array to consist of a name, srch, sel, case and
> then a variable number of qvalues array elements that each have single vals
> and valtypes elements.
> 
>   Use the following snippet to see what happens; it's not what I had
> hoped to see.
>   I hope I'm just doing something wrong..
> 
>   Thanks, Ken.
>   mailto:[EMAIL PROTECTED]
> 
>
>$out = array($name, $srch, $sel, $case, $qvalues => array($vals,
> $valtypes));
>   echo "";
>$out[0][$name] = "free";
>$out[1][$name] = "next";
>for ($i=0; $i<2; $i++)
>   {
>  echo "   OutIndex: ", $i, " Name: ", $out[$i][$name];
>   }
> 
>  $out[0][$srch] = "outfreesrch";
>  $out[0][$sel] = "outfreesel";
>  $out[0][$case] = "outfreecase";
>  $out[0][$qvalues][0][$vals] = "outfreeqval0";
>  $out[0][$qvalues][0][$valtypes] = "outfreeqtype0";
>  $out[0][$qvalues][1][$vals] = "outfreeqval1";
>  $out[0][$qvalues][1][$valtypes] = "outfreeqtype1";
>  echo "Basearray index : ", 0, "\n";
>  echo "   name : ", $out[0][$name], "\n";
>  echo "   srch : ", $out[0][$srch], "\n";
>  echo "   sel  : ", $out[0][$sel], "\n";
>  echo "   case : ", $out[0][$case], "\n";
>  echo "   Subarray index  : 0 \n";
>  echo "  vals : ",
> $out[0][$qvalues][0][$vals], "\n";
>  echo "  valtypes : ",
> $out[0][$qvalues][0][$valtypes], "\n";
>  echo "   Subarray index  : 1 \n";
>  echo "  vals : ",
> $out[0][$qvalues][1][$vals], "\n";
>  echo "  valtypes : ",
> $out[0][$qvalues][2][$valtypes], "\n";
>  echo"";
>  $out[1][$srch] = "outnextsrch";
>  $out[1][$sel] = "outnextsel";
>  $out[1][$case] = "outnextcase";
>  $out[1][$qvalues][0][$vals] = "outnextqval0";
>  $out[1][$qvalues][0][$valtypes] = "outnextqtype0";
>  $out[1][$qvalues][1][$vals] = "outnextqval1";
>  $out[1][$qvalues][1][$valtypes] = "outnextqtype1";
>  echo "Basearray index : ", 1, "\n";
>  echo "   name : ", $out[1][$name], "\n";
>  echo "   srch : ", $out[1][$srch], "\n";
>  echo "   sel  : ", $out[1][$sel], "\n";
>  echo "   case : ", $out[1][$case], "\n";
>  echo "   Subarray index  : 0 \n";
>  echo "  vals : ",
> $out[1][$qvalues][0][$vals], "\n";
>  echo "  valtypes : ",
> $out[1][$qvalues][0][$valtypes], "\n";
>  echo "   Subarray index  : 1 \n";
>  echo "  vals : ",
> $out[1][$qvalues][1][$vals], "\n";
>  echo "  valtypes : ",
> $out[1][$qvalues][1][$valtypes], "\n";
>   echo "";
>   ?>
> 
> 


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




[PHP] Security implications - CGI vs module

2001-08-21 Thread Daniel Baldoni

G'day folks,

It's been mentioned that the module approach to installing PHP4 has some
security implications (as compared to the separate interpreter and using
CGIs).

My question is:

For sites which do not have user-installed files (i.e. all web-
content is provided by the site-owner), what risks are there in the
module approach?

Thanks for any information.
Ciao.

-- 
---+-
Daniel Baldoni BAppSc, PGradDipCompSci |  Technical Director
require 'std/disclaimer.pl'|  LcdS Pty. Ltd.
---+  856B Canning Hwy
Phone/FAX:  +61-8-9364-8171|  Applecross
Mobile: 041-888-9794   |  WA 6153
URL:http://www.lcds.com.au/|  Australia
---+-
"Any time there's something so ridiculous that no rational systems programmer
 would even consider trying it, they send for me."; paraphrased from "King Of
 The Murgos" by David Eddings.  (I'm not good, just crazy)

-- 
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] pdflib+pdi

2001-08-21 Thread Jonathan S

Hi,
we recently purchased the whole PDFlib+PDI package, however I've been
having trouble installing it.
Many of the different installation instructions i've found have told me
contradictory things.
I have tried using both the binary distribution aswell as the source.
After many rounds of recompiling and testing different options I'm
getting kinda beat.

Can anyone please instruct me on how to get PDFlib and PDI working on my
machine. I need it urgently
for a project. What configure options, what tarballs and what files to
copy between source directories.

I'm using Redhat Linux 7.1

Any help is GREATLY appreciated.
Sincerely Jonathan Svensson / Sweden



-- 
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] Importing a GIF image and making it transparent

2001-08-21 Thread Ben Quinn


Thanks to those who replied, i finally worked it out - the script has been
pasted below just incase anyone is sifting through the list archives looking
for the same thing.  One thing though, my server doesn't allow me to open a
GIF file through HTTP - ie this doesn't work

$image = ImageCreateFromGif(http://www.severname.com/image.gif);

Does anyone know of a server/hosting company that will allow me to do this?


The script:





- Original Message -
From: "Chris Lambert" <[EMAIL PROTECTED]>
To: "Ben Quinn" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2001 4:49 PM
Subject: Re: [PHP] Importing a GIF image and making it transparent


> It doesn't look like you'll be able to use GD, as GIF support was dropped
in
> 1.6 and JPEG support was only added in 1.8. You'd have to experiment with
> ImageMagick, or another command-line tool independent of PHP.
>
> /* Chris Lambert, CTO - [EMAIL PROTECTED]
> WhiteCrown Networks - More Than White Hats
> Web Application Security - www.whitecrown.net
> */
>
> - Original Message -
> From: Ben Quinn <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 21, 2001 2:23 AM
> Subject: [PHP] Importing a GIF image and making it transparent
>
>
> | Hi all
> |
> |  I've been trying to make a script that imports a GIF image from an
> external
> | server (i have permission to do this, see below) and designates a
certain
> | colour transparent for some time now and i'm not having much luck. Can
> | anyone help or provide a script that does this?
> |
> | The images i'm using are Australian weather radar images with a rather
> plain
> | brown background
> |
> | http://mirror.bom.gov.au/radar/IDR503.gif
> |
> | What i'd like to do is have an orographic map for the background, like
> this
> |
> | http://www.bsch.au.com/temp/preview.jpg
> |
> | The radar images are available to the public and i have permission to
make
> | these alterations
> |
> | Is it possible for PHP to download a GIF image (through HTTP), designate
a
> | certain colour transparent and then display the image on the screen
> without
> | saving the image to the server?
> |
> | Any help i can get with this would be much appreciated
> |
> |
> |
> |
> | --
> | 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] Function to Build Trees

2001-08-21 Thread Chris Hayes



Antwoord naar:  <[EMAIL PROTECTED]>
Van:"Dan Harrington" <[EMAIL PROTECTED]>
Onderwerp:  RE: [PHP] Function to Build Trees

> Or you could just buy from  http://www.plumbdesign.com/
> or write a PHP SDK for them.
> :-)

sorry? what does that horrible coldfusion site have to do with this?
Chris
 


--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --


 

-- 
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] how to discover cause of php crash under win98?

2001-08-21 Thread Chris Hayes

hi,
i am trying to install the thousands-of-lines big postnuke.com website 
thingie.
Unfortunately it won't start and the community does not seem to recognize 
the problem.
I get this message:

PHP caused an invalid page fault in
module PHP4TS.DLL at 015f:1008e884.

(PHP4 on win98)

Anyone any idea how i can debug? 




E_ALL is not giving any related info.
I tracked down where the page stops loading but these lines seem to be not 
related to the problem. 

I made it print a html text and this keeps working just unto the place where 
the page suddenly stops loading in a straight html bit.

By the way, quite complicated structure. Never had so many php files open at 
the same time to track a bug!


thanks,
Chris


--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --


 

-- 
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] Importing a GIF image and making it transparent

2001-08-21 Thread Chris Lambert

Did you use quotes around the URL when trying to access the image?

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Ben Quinn <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2001 6:09 AM
Subject: Re: [PHP] Importing a GIF image and making it transparent


|
| Thanks to those who replied, i finally worked it out - the script has been
| pasted below just incase anyone is sifting through the list archives
looking
| for the same thing.  One thing though, my server doesn't allow me to open
a
| GIF file through HTTP - ie this doesn't work
|
| $image = ImageCreateFromGif(http://www.severname.com/image.gif);
|
| Does anyone know of a server/hosting company that will allow me to do
this?
|
|
| The script:
|
| 
|
|
|
| - Original Message -
| From: "Chris Lambert" <[EMAIL PROTECTED]>
| To: "Ben Quinn" <[EMAIL PROTECTED]>
| Cc: <[EMAIL PROTECTED]>
| Sent: Tuesday, August 21, 2001 4:49 PM
| Subject: Re: [PHP] Importing a GIF image and making it transparent
|
|
| > It doesn't look like you'll be able to use GD, as GIF support was
dropped
| in
| > 1.6 and JPEG support was only added in 1.8. You'd have to experiment
with
| > ImageMagick, or another command-line tool independent of PHP.
| >
| > /* Chris Lambert, CTO - [EMAIL PROTECTED]
| > WhiteCrown Networks - More Than White Hats
| > Web Application Security - www.whitecrown.net
| > */
| >
| > - Original Message -
| > From: Ben Quinn <[EMAIL PROTECTED]>
| > To: <[EMAIL PROTECTED]>
| > Sent: Tuesday, August 21, 2001 2:23 AM
| > Subject: [PHP] Importing a GIF image and making it transparent
| >
| >
| > | Hi all
| > |
| > |  I've been trying to make a script that imports a GIF image from an
| > external
| > | server (i have permission to do this, see below) and designates a
| certain
| > | colour transparent for some time now and i'm not having much luck. Can
| > | anyone help or provide a script that does this?
| > |
| > | The images i'm using are Australian weather radar images with a rather
| > plain
| > | brown background
| > |
| > | http://mirror.bom.gov.au/radar/IDR503.gif
| > |
| > | What i'd like to do is have an orographic map for the background, like
| > this
| > |
| > | http://www.bsch.au.com/temp/preview.jpg
| > |
| > | The radar images are available to the public and i have permission to
| make
| > | these alterations
| > |
| > | Is it possible for PHP to download a GIF image (through HTTP),
designate
| a
| > | certain colour transparent and then display the image on the screen
| > without
| > | saving the image to the server?
| > |
| > | Any help i can get with this would be much appreciated
| > |
| > |
| > |
| > |
| > | --
| > | PHP General Mailing List (http://www.php.net/)
| > | To unsubscribe, e-mail: [EMAIL PROTECTED]
| > | For additional commands, e-mail: [EMAIL PROTECTED]
| > | To contact the list administrators, e-mail:
[EMAIL PROTECTED]
| > |
| > |
| > |
| >
| >
| > --
| > PHP General Mailing List (http://www.php.net/)
| > To unsubscribe, e-mail: [EMAIL PROTECTED]
| > For additional commands, e-mail: [EMAIL PROTECTED]
| > To contact the list administrators, e-mail: [EMAIL PROTECTED]
| >
| >
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| To contact the list administrators, e-mail: [EMAIL PROTECTED]
|
|
|


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




[PHP] Re: Creating images on the fly

2001-08-21 Thread _lallous

Yes...
get inspired from this simple HTML example even!





Inline Image generation (via JavaScript)



























"Niklas Lampen" <[EMAIL PROTECTED]> wrote in message
001701c12a09$25470c50$1521b9d5@laptop">news:001701c12a09$25470c50$1521b9d5@laptop...
> Is it possible to create images on the fly, if my phpinfo says nothing
about
> GD? What I know is that ImageCreateFromPNG() says it's undefined.
>
> If not, what do I need to install to php to make it possible?
>
>
> Niklas Lampén
>



-- 
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] Re: how to discover cause of php crash under win98?

2001-08-21 Thread _lallous

Try installing PHP4 as CGI instead! It's much more stable!

"Chris Hayes" <[EMAIL PROTECTED]> wrote in message
3B8254DA.32400.C3717@localhost">news:3B8254DA.32400.C3717@localhost...
> hi,
> i am trying to install the thousands-of-lines big postnuke.com website
> thingie.
> Unfortunately it won't start and the community does not seem to recognize
> the problem.
> I get this message:
>
> PHP caused an invalid page fault in
> module PHP4TS.DLL at 015f:1008e884.
>
> (PHP4 on win98)
>
> Anyone any idea how i can debug?
>
>
>
>
> E_ALL is not giving any related info.
> I tracked down where the page stops loading but these lines seem to be not
> related to the problem.
>
> I made it print a html text and this keeps working just unto the place
where
> the page suddenly stops loading in a straight html bit.
>
> By the way, quite complicated structure. Never had so many php files open
at
> the same time to track a bug!
>
>
> thanks,
> Chris
>
> 
> --  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --
> 
>
>



-- 
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] Importing a GIF image and making it transparent

2001-08-21 Thread Ben Quinn

G'day Chris

Yep i did, with this code

$id = ImageCreateFromGif("http://mirror.bom.gov.au/radar/IDR503.gif";);

I get this error :<

Warning: imagecreatefromgif: Sockets are not supported for image type 'GIF'
in /home/httpd/html/bsch/temp/monkey.php on line 5

Brick wall #9080982093848934  - but i guess that makes the end result just
that little bit better :-)

BTW - can anyone recommend a good GD install tutorial? If i can't run this
script on my website i'll install PHP and GD and run it from my computer



- Original Message -
From: "Chris Lambert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2001 8:45 PM
Subject: Re: [PHP] Importing a GIF image and making it transparent


> Did you use quotes around the URL when trying to access the image?
>
> /* Chris Lambert, CTO - [EMAIL PROTECTED]
> WhiteCrown Networks - More Than White Hats
> Web Application Security - www.whitecrown.net
> */
>
> - Original Message -
> From: Ben Quinn <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 21, 2001 6:09 AM
> Subject: Re: [PHP] Importing a GIF image and making it transparent
>
>
> |
> | Thanks to those who replied, i finally worked it out - the script has
been
> | pasted below just incase anyone is sifting through the list archives
> looking
> | for the same thing.  One thing though, my server doesn't allow me to
open
> a
> | GIF file through HTTP - ie this doesn't work
> |
> | $image = ImageCreateFromGif(http://www.severname.com/image.gif);
> |
> | Does anyone know of a server/hosting company that will allow me to do
> this?
> |
> |
> | The script:
> |
> |  |
> | $id = ImageCreateFromGif("image.gif");
> |
> | $trans = imagecolorexact($id, 120, 100, 90);
> |
> | imagecolortransparent($id, $trans);
> |
> | ImageGIF($id,"newimage.gif");
> |
> | echo "done";
> |
> | ?>
> |
> |
> |
> | - Original Message -
> | From: "Chris Lambert" <[EMAIL PROTECTED]>
> | To: "Ben Quinn" <[EMAIL PROTECTED]>
> | Cc: <[EMAIL PROTECTED]>
> | Sent: Tuesday, August 21, 2001 4:49 PM
> | Subject: Re: [PHP] Importing a GIF image and making it transparent
> |
> |
> | > It doesn't look like you'll be able to use GD, as GIF support was
> dropped
> | in
> | > 1.6 and JPEG support was only added in 1.8. You'd have to experiment
> with
> | > ImageMagick, or another command-line tool independent of PHP.
> | >
> | > /* Chris Lambert, CTO - [EMAIL PROTECTED]
> | > WhiteCrown Networks - More Than White Hats
> | > Web Application Security - www.whitecrown.net
> | > */
> | >
> | > - Original Message -
> | > From: Ben Quinn <[EMAIL PROTECTED]>
> | > To: <[EMAIL PROTECTED]>
> | > Sent: Tuesday, August 21, 2001 2:23 AM
> | > Subject: [PHP] Importing a GIF image and making it transparent
> | >
> | >
> | > | Hi all
> | > |
> | > |  I've been trying to make a script that imports a GIF image from an
> | > external
> | > | server (i have permission to do this, see below) and designates a
> | certain
> | > | colour transparent for some time now and i'm not having much luck.
Can
> | > | anyone help or provide a script that does this?
> | > |
> | > | The images i'm using are Australian weather radar images with a
rather
> | > plain
> | > | brown background
> | > |
> | > | http://mirror.bom.gov.au/radar/IDR503.gif
> | > |
> | > | What i'd like to do is have an orographic map for the background,
like
> | > this
> | > |
> | > | http://www.bsch.au.com/temp/preview.jpg
> | > |
> | > | The radar images are available to the public and i have permission
to
> | make
> | > | these alterations
> | > |
> | > | Is it possible for PHP to download a GIF image (through HTTP),
> designate
> | a
> | > | certain colour transparent and then display the image on the screen
> | > without
> | > | saving the image to the server?
> | > |
> | > | Any help i can get with this would be much appreciated
> | > |
> | > |
> | > |
> | > |
> | > | --
> | > | PHP General Mailing List (http://www.php.net/)
> | > | To unsubscribe, e-mail: [EMAIL PROTECTED]
> | > | For additional commands, e-mail: [EMAIL PROTECTED]
> | > | To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> | > |
> | > |
> | > |
> | >
> | >
> | > --
> | > PHP General Mailing List (http://www.php.net/)
> | > To unsubscribe, e-mail: [EMAIL PROTECTED]
> | > For additional commands, e-mail: [EMAIL PROTECTED]
> | > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> | >
> | >
> |
> |
> | --
> | PHP General Mailing List (http://www.php.net/)
> | To unsubscribe, e-mail: [EMAIL PROTECTED]
> | For additional commands, e-mail: [EMAIL PROTECTED]
> | To contact the list administrators, e-mail: [EMAIL PROTECTED]
> |
> |
> |
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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

[PHP] Use cron to execute a script

2001-08-21 Thread Augusto Cesar Castoldi

Hi.

I added to crontab the command "0 * * * * lynx -dump
-nolog http://localhost/backup.php"; but this task are
not running.

In "man cron" I saw this:
---
DESCRIPTION
   Cron  should be started from /etc/rc or
/etc/rc.local.  It will return immediately, so you
don't need to start it with '&'.
---

How can I stard the cron?

thanks.

Augusto

___
Yahoo! GeoCities
Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil 
e grátis!
http://br.geocities.yahoo.com/

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




Re: [PHP] Use cron to execute a script

2001-08-21 Thread Brad Hubbard

On Tue, 21 Aug 2001 21:05, Augusto Cesar Castoldi wrote:
> Hi.
>
> I added to crontab the command "0 * * * * lynx -dump
> -nolog http://localhost/backup.php"; but this task are
> not running.
>

On RedHat.

chkconfig --level 2345 crond on

Brad

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




Re: [PHP] Use cron to execute a script

2001-08-21 Thread Brad Hubbard

On Tue, 21 Aug 2001 21:27, Brad Hubbard wrote:
> chkconfig --level 2345 crond on

Oh and;

/etc/rc.d/init.d/crond start

of course.

Brad 

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




[PHP] Re: Use cron to execute a script --> OTHER problem now

2001-08-21 Thread Augusto Cesar Castoldi

Hi.

now my cron is working, but the command don't. If I do
manualy "lynx -dump -nolog
http://localhost/backups/backup.php"; it works, but
with cron didn't worked. I receive this "e-mail" from
"Cron Daemon":
---
Subject: Cron  lynx -dump -nolog
http://localhost/backups/backup.php

Your terminal lacks the ability to clear the screen or
position the cursor.
---

Why didn't worked?

thanks,

Augusto


___
Yahoo! GeoCities
Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil 
e grátis!
http://br.geocities.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] Resizing jpegs

2001-08-21 Thread Seb Frost

How can I do this?  Say I have a 320x240 file but I only want to show a
160x120 thumbnail.  I'm looking to decrease download speeds.

cheers,

- seb


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




RE: [PHP] Re: HTTPS w/ header() ?

2001-08-21 Thread Dave

chicken or egg question here...

assuming the directory requires authentication a la .htaccess or httpd.conf
allow/deny
does this methos encapsulate the authentication in the SSL or does this only
eget applied after authenticating and reading the file to get the header
portion.

Example,  current setup is to access the secure page via https://mypage

this means the SSL layer is already in place when apache prompts for
user/password, thus transmitting the user/pw pair securely to the server.

without the SSL layer in place, your user/pw pair is essentially being snt open
text for anyone to parse.  If the header information contained in the if
statement isn't parsed untill after the uid/pw pair is already sent.

I would suspect that since PHP parses the file prior to delivering it to the
user, that the lack of SSL is detected and the resulting login session is
encapsulated in the SSL layer.

Can anyone verify this?

Dave


>if(getenv("HTTPS")!="on")
>{
>header ("Location: https://logon_screen";);
>}
>
>every page has an include that checks $HTTPS as part of the sessions and
>validation. If https!="on" then it kicks you back to the logon screen.
>
>you could do the same using
>
>if(getenv("HTTPS")!="on")
>{
>header ("Location: https://$SERVER_NAME/$PHP_SELF";);
>}


-- 
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] List of files?

2001-08-21 Thread Seb Frost

OK so I'vebeen reading about reading and writing to/from files, but what I
want to do is (I think) simpler than this.

Basically I want to look at a directory and be able to get a list of all
subdirectories and then a list of the files in each directory.  Can someone
give me a hint?

cheers

- seb


-- 
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] Mutiline read as Sigle Line!

2001-08-21 Thread Jack

Dear all
I had a page which let user to input a long description into it! and had
wrote a script which will "fputs" the user input content to content.txt!
When i open the content.txt, it is shown below:

This is a test!
and this is not a joke!

which is fine , because it display as how the user type into the input text
box.
I got another php page which i use "fileread" to grap the content from
content.txt to display it to the browser!! The problem comes, which it read
all the content from content.txt as one line!! It show like below:

This is a test!and this is not a joke!

I want the browser could display exactly the same as the user input! even
the lines and format!

Could anyone pls help me with this?

Thx
Jack
[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] RE: [PHP-WIN] Mutiline read as Sigle Line!

2001-08-21 Thread Michael Rudel

Hi Jack,

... look at the generated html-code, you will read:

This is a test!
and this is not a joke!

But since html doesn't display \r\n you have to use
the php-function nl2br.

Greetinx,
  Mike

Michael Rudel
- Web-Development, Systemadministration -

Besuchen Sie uns am 20. und 21. August 2001 auf der
online-marketing-düsseldorf in Halle 1 Stand E 16
___

Suchtreffer AG
Bleicherstraße 20
D-78467 Konstanz
Germany
fon: +49-(0)7531-89207-17
fax: +49-(0)7531-89207-13
e-mail: mailto:[EMAIL PROTECTED]
internet: http://www.suchtreffer.de
___



> -Original Message-
> From: Jack [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 21, 2001 10:58 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP-WIN] Mutiline read as Sigle Line!
>
>
> Dear all
> I had a page which let user to input a long description into
> it! and had
> wrote a script which will "fputs" the user input content to
> content.txt!
> When i open the content.txt, it is shown below:
>
> This is a test!
> and this is not a joke!
>
> which is fine , because it display as how the user type into
> the input text
> box.
> I got another php page which i use "fileread" to grap the content from
> content.txt to display it to the browser!! The problem comes,
> which it read
> all the content from content.txt as one line!! It show like below:
>
> This is a test!and this is not a joke!
>
> I want the browser could display exactly the same as the user
> input! even
> the lines and format!
>
> Could anyone pls help me with this?
>
> Thx
> Jack
> [EMAIL PROTECTED]
>
>
>
> --
> PHP Windows 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] Free PHP runtime Accelerator for Linux available

2001-08-21 Thread PHP Accelerator

Thanks. If you're running Linux then have you tried it yet?  I'm really keen 
for some folks to try and break it, and either find that they can't (which 
looks promising at the moment), and so start getting the benefit, or expose 
any remaining show-stoppers so that they can get resolved asap.

There are no fancy graphics, and a simple goal -

* If you install it
* Your scripts run quicker

That's it!

I'll be updating the http://212.67.208.211 site over the next few days, give 
it a domain name, and most importantly be updating the accelerator to 
hopefully yield further performance gains.

>From: Maxim Maletsky <[EMAIL PROTECTED]>
>To: 'PHP Accelerator' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>CC: [EMAIL PROTECTED]
>Subject: RE: [PHP] Free PHP runtime Accelerator for Linux available
>Date: Tue, 21 Aug 2001 13:49:42 +0900
>
>Great work, Nick.
>keep it this way!
>
>Maxim Maletsky
>
>
>-Original Message-
>From: PHP Accelerator [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, August 21, 2001 12:00 PM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: Re: [PHP] Free PHP runtime Accelerator for Linux available
>
>
>Right, and neither is the accelerator at the moment, and it may very well
>never be, although there's no particular reason for that. But the scripting
>engine is as it's part of PHP, and that's what I explored in order to write
>the accelerator.
>
>And now that I've studied the engine pretty intensely I've a good idea for
>some of the optimisations that their optimiser is probably having a go at.
>It's been a few fun, late nigh, and at times intensely frustrating,
>evenings, but I'm happy with even the sub-optimal current performance 
>gains.
>
>
> >From: Daniel Adams <[EMAIL PROTECTED]>
> >To: PHP Accelerator <[EMAIL PROTECTED]>
> >Subject: Re: [PHP] Free PHP runtime Accelerator for Linux available
> >Date: Mon, 20 Aug 2001 22:34:12 -0400 (EDT)
> >
> >Cool. :-) the zend optimizer is not open-source, right?
> > - Dan
> >
> >On Tue, 21 Aug 2001, PHP Accelerator wrote:
> >
> > > Hi. Yes, it caches the result of compiling scripts and loads the
> >compiled
> > > code on subsequent runs, thus bypassing the parsing of source code
> >entirely
> > > - unless the source code has changed and the compiled code is stale.
> > >
>
>
>_
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
>--
>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]


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


-- 
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] Free PHP runtime Accelerator for Linux available

2001-08-21 Thread PHP Accelerator

Actually it would be interesting to get a FreeBSD port. When I've made the 
immediate batch of changes that I have in mind, and if things are still 
looking good, then volunteers to contribute builds would be welcome.

Right now, even though the accelerator provides a decent speed up, the Zend 
Cache is going to be faster - there's really no way that it couldn't be :-)  
But the accelerator should get faster too, and with the core code seemingly 
working, the first set of changes will be to simply do some things more 
sensibly. After that there are a number of things that I can imagine doing 
to really minimise the processing required in loading a given script, but I 
have other things I want to work on too. I also have ideas for a project 
that might slash execution time more than any other extensions currently 
available, but again for now this will remain a 'would like to start' 
project.

Cheers
Nick


>From: Maxim Maletsky <[EMAIL PROTECTED]>
>To: 'PHP Accelerator' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>CC: [EMAIL PROTECTED]
>Subject: RE: [PHP] Free PHP runtime Accelerator for Linux available
>Date: Tue, 21 Aug 2001 18:45:13 +0900
>
>Thanks, Nick.
>Well, I am running FreeBSD machine, but can start up my old Linux box to
>play with your accelerator.
>I'll let you know when I do that,
>I am kind of curious to compare it with Zend's Cache.
>
>Cheers,
>Maxim Maletsky
>
>
>-Original Message-
>From: PHP Accelerator [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, August 21, 2001 4:53 PM
>To: Maxim Maletsky; [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: RE: [PHP] Free PHP runtime Accelerator for Linux available
>
>
>Thanks. If you're running Linux then have you tried it yet?  I'm really 
>keen
>
>for some folks to try and break it, and either find that they can't (which
>looks promising at the moment), and so start getting the benefit, or expose
>any remaining show-stoppers so that they can get resolved asap.
>
>There are no fancy graphics, and a simple goal -
>
>   * If you install it
>   * Your scripts run quicker
>
>That's it!
>
>I'll be updating the http://212.67.208.211 site over the next few days, 
>give
>
>it a domain name, and most importantly be updating the accelerator to
>hopefully yield further performance gains.
>
> >From: Maxim Maletsky <[EMAIL PROTECTED]>
> >To: 'PHP Accelerator' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> >CC: [EMAIL PROTECTED]
> >Subject: RE: [PHP] Free PHP runtime Accelerator for Linux available
> >Date: Tue, 21 Aug 2001 13:49:42 +0900
> >
> >Great work, Nick.
> >keep it this way!
> >
> >Maxim Maletsky
> >
> >
> >-Original Message-
> >From: PHP Accelerator [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, August 21, 2001 12:00 PM
> >To: [EMAIL PROTECTED]
> >Cc: [EMAIL PROTECTED]
> >Subject: Re: [PHP] Free PHP runtime Accelerator for Linux available
> >
> >
> >Right, and neither is the accelerator at the moment, and it may very well
> >never be, although there's no particular reason for that. But the 
>scripting
> >engine is as it's part of PHP, and that's what I explored in order to 
>write
> >the accelerator.
> >
> >And now that I've studied the engine pretty intensely I've a good idea 
>for
> >some of the optimisations that their optimiser is probably having a go 
>at.
> >It's been a few fun, late nigh, and at times intensely frustrating,
> >evenings, but I'm happy with even the sub-optimal current performance
> >gains.
> >
> >
> > >From: Daniel Adams <[EMAIL PROTECTED]>
> > >To: PHP Accelerator <[EMAIL PROTECTED]>
> > >Subject: Re: [PHP] Free PHP runtime Accelerator for Linux available
> > >Date: Mon, 20 Aug 2001 22:34:12 -0400 (EDT)
> > >
> > >Cool. :-) the zend optimizer is not open-source, right?
> > >   - Dan
> > >
> > >On Tue, 21 Aug 2001, PHP Accelerator wrote:
> > >
> > > > Hi. Yes, it caches the result of compiling scripts and loads the
> > >compiled
> > > > code on subsequent runs, thus bypassing the parsing of source code
> > >entirely
> > > > - unless the source code has changed and the compiled code is stale.
> > > >
> >
> >
> >_
> >Get your FREE download of MSN Explorer at 
>http://explorer.msn.com/intl.asp
> >
> >
> >--
> >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]
>
>
>_
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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


-- 
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] Re: [PHP-DEV] php and autoconf 2.50

2001-08-21 Thread jan

On Sat, Aug 11, 2001 at 09:36:09AM +0200, Sascha Schumann wrote:
> On Fri, 10 Aug 2001, Daniel Adams wrote:
> 
> > Has anyone got the cvs source to work with autoconf 2.50?
> 
> Noone as far as I know has worked on that so far; anyone who
> is interested in this functionality is encouraged to provide
> patches which addresses the remaining issues.

Done -> [PHP-DEV] Bug #12871: updating build-system to autoconf 2.5x

> - Sascha Experience IRCG

  Jan

-- 
  => http://www.kneschke.de <==> http://www.random-downloads.com <=
   mailto: [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] Help me on server.

2001-08-21 Thread Hari Prakash

Hi,

   I'm a PHP Programmer. My collegue Java programmer need to connect a web
page which is a php page programmed by me. While he is calling a php page
thru apache he gets html o/p. But With IIS 5.0, he gets expection error. But
the script is same. Can any one help me?.

   Hari.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.268 / Virus Database: 140 - Release Date: 8/7/2001


-- 
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] Picking random numbers

2001-08-21 Thread Dave

You've gotten a few responses already...  but since you didn't describe the
application, here is an alternative if you are using the random numbers to
retrieve random records from a database (postgreqsl in this example);

$query = "SELECT * FROM table ORDER BY random() LIMIT 5";

am usre the MySQL and others have similar constructs...  again, just in case you
were looking for database use and not just the number use (which others have
more than adequately answered for you).

Dave

>-Original Message-
>From: Seb Frost [mailto:[EMAIL PROTECTED]]
>Sent: Monday, August 20, 2001 9:13 PM
>To: PHP General List
>Subject: [PHP] Picking random numbers
>
>
>OK I want to pick 5 random numbers from 1 to 200.  Easy.  They must all be
>different.  Not so easy.
>
>And I don't want to use shuffle because of the comments on php.net about it.
>
>- seb
>
>
>--
>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] Linux

2001-08-21 Thread Roman

Off topic question:

How I create install file in red hat linux from bin file.
example: in /home/name i have file file.bin and I want create install from
this file

roman



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




RE: [PHP] converting str with \n to one line str??

2001-08-21 Thread Dave

try "\r\n" (return and new line)  Have had to use this when parsing cisco
output...  uses both not just newlines.

Dave
>-Original Message-
>From: Jens Schodt [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, August 21, 2001 3:20 AM
>To: 'Tyler Longren'
>Cc: '[EMAIL PROTECTED]'
>Subject: SV: [PHP] converting str with \n to one line str??
>
>
>
>$temp = str_replace("\n","test",$temp) is doing the same thing. It is still
>a string in several lines if you look in the source :-(
>
>jens
>
>-Oprindelig meddelelse-
>Fra: Tyler Longren [mailto:[EMAIL PROTECTED]]
>Sendt: 20. august 2001 20:20
>Til: Jens
>Cc: [EMAIL PROTECTED]
>Emne: Re: [PHP] converting str with \n to one line str??
>
>
>You could use str_replace().
>
>--
>Tyler Longren
>Captain Jack Communications
>[EMAIL PROTECTED]
>www.captainjack.com
>
>
>
>On Mon, 20 Aug 2001 20:15:54 +0200
>"Jens" <[EMAIL PROTECTED]> wrote:
>
>> When I use Javascript with PHP i run into one problem. When I get the
>> data i
>> need from the database it often has a lot of  and \n (new lines) in
>> it.
>> The  are no problem when converting a string to a Javascript string,
>> but
>> the \n are. The string has to be all in one line.
>>
>> example:
>> > I
>> am"; ?>
>>
>> var temp =  
>>
>> This is not working!! But this would :
>>
>> 
>>
>> var temp = ''; 
>>
>> Can you help me please?
>>
>> thanks Jens
>>
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


-- 
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] List of files?

2001-08-21 Thread

On Tue, Aug 21, 2001 at 01:26:27PM +0100, Seb Frost wrote:
> OK so I'vebeen reading about reading and writing to/from files, but what I
> want to do is (I think) simpler than this.
> 
> Basically I want to look at a directory and be able to get a list of all
> subdirectories and then a list of the files in each directory.  Can someone
> give me a hint?
> 
> cheers
> 
> - seb


This should give you all info you need:

http://www.php.net/manual/en/ref.dir.php


-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

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

2001-08-21 Thread Nick Davies


./file.bin :)

On Tue, 21 Aug 2001, Roman wrote:

> Off topic question:
> 
>   How I create install file in red hat linux from bin file.
> example: in /home/name i have file file.bin and I want create install from
> this file
> 
> roman
> 
> 
> 
> 


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




[PHP] PHP_Commander

2001-08-21 Thread Andrey Hristov

Hope this will help. Some code is grabbed from the PHP's quickref.

';
 echo "";

 if ($dir = @opendir($HTTP_POST_VARS['dir'].'/')) {
  while($file = readdir($dir)) {
   if (is_file($HTTP_POST_VARS['dir']."/$file")){
$fsize=filesize($HTTP_POST_VARS['dir']."/$file");
   }else{
$fsize=0;
   }
  printf("%120s,%10d\n","$file",$fsize);
  }
  closedir($dir);
 }
}else{
 echo "Back";
 $ar=file($HTTP_POST_VARS['dir']);
 while (list($k,$v)=each($ar)){
  $ln+=strlen($v);
  if ($ln>0){
   echo htmlspecialchars($v)."\n";
  }
 }
}
?>

Have Phun.
http://www.phreedom.org is for phun.



-- 
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] List of files?

2001-08-21 Thread Brian C. Doyle

Here is some code that I use to do what you wanted and attach is the files 
for the folders.
This uses javascript that works well with Internet Explorer and creates 
sublist that appear in the folder.







 Untitled




var head="display:''"
img1=new Image()
img1.src="fold.gif"
img2=new Image()
img2.src="open.gif"

function change(){
if(!document.all)
   return
if (event.srcElement.id=="foldheader") {
   var srcIndex = event.srcElement.sourceIndex
   var nested = document.all[srcIndex+1]
   if (nested.style.display=="none") {
  nested.style.display=''
  event.srcElement.style.listStyleImage="url(open.gif)"
   }
   else {
  nested.style.display="none"
  event.srcElement.style.listStyleImage="url(fold.gif)"
   }
}
}
document.onclick=change







 
  


  


  


  

  




 New Page


 Main Page







At 01:26 PM 8/21/01 +0100, Seb Frost wrote:
>OK so I'vebeen reading about reading and writing to/from files, but what I
>want to do is (I think) simpler than this.
>
>Basically I want to look at a directory and be able to get a list of all
>subdirectories and then a list of the files in each directory.  Can someone
>give me a hint?
>
>cheers
>
>- seb
>
>
>--
>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]

 filelist.zip

-- 
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] Why linx don't work with cron?

2001-08-21 Thread Augusto Cesar Castoldi

Hi, I'm trying the command "lynx -dump -nolog
http://localhost/script.php > /dev/null" on crontab
but I (httpd) receive an e-mail from "Cron Daemon"
saying that:
"Your terminal lacks the ability to clear the screen
or position the cursor."

what should I do run my script with cron?

thanks,

Augusto

___
Yahoo! GeoCities
Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil 
e grátis!
http://br.geocities.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] Why lynx don't work with cron?

2001-08-21 Thread Augusto Cesar Castoldi

Hi, I'm trying the command "lynx -dump -nolog
http://localhost/script.php > /dev/null" on crontab
but I (httpd) receive an e-mail from "Cron Daemon"
saying that:
"Your terminal lacks the ability to clear the screen
or position the cursor."

what should I do run my script with cron?

thanks,

Augusto

___
Yahoo! GeoCities
Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil 
e grátis!
http://br.geocities.yahoo.com/

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




RE: [PHP] Re: Use cron to execute a script --> OTHER problem now

2001-08-21 Thread Dave

php files are text files
you have to tell cron (or more directly the system) what to do with it.

like a perl script, simply tell it where to find the PHP processor and it will
then use it to run your script...  otherwise it is just diaplaying a page of
text every minute.

you must have a cgi copy of PHP executable available to run your script, yes you
can have both on your server if you are already running the mod_php version.

add

#!/usr/local/bin/php -q

to the first line in your script...  then cron will know what to do with your
text file.

BTW; a quick search on google for "run php as shell script" produced this as the
number 1 result http://www.phpbuilder.com/columns/darrell2319.php3
searching for "PHP and CRON" produced yet another plethora of responses.

Dave

>-Original Message-
>From: Augusto Cesar Castoldi [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, August 21, 2001 8:17 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP] Re: Use cron to execute a script --> OTHER problem now
>
>
>Hi.
>
>now my cron is working, but the command don't. If I do
>manualy "lynx -dump -nolog
>http://localhost/backups/backup.php"; it works, but
>with cron didn't worked. I receive this "e-mail" from
>"Cron Daemon":
>---
>Subject: Cron  lynx -dump -nolog
>http://localhost/backups/backup.php
>
>Your terminal lacks the ability to clear the screen or
>position the cursor.
>---
>
>Why didn't worked?
>
>thanks,
>
>Augusto
>
>
>___
>
>Yahoo! GeoCities
>Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo!
>GeoCities. É fácil e grátis!
>http://br.geocities.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] new one is it ??

2001-08-21 Thread billfarr

DOH!  Thanks for the heads-up, David.  Here's the code I promised.

My apologies!

Bill
---8<---8<---8<---8<---8<---8<---8<-

http://www.microsoft.com/technet/security/bulletin/MS01-033.asp\n\n";; 
 
  $message .= "Because of the importance of this threat, "; 
  $message .= "this alert is being made jointly by: \n"; 
  $message .= "Microsoft \n"; 
  $message .= "The National Infrastructure Protection Center \n"; 
  $message .= "Federal Computer Incident Response Center (FedCIRC) \n"; 
  $message .= "Information Technology Association of America (ITAA) \n"; 
  $message .= "CERT Coordination Center \n"; 
  $message .= "SANS Institute \n"; 
  $message .= "Internet Security Systems \n"; 
  $message .= "Internet Security Alliance \n"; 
 
  $headers .= "From: $name <$from>\n"; 
  $headers .= "X-Mailer: PHP\n"; // mailer 
  $headers .= "X-Priority: 1\n"; // Urgent message! 
  $headers .= "Reply-To: $from\n"; // jwwf - in case the ISP actually
replies
  $headers .= "Return-Path: <$from>\n";  // Return path for errors 


// jwwf - more fiddling with the original code
$GotResponse = false; 
 
// ARIN makes a messy output.  To get what we want we have to requery using
the NIC  
// handle to get the email address for the contact.  First, replace this
skimpy output 
// with the output that has the required data in it 
 
foreach ( $Authorities as $Authority ) { 
if ( $GotResponse ) { break; } 
$RespondingAuthority = $Authority; 
@exec("/usr/bin/whois $ip@$Authority", $WholeResponse, $status ); 
$UWholeResponse = strtoupper( join( " ", $WholeResponse) ); 
if ( ( strpos( $UWholeResponse, "NO ENTRIES" ) === false ) && (
strpos( $UWholeResponse, "NO MATCH" ) === false ) ) { 
$GotResponse = true; 
$Keepgoing = true; 
foreach ( $WholeResponse as $Line ) { 
if ( ( $Authority == "whois.arin.net" ) && ( $Keepgoing ) )
{ 
$StartPos = strpos( $Line, chr(40) ); 
if ( !( $StartPos === false ) ) { 
$StartPos++; 
$RightSide = strpos( $Line, chr(41)
); 
$RightSide = $RightSide - $StartPos;

$Query = substr( $Line, $StartPos,
$RightSide ); 
$Query .= "@whois.arin.net"; 
unset( $WholeResponse ); 
@exec( "/usr/bin/whois !$Query",
$WholeResponse, $status ); 
$Keepgoing = false; 
break;   
}
}
}
}
} 
 
// APNIC and RIPE produce similar reports.  ARIN on the other hand makes 
// you work twice as hard to find an email address.  With ARIN, one must 
// perform a double-query (as above) to get the information associated 
// with a network's NIC handle.  APNIC and RIPE just hand it to you  
// straightaway. 
 
unset( $SendTo ); // just for effect 
if ( $RespondingAuthority != "whois.arin.net" ) { 
foreach ( $WholeResponse as $Line ) { 
list( $Key, $Value ) = explode( ":", $Line ); 
if ( strtoupper( $Key ) == "E-MAIL" ) {  
$SendTo = trim( $Value ); 
break;   
}
} 
} else { 
foreach ( $WholeResponse as $Line ) { 
$Words = explode( " ", trim( $Line ) ); 
foreach ( $Words as $Word ) { 
if
(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$Word)) { 
$SendTo = $Word; 
break; 
} 
} 
if ( isset( $SendTo ) ) { break; } 
} 
} 
 
if ( !isset( $SendTo ) ) { 
$SendTo = $DefaultSendTo; 
} else { 
$SendTo .= ",".$DefaultSendTo; 
} 
 
  if($logt == "file") 
  { 
   $fp = fopen($path . "/code-red_ips.txt","a+"); 
  } 
  elseif($logt == "syslog") 
  { 
   define_syslog_variables(); 
   openlog("httpd", LOG_PERROR, LOG_DAEMON); 
  } 
 
  /* Email the offender's ISP and also send a copy to our own sysops */ 
  if(!empty($abuse))  
  { 
   while(list($key,$var) = each($abuse))  
{ 
mail($var, $subject, $message, $headers); 
if($logt == "file") 
{ 
 fputs($fp,"$host " . date(r) . " - Email sent to $var\n");  
} 
elseif($logt == "syslog")  
{ 
 syslog(LOG_WARNING,"Code red from $host email sent to $var"); 
} 
   } 
  }  
  elseif(!empty($notabuse))  
  { 
   while(list($key,$var) = each($notabuse))  
   { 
mail($var, $subject, $message, $headers); 
if($logt == "file")   
{ 
 

Re: [PHP] Why lynx don't work with cron?

2001-08-21 Thread Stig-Ørjan Smelror

Augusto Cesar Castoldi wrote:

> Hi, I'm trying the command "lynx -dump -nolog
> http://localhost/script.php > /dev/null" on crontab
> but I (httpd) receive an e-mail from "Cron Daemon"
> saying that:
> "Your terminal lacks the ability to clear the screen
> or position the cursor."
> 
> what should I do run my script with cron?
> 
> thanks,
> 
> Augusto
> 
> 
>___
> Yahoo! GeoCities
> Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É 
>fácil e grátis!
> http://br.geocities.yahoo.com/
> 
> 


One thing comes to mind.

Compile PHP as a CGI and use that to run your scipts ;)



-- 
Stig-Ørjan Smelror
Systemutvikler

Linux Communications AS
Sandakerveien 48b
Box 1801 - Vika
N-0123 Oslo, Norway

tel. +47 22 09 28 80
fax. +47 22 09 28 81
http://www.lincom.no/


-- 
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] Why lynx don't work with cron?

2001-08-21 Thread Cristopher Daniluk

Augusto,

If for whatever reason you can't (I don't even begin to want to know why),
try wget :)

Regards,


Cristopher Daniluk
President & CEO
email: [EMAIL PROTECTED]
direct: 330/530-2373

Digital Services Network, Inc
Unleashing Your Potential
voice: 800/845-4822
web: http://www.dsnet.net/


-Original Message-
From: Stig-Ørjan Smelror [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 21, 2001 9:10 AM
To: Augusto Cesar Castoldi
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Why lynx don't work with cron?


Augusto Cesar Castoldi wrote:

> Hi, I'm trying the command "lynx -dump -nolog
> http://localhost/script.php > /dev/null" on crontab
> but I (httpd) receive an e-mail from "Cron Daemon"
> saying that:
> "Your terminal lacks the ability to clear the screen
> or position the cursor."
>
> what should I do run my script with cron?
>
> thanks,
>
> Augusto
>
>

___
> Yahoo! GeoCities
> Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo!
GeoCities. É fácil e grátis!
> http://br.geocities.yahoo.com/
>
>


One thing comes to mind.

Compile PHP as a CGI and use that to run your scipts ;)



--
Stig-Ørjan Smelror
Systemutvikler

Linux Communications AS
Sandakerveien 48b
Box 1801 - Vika
N-0123 Oslo, Norway

tel. +47 22 09 28 80
fax. +47 22 09 28 81
http://www.lincom.no/


--
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] converting str with \n to one line str??

2001-08-21 Thread Christian Eichert

I usualy work on chr()
I whould have done  for the \n:
$temp = str_replace(chr(10),"test",$temp)
and for the \r\n
$temp = str_replace( chr(13).chr(10) ,"test",$temp)

but my experience tells me it's \n\r not \r\n
I use the
$temp = str_replace( chr(10).chr(13) ,"test",$temp)


have a nice day
eichert



> -Original Message-
> From: Dave [mailto:[EMAIL PROTECTED]]
> Sent: Dienstag, 21. August 2001 14:40
> To: Jens Schodt; 'Tyler Longren'
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] converting str with \n to one line str??
>
>
> try "\r\n" (return and new line)  Have had to use this when parsing cisco
> output...  uses both not just newlines.
>
> Dave
> >-Original Message-
> >From: Jens Schodt [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, August 21, 2001 3:20 AM
> >To: 'Tyler Longren'
> >Cc: '[EMAIL PROTECTED]'
> >Subject: SV: [PHP] converting str with \n to one line str??
> >
> >
> >
> >$temp = str_replace("\n","test",$temp) is doing the same thing.
> It is still
> >a string in several lines if you look in the source :-(
> >
> >jens
> >
> >-Oprindelig meddelelse-
> >Fra: Tyler Longren [mailto:[EMAIL PROTECTED]]
> >Sendt: 20. august 2001 20:20
> >Til: Jens
> >Cc: [EMAIL PROTECTED]
> >Emne: Re: [PHP] converting str with \n to one line str??
> >
> >
> >You could use str_replace().
> >
> >--
> >Tyler Longren
> >Captain Jack Communications
> >[EMAIL PROTECTED]
> >www.captainjack.com
> >
> >
> >
> >On Mon, 20 Aug 2001 20:15:54 +0200
> >"Jens" <[EMAIL PROTECTED]> wrote:
> >
> >> When I use Javascript with PHP i run into one problem. When I get the
> >> data i
> >> need from the database it often has a lot of  and \n (new lines) in
> >> it.
> >> The  are no problem when converting a string to a
> Javascript string,
> >> but
> >> the \n are. The string has to be all in one line.
> >>
> >> example:
> >>  >> I
> >> am"; ?>
> >>
> >> var temp =  
> >>
> >> This is not working!! But this would :
> >>
> >> 
> >>
> >> var temp = ''; 
> >>
> >> Can you help me please?
> >>
> >> thanks Jens
> >>
> >>
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
> --
> 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] Re: Multi-dimensional array issue

2001-08-21 Thread Ken Hopkins

Ok, let me make sure I understand:
I see that you included brackets after the $out ($out[] = array instead of
$out = array).
Does this denote that the $out is now a zero-based array?
$out[0] is now an array that has $name, $srch, $sel and $case as single
elements in that array.
$out[1] is the next array with the same variable names, but different
values.
If I declare it as:
$out[] = array("name"=>$name, "srch"=>$srch, "sel"=>$sel,
"case"=>$case, $qvalues[] => array("vals" =>$vals, "valtypes" =>$valtypes));
can I access (for example) the $case variable in the 3rd $out array as
$out[2][$case]
or do I assign/access it as $out[2]["case"]?

Here is what I'd like to do: (and how would you declare this?)
I want 9 arrays (keyed as 0-8) for $out. (accessed as $out[0], $out[1],
etc.)
each of these arrays has individual $name, $srch, $sel, $case variables that
are strings.
I want to assign them individual values and access them as:
$out[0][$name] = "some_text";
echo $out[0][$name]; {shows the "some_text" string value of the $name
variable in the "zero-eth" element of the $out array}
$out[4][$case] {shows the string value of the $case variable in the "fourth"
element of the $out array}

A step further now:
As the fifth element in each of these 9 $out arrays I also need a sub-array
that has identical properties to the $out array,
but only has 2 elements in each of it's arrays.
I want to access them the same way:
$out[3][$qvalues[9][$vals] = "some_value";
will assign the text string "some_value" to the $vals variable inside
the10th $qvalue array for the 4th $out array.

I want to end up with something like this:

$out=array
[0]
$name=string
$srch=string
$sel=string
$case=string
$qvalues=array
[0]
$vals=string
$valtypes=string
[1]
$vals=string
$valtypes=string
[1]
$name=string
$srch=string
$sel=string
$case=string
$qvalues=array
[0]
$vals=string
$valtypes=string
[1]
$vals=string
$valtypes=string
{and so on for a few thousand times}

I guess one of the main issues is whether I can access (for example) the
$case variable in the $out array as [$case] or ["case"].
I don't need to initialize the string variables in the declaration of the
array, but do I still need to access them as
(for example) the ["case"] element of the $out array or can I access them as
[$case]?

Thanks for your help; I'm having to un-learn some of my C and Pascal, but
not too much.




"Tim Ward" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> The first thing is that 2-dimensional arrays don't really exist in  php.
Any
> element of any array can be another array. The second important point is
> that all php arrays are associative. If you don't declare the key of an
> element (e.g. $out[] = "fred") when creating it you get the next integer
> available as the key. Your initial declaration creates ...
>
> $out[0] = $name;
> $out[1] = $srch;
> $out[2] = $sel;
> $out[3] = $case;
> $out[$qvalues][0] = $vals;
> $out[$qvalues][1] = $valtypes;
>
> with $name, etc. being whatever the variables are at the time the array is
> initialised.
>
> What I think you wanted (I'm not entirely sure) is more along the lines of
> ..
> for ($i=0; $I < $num_out; $I++)
> $out[] = array("name"=>$name, "srch"=>$srch, "sel"=>$sel,
> "case"=>$case, $qvalues => array($vals, $valtypes));
>
> I'm not entirely sure what you're trying to do but I hope this points you
in
> the right direction.
>
> Tim
> --
> From:  Ken Hopkins [SMTP:[EMAIL PROTECTED]]
> Sent:  20 August 2001 21:02
> To:  [EMAIL PROTECTED]
> Subject:  Multi-dimensional array issue
>
> Hi from a recent PHP convert,
>
> Having a heck of a time declaring and accessing 2 dimensional info
> in an array.
> any input on where to start looking for the answer would be greatly
> appreciated.
>
> I want to have a base array of 5 elements. The first 4 elements are
> variables, and the fifth is an array of 2 elements.
> seemed harmless enough at the time;)
>
> Coding conventions suggest access to the first level of elements is:
> $basearray[base_numerical_offset][$basearray_variable]
> and this works great for accessing the first 4 elements of the base
> array.
>
> Accessing the fifth elements' variables in the next dimension is
> where it fails for me:
>
>
$basearray[base_numerical_offset][$subarray][sub_numerical_offset][$subarray
> _variable]
>
> The documentation/snippets/samples, etc. have been t

Re: [PHP] Free PHP runtime Accelerator for Linux available

2001-08-21 Thread Michael Kimsal


Hello Nick,

First off, thanks for your contribution.  We've not tested it as of yet, 
but it's
always good to see more people getting involved at some level.  :)

Second, have you compared the mechanism(s) you use against APC or bware?  
Have you considered perhaps helping with one of those projects instead of
starting from scratch?  It sounds like this was primarily an 
intellectual exercise for you
to begin with, so I can understand the DIY mindset.  However, if you've 
got many ideas
for improving things further (PHP code optimization, reduced CPU time, 
etc) perhaps
helping out with a more established project would benefit everyone more 
in the long run.

Just some thoughts.  :)

Thanks again


Michael Kimsal
http://www.tapinternet.com/php/
PHP Training Courses
734-480-9961



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

2001-08-21 Thread nafiseh saberi


hi.

I want to know how many of people in php group are IRANIAN??

I am IRANIAN too.
how about yours??
thanks.

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




Re: [PHP] Re: PHP based auth -----------------

2001-08-21 Thread Sheridan Saint-Michel

What you are trying to do is covered in the manual here:
http://www.php.net/manual/en/features.http-auth.php

I think you specifically was the section:
Both Netscape Navigator and Internet Explorer will clear the local browser
window's authentication cache for the realm upon receiving a server response
of 401. This can effectively "log out" a user, forcing them to re-enter
their username and password. Some people use this to "time out" logins, or
provide a "log-out" button.

All the details of this are in the manual.

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com


- Original Message -
From: "Alex Sofronie" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Monday, August 20, 2001 4:12 PM
Subject: [PHP] Re: PHP based auth -


> No, I'm just using PHP_AUTH_USER and PHP_AUTH PW and i am trying to
> logout... The session_destroy() is not working.
>
>
>
> --
> 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] Detecting empty query result?

2001-08-21 Thread Seb Frost

Basically I want to check to see if $fileDir is already in my database.  I
do this as:

$result = mysql_query("SELECT fileDir FROM shoots WHERE
(fileDir='$fileDir')");

How do I check the result?  I normally use

mysql_result($result, $row, $field)

to read my result, but if I try that I get an error:

if(mysql_result($result, $row, $field))

gives me:

Warning: Unable to jump to row 0 on MySQL result index 3


cheers,

- seb


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

2001-08-21 Thread Boaz Yahav

Hi

I'm using IIS and I changed the 404 page to something else. Now the
server returns an 200 OK message for a mistaken page :)
Does anyone know the exact headers I need to send b4 the page so that
the server will send back to the client the 404 NOT FOUND header along
with the new page?

thanks

berber

--
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] Detecting empty query result?

2001-08-21 Thread

On Tue, Aug 21, 2001 at 02:54:33PM +0100, Seb Frost wrote:
> Basically I want to check to see if $fileDir is already in my database.  I
> do this as:
> 
>   $result = mysql_query("SELECT fileDir FROM shoots WHERE
> (fileDir='$fileDir')");
> 
> How do I check the result?  I normally use
> 
>   mysql_result($result, $row, $field)
> 
> to read my result, but if I try that I get an error:
> 
>   if(mysql_result($result, $row, $field))
> 
> gives me:
> 
>   Warning: Unable to jump to row 0 on MySQL result index 3
> 
> 
> cheers,
> 
> - seb


You're looking for: msql_num_rows()

Try:
http://www.php.net/manual/en/function.msql-num-rows.php


-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

-- 
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] Detecting empty query result?

2001-08-21 Thread DevilKin

A good way to check if the result set is empty is to do put all statements 
that work on the result set in an if-statement with the following condition:

if (mysql_numrows($result) != 0)
{
 ... code here ...
}

Hope this helps

DevilKin

At 14:54 21/08/2001 +0100, Seb Frost wrote:
>Basically I want to check to see if $fileDir is already in my database.  I
>do this as:
>
> $result = mysql_query("SELECT fileDir FROM shoots WHERE
>(fileDir='$fileDir')");
>
>How do I check the result?  I normally use
>
> mysql_result($result, $row, $field)
>
>to read my result, but if I try that I get an error:
>
> if(mysql_result($result, $row, $field))
>
>gives me:
>
> Warning: Unable to jump to row 0 on MySQL result index 3
>
>
>cheers,
>
>- seb
>
>
>--
>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] Detecting empty query result?

2001-08-21 Thread Seb Frost

just use mysql_num_rows($result) dummy :-)

doh.

sorry to bother y'all.

-Original Message-
From: Seb Frost [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2001 14:55
To: [EMAIL PROTECTED]
Subject: [PHP] Detecting empty query result?


Basically I want to check to see if $fileDir is already in my database.  I
do this as:

$result = mysql_query("SELECT fileDir FROM shoots WHERE
(fileDir='$fileDir')");

How do I check the result?  I normally use

mysql_result($result, $row, $field)

to read my result, but if I try that I get an error:

if(mysql_result($result, $row, $field))

gives me:

Warning: Unable to jump to row 0 on MySQL result index 3


cheers,

- seb


-- 
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 ] ISAPI under Win98

2001-08-21 Thread Tribun

May be it's a dummy question, but I can't find how I can install this ISAPI
module under win98. (I had only an winNT guide)

Can someone please explain it to me thank you. ;)

MöfG;
Tribun (Patrick Lehnen)
---
mp3o.net




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




[PHP] mcrypt trouble

2001-08-21 Thread Dominic Schanen

Hello,

I'm trying to do mcrypt encryption but I continue to get the following
error:

Warning: mcrypt module initialization failed

and this is the line of code that I get the error from:

$string = mcrypt_cbc("MCRYPT_DES", $key, $test, "encrypt");

I've also tried several different version of using the function
mcrypt_encrypt as well but nothing seems to work. In my phpinfo file, this
is what I have for the mcrypt module:

Version: 2.4.x

Supported Ciphers:
cast-128 cast-256 enigma xtea arcfour panama safer-sk64 saferplus des
tripledes blowfish gost rc2 safer-sk128 threeway serpent wake loki97
rijndael-128 rijndael-192 rijndael-256 twofish blowfish-compat

Supported modes:
stream cbc cfb ecb ofb nofb

Does someone know if I am coding something wrong or if there is a problem
with the installation of php (v 4.0.6) on the server that I am on? Thanks
for the help.

--
Dominic



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




RE: [PHP] Re: flash and php

2001-08-21 Thread Dan Harrington

Isn't it true that Flash can work directly with a JDBC driver?
or am I smoking crack?

> -Original Message-
> From: Tribun [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 21, 2001 2:55 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: flash and php
>
>
> I can't describe it very well in english, but I try it once again:
>
> 1. You cant combine Flash and MySQL.
>
> 2. Therefore you must add an interface.
>
> 3. You can fabricate this interface using a PHP-File, which reads out the
> Database and
> send this data to Flash.
>
> 3.1. Use a normal php-code to read out the content.
>
> 3.2. echo() an output with the variables and their values.
>
> 3.3. do that in this format: "&variablename=variablevalue&var2=val2&"
>
> 4. Open a flash keyframe and add the following Action-Script:
>
> Actions >
> Click on "Load Movie"
> Change the option from (I use a german-flash version, so I don't know the
> correct names)
> "Load Movie from"  to   "Load Variables from"
> (the first to the third point)
>
> 4.2 type in the URL-Field the filename of the interface-file.
>
> 4.3. May be you should change the "Ebene" frm "1" to "0".
>
> 4.4. If you want to tell the interface-file, that it should load a specific
> data, add to the URL
> field the following string:
> ?varoption=dothat&blabla=wuff
>
> 4.5. If this must be a dynamic variable, you must change the "abc" to "="
> and the field must be changed again:
>
> "interface.php?do="&dynamicvariable
>
> 5. to read the retrieved variables via flash, just handle them like
>
> _level0:variablename
>
>
> I hope that was a little bit clearer. If you have anyhow any problems, feel
> free to ask me again ;)
>
> MöfG,
> Tribun (Patrick Lehnen)
> ---
> www.mp3o.net
>
>
> - Original Message -
> From: "Jack" <[EMAIL PROTECTED]>
> To: "Tribun" <[EMAIL PROTECTED]>
> Sent: Tuesday, August 21, 2001 4:46 PM
> Subject: ref: flash and php
>
>
> > Dear Tribun
> > I tried to understand what you explained but realised I may need more
> > information about this. Is there anyway I can go to look up for more info
> > about what you explained?
> > Jack
> > [EMAIL PROTECTED]
> > "Love your enemies, it will drive them nuts"
> > - Original Message -
> > From: "Tribun" <[EMAIL PROTECTED]>
> > To: "Jack" <[EMAIL PROTECTED]>
> > Sent: Monday, August 20, 2001 7:43 AM
> > Subject: Re: flash and php
> >
> >
> > > Simply user the GetVariable function in Flash.
> > >
> > > The targeting file must be a PHP-File.
> > >
> > > This File should reads out the Informations you want.
> > >
> > > If the requests are also variable, call the file through
> > > GET and add "?query=date" to the filename.
> > >
> > > The file must echo this...
> > > &variable=something&cat=dog&
> > >
> > > Hope you understand my short introduction..
> > >
> > > MöfG,
> > > Tribun(Patrick Lehnen)
> > > ---
> > > www.mp3o.net
> > >
> > >
> > > "Jack" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > > 017701c129a4$6dff2e60$[EMAIL PROTECTED]">news:017701c129a4$6dff2e60$[EMAIL PROTECTED]...
> > > I know this issue has been talk a lot already, but can anyone guide me
> > where
> > > can I find information about how to build a dynamic content flash file
> > > driven by database?
> > > Jack
> > > [EMAIL PROTECTED]
> > > "Love your enemies, it will drive them nuts"
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>
>
> --
> 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] IIS

2001-08-21 Thread nafiseh saberi


hi.
what is IIS?

thanks.

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




Re: [PHP] IIS

2001-08-21 Thread Tyler Longren

IIS is the web server software that comes with WindowsNT/2000.

--
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Wed, 22 Aug 2001 19:22:16 +0430
"nafiseh saberi" <[EMAIL PROTECTED]> wrote:

> 
> hi.
> what is IIS?
> 
> 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]




[PHP] header function

2001-08-21 Thread Jay Paulson

Hello everyone-

I have a slight problem.. I'm running php 4.0.6 on RedHat 7.1 and I run my
script and it hit's:

header("Location:index.php");

well the thing is once it hits that line in my script and just fails,
however i don't get any type of parse error the browser just says 404 error
page not found... could it be i forgot to add something when i configured
and installed php on my machine?

i'm really losted here cause i can put an echo "blah"; before it or after it
and it will print out just fine.. but comment out that echo and have it hit
the header() line and i get teh 404 page error.. (and yes i've double and
tripled checked that all the files etc are there it's just not doing the
header function for some reason)

Thanks!
Jay


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

2001-08-21 Thread Tyler Longren

Well, it's not a good idea to put something (like an echo) before a
header()...even for testing because that will prevent the header() from
working at all.  You should have gotten an "All headers have been sent" or
some similar error.

--
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Tue, 21 Aug 2001 09:53:42 -0500
"Jay Paulson" <[EMAIL PROTECTED]> wrote:

> Hello everyone-
> 
> I have a slight problem.. I'm running php 4.0.6 on RedHat 7.1 and I run
> my
> script and it hit's:
> 
> header("Location:index.php");
> 
> well the thing is once it hits that line in my script and just fails,
> however i don't get any type of parse error the browser just says 404
> error
> page not found... could it be i forgot to add something when i
> configured
> and installed php on my machine?
> 
> i'm really losted here cause i can put an echo "blah"; before it or
> after it
> and it will print out just fine.. but comment out that echo and have it
> hit
> the header() line and i get teh 404 page error.. (and yes i've double
> and
> tripled checked that all the files etc are there it's just not doing the
> header function for some reason)
> 
> Thanks!
> Jay
> 
> 
> -- 
> 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] Free PHP runtime Accelerator for Linux available

2001-08-21 Thread Maxim Maletsky

Thanks, Nick.
Well, I am running FreeBSD machine, but can start up my old Linux box to
play with your accelerator.
I'll let you know when I do that,
I am kind of curious to compare it with Zend's Cache.

Cheers,
Maxim Maletsky


-Original Message-
From: PHP Accelerator [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 21, 2001 4:53 PM
To: Maxim Maletsky; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Free PHP runtime Accelerator for Linux available


Thanks. If you're running Linux then have you tried it yet?  I'm really keen

for some folks to try and break it, and either find that they can't (which 
looks promising at the moment), and so start getting the benefit, or expose 
any remaining show-stoppers so that they can get resolved asap.

There are no fancy graphics, and a simple goal -

* If you install it
* Your scripts run quicker

That's it!

I'll be updating the http://212.67.208.211 site over the next few days, give

it a domain name, and most importantly be updating the accelerator to 
hopefully yield further performance gains.

>From: Maxim Maletsky <[EMAIL PROTECTED]>
>To: 'PHP Accelerator' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>CC: [EMAIL PROTECTED]
>Subject: RE: [PHP] Free PHP runtime Accelerator for Linux available
>Date: Tue, 21 Aug 2001 13:49:42 +0900
>
>Great work, Nick.
>keep it this way!
>
>Maxim Maletsky
>
>
>-Original Message-
>From: PHP Accelerator [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, August 21, 2001 12:00 PM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: Re: [PHP] Free PHP runtime Accelerator for Linux available
>
>
>Right, and neither is the accelerator at the moment, and it may very well
>never be, although there's no particular reason for that. But the scripting
>engine is as it's part of PHP, and that's what I explored in order to write
>the accelerator.
>
>And now that I've studied the engine pretty intensely I've a good idea for
>some of the optimisations that their optimiser is probably having a go at.
>It's been a few fun, late nigh, and at times intensely frustrating,
>evenings, but I'm happy with even the sub-optimal current performance 
>gains.
>
>
> >From: Daniel Adams <[EMAIL PROTECTED]>
> >To: PHP Accelerator <[EMAIL PROTECTED]>
> >Subject: Re: [PHP] Free PHP runtime Accelerator for Linux available
> >Date: Mon, 20 Aug 2001 22:34:12 -0400 (EDT)
> >
> >Cool. :-) the zend optimizer is not open-source, right?
> > - Dan
> >
> >On Tue, 21 Aug 2001, PHP Accelerator wrote:
> >
> > > Hi. Yes, it caches the result of compiling scripts and loads the
> >compiled
> > > code on subsequent runs, thus bypassing the parsing of source code
> >entirely
> > > - unless the source code has changed and the compiled code is stale.
> > >
>
>
>_
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
>--
>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]


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

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

2001-08-21 Thread B. van Ouwerkerk


>hi.
>what is IIS?

Micro$oft Internet Information Server. It's a webserver. IMHO a poor 
alternative for Apache.
If you want to know more about IIS take a look at the M$ website 
(www.microsoft.com/iis) should tell you everything you ever want to know.

Bye,



B.

WOW.. this sure looks like flamebait :-)
 /"\
 \ /
ASCII Ribbon CampaignX Against HTML Mail and News
 / \ 


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

2001-08-21 Thread Andrew Libby

Dominic,
I'd start by checking the libmcrypt installation.
If you're building from source, prior to your installation
check that [mcrypt-src-dir]/src/cipher_test runs without 
error.  If that succedes, install libmcrypt (and mcrypt) and
then attempt to test with the command line.  Start by listing
ciphers and modes.  Then attempt to encrypt and decrypt something.
Once you've verified that the underlying code is working, then
attempt to list the ciphers and modes with PHP functions.  In general
the mcrypt examples given by the php manual at php.net/manual were
enough to get me started.

Note, I've experienced problems on Solaris and Linux with the modules
not being found (cipher .so's).  Sometimes it's as easy as setting 
directories in php.ini, sometimes I've had to get into the libmcrypt code.

Good luck.

Andy

On Tue, Aug 21, 2001 at 09:16:22AM -0500, Dominic Schanen wrote:
> Hello,
> 
> I'm trying to do mcrypt encryption but I continue to get the following
> error:
> 
> Warning: mcrypt module initialization failed
> 
> and this is the line of code that I get the error from:
> 
> $string = mcrypt_cbc("MCRYPT_DES", $key, $test, "encrypt");
> 
> I've also tried several different version of using the function
> mcrypt_encrypt as well but nothing seems to work. In my phpinfo file, this
> is what I have for the mcrypt module:
> 
> Version: 2.4.x
> 
> Supported Ciphers:
> cast-128 cast-256 enigma xtea arcfour panama safer-sk64 saferplus des
> tripledes blowfish gost rc2 safer-sk128 threeway serpent wake loki97
> rijndael-128 rijndael-192 rijndael-256 twofish blowfish-compat
> 
> Supported modes:
> stream cbc cfb ecb ofb nofb
> 
> Does someone know if I am coding something wrong or if there is a problem
> with the installation of php (v 4.0.6) on the server that I am on? Thanks
> for the help.
> 
> --
> Dominic
> 
> 
> 
> -- 
> 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]
> 

-- 
--
Andrew Libby
Director of Technology
CommNav, Inc
[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] header function

2001-08-21 Thread Jay Paulson

You're right when you say that you shouldn't put an echo before the header..
however I did that just so I could see if I would get the error "All headers
have been sent" and well I didn't get that error... I didn't get any error
message.. so I thought that was strange and that's why I'm here asking this
question because I really don't know what's going on.. I have checked the
web server error log and when I call the header function it tries to
redirect me to a ".php" file (notice there is no file name).  So I'm not
sure what exactly is going on.

[Mon Aug 20 17:23:03 2001] [error] [client 64.132.13.114] File does not
exist: /home/username/htdocs/admin/.php


- Original Message -
From: "Tyler Longren" <[EMAIL PROTECTED]>
To: "Jay Paulson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2001 9:54 AM
Subject: Re: [PHP] header function


> Well, it's not a good idea to put something (like an echo) before a
> header()...even for testing because that will prevent the header() from
> working at all.  You should have gotten an "All headers have been sent" or
> some similar error.
>
> --
> Tyler Longren
> Captain Jack Communications
> [EMAIL PROTECTED]
> www.captainjack.com
>
>
>
> On Tue, 21 Aug 2001 09:53:42 -0500
> "Jay Paulson" <[EMAIL PROTECTED]> wrote:
>
> > Hello everyone-
> >
> > I have a slight problem.. I'm running php 4.0.6 on RedHat 7.1 and I run
> > my
> > script and it hit's:
> >
> > header("Location:index.php");
> >
> > well the thing is once it hits that line in my script and just fails,
> > however i don't get any type of parse error the browser just says 404
> > error
> > page not found... could it be i forgot to add something when i
> > configured
> > and installed php on my machine?
> >
> > i'm really losted here cause i can put an echo "blah"; before it or
> > after it
> > and it will print out just fine.. but comment out that echo and have it
> > hit
> > the header() line and i get teh 404 page error.. (and yes i've double
> > and
> > tripled checked that all the files etc are there it's just not doing the
> > header function for some reason)
> >
> > Thanks!
> > Jay
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




[PHP] Page detect

2001-08-21 Thread Kevin P

Hi all

I am just five days new to PHP. When sending an HTML form to a PHP page
for handling, can you cause the PHP to detect the page name (like form.htm
or form2.htm)?

thanks

Kevin



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

2001-08-21 Thread Jay Paulson

if you want the name of the page you are on (i.e. index.php) you can use the
$PHP_SELF variable.. if you want to know what page you came from you can use
the $HTTP_REFERER variable.. just remember to get those variables you have
to have php parse the page (so it can't just be a plain html page)

jay

"Kevin P" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all
>
> I am just five days new to PHP. When sending an HTML form to a PHP
page
> for handling, can you cause the PHP to detect the page name (like form.htm
> or form2.htm)?
>
> thanks
>
> Kevin
>
>
>
> --
> 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] Need "Working..." pop up dialog (repost)

2001-08-21 Thread Ray Clouse

It's due to space restrictions on the server.  We have 300GB available 
on the server, but the compressed data takes up 200GB, and we're adding 
new data (several GB) every month or so.

So we need to keep as much compressed as possible, but we have to 
uncompress the data for the webpages to use it.  The PHP webpages on the 
server use the uncompressed data to generate plots.  The data is never 
sent to the user, just the plots.

The main problem I'm having is with page resolution.  If I say:

  print("jsPopupWindow('Starting UNZIP');\n");

  $gunzipcmdline = "gunzip /PATHTO/MYDATA";
  $result = exec("$gunzipcmdline", $execout, $execretval);

  print("jsPopupWindow('Finished UNZIP');\n");

the 'Starting UNZIP' popup appears at the same time as the 'Finished 
UNZIP' one.  The page hasn't resolved until after the gunzip is done, so 
it doesn't execute the Javascript the way I want it to.  I've tried 
popping up a window, getting the handle, passing the handle to the 
gunzip code, then closing the handle when the gunzip is done, but that 
hasn't worked either.

Justin French wrote:

>Ray Clouse wrote:
>
>>When the user clicks on a link that has to gunzip a very large file, I
>>want a popup to say "Working..." while the file is uncompressing.
>>Then, when the file is uncompressed, I want the "Working..." popup to
>>close itself and then the parent window to load a new URL (where it
>>will use the uncompressed file).
>>
>>I've tried doing this with Javascript and window.open(), but I'm having
>>no luck. Any ideas?
>>
>
>Is the uncompressing taking place on the server?  or on the local (user)
>machine?  Sounds like it's on the server.
>
>The problem is, you have no *real* way of knowing how long the de-comp
>will take (due to other factors, like server/client load, etc etc), so
>how do you know when to go from "working" to "done".
>
>
>So, i'm trying to figure out WHY you're uncompressing a file on the
>server that will be used by visitors over http.
>
>Seems wrong to me.  Increased server load, more programs, more problems,
>slower server response time, increased user anger, etc etc.
>
>
>Enlighten me as to why, because I may be missing something.
>
>
>Justin French
>

-- 
-
Ray Clouse | Don't fear the penguins.
Engineer Scientist/Specialist  |  
Boeing Expendable Launch Vehicles  |  Ray.Clouse AT boeing.com
Huntington Beach, CA   |  clouse AT rayclouse.org





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




RE: [PHP] register_globals odd behaviour?

2001-08-21 Thread Johnson, Kirk

> I just come across and odd behaviour with the register_globals and
> session handling. The problem is that when I set the register 
> globals to
> on I cannot access the session_variables through the associative array
> HTTP_SESSION_VARS. The manual says explicitly that with track_vars and
> register_globals both on the array and the vars will point to 
> the same. 

I believe this was a bug in all versions prior to 4.0.6, globals and
$HTTP_SESSION_VARS did *not* reference the same value while on the current
page, in spite of what the manual says. So, either upgrade to 4.0.6, or use
the global version of session variables rather than the $HTTP_SESSION_VARS
array.

Kirk

-- 
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] Listing files from a directory

2001-08-21 Thread Martin E. Koss

I am trying to find a way to list files alphabetically.

" . "$entryName\n";
}
}
closedir($mydirectory);
?>

I've looked through old messages on the subject but even though on Win32 it
lists in the right way but not on the Apache Webserver.

Thanks.
Martin.


-- 
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] Re: sendmail

2001-08-21 Thread BRACK

Thank you for advise, I think I'll use .htaccess and that would be 
fine. But why do I need to include ""? I'm using in on my local 
Apache win32 without "" even though I understand what is "string"

Youri

On 19 Aug 2001, at 16:01, Richard Lynch wrote:

> > I'm on virtual hosting that lets me configure anything with .htaccess
> > file. I was recomended by provider to specify location of sendmail in
> > case I want to use php mail() function I know that I may do it in
> > htaccess file by adding php_value sendmail_path
> > /usr/sbin/sendmail The qwestion is can I do anything else but
> > correcting the path in .htaccess, this is the last thing I want to do.
> 
> First of all, you'll need:
> 
> php_value sendmail_path "/usr/sbin/sendmail -t"
> 
> Yes, you need the quotes.
> And possibly some other options inside quotes depending on your ISP's
> configuration of sendmail.
> 
> I don't understand your ISP's rationale for requiring you to do this in
> .htaccess instead of just doing it himself...  Either he's letting you use
> mail() or he's not.
> 
> I also don't understand why you are loathe to do this...  Unless you've
> heard ".htaccess is slow" (which it is).  Alas, since your ISP has already
> turned on .htaccess support, you're *NOT* causing any additional significant
> slow-down to *utilize* the feature.  The slowness is in Apache looking for
> the damn file, not in your putting (reasonable) stuff in it.
> 
> Oh yeah, to answer your original question :-)
> 
> You probably *COULD* set up an SMTP server on some other machine and just
> fsockopen() to that SMTP server and spew your emails to that.  This will be
> way more faster anyway.  Or, perhaps your ISP has an SMTP server that PHP
> can fsockopen() and spew to.  Depends on how he configured it.  There's all
> sorts of sample code for this SMTP spewing, so you needn't write it from
> scratch -- though it ain't rocket science.  I did it, so it *CANNOT* be that
> difficult. :-)
> 
> --
> WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> [EMAIL PROTECTED]
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
> 
> 
> 



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




Re: [PHP] Errors

2001-08-21 Thread BRACK

Thank you for advise, everything is working fine now.

Youri

On 19 Aug 2001, at 15:55, Oliver Emberton wrote:

> It looks like PHP has been configured to report ALL errors and warnings - in
> your case it is warning you that you haven't declared the variable $page
> before you used it.
> 
> Two ways around this - either set the variable $page to something first, or
> fix the php.ini file to stop being so fussy... try setting error_reporting
> to 7.
> 
> (Newbie advice only, so take with a pinch of salt)
> 
> - Original Message -
> From: "BRACK" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, August 19, 2001 3:45 PM
> Subject: [PHP] Errors
> 
> 
> > Hi
> >
> > I'm getting strange errors if I add
> > "LoadModule php4_module ../php/sapi/php4apache.dll" to http.conf
> > If I don't load it everything is working with php.exe without any errors
> but as I
> > load it as a modul I get for example -
> > Warning: Undefined variable: page in d:\abria> > sql\apache\htdocs\inc\page.inc 
>on line 2

> >  here is the page.inc file:> >  > if (!$page):
> > $page = 1;
> > endif;
> > $limit = ($page * 10) - 10;
> > ?>

> >
> > What is wrong? I need php as a modul but what do I do
> > wrong, I did everything according to install.txt in php
> > directory.
> >
> > Thank you
> >
> > Youri
> >
> > <>< <>< <>< <>< God is our provider ><> ><> ><> ><>
> > http://www.body-builders.org
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >



-- 
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] Listing files from a directory

2001-08-21 Thread Seb Frost

store all the names in an array and then sort that using an inbuilt php
function,  maybe.

- seb

-Original Message-
From: Martin E. Koss [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2001 16:43
To: [EMAIL PROTECTED]
Subject: [PHP] Listing files from a directory


I am trying to find a way to list files alphabetically.

" . "$entryName\n";
}
}
closedir($mydirectory);
?>

I've looked through old messages on the subject but even though on Win32 it
lists in the right way but not on the Apache Webserver.

Thanks.
Martin.


--
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] Listing files from a directory

2001-08-21 Thread Thomas Deliduka

On 8/21/2001 11:42 AM this was written:

> I am trying to find a way to list files alphabetically.

Try putting the filenames into an array and sort the array.
-- 

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]




[PHP] Re: PHP indexOf()?

2001-08-21 Thread Kevin P

For someone used to Java & JavaScript..  what function would replace  
myString.indexOf(myStringPiece) ??



RE: [PHP] Re: PHP indexOf()?

2001-08-21 Thread Taylor, Stewart

http://www.php.net/manual/en/function.strpos.php

-Stewart

-Original Message-
From: Kevin P [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2001 20:44
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP indexOf()?


For someone used to Java & JavaScript..  what function would replace
myString.indexOf(myStringPiece) ??

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




Re: [PHP] Re: PHP indexOf()?

2001-08-21 Thread Thomas Deliduka

On 8/21/2001 3:43 PM this was written:

> For someone used to Java & JavaScript..  what function would replace
> myString.indexOf(myStringPiece) ??

Strstr()

Or stristr() for case insensative search

http://www.php.net/manual/en/function.strstr.php
-- 

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]




RE: [PHP] php and flash

2001-08-21 Thread Jeff Pearson

Best places I learned from are www.flashkit.com as well as the books Dynamic
Flash which includes a chapter on php. Other than that, I pulled apart
projects downloaded from flashkit.


Jeff Pearson

> -Original Message-
> From: Jack [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 21, 2001 7:49 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] php and flash
>
>
> Hi people
> Is there anyone know where can I find something to study more
> about how to make dynamic content in flash using php and mySql?
> Jack
> [EMAIL PROTECTED]
> "Love your enemies, it will drive them nuts"
>


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




[PHP] PHP/Apache configuration for Win NT

2001-08-21 Thread paul . eaton

Hi,

Here's the scenario,

I've installed and am running mySQL on my machine
I've installed Apache and have ran it and seen the page in IE confirming correct
setup.

I've installed PHP4 from a CGI binary distribution at the following location

 c:\Php\

and have been following a tutorial on WebMonkey in order to configure it.

As instructed I have inserted the following lines in my httpd.conf file

ScriptAlias /php/ "C:/Php/"

AddType application/x-httpd-php .php .phtml .html
AddType application/x-httpd-php-source .phps

Action application/x-httpd-php /Php/php.exe

 DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs"

The tutorial also instructed me to move the php4ts.dll to the following place

 c:\Winnt\system

which I have done

After rebooting my machine I started IE and pointed it at the apache server
again.
This time it produced an error as follows (from the log)

 [Tue Aug 21 14:54:47 2001] [error] [client 172.16.18.149] File does not
exist:
 c:/program files/apache group/apache/htdocs/php/php.exe/index.html

As instructed I created the filephpinfo.php in the Document root and pointed the
 browser at it.

This yielded the following error message:

 [Tue Aug 21 14:54:53 2001] [error] [client 172.16.18.149] File does not
exist:
 c:/program files/apache group/apache/htdocs/php/php.exe/phpinfo.php


Can anyone tell me where I am going wrong here please?

Any suggestions gratefully received.

Thanks,

Paul Eaton.



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




Re: [PHP] PHP/Apache configuration for Win NT

2001-08-21 Thread Julie Meloni

pegc> ScriptAlias /php/ "C:/Php/"

pegc> AddType application/x-httpd-php .php .phtml .html
pegc> AddType application/x-httpd-php-source .phps

pegc> Action application/x-httpd-php /Php/php.exe

Check for mismatched cases in httpd.conf.



   Julie Meloni 
[EMAIL PROTECTED]
"PHP Essentials" & "PHP Fast & Easy"
 --- www.thickbook.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] Re: IIS

2001-08-21 Thread Gabe da Silveira

Microsoft Internet Information Server.

> From: [EMAIL PROTECTED] (Nafiseh Saberi)
> Newsgroups: php.general
> Date: Wed, 22 Aug 2001 19:22:16 +0430
> To: [EMAIL PROTECTED]
> Subject: IIS
> 
> 
> hi.
> what is IIS?
> 
> thanks.


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




Re: [PHP] PHP/Apache configuration for Win NT

2001-08-21 Thread Neil Freeman

You appear to have a typo in your httpd.conf:

Action application/x-httpd-php /Php/php.exe

should be as follows: (note the ")

Action application/x-httpd-php "/Php/php.exe

Hope that helps,

Neil

[EMAIL PROTECTED] wrote:

> ***
>  This message was virus checked with: SAVI 3.48
>  last updated 14th August 2001
> ***
>
> Hi,
>
> Here's the scenario,
>
> I've installed and am running mySQL on my machine
> I've installed Apache and have ran it and seen the page in IE confirming correct
> setup.
>
> I've installed PHP4 from a CGI binary distribution at the following location
>
>  c:\Php\
>
> and have been following a tutorial on WebMonkey in order to configure it.
>
> As instructed I have inserted the following lines in my httpd.conf file
>
> ScriptAlias /php/ "C:/Php/"
>
> AddType application/x-httpd-php .php .phtml .html
> AddType application/x-httpd-php-source .phps
>
> Action application/x-httpd-php /Php/php.exe
>
>  DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs"
>
> The tutorial also instructed me to move the php4ts.dll to the following place
>
>  c:\Winnt\system
>
> which I have done
>
> After rebooting my machine I started IE and pointed it at the apache server
> again.
> This time it produced an error as follows (from the log)
>
>  [Tue Aug 21 14:54:47 2001] [error] [client 172.16.18.149] File does not
> exist:
>  c:/program files/apache group/apache/htdocs/php/php.exe/index.html
>
> As instructed I created the filephpinfo.php in the Document root and pointed the
>  browser at it.
>
> This yielded the following error message:
>
>  [Tue Aug 21 14:54:53 2001] [error] [client 172.16.18.149] File does not
> exist:
>  c:/program files/apache group/apache/htdocs/php/php.exe/phpinfo.php
>
> Can anyone tell me where I am going wrong here please?
>
> Any suggestions gratefully received.
>
> Thanks,
>
> Paul Eaton.
>
> --
> 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]

--

 Email:  [EMAIL PROTECTED]
 [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[2]: [PHP] PHP/Apache configuration for Win NT

2001-08-21 Thread Julie Meloni


NF> You appear to have a typo in your httpd.conf:

NF> Action application/x-httpd-php /Php/php.exe

NF> should be as follows: (note the ")

NF> Action application/x-httpd-php "/Php/php.exe


This is not accurate.


   Julie Meloni 
[EMAIL PROTECTED]
"PHP Essentials" & "PHP Fast & Easy"
 --- www.thickbook.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] generate documenation?

2001-08-21 Thread Daniel Adams

Anyone know what they use on php.net to generate the documentation?  Can
you do stuff that big with doxygen?
- Dan

-- 


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

2001-08-21 Thread rm

try using $PHP_SELF, this might be what you're looking
for

rm


--- Kevin P <[EMAIL PROTECTED]> wrote:
> Hi all
> 
> I am just five days new to PHP. When sending an
> HTML form to a PHP page
> for handling, can you cause the PHP to detect the
> page name (like form.htm
> or form2.htm)?
> 
> thanks
> 
> Kevin
> 
> 
> 
> -- 
> 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]
> 


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.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] chicken and egg problem with SID

2001-08-21 Thread Egan

I have a multi page sequence of input forms tied to a session.  It
works perfectly with cookies.  But I also want to make it work without
cookies, using:

php_value session.use_cookies 0
php_value session.use_trans_sid 1

in my .htaccess file, to use the SID support provided by PHP.

When testing this, I see that the SID works with all pages except the
first.  But because the first page has no SID passed to it in the URL,
the first instance of:

session_start();

creates a new session every time you refresh the first page with the
browser.  And that is the problem.  I only want one session to be
created, no matter how many times the user hits refresh on the first
page.

So then I tried setting the session id myself, hard coding it to some
arbitrary value like:



and that solves the multiple session problem; only one session is
created, no matter how many times you hit refresh on the first page. 

Yay!

But that still leaves a chicken and egg problem to solve:

I can generate some random value to be used for the session_id, but I
can't think of a good way to store it for use on the first page.

Since the first page does not get the SID in the URL, I need to set
the session_id before calling session_start.  But that means I don't
have any session where I can store my random value, for recalling it
later, on the next page refresh.

Ack!  I only need some simple way to store the SID value I generate,
before the page is loaded a second time.

I thought of using a CGI to dynamically generate all the PHP and HTML
for page 1, and also have the CGI put a random session_id value right
into the page source itself, just like I did when testing.  I suppose
that would work, but it seems like there should be an easier way.

Maybe there is some obvious solution, but it is not obvious to me at
the moment.

Has anyone else solved this problem, with a better method?  


Egan



-- 
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] Free PHP runtime Accelerator for Linux available

2001-08-21 Thread PHP Accelerator

Hi Michael,

Thanks a lot for your email! I must confess to, for once, not checking the 
web first and looking other products. I hadn't come across any others and 
was just aware of the Zend offering, hence putting together the accelerator. 
Now things are suddenly more interesting :-)

I would be suprised if the accelerator didn't come bottom of the performance 
tables at the moment compared to the others to be honest. Seeing as I hadn't 
looked at a line of php-4.0.6/Zend code before last Monday, the first 
milestone was merely to get something that worked at all :-) 6 days later I 
reached the first version that ironed out all showstoppers that I'm aware 
of. Intellectual exercise? Of course, what else, but the reason was that I 
needed a cache. Had I looked at the others then... well I'd have probably 
still started anyway having seen Zend outstripping the others 

Looking at the performance stats from John Lim back in January, it seems 
likely that all non-Zend caches are missing a fundamental trick or two. What 
do you think? For example, and this may be poor one because apc,bw,bez might 
all be doing this in one way or another, but when restoring a compiled file 
it can be that only a fraction of the functions/methods, and even entire 
classes are ever used. Loading the never used functions and classes and 
restoring unused static vars initialisers would quite literally be a waste 
of time.

Another thing that comes to mind is that you probably want to ensure that 
the usual cleaning up of memory that Zend does actually *doesn't* happen 
quite as completely as it does by default. I actually ask myself - do I want 
to restore compiled code from shared memory? Do I event want to restore 
compiled code from web server memory? And the answer is ideally no to both. 
And of course I don't want to restore from files. Bottom line, I actually 
don't want to *restore anything* if it requires any memory copying. Ideally 
I'd like the same hashtables, same function pointers, same static_variables, 
etc. etc. that were used last time a page was loaded. Not *copies of* these 
things.

My ultimate goal, if I were making this a full time project, would be to 
'get' all the state I needed by a single lookup for the value of 
compiler/executor_globals using the i-number for the root source file in a 
devno specific structure. No copying of anything. Of course this might be 
unrealistic, but I'd want to know why, and focus not just how can I speed 
things up, but how can I eliminate what is slowing me down!

Another part of the engine that seems 'fair game' is the executor. One might 
perhaps reduce the size of CG(class_table) and CG(function_table) for 
example by switching between tables that contain just the likely or 
reachable items from certain points in the code. It's also possible to 
hijack what would normally be fatal errors, regard them as faults rather 
like a page fault, patch up what caused the error on the fly, such as a 
function lookup failure, and carry on as though nothing happened. Again, 
perhaps other cache developers are getting mileage from this, or perhaps 
there is no mileage in this, or perhaps there is and they are not?

And then there's a zend_op->C->nativecode.so optimiser that produces .so 
files of your scripts when there's nothing else better to be getting on with 
:-)

Nick

>From: Michael Kimsal <[EMAIL PROTECTED]>
>To: PHP Accelerator <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: [PHP] Free PHP runtime Accelerator for Linux available
>Date: Tue, 21 Aug 2001 09:27:53 -0400
>
>
>Hello Nick,
>
>First off, thanks for your contribution.  We've not tested it as of yet,
>but it's
>always good to see more people getting involved at some level.  :)
>
>Second, have you compared the mechanism(s) you use against APC or bware?
>Have you considered perhaps helping with one of those projects instead of
>starting from scratch?  It sounds like this was primarily an
>intellectual exercise for you
>to begin with, so I can understand the DIY mindset.  However, if you've
>got many ideas
>for improving things further (PHP code optimization, reduced CPU time,
>etc) perhaps
>helping out with a more established project would benefit everyone more
>in the long run.
>
>Just some thoughts.  :)
>
>Thanks again
>
>
>Michael Kimsal
>http://www.tapinternet.com/php/
>PHP Training Courses
>734-480-9961
>
>
>
>--
>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]
>


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


-- 
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] hacks we should know about

2001-08-21 Thread Bill Rausch

Richard Lynch replied:
>...
>
>  >  - Kills file upload completely
>
>I *think* safe_mode can be on and files can be uploaded if the ISP works at
>it...  But they have to want it bad enough to do some configuration.  Most
>ISPs want to just install stuff as-is and not take the time to find out how
>to really configure it for optimum safety/functionality.
>...

Just curious about all of this.  How many of these various security 
issues go away if you are hosting your own site and there are no user 
logins on the box other than your own and no services running except 
the web server?

-- 
  Bill Rausch, Software Development, Unix, Mac, Windows
  Numerical Applications, Inc.  509-943-0861   [EMAIL PROTECTED]

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




  1   2   3   >