OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 22 Jul 2004 18:59:35 -0000 Issue 2892

php-general-digest-helplists.php.net
Date: Thu Jul 22 2004 - 13:59:35 CDT


php-general Digest 22 Jul 2004 18:59:35 -0000 Issue 2892

Topics (messages 191483 through 191555):

Re: change value of session variable?
        191483 by: Five
        191545 by: Ford, Mike [LSS]

Preventing static method calls in PHP4
        191484 by: Marcus Bointon
        191501 by: Jason Barnett
        191505 by: Marcus Bointon
        191541 by: Justin Patrin

adding *** on email address upon view
        191485 by: Louie Miranda
        191503 by: Jason Wong
        191514 by: Jules

Most Efficient Query
        191486 by: Monty
        191494 by: David Robley

Efficient way to filter this string
        191487 by: C.F. Scheidecker Antunes
        191489 by: Rory McKinley
        191492 by: Steve Edberg

Table in word document
        191488 by: Roman Duriancik
        191493 by: Marek Kilimajer
        191510 by: Marek Kilimajer

Re: using exec/system function within php/apache app
        191490 by: David Robley

Re: trim() white space from record set
        191491 by: David Robley

Re: template and file read
        191495 by: Jason Barnett

Re: Unable To Gain Access to "phpMyAdmin" Through Internet Browser
        191496 by: Harlequin
        191499 by: Torsten Roehr

DirectoryIterator
        191497 by: Jason Barnett

Re: How to use reflection API?
        191498 by: Jason Barnett

run perl script with php
        191500 by: Tassos T
        191504 by: Ulitin S.S.
        191506 by: Marcus Bointon
        191507 by: John W. Holmes
        191515 by: Fernando Michelotti
        191519 by: Matt M.
        191523 by: bruce
        191530 by: raditha dissanayake

Re: what is difference between php and perl
        191502 by: php-list.xenonsolutions.com
        191509 by: Jurgen Stroo
        191543 by: Justin Patrin
        191546 by: Jason Davidson
        191548 by: Curt Zirzow
        191549 by: Dan Joseph
        191550 by: Justin Patrin

Re: PHP 5 and Implicit cloning
        191508 by: Jason Barnett
        191513 by: Jules
        191518 by: Jason Barnett

Re: PHP5 - Weird Error - "cannot find element in variable"
        191511 by: Jason Barnett

Re: Project-browser-function / required/included
        191512 by: Jason Barnett
        191537 by: Frank Munch

Re: newbie needs help in getting php and MySQL integrated
        191516 by: Chris Hunt

Re: Zend Enc and 0T Q
        191517 by: PHP Gen

Alternative to file_exists()???
        191520 by: Scott Fletcher
        191522 by: Matt M.

Re: mailing list spam protection?
        191521 by: bruce
        191524 by: Skippy

searching through 2 text files
        191525 by: alantodd
        191527 by: Torsten Roehr

background="#"
        191526 by: Tobias Brasier
        191528 by: James E Hicks III
        191529 by: Torsten Roehr
        191531 by: Michael Sims
        191532 by: raditha dissanayake

mutiple copies of php with windows iis6
        191533 by: Petar [Lists]
        191534 by: Matt M.
        191535 by: Petar [Lists]

Trouble with sin()
        191536 by: Marcus Strube
        191538 by: Ashwin Purohit
        191539 by: Ashwin Purohit
        191540 by: Marcus Strube
        191555 by: Jonathan Haddad

looking for return status code workaround with pclose() and proc_close()
        191542 by: Jolyon Terwilliger
        191544 by: Jolyon Terwilliger

interesting problem with zlib/ob_gzhandler compression
        191547 by: Christian Calloway

postfix with PHP on Mac OS X
        191551 by: PHP Junkie
        191552 by: Jason Wong
        191553 by: Justin Patrin
        191554 by: PHP Junkie

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


>Sounds like an old bug in PHP. What version are you using?

I've been trying to get it to work at:
http://members.lycos.co.uk/primeooze/info.php

I also have ( apache/php 4.3.4/mysql ) installed on my computer and I get much more satisfactory results on it.
I have made progress and some of my confusion on the subject has been cleared up so I'll just keep at it and see what happens.

Thanks for your help

attached mail follows:


On 22 July 2004 07:50, Five wrote:

> > Sounds like an old bug in PHP. What version are you using?
>
> I've been trying to get it to work at:
> http://members.lycos.co.uk/primeooze/info.php

According to this phpinfo(), that site has session.use_cookies=On and session.use_trans_sid=Off. This means that the simple Blue/Green test that has been bandied about here won't work for anyone who is not accepting cookies. Hence, John Holmes's question

  "Are you sure you're accepting the cookie? How are you sure?"

is extremely relevant.

> I also have ( apache/php 4.3.4/mysql ) installed on my
> computer and I get much more satisfactory results on it.

Does that installation have session.use_trans_sid=On? If so, another of John's questions is relevant:

   "If you see an SID in the URL when navigating the pages, does it stay the same between
pages or change?"

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: m.fordleedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

attached mail follows:


[repost, not sure if it worked last time]

If I want to prevent a method from being called statically in PHP4, how can
I do it? So far I've tried these techniques:

<?php
class A {
var $Anotstatic;
  function A() {
    $this->Anotstatic = true;
  }
  function dynamic() {
    if (!isset($this) or !is_a($this, 'A') or !(isset($this->Anotstatic) and
$this->Anotstatic))
        echo "Method called statically\n";
    else
        echo "dynamic-only function\n";
  }
  function test ()
  {
     A::dynamic();
  }
}

class B {
function test() {
  A::dynamic();
}
}

$a = new A();
$a->dynamic();
A::dynamic();
$b = new B;
$b->test();
$a->test();
?>

