Re: [PHP] PHP4 : Installing LDAP without recompiling ?

2004-07-23 Thread Evan Nemerson
On Friday 23 Jul 2004 02:40, ange wrote:
> Hi everyone,
>
> I have currently a production server running PHP 4 with MySQL and other
> extension support enaoubled. This server is working and used by number of
> users.
>
> Can I enable LDAP support without having to recompile PHP ?

Try running phpize in the ext/ldap dir, then do the ./configure make make 
install dance. You should end up with a nice little ldap.so that you can load 
with dl()
>
> Very thanks for your help
>
> Regards,
> Ange.

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sort a text string by last word before separator

2004-06-23 Thread Evan Nemerson
If I were you I'd use preg_match_all() so you get the first and last name as 
separate elements, then use usort() to create a custom sorting function based 
on strnatcasecmp()

Be careful about middle names and the such.


On Thursday 24 Jun 2004 04:38, Andre Dubuc wrote:
> Given a text string:
>
> $OK = "Joe Blow, William Howard Anser, Hannie Jansen, etc, etc,";
>
> $_SESSION['txt'] = "$OK";
> session_write_close();
> $txt = $_SESSION['txt'];
>
> $sorted = explode(", ", $txt);
> sort($sorted);
> print "$sorted";
>
> results in a sort based on the first name:
>
> "Hannie Jansen, Joe Blow, William Howard Anser, etc, etc"
>
>
> I tried a another function (before_last)
>
> **
>
> function before ($this, $inthat)
> {
>   return substr($inthat, 0, strpos($inthat, $this));
> }
>
> function strrevpos($instr, $needle)
> {
>   $rev_pos = strpos (strrev($instr), strrev($needle));
>   if ($rev_pos===false) return false;
>   else return strlen($instr) - $rev_pos - strlen($needle);
> };
>
> function after_last ($this, $inthat)
> {
>   if (!is_bool(strrevpos($inthat, $this)))
>   return substr($inthat, strrevpos($inthat, $this)+strlen($this));
> };
>
> function before_last ($this, $inthat)
> {
>   return substr($inthat, 0, strrevpos($inthat, $this));
> };
>
> 
>
> to sort on last name, and it does work, but gives only the last item:
>
> $test2 = between_last(' ', ', ', $OK);
> print "$test2";
>
> "Jansen"
>
> How would I get this 'before_last' function to iterate through the initial
> string, so I could build a sorted list with both first and last names,
> sorted by last name? I can't seem to get a proper 'foreach' statement to
> work, nor a 'while' statement.
>
> I'm really confused. I've read almost every entry on arrays/strings and
> searched code snippets. Almost all focus on one element arrays such "apple,
> orange, peach" rather than 2 or more elements such as  "fancy cars, big
> trucks, fast dangerous motorcycles,"
>
> Is it even possible to accomplish this type sort on a string?
>
>
>
> Any advice, pointers, or help will be greatly appreciated,
> Tia,
> Andre

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"If anyone can show me, and prove to me, that I am wrong in thought or deed, I 
will gladly change. I seek the truth, which never yet hurt anybody. It is 
only persistence in self-delusion and ignorance which does harm."

-Marcus Aurelius

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SQL Case sensitivity

2004-06-23 Thread Evan Nemerson
http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html should do the trick, 
provided you're using MySQL.

On Wednesday 23 Jun 2004 20:14, Gabe wrote:
> I hope I don't get too chastised for a double post ( posted in .db first
> ), but I'm hoping someone can help me.
>
> I'm using PHP with ADOdb ( and an MS Access 2000 db ) to write a simple
> SQL statement but was running into some case sensitivity issues.  Here's
> my SQL currently:
>
> SELECT autoQuesID,fldQuesTitle,fldBody
> FROM tblFAQ_Question
> WHERE fldBody LIKE '%$strSearchFor%';
>
> All I'm trying to do is have the users search string searched for in the
> "fldBody" field.  However, I'm having problems trying to get it so that
> the search is case-insensitive.  For instance:
>
> If I search on "Airline", I get 1 record.
> If I search on "airline", I get 0 records.
>
> I make the value of $strSearchFor lower case ( using strtolower() ), but
> I don't know how to get it so that the contents of the "fldBody" field
> is lower case also.  I can't seem to find any functions or operators
> that remove the case-sensitivity.  However, I have tried this where
> clause to no avail:
>
> WHERE LCase(fldBody) LIKE '%$strSearchFor%'
>
> Any help would be much appreciated!

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"The greatest mistake is to imagine that the human being is an autonomous 
individual. The secret freedom which you can supposedly enjoy under a 
despotic government is nonsense, because your thoughts are never entirely 
your own. Philosophers, writers, artists, even scientists, not only need 
encouragement and an audience, they need constant stimulation from other 
people. It is almost impossible to think without talking. If Defoe had really 
lived on a desert island, he could not have written Robinson Crusoe, nor 
would he have wanted to. Take away freedom of speech, and the creative 
faculties dry up."

-George Orwell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [OFF] - Transparency in DHTML layers?

2004-06-07 Thread Evan Nemerson
On Monday 07 June 2004 02:51 pm, Marek Kilimajer wrote:
> Brian Dunning wrote:
> > Hi,
> >
> > Does anyone know if there is a spec that permits transparency of
> > graphics in DHTML layers? I have a bottom layer which is a picture of
> > fabric, and I have a grayscale image of wrinkles & shadows that I'd like
> > to overlay on top of the fabric, with a certain level of transparency so
> > the fabric is still visible in the shaded areas.
> >
> > Or, if anyone knows another technology that might accomplish that, I'd
> > appreciate those suggestions too.  :)
> >
> > Thanks,
> >
> > Brian Dunning
> > http://www.briandunning.com/
>
> Semitransparent PNGs, but that does not work in IE
>
> http://www.petitiononline.com/msiepng/petition.html

I never got it quite perfect, but it shouldn't take too long. I just lost 
interest after about five minutes ;)

function exploderPNGhack() {
  /* Internet Explorer PNG transparency hack
   * Evan Nemerson <[EMAIL PROTECTED]>
   *
   * This should allow MSIE to properly display transparent PNGs.
   *
   * Thanks to:
   *   http://www.alistapart.com/articles/pngopacity/
   *   http://webfx.eae.net/dhtml/pngbehavior/pngbehavior.html
  */
  if ( /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == 
"Win32" ) {
var imgs = document.getElementsByTagName("img");
var imgObjs = new Array();
for ( x = 0 ; x < imgs.length ; x++ ) {
  if ( /\.png$/i.test(imgs.item(x).src) ) {
imgObjs[imgObjs.length] = imgs.item(x);

var span = document.createElement("span");
span.mergeAttributes(imgs.item(x));

span.style.width = imgs.item(x).width;
span.style.height = imgs.item(x).height;
span.style.filter = 
"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
imgs.item(x).src + "',sizingMethod='scale')";

imgs.item(x).parentNode.insertBefore(span, imgs.item(x));
  }
}
  }
}

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety."

-Benjamin Franklin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bg execution

2004-05-22 Thread Evan Nemerson
On Saturday 22 May 2004 06:51 am, Martin Helie wrote:
> Hello,
>
> I need to start a php-based socket server that doesn't die if the client
> closes their browser window.

php.net/pcntl
>
> Is there another (maybe cleaner) method to accomplish this, other than
>
> exec('bash -c "exec nohup setsid php server.php > /dev/null 2>&1 &"');
>
> ?
>
> Thanks

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"If anyone can show me, and prove to me, that I am wrong in thought or deed, I 
will gladly change. I seek the truth, which never yet hurt anybody. It is 
only persistence in self-delusion and ignorance which does harm."

-Marcus Aurelius


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how to verify PHP has been installed with ldap?

2004-04-30 Thread Evan Nemerson
Are you root when you make install? Follow the directions in Curt's e-mail

On Friday 30 April 2004 08:11 am, Bing Du wrote:
> Yes, I did.  phpinfo() just does not reflect reinstall at all.  Here is
> the sequence of my operations.
>
> 1. remove config.cache
> 2. ./configure --with-apxs=/usr/local/apache/bin/apxs
> --with-config-file-path=/usr/local/apache --with-mysql --with-zlib
> --with-ldap
> 3. make
> 4. make install
> 5. /usr/local/apache/bin//apachectl restart
>
> Where else should I look?
>
> Bing
>
> > Or... did you restart apache after running your make install? If not,
> > that might be a good idea... `/path/to/apachectl restart`
> >
> > On Thursday 29 April 2004 04:00 pm, Curt Zirzow wrote:
> >> * Thus wrote Bing Du ([EMAIL PROTECTED]):
> >> > I don't see a ldap section in the output of phpinfo().  I need to add
> >>
> >> a
> >>
> >> > bit more background information here...
> >> >
> >> > This is not a fresh php install.  I've already installed PHP Version
> >> > 4.3.4.  But now I want to add ldap support to it.  So I added
> >>
> >> --with-ldap
> >>
> >> > option in the configure command.  Then I did make and make install.
> >> > However, phpinfo() still shows the old information.  For instance,
> >>
> >> Build
> >>
> >> > Date was Mar 3 2004 11:15:34, Configure Command was the one without
> >> > --with-ldap, etc..
> >>
> >> This usually means that either you have multiple installation's of
> >> apache and php's "make install" isn't putting the the module in the
> >> right place.
> >>
> >> Or, that your current apache config loads modules from a different
> >> place than apxs told php it should go.
> >>
> >> If you issue:
> >> ls -laF `apxs -q LIBEXECDIR`
> >>
> >> You should see your libphp5.so there with the latest timestamp. if
> >> not, see if there are some errors issued with the 'make install'
> >> (like are you issuing that as root?)
> >>
> >> Also, look in the 'apache' section from phpinfo() and look at the
> >> value for 'Server root', php will usually be loaded relative to
> >> that directory.
> >>
> >>
> >> Curt
> >> --
> >> "I used to think I was indecisive, but now I'm not so sure."
> >
> > --
> > Evan Nemerson
> > [EMAIL PROTECTED]
> > http://coeusgroup.com/en
> >
> > --
> > "To think is to differ."
> >
> > -Clarence Darrow

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"Who controls the past controls the future. Who controls the present controls 
the past."

-George Orwell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how to verify PHP has been installed with ldap?

2004-04-29 Thread Evan Nemerson
Or... did you restart apache after running your make install? If not, that 
might be a good idea... `/path/to/apachectl restart`


On Thursday 29 April 2004 04:00 pm, Curt Zirzow wrote:
> * Thus wrote Bing Du ([EMAIL PROTECTED]):
> > I don't see a ldap section in the output of phpinfo().  I need to add a
> > bit more background information here...
> >
> > This is not a fresh php install.  I've already installed PHP Version
> > 4.3.4.  But now I want to add ldap support to it.  So I added --with-ldap
> > option in the configure command.  Then I did make and make install.
> > However, phpinfo() still shows the old information.  For instance, Build
> > Date was Mar 3 2004 11:15:34, Configure Command was the one without
> > --with-ldap, etc..
>
> This usually means that either you have multiple installation's of
> apache and php's "make install" isn't putting the the module in the
> right place.
>
> Or, that your current apache config loads modules from a different
> place than apxs told php it should go.
>
> If you issue:
> ls -laF `apxs -q LIBEXECDIR`
>
> You should see your libphp5.so there with the latest timestamp. if
> not, see if there are some errors issued with the 'make install'
> (like are you issuing that as root?)
>
> Also, look in the 'apache' section from phpinfo() and look at the
> value for 'Server root', php will usually be loaded relative to
> that directory.
>
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"To think is to differ."

-Clarence Darrow

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] substrings

2004-04-25 Thread Evan Nemerson
On Sunday 25 April 2004 01:00 pm, David T-G wrote:
> Hi, all --
>
> I must be having a brain fart as well as going blind because I can't find
> in the manual how to do this.
>
> Given a string like #AABBCC or #112233 how do I get the
>
>   2nd-3rd
>   4th-5th
>   6th-7th
>
> position substrings so I can break out the red, green, and blue values?

php.net/substr?

> All of the regular expressions seem to hinge on matching a separator, and
> the closest thing seems to be a
>
>   preg_match(".(..)(..)(..)",$color,$colors) ;
>   $r = $colors[1] ;
>   $g = $colors[2] ;
>   $b = $colors[3] ;
>
> but it just seems like I should be able to return a list like
>
>   ($r,$g,$b) = fn(operands,$color) ;
>
> or so.
>
>
> TIA & HAND
>
> :-D

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SSI and query string variables to PHP

2004-04-25 Thread Evan Nemerson
On Sunday 25 April 2004 09:56 am, Tim Traver wrote:
> Yes, I mean that php gets the server information for the request, but it
> doesn't get the QUERY_STRING variable. But it does get the
> UNESCAPED_QUERY_STRING variable...wierd, huh ?

Yeah, especially since I've never heard of UNESCAPED_QUERY_STRING- but then 
again, neither has google- 
http://www.google.com/search?q=%22UNESCAPED_QUERY_STRING%22

Can you send a copy of the variable, or if you're comfortable a phpinfo()?
>
> It might be that apache isn't sending that variable to php from an included
> file...not sure...
>
> That's why I'm asking everyone.
>
> Tim.
>
> At 01:22 AM 4/25/2004, Evan Nemerson wrote:
> >On Saturday 24 April 2004 10:29 pm, Tim Traver wrote:
> > > Hi all,
> > >
> > > ok, this may be a dumb question, but I have a page that has server side
> > > includes that include a php script like this :
> > >
> > > 
> > >
> > > works fine, except the script doesn't appear to receive any of the
> > > query string information if that page has a query string on it...
> > >
> > > an example would be something like this :
> > >
> > > http://www.domain.com/index.shtml?myvariable=1
> > >
> > > the php script should get $_REQUEST['myvariable']==1, but instead does
> > > not get any of the query information.
> > >
> > > The $_SERVER global gets the unescaped query string, but has no value
> > > for just the query string...
> >
> >um, huh? you mean it has the query string but it isn't parsed into the
> > proper superglobals ($_GET, $_REQUEST)? Not really sure what you're
> > looking for here so i'm going to just pretend this paragraph isn't here
> > ;)
> >
> > > any way around this without making the whole page a php script ?
> >
> >php.net/parse_str
> >
> > > Thanks,
> > >
> > > Tim
> >
> >--
> >Evan Nemerson
> >[EMAIL PROTECTED]
> >http://coeusgroup.com/en
> >
> >--
> >"The greatest mistake is to imagine that the human being is an autonomous
> >individual. The secret freedom which you can supposedly enjoy under a
> >despotic government is nonsense, because your thoughts are never entirely
> >your own. Philosophers, writers, artists, even scientists, not only need
> >encouragement and an audience, they need constant stimulation from other
> >people. It is almost impossible to think without talking. If Defoe had
> > really lived on a desert island, he could not have written Robinson
> > Crusoe, nor would he have wanted to. Take away freedom of speech, and the
> > creative faculties dry up."
> >
> >-George Orwell
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
> SimpleNet's Back !
> http://www.simplenet.com

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"The greatest mistake is to imagine that the human being is an autonomous 
individual. The secret freedom which you can supposedly enjoy under a 
despotic government is nonsense, because your thoughts are never entirely 
your own. Philosophers, writers, artists, even scientists, not only need 
encouragement and an audience, they need constant stimulation from other 
people. It is almost impossible to think without talking. If Defoe had really 
lived on a desert island, he could not have written Robinson Crusoe, nor 
would he have wanted to. Take away freedom of speech, and the creative 
faculties dry up."

-George Orwell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SSI and query string variables to PHP