This works for the first 3 tests (so I'm getting there), but not the fourth,
that is a dynamic method being called statically from an instance of the
same class. Is there something I've missed that will allow me to intercept
this style of call?

I know that this problem goes away in PHP5, and that the setting of $this in
static calls from other instances is not a bug (though it's the root of this
problem)!

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
marcussynchromedia.co.uk | http://www.synchromedia.co.uk

attached mail follows:


The easiest way I can think of to prevent static method calls is to use the
$this pseudo variable in your method. A method *cannot* be used statically if
the method requires use of $this.

attached mail follows:


on 22/7/04 10:49, Jason Barnett at jasbarneindiana.edu wrote:

> The easiest way I can think of to prevent static method calls is to use the
> $this pseudo variable in your method. A method *cannot* be used statically if
> the method requires use of $this.

Unfortunately that doesn't work - it is exactly the case that fails in my
example. $this IS set in a static method that's called from any object
instance (even one of a different class), and it's a PHP feature, not a bug.

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
marcussynchromedia.co.uk | http://www.synchromedia.co.uk

attached mail follows:


On Thu, 22 Jul 2004 11:26:44 +0100, Marcus Bointon
<marcussynchromedia.co.uk> wrote:
> on 22/7/04 10:49, Jason Barnett at jasbarneindiana.edu wrote:
>
> > The easiest way I can think of to prevent static method calls is to use the
> > $this pseudo variable in your method. A method *cannot* be used statically if
> > the method requires use of $this.
>
> Unfortunately that doesn't work - it is exactly the case that fails in my
> example. $this IS set in a static method that's called from any object
> instance (even one of a different class), and it's a PHP feature, not a bug.
>

If $this is set, check to see if it's of the type of the class the
static method is in. If it is, then it's not a static call.

This can be confusing because you can call methods in the current
class with the same syntax as static calls.

class A {
  function b() {

  }

  function c() {
    //this is not a static call as it's in the current class
    A::b();
  }
}

class B {
  function c() {
    //also not a static call, just forcing use of the A's c
    A::c():
  }
}

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


What command in php? can i convert certain text ex the
emailaddexample.com to emailadd***.com

--
Louie Miranda
http://www.axishift.com

attached mail follows:


On Thursday 22 July 2004 16:09, Louie Miranda wrote:

> What command in php? can i convert certain text ex the
> emailaddexample.com to emailadd***.com

If this is to protect people's email addresses then make it easy on yourself
and just discard the whole domain.

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Never say no
                -- Murphy's Laws on Sex n45
*/

attached mail follows:


Use eregi_replace to match the text between the and the "." and replace it
with the text you want. You'll have to use pattern matching which can be
tricky, but its more than possible.

Jules...

http://nl.php.net/manual/en/function.eregi-replace.php

"Louie Miranda" <lmirandagmail.com> wrote in message
news:5016fc50407220109113b5b0cmail.gmail.com...
> What command in php? can i convert certain text ex the
> emailaddexample.com to emailadd***.com
>
> --
> Louie Miranda
> http://www.axishift.com

attached mail follows:


I'm writing a simple search script in PHP and wasn't sure whether the best
way to search for the records in MySQL was this way...

  SELECT * FROM db WHERE field1 LIKE "var%" OR field2 LIKE "var%" ...

...or would it be faster and more efficient to use fulltext indexes with
MATCH() and AGAINST()? I have MySQL 3.23.58 installed on my server.

Thanks!

- Monty

attached mail follows:


On Thu, 22 Jul 2004 17:44, Monty wrote:

> I'm writing a simple search script in PHP and wasn't sure whether the best
> way to search for the records in MySQL was this way...
>
> SELECT * FROM db WHERE field1 LIKE "var%" OR field2 LIKE "var%" ...
>
> ...or would it be faster and more efficient to use fulltext indexes with
> MATCH() and AGAINST()? I have MySQL 3.23.58 installed on my server.
>
> Thanks!

Depends what you want to do - for instance fulltext search IIRC does not
support substring searches.

--
David Robley

I Have To Stop Now, My Fingers Are Getting Hoarse!

attached mail follows:


Hello,

I have an email string that sometimes has a name and the email address
between <> and sometimes has the email adress right away.

Two examples of the possible value of $address

Joe Doe <joe.doesomedomain.com>
jamie.doesomedomain.com

I need to convert this string always to the email address and discard
the name to the left of the < character, if the string is already
correct (like jamie.doesomedomain.com) then do not change it, keep it
as it is.

I have writen a function to do a for loop and check for the < then copy
everything to the end removing the >. I wonder, is there a more
efficient, clear way to accomplish this?

Thanks in advace.

attached mail follows:


C.F. Scheidecker Antunes wrote:

> Hello,
>
> I have an email string that sometimes has a name and the email address
> between <> and sometimes has the email adress right away.
>
> Two examples of the possible value of $address
>
> Joe Doe <joe.doesomedomain.com> jamie.doesomedomain.com
>
> <snip>

Off the top of my head - have you tried using a function like strrpos()
to find the last occurence of the > and use this (+ 1) as the start of
a substring? This could avoid having to loop throguh he string - e.g

$raw_address = 'Joe Doe <joe.doesomedomain.com> jamie.doesomedomain.com';

$email_address = substr($raw_address, (strrpos($raw_address, '>') + 1));

--
====================
Rory McKinley
Nebula Solutions
+27 21 555 3227 - office
+27 21 551 0676 - fax
+27 82 857 2391 - mobile
www.nebula.co.za
====================

This e-mail is intended only for the person to whom it is addressed and
may contain confidential information which may be legally privileged.
Nebula Solutions accepts no liability for any loss, expense or damage
arising from this e-mail and/or any attachments.

attached mail follows:


At 2:18 AM -0600 7/22/04, C.F. Scheidecker Antunes wrote:
>Hello,
>
>I have an email string that sometimes has a name and the email
>address between <> and sometimes has the email adress right away.
>
>Two examples of the possible value of $address
>
>Joe Doe <joe.doesomedomain.com> jamie.doesomedomain.com
>
>I need to convert this string always to the email address and
>discard the name to the left of the < character, if the string is
>already correct (like jamie.doesomedomain.com) then do not change
>it, keep it as it is.
>
>I have writen a function to do a for loop and check for the < then
>copy everything to the end removing the >. I wonder, is there a more
>efficient, clear way to accomplish this?
>
>Thanks in advace.
>

One way to do it (untested):

        $EmailAddress =
        preg_match('/<([^>]+)>/', $TestAddress, $MatchList) ?
        $MatchList[1] :
        $TestAddress
        ;

$TestAddress would be the 'Joe Doe <joe.doesomedomain.com>' or
'jamie.doesomedomain.com' string, and $EmailAddress *should* be just
the email address proper. If you want to validate the email address
further, search the archives for email validation:

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

See
        http://php.he.net/preg_match

and ternary operators in

        http://us2.php.net/language.operators

for more info.

        - steve

--
+--------------- my people are the people of the dessert, ---------------+
| Steve Edberg sbedbergucdavis.edu |
| University of California, Davis (530)754-9127 |
| Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ |
+---------------- said t e lawrence, picking up his fork ----------------+

attached mail follows:


How can I create word document with table in php. I need insert some
data from php script to the word document but i need inserted this data
to the table.

Thank you

roman

attached mail follows:


Roman Duriancik wrote:
> How can I create word document with table in php. I need insert some
> data from php script to the word document but i need inserted this data
> to the table.
>
> Thank you
>
> roman
>

Create a html file, give it .doc extension and serve it as a word file.
I hope you know how to create tables in html ;)

attached mail follows:


Please, keep the discusion on the list.

RDuriancikindprop.gov.sk wrote:
> Thank you for your answer but thsi file isn't orignal word document. I need
> insert table to existing word document.
>

Then you need to use COM functions.

>
>
> Roman Duriancik wrote:
>
>>How can I create word document with table in php. I need insert some
>>data from php script to the word document but i need inserted this data
>>to the table.
>>
>>Thank you
>>
>>roman
>>

attached mail follows:


On Thu, 22 Jul 2004 12:05, Bruce wrote:

> ok...
>
> if i simply use the shell commands "exec/system/passthru" without
> specifying a dir, ie exec("ls"), then it works. however, if i specify
> "exec('ls /foo')" where foo is another dir, then i don't get a response.
> is there someplace where i can open up the dirs/locations that the shell
> commands can operate on...????

Unless /foo is a directory immediately under the root directory, this won't
work. Remember taht if you are issuing a filesystem command, you need to
use the filesystem path, not the location relative to your server document
root. If you check the shell commands, you'll find that at least some of
them have a facility to check the return value from the command, which may
be useful for debugging.

--
David Robley

Change is inevitable, except from a vending machine.

attached mail follows:


On Thu, 22 Jul 2004 05:50, Msa wrote:

> aaah, simple for you..
>
> I have to fit that line into the following:
>
> $colauthor_rsResults = "0";
> if (isset($_GET['Author'])) {
> $colauthor_rsResults = (get_magic_quotes_gpc()) ? $_GET['Author'] :
> addslashes($_GET['Author']);
> }
>
> and don't know how to do that.....also, I am using GET....
>

So, $colauthor_rsResults is the field you want trimmed? Just do it after you
finish the If.

$colauthor_rsResults = "0";
if (isset($_GET['Author'])) {
  $colauthor_rsResults = (get_magic_quotes_gpc()) ? $_GET['Author'] :
addslashes($_GET['Author']);
}
$colauthor_rsResults =trim($colauthor_rsResults);

--
David Robley

Never enter a battle of wits unarmed.

attached mail follows:


>
>
> Is the compiler cache a function of the my web host or my code?

You can cache the PHP bytecode on the server (which is more what I meant
originally), and you can also cache in your code. For an easy example of
caching with your code you could check out PEAR's package Cache_lite.

attached mail follows:


Thanks Torsten.

I basically deleted the HTACCESS files and then put them back with an added
entry but the host in question hasn't got a clue about technical support so
I'm using another host.

Their loss.

--
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------
"Torsten Roehr" <roehrzilleon.com> wrote in message
news:20040721221712.92800.qmailpb1.pair.com...
> "Harlequin" <michael.masonarraspeople.co.uk> wrote in message
> news:20040721212002.30620.qmailpb1.pair.com...
> > Hi All. I'm hoping someone can help here because my Hosting provider's
> > technical support haven't got a clue.
> >
> > I am unable to get into my phpMyAdmin area using Internet explorer. I'm
> > challenged but cannot get in. I've tried:
> >
> > domain name FTP username and password
> > the MySQL username and password
> > I've even tried "root"
> >
> > This is dumb I know. But I need to get in.
> >
> > I have FTP access to the directory and can even open the htaccess files
> and
> > have downloaded the "config.inc.php3" file but am unsure what to change
> and
> > where.
> >
> > Can anyone help please...?
>
> I'm usually protecting my phpMyAdmin dir with a .htaccess password
> protection. Then change the following lines in config.inc.php:
>
> $cfg['PmaAbsoluteUri'] = 'http://www.yourdomain.de/phpmyadmin/';
>
> $cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or
IP
> address
> $cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication
method
> (config, http or cookie based)?
> $cfg['Servers'][$i]['user'] = 'user'; // MySQL user
> $cfg['Servers'][$i]['password'] = 'password'; // MySQL password
(only
> needed with 'config' auth_type)
>
> And this if you only have one database (otherwise leave blank):
>
> $cfg['Servers'][$i]['only_db'] = 'dbname'; // If set to a
db-name,
> only
>
> Of course you have got to change the values to your access values you got
> from your ISP.
>
>
> Hope it helps, Torsten Roehr

attached mail follows:


"Harlequin" <michael.masonarraspeople.co.uk> wrote in message
news:20040722094225.34848.qmailpb1.pair.com...
> Thanks Torsten.
>
> I basically deleted the HTACCESS files and then put them back with an
added
> entry but the host in question hasn't got a clue about technical support
so
> I'm using another host.
>
> Their loss.

That's the only sensible decision.

Good luck, Torsten

attached mail follows:


Hey guys, I'm getting some unexpected results when trying to use ArrayIterator -
but since it's undocumented this might be correct. When I use a
DirectoryIterator to traverse a directory I can't seem to create an array
containing all of the directory elements. I've tried using references as well
as clones of each object result. All I can seem to get is an array with the
right *number* of file objects, but the objects are empty.

Ultimately, I'd like to be able to get an array of all of the files in a
directory and reorder them, say, by file creation time (fileCTime).

Example code:

<?php

// Basically a DirectoryIterator with a few utility functions
class File_Linux extends DirectoryIterator {
   // Format to use for fileCTime timestamps
   const CTIME = '%c';

   function __toString()
   {
     $file = $this->current();
     return '<file>' .
            '<name>' . $file->getFileName() . '</name>' .
            '<type>' . $file->getType() . '</type>' .
            '<ctime>' . strftime(self::CTIME, $file->getCTime()) . '</ctime>' .
            '<size>' . $file->getSize() . '</size>' .
            "</file>\n";
   }

   function sortCTime(DirectoryIterator $file1, DirectoryIterator $file2)
   {
     $time1 = $file1->getCTime();
     $time2 = $file2->getCTime();
     if ($time1 == $time2) {
       return 0;
     }
     return $time1 > $time2 ? 1 : -1;
   }
}

$fm = new File_Linux('./');
echo '<pre>';

// Doesn't work - right number, put properties get lost
foreach ($fm as &$file) {
   $list[] = clone $file;
}
usort($list, array('File_Linux', 'sortCTime'));
print_r($list);

// Doesn't work either
foreach ($fm as &$file) {
   $list2[] =& $file;
}
usort($list2, array('File_Linux', 'sortCTime'));
print_r($list2);

?>

attached mail follows:


>
> See:
> http://www.php.net/manual/en/language.oop5.reflection.php
>
>
>
> Curt

Oops, hadn't seen that yet. Great!

attached mail follows:


hello,

i faced a small problem i have a perl script but i want to execute that
in a php script. unfortunately i cannot convert to php.

please advice.

regards

Tassos

attached mail follows:


"Tassos T" <nereus0freemail.gr> ???????/???????? ? ???????? ?????????:
news:40FF8C1C.7010601freemail.gr...
> hello,
>
> i faced a small problem i have a perl script but i want to execute that
> in a php script. unfortunately i cannot convert to php.