2004-04-25 Thread Evan Nemerson
On Saturday 24 April 2004 10:29 pm, Tim Traver wrote:
> Hi all,
>
> ok, this may be a dumb question, but I have a page that has server side
> includes that include a php script like this :
>
> 
>
> works fine, except the script doesn't appear to receive any of the query
> string information if that page has a query string on it...
>
> an example would be something like this :
>
> http://www.domain.com/index.shtml?myvariable=1
>
> the php script should get $_REQUEST['myvariable']==1, but instead does not
> get any of the query information.
>
> The $_SERVER global gets the unescaped query string, but has no value for
> just the query string...

um, huh? you mean it has the query string but it isn't parsed into the proper 
superglobals ($_GET, $_REQUEST)? Not really sure what you're looking for here 
so i'm going to just pretend this paragraph isn't here ;)
>
> any way around this without making the whole page a php script ?

php.net/parse_str
>
> Thanks,
>
> Tim

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"The greatest mistake is to imagine that the human being is an autonomous 
individual. The secret freedom which you can supposedly enjoy under a 
despotic government is nonsense, because your thoughts are never entirely 
your own. Philosophers, writers, artists, even scientists, not only need 
encouragement and an audience, they need constant stimulation from other 
people. It is almost impossible to think without talking. If Defoe had really 
lived on a desert island, he could not have written Robinson Crusoe, nor 
would he have wanted to. Take away freedom of speech, and the creative 
faculties dry up."

-George Orwell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] OR

2004-04-25 Thread Evan Nemerson
On Sunday 25 April 2004 12:14 am, Aidan Lister wrote:
> if (cond || cond2)
>
> OR
>
> if (cond OR cond2)
>
>
> What do you use, and why?

Doesn't matter- personal preference.


-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"There is a certain right by which we may deprive a man of life, but none by 
which we may deprive him of death."

-Nietzsche

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PDF Page Pulling

2004-04-07 Thread Evan Nemerson
http://marc.theaimsgroup.com/?l=php-general&m=107723910931417&w=2