i think it is inpossible :-(

attached mail follows:


on 22/7/04 10:42, Tassos T at nereus0freemail.gr wrote:

> i faced a small problem i have a perl script but i want to execute that
> in a php script. unfortunately i cannot convert to php.

No problem, look at:

http://uk2.php.net/manual/en/function.system.php
http://uk2.php.net/manual/en/function.exec.php
http://uk2.php.net/manual/en/function.passthru.php

E.g. system('myperlscript.pl');

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
marcussynchromedia.co.uk | http://www.synchromedia.co.uk

attached mail follows:


Tassos T wrote:

> i faced a small problem i have a perl script but i want to execute that
> in a php script. unfortunately i cannot convert to php.

virtual()

--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

attached mail follows:


I never tried but i think it is possible using the pecl extension:

http://pecl.php.net/package/perl

Tassos T wrote:

> hello,
>
> i faced a small problem i have a perl script but i want to execute
> that in a php script. unfortunately i cannot convert to php.
>
> please advice.
>
> regards
>
> Tassos
>

attached mail follows:


> I never tried but i think it is possible using the pecl extension:
>
> http://pecl.php.net/package/perl

Here is a short tutorial
http://www.zend.com/php5/articles/php5-perl.php?print=1

attached mail follows:


Tassos,

just what are you trying to do? if you're trying to run a perl app from a
commandline php function, that's one thing. if you're trying to create a
php/web based app, and you want to run an existing perl app that's sitting
on your server, that's another.

either way, it's possible/reasonably easy to run the perl app from within
php via what are called shell commands (exec/system/passthru). however, you
need to be aware of the process prviliege/permissions issues with regards to
the process that apache runs as, and the permissions/ownership of the
targeted perl app, as well as any file i/o that may occur within the perl
app...

people who tell you that it can't be done, don't have a deep knowledge of
what's possible... welcome to email lists.. where you might get what you pay
for!!!

-bruce

-----Original Message-----
From: Tassos T [mailto:nereus0freemail.gr]
Sent: Thursday, July 22, 2004 2:43 AM
To: php-generallists.php.net
Subject: [PHP] run perl script with php

hello,

i faced a small problem i have a perl script but i want to execute that
in a php script. unfortunately i cannot convert to php.

please advice.

regards

Tassos

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

attached mail follows:


Matt M. wrote:

>>I never tried but i think it is possible using the pecl extension:
>>
>>http://pecl.php.net/package/perl
>>
>>
>
>Here is a short tutorial
>http://www.zend.com/php5/articles/php5-perl.php?print=1
>
>
Hey thanks that looks very interesting indeed.

--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.

attached mail follows:


PHP is more of a "binding" language that takes advantage of many different
coding practices and puts them together. PHP is not jealous and does not
separate or shun itself from other languages and borrows many of the ideas,
schemes, similar libraries, etc. from these other languages. And yet, it is
completely unique in its own way. Its easy-to-learn, low-cost and
cross-platform identity has made it very popular in recent years.

Perl is a great but is more of a mature language that has been around for
the longest time and it doesn't have the same flexibility as PHP does on the
web. You will find that PHP will far out-pace Perl coding, saving you both
time and money. PHP works concurrently with free solution components such as
Linux OS, Apache Web Server, MySQL Database and others (LAMP -
Linux-Apache-MySQL-PHP). These components all work together beautifully,
yielding fast and stable applications. Invest some time into it and see what
we mean.

-----Original Message-----
From: Syed Ghouse [mailto:syedjinis.com]
Sent: Wednesday, July 21, 2004 2:06 AM
To: php mailinglists
Subject: [PHP] what is difference between php and perl

Hi all

will anybody tell me the difference between perl and php

Regards
Syed

attached mail follows:


"End of the commercial break, we're going back to the news headlines"

But hey, what to expect on a PHP list, right?
Well, at least a story that makes sense.

This is crap, so to speak. Syed, I suggest you should search on Google
(for example, search for "PHP vs Perl" on groups) and see what people are
talking about, and please try to find objectivity.
What is said here is mostly wrong, and without starting a
flame war again (Lost of megs and time are already used for this on the
Net), perl is not mature, limited or inflexible (why do you think perl
was able to evaluate to incorpate full OO, oh well).

Keep the following in mind when you do your search:

- Each language has its purposes, and so each languages has its strengths
and weaknesses
- Be cautious with benchmarking, lots of benchmarks are comparing apples
and eggs (compare PHP performance to plain Perl, instead of mod_perl for
example)
- Statistics of what is being installed does not say about if it's really
used.
- Drawbacks for someone can be nice features for someone else, and vice
versa.

Please find out for yourself, and don't draw any conclusions based on
the answer below. You should check them both, at least to know which
language "fits" your purpose, and may be other things come into play in
your situation also, knowledge around, time you got (perl may take a bit
more time to learn), what to do with it in the future and so on and so
forth.

Jurgen

---------------------------------------------------------------------------
" When a man sits with a pretty girl for an hour, it seems like a
minute.
But let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." [A. Einstein, 1938]

http://jurgenstroo.com

This one time, at band camp, php-listxenonsolutions.com said:

> PHP is more of a "binding" language that takes advantage of many different
> coding practices and puts them together. PHP is not jealous and does not
> separate or shun itself from other languages and borrows many of the ideas,
> schemes, similar libraries, etc. from these other languages. And yet, it is
> completely unique in its own way. Its easy-to-learn, low-cost and
> cross-platform identity has made it very popular in recent years.
>
> Perl is a great but is more of a mature language that has been around for
> the longest time and it doesn't have the same flexibility as PHP does on the
> web. You will find that PHP will far out-pace Perl coding, saving you both
> time and money. PHP works concurrently with free solution components such as
> Linux OS, Apache Web Server, MySQL Database and others (LAMP -
> Linux-Apache-MySQL-PHP). These components all work together beautifully,
> yielding fast and stable applications. Invest some time into it and see what
> we mean.
>
>
>
> -----Original Message-----
> From: Syed Ghouse [mailto:syedjinis.com]
> Sent: Wednesday, July 21, 2004 2:06 AM
> To: php mailinglists
> Subject: [PHP] what is difference between php and perl
>
> Hi all
>
> will anybody tell me the difference between perl and php
>
> Regards
> Syed
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


On Thu, 22 Jul 2004 13:31:20 +0200 (CEST), Jurgen Stroo
<blurgjurgenstroo.com> wrote:
> "End of the commercial break, we're going back to the news headlines"
>
> But hey, what to expect on a PHP list, right?
> Well, at least a story that makes sense.
>
> This is crap, so to speak. Syed, I suggest you should search on Google
> (for example, search for "PHP vs Perl" on groups) and see what people are
> talking about, and please try to find objectivity.
> What is said here is mostly wrong, and without starting a
> flame war again (Lost of megs and time are already used for this on the
> Net), perl is not mature, limited or inflexible (why do you think perl
> was able to evaluate to incorpate full OO, oh well).
>

I don't know why you say Perl is not mature....I suppose it depends on
what you call mature. Perl has been around forever and it works as
advertised. It also has lots of support libraries.

Blech....I don't see it as a very good OO implementation. Just
functions are kuldgy. It feels very bolted-on to the core language to
me.

> Keep the following in mind when you do your search:
>
> - Each language has its purposes, and so each languages has its strengths
> and weaknesses
> - Be cautious with benchmarking, lots of benchmarks are comparing apples
> and eggs (compare PHP performance to plain Perl, instead of mod_perl for
> example)
> - Statistics of what is being installed does not say about if it's really
> used.
> - Drawbacks for someone can be nice features for someone else, and vice
> versa.
>
> Please find out for yourself, and don't draw any conclusions based on
> the answer below. You should check them both, at least to know which
> language "fits" your purpose, and may be other things come into play in
> your situation also, knowledge around, time you got (perl may take a bit
> more time to learn), what to do with it in the future and so on and so
> forth.
>
> Jurgen
>
> ---------------------------------------------------------------------------
> " When a man sits with a pretty girl for an hour, it seems like a
> minute.
> But let him sit on a hot stove for a minute and it's longer than any hour.
> That's relativity." [A. Einstein, 1938]
>
> http://jurgenstroo.com
>
>
>
> This one time, at band camp, php-listxenonsolutions.com said:
>
> > PHP is more of a "binding" language that takes advantage of many different
> > coding practices and puts them together. PHP is not jealous and does not
> > separate or shun itself from other languages and borrows many of the ideas,
> > schemes, similar libraries, etc. from these other languages. And yet, it is
> > completely unique in its own way. Its easy-to-learn, low-cost and
> > cross-platform identity has made it very popular in recent years.
> >
> > Perl is a great but is more of a mature language that has been around for
> > the longest time and it doesn't have the same flexibility as PHP does on the
> > web. You will find that PHP will far out-pace Perl coding, saving you both
> > time and money. PHP works concurrently with free solution components such as
> > Linux OS, Apache Web Server, MySQL Database and others (LAMP -
> > Linux-Apache-MySQL-PHP). These components all work together beautifully,
> > yielding fast and stable applications. Invest some time into it and see what
> > we mean.
> >
> >
> >
> > -----Original Message-----
> > From: Syed Ghouse [mailto:syedjinis.com]
> > Sent: Wednesday, July 21, 2004 2:06 AM
> > To: php mailinglists
> > Subject: [PHP] what is difference between php and perl
> >
> > Hi all
> >
> > will anybody tell me the difference between perl and php
> >
> > Regards
> > Syed
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> !DSPAM:40ffa442131291382852559!
>
>

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


Youll find knowing both languages will be handy in development. Im
not a huge fan of having to program in perl, however, at times, its
far easier to use perl than any other language. An example of that,
would be to create a small server client program that possibly parses
or extrapolates data from a stream or file.. Perl is extremely strong
in this area. When scripting serverside programs for the web, i use
php over perl 100% of the times. There is vast differences between
the two, this doesnt make one better than the other in all
circumstances, quite the opposite.

Jason

On Thu, 22 Jul 2004 09:51:00 -0700, Justin Patrin <papercranegmail.com> wrote:
> On Thu, 22 Jul 2004 13:31:20 +0200 (CEST), Jurgen Stroo
> <blurgjurgenstroo.com> wrote:
> > "End of the commercial break, we're going back to the news headlines"
> >
> > But hey, what to expect on a PHP list, right?
> > Well, at least a story that makes sense.
> >
> > This is crap, so to speak. Syed, I suggest you should search on Google
> > (for example, search for "PHP vs Perl" on groups) and see what people are
> > talking about, and please try to find objectivity.
> > What is said here is mostly wrong, and without starting a
> > flame war again (Lost of megs and time are already used for this on the
> > Net), perl is not mature, limited or inflexible (why do you think perl
> > was able to evaluate to incorpate full OO, oh well).
> >
>
> I don't know why you say Perl is not mature....I suppose it depends on
> what you call mature. Perl has been around forever and it works as
> advertised. It also has lots of support libraries.
>
> Blech....I don't see it as a very good OO implementation. Just
> functions are kuldgy. It feels very bolted-on to the core language to
> me.
>
> > Keep the following in mind when you do your search:
> >
> > - Each language has its purposes, and so each languages has its strengths
> > and weaknesses
> > - Be cautious with benchmarking, lots of benchmarks are comparing apples
> > and eggs (compare PHP performance to plain Perl, instead of mod_perl for
> > example)
> > - Statistics of what is being installed does not say about if it's really
> > used.
> > - Drawbacks for someone can be nice features for someone else, and vice
> > versa.
> >
> > Please find out for yourself, and don't draw any conclusions based on
> > the answer below. You should check them both, at least to know which
> > language "fits" your purpose, and may be other things come into play in
> > your situation also, knowledge around, time you got (perl may take a bit
> > more time to learn), what to do with it in the future and so on and so
> > forth.
> >
> > Jurgen
> >
> > ---------------------------------------------------------------------------
> > " When a man sits with a pretty girl for an hour, it seems like a
> > minute.
> > But let him sit on a hot stove for a minute and it's longer than any hour.
> > That's relativity." [A. Einstein, 1938]
> >
> > http://jurgenstroo.com
> >
> >
> >
> > This one time, at band camp, php-listxenonsolutions.com said:
> >
> > > PHP is more of a "binding" language that takes advantage of many different
> > > coding practices and puts them together. PHP is not jealous and does not
> > > separate or shun itself from other languages and borrows many of the ideas,
> > > schemes, similar libraries, etc. from these other languages. And yet, it is
> > > completely unique in its own way. Its easy-to-learn, low-cost and
> > > cross-platform identity has made it very popular in recent years.
> > >
> > > Perl is a great but is more of a mature language that has been around for
> > > the longest time and it doesn't have the same flexibility as PHP does on the
> > > web. You will find that PHP will far out-pace Perl coding, saving you both
> > > time and money. PHP works concurrently with free solution components such as
> > > Linux OS, Apache Web Server, MySQL Database and others (LAMP -
> > > Linux-Apache-MySQL-PHP). These components all work together beautifully,
> > > yielding fast and stable applications. Invest some time into it and see what
> > > we mean.
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Syed Ghouse [mailto:syedjinis.com]
> > > Sent: Wednesday, July 21, 2004 2:06 AM
> > > To: php mailinglists
> > > Subject: [PHP] what is difference between php and perl
> > >
> > > Hi all
> > >
> > > will anybody tell me the difference between perl and php
> > >
> > > Regards
> > > Syed
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > !DSPAM:40ffa442131291382852559!
>
>
> >
> >
>
> --
> DB_DataObject_FormBuilder - The database at your fingertips
> http://pear.php.net/package/DB_DataObject_FormBuilder
>
> paperCrane --Justin Patrin--
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


* Thus wrote Jurgen Stroo:
> "End of the commercial break, we're going back to the news headlines"
>
>...
> Net), perl is not mature, limited or inflexible (why do you think perl
> was able to evaluate to incorpate full OO, oh well).

#!/usr/bin/perl

print "HTTP/1.0 200\r\n";
print "Content-Type: text/html\r\n";
print "Set-Cookie: SESS=123fdfd...\r\n"
print "Connection: close\r\n";
print "Cache-Control: no-store..\r\n";
print "Pragma: no-cache \r\n";
print "Content-Type: text/html; charset=ISO-8859-1\r\n";
print "\r\n";

$qs = $ENV{'QUERY_STRING'};
#
# bunch of tr/,s/,maping code to figure out a query string vars
# into $_GET
#
if ($_GET{'var'} ) {
  print $_GET{'var'};
}

#!/usr/bin/php
<?php
if ($_GET['var']) {
  echo $_GET['var'];
}

Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!

attached mail follows:


Hi,

        Or...

#!/usr/bin/perl

Use CGI;

$q = new CGI;

if ( $q->param_url("var") )
{
        Print $q->param_url("var")
}

Really, if you look at a lot of functions in PHP and Perl, they mimic each
other, and other languages (C, etc..).. It's a personal preference choice.
PHP was designed for dynamic web pages, Perl was designed to be a unix
programming language that evolved.

-Dan Joseph

> #!/usr/bin/perl
>
> print "HTTP/1.0 200\r\n";
> print "Content-Type: text/html\r\n";
> print "Set-Cookie: SESS=123fdfd...\r\n"
> print "Connection: close\r\n";
> print "Cache-Control: no-store..\r\n";
> print "Pragma: no-cache \r\n";
> print "Content-Type: text/html; charset=ISO-8859-1\r\n";
> print "\r\n";
>
> $qs = $ENV{'QUERY_STRING'};
> #
> # bunch of tr/,s/,maping code to figure out a query string vars
> # into $_GET
> #
> if ($_GET{'var'} ) {
> print $_GET{'var'};
> }
>
> #!/usr/bin/php
> <?php
> if ($_GET['var']) {
> echo $_GET['var'];
> }
>
>
> Curt
> --
> First, let me assure you that this is not one of those shady pyramid
> schemes
> you've been hearing about. No, sir. Our model is the trapezoid!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


On Thu, 22 Jul 2004 18:23:08 +0000, Curt Zirzow
<php-generalzirzow.dyndns.org> wrote:
> * Thus wrote Jurgen Stroo:
> > "End of the commercial break, we're going back to the news headlines"
> >
> >...
> > Net), perl is not mature, limited or inflexible (why do you think perl
> > was able to evaluate to incorpate full OO, oh well).
>
>
> #!/usr/bin/perl
>
> print "HTTP/1.0 200\r\n";
> print "Content-Type: text/html\r\n";
> print "Set-Cookie: SESS=123fdfd...\r\n"
> print "Connection: close\r\n";
> print "Cache-Control: no-store..\r\n";
> print "Pragma: no-cache \r\n";
> print "Content-Type: text/html; charset=ISO-8859-1\r\n";
> print "\r\n";
>
> $qs = $ENV{'QUERY_STRING'};
> #
> # bunch of tr/,s/,maping code to figure out a query string vars
> # into $_GET
> #
> if ($_GET{'var'} ) {
> print $_GET{'var'};
> }
>

You can use the CGI libraries for much of this.

> #!/usr/bin/php
> <?php
> if ($_GET['var']) {
> echo $_GET['var'];
> }
>
> Curt
> --
> First, let me assure you that this is not one of those shady pyramid schemes
> you've been hearing about. No, sir. Our model is the trapezoid!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> !DSPAM:4100012220022056620586!
>
>

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


If you need a copy of an object (like the default in PHP4), you can explicitly
do that with clone.

$cErrorHandler = new testErrors();
$clone = clone $cErrorHandler;

If you do this you shouldn't need zend engine 1 compatibility (unless you need
that for other reasons).

attached mail follows:


Jason,

I need it for other reasons. This is not a new application that is causing
this. It was built on PHP 4 and therefore has lots of non PHP 5 elements.
So I'm pretty sure I need than on, unless someone has another idea...

Thanks,
Jules...

"Jason Barnett" <jasbarneindiana.edu> wrote in message
news:20040722112013.7653.qmailpb1.pair.com...
> If you need a copy of an object (like the default in PHP4), you can
explicitly
> do that with clone.
>
> $cErrorHandler = new testErrors();
> $clone = clone $cErrorHandler;
>
> If you do this you shouldn't need zend engine 1 compatibility (unless you
need
> that for other reasons).

attached mail follows:


Jules wrote:

> Jason,
>
> I need it for other reasons. This is not a new application that is causing
> this. It was built on PHP 4 and therefore has lots of non PHP 5 elements.
> So I'm pretty sure I need than on, unless someone has another idea...
>
> Thanks,
> Jules...
>

Not sure what all your classes do, but here's a list of non-compatible changes
for PHP5:
http://www.php.net/manual/en/migration5.incompatible.php