On Wednesday 07 April 2004 05:53 pm, Jason Sheets wrote:
> I'd suggest taking a look at ghostscript it, it is available under AFPL and
> GPL licenses and offers the ability to convert individual pages to jpeg or
> other file formats.
>
> http://www.ghostscript.com
>
> Jason
>
>
> -Original Message-
> From: Adam Voigt [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 07, 2004 10:57 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PDF Page Pulling
>
> I need to be able to pull a certain page out of a multi-page PDF, and then
> be able to save that single page to it's own PDF file.
>
> Anyone know how to do this with free tools?
>
> Thanks.
>
> --
>
> Adam Voigt
> [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety."

-Benjamin Franklin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [ANNOUNCE] PHP extension for neural networks

2004-03-31 Thread Evan Nemerson
Hi everyone,

I just wanted to send a one-time announcement regarding a new extension that 
we're (the FANN project) releasing today.

URL: http://prdownloads.sourceforge.net/fann/fannphp-0.1.0.tar.bz2?download

fann (Fast Artificial Neural Network Library) implements multilayer 
feedforward ANNs. This extension basically wraps the library, providing an 
easy way to use neural networks from PHP.

The documentation, which is on http://fann.sourceforge.net/ , is pretty 
verbose, and includes an API reference for the PHP extension. Also, there is a 
demo.php included which should help a bit.

I'm sending something over to pecl-dev right now, so hopefully the extension 
will be there sometime soon. Meanwhile, if you want to play with it, I'd love 
to get some feedback- positive or negative.


Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bison and Flex required to install PHP?

2004-03-30 Thread Evan Nemerson
On Tuesday 30 March 2004 06:08 pm, Terence wrote:
> checking lex output file root... ./configure: line 2425: lex: command not
> found
> configure: error: cannot find output from lex; giving up
>
> and from a search on Yahoo!:
>
> http://www.madpenguin.org/modules.php?op=modload&name=NS-Comments&file=inde
>x&req=showreply&tid=1522&sid=751&pid=1520&mode=&order=&thold=#1522
>
> 
> figured it out. I needed to install Bison and then Flex in order to compile
> php. Bison: http://ftp.gnu.org/gnu/bison/ Flex:
> http://gnuftp.ccp14.ac.uk/gnu/flex/ later
> 
>
> I just downloaded the latest version, 4.3.5, installing on RH9 - fresh
> install
>
> So my question, are Bison and Flex required and if so any particular
> reason? I never had this problem on previous versions (not that I installed
> on that many different distributions)

They are for CVS. Release versions come with the bison and flex stuff 
pre-made. If you're not using CVS, make sure you're using a fresh copy of the 
source.
>
> Thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to send SMS

2004-03-28 Thread Evan Nemerson
You can send through OSCAR (AIM/ICQ), too. With a bit of clever hacking, you 
could connect GAIM to PHP and live happily ever after.



On Sunday 28 March 2004 08:14 pm, Jake McHenry wrote:
> I have one of my scripts set up to just send an email to the sms email
> address that ATT provides me. Verizon also does this. Not sure about the
> rest. The phone provider then changes from email to whatever the phone
> understands
>
> Jake
>
>
> - Original Message -
> From: "saepudin" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, March 29, 2004 12:49 PM
> Subject: [PHP] How to send SMS
>
> > How to send sms with PHP and Mysql  and mobil phone Nokia 5110?
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"If anyone can show me, and prove to me, that I am wrong in thought or deed, I 
will gladly change. I seek the truth, which never yet hurt anybody. It is 
only persistence in self-delusion and ignorance which does harm."

-Marcus Aurelius

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] something like __URL__ (analogous to __FILE__)

2004-03-23 Thread Evan Nemerson
Take a look at $_SERVER['REQUEST_URI']


On Tuesday 23 March 2004 04:50 pm, motorpsychkill wrote:
> This is tricky to explain, so bear with me please.  I have a file like:
>
> c:\htdocs\project_bunny\includes\config.php
>
> In my browser address bar, this would look like:
>
> http://localhost/project_bunny/includes/config.php
>
>
>
>
> If within this document (i.e. config.php), I had:
>
>  //config.php
>
> define("CONFIG_FILE", __FILE__);
>
> echo CONFIG_FILE; //this will return
> "c:\htdocs\project_bunny\includes\config.php"
>
> ?>
>
> Now, if I have another file (e.g. rabbits.php):
>
>  //rabbits.php
>
> include("config.php");
>
> echo CONFIG_FILE; //this will also return
> "c:\htdocs\project_bunny\includes\config.php"
>
> ?>
>
> This is all great up to this point.  What I'm trying to do is:
>
>  //config.php
>
> define("CONFIG_FILE_URL", __URL__);
>
> echo CONFIG_FILE_URL; //would return
> "http://localhost/project_bunny/includes/config.php";
>
> ?>
>
> So no matter what file I use (like rabbits.php) and I include config.php,
> CONFIG_FILE_URL will always return the url for the config file and NOT the
> file doing the calling (rabbits.php).
>
> Sorry for the longwinded explanation.  I hope someone can help!  Thank you.
>
> -m

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"There is a certain right by which we may deprive a man of life, but none by 
which we may deprive him of death."

-Nietzsche

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Storing encrypted data in a database with

2004-03-23 Thread Evan Nemerson
What version of mysql are you using? IIRC, there is support for AES in newer 
(4+?) versions. If I were you, I'd handle are the encryption and decryption 
in the database, if possible.

Yep, http://www.mysql.com/doc/en/Encryption_functions.html


On Tuesday 23 March 2004 02:04 pm, Jay Blanchard wrote:
> Good afternoon!
>
> I am storing some encrypted data using PHP to do the encryption and a MySQL
> database. I have encountered a couple of times where I get back a query
> sytax error.
>
> INSERT INTO `test`.`tblEncTest` (`encAlg`, `encMode`, `encIV`, `reqName`,
> `reqSSN`, `reqEMail`) VALUES ( 'blowfish', 'cbc', 'â3IÂÂ}ÃÃ', 'Ã ÃpÃ_9',
> 'âËkÃÂfÃÃ?QÂÃgÃÂ', '-â%ÂÂ+AÂÅÂÃR'âHXâÃÃÃppT ÃÃÃ7 
> GHÂÅÅÃÃÃ' )
>
> You have an error in your SQL syntax near 'HXâÃÃÃppT ÃÃÃ7 GHÂÅÅÃÃÃ' ) '
> at line 1
>
> Now, if you look closely you can see and additional single quote in
> ÃR'âHXâ. I cannot use addslashes() here can I? Or should I base64_encode
> each item and then decode on the way back out. Any thoughts would be
> appreciated.
>
> TVMIA!

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"Only the other day, historically speaking, the 'holy inquisition' burned or 
silenced scientists. The discovery of the microscope and telescope, for 
instance, was delayed for a long time because the inventor, in fear of 
priestly persecution, was afraid to write his scientific discoveries in plain 
language. He had to write them in cipher- a fact discovered only a few years 
ago. Those afflicted with diseases can easily realize where our science in 
general, and medical science in particular, might be today if not for the 
holy zeal of powerful enemies of science who vehemently and ruthlessly 
sponsored ignorance, old s.r, and so disease."

-Alfred Korzybski

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SQL Injection check (mysql)

2004-03-22 Thread Evan Nemerson
On Sunday 21 March 2004 06:39 pm, Chris Shiflett wrote:
> --- Michael Rasmussen <[EMAIL PROTECTED]> wrote:
> > > To be clear: make sure the data that the user submitted only
> > > contains the characters you think are valid (don't bother trying
> > > to guess malicious characters - you're sure to miss one) and is a
> > > valid length. Once you've done this, and your design helps you to
> > > make sure that this step can't be bypassed by the user, you're
> > > protected against SQL injection.
> >
> > Or even better: Use only prepared statements.
>
> Can you explain that (and defend it)?

Maybe he's talking about stored procedures?

"Banks, for instance, use stored procedures for all common operations. This 
provides a consistent and secure environment, and procedures can ensure that 
each operation is properly logged. In such a setup, applications and users 
would not get any access to the database tables directly, but may only 
execute specific stored procedures."
- http://www.mysql.com/doc/en/Stored_Procedures.html
>
> Chris
>
> =
> Chris Shiflett - http://shiflett.org/
>
> PHP Security - O'Reilly
>  Coming mid-2004
> HTTP Developer's Handbook - Sams
>  http://httphandbook.org/
> PHP Community Site
>  http://phpcommunity.org/

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"To achieve adjustment and sanity and the conditions that follow from them, we 
must study the structural characteristics of this world first and, then only, 
build languages of similar structure, instead of habitually ascribing to the 
world the primitive structure of our language."

-Alfred Korzybski

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php mailer

2004-03-19 Thread Evan Nemerson
IMP and SquirrelMail are both nice.

http://www.horde.org/imp/
http://www.squirrelmail.org



On Friday 19 March 2004 03:40 pm, Mrs. Geeta Thanu wrote:
> Hi all,
>
> I am new to php and want to use php for our mailing program.
> At present we have servlet program what the users access it thru web
> interface and use for sending,receiving and composing mails.
>
> But it is giving lot of problem and hence I want to shift the entrie
> system to PHP .
>
> Please give me advice how to start with or URL of some example scripts
> etc.
>
>
> Thanks and Regds
> Geetha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pear Package...

2004-03-15 Thread Evan Nemerson
On Monday 15 March 2004 02:15 pm, Scott Fletcher wrote:
> Hi!

hi
>
> I saw the Pear packages that are originally stored in
> /usr/local/lib/php/.  This occur when I compile PHP.  Problem is they
> are different from the ones I downloaded from the pears.php.net website.
> So, I enclosed those files into the website's directory, along with all
> other website files.  That way, I can use those instead of the one from
> /usr/local/lib/php/.  However, I have a problem.  When I run the web
> script, PHP still use the Pear files in /usr/local/lib/php/*** instead of

what does ini_get('include_path') return? Try doing ini_set('include_path', 
'.:/usr/local/lib/php')

php is probably searching for includes in /usr/local/lib/php first. Also, 
consider reinstalling what you've download from pear using pear's cli; `pear 
install DB`, for example

> the one I use along with the web files.  I tried the include and require
> function but no luck.
>
>    Why is that?  What workaround do I need on this?
>
> FletchSOD

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"...the whole idea of revenge and punishment is a childish daydream. Properly 
speaking, there is no such thing as revenge. Revenge is an act which you want 
to commit when you are powerless and because you are powerless: as soon as 
the sense of impotence is removed, the desire evaporates also. "

-George Orwell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dumb

2004-03-11 Thread Evan Nemerson
On Thursday 11 March 2004 11:38 am, Jonathan Villa wrote:
> Go to rpmfind.net and see if you find one...

If not, try rpm.pbone.net. It seems like rpmfind's content has been lacking 
lately, whereas pbone seems to have everything. rpmfind has a more powerful 
search, though...
>
> Or see if you uninstall all the mysql RPMs and use the ones from
> mysql.com/downloads.  They also have an RPM client.
>
> -Original Message-
> From: PHP [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 11, 2004 1:32 PM
> To: php
> Subject: [PHP] Dumb
>
> Hi,
> I have a dum question.
>
> I recently picked up a new RH9 dedicated server. Apache 2, Mysql 3 and php4
> are all installed , via rpm I am assuming.
>
> I upgraded mysql to version 4, however, php is still using the version 3
> client. (from php_info)
>
> How do I get php4 to use the mysql4 client?
>
> I would like to know if this is possible just using rpms.  I could do it
> re-compiling everything myself, but I kind of want to stick to the rpm
> style installation on this server if possible.
>
> Thanks for any help.

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"Give a man fire, and he'll be warm for a day; set a man on fire, and he'll be 
warm for the rest of his life."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem with PDFlib

2004-03-11 Thread Evan Nemerson
Someone else had a problem like this a while back- iirc it's caused when 
permissions are insufficient (ie, failed to open file). Just search google, 
it's easy to find.


On Thursday 11 March 2004 01:12 pm, Teren wrote:
> Hi, I just moved a site to a new server. I haven't touched the site forever
> and i forgot how to use PDFlib (using fpdf now). Anyways, i'm getting this
> error: Fatal error: PDFlib error: function 'PDF_set_info' must not be
> called in 'object' scope in
> /home/www/lonestar.seryx.net/https/pdf/invoice.php on line 18
>
> Line 18 is the following: PDF_set_info($p, "Creator", "invoice.php");
>
> It will do that for any other line too if i comment that out (that is using
> pdf stuff)
>
> Any ideas? Thanks
>
> Teren

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"The public have an insatiable curiosity to know everything. Except what is 
worth knowing. Journalism, conscious of this, and having tradesman-like 
habits, supplies their demands."

-Oscar Wilde

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] file management system

2004-03-11 Thread Evan Nemerson
On Thursday 11 March 2004 02:59 pm, Decapode Azur wrote:
> hi all,
>
> I am looking for a file management system.
> Does anyone know if such a thing exists?
>
> The goal is to make a web site with computer graphics resources.

Take a look at http://www.abnormis.com/

It's an awesome resource for dark art, but what's more pertinent here is that, 
iirc, they run postnuke.
>
> The features we would like to find in it would be these if possible:
> - the possibility to upload files
> - the possibility to check the uploaded file
>  (Fileinfo is available on our server)
> - the possibility for the uploaders to refer informations and key words on
> the file they upload
> - the possibility for the uploaders to introduce themselves in a quick
> description of them and their work
> - the possibility for the uploaders to chose the license in which their
> work will be available (copyright or copyleft)
> - the possibility for the visitors to browse in the files available
> (date, type of file, key words, author, license, popularity of a file,
> etc..) - the possibility for the visitors to post reactions and discuss
> about the files, and to rate these.
> - we're looking for such a system as Free software (GPL for example)
> - if all those feteares are not available in an existing system,
>  we will add those, but if such a system do not exist, is there people
> interested in the same features to develop it with us or just helping with
> testing and feedback?
>
>
>
> Cheers++

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"Only the other day, historically speaking, the 'holy inquisition' burned or 
silenced scientists. The discovery of the microscope and telescope, for 
instance, was delayed for a long time because the inventor, in fear of 
priestly persecution, was afraid to write his scientific discoveries in plain 
language. He had to write them in cipher- a fact discovered only a few years 
ago. Those afflicted with diseases can easily realize where our science in 
general, and medical science in particular, might be today if not for the 
holy zeal of powerful enemies of science who vehemently and ruthlessly 
sponsored ignorance, old s.r, and so disease."

-Alfred Korzybski

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] AI:Categorizer

2004-03-10 Thread Evan Nemerson
On Wednesday 10 March 2004 04:08 am, Adam i Agnieszka Gasiorowski FNORD wrote:
>   Is there avaiable something alike
>  a port of PERL AI:Categorizer?

Google didn't know what that was, so I'm assuming you meant AI::Categorize.

If you just want to classify documents as, for example, html, pdf, ms-word, 
etc., take a look at pecl.php.net/fileinfo which uses libmagic, not AI.

If you're intent on using AI, you're probably going to have to do it yourself. 
There is an artificial neural network extension in the CVS repository at 
sf.net/projects/fann (disclaimer, I'm the author of that extension and a 
developer for the FANN library). I don't know of any bayesian networks for 
PHP, but I could be wrong.

>
> --
> Seks, seksić, seksolatki... news:pl.soc.seks.moderowana
> https://hyperreal.info/pomoc/ { 1488 } WiNoNa => )   (
> Szatan, Szatan...http://666-666.0-700.pl foReVeR(  *  )
> Poznaj jej zwiewne kształty... http://www.opera.com 007

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Spelling without Aspell/Pspell

2004-03-10 Thread Evan Nemerson
On Wednesday 10 March 2004 05:59 pm, Justin French wrote:
> Has anyone written/found a library (commercial/free/whatever) that can
> be used like Aspell/Pspell, but doesn't require a recompile of PHP?

If modules are okay, there's an extension for enchant in PECL. Otherwise, at 
least aspell has a CLI- enchant probably does too. Wouldn't be too difficult 
to hack something together.
>
> In other words, something that will work on a base install of PHP4.2+.
>
> ---
> Justin French
> http://indent.com.au

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Compiling PHP classes/libraries to objects

2004-03-08 Thread Evan Nemerson
On Monday 08 March 2004 04:44 pm, Tariq Murtaza wrote:
> Hi All
>
> Is there any way to use compiled form of libraries/classes in PHP.
> Comments please...

http://turck-mmcache.sourceforge.net/
>
> Regards,
> Tariq

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php debug

2004-03-08 Thread Evan Nemerson
On Monday 08 March 2004 07:31 am, Doug Dalton wrote:
> I am getting an error in php that is causing a core dump :
> (gdb) core php.core
> Core was generated by `php'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x00686264 in ?? ()
>
> The program is a script and is working fine until,  my assumption is
> that it exhausts resources and crashes,  does anyone have a suggestion
> on how to debug a problem of this sort?

segfaults are usually because the application is trying to read or write to 
memory it shouldn't be. If you e-mail me reproducing code, I'll take a look 
at it. Try to get it down to as few lines of possible.

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"If you would be a real seeker after truth, you must at least once in your 
life doubt, as far as possible, all things."

-Rene Descartes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP support C++?

2004-03-08 Thread Evan Nemerson
On Monday 08 March 2004 07:03 am, Kenneth wrote:
> Hi all,
>
> Does PHP support C++ language?
> If yes, how can it be converted?

you can write an extensions, which is actually rather easy to do. There's an 
article at http://bugs.tutorbuddy.com/phpcpp/phpcpp/ that claims to tell you 
how to use c++ (rather than c), but I can't vouch it- never tried it.
>
> The case is, I've use C++ to make a function (to get data from file and
> convert it from char type to int type), how can i import the
> function/variables and use it in PHP?

Sounds like a really simple function. Why not just rewrite in in PHP?
>
> Thanks,
> Kenneth

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Access DNS record

2004-02-26 Thread Evan Nemerson
On Wednesday 25 February 2004 06:19 pm, Jeff Schwartz wrote:
> Does anyone know how to access a DNS record? Can it be done with fopen?

it could be done with fsockopen (*grins maniacally*)... but 
php.net/dns_get_record may be a better way to go.
>
> Jeff
>
>
> -
> Do you Yahoo!?
> Yahoo! Mail SpamGuard - Read only the mail you want.

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Apache/IE hangs with PHP

2004-02-26 Thread Evan Nemerson
It's only IE? Perhaps IE keeps connections in a global structure and tries to 
use already established connections, regardless of which window you're using? 
It's just a guess, but it seems logical- it would cut down on TCP handshake 
waste, but one window could effectively DoS another. I wonder what would 
happen on multi-user installations of windows...? Anyone got a box the could 
test on?


On Wednesday 25 February 2004 06:30 pm, Vincent Bouret wrote:
> Hi,
>
> I have this strange problem. I have Apache 1.3.28 on Windows XP Home SP1
> with PHP 4.3.4 as a module:
>
> httpd.conf
> LoadModule php4_module c:/php/sapi/php4apache.dll
> AddType application/x-httpd-php .php
> AddType application/x-httpd-php .phtml
>
> //After a list of modules
> AddModule mod_php4.c
>
> Let's say I have test.php that does nothing more than sleeping for 30
> seconds:
>  sleep(30);
> ?>
> 
> content
> 
>
> When I open up this script in IE with http://localhost/test.php and within
> the 30 seconds sleep I try to load another file with .php extension
> (regardless of whether there are some php statements or not in the file) on
> the same localhost server with another IE window, IE or Apache hangs until
> the first script is done and then gives output of the second script.
>
> The thing is that when I connect to Apache manually with Telnet during the
> same 30 seconds and I request a PHP script, I get the answer immediately.
>
> I've tried almost everything, Apache 2.0, PHP5, disabling Keep-Alive in
> Apache, nothing works.
>
> What am I doing wrong? Is that a natural behaviour.
>
> Thanks for your help,
> Vincent

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"...the whole idea of revenge and punishment is a childish daydream. Properly 
speaking, there is no such thing as revenge. Revenge is an act which you want 
to commit when you are powerless and because you are powerless: as soon as 
the sense of impotence is removed, the desire evaporates also. "

-George Orwell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] system / exec Question...

2004-02-23 Thread Evan Nemerson
On Monday 23 February 2004 03:48 pm, Gary Sanders wrote:
> Hello... I'm using with PHP with Windows XP.  I just set it up today and
> terribly new to PHP (1st day).  Anyway, I'm having a problem calling an
> .exe file with system and exec.  I can call lots of other programs, but not
> this one.  Can you tell me what's the best way to debug a problem like this
> - or how I enable the debugging options?

At the beginning of your script, use this line:

error_reporting(E_ALL);

Remember to change E_ALL to 0 in production environments, though!
>
> Thanks,
> Gary
>
> --  Give someone a fish, and he eats for a day.  Give him a fishing rod and
> he goes hungry until you give him the dam fish so he has some bait.  ;-)

"Give a man fire, and he'll be warm for a day; set a man on fire, and he'll be 
warm for the rest of his life."
>
> Gary Sanders
> Sr. Engineer - replaytv
> Digital Networks North America
> 2600 San Tomas Expwy.
> Santa Clara, CA 95051-0953
> 408-565-7103

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Detecting Binaries

2004-02-23 Thread Evan Nemerson
On Monday 23 February 2004 03:02 pm, Axel IS Main wrote:
> That's not bad, but I found a way to do it simply using chr() and
> passing it a value. It turns out the if I go 0-31 Almost nothing will
> get through. Even the simples html has something in there from that
> list. However, by just looking between 14 and 26, one more than carriage
> return, and one less than escape, it worked really well. I crawled a
> site with a large number of jpg, gif, mp3, wav, and pdf files. Of the
> 100's of binaries there only one pdf got through. Not a bad record. I

It should be noted that PDF isn't necessarily a binary. It's just most people 
like to use compression, and embed images, sounds, etc. But if you want to, 
you can fire up emacs and create a PDF from scratch. So really the record is 
better than you think ;)

> also found that in order for this to work I have to process the URLs.
> This makes things really slow so I'm going to have to use both this and
> the "check for extension" function together. Still, I can worry a lot
> less about getting my index weighted down by binary files. The code is
> pretty basic at this point, but here it is:
>
> // Check for binaries
> $ckbin = 14;
> while($ckbin <= 26){
> $ck = chr($ckbin);
> $cbin = substr_count($read, $ck);
> if($cbin > 0){
> echo "Killing off binary file URL: $url\n";
> $kill = mysql_unbuffered_query("DELETE FROM search WHERE
> url_id='$url_id'");
> continue 2;
> }
> ++$ckbin;
> }
> I know it looks kind of funky out of context, but it works really great.
>
> Nick
>
> Richard Davey wrote:
> >Hello Evan,
> >
> >Monday, February 23, 2004, 8:57:43 PM, you wrote:
> >>>It would be wise to check for characters from 0 to 31, if they appear
> >>>then it's almost certainly (but not guaranteed) binary.
> >
> >EN> Assuming that's decimal, you're including 0x09 0x0a and 0x0d which
> > are, EN> respectively, tab, line feed, and carriage return. That's off
> > the top of my EN> head, which means two things: (1) i may be forgetting
> > something, and (2) I EN> need a life ;)
> >
> >Let me rephrase - check for the existence of characters 0 through 31
> >and count how many there are. Set a percentage weight yourself and
> >figure out in your script if you deem the quantity too many or too
> >few.
> >
> >The count_chars() function will be absolutely ideal for this.

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] saving form data

2004-02-23 Thread Evan Nemerson
On Monday 23 February 2004 02:51 pm, Charlie Fiskeaux II wrote:
> Richard Davey wrote:
> > CFI> It's just a matter of development time; if there's a way to
> > CFI> use the Perl mail script with a PHP data saving script, it
> > CFI> would save time. If I do have to rewrite the whole thing in
> > CFI> PHP, how would I accept uploaded file attachments and attach
> > CFI> them to the emailed form results?
> >
> > Then how about in reverse? Add something to the end of the Perl script
> > that passes the values to a PHP script? It could even do it via the
> > query string, maybe also passing an md5 encoded password that only
> > your two scripts know (in order to stop someone spoofing your script).
>
> I don't think that would work because they will need to save
> without sending the form. But I had thought about the
> reverse: a PHP script that saves the data and then possibly
> passes it on to the Perl script.
>
> Do you or anyone else know how to pass on form results in
> PHP to another script? (Like I said, I'm pretty new to PHP...)

Well you could try using an HTTP 302 Found or 307 Temporary Redirect, but IIRC 
clients must not redirect the request unless the response is received in 
response to a GET or HEAD request, so you'd have to use GET. I seem to 
remember reading something about uploading files, which is kinda difficult 
with GET...

Possibly your best option would be to send a POST request through the HTTPD 
via a socket- there are libraries out there to help you do this easily, try 
PEAR, hotscripts, phpclasses, etc.
>
> Thanks!
>
> --
>
> Charlie Fiskeaux II
> Media Designer
> Cre8tive Group
> cre8tivegroup.com
> 859/858-9054x29
> cell: 859/608-9194

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Finding out the local path to a file.

2004-02-23 Thread Evan Nemerson
On Monday 23 February 2004 04:31 pm, Simon Fredriksson wrote:
> I'm wondering if there's a way for PHP fo know the local path of
> REQUEST_URI. I've used a script to list directories, in order to replace
> the looks of the traditional Indexes look (apache). By setting
> DirectoryIndex to a fixed file (/list/lister.php) that file is now
> executed whenever there's no other indexfile in the folder. But how can
> I let it know which folder to work in? Let's say that it gets
> example.com/~simon/files/ as URL. All the local variables I've seen by
> using phpinfo() point to the location of the file, not the folder I'm
> requesting.
>
> Any ideas?

dirname($_SERVER['SCRIPT_FILENAME'])?
>
> //Simon

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re[2]: [PHP] Detecting Binaries

2004-02-23 Thread Evan Nemerson
On Monday 23 February 2004 11:55 am, Richard Davey wrote:
> Hello Axel,
>
> Monday, February 23, 2004, 7:38:25 PM, you wrote:
>
> AIM> Thanks, you just gave me the solution, I think. I don't have to strip
> AIM> out every character above standard ascii, I just have to look for
> them. AIM> If one is there, then just get rid of it. It's true that an OS
> can't AIM> tell the difference between a jpg and an exe file, but that's to
> be AIM> expected. But the file_get_contents() function DOES open the file.
> Since AIM> there is a definite difference between a text file and a binary
> file, it AIM> should be able to detect that.
>
> The difference isn't as obvious as you might think. Opening a binary
> file into a hex editor will show you this. Your brain can determine if
> the codes in-front of you are "English" or not, but from a pure logic
> point of view that's a little harder.
>
> Also bear in mind that on Unix ALL files are binary files. It is up to
> you to determine the type of the file contents as you see fit. For
> example you can check for line-terminated data.
>
> It would be wise to check for characters from 0 to 31, if they appear
> then it's almost certainly (but not guaranteed) binary.

Assuming that's decimal, you're including 0x09 0x0a and 0x0d which are, 
respectively, tab, line feed, and carriage return. That's off the top of my 
head, which means two things: (1) i may be forgetting something, and (2) I 
need a life ;)

I'm not up to speed on this thread, but perhaps you could (ab)use some 
techniques from natural language processing? May be overkill, though ;)

>
> --
> Best regards,
>  Richard Davey
>  http://www.phpcommunity.org/wiki/296.html

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php and GpG

2004-02-23 Thread Evan Nemerson
On Monday 23 February 2004 10:49 am, Adam Bregenzer wrote:
> On Mon, 2004-02-23 at 08:35, Paul Marinas wrote:
> > Those anyone know hoh to use php with gpg. I've tryed gpgext, but doesn't
> > seems to work maybe my php is not compiled with some kind of support.
>
> You will need to call gpg from your script using either a socket
> connection[1], something from the exec family[2], or backticks[3].

I seem to remember someone writing an extension using GPGME, but IIRC GPGME is 
GPL'd so there may be some licensing issues... worth a look, though
>
> [1] http://www.php.net/popen
> [2] http://www.php.net/ref.exec
> [3] http://www.php.net/operators.execution
>
> --
> Adam Bregenzer
> [EMAIL PROTECTED]
> http://adam.bregenzer.net/

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Possible to write CRC/MD5 to the file?

2004-02-22 Thread Evan Nemerson
On Sunday 22 February 2004 08:20 pm, Simon Fredriksson wrote:
> I wonder if it's possible to write the MD5 or CRC checksum of my
> scriptfile to the scriptfile. I know that if I change it, the value will
> change, but is there any way to calculate what it will be?

What you would have to do is find a collision, which is thankfully difficult 
to do- if it were easy, MD5 would be useless. Theoretically, you could modify 
say John The Ripper and have it brute force something, but you may end up 
waiting a few lifetimes :)
>
> Not just displaying it for the user, but actually having it written in
> the file. Could be pretty usefull when distributing scripts. No worries
> about losing the md5-file or sfv, etc.

I'd recommend PGP/GPG signing instead- anyone can create a valid MD5 checksum, 
but only you can cryptographically sign your files (theoretically- if someone 
else can, you've got serious problems)

Everyone seems happy enough with detached signatures. Also, you could use the 
OpenPGP specification to do what you want, just like when you send a 
PGP-signed e-mail the signature and the message are all in a single 
container. You may have to hack GPG a bit (not as difficult as you'd think) 
to have the PGP stuff in PHP comments, but i think you could do it... Sorry, 
I'm rambling.
>
> Just some thoughts.
>
> //Simon

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP & PDFs...

2004-02-19 Thread Evan Nemerson
On Thursday 19 February 2004 11:42 am, Russell P Jones wrote:
> Is there any way to deal with PDFS using PHP and not installing PHPlib? I
> simply need to pull the first page of a PDF document and print it out
> using PHP. (Like a PDF preview of sorts)...
>
> Any ideas?

I'm assuming you meant pdflib, not phplib? If I'm reading your question right, 
I don't know of a way to do it purely from PHP. However,

gs -q -dNOPAUSE -dBATCH -sOutputFile=output_file.pdf -sDEVICE=pdfwrite 
-dFirstPage=1 -dLastPage=1 -f input_file.pdf

will give you what you want. What you want is a PDF of the first page of 
another PDF, right?

>
> Russ Jones

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety."

-Benjamin Franklin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Threading & PHP

2004-01-24 Thread Evan Nemerson
php.net/pcntl
cvs.php.net/cvs.php/pecl/threads


On Saturday 24 January 2004 03:24 pm, Galen wrote:
> Hi,
>
> This may be completely crazy, but let me tell you what I want to do:
> thread PHP.
>
> My server is a dual-processor 2 GHz machine, and it's not very loaded.
> I have a few tasks that are huge and lengthy and would benefit from
> being placed in their own "thread" if you will. This would serve to
> either accelerate the process by splitting it among CPUs or allow the
> process to continue "in the background" for a few seconds after all
> pages have been loaded.
>
> There are two areas where I'd use this:
> 1) To accelerate results in a relevancy ranking/fuzzy matching
> algorithm I have created, and although I've optimized the heck out of
> it, it can be slow when hundreds of thousands of items are thrown at
> it. It would be easy to split the array in half and run the algorithm
> on both halves, which would almost half processing time for returning
> results.
>
> 2) With image processing. When a user uploads an image to a few of my
> pages, the image is processed, re-compressed, and filed in the database
> or a file system. This can take several seconds, and I'd prefer that
> the user doesn't have to wait for the process to complete.
>
> How might I be able to make some PHP code run as a "thread" that would
> serve these purposes?
>
> -Galen

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can we make .exe programs with php?

2004-01-24 Thread Evan Nemerson
On Saturday 24 January 2004 02:55 pm, Mark Charette wrote:
> On Sat, 24 Jan 2004, pehepe php wrote:
> > Can we make .exe programs with php? for example we can do it with delphi,
> > vbasic.but can we do with php?

Not recommended for production boxes, but...

http://pecl.php.net/bcompiler

Also, there's Pharrot, but I don't know if that's even past the planning 
stages.

If you're after encoding, try Turck MMCache. It's stable, IIRC.

>
> No (and .exe is a convention that isn't universal, btw). PHP is an
> interpreted language, not a compiled one.
>
> --
> "Half the people know what they're talking about, and the
> other half are writing code."

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"...the whole idea of revenge and punishment is a childish daydream. Properly 
speaking, there is no such thing as revenge. Revenge is an act which you want 
to commit when you are powerless and because you are powerless: as soon as 
the sense of impotence is removed, the desire evaporates also. "

-George Orwell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Generating PDF

2003-12-31 Thread Evan Nemerson
On Wednesday 31 December 2003 09:29 am, Yann Larrivee wrote:
> Hi i am trying to generate a PDF with PHP5 (latest cvs) and PDFLib 5.0.2
>
> I have this very basic example that i took from php.net and saw the same
> code on http://www.sitepoint.com/article/1225/1
>
>  $pdf = pdf_new();
> pdf_open_file($pdf, "philosophy.pdf");
> pdf_begin_page($pdf, 595, 842);
> $arial = pdf_findfont($pdf, "Arial", "host", 1);
> pdf_setfont($pdf, $arial, 10);
> pdf_show_xy($pdf, "There are more things in heaven and earth, Horatio,",
> 50, 750);
> pdf_end_page($pdf);
> pdf_close($pdf);
> ?>
>
> But the function pdf_begin_page always return this error messsage.
>
>
> Fatal error: PDFlib error [2100] PDF_begin_page: Function must not be
> called in 'object' scope in
> /home/yann/public_html/test/pdf/OrderPdf.class on line 4
>
Do you have permissions to write to/create philosophy.pdf? Does pdf_begin_page 
return TRUE or FALSE? What happens when you use "" for filename (ie create 
the file in memory)?
>
> To me this example seems right, and the function calls seems alright
> according to the docummentation.
>
>
> Anybody else have seen this probleme befor ?
>
>
> Thanks
>
> Yann

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"He who fights too long against dragons becomes a dragon himself; and if you 
gaze too long into the abyss, the abyss will gaze into you."

-Nietzche


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: basic set and read a cookie probs

2003-12-25 Thread Evan Nemerson
On Wednesday 24 December 2003 10:15 pm, Jack E. Wasserstein, DDS, Inc. wrote:
> Sorry,
>
> No such thing as $_POST_VARS

next time you're having problems, try doing an error_reporting(E_ALL); It 
really helps a lot, though I'll admit it can be a bit finicky :)

Oh and don't forget to turn it off when you're done w/ development

>
>
>
>
> "Jack E. Wasserstein" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > I am using the following code on the php form handler
> >
> > if ($_POST[referdrremember] == "true") {
> > setcookie("remailcookie",
> > "$_POST_VARS[refdremail]",time()+3600,"/","wasserstein.com","0");
> >
> > Try to see the cookie in the same script, not sure which one to use with
>
> or
>
> > without $
> >
> > print " the cookie's value is  $HTTP_COOKIE_VARS[remailcookie] ";
> > print " the cookie's value is 2 $HTTP_COOKIE_VARS[$remailcookie] ";
> >
> > In addition when I get back to the calling form and refresh it I try to
>
> see
>
> > the cookie with this:
> >
> > if ($HTTP_COOKIE_VARS[remailcookie]) {
> >   print ("remail cookie exists"); }
> >   else {
> >   print ("no cookie");
> >   }
> >
> > This yeilds "no cookie"
> >
> > I have also tried $_COOKIE[] as well
> >
> >
> > What am I doing wrong.
> >
> > Thanks in advance,
> >
> > Jack

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"It is an unfortunate fact that every man who seeks to disseminate knowledge 
must contend not only against ignorance itself, but against false instruction 
as well. No sooner do we deem ourselves free from a particularly gross 
superstition, than we are confronted by some enemy to learning who would set 
aside all the intellectual progress of years, and plunge us back into the 
darkness of mediaeval disbelief."

-HP Lovecraft

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] programming the onclick() event in an anchor

2003-12-25 Thread Evan Nemerson
On Wednesday 24 December 2003 08:06 pm, Peter Walter wrote:
> I have written a session-enabled php page which displays a table of
> search results. The first column in the table contains anchor links to
> www.mydomain.com/mypage?seqno= where seqno is a variable I would
> like to pass when the anchor is clicked. However, I do not wish the
> ?seqno= to display in the url of the browser. After googling a lot,
> it appears that I can use JavaScript to set a session variable in the

I doubt it- otherwise it would be pretty easy to set, say 
$_SESSION['logged_in']

> onclick() event, but I have not been able to find an example of how to

But you /can/ use JS to set a cookie, which can be retrieved (and stored in a 
session variable if you want) by PHP.

http://www.webreference.com/js/column8/
http://us4.php.net/manual/en/reserved.variables.php#reserved.variables.cookies

> do it. Does anyone have experience doing this? Sample code would be
> greatly appreciated.

http://www.webreference.com/js/column8/functions.html

>
> Peter

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"There is a certain right by which we may deprive a man of life, but none by 
which we may deprive him of death."

-Nietzsche

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL regex

2003-12-19 Thread Evan Nemerson
On Friday 19 December 2003 11:22 am, Evan Nemerson wrote:
> Hey does anyone have a good regex laying around for URLs? ereg or preg,
> doesn't matter.

Okay finally found this: http://www.regexp.org/msg.php?uid=512

wow. Seriously- wow.

>
>
>
> --
> Evan Nemerson
> [EMAIL PROTECTED]
> http://coeusgroup.com/en
>
> --
> "Truth, like gold, is to be obtained not by its growth, but by washing away
> from it all that is not gold. "
>
> -Leo Nikolaevich Tolstoy

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"It is an unfortunate fact that every man who seeks to disseminate knowledge 
must contend not only against ignorance itself, but against false instruction 
as well. No sooner do we deem ourselves free from a particularly gross 
superstition, than we are confronted by some enemy to learning who would set 
aside all the intellectual progress of years, and plunge us back into the 
darkness of mediaeval disbelief."

-HP Lovecraft

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] URL regex

2003-12-19 Thread Evan Nemerson
Hey does anyone have a good regex laying around for URLs? ereg or preg, 
doesn't matter.



-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"Truth, like gold, is to be obtained not by its growth, but by washing away 
from it all that is not gold. "

-Leo Nikolaevich Tolstoy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Manage link.

2003-12-18 Thread Evan Nemerson
On Thursday 18 December 2003 01:37 pm, Vincent M. wrote:
> Hello,
>
> Is there any way to manage links in an array and transform them.
> For example, I have this text in the database:

php.net/preg_replace
>
> ---
> Software & Support Media, produc-ers of the International PHP
> Conference, are pleased to announce a new monthly version of their print
> publication. For more information, you can go here: http://www.google.com
> Thanks.
> ---
>
> And transform this text to:
> ---
> Software & Support Media, producers of the International PHP Conference,
> are pleased to announce a new monthly version of their print
> publication. For more information, you can go here:  href=\"http://www.google.com\";>url
> Thanks.
> --
>
>
> Thanks,
> Vincent.

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"Perl - the only language that looks the same before and after RSA 
encryption."

-Keith Bostic

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] (0t) SSH cp (copy help)

2003-12-11 Thread Evan Nemerson
On Thursday 11 December 2003 10:49 am, Pablo Gosse wrote:
> 
> Hi,
> I'm on a win2k pro machine and need to copy a modified httpd.conf file
> to my
> linux box,
> I dont really know much about SSH and just learned a bit with my pals
> help
> (google)
>
> I am able to navigate around the directories, get a directory listing
> and
> delete...am unable to copy files from my harddisk for some reason
> 
>
> Hey Ryan.  I'd suggest going to
> http://www.ssh.com/support/downloads/secureshellwks/ and downloading
> either the commercial evaluation version or non-commercial version.  It
> has the standard SSH terminal, but it also features an SSH File Transfer
> client which will allow you to do what you want.

openssh also included an sftp client. IIRC, there is a pretty good win32 port 
out there. And it's free

>
> Cheers,
> Pablo

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"The superior man is satisfied and composed; the mean man is always full of 
distress."

-Confucious

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Palm OS Processor

2003-12-11 Thread Evan Nemerson
On Thursday 11 December 2003 03:37 pm, Galen wrote:
> I would love one of these too! PHP programming in my pocket! And how
> about a mini database for Palm OS also? (SQLite?)
>
> Anybody know anything more about this?

GCC on Palm. Yumm.
http://sourceforge.net/projects/prc-tools/

>
> I'm not finding much with Google tha
>
> -Galen
>
> On Dec 11, 2003, at 7:47 AM, Stephen Craton wrote:
> > Hello,
> >
> > I was just wondering if there were such a program for Palm OS 4.1 that
> > processes PHP code. Just wondering so that I can maybe make some
> > complex calculator functions on it and use it for school work or
> > whatever else may come my way. Thanks!
> >
> > Stephen Craton

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"Truth, like gold, is to be obtained not by its growth, but by washing away 
from it all that is not gold. "

-Leo Nikolaevich Tolstoy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php .htaccess autologin

2003-12-11 Thread Evan Nemerson
On Thursday 11 December 2003 04:17 pm, ROBERT MCPEAK wrote:
> I've dug around quite a bit and can't figure out how I might use PHP to
> handle an .htaccess login.  For example, if I wanted a script to log in the
> user, rather than the user logging in with the standard .htaccess dialog.
>
> Any ideas?

I could be wrong, but I think this would be rather client-dependent. I don't 
think HTTP remembers who you throughout a session- i think the headers get 
sent every time. My only idea from PHP would be to set the 
$_SERVER['PHP_AUTH_*'] stuff, but i sincerely doubt that would do anything. I 
just don't think there's a way  to ask the browser to set that info through 
http. Maybe ask @ javascript forum?

If you find a solution, I'd love to hear it...

>
> Since the .htaccess vars are stored in the browser, should I be looking at
> a PHP/JavaScritpt 1-2 punch?
>
> Thanks,
>
> Bob

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"First they came for the Communists, and I didn't speak up, because I wasn't a 
Communist. Then they came for the Jews, and I didn't speak up, because I 
wasn't a Jew. Then they came for the Catholics, and I didn't speak up, 
because I was a Protestant. Then they came for me, and by that time there was 
no one left to speak up for me."

-Martin Niemoller

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Math Question

2003-12-11 Thread Evan Nemerson
On Thursday 11 December 2003 03:33 pm, Mike D wrote:
> I'm am completely stumped on a seemingly simple math formula
>
> I need to find a way to map a set of numbers up to 4 (e.g. 1,2,3,4 or 1,2)
> to any number in a range of up to 10,000 (ideally, unlimited). Such that,
>
> (e.g. 1,2,3,4)
>
> 1 is to 1
> 2 is to 2
> 3 is to 3
> 4 is to 4
>
> 5 is to 1
> 6 is to 2
> 7 is to 3
> 8 is to 4
>
> 9 is to 1
> 10 is to 2
> 11 is to 3
> 12 is to 4
>
> 13 is to 1
> 14 is to 2
> 15 is to 3
> 16 is to 4
>
> And so on...
>
> Is anyone good at math, that can throw me a bone?

Modulus operator.

// untested
function map($n, $x) {
return (($x-1) % $n)+1;
}

>
> Thanks y'all,
> Mike D
>
>
> ....
> Mike Dunlop
> AWN, Inc.
> // www.awn.com
> [ e ] [EMAIL PROTECTED]
> [ p ] 323.606.4237

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"The superior man is satisfied and composed; the mean man is always full of 
distress."

-Confucious

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Compiling...hellllp!

2003-12-11 Thread Evan Nemerson
On Thursday 11 December 2003 09:59 am, you wrote:
> Hi,
> Problem is, I want to compile on my win2k pro machine for the linux
> dedicated machine..

Okay, it's called cross-compiling, and it's a huge pain in the arse. My 
advice: don't do it. If you don't have a lot of experience with GCC, it's 
simply not going to happen. Sorry.

If you do want to try, you'd probably need gcc under cygwin with binutils for 
elf, plus every package php depends on... yeah linking would be a nightmare.

> I have never compiled php before, I got one of those "ready to go packages"
> (PHP+MySql+Apache -  in one .exe file)
>
> Cheers,
> -Ryan
>
> > On Wednesday 10 December 2003 08:23 pm, Ryan A wrote:
> > > Hi,
> > >
> > > Its been quite some time since I have done any compiling, the last time
>
> was
>
> > > java and before that C...which was years back.
> > >
> > > I want to install Turck MMCache for php on one of our new dedicated
>
> servers
>
> > > as we will be running a crapload of scripts there...differient
> > > applications...we estimate around 2k - 4k or even a few more
> > > scripts
> >
> > honestly, i've never run turck, but the build process seems rather
>
> standard.
>
> > > I myself have been working on a windows machine for a lonnng time (yes,
>
> i
>
> > > said windows, you *unix users can stop spitting) and really have no
> > > idea about "compiling" MMCache...can anybody tell me how to do it
> > > please? and what i'll need?
> >
> > I'm going to assume you're compiling on a real OS, and your desktop is
> > Windows. If not, can't really help...
> >
> > > This is what I got from their page:
> > > (http://turck-mmcache.sourceforge.net/#install)
> > > Step 1. Compiling Turck MMCache
> > >  export PHP_PREFIX="/usr"
> > >   $PHP_PREFIX/bin/phpize
> >
> > Odds are phpize is in your $PATH, so you can just cd into the turck
>
> directory,
>
> > and type phpize. If not, try typing `locate phpize` to find it, then type
> > /path/to/phpize instead.
> >
> > > ./configure --enable-mmcache=shared
> > > --with-php-config=$PHP_PREFIX/bin/php-co nfig
> > >   make
> >
> > then you move into the PHP source directory, since PHP needs to be
>
> recompiled
>
> > with support for turck. See http://www.php.net/manual/en/installation.php
> >
> > the only requirement is that you must include '--enable-mmcache=shared'
> > as
>
> an
>
> > argument to the configure script. If the server is already set up, you
>
> should
>
> > do a phpinfo() to see what was sent to configure, and use that exact
>
> command
>
> > plus the mmcache thing above. This will decrease the likelyhood of a
>
> snafu.
>
> > > Thanks,
> > > -Ryan
> > >
> > >
> > > http://Bestwebhosters.com
> >
> > --
> > Evan Nemerson
> > [EMAIL PROTECTED]
> > http://coeusgroup.com/en
> >
> > --
> > "I am indeed amazed when I consider how weak my mind is and how prone to
> > error. "
> >
> > -Rene Descartes

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"God is love, Love is blind, Ray Charles is blind... Therefore, Ray Charles is 
God"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Fatal Error: PDFlib error ...

2003-12-10 Thread Evan Nemerson
On Wednesday 10 December 2003 09:08 pm, Matthias Nothhaft wrote:
> Hi,
>
> I'm trying to get the pdflib work...
>
> I use pdflib 4.0.3 downloaded from pdflib.de and php 4.3.4 on Debian Linux.
>
> I wrote this test code:
>
> 
> dl("libpdf_php.so");
>
> $pdf = pdf_new();
> pdf_begin_page($pdf, 421, 595);
> pdf_set_font($pdf, "Helvetica", 24, "host");
> pdf_show_xy($pdf, "Hello World!", 75, 200);
> pdf_end_page($pdf);
> pdf_close($pdf);
>
> $buffer = pdf_get_buffer($pdf);
>
> $f = fopen("test.pdf", "bw");
> fwrite($f, $buffer);
> fclose($f);
>
> ?>
>
> and got
>
> Fatal error: PDFlib error: function 'PDF_begin_page' must not be called
> in 'object' scope in /var/www/Software/cms4rent/pdftest.php on line 5
>
> Why is that?

google (including quotes): "must not be called in 'object' scope"
result #2: http://www.alt-php-faq.org/local/87/

Rather cryptic error message... hmpf.

>
>
> Any help would be great.
>
> Regards,
> Matthias

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"It is an unfortunate fact that every man who seeks to disseminate knowledge 
must contend not only against ignorance itself, but against false instruction 
as well. No sooner do we deem ourselves free from a particularly gross 
superstition, than we are confronted by some enemy to learning who would set 
aside all the intellectual progress of years, and plunge us back into the 
darkness of medieval disbelief."

-HP Lovecraft

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php shell scripting

2003-12-10 Thread Evan Nemerson
On Thursday 11 December 2003 12:31 am, Jake McHenry wrote:
> Does anyone know how I can pass variables into a script being executed
> from the command line?
>
> I have a script, named testscript. So far, I have been getting all my
> variables from the system env command, not a big deal. But I want to
> input a username into the script, like testscript jmchenry.
>
> In basic shell scripting, the value of any parameters would be $1, $2,
> $3, etc.. within the script, but how can I do this with PHP? Is it
> even possible?

var_dump($argv);

>
> Thanks,
>
> Jake McHenry
> Nittany Travel MIS Coordinator
> http://www.nittanytravel.com

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety."

-Benjamin Franklin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Compiling...hellllp!

2003-12-10 Thread Evan Nemerson
On Wednesday 10 December 2003 08:23 pm, Ryan A wrote:
> Hi,
>
> Its been quite some time since I have done any compiling, the last time was
> java and before that C...which was years back.
>
> I want to install Turck MMCache for php on one of our new dedicated servers
> as we will be running a crapload of scripts there...differient
> applications...we estimate around 2k - 4k or even a few more scripts

honestly, i've never run turck, but the build process seems rather standard.

>
> I myself have been working on a windows machine for a lonnng time (yes, i
> said windows, you *unix users can stop spitting) and really have no idea
> about "compiling" MMCache...can anybody tell me how to do it please? and
> what i'll need?

I'm going to assume you're compiling on a real OS, and your desktop is 
Windows. If not, can't really help...

>
> This is what I got from their page:
> (http://turck-mmcache.sourceforge.net/#install)
> Step 1. Compiling Turck MMCache
>  export PHP_PREFIX="/usr"
>   $PHP_PREFIX/bin/phpize

Odds are phpize is in your $PATH, so you can just cd into the turck directory, 
and type phpize. If not, try typing `locate phpize` to find it, then type 
/path/to/phpize instead.

>
>
> ./configure --enable-mmcache=shared
> --with-php-config=$PHP_PREFIX/bin/php-co nfig
>   make

then you move into the PHP source directory, since PHP needs to be recompiled 
with support for turck. See http://www.php.net/manual/en/installation.php

the only requirement is that you must include '--enable-mmcache=shared' as an 
argument to the configure script. If the server is already set up, you should 
do a phpinfo() to see what was sent to configure, and use that exact command 
plus the mmcache thing above. This will decrease the likelyhood of a snafu.

>
>
> Thanks,
> -Ryan
>
>
> http://Bestwebhosters.com

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"I am indeed amazed when I consider how weak my mind is and how prone to 
error. "

-Rene Descartes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Random Numbers..

2003-12-07 Thread Evan Nemerson
On Saturday 06 December 2003 10:39 pm, TheHeadSage wrote:
> Hey,
>
> I've got a script which used to generate a random quote. It worked fine
> untill this problem occurred..
>
> Say we have 4 quotes with QuoteID's of 1 through to 4
> The script would grab a number of rows, and generate a random number
> between 1 and this value (being 4 in this case) This worked fine untill,
> one of the quotes was removed and another added, leaving 4 quotes once
> again, but the last one had an ID of 5. The problem is the Random number
> generated is between 1 and 4, so the final quote is never shown..
>
> I tried using the RAND() function in the MySQL statement it's self, but
> it's not random enough...

Perhaps something like

SELECT quote FROM quotes ORDER BY RAND('.mt_rand().') LIMIT 1

>
> Then I thought of doing this:
>
> Select all the Quote ID's from the DB.
> Store them in an Array.
> Generate a random number between 1 and the last ID.
> If the Random Number matches a Quote ID, then display the quote,
> otherwise Generate another

Wow, sounds complicated. How about

shuffle($quotes);
echo $quotes[0];

but much better speed-wise to do it from the DB.

>
> But I couldn't get the code to work. Any suggestions on either how to
> write the above, or made the MySQL RAND() function, more random?

um, yeah.

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"A popular government, without popular information, or the means of acquiring 
it, is but a Prologue to a Farce or a Tragedy - or perhaps both. Knowledge 
will forever govern ignorance, and a people who mean to be their own 
Governors must arm themselves with the power which knowledge gives."

-James Madison

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can I request ?

2003-12-07 Thread Evan Nemerson
On Sunday 07 December 2003 11:33 am, playerfr wrote:
> Hi,
>
> I am using a PHPBB to have forum and site in php and i need a little script
> , can i request it here or do you know an otehr group where i can request
> it.

Uh, you can request help writing the script here when you hit a wall, but it's 
not really a good idea to ask someone to do it for you, unless you're going 
to pay them. If you want to pay someone, this is a great place to find 
experienced coders...

>
> Thnaks

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"I am indeed amazed when I consider how weak my mind is and how prone to 
error. "

-Rene Descartes


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Comment alignment in config.m4

2003-12-05 Thread Evan Nemerson
On Thursday 04 December 2003 09:59 pm, Anas Mughal wrote:
> In config.m4, what does "Make sure that the comment is aligned" mean?
> What should it be aligned to?
>
There should be an certain number of characters before the "Enable my_module 
support" text, and a certain number (2) of spaces before the --enable-x, or 
it will be totally out of place compared to the other modules. Try putting 
ten spaces between the '[' and the '--enable-my_module', run buildconf, then 
see what happens when you do a configure --help

PS pecl-dev would probably be a bit more appropriate for this question.
>
> Is this correct:
>
> PHP_ARG_ENABLE(my_module, whether to enable my_module support,
> dnl Make sure that the comment is aligned:
>  [  --enable-my_module   Enable my_module support])
>
>
>
> Or, is this correct:
>
> PHP_ARG_ENABLE(my_module, whether to enable my_module support,
> dnl Make sure that the comment is aligned:
> [  --enable-my_module   Enable my_module support])
>
>
> Thank you in advance.

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] xml parser und bestehende variablen - multilinguale app

2003-11-23 Thread Evan Nemerson
How are you parsing the XML? If you read the values into a PHP variable, and 
you're confident in the contents of the string, you could use eval()... Also, 
preg_replace_callback() may be useful.

If you provide a bit more example, it may be more easy to help. In any case, I 
think your variable variables are a bit out of whack. Read 
http://us3.php.net/manual/en/language.variables.variable.php

That may be your problem if it's outputting something like 'beispiel ', and 
not 'beispiel $no'. Try doing error_reporting(E_ALL) and see what happens.

-

Babelfish says...

(my reply:)
Wie analysieren Sie das XML? Wenn Sie die Werte in eine PHP Variable lesen und 
Sie im Inhalt der Zeichenkette überzeugt sind, konnten Sie eval() benutzen... 
Auch preg_replace_callback() kann nützlich sein.

Wenn Sie eine Spitze mehr Beispiel zur Verfügung stellen, zu helfen kann 
einfacher sein. In jedem möglichem Fall denke ich, daß Ihre variablen 
Variablen eine Spitze aus whack heraus sind. Lesen Sie 
http://us3.php.net/manual/en/language.variables.variable.php

Das kann Ihr Problem, wenn es etwas wie ' beispiel ' ausgibt, und nicht ' 
beispiel $no'. Versuchen Sie, error_reporting(E_ALL) zu tun und sehen Sie, 
was geschieht.

(orignal message:)
Hello together,

I would like to offer gladly my existing app in several languages. In addition 
I have me xml more parser package installed a which in the situation am out 
xml files of contents to be inserted.

To the Bsp xml the file looks in such a way: 

example
beispiel

Functions so far. The PROBLEM however is, if I have a varible within this text 
and not everything to carve up liked, does not parst php these contents. 

Example: $$no = 10;
example ' $no.'
beispiel ' $no.'

In this case one gets the contents of the variable not indicated, but einfahc 
the ' $no.' stringer.

What there can one do? I can not possibly all write the text split up. That 
out page into one xml file is completely practically above all if it several 
languages become.

Here does someone have a good taps?

thank you in advance,

Andy


-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"If there is no higher reason--and there is none--then my own reason must be 
the supreme judge of my life."

-Leo Nikolaevich Tolstoy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] fighting with functions

2003-11-21 Thread Evan Nemerson
First off, please try to refrain from cross-posting, especially to that 
degree.

I'm not sure I interpreted the your intentions correctly. If not, could you 
try to be a little more precise in saying what you _want_ the code to do?

The first thing that jumps out at me is in the function getTax. Shouldn't it 
be getTax($value)? As you have it, value will be unset (search for variable 
scope in the manual). I think this may be what you're going for:

function getTax($value) {
return ($value * 0.065);
}

Next, the list construct will only work with numeric arrays, not associative 
ones. In other words, it has to look like array('one', 'two'), not 
array('one' => 'two', 'three' => 'four')

Next the way you have it set up, $mypurchases can only contain one set of 
three items. I don't get the logic of how car, pencil, and book map to $key, 
$value, and $tax Maybe you were going for

$mypurchases = array(
'car' => 15000,
'pencil' => 1,
'book' => 14.95);
$total = 0;
echo 'ItemCost';
echo 'TaxRunning Total';
foreach ( $mypurchases as $key => $value) {
$total += $value + ($tax = getTax($value));
// assuming you want the table in HTML, since you have a ...
echo "{$key}{$value}";
echo "{$tax}{$total}\n";
}
echo '';

???

I'm going to ignore the getBalance function because I don't think it's 
required. But you realize your declaring a static variable, then trying to 
assign a different value to it on the very next line?




On Friday 21 November 2003 01:56 am, Sara Daugherty wrote:
> I could use a little help. click on the link to see my php code for a
> project that creates an array with a list or items and their cost and
> calculates tax by using a function called getTax() and also creates a
> balance by adding the cost plus the tax in a second function called
> getBalance(). I must also create a table where the cells automatically
> load so the end result looks like this.
> http://www.areawebdirectory.net/taxtable2.txt
>
>
> Item  Cost  Tax  Running Total
> Car  1.00600  10600.00
> Pencil   1.00   .0610601.06
> Book14.95 .097 10616.98
>
>
> I cant seem to first be able to declare my array and succeed at naming
> the key as item and the value as price. I have attempted to use
> variations of the following with no success.
>
> $items = array (
> 0 => array ("item"=>"car","price"=>15000, "tax"=>.065 ),
> 1 => array ("item"=>"pencil","price"=>1, "tax"=>.065 ),
> 2 => array ("item"=>"book","price"=>14.95, "tax"=>.065)
> );
>
> Without being able to declare the key as item and the value as price I
> am not sure how to pass these items into my function and I am riddled
> with error messages. I think my base problem is to either fix how I am
> declaring the array so I may reference "item" and "price" as I am now
> doing in my functions or learn how to change the functions accordingly.
>
> I am also pretty sure that my functions are not quite right. I am also
> not sure how to link the right answers to get my table to print as above.
>
> Please note that I have included a while loop after my array just to
> prove that my array is working. It is needed part of my program. I also
> have given each cell in my table some text just so I can find them when
> I have figured out how to create the right reference links.
>
> I am sorry that I need as much help with this. Sadly I have been at this
> for almost two weeks trying to solve it.
>
> Thanks,
> Sara

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"Truth, like gold, is to be obtained not by its growth, but by washing away 
from it all that is not gold. "

-Leo Nikolaevich Tolstoy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XML Parsing....

2003-11-21 Thread Evan Nemerson
On Thursday 20 November 2003 08:18 am, Scott Fletcher wrote:
> Hi Everyone!
>
> I'm having a little trouble understanding how exactly to use the XML
> parser.  I haven't found the right settings to set up the XML Parser's
> option because of no definition of the encoding setting in the XML tags I
> received.  So, I'll post the script here and hope to get some feedback on
> this...
>
>
> --snip--
>  $data = "";
>  //Lots of XML tags goes here but is taken out for shorter
> scripting
>  $data = "  ";
>  //Lots of other XML tags goes here but is taken out for
> shorter scripting
>  $data = "  ]]>";
>  //Lots of other XML tags goes here but is taken out for
> shorter scripting
>  $data .= "";
>
>  $parser = xml_parser_create('ISO-8859-1');
>  xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
>  xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
>  xml_parse_into_struct($parser, $data, $vals, $index);
>  xml_parser_free($parser);
> --snip--
>
> The problem here is that I have like two different XML encoding
> format

Do you actually have data in two diferent formats in the same XML file, or can 
you just change xml_parser_create to UTF-8 and be done with it? Does the XML 
standard even allow multiple encodings???

>
> Thanks,
>  Scott

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"The greatest mistake is to imagine that the human being is an autonomous 
individual. The secret freedom which you can supposedly enjoy under a 
despotic government is nonsense, because your thoughts are never entirely 
your own. Philosophers, writers, artists, even scientists, not only need 
encouragement and an audience, they need constant stimulation from other 
people. It is almost impossible to think without talking. If Defoe had really 
lived on a desert island, he could not have written Robinson Crusoe, nor 
would he have wanted to. Take away freedom of speech, and the creative 
faculties dry up."

-George Orwell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] On-the-fly encryption

2003-11-21 Thread Evan Nemerson
On Wednesday 19 November 2003 09:43 am, Ray wrote:
> I want to do two-way encryption on a file coming through the web server. 
> In this context, I would want to generate a public and private key, encrypt

Do you have any idea how much time and (and entropy) is required to create a 
reasonably strong keypair?

> the file stream (i.e., don't want to write the unencrypted file to disk

That's virtually impossible with modern operating systems. They are mysterious 
beasts that will often write data to hard drive when you don't want it to. 
Swap files are a particularly good example of how it happens.

> first and then encrypt it; I want to encrypt the stream as it comes in)
> with the public, send the private to the recipient, and then destroy both
> keys on my end.

You can play with popen and pipes (even named pipes could be useful), but 
seriously there's going to be data written to disk. IMHO you'd be much better 
off just writing the data in a predictable manner, then using something like 
THC's SecureDelete.

>
> When the file was accessed and the private key was provided, I would want
> to stream the unencrypted file out without ever writing the unencrypted
> file to disk.

man gpg
(hint: -o or --output)

>
> Any ideas on how to accomplish this within the PHP construct?

man gpg

Now, where exactly do you gain security over using a symetric-key system? 
You're really just forcing the user to save the passphrase and private key... 
Just encrypt the file with AES/Twofish/IDEA/3DES/ad/nauseum, and tell the 
user the passphrase.

Furthermore, all the encrypted storage in the world isn't going to do you much 
good when you're transmitting stuff in cleartext. Someone is going to fire up 
dsniff/snort/whatever and get all the goods without ever bothering to break 
into your box.

I don't know what problem you're trying to solve, so I won't suggest an 
alternative course of action, but if you'd like to send your problem to the 
list, I (and probably others) would be happy to suggest alternatives.

>
> Thanks!

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"The public have an insatiable curiosity to know everything. Except what is 
worth knowing. Journalism, conscious of this, and having tradesman-like 
habits, supplies their demands."

-Oscar Wilde

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mcrypt libraries?

2003-11-18 Thread Evan Nemerson
On Tuesday 18 November 2003 01:13 pm, Jas wrote:
> Curt Zirzow wrote:
> > * Thus wrote Jas ([EMAIL PROTECTED]):
> >>I am not sure if I should post my question here but I will anyways.
> >>
> >>Ok, I have compiled the mcrypt libraries on a Redhat 9 box running
> >>apache 2 with php4.  And I need to know the next step(s) in getting php
> >>to use the libmcrypt libraries.  If anyone has set this up in the past
> >>or has some pointers (other than reading the manual) I would appreciate
> >> it.
> >
> > Did you read the next step: Installation
> >   http://php.net/mcrypt
> >
> >
> > Curt
>
> Yes I have and I guess I was looking for a method of using the libmcrypt
> library without having to recompile php. Sorry for the confusion.

Have you tried using phpize?


-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"To think is to differ."

-Clarence Darrow

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cannot bind to port 80

2003-11-12 Thread Evan Nemerson
On Wednesday 12 November 2003 10:11 pm, Teren wrote:
> Hi, I recently upgraded my box to php 4.3.4 and i copied the current
> configure line and then ran it in the un-tared directory. I ran make, then
> make install. I tried to restart apache and it wouldn't restart. Any ideas?

Sounds like something is still playing with port 80. netstat, ps, nmap, and 
hping2 are your friends.

> I tried the things that were on google but those didn't work. The apache
> error log said it couldn't bind to port 80, but i'm 100% sure it's the php

Why? Is there something you're not telling us?

> upgrade problem, not apache. Thanks
>
> Teren

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"If anyone can show me, and prove to me, that I am wrong in thought or deed, I 
will gladly change. I seek the truth, which never yet hurt anybody. It is 
only persistence in self-delusion and ignorance which does harm."

-Marcus Aurelius

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] First test release of BTportal made!!!!

2003-11-12 Thread Evan Nemerson
On Wednesday 12 November 2003 12:24 am, Jason Wong wrote:
> On Tuesday 11 November 2003 20:11, Burhan Khalid wrote:
> > Bas wrote:
> > > It's avaiable on:
> > >
> > > http://members.home.nl/famde.jong/portalBT-0.0.1.zip
> >
> > Get your own list. php.general is not your personal announcement list.
>
> I think there's some double standards here :-)
>
> It seems to be generally acceptable to have PHP-related product
> announcements on the list.
>
> The honest truth Bas, if you're reading this, is that announcements for
> heavyweight, respected products are OK on this list. For products like
> portalBT (and BTML), I don't think many (any?) people are interested.

I sent this in private yesterday (?), but I suppose it's appropriate... As 
long as people put [ANNOUNCE] in the subject, most people seem to be 
pro-accouncements.

http://marc.theaimsgroup.com/?l=php-general&m=106567228019195&w=2

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"I am indeed amazed when I consider how weak my mind is and how prone to 
error. "

-Rene Descartes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] recursive acronym - PHP

2003-11-02 Thread Evan Nemerson
How can you forget the Hurd???

http://www.gnu.org/software/hurd/hurd.html#name:

"According to Thomas Bushnell, BSG, the primary architect of the Hurd:

`Hurd' stands for `Hird of Unix-Replacing Daemons'. And, then, `Hird' stands 
for `Hurd of Interfaces Representing Depth'. We have here, to my knowledge, 
the first software to be named by a pair of mutually recursive acronyms."


On Saturday 01 November 2003 11:23 am, [EMAIL PROTECTED] wrote:
> Why PHP is a recursive acronym?, I know that before was called Personal
> Home Page, I now is Hypertext PreProcessor, but why is recursive?, I person
> told me that it could be wroten as Pre Hypertxt Processor, thanks.

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"Businesses may come and go, but religion will last forever, for in no other 
endeavor does the consumer blame himself for product failure."

-Harvard Lamphoon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Favorite Online Language Guide

2003-10-29 Thread Evan Nemerson
The php.net site is great. It has a manual in tons of languages which is very 
easy to get at. For instance, to look up the file function, you can just go 
to php.net/file. Your language should be automagically detected. The user 
comments fill in any blanks in the documentation.

php.net/language.basic-syntax has a syntax guide



On Wednesday 29 October 2003 01:40 pm, Robb Kerr wrote:
> What's your favorite online Php language guide? I'm a newbie and most
> interested in a syntax guide.
>
> Thanx,

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"If you would be a real seeker after truth, you must at least once in your 
life doubt, as far as possible, all things."

-Rene Descartes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Parsing a tab delimited log file

2003-10-29 Thread Evan Nemerson
You're using a lot of memory here... Try using fgets for each line instead of 
one big file(). That way, you're only working with one line at a time and can 
forget it when you're done.


On Wednesday 29 October 2003 01:12 pm, John wrote:
> (I'm reposting this as it didn't seem to take the first time. If it's a
> dupe, I apologize.)
>
> Hey all. I'm attempting to count the number of unique message IDs from a
> Microsoft Exchange 2000 tracking log. While the code below works, it takes
> forever to run. Running through a 16mb log file takes like 10 minutes.
>
> If anyone could suggest a better way of doing this, that would be great.
> Also, below the PHP code, is an example of an Exchange tracking log (Which
> is tab delimited).
>
> Thanks in advance for the help.
>
> John
>
> Here is the code I'm using:
>
>  ini_set("max_execution_time", 1200);
> $filename="20031025.log";
>
> $file=file($filename, "r");
>
> $count=count($file);
>
> $array=array();
>
> //first 6 lines of the log are header and empty lines
> $i=5;
> while ($i<=$count)
> {
>
> $line=explode("\t",$file[$i]);
>
> //the MSGID is always the ninth entry in the array
> $data=$line[9];
>
> //Exchange puts a blank line between each entry in the log file, this
> creates an empty entry in the array
> if (!empty($data))
> {
> if (!in_array ($data, $array))
> $array[]=$data;
> }
>
> $i++;
> }
>
> $arraycount=count($array);
> echo $arraycount,"";
> ?>
>
> Here is an example of the Exchange tracking logs:
>
> 2003-10-26  0:0:35 GMT  10.0.0.1file-server -
> Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1019
> [EMAIL PROTECTED]0   0   799
> 1   2003-10-26 0:0:35 GMT   0   Version: 5.0.2195.5329  -   -
> [EMAIL PROTECTED]-
>
> 2003-10-26  0:0:35 GMT  10.0.0.1file-server -
> Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1025
> [EMAIL PROTECTED]0   0   799
> 1   2003-10-26 0:0:35 GMT   0   Version: 5.0.2195.5329  -   -
> [EMAIL PROTECTED]-
>
> 2003-10-26  10:13:43 GMT-   -   -   Exchange-Server -
> [EMAIL PROTECTED] 1020
> [EMAIL PROTECTED]  0
> 0   952 1   2003-10-26 10:13:42 GMT 0   -   -   -
> [EMAIL PROTECTED]   -
>
> 2003-10-26  10:13:43 GMT-   -   SMTP-Server
> Exchange-Server -   [EMAIL PROTECTED] 1031
> [EMAIL PROTECTED]  0
> 0   952 1   2003-10-26 10:13:42 GMT 0   -   -   -
> [EMAIL PROTECTED]   -
>
> 2003-10-26  0:45:59 GMT 192.168.1.2 SMTP-Server.domain.com  -
> Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1019
> [EMAIL PROTECTED]  0   015188
> 1   2003-10-26 0:45:59 GMT  0   Version:
> 95.5329  -   -   [EMAIL PROTECTED]   -
>
> 2003-10-26  0:45:59 GMT 192.168.1.2 SMTP-Server.domain.com  -
> Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1025
> [EMAIL PROTECTED]  0   015188
> 1   2003-10-26 0:45:59 GMT  0   Version:
> 95.5329  -   -   [EMAIL PROTECTED]   -

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"Businesses may come and go, but religion will last forever, for in no other 
endeavor does the consumer blame himself for product failure."

-Harvard Lamphoon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] gzcompress/gzdeflate default compression level?

2003-10-29 Thread Evan Nemerson
On Wednesday 29 October 2003 11:29 am, Gerard Samuel wrote:
> The docs do not state what the defaults are, and from tests,
> it seems the values 4 - 9 return the same output as with no value,
> on the string I tested with.
> Does anyone know what the default compression levels are?

IIRC the default value is -1, which zlib currently converts to 6.

> Thanks

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"To think is to differ."

-Clarence Darrow

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] quotes in php.ini

2003-10-29 Thread Evan Nemerson
On Wednesday 29 October 2003 12:30 am, - Edwin - wrote:
> On Tue, 28 Oct 2003 22:05:56 -0800
>
> Evan Nemerson <[EMAIL PROTECTED]> wrote:
> > On Tuesday 28 October 2003 11:59 pm, - Edwin - wrote:
> > > Hi,
> > >
> > > On Wed, 29 Oct 2003 02:10:49 -0500
> > >
> > > Leif K-Brooks <[EMAIL PROTECTED]> wrote:
> > > > Curt Zirzow wrote:
> > > > >Try reversing the quotes:
> > > > > error_prepend_string = "";
> > > >
> > > > Not valid XHTML (not sure if it's even valid HTML).
> > >
> > > Why not?
> >
> > Because W3C says so. The closest thing I found to an answer
> > is http://www.w3.org/TR/xhtml1/#h-4.4 although I really
> > didn't dig deeply. validator.w3.org doesn't like it, tidy
> > doesn't like it. Opera doesn't like it.
>
> What "it"?

The it we're talking about- an HTML entity masquerading as a quote around an 
attribute.
>
> - E -
>
> ...[snip]...
> __
> Do You Yahoo!?
> Yahoo! BB is Broadband by Yahoo!
> http://bb.yahoo.co.jp/

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"There is a certain right by which we may deprive a man of life, but none by 
which we may deprive him of death."

-Nietzsche

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] quotes in php.ini

2003-10-29 Thread Evan Nemerson
On Tuesday 28 October 2003 11:59 pm, - Edwin - wrote:
> Hi,
>
> On Wed, 29 Oct 2003 02:10:49 -0500
>
> Leif K-Brooks <[EMAIL PROTECTED]> wrote:
> > Curt Zirzow wrote:
> > >Try reversing the quotes:
> > > error_prepend_string = "";
> >
> > Not valid XHTML (not sure if it's even valid HTML).
>
> Why not?

Because W3C says so. The closest thing I found to an answer is 
http://www.w3.org/TR/xhtml1/#h-4.4 although I really didn't dig deeply. 
validator.w3.org doesn't like it, tidy doesn't like it. Opera doesn't like 
it. I don't have IE, and am too lazy to boot up a gecko-powered browser. Even 
if it _is_ valid (which I really don't think is the case), it's not usable. I 
sincerely doubt any parsers will figure it out.
>
> - E -
> ______
> Do You Yahoo!?
> Yahoo! BB is Broadband by Yahoo!
> http://bb.yahoo.co.jp/

-- 
Evan Nemerson
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Calendar Script

2003-10-29 Thread Evan Nemerson
On Wednesday 29 October 2003 12:01 am, Vijay Killu wrote:
> Dear PHP,
>
> Where can I find the Calendar script that has been used on the PHP.net
> site. I believe I can use it on my website since it is open source :-)

>From php.net. There is a "show source" link on the bottom of every page, plus 
the entire web site is in the CVS repository. Look at php.net/anoncvs.php and 
cvs.php.net and you should be able to figure it out. If you're not familiar 
with CVS, you can always use that "show source" link.
>
> Thanks & Regards,
> ___
> PHPLover
>
> *  : [EMAIL PROTECTED]
>
> "Göd döësn't pläy dícë."
> - Älbërt Ëínstëín

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"The people are the only sure reliance for preservation of our liberty."

-Thomas Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] quotes in php.ini

2003-10-29 Thread Evan Nemerson
On Tuesday 28 October 2003 10:46 pm, [EMAIL PROTECTED] wrote:
> Evan Nemerson wrote:
> >Is anyone aware of a way to get double quotes in the php.ini file? For
> >instance, I'd like to be able to set error_prepend_string to " >color=\"#ff\">" (which doesn't work).
> >
> >The only work-around I can think of is doing ini_set()'s in an
> >auto_prepend_file, and that's not acceptable for my purposes.
>
> Try using  "  to replace double quote

Not valid (X)HTML, but it gets past the lexer.

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A popular government, without popular information, or the means of acquiring 
it, is but a Prologue to a Farce or a Tragedy - or perhaps both. Knowledge 
will forever govern ignorance, and a people who mean to be their own 
Governors must arm themselves with the power which knowledge gives."

-James Madison

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] quotes in php.ini

2003-10-29 Thread Evan Nemerson
On Tuesday 28 October 2003 11:10 pm, Leif K-Brooks wrote:
> Curt Zirzow wrote:
> >Try reversing the quotes:
> > error_prepend_string = "";
>
> Not valid XHTML (not sure if it's even valid HTML).

Yup. I've got the highlight_file thing from earlier working with ini entries, 
and I'm wondering how people are going to specify colour. I've even checked 
on HTML entities...

Just trying to cover my bases before I send to internals@

Any other ideas?

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A popular government, without popular information, or the means of acquiring 
it, is but a Prologue to a Farce or a Tragedy - or perhaps both. Knowledge 
will forever govern ignorance, and a people who mean to be their own 
Governors must arm themselves with the power which knowledge gives."

-James Madison

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] quotes in php.ini

2003-10-28 Thread Evan Nemerson
On Tuesday 28 October 2003 11:29 pm, Rolf Brusletto wrote:
> Evan Nemerson wrote:
> >Is anyone aware of a way to get double quotes in the php.ini file? For
> >instance, I'd like to be able to set error_prepend_string to " >color=\"#ff\">" (which doesn't work).
> >
> >The only work-around I can think of is doing ini_set()'s in an
> >auto_prepend_file, and that's not acceptable for my purposes.
>
> Why not use single quotes around the actual setting.. i.e.

Because I get a parse error. Does it work for you? If so, what version of PHP 
are you using???
>
> error_prepend_string = '';
>
> Rolf Brusletto
> www.phpexamples.net

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"If anyone can show me, and prove to me, that I am wrong in thought or deed, I 
will gladly change. I seek the truth, which never yet hurt anybody. It is 
only persistence in self-delusion and ignorance which does harm."

-Marcus Aurelius

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] quotes in php.ini

2003-10-28 Thread Evan Nemerson
Is anyone aware of a way to get double quotes in the php.ini file? For 
instance, I'd like to be able to set error_prepend_string to "" (which doesn't work).

The only work-around I can think of is doing ini_set()'s in an 
auto_prepend_file, and that's not acceptable for my purposes.



-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"I am indeed amazed when I consider how weak my mind is and how prone to 
error. "

-Rene Descartes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem running ./configure php-4.3.3

2003-10-28 Thread Evan Nemerson
Well I suppose the obvious first: does the file (not just the directory) 
itself exist? In the source directory, `ls main/build-defs.h.in`


On Tuesday 28 October 2003 03:09 pm, antonio scotti wrote:
> Hi,
> the command $>./configure end prematurely with the
> following message
>
> >can't find main/build-defs.h.in
>
> Any reason why this happens?
> I am installing php-4.3.3 on suse8.1/linux with
> apache2
> Also it looks like that directory privileges are ok
> "rwx"
> both for the parent diretory of main and main.
> Any help would be appreciated
> Antonio
>
> =
> ===
> PermaCultura-es
> http://www.permacultura-es.org
>
> Centro Ki Aikido Barcelona
> http://www.geocities.com/kiaikidobcn
>
> __
> Yahoo! Mail: 6MB di spazio gratuito, 30MB per i tuoi allegati, l'antivirus,
> il filtro Anti-spam
> http://it.yahoo.com/mail_it/foot/?http://it.mail.yahoo.com/

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A leader is the wave pushed ahead by the ship."

-Leo Nikolaevich Tolstoy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How do i mod php.ini to use an outside smtp?

2003-10-28 Thread Evan Nemerson
Don't think so for PHP's mail(), but I know there are tons of classes out 
there that speak SMTP and could help you. Check PEAR first ( 
http://pear.php.net/ )


On Tuesday 28 October 2003 03:05 pm, Mike D wrote:
> php v4.12 on redhat linux 6.2.
>
> Is it possible to give a domain or ip instead of a path??
>
>   - MD

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"There is a certain right by which we may deprive a man of life, but none by 
which we may deprive him of death."

-Nietzsche

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] show_source

2003-10-28 Thread Evan Nemerson
On Tuesday 28 October 2003 12:55 pm, nathan -- wrote:
> Is there a way to stop the function show_source() from putting extra code
> at the begginning and end of the code it grabs?
> Beginning: 
> Middle: 
> End: 

Not unless you modify Zend/zend_highlight.c and recompile
>
> I am doing a str_replace to get rid of it, but it would be nice to be able
> to pass a parameter to the funtion to stop it from adding the extra code.

Anybody else have a desire for this? Or an ini entry?
>
> Thanks for your time.
> Nathan Maki
>
> _
> See when your friends are online with MSN Messenger 6.0. Download it now
> FREE! http://msnmessenger-download.com

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A popular government, without popular information, or the means of acquiring 
it, is but a Prologue to a Farce or a Tragedy - or perhaps both. Knowledge 
will forever govern ignorance, and a people who mean to be their own 
Governors must arm themselves with the power which knowledge gives."

-James Madison

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Libs?

2003-10-28 Thread Evan Nemerson
On Tuesday 28 October 2003 12:17 pm, Robert Sossomon wrote:
> Anyone know where I can get a good collection of PHP Libs (free) for PHP
> 4?  I'm looking for some that can create PDF as well as Word or others.
> Also faxing abilities and such.

Do you mean extensions to PHP, or libraries written in PHP? If the former, 
http://pecl.php.net/ if the latter, http://pear.php.net/

For PDFs, I currently reccomend FPDF from fpdf.org. It's written in PHP, which 
may or may not be what you want. For Word, you should create RTFs. Faxing I'm 
really not sure about- never looked into it.

>
> Thanks!
> Robert
>
> ~~~
> Anytime four New Yorkers get into a cab together without arguing, a bank
> robbery has just taken place.
>
> -Johnny Carson.
> ~~~~~~~

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"To achieve adjustment and sanity and the conditions that follow from them, we 
must study the structural characteristics of this world first and, then only, 
build languages of similar structure, instead of habitually ascribing to the 
world the primitive structure of our language."

-Alfred Korzybski

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SESSIONMANAGEMENT -- gute php mailing list / gute leute

2003-10-28 Thread Evan Nemerson
Babelfish:

I am on the search for a good PHP mailing list, best in German... case I here 
wrong am, please I around apology. Problem: SESSION MANAGEMENT Note! !! 
session.use_cookies=0!! (and it is to also remain) 1. Why I can not by 
$_get['lid ' ] on $_post['lid']=lf_session_id(); access? (afterwards is a 
Header("Location"... in it - > overwrites?) 2. How do I get a reasonable 
session management WITHOUT COOKIES? PHP 4.2.2 is used. With this PHP version 
that does not function, as described. Nose? (seems so, already times after 
gegoogled) session_start(); always new worth... it does not supply a session 
is taken over. 3. Tried I already also a CLASS to create, these am however 
not global attainable (after Redirect) I am for everyone tap gratefully, 
which lets me despair less. Thousand thanks! Christoph Lockingen

It seems like he's trying to write the session ID to the $_POST array, which 
reminds me of a bad idea. I think his goal is to use sessions without using 
cookies. Anybody who speaks german care to answer? Or perhaps use babelfish?




On Tuesday 28 October 2003 12:16 pm, christoph lockingen wrote:
> Hallo !
>
> Ich bin auf der Suche nach einer guten PHP Mailing-Liste, am besten in
> Deutsch...Falls ich hier falsch bin, bitte ich um Entschuldigung.
>
>
> Problem:
>
> SESSION-MANAGEMENT
>
> Achtung!
> !! session.use_cookies=0 !! (und sollen es auch bleiben)
>
> 1. Wieso kann ich nicht per $_GET['lid'] auf
>$_POST['lid']=lf_session_id();
>zugreifen? (Danach ist ein Header("Location"... drin -> der
> überschreibt?)
>
> 2. Wie bekomme ich ein vernünftiges Sessionmanagement OHNE COOKIES hin?
> Eingesetzt wird PHP 4.2.2. Bei dieser PHP-Version funktioniert das nicht,
> wie beschrieben. Bug? (scheint so, schonmal nach gegoogled)
> session_start();
> liefert immer neue werte... es wird keine session übernommen.
>
> 3. Probiert habe ich bereits auch eine CLASS zu schaffen, diese ist jedoch
> nicht global erreichbar (nach Redirect)
>
>
>
> Ich bin für jeden Tipp dankbar, der mich weniger verzweifeln läßt.
>
>
> Tausend Dank !
>
>
> Christoph Lockingen

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"The greatest mistake is to imagine that the human being is an autonomous 
individual. The secret freedom which you can supposedly enjoy under a 
despotic government is nonsense, because your thoughts are never entirely 
your own. Philosophers, writers, artists, even scientists, not only need 
encouragement and an audience, they need constant stimulation from other 
people. It is almost impossible to think without talking. If Defoe had really 
lived on a desert island, he could not have written Robinson Crusoe, nor 
would he have wanted to. Take away freedom of speech, and the creative 
faculties dry up."

-George Orwell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XML/MySQL

2003-10-26 Thread Evan Nemerson
If I were you I'd just join strings- it's much less resource intensive. Just 
make sure you're using valid XML.


On Sunday 26 October 2003 12:08 pm, Ian Williams wrote:
> Apologies to anyone also subscribed to php.xml.dev, who will have read this
> earlier, but it doesn't seem as frequently read as this news group... so I
> am reposting...
>
>
> Hi
> I want to write a function that will take any SQL query as a parameter, and
> generate XML that represents the recordset.
>
> e.g. "SELECT * FROM Customers"
>
> returns:
>
> 
> 
> 
> 
> 
>
> There are two approaches I think. One is to use the XML DOM, the other is
> simply to join lots of strings together. What is the best approach?
>
> Thanks (and this is my first post to a newsgroup, and my first post to this
> one, so excuse me if I've missed something vital!)
>
> cheers
> ian ;-)

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"The people are the only sure reliance for preservation of our liberty."

-Thomas Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Strange error in PHP 4.3.4RC2

2003-10-26 Thread Evan Nemerson
You can try Xdebug. http://www.xdebug.org/

Can you send some code to reproduce the error?



On Sunday 26 October 2003 10:24 am, Fabio Rotondo wrote:
> Hi,
>
> I am experiencing a strange error while using PHP 4.3.4RC2.
> In the apache2 log, I read:
>
> fatal: cannot realloc() 1937201923 bytes.
>
> I do NEVER try to allocate such memory.
> I think the problem is related to some serialize/unserialize() code I am
> using (in fact, removing serialize/unserialize block makes the script
> work perfectly).
> Is there anything I can do to test _exactly_ where the script bombs?
>
> Ciao,
>
>Fabio

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A leader is the wave pushed ahead by the ship."

-Leo Nikolaevich Tolstoy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Find the last friday of each month.

2003-10-26 Thread Evan Nemerson
Search for 'doomsday algorithm' on google. Once you grok it, you should be 
able to figure out the last friday quite easily.


On Sunday 26 October 2003 11:37 am, OrangeHairedBoy wrote:
> Hi all,
>
> I'm trying to write a script to get the next last friday of the month and I
> am failing miserably. It keeps giving me October 10th. So, I scrapped it.
>
> Basically, I just want to show what the last friday of the month is, and if
> that date has already passed, show the last friday of the next month.
>
> How can I do that?

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"If you would be a real seeker after truth, you must at least once in your 
life doubt, as far as possible, all things."

-Rene Descartes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session problem

2003-10-26 Thread Evan Nemerson
Your Linux server probably has error_reporting set to 0, which is usually a 
good idea for production environments. To supress the error messages without 
modifying your php.ini, do error_reporting(0). Take a look in your php.ini 
file- the error_reporting directive will have lots of comments around it 
explaining the concept thoroughly.


On Sunday 26 October 2003 01:06 am, Manisha Sathe wrote:
> I am trying to use session but it seems it does not work on win2k server,
> the same runs on linux.
>
> following is my first php
> ---
>  session_start();
> $_SESSION["name"]= "Manisha";
> ?>
> --
> following is the second php
>
>  session_start();
> echo $_SESSION["name"];
> ?>
>
> -
>
> but it is always giving me following error msg
>
> Notice: Undefined index: name in C:\Project Codes\www\testPHP\second.php on
> line 6
>
> 
>
> The same thing works well on live Linux server. I checked php.ini options
> such as session enable / register global etc - both r same. Please help 
> me. Is it a problem with win2k server or did i miss out any thing in
> php.ini ?
>
> Regards
> Manisha

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"The people are the only sure reliance for preservation of our liberty."

-Thomas Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session problem

2003-10-26 Thread Evan Nemerson
var_dump(ini_get('variables_order'));
var_dump(isset($_SESSION));
var_dump($_SESSION);

?


On Sunday 26 October 2003 01:43 am, Manisha Sathe wrote:
> It works well on linux means it shows me o/p as 'Manisha' but on local
> Win2kserver, it gives error.
>
> I tried to make use of error_reporting(0); in second.php but then screen
> becomes blank, it does not show me the output as "Manisha"
>
> manisha
>
>
>
> "Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Your Linux server probably has error_reporting set to 0, which is usually
>
> a
>
> > good idea for production environments. To supress the error messages
>
> without
>
> > modifying your php.ini, do error_reporting(0). Take a look in your
> > php.ini file- the error_reporting directive will have lots of comments
> > around it explaining the concept thoroughly.
> >
> > On Sunday 26 October 2003 01:06 am, Manisha Sathe wrote:
> > > I am trying to use session but it seems it does not work on win2k
>
> server,
>
> > > the same runs on linux.
> > >
> > > following is my first php
> > > ---
> > >  > > session_start();
> > > $_SESSION["name"]= "Manisha";
> > > ?>
> > > --
> > > following is the second php
> > >
> > >  > > session_start();
> > > echo $_SESSION["name"];
> > > ?>
> > >
> > > -
> > >
> > > but it is always giving me following error msg
> > >
> > > Notice: Undefined index: name in C:\Project
> > > Codes\www\testPHP\second.php
>
> on
>
> > > line 6
> > >
> > > 
> > >
> > > The same thing works well on live Linux server. I checked php.ini
>
> options
>
> > > such as session enable / register global etc - both r same. Please help
> > > me. Is it a problem with win2k server or did i miss out any thing in
> > > php.ini ?
> > >
> > > Regards
> > > Manisha
> >
> > --
> > Evan Nemerson
> > [EMAIL PROTECTED]
> >
> > --
> > "The people are the only sure reliance for preservation of our liberty."
> >
> > -Thomas Jefferson

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A popular government, without popular information, or the means of acquiring 
it, is but a Prologue to a Farce or a Tragedy - or perhaps both. Knowledge 
will forever govern ignorance, and a people who mean to be their own 
Governors must arm themselves with the power which knowledge gives."

-James Madison

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] limits on variable/classname length

2003-10-25 Thread Evan Nemerson
Hmmm I _think_ it depends on size_t, which (IIRC) is typically typdef'd as an 
unsigned long int. I say that because there are macros (like ZEND_SET_SYMBOL) 
that do strlen(name) all over the place. Here's an except from limits.h:

/* Maximum value an `unsigned long int' can hold.  (Minimum is 0.)  */
#  if __WORDSIZE == 64
#   define ULONG_MAX18446744073709551615UL
#  else
#   define ULONG_MAX4294967295UL
#  endif


On Saturday 25 October 2003 09:36 pm, Greg Beaver wrote:
> Hi,
>
> Are there any limits on the length a variable or classname may be in
> PHP?  I was unable to find anything in the manual, and my tests found
> that a variable over 2000 characters long still caused no error or
> problems.
>
> This is important because phpDocumentor 2.0 will be using a database to
> cache parsed data, and I need to know how much space to allocate for the
> names of classes and other things.
>
> Greg

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"The people are the only sure reliance for preservation of our liberty."

-Thomas Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: reading/parsing file names

2003-10-25 Thread Evan Nemerson
A little something I whipped up to avoid my zoology homework (I /really/ don't 
care that the damn sperm of nematodes are unusual because they lack a 
flagellum and acrosome). Conclusion: substr is faster than preg_match

[tadpole tadpole]$ php -q ./bench.php
substr: 3.6424000263214
PCRE:   5.121386051178
substr: 3.2655299901962
PCRE:   3.8099709749222
substr: 3.2664449214935
PCRE:   3.7604590654373
substr: 3.2712109088898
PCRE:   3.7643429040909
substr: 3.496111035347
PCRE:   4.4902020692825
substr: 3.3643230199814
PCRE:   4.404403090477
substr: 3.5383290052414
PCRE:   4.0583729743958
substr: 3.3862169981003
PCRE:   5.0897340774536
substr: 4.3838140964508
PCRE:   3.887619972229
substr: 3.4568190574646
PCRE:   3.8514100313187
Averages:
substr: 3.5071199059486
pcre:   4.2237901210785
[tadpole tadpole]$ cat ./bench.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ADSI & PHP

2003-10-25 Thread Evan Nemerson
Okay I'm no expert for windows- I had to look up ADSI and found 
http://www.microsoft.com/windows2000/techinfo/howitworks/activedirectory/adsilinks.asp
which mentions LDAP.  Take a look at php.net/ldap and see if it does what you 
need.



On Saturday 25 October 2003 09:24 am, Pc Technics, Inc. wrote:
> Anyone know if its possible to use ADSI with PHP? I can not seem to find
> any good articles which explain how to convert ASP to PHP using the COM
> properties of PHP. I would really like to write this in PHP, rather than
> ASP.
>
> Thanks in advance 
>
> - Jeremy
>  Pc Technics, Inc.
>  www.pc-technics.com
>  100% FREE Internet Hosting!

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"...the whole idea of revenge and punishment is a childish daydream. Properly 
speaking, there is no such thing as revenge. Revenge is an act which you want 
to commit when you are powerless and because you are powerless: as soon as 
the sense of impotence is removed, the desire evaporates also. "

-George Orwell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] reading/parsing file names

2003-10-25 Thread Evan Nemerson
php.net/substr
php.net/ereg
php.net/preg_match

foreach ( $files as $filename )
if ( substr($filename, -4) == '.jpg' )
array_push($jpegs, $filename);

Keep in mind, though, that not all JPEG files end with jpg. There is also jpe 
and jpeg, and you have to consider case sensitivity.

On Saturday 25 October 2003 03:41 pm, koly wrote:
> my problem:
> I've got a list of files in a directory, and I'd like to get a only of
> filenames that end in ".jpg", however, exlude the files that end in
> ".thumb.jpg"
>
> ex:
> file.php
> index.htm
> photo.jpg
> photo.thumb.jpg
> etc
>
>
> how can I count only those files that end with ".jpg" ?
>
> Any help appreciated.

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"I am indeed amazed when I consider how weak my mind is and how prone to 
error. "

-Rene Descartes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Post form variables to a frame

2003-10-24 Thread Evan Nemerson
On Friday 24 October 2003 08:28 pm, Luis Lebron wrote:
> I tried that but it did not work.
>
What about javascript? There are several ways- create a form then submit it w/ 
the js, build a URI and set the frame's location, etc. If you need help with 
this I suggest a javascript forum or usenet.
>
> Luis
>
> -Original Message-
> From: Evan Nemerson [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 24, 2003 10:14 PM
> To: Luis Lebron; [EMAIL PROTECTED]
> Subject: Re: [PHP] Post form variables to a frame
>
> On Friday 24 October 2003 06:08 pm, Luis Lebron wrote:
> > How can I post a form to the left frame of a frameset. I want to have an
> > user submit a form that opens a frameset. The left frame contains the
> > results of a query based on the posted parameters.
>
> Try setting the target attribute of the form element to the name of the
> left frame.
>
> http://www.w3schools.com/tags/tag_form.asp
>
> > What I want to create is a master detail page. Let's say a person is
> > looking for a particular car. They would fill out a form. When the form
> > is submitted a frameset shows up with thumbnails and some information on
> > the car on the left frame. When the person clicks on the thumbnail, a
> > larger picture and more information shows up on the right hand frame.
> >
> > My only problem is getting the form variables to the left frame.
> >
> > thanks,
> >
> > Luis

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"God is love, Love is blind, Ray Charles is blind... Therefore, Ray Charles is 
God"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Post form variables to a frame

2003-10-24 Thread Evan Nemerson
On Friday 24 October 2003 06:08 pm, Luis Lebron wrote:
> How can I post a form to the left frame of a frameset. I want to have an
> user submit a form that opens a frameset. The left frame contains the
> results of a query based on the posted parameters.

Try setting the target attribute of the form element to the name of the left 
frame.

http://www.w3schools.com/tags/tag_form.asp
>
> What I want to create is a master detail page. Let's say a person is
> looking for a particular car. They would fill out a form. When the form is
> submitted a frameset shows up with thumbnails and some information on the
> car on the left frame. When the person clicks on the thumbnail, a larger
> picture and more information shows up on the right hand frame.
>
> My only problem is getting the form variables to the left frame.
>
> thanks,
>
> Luis

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"...the whole idea of revenge and punishment is a childish daydream. Properly 
speaking, there is no such thing as revenge. Revenge is an act which you want 
to commit when you are powerless and because you are powerless: as soon as 
the sense of impotence is removed, the desire evaporates also. "

-George Orwell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Integrating interbase.so

2003-10-24 Thread Evan Nemerson
On Friday 24 October 2003 05:58 pm, Todd Cary wrote:
> I have interbase integrated with php on my RH 9 server *BUT* I lost my
> notes on how I did it.  What I do have is interbase.so and it is in the
> /usr/lib/php4 directory.
>
> I need to setup another server and I would like to know how to integrate
> interbase with php/apache.
>
When you configure PHP, use the --with-interbase flag.

[tadpole php5]$ ./configure --help | grep interbase
  --with-interbase=DIR  Include InterBase support.  DIR is the InterBase base
  install directory, defaults to /usr/interbase

> Todd

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"He who fights too long against dragons becomes a dragon himself; and if you 
gaze too long into the abyss, the abyss will gaze into you."

-Nietzche

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Attachments with Mail()

2003-10-23 Thread Evan Nemerson
PEAR has a class which may be helpful.

http://pear.php.net/package/Mail_Mime




On Thursday 23 October 2003 04:13 am, Don Mc Nair wrote:
> Hi
>
> Can anyone tell me how to add a file as an attachment to an email sent with
> something like the following ?
>
>  $headers = "From: <".$fromaddress.">\r\n";
>  $headers .= "Reply-To: <$fromaddress>\r\n";
>mail($toaddress, $subject, $mailcontent, $headers);
>
> Thanks
> Don
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.529 / Virus Database: 324 - Release Date: 16/10/2003

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A leader is the wave pushed ahead by the ship."

-Leo Nikolaevich Tolstoy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP source display

2003-10-11 Thread Evan Nemerson
The functions Ryan is talkink about are show_source, highlight_file, and 
highlight_string, but they're a bit more work than getting *.phps files to 
work. I'm no apache wizard, and I don't know what's going on with the 
SetOutputFilter type stuff, but it's not what's in the manual at all. Take a 
look at http://www.php.net/manual/en/install.apache2.php

If you really want the stuff you've got below, perhaps php-source? That's just 
a guess, though...

Remember, Apache 2 w/ PHP is not recommended for productions boxes (IIRC, 
although PHP itself is thread safe, code the extensions bring in may not be. 
You probably won't have any problems, but no guarantees). Good luck!


On Friday 10 October 2003 12:56 pm, Ryan Thompson wrote:
> Try using the function view_source(string filename)
> That's off the top of my head. Might be wrong. It's in the documentation
>
> On Friday 10 October 2003 15:41, Lists wrote:
> > When I used apache 1.3 I could call a file with an extension of .phps and
> > it would display formatted source.
> >
> > In apache 2.0 it does not do this
> >
> > Here is my config from apache 2.0
> >
> >
> > LoadModule php4_module modules/libphp4.so
> >
> > #
> > # Cause the PHP interpreter handle files with a .php extension.
> > #
> > 
> > SetOutputFilter PHP
> > SetInputFilter PHP
> > LimitRequestBody 524288
> > 
> >
> > I have tried doing:
> >
> > 
> > SetOutputFilter PHPS
> > SetInputFilter PHPS
> > LimitRequestBody 524288
> > 
> >
> >
> > However, that does not work!
> >
> > Any ideas?
> >
> > Michael

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"If there is no higher reason--and there is none--then my own reason must be 
the supreme judge of my life."

-Leo Nikolaevich Tolstoy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PNG to GIF conversion

2003-10-11 Thread Evan Nemerson
Then try stillhq.com, as stillgq.com won't get you too far. Fourth article 
down, "Command line image procesing[sic]...".

If you would have actually read a bit of the page I sent you to, perhaps you 
would have found that out without having to ask. Your last question could have 
been answered by a quick trip to Google. Even your original question could 
have been answered by Google, or probably even the archives.

And it's "you're", not "your".  "You're" means "you are". "Your" is "The 
pronoun of the second person, in the nominative, dative, and objective case, 
indicating the person or persons addressed." (Webster's Revised Unabridged 
Dictionary 1913). And believe it or not, the shift key is there for a reason.

Have a nice day.



On Saturday 11 October 2003 02:14 pm, John Ryan wrote:
> and i cant see the article your talking about on stillgq.com
>
> "Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Well there's a stand alone program called ImageMagick
> >
> > Michael Still wrote an article on it which may be useful. There should
>
> still
>
> > be a link for it on the main page @ stillhq.com
> >
> > On Saturday 11 October 2003 01:50 pm, John Ryan wrote:
> > > How do I do this?? I have the latest version of GD with PNG, but no
> > > GIF. But I *have to* be able to convert images to gif. Is there any
>
> standalone
>
> > > php script that'll do it, or a cgi???
> >
> > --
> > Evan Nemerson
> > [EMAIL PROTECTED]
> >
> > --
> > "If you would be a real seeker after truth, you must at least once in
> > your life doubt, as far as possible, all things."
> >
> > -Rene Descartes

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A people who mean to be their own governors, must arm themselves with the 
power knowledge gives."

-James Madison

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PNG to GIF conversion

2003-10-11 Thread Evan Nemerson
Yes.


On Saturday 11 October 2003 02:13 pm, John Ryan wrote:
> no, i mean a on-the-fly conversion in php. unless its a unix program... is
> it?
>
> "Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Well there's a stand alone program called ImageMagick
> >
> > Michael Still wrote an article on it which may be useful. There should
>
> still
>
> > be a link for it on the main page @ stillhq.com
> >
> > On Saturday 11 October 2003 01:50 pm, John Ryan wrote:
> > > How do I do this?? I have the latest version of GD with PNG, but no
> > > GIF. But I *have to* be able to convert images to gif. Is there any
>
> standalone
>
> > > php script that'll do it, or a cgi???
> >
> > --
> > Evan Nemerson
> > [EMAIL PROTECTED]
> >
> > --
> > "If you would be a real seeker after truth, you must at least once in
> > your life doubt, as far as possible, all things."
> >
> > -Rene Descartes

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A leader is the wave pushed ahead by the ship."

-Leo Nikolaevich Tolstoy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PNG to GIF conversion

2003-10-11 Thread Evan Nemerson
Well there's a stand alone program called ImageMagick

Michael Still wrote an article on it which may be useful. There should still 
be a link for it on the main page @ stillhq.com



On Saturday 11 October 2003 01:50 pm, John Ryan wrote:
> How do I do this?? I have the latest version of GD with PNG, but no GIF.
> But I *have to* be able to convert images to gif. Is there any standalone
> php script that'll do it, or a cgi???

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"If you would be a real seeker after truth, you must at least once in your 
life doubt, as far as possible, all things."

-Rene Descartes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Need Charting Utility

2003-10-09 Thread Evan Nemerson
JPGraph does pretty much anything you could ever want.


On Thursday 09 October 2003 11:30 am, rick rice wrote:
> Can anyone suggest a good charting utility for PHP running on a freeBSD
> box? We need to put line/bar charts on our web pages.

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"First they came for the Communists, and I didn't speak up, because I wasn't a 
Communist. Then they came for the Jews, and I didn't speak up, because I 
wasn't a Jew. Then they came for the Catholics, and I didn't speak up, 
because I was a Protestant. Then they came for me, and by that time there was 
no one left to speak up for me."

-Martin Niemoller

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Multiple PHP modules

2003-10-09 Thread Evan Nemerson
With a bit of httpd.conf wizardry, I believe so. Just put the the LoadModule 
and AddType stuff inside the  containers. PHP5 is libphp5.so, 
PHP4 is libphp4.so

I haven't tried it, but it should work.


On Wednesday 08 October 2003 11:33 pm, Ryan Thompson wrote:
> Just a quick question. I don't think it's possible but worth a try
>
> Is it possible to load two different PHP modules in apache having them
> linked to different virtual hosts? I'm hoping I can run one site with PHP 5
> and another with 4.3.x

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"If you would be a real seeker after truth, you must at least once in your 
life doubt, as far as possible, all things."

-Rene Descartes

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] want to restart session after time out

2003-10-09 Thread Evan Nemerson
On Wednesday 08 October 2003 11:23 pm, Manisha Sathe wrote:
> thanks all,
>
> If session has to time out  then in that case what shall i do in following
> case ?

Just have them log-in again.

>
> I have a login page, user logins and starts playing (it is a on line game
> site), for each action (he tells something to do), i need to check whether
> he is login (i.e session on), if yes, then take all session vars and act
> accordingly. So do u mean to say that i need to ask for login again if i do
> not find any session? Is it a normal practice to do ?

Yes. Users rarely complain about coming back to their computer an hour later 
and having been logged out. Keep in mind that this is 30 minutes of 
inactivity, not 30 minutes total. The user can be logged in for hours, so 
long as they are using the session.

>
> I always wonder what will happen if the user is half way - running some PHP
> script at back which calls another script in turn and session ends in
> between? May be this question will be very basic, but i always get confuse.

Sorry I don't see what you're asking... could you try to re-phrase it?

>
> I know bit of ASP. I remember it is having something like 'On Session End'
> event hadler. but  PHP does not have some thing like this ?

I'm assuming that just lets you provide code to execute after the session 
ends. To the best of my knowledge, it doesn't. Then again, I don't think it 
would be a good idea. Lots of extra overhead, and you shouldn't need a 
cleanup function if you write the code correctly. Data should be written to 
the DB periodically throughout the session, not at the end. What exactly 
would you have this code do?

>
> Regards,
> Manisha
>
>
>
> "Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Comments inline
> >
> > On Wednesday 08 October 2003 10:23 pm, Chris Shiflett wrote:
> > > --- Evan Nemerson <[EMAIL PROTECTED]> wrote:
> > > > Well you can change the default from 30 mins to something larger,
> > > > but that has security consequences...
> > >
> > > I am speaking to myself as much as anyone, but we should all try to
>
> develop
>
> > > the habit of explaining any such "consequences" that we mention. To do
> > > otherwise doesn't really educate the many people who read these
>
> responses,
>
> > > whether now or in an archive. It only adds to the mystery of certain
>
> topics
>
> > > (such as security).
> >
> > Well, they _can_ always ask if they don't understand. I agree that it's
>
> best
>
> > to give as much information as possible, but that takes a LOT of time. If
>
> we
>
> > don't assume any prior knowledge, answering anything would be a huge
> > pain.
> >
> > That being said, I agree that in this case I should have elaborated...
>
> It's
>
> > probably a reach for a lot of list readers.
> >
> > If you have long sessions, the likelyhood that someone will be able to
>
> steal
>
> > the session ID and imitate the user increases drastically. It's called
> > session hijacking, and any google search (or archive search, probably)
>
> will
>
> > yield a wealth of information.
> >
> > > > Sessions are kind of a hack over HTTP, which is pretty much a
> > > > stateless protocol. There's Connection: keep-alive, but not every
> > > > browser supports it, and I don't think there's a way to hook into it
> > > > from PHP.
> > >
> > > Well, persistent connections aren't really intended to provide stateful
> > > transactions (and they don't).
> >
> > They most certainly are not, but if they could _theoretically_ be used
>
> that
>
> > way. Practicality, however, forbids it. IMO it's a Bad Idea, but still
>
> worth
>
> > mentioning. Actually, now I'm thinking about writing a POC just to see if
>
> it
>
> > can be done, even in a laboratory setting.
> >
> > > My favorite example to use is Google, because there are two resources
>
> that
>
> > > make up the front page: the HTML and the logo. With previous versions
> > > of HTTP, unless a persistent connection was specifically requested, a
>
> separate
>
> > > TCP connection was established for each transaction. This meant two TCP
> > > connections would be created and destroyed just to render Google.
>
> Imagine
>
> > > more elaborate sites, and you can see how this can really cause
>
> performance
>
> > >

  1   2   3   4   >