If your scripts don't have problems with any of these incompatibilities, then
using clone should work. The error you're recieving at the end of the script is
just Zend's not-so-gentle reminder that you should change over to the new object
model. I don't know why it triggers for E_ALL... some enlightenment from others
would be great here :)

attached mail follows:


Give us the exact error as it is displayed in your browser. Also did you try to
print_r on every Add as was suggested to you earlier?

To be honest, I'm starting to wonder if we haven't stumbled on a bug. I have
had similar problems (in an entirely different context) and improper cloning may
be the cause of both of our problems. But without seeing the rest of your code
it is very difficult to say if that is the case.

Can you provide a link to the source (rather than posting it all here)?

Scott Hyndman wrote:

> You assume the order matters to me, and that overwriting isn't it's intended behaviour.
>
> The fact remains that I'm creating this object, and it says "cannot find element in variable".
>
> Does ANYONE know what this means?
>

attached mail follows:


Hmmm... this may be difficult to implement. For simple include/require trees it
could be done quite easily... but __autoload opens up a whole other bag of
worms. But now that I think of it I suppose you could create Reflections and
get the location of class defintions from that. This might fit with something
else I'm working on, I'll report back here if I come up with something useful.

attached mail follows:


Hi,

thanks for your comment. Right, and similarly, it struck me that in case
there are variable-names in the path, like in

require_once $my_lib_dir . "some_funcs.php";

the variable $my_lib_dir could only be known at run-time and not by any
simple script just scanning the source.

Still, it would be possible to deliver a variable_name=value to the
traversing function which would be good enough in most cases.

May get around to it one day...

Frank

At 06:46 PM 7/22/2004, Jason Barnett wrote:
>Hmmm... this may be difficult to implement. For simple include/require
>trees it could be done quite easily... but __autoload opens up a whole
>other bag of worms. But now that I think of it I suppose you could create
>Reflections and get the location of class defintions from that. This
>might fit with something else I'm working on, I'll report back here if I
>come up with something useful.
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Hi,

thanks for the help. I had removed the ";" but had not moved the
libmysql.dll to the C:\windows\system32 directory. Also found in the manual
that MySQL is not "included by default" in MySQL 5.0.0 and hence you need to
include the extension.

All working hunky dory now.

thanks again to those who helped.

Chris

"Michael Purdy" <michael.purdyoptusnet.com.au> wrote in message
news:001d01c46e3c$97f53860$ba8b1cd3mpdesk...
Chris

Have you removed the ";" from the extension DLL in the php.ini file?

;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll <---- Here
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll

Mike

attached mail follows:


--- raditha dissanayake <jabberraditha.com> wrote:
> PHP Gen wrote:
>
> >>how about using SSH tunneling instead.
> >>
> >>
> >
> >Never tried it, any examples for a win2k pro
> machine?
> >
> >
> There are some tutorials on this topic search term
> may be 'ssh tunnel
> howto' you do need to have an SSH client installed
> on your computer. The
> server will no doubt have ssh installed.

Thanks, will google for it.

-Mag

=====
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

        
                
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/

attached mail follows:


I have decided to look for an alternative to file_exists() because it is
taking too long. Is fopen() a good alternative or what?

attached mail follows:


> I have decided to look for an alternative to file_exists() because it is
> taking too long. Is fopen() a good alternative or what?

maybe stat()
http://us4.php.net/manual/en/function.stat.php

attached mail follows:


regarding spamcease, what i had suspected appears to be the case. it appears
that this is an app of some sort, looking for emails, or it's just a badly
written/f*ed up app...

i got a msg stating that "i" had signed up, using my email address, stating
that i should enter my information, etc... i've never signed up...!!!!

as i stated before... if you get the msgs.. just delete and keep going...

peace...

given that spamcease appears to be popping up regarding various lists... the
app might actually be trawling for email/user information... i've recieved
the email from this list, as well as the mysql list.. search google and
you'll find the same message from other lists...

i'm pretty certain that the give lists haven't signed up to the service...

i'd simply delete the msgs, and keep going..!!

-----Original Message-----
From: Brian Krausz [mailto:briannerdlife.net]
Sent: Tuesday, July 20, 2004 8:04 AM
To: php-generallists.php.net
Subject: [PHP] mailing list spam protection?

While I'm trying not to be paranoid of spam, I received 3 copies of this
message, and it seemed suspicious. Is this a legit email? (I didn't
know who else to ask besides the actual mailing list users) I included
all the relevant headers...

 From - Tue Jul 20 10:49:01 2004
Return-Path: <roottgpnexus.com>
Received: (qmail 663 invoked from network); 20 Jul 2004 07:13:21 -0000
Received: from softdnserror (HELO tgpnexus.com) (66.17.150.83)
   by techfu.org with SMTP; 20 Jul 2004 07:13:21 -0000
Received: (from rootlocalhost)
        by tgpnexus.com (8.11.6/8.11.6) id i6K79I127056;
        Tue, 20 Jul 2004 03:09:18 -0400
Date: Tue, 20 Jul 2004 03:09:18 -0400
Message-Id: <200407200709.i6K79I127056tgpnexus.com>
Subject: IMPORTANT: Please Verify Your Message
From: <php-generallists.php.net>
Reply-To: php-generallists.php.net
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
X-verify: request

Hello briannerdlife.net ,

php-generallists.php.net is currently protecting themselves from
receiving junk mail using Spamcease Just this once, click the link below
so I can receive your emails.
You won't have to do this again.

http://www.tgpwizards.com/spamcease2/verify.php?id=346542

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

attached mail follows:


Quoting bruce <bedouglasearthlink.net>:
> i got a msg stating that "i" had signed up, using my email address,
> stating that i should enter my information, etc... i've never signed
> up...!!!!
> as i stated before... if you get the msgs.. just delete and keep going...

To me it seems like a company making anti-spam apps tries to promote
their product through... spam. And they tried to make it elaborate by
aledgedly speaking on behalf of well known communities. Nice way of
making themselves popular (not) within those very communities...

--
Romanian Web Developers - http://ROWD.ORG

attached mail follows:


I have 2 text files

 

One has arp list

 

IP Address MAC Address Type

---------------- ------------------ ----------

165.166.182.204 00:0a:04:98:b5:d3 dynamic

 

 

One file has a mac list

 

Modem MAC Address IP Address CPE IP Address CPE MAC
Address CPE Source

----------------- ---------------
---------------- - ---------------- -----------

00:00:39:46:88:57 10.21.2.236 165.166.182.204
00:0a:04:98:b5:d3 Learned

 

 

 

Just an example - there are about 5000 entries in each file (more in the mac
list)

 

What I am trying to do is match the mac address from the arp file to a cpe
Mac address in the Mac file and return modem Mac and ip address from Mac
list.

 

I can open the arp and set what I want to an array. But matching up is where
I hit a wall..

 

Thanks for any help or at least a point in some direction

 

Alan

attached mail follows:


"Alantodd" <alantoddgibhut.com> wrote in message
news:php.general-191525news.php.net...
> I have 2 text files
>
>
>
> One has arp list
>
>
>
> IP Address MAC Address Type
>
> ---------------- ------------------ ----------
>
> 165.166.182.204 00:0a:04:98:b5:d3 dynamic
>
>
>
>
>
> One file has a mac list
>
>
>
> Modem MAC Address IP Address CPE IP Address CPE MAC
> Address CPE Source
>
> ----------------- ---------------
> ---------------- - ---------------- -----------
>
> 00:00:39:46:88:57 10.21.2.236 165.166.182.204
> 00:0a:04:98:b5:d3 Learned
>
>
>
>
>
>
>
> Just an example - there are about 5000 entries in each file (more in the
mac
> list)
>
>
>
> What I am trying to do is match the mac address from the arp file to a cpe
> Mac address in the Mac file and return modem Mac and ip address from Mac
> list.
>
>
>
> I can open the arp and set what I want to an array. But matching up is
where
> I hit a wall..
>
>
>
> Thanks for any help or at least a point in some direction
>
>
>
> Alan

Hi Alan,

I guess you'd have to read the second file into an array as well (line by
line) and then *for each* entry from the arp list loop through all entries
of the mac list and compare the values.

Have you considered putting the data into two MySQL tables? This would make
dealing with it much more comfortable.

Regards, Torsten Roehr

attached mail follows:


Hi all--

I subscribed to this list because I have an interest in PHP, but am more of
a dabbler than an actual programmer; in other words, I never thought I
would be posting a question to the list. So, the following is a problem I
send on behalf of one of the programmers in my group, who is relatively new
to PHP.

=====
I have recently noticed a problem with our code or our webserver (Apache)
when I execute a .php file. I have taken all php code out, but within an
html <td> tag, I use background="#", which is used for older browsers such
as Netscape 4.7 if you have a background color or image in a table (the
background # completes it throughout the td). This isn't the case for IE
or NS 6+, though.

The problem is that when I run the page, the log files show that the page
was accessed twice. This is only the case if the file has a php
extension. This does not occur if the file is an html file,
though. Please don't respond by saying change it to an html file and don't
worry about it. This needs to be a php file that connects to a database,
but I first noticed the problem, because I had code that emailed me
twice. After narrowing it down, it has nothing to do with the code, only
the fact that its a php file and background="#" is in a <td> tag.
=====

Many thanks.
=====
   Tobias Brasier
   Contractual Services Group
   University Webmaster, University of South Carolina
   1244 Blossom Street, Columbia, South Carolina 29208
   voice: 803-777-7366 fax: 803-777-1900
   tobiassc.edu | http://isg.csd.sc.edu/~tobias/

attached mail follows:


On Thursday 22 July 2004 10:23 am, Tobias Brasier wrote:
> The problem is that when I run the page, the log files show that the page
> was accessed twice.

I would be looking for calls to the header() function or a meta refresh tag in
the header of this program. Maybe there is an include() file that has one of
these things in it? Setting the background color of a <TD> using the #123456
method is not going to cause your script to load twice.

James Hicks

attached mail follows:


"Tobias Brasier" <tobiassc.edu> wrote in message
news:5.2.1.1.2.20040722101730.02bf34c0mailbox.sc.edu...
> Hi all--
>
> I subscribed to this list because I have an interest in PHP, but am more
of
> a dabbler than an actual programmer; in other words, I never thought I
> would be posting a question to the list. So, the following is a problem I
> send on behalf of one of the programmers in my group, who is relatively
new
> to PHP.
>
> =====
> I have recently noticed a problem with our code or our webserver (Apache)
> when I execute a .php file. I have taken all php code out, but within an
> html <td> tag, I use background="#", which is used for older browsers such
> as Netscape 4.7 if you have a background color or image in a table (the
> background # completes it throughout the td). This isn't the case for IE
> or NS 6+, though.
>
> The problem is that when I run the page, the log files show that the page
> was accessed twice. This is only the case if the file has a php
> extension. This does not occur if the file is an html file,
> though. Please don't respond by saying change it to an html file and
don't
> worry about it. This needs to be a php file that connects to a database,
> but I first noticed the problem, because I had code that emailed me
> twice. After narrowing it down, it has nothing to do with the code, only
> the fact that its a php file and background="#" is in a <td> tag.
> =====
>
> Many thanks.
> =====
> Tobias Brasier

Hi Tobias,

I remember that some weeks ago someone had a similar problem with an img tag
where the page reloaded several times. Search the mailing list archives and
you might find the thread:
http://marc.theaimsgroup.com/?l=php-general

Regards, Torsten Roehr

attached mail follows:


Tobias Brasier wrote:
> I have recently noticed a problem with our code or our webserver
> (Apache) when I execute a .php file. I have taken all php code out,
> but within an html <td> tag, I use background="#", which is used for
> older browsers such as Netscape 4.7 if you have a background color or
> image in a table (the background # completes it throughout the td).
> This isn't the case for IE or NS 6+, though.
>
> The problem is that when I run the page, the log files show that the
> page was accessed twice. This is only the case if the file has a php
> extension. This does not occur if the file is an html file,
> though.

That's very odd. Here's a suggestion that may help you to track down what is
happening. Install the latest version of Mozilla, and then install the
LiveHTTPHeaders plugin (http://livehttpheaders.mozdev.org/installation.html).
Restart the browser, then click Tools > Web Development > Live HTTP Headers, which
should open a capture window. Now request the page that is exhibiting this
behavior, then look in the capture window to see the exact headers that were sent
from your browser to the server and vice versa. If there is any redirecting or
meta-refreshing going on the headers should reveal that. At least then you can see
if your browser is actually requesting the page twice or if it's simply being
processed twice on the server side. If you need help interpreting the output then
throw it up on a web page and post a link, since the header capture for even a
single fairly simple request can sometimes be quite verbose.

HTH...

attached mail follows:


Tobias Brasier wrote:

>
> I have recently noticed a problem with our code or our webserver
> (Apache) when I execute a .php file. I have taken all php code out,
> but within an html <td> tag, I use background="#", which is used for
> older browsers such as Netscape 4.7 if you have a background color or
> image in a table (the background # completes it throughout the td).
> This isn't the case for IE or NS 6+, though.

How about this:
Do a browser detection and display the '#' only if the client is using
netscape 4.7 if you do a search for browser detection with PHP you will
come up with plenty of examples.

>
> The problem is that when I run the page, the log files show that the
> page was accessed twice.

--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.

attached mail follows:


I tried posting this to php-win a while back with no result so forgive the duplication.

Under IIS6 (Windows 2003) you 'register' the file extensions in the web extensions
manager which /appears/ to preclude running different binaries for PHP with the
same file extension.

Example 1:

Site php extension php version
A .php php.exe 4.1.x
B .php php.exe 4.2.x
C .php php.exe 4.3.x

Example 1 is what I currently do under W2K IIS5 to allow individual clients
to have their own 'copy' of php complete with php.ini running in safe mode
locked to their webroot. Each site is independant of the others and can be
upgraded individually as/when required.

Example 2:

Site php extension php version
A .phpa php.exe 4.1.x
B .phpb php.exe 4.2.x
C .phpc php.exe 4.3.x

Example 2 is the only way I can get this working with W3K IIS6 and is a really dumb
way to get it going (not in production and not going into production!)

If anyone knows how to setup IIS6 to allow the same .php extension to be used
with dedicated copies of php.exe + ini files I would really appreciate the
assistance. Maybe some clue I am missing about the behavior of the web extensions
manager or a method of defeating it?

I do run apache on other boxes so that is not the solution here as the sites
do some IIS5/IIS6 stuff specific stuff.

Regards

Petar

attached mail follows:


> If anyone knows how to setup IIS6 to allow the same .php extension to be used
> with dedicated copies of php.exe + ini files I would really appreciate the
> assistance. Maybe some clue I am missing about the behavior of the web extensions
> manager or a method of defeating it?

Have you tried a IIS mailing list/message board?

attached mail follows:


----- Original Message -----
From: "Matt M." <h.dudenessgmail.com>
To: "Petar [Lists]" <pjnnikolich.org>
Cc: <php-generallists.php.net>
Sent: Thursday, July 22, 2004 11:28 PM
Subject: Re: [PHP] mutiple copies of php with windows iis6

> > If anyone knows how to setup IIS6 to allow the same .php extension to be used
> > with dedicated copies of php.exe + ini files I would really appreciate the
> > assistance. Maybe some clue I am missing about the behavior of the web extensions
> > manager or a method of defeating it?
>
>
> Have you tried a IIS mailing list/message board?
>
 
Yes, it seems so far that no once else has had an ocassion to use the
same file extension in conunction with different binaries to process
the same way. So no help there..

attached mail follows:


Hi,

i'm working with PHP 5.0.0 (Linux) and have some trouble using function sin().
In PHPs opinion

sin(20)

is

0.912945250728

I have had a look at the bug.php.net, but couldn`t find anything. Is it a bug
or am I just misunderstanding something??

Marcus

attached mail follows:


It's giving you sin(20) in radians, not in degrees (which is what you
seem to want). It's not a bug.

On Thu, 22 Jul 2004 12:17:19 -0400, Ashwin Purohit <purohitgmail.com> wrote:
> It's giving you sin(20) in radians, not in degrees (which is what you
> seem to want). It's not a bug.
>
>
>
> On Thu, 22 Jul 2004 17:40:21 +0200, Marcus Strube <marcus_strubegmx.net> wrote:
> > Hi,
> >
> > i'm working with PHP 5.0.0 (Linux) and have some trouble using function sin().
> > In PHPs opinion
> >
> > sin(20)
> >
> > is
> >
> > 0.912945250728
> >
> > I have had a look at the bug.php.net, but couldn`t find anything. Is it a bug
> > or am I just misunderstanding something??
> >
> > Marcus
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> Ashwin Purohit
>

--
Ashwin Purohit

attached mail follows:


If you want it in degrees, use sin(deg2rad(20);

> On Thu, 22 Jul 2004 12:17:19 -0400, Ashwin Purohit <purohitgmail.com> wrote:
> > It's giving you sin(20) in radians, not in degrees (which is what you
> > seem to want). It's not a bug.
>>
> > On Thu, 22 Jul 2004 17:40:21 +0200, Marcus Strube <marcus_strubegmx.net> wrote:
> > > Hi,
> > > i'm working with PHP 5.0.0 (Linux) and have some trouble using function sin().
> > > In PHPs opinion
> > > sin(20) is
> > > 0.912945250728
> > > I have had a look at the bug.php.net, but couldn`t find anything. Is it a bug
> > > or am I just misunderstanding something??
> > >
> > > Marcus
--
Ashwin Purohit

attached mail follows:


Thanks a lot. I've overseen a word in the manual. Now i got it.

attached mail follows:


as in 20 degrees?
float *sin* ( float arg)

*sin()* returns the sine of the arg parameter. The arg parameter is in
radians.

RADIANS.

|sin(deg2rad(20));

|

Jon

Marcus Strube wrote:

>Hi,
>
>i'm working with PHP 5.0.0 (Linux) and have some trouble using function sin().
>In PHPs opinion
>
>sin(20)
>
>is
>
>0.912945250728
>
>I have had a look at the bug.php.net, but couldn`t find anything. Is it a bug
>or am I just misunderstanding something??
>
>Marcus
>
>
>

attached mail follows:


Here's the deal, if your PHP install is --enable-sigchild, pclose() and
proc_close() do NOT return a proper exit status code.

http://bugs.php.net/bug.php?id=29123

Currently illia at PHP.net are saying this WILL NOT be fixed until PHP
5.1 or so. Personally, I think this is bogus and SHOULD BE FIXED. I am
sorry, but having accurate / agressive control over a child process and
being able to retrive its exit status code is ESSENTIAL in a production
environment. Perhaps if enough people post a high importance to this
bug it will get fixed in the 4.x tree.

However, until the devs get it figured out, I would love to find a way
around this. What I need to accomplish is gather and analyze
progressive output from a child process and provide a customized
tailable log of the process. Afterwards, I need to examine the exit
status code for proper error handling. exec() and system() do not
provide a progressive line-by-line return of the process. These results
need to be logged in oracle (hence the --enable-sigchild) for statistics.

I would like to think that someone has found a semi-elegant way around
this, since this bug has existed for so long:
http://bugs.php.net/bug.php?id=14182

Thanks in advance for any help or insight to this,

Jt

attached mail follows:


> I would like to think that someone has found a semi-elegant way around
> this, since this bug has existed for so long:
> http://bugs.php.net/bug.php?id=14182

addendum: That was the first instance of this bug 3 years ago, which I
guess was fixed in that version tree. The following bug is where I
noticed they had indefinitely postponed this fix (about 9 months ago):

http://bugs.php.net/bug.php?id=25727

Jt

attached mail follows:


I have ran into a rather interesting problem while zlib or gzip compression
is enabled on my site. I have an external javascript-php file (a javascript
file that is dynamically generated as in filename.js.php) which is included
in the main template using the <script> element (for example <script
src="filename.js.php"></script>). This file defines variables that are used
to populate a javascript drop-down menu. With compression turned on, from
time-to-time, I get a javascript error basically saying that certain
variables have not been defined. At other times it works perfectly; this
phenomenom appears to be completely random. My theory is, with compression
turned on (via php.ini), the external php file does not get placed into the
output buffer until some point in time after the currently executing script
has been compressed. The reason being, is that the file is not included into
the script using a php "require" construct, but rather via HTML's <script>
element. I have played with this forever, and I have not found a solution.
Has anyone else ran into this problem; any suggetions or comments are
greatly welcomed. Thanks in advance,

Christian

attached mail follows:


Astrum Et Securis,

I'm using a PowerMac G5 machine, which has the MacOS X Panther. It comes
with the Postfix mail server, which I'm now trying to use with PHP.

I was able to define the sendmail_path to the Postfix sendmail in the
PHP.INI ..

Now what happens is, on my localhost when I run the website, and I run a php
page that sends form data to email using the mail() function, it doesn't
give me any error, but the mail never arrives in the defined mailbox.

Any help appreciated.

RSJ

attached mail follows:


On Friday 23 July 2004 02:21, PHP Junkie wrote:

> I was able to define the sendmail_path to the Postfix sendmail in the
> PHP.INI ..

And you restarted the webserver?

> Now what happens is, on my localhost when I run the website, and I run a
> php page that sends form data to email using the mail() function, it
> doesn't give me any error,

You *do* have FULL error reporting enabled?

> but the mail never arrives in the defined
> mailbox.

If you're positive there are no errors on the PHP side then check your mail
logs.

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Kids, the seven basic food groups are GUM, PUFF PASTRY, PIZZA,
PESTICIDES, ANTIBIOTICS, NUTRA-SWEET and MILK DUDS!!
*/

attached mail follows:


On Thu, 22 Jul 2004 14:21:38 -0400, PHP Junkie <phpjunkiemjimm.com> wrote:
> Astrum Et Securis,
>
> I'm using a PowerMac G5 machine, which has the MacOS X Panther. It comes
> with the Postfix mail server, which I'm now trying to use with PHP.
>
> I was able to define the sendmail_path to the Postfix sendmail in the
> PHP.INI ..
>
> Now what happens is, on my localhost when I run the website, and I run a php
> page that sends form data to email using the mail() function, it doesn't
> give me any error, but the mail never arrives in the defined mailbox.
>
> Any help appreciated.
>

Are you sure postfix is set up to actually deliver mail?

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


Astrum Et Securis

I used the Postfix Enabler software which sets up the mail server.
How do I test the mail server? How can I determine if it actually sends
mail?

RSJ

On 7/22/04 2:45 PM, "Matthew Sims" <mattkillermookie.org> wrote:

>> Astrum Et Securis,
>>
>> I'm using a PowerMac G5 machine, which has the MacOS X Panther. It comes
>> with the Postfix mail server, which I'm now trying to use with PHP.
>>
>> I was able to define the sendmail_path to the Postfix sendmail in the
>> PHP.INI ..
>>
>> Now what happens is, on my localhost when I run the website, and I run a
>> php
>> page that sends form data to email using the mail() function, it doesn't
>> give me any error, but the mail never arrives in the defined mailbox.
>>
>> Any help appreciated.
>>
>> RSJ
>
> You should see if the mail server works first before trying it out with
> PHP. Does Postfix actually send mail?
>
> --Matthew Sims
> --<http://killermookie.org>
>
>
>