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 11 Jun 2003 04:49:56 -0000 Issue 2110

php-general-digest-helplists.php.net
Date: Tue Jun 10 2003 - 23:49:56 CDT


php-general Digest 11 Jun 2003 04:49:56 -0000 Issue 2110

Topics (messages 150941 through 151014):

help with cURL
        150941 by: Ken Harris

Generate PHP using PERL???
        150942 by: Todd Snyder
        150944 by: Wendell Brown
        150950 by: Dan Joseph
        151005 by: Joel Rees
        151007 by: Todd Snyder
        151012 by: Joel Rees

How to use objects, variables in an eval() func ?
        150943 by: LPA

Best PHP books
        150945 by: Brian . BHTSystems
        150946 by: Matt Palermo
        150948 by: Jay Blanchard
        150949 by: Ryan A
        150951 by: Dan Joseph
        150963 by: Miles Thompson

Re: MSSQL - Previous/Next Paging Results
        150947 by: CPT John W. Holmes

Number of days between two dates
        150952 by: LeTortorec, Jean-Louis
        150960 by: Jason Wong

Any experience (good or bad) with domehost.com?
        150953 by: Steve Magruder
        150959 by: Ryan A

confusing problem or am just plain confused....
        150954 by: Ryan A
        150956 by: CPT John W. Holmes
        150962 by: Emma Jane Hogbin

Replicate MSAcces form with sub-forms to PHP? Advice needed.
        150955 by: Apollo (Carmel Entertainment)

Array and $_POST value's HELP!
        150957 by: Frank Keessen

Generating Static Pages || Preserve PHP Code?
        150958 by: CF High
        150989 by: Jaap van Ganswijk

mail() function & exchange
        150961 by: Matthias Wulkow
        150988 by: Manuel Lemos

Characters
        150964 by: Steve Marquez
        150966 by: Jason Wong
        150967 by: Mike Brum

Classes and Objects
        150965 by: Don
        150968 by: Frank Keessen

Math with php
        150969 by: Frank Keessen
        150970 by: Jim Lucas

Session Array...
        150971 by: Ryan A
        150986 by: CPT John W. Holmes

Re: .htaccess
        150972 by: Jeff Harris

mysql - get actual row
        150973 by: Harry.de
        150975 by: BAROILLER Pierre-Emmanuel
        150976 by: Tom Woody

Re: check is pop address
        150974 by: nate parsons

Re: can't call htpasswd using PHP
        150977 by: BAROILLER Pierre-Emmanuel
        151006 by: HPS

Re: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in f:\.....\none.php on line 286
        150978 by: BAROILLER Pierre-Emmanuel

Re: What does this do?
        150979 by: nate parsons

Problems compiling with libXpm or libX11
        150980 by: John Nichel

Re: Warning Spammer
        150981 by: myphp
        150983 by: daniel.electroteque.org
        150987 by: Jennifer Goodie
        150990 by: Ernest E Vogelsinger
        150992 by: daniel.electroteque.org
        150995 by: Jerry M. Howell II
        150996 by: daniel.electroteque.org
        150997 by: daniel.electroteque.org
        151000 by: Kevin Saenz
        151001 by: Ryan A
        151003 by: Ben Houlton
        151004 by: Kevin Saenz

magic_quotes_gpc
        150982 by: Steve Marquez
        150985 by: CPT John W. Holmes

Questions, questions, questions...
        150984 by: Sparky Kopetzky
        150991 by: Ernest E Vogelsinger
        151008 by: Lars Torben Wilson

Re: PHP vs. jsp, advice please
        150993 by: Jean-Christian Imbeault
        150994 by: Jean-Christian Imbeault
        151002 by: Jimmy Brake

getting page title using PHP
        150998 by: Tim Thorburn

Img to a stream
        150999 by: Todd Cary

Admin Login
        151009 by: Ben Houlton

SMTP setting correct mail() not working?
        151010 by: Ben Houlton
        151011 by: R'twick Niceorgaw

ldap + php
        151013 by: chandrakant Reddy

Re: usenet post on frebsd php port problem
        151014 by: Chris Knipe

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:


The latest version of curl has a problem with certain SSL certificates. The
cURL commandline added a -k option to override the problem. Is there a PHP
CURL_something foe curl_setopt to do the same override?

Ken

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

attached mail follows:


I hope this hasn't been asked too many times before because I've done an archive search and cant find the answer to my question.

I presently have much of my web site (www.home-fires.com) dynamically generated using PERL scripts. I have a need to reduce image
sizes and my host supports this functionality via PHP and imagemagick. (They will not support this for PERL however even though its
available) .

My question. Is it possible to dynamically generate a page using a PERL script that will in turn be interpreted as PHP by the
server since I dont/wont have the option of ending the filename with PHP.

My hope is that their is some directive that I can output at the start that will invoke the PHP interpreter so that my output will
be run as a PHP script rather than just HTML.

Thanks,
Todd Snyder
Code 6093, 812-854-1685
Electrochemical Power Systems

attached mail follows:


On Tue, 10 Jun 2003 12:05:32 -0500, Todd Snyder wrote:

>My hope is that their is some directive that I can output at the start that will invoke the PHP interpreter so that my output will
>be run as a PHP script rather than just HTML.

Generally speaking a script will be interpreted by one or the other.
I'm pretty sure that if you generate perl code from a perl script, the
interpreter doesn't run on the generated output - it's output. I can't
say for certain that simply generating php output from a perl script
can't be made to work, but I'm almost certain that it isn't intended
to.

I would however think that it would be possible to generate the php
output to a file and then do a header forward from perl to that file or
possibly execute the php interpreter from the command line and pass it
the php file as input.

attached mail follows:


Hi Todd,

> -----Original Message-----
> My question. Is it possible to dynamically generate a page using
> a PERL script that will in turn be interpreted as PHP by the
> server since I dont/wont have the option of ending the filename with PHP.
>
> My hope is that their is some directive that I can output at the
> start that will invoke the PHP interpreter so that my output will
> be run as a PHP script rather than just HTML.

        Its kind of ugly, but its possible to call a php script thru a system()
function in Perl. You could write a php script to do the resize work for
you, and call it like...

        system ('/usr/local/bin/php resize.php');

        ... in Perl. I don't prefer doing these kinds of things, but I guess I
don't personally have a better solution to your problem. Maybe someone else
does?

-Dan Joseph

attached mail follows:


> Its kind of ugly, but its possible to call a php script thru a system()
> function in Perl.

Why bother going through a system call? If you have apache loading both
mod_php and mod_perl, you can call (include or whatever) through normal http
methods.

--
Joel Rees <joelalpsgiken.gr.jp>

attached mail follows:


Well, I'm a little light on technique....so bare with me...
I've got pages that are dynamically created via a perl program. The final
HTTP output depends upon input to the perl script.
I would like the output of this script to be interpreted as a .PHP page so
that I can take advantage of PHP functionality within that page.

Since I dont know what my page will look like prior to running the perl
script with its various inputs, I dont think I can do what your suggesting.

Maybe I'm not understanding what your saying and I'll admit I'm a novice at
all of this.

Todd Snyder

attached mail follows:


> Well, I'm a little light on technique....so bare with me...
> I've got pages that are dynamically created via a perl program.

Already? That was fast. ;-)

> The final
> HTTP output depends upon input to the perl script.
>
> I would like the output of this script to be interpreted as a .PHP page so
> that I can take advantage of PHP functionality within that page.

You're planning on piping perl into php? That sounds like fun.

> Since I dont know what my page will look like prior to running the perl
> script with its various inputs, I dont think I can do what your suggesting.

Wish I knew which post you were replying to here, because I can't tell
what was suggested, much less speculate much on why it doesn't look like
it will work.

> ...

Anyway, if I wanted to be able to use some graphics libraries that my
hosting company made available for php but not for perl, I'd do the
graphics manipulations on php pages and be done with it.

(It seems odd to me that your hosting company doesn't want to load the
perl modules. That might have me wanting to drop the hosting company and
fire up an openbsd box to host my own.)

--
Joel Rees <joelalpsgiken.gr.jp>

attached mail follows:


Hi,

I have an eval which evaluate a block of code before echo the result on the
screen.. Here is the func :

function t_eval($texte) {
 ob_start();
  eval("?>".$texte);
  $retval = ob_get_contents();
 ob_end_clean();
 return $retval;
}

But I use some objects for databases, ... and when i trying to execute this
code i have this text.
Fatal error: Call to a member function on a non-object in k:\program
files\easyphp\www\dhea\include\php\functions_conversion.inc.php(23) :
eval()'d code on line 9

What to do ?

I've tried to insert a global in t_eval function and do the following code
 eval("<?php GLOBAL $myclasses; ?>".$texte);

Thanx

Laurent

attached mail follows:


Does anyone have any recommendations for a good PHP book?

I tried the "Learn PHP in 24 hours" book, but it was incredibly light on
details. I'm looking for a book that has at least a complete function
reference and is geared towards the intermediate to advanced level
programmer.

Thanks in advance for any suggestions.

Brian

attached mail follows:


I have The PHP Black Book, and I find that it works great. Here is a link
to amazon.com where it is located:

http://www.amazon.com/exec/obidos/ASIN/1588800539/102-8343451-6560118

Good luck.

Matt
----- Original Message -----
From: "Brian BHTSystems" <brianbhtsystems.com>
To: <php-generallists.php.net>
Sent: Tuesday, June 10, 2003 4:40 PM
Subject: [PHP] Best PHP books

> Does anyone have any recommendations for a good PHP book?
>
> I tried the "Learn PHP in 24 hours" book, but it was incredibly light on
> details. I'm looking for a book that has at least a complete function
> reference and is geared towards the intermediate to advanced level
> programmer.
>
> Thanks in advance for any suggestions.
>
>
> Brian
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


[snip]
Does anyone have any recommendations for a good PHP book?

I tried the "Learn PHP in 24 hours" book, but it was incredibly light on
details. I'm looking for a book that has at least a complete function
reference and is geared towards the intermediate to advanced level
programmer.
[/snip]

I like O'Reilly's PHP Cookbook.

Jay

attached mail follows:


I myself use PHP BlackBook and started off on that....
got me this far and still keeps me going.
HTH

Cheers,
-Ryan

----- Original Message -----
From: "Jay Blanchard" <jay.blanchardniicommunications.com>
To: "Brian BHTSystems" <brianbhtsystems.com>; <php-generallists.php.net>
Sent: Tuesday, June 10, 2003 6:49 PM
Subject: RE: [PHP] Best PHP books

> [snip]
> Does anyone have any recommendations for a good PHP book?
>
> I tried the "Learn PHP in 24 hours" book, but it was incredibly light on
> details. I'm looking for a book that has at least a complete function
> reference and is geared towards the intermediate to advanced level
> programmer.
> [/snip]
>
> I like O'Reilly's PHP Cookbook.
>
> Jay
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


Hi,

        I'll scond the O'Reilly books. I have Programming PHP and Web Apps w/PHP &
MySQL -- both are excellent. Since you've went through one book, also keep
in mind www.php.net is a great reference tool.

-Dan Joseph

> -----Original Message-----
> From: Ryan A [mailto:ryanjumac.com]
> Sent: Monday, June 09, 2003 3:01 PM
> To: Jay Blanchard
> Cc: brianbhtsystems.com; php-generallists.php.net
> Subject: Re: [PHP] Best PHP books
>
>
> I myself use PHP BlackBook and started off on that....
> got me this far and still keeps me going.
> HTH
>
> Cheers,
> -Ryan
>
>
>
> ----- Original Message -----
> From: "Jay Blanchard" <jay.blanchardniicommunications.com>
> To: "Brian BHTSystems" <brianbhtsystems.com>;
> <php-generallists.php.net>
> Sent: Tuesday, June 10, 2003 6:49 PM
> Subject: RE: [PHP] Best PHP books
>
>
> > [snip]
> > Does anyone have any recommendations for a good PHP book?
> >
> > I tried the "Learn PHP in 24 hours" book, but it was incredibly light on
> > details. I'm looking for a book that has at least a complete function
> > reference and is geared towards the intermediate to advanced level
> > programmer.
> > [/snip]
> >
> > I like O'Reilly's PHP Cookbook.
> >
> > Jay
> >
> > --
> > 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
>

attached mail follows:


Addressing only the issue of the complete function reference, you can do
no better than the annotated online manual.

When I first started using PHP there was a dearth of books; I diligently
dloaded the manual and printed it out, only to find the online version much
more convenient. That was on a dialup connection, too.

Addressing examples, etc., there are an awful lot of good tutorials out
there for PHP, once a couple of those are worked through you pretty well
have what you need.

HTH - Miles Thompson

At 12:49 PM 6/10/2003 -0500, Jay Blanchard wrote:
>[snip]
>Does anyone have any recommendations for a good PHP book?
>
>I tried the "Learn PHP in 24 hours" book, but it was incredibly light on
>details. I'm looking for a book that has at least a complete function
>reference and is geared towards the intermediate to advanced level
>programmer.
>[/snip]
>
>I like O'Reilly's PHP Cookbook.
>
>Jay
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


> > -----Original Message-----
> > MSSQL seems to be a little bit messier that MySQL..e.g limit clause etc
> >
> > Anyone know of articles/examples that specifically deal with this issue?
>
> Look into the Top() function for MSSQL. It goes something like:
>
> SELECT Top(10) * FROM table
>
> You should be able to find some info under the msdn.microsoft.com page.
> Or, MS has several hundred newsgroups, they should have one for MSSQL.

Use TOP in conjuction with mssql_data_seek() to get where you need. Since
you can't specify a starting point with TOP like you can with LIMIT, you
seek() to the starting point. All other concepts still apply.

---John Holmes...

attached mail follows:


Hello everyone,

Do you know how to calculate the number of days between 2 dates?

So far, I used that function:

        $a=mktime("","","",$month1, $day1, $year1);
        $b=mktime("","","",$month2, $day2, $year2);
        $c=($a-$b)/(60*60*24);

The problem is one date is prior to 01/01/1970, the mktime function does not
work.

Any idea?

Thanks.

Jean-Louis

attached mail follows:


On Wednesday 11 June 2003 02:52, LeTortorec, Jean-Louis wrote:

> Do you know how to calculate the number of days between 2 dates?
>
> So far, I used that function:
>
> $a=mktime("","","",$month1, $day1, $year1);
> $b=mktime("","","",$month2, $day2, $year2);
> $c=($a-$b)/(60*60*24);
>
> The problem is one date is prior to 01/01/1970, the mktime function does
> not work.

Have a look at the Calendar functions.

--
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
------------------------------------------
/*
No man would listen to you talk if he didn't know it was his turn next.
                -- E.W. Howe
*/

attached mail follows:


www.domehost.com appears to offer PHP-related services that appear
second-to-none, esp. considering the price. They support GD, FreeType, Ming
and Gzip libraries. (Note: I have no affiliation with them!) Does anyone
here have any positive or negative experiences with this hosting company to
make me aware of? On top of this, is there any site out there where hosting
customers can rate the various hosting companies?

Thanks,
   Steve

--

Steve Magruder Consulting - http://consulting.stevemagruder.com

attached mail follows:


Hi,
I have no experience with dome host but I can offer you every damn thing
that they are offering and whats more....you can setup your apps and have a
run of the whole server for a full 10 days before you pay me a cent...
If need be i can also give you some sites that are hosting under me and you
can write and ask them if you have any questions about our service...

I will be happy to answer any of your questions.

Cheers,
-Ryan

P.S my above offer is only for 1 year hosting contracts.

----- Original Message -----
From: "Steve Magruder" <stevestevemagruder.com>
To: <php-generallists.php.net>
Sent: Tuesday, June 10, 2003 8:13 PM
Subject: [PHP] Any experience (good or bad) with domehost.com?

> www.domehost.com appears to offer PHP-related services that appear
> second-to-none, esp. considering the price. They support GD, FreeType,
Ming
> and Gzip libraries. (Note: I have no affiliation with them!) Does anyone
> here have any positive or negative experiences with this hosting company
to
> make me aware of? On top of this, is there any site out there where
hosting
> customers can rate the various hosting companies?
>
> Thanks,
> Steve
>
> --
>
> Steve Magruder Consulting - http://consulting.stevemagruder.com
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

----- Original Message -----
From: "Steve Magruder" <stevestevemagruder.com>
To: <php-generallists.php.net>
Sent: Tuesday, June 10, 2003 8:13 PM
Subject: [PHP] Any experience (good or bad) with domehost.com?

> www.domehost.com appears to offer PHP-related services that appear
> second-to-none, esp. considering the price. They support GD, FreeType,
Ming
> and Gzip libraries. (Note: I have no affiliation with them!) Does anyone
> here have any positive or negative experiences with this hosting company
to
> make me aware of? On top of this, is there any site out there where
hosting
> customers can rate the various hosting companies?
>
> Thanks,
> Steve
>
> --
>
> Steve Magruder Consulting - http://consulting.stevemagruder.com
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Hi,

I dont know how exactly to explain this but will do my best, i have many of
the following lines in a page:

<td><p><input type=checkbox name='id[]' value=23><input type="hidden" name
="package" value="loco package"></td>

each line of course has a differient id[] value and package value.

Everything is working fine with the just id[] value but now i need to add
the package value too...but the problem is when i submit the form all the
hidden fields are getting submitted when i only need the hidden "package"
value of the ticked checkbox...is there any way to do that? or alter the
above so that each id[] can have 2 values?

In the above example i am getting upto 5 id numbers.... after i get the
numbers i am using it like so:

if(isset($id[0]))
{do things}

to get a better idea of what i am talking about if the above is just too
darn confusing check out http://bestwebhosters.com/search.template2.php
note that most of the links are deadlinks as this is still in development.

Any and all help appreciated.

Cheers,
-Ryan

attached mail follows:


> I dont know how exactly to explain this but will do my best, i have many
of
> the following lines in a page:
>
> <td><p><input type=checkbox name='id[]' value=23><input type="hidden" name
> ="package" value="loco package"></td>

<td><p><input type=checkbox name='id[23]' value="loco package"></td>

> each line of course has a differient id[] value and package value.
>
> Everything is working fine with the just id[] value but now i need to add
> the package value too...but the problem is when i submit the form all the
> hidden fields are getting submitted when i only need the hidden "package"
> value of the ticked checkbox...is there any way to do that? or alter the
> above so that each id[] can have 2 values?

---John Holmes...

attached mail follows:


On Tue, Jun 10, 2003 at 03:27:10PM -0400, CPT John W. Holmes wrote:
> > I dont know how exactly to explain this but will do my best, i have many
> of
> > the following lines in a page:
> >
> > <td><p><input type=checkbox name='id[]' value=23><input type="hidden" name
> > ="package" value="loco package"></td>
>
> <td><p><input type=checkbox name='id[23]' value="loco package"></td>

Further to that... if you need to add more columns of information. Let's
say:
        Text Name name="textname[id]"
        Checkbox name="checkbox[id]"
        Different checkbox name="otherchkbox[id]"

If you set them all up to use arrays, you can process the form quite
nicely like this:

        foreach ($_POST["textname"] as $id => $value) {
                // access other items with:
                $checkbox = $_POST["checkbox"][$id];
                $other = $_POST["otherchkbox"][$id];

        }

I'm sure there are other ways of doing it, but that's the one I like. :)

emma

--
Emma Jane Hogbin
[[ 416 417 2868 ][ www.xtrinsic.com ]]

attached mail follows:


I am trying to convert MSAccess form (that have sub-forms) to PHP and can't seem
to figure out a solution. Anyone done anything like this before, the
sub-queries/sub-forms with PHP? Any examples?

Apolinaras "Apollo" Sinkevicius
Carmel Music & Entertainment, LLC
 web-site: http://carmelme.com
________________________________
Having an event in Chicago, or would you like to bring Chicago entertainment
to your event? Give Carmel Music & Entertainment a call for the finest
entertainment available in Chicago.

attached mail follows:


Hello everyone,

I've got the following problem: I've got two fields called test1[] and test2[]. The value's are stored in an array. For the test1 i can read the array and print the list of value's after the submit. But question is:

if(is_array($_POST['test1'])) {
foreach($_POST['test1'] as $Key => $Value) {
echo $Value;
};

How can I put $_POST['test2'] in this piece of code? So that it's both handling Test1 and Test2!

Thanks for your help; Here is the full code:

<?
$_REQUEST["submit"]=isset($_REQUEST["submit"])?$_REQUEST["submit"]:"";
if($_REQUEST['submit']!="")
{
if(is_array($_POST['test1'])) {
foreach($_POST['test1'] as $Key => $Value) {
echo $Value;
};
} else {
echo $_POST[voorletters];
}
}
?>
<form name="form1" method=post id=form1 enctype=multipart/form-data action="<? $_SERVER['PHP_SELF']?>">
<?
 for ($i=1; $i<=4; $i++)
    {
        echo "# $i<input type=\"text\" name=\"test1[]\"><br>";
        echo "# $i<input type=\"text\" name=\"test2[]\"><br>";
  
    }

?>
<input type=submit name=submit value=submit>
</form>

Thanks in advance for your time and help
Regards,

Frank

attached mail follows:


Hey all.

Interesting problem here, at least for me ;--):

How to generate php pages using fopen() without having php code evaluated in
the written pages?

For example, if build_pages.php runs a db query and, based on the result
set, produces a test page using fopen(), how to avoid having php code
getting evaluated?

Here's an example snippet:

*********************************************************************
 // Set read & write paths
 $write_path = "C:\\apache\\htdocs\\client_site\\files\\";
 $write_path = $write_path . "example_page.php";
 $read_path = $doc_path . "build_pages.php";

 // Read file to variable & close
 $fr = fopen($read_path, "r") or die("An error occurred while opening
$read_path");
 $text = "";
 while (!feof($fr)){ $text .= fread($fr, 100000); }
 fclose($fr);

 // Create example page
 $fw = fopen($write_path, "wb") or die("An error occurred while opening
$write_path");

 // Write data to example page
$make_page = fwrite($fw, $text);

 fclose($fw);
*********************************************************************

Give a holler for more info -- I know the question is a little vague -- I'm
still figuring out how to implement this solution..........

--Noah

attached mail follows:


Hi Noah,

You seem to be just copying a file, if so
use this instead:

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

Or try to describe what you're trying to do and
what the you see as a problem.

Both fread() and fwrite(0 don't interpret the
PHP code in files that they are reading and
writing.

Greetings,
Jaap

At 2003-06-10 15:32 -0700, CF High wrote:
>Hey all.
>
>Interesting problem here, at least for me ;--):
>
>How to generate php pages using fopen() without having php code evaluated in
>the written pages?
>
>For example, if build_pages.php runs a db query and, based on the result
>set, produces a test page using fopen(), how to avoid having php code
>getting evaluated?
>
>Here's an example snippet:
>
>*********************************************************************
> // Set read & write paths
> $write_path = "C:\\apache\\htdocs\\client_site\\files\\";
> $write_path = $write_path . "example_page.php";
> $read_path = $doc_path . "build_pages.php";
>
> // Read file to variable & close
> $fr = fopen($read_path, "r") or die("An error occurred while opening
>$read_path");
> $text = "";
> while (!feof($fr)){ $text .= fread($fr, 100000); }
> fclose($fr);
>
> // Create example page
> $fw = fopen($write_path, "wb") or die("An error occurred while opening
>$write_path");
>
> // Write data to example page
>$make_page = fwrite($fw, $text);
>
> fclose($fw);
>*********************************************************************
>
>Give a holler for more info -- I know the question is a little vague -- I'm
>still figuring out how to implement this solution..........
>
>--Noah
>
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


Hi php-general,

a friend of mine is trying to set up an automated mailing function.
The platform is Windows & he's using the last PHP release at this
time.
He asks me how to do it with Exchange, because it doesn't speak SMTP
or not correctly? What is the matter? Is that true? But that's not
really the question... could somebody point me to some documents where
I could find out, what has to be done to make it work?

Thanks

M.

PS: On the manual page of http://www.php.net I couldn't find anything
about php & exchange...

--
Who is the ennemy?

attached mail follows:


Hello,

On 06/10/2003 04:44 PM, Matthias Wulkow wrote:
> a friend of mine is trying to set up an automated mailing function.
> The platform is Windows & he's using the last PHP release at this
> time.
> He asks me how to do it with Exchange, because it doesn't speak SMTP
> or not correctly? What is the matter? Is that true? But that's not
> really the question... could somebody point me to some documents where
> I could find out, what has to be done to make it work?

I do not see what he means by not speaking SMTP correctly. Anyway, if it
receives e-mail that you get, it also can relay messages that you send.
I think in the worst case you need to authenticate.

In that case you may want to try this class for composing and sending
messages. It comes with a sub class for sending messages via SMTP that
supports authentication.

http://www.phpclasses.org/mimemessage

You also need this class for the actual message delivery:

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

attached mail follows:


I am inserting a file via a PHP form. It works great, however, if there is a
word that has quotes in it, then it does not work at all.

Is there a way to make it so that MySQL will receive a word with "quotes?"

Thanks

-Steve Marquez
smarquezmarquez-design.com

attached mail follows:


On Wednesday 11 June 2003 04:28, Steve Marquez wrote:
> I am inserting a file via a PHP form. It works great, however, if there is
> a word that has quotes in it, then it does not work at all.
>
> Is there a way to make it so that MySQL will receive a word with "quotes?"

mysql_escape_string()

--
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
------------------------------------------
/*
NT (as in Windows NT) is short for "Nothing There".
*/

attached mail follows:


Addslashes()

http://us3.php.net/manual/en/function.addslashes.php

-M

-----Original Message-----
From: Steve Marquez [mailto:smarquezmarquez-design.com]
Sent: Tuesday, June 10, 2003 4:28 PM
To: MySQL List; PHP eMail List
Subject: Characters

I am inserting a file via a PHP form. It works great, however, if there
is a
word that has quotes in it, then it does not work at all.

Is there a way to make it so that MySQL will receive a word with
"quotes?"

Thanks

-Steve Marquez
smarquezmarquez-design.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=phpcrazyted.com

attached mail follows:


Are Classes and Objects supported in PHP 3.0.14?
 
I am getting an error: "Call to unsupported or undefined function
phpmailer()"
on a server running PHP 3.0.14 but it works in PHP 4.3.2
 
Thanks,
Don

 

  _____

This email and any files transmitted with it are strictly confidential and
may be privileged information. It is intended solely for the individual or
company to whom it is addressed and may not be copied, forwarded,
transmitted or otherwise distributed in any manner or form to any other
party. If you are not the intended recipient or the person responsible for
delivering this e-mail to the intended recipient, please indicate so and
return this email to the sender, after which, kindly delete it from your
computer as well as your email server. Without limitation, LCL Navigation
accepts no liability whatsoever and howsoever caused in connection with the
use of this email.

Are you on our eBLISS yet? It's simple yet amazing.
Just click here: http://www.lclnav.com/createaccount.html
to open a B2B account with us and do everything electronically 24/7.

Click <http://www.lclnav.com/new.html> here to find out "What's new" at LCL
Navigation.

 

attached mail follows:


Don,

Are you using phpmailer of http://phpmailer.sourceforge.net/ ???

Looks like:

require("class.phpmailer.php");

this is not properly configured! Please check if the path is going alright..

Regards,

Frank
----- Original Message -----
From: "Don" <donprolclcan.com>
To: "php list" <php-generallists.php.net>
Sent: Tuesday, June 10, 2003 10:33 PM
Subject: [PHP] Classes and Objects

Are Classes and Objects supported in PHP 3.0.14?

I am getting an error: "Call to unsupported or undefined function
phpmailer()"
on a server running PHP 3.0.14 but it works in PHP 4.3.2

Thanks,
Don

  _____

This email and any files transmitted with it are strictly confidential and
may be privileged information. It is intended solely for the individual or
company to whom it is addressed and may not be copied, forwarded,
transmitted or otherwise distributed in any manner or form to any other
party. If you are not the intended recipient or the person responsible for
delivering this e-mail to the intended recipient, please indicate so and
return this email to the sender, after which, kindly delete it from your
computer as well as your email server. Without limitation, LCL Navigation
accepts no liability whatsoever and howsoever caused in connection with the
use of this email.

Are you on our eBLISS yet? It's simple yet amazing.
Just click here: http://www.lclnav.com/createaccount.html
to open a B2B account with us and do everything electronically 24/7.

Click <http://www.lclnav.com/new.html> here to find out "What's new" at LCL
Navigation.

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

attached mail follows:


Hi,

Hope you can help me:

How can i do the following in PHP:

When a variable is for example:

$a = 7

I must do the following 6 * X and 1 * Y, but when $a = 4 it must only do 4 * X.

So every when the value is odd i must do # * X and # * Y..

Some examples or hints are very welcome! Sory that this is maybe a little bit vague... Questions? e-mail!

Regards,

Frank

attached mail follows:


this is untested but should get you going down the right road

and this is assuming that you add the value = (6*X + 1*Y)

you didn't say that, so I am just guessing.

<?php

$var = 4;
$x = 1;
$y = 2;
$value = 0;

if ( ($var % 2) == 0 ) {
  $value = ($var * $x);
} else {
  $value = ( ( ($var-1) * $x ) + $y );
}

echo $value;
?>

Give this a shot, it should give you the results that you are looking for.
But remember, this is untested, and just a guess as to the results you are
looking for.

Jim Lucas

----- Original Message -----
From: "Frank Keessen" <fkeessenplanet.nl>
To: <php-generallists.php.net>
Sent: Tuesday, June 10, 2003 2:22 PM
Subject: [PHP] Math with php

> Hi,
>
> Hope you can help me:
>
> How can i do the following in PHP:
>
> When a variable is for example:
>
> $a = 7
>
> I must do the following 6 * X and 1 * Y, but when $a = 4 it must only do 4
* X.
>
> So every when the value is odd i must do # * X and # * Y..
>
> Some examples or hints are very welcome! Sory that this is maybe a little
bit vague... Questions? e-mail!
>
> Regards,
>
> Frank
>

attached mail follows:


Hey,
I am getting something like this:

 <input type=checkbox name='id[loco package]' value=1>

I will be getting upto 5 of the above values, Thanks to John Holmes (from
this list) I know how to enter it into the database but how do i create a
session with the above?

The reason why i want to do this is,
1)user picks upto 5 packages to save to his account (done)
2)if the user is already logged in then the insert query is run and all goes
well (done)
3) if the user has not logged in then it should be saved as a session and he
should be presented with the login screen, after he logs in the insert query
should be run from the session data.....without the user re-picking the
packages(not done)

I was able to do the above (point 3) when i was working with a simple array
(eg: id[]=1) but am unable to do so when working with the newer one
(id[something]=1)....

Any help appreciated.
Thanks,
-Ryan

attached mail follows:


> I am getting something like this:
>
> <input type=checkbox name='id[loco package]' value=1>
>
> I will be getting upto 5 of the above values, Thanks to John Holmes
(from
> this list) I know how to enter it into the database but how do i
create a
> session with the above?
>
> The reason why i want to do this is,
> 1)user picks upto 5 packages to save to his account (done)
> 2)if the user is already logged in then the insert query is run and
all
> goes
> well (done)
> 3) if the user has not logged in then it should be saved as a session
and
> he
> should be presented with the login screen, after he logs in the insert
> query
> should be run from the session data.....without the user re-picking
the
> packages(not done)
>
> I was able to do the above (point 3) when i was working with a simple
> array
> (eg: id[]=1) but am unable to do so when working with the newer one
> (id[something]=1)....

Have you tried:

$_SESSION['id'] = $id;

Since you have register_globals on, I guess you'd use:

Session_register("id");

maybe... :)

---John W. Holmes...

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

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

attached mail follows:


On Jun 9, 2003, "John W. Holmes" claimed that:

|> Just one question, is there any way that when a person logs in via the
|> htaccess popup that i can know via my php script...and can i also get his
|> username?
|
|Have you read the chapter on HTTP Authentication? No. Read the very
|first paragraph:
|[snip]
|You're welcome.
|
|---John Holmes...

I love the brutal honesty on this list. Anywhere else in the world you
would be looked on as "evil" or "mean-spirited," but on a maling list,
you're [sometimes] older and wiser, and know how to do a search for "php
http authentication."

Jeff
--
Registered Linux user #304026.
"lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import"
Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED
Responses to this message should conform to RFC 1855.

attached mail follows:


Hi,
if i insert into a mysql table a row e.g.
   mysql_query("INSERT into TEST (testfield) VALUES ('This is a test')");
and the first field is an auto increment (e.g. NR),
how can i get the value of the auto increment NR i've actually inserted?

Tanks Harry

attached mail follows:


Hy,

try with mysql_insert_id() [ if you've set the first field as "index" in
your table ].

Regards.

"Harry.De" <harald.mohringgmx.de> a écrit dans le message de
news:20030610221941.62720.qmailpb1.pair.com...
> Hi,
> if i insert into a mysql table a row e.g.
> mysql_query("INSERT into TEST (testfield) VALUES ('This is a test')");
> and the first field is an auto increment (e.g. NR),
> how can i get the value of the auto increment NR i've actually inserted?
>
> Tanks Harry
>
>
>
>
>

attached mail follows:


On Tue, 2003-06-10 at 17:18, Harry.de wrote:
> Hi,
> if i insert into a mysql table a row e.g.
> mysql_query("INSERT into TEST (testfield) VALUES ('This is a test')");
> and the first field is an auto increment (e.g. NR),
> how can i get the value of the auto increment NR i've actually inserted?
>
mysql_insert_id()

in the future a search of the archive first, or a search of php.net
would have found this.
 
--
Tom

In a world without boundaries why
do we need Gates and Windows?

attached mail follows:


Well one thing that springs to mind is you could try to connect to their
mail server on port 110 & 995 and see if you get a response. Thats not
foolproof but that might be a good place to start...

-nate

Philip S wrote:
> Hi there,
> I was wondering whether someone could tell me whether it is possible to use
> PHP to check whether a user supplied email address is a pop address as
> opposed to a web based address like hotmail. Have done some searching but
> cant seem to turn any answers up.
> Thanx in advance for any replys,
> Phil S
>
>

attached mail follows:


Does you php or apache process have perms to do this?

"Billy" <hpsquareyahoo.com> a écrit dans le message de
news:20030608163627.42366.qmailpb1.pair.com...
> Dear all,
>
> i can't call the "htpasswd" command after i used RedHat 8 ( which i can
do
> so in Red Hat 7.2)
>
> do u have any idea/ suggestion?
>
> thx a lot
> HPS
>
>

attached mail follows:


We call quite a lot shell command in our system, e.g. /sbin/ifconfig, mv,
rm , unzip , zip, htpasswd
When we are using Red Hat+PHP 4.1.2+apache1.3, that's fine, no problem
But when we switch to Red Hat 8.0+PHP 4.2.2+apache2 , the system is fine,
EXCEPT htpasswd.

thx a lot.~
Billy

"Baroiller Pierre-Emmanuel" <baroillerdaoditu.com> wrote in message
news:20030610222438.71933.qmailpb1.pair.com...
> Does you php or apache process have perms to do this?
>
> "Billy" <hpsquareyahoo.com> a écrit dans le message de
> news:20030608163627.42366.qmailpb1.pair.com...
> > Dear all,
> >
> > i can't call the "htpasswd" command after i used RedHat 8 ( which i can
> do
> > so in Red Hat 7.2)
> >
> > do u have any idea/ suggestion?
> >
> > thx a lot
> > HPS
> >
> >
>
>

attached mail follows:


Hi...
You've made a bad query and there is no result...
mysql_fetch_row($result) => if no data found, you've got an error...

"Marcelo Luiz De Laia" <mlaiafcav.unesp.br> a écrit dans le message de
news:002201c32df1$49086100$b36691c8lbmsala52...
> What this message means?
>
> What it is the error?
>
> Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
> resource in f:\.....\none.php on line 286
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.488 / Virus Database: 287 - Release Date: 5/6/2003
>

attached mail follows:


Hey Stephen,
Check this out:

<?php

$bob = "dog";
$joe = "bob";

print ${bob};
print "<BR>";
print ${$joe};

?>

-Nate

Stephen Goddard wrote:
> Hi,
>
> Can anyone tell me what this does ${varname}
>
> I cant find any information as to what the braces do.
>
> Cheers
>
> Steve
>
>

attached mail follows:


Hi,

   I'm trying to configure php with xpm ( --with-xpm-dir=/usr/X11R6 ),
and I keep getting this error....

configure: error: Problem with libXpm.(a|so) or libX11.(a|so). Please
check config.log for more information.

config.log has this...

configure:35198: checking for the location of libXpm
configure:35216: result: /usr/X11R6

then further down, this.....

configure:36062: checking for XpmFreeXpmImage in -lXpm
configure:36093: gcc -o conftest -g -O2
       -L/usr/X11R6/lib -lX11
       -Wl,-rpath,/usr/local/ssl/lib -L/usr/local/ssl/lib
-Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/kerberos/lib
-L/usr/kerberos/lib conftest.c -lXpm -lpng -lz -ljpeg -lcurl -lbz2 -lz
-lssl -lcrypto -lresolv -lm -ldl -lnsl -lcurl -lz -lssl -lcrypto -ldl
-lssl -lcrypto -lresolv -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -ldl
-lz -lz >&5
/usr/X11R6/lib/libXpm.so: undefined reference to `__ctype_b'
/usr/X11R6/lib/libXpm.so: undefined reference to `_xstat'
/usr/X11R6/lib/libXpm.so: undefined reference to `_fxstat'
/usr/X11R6/lib/libXpm.so: undefined reference to `__ctype_tolower'
collect2: ld returned 1 exit status
configure:36096: $? = 1
configure: failed program was:
| #line 36069 "configure"
| /* confdefs.h. */

Red Hat 9 system, PHP 4.3.2, and apache 1.3.27. I installed the libX
binaries from sunsite.unc.edu ( libXpm.3.4f-ELF.tar.gz ). Can somone
shed some light on this problem?

attached mail follows:


That was a good suggestion about filtering headers.Thanks.

Perhaps this password protected archive should be
impletmented. Who is really the idiot in these
circumstances the few idiots that sends spam or the
thousands that just put up with???

Chris
------------------------

Quoting Richard Baskett <phpbaskettcase.com>:

> Yeah that's why I use this address
phpbaskettcase.com, I receive a whole
> bunch of junk mail to that address because of my
replies or questions to
> this list. I have tried to get the archives password
protected the way
> apple does it or other mailing lists do it, but I
didn¹t receive that much
> support so I would just say either deal with the spam,
create filters, so
> that anything that comes to your php address has to
have the php-general
> mailist list somewhere in the headers.. that way
everything else just gets
> junked.
>
> Cheers!
>
> Rick

>
> "Freedom and immorality can not co-exist because
freedom requires personal
> responsibility." - Unknown
>
> > From: myphp <myphpeastlothian.org>
> > Reply-To: myphp <myphpeastlothian.org>
> > Date: Tue, 10 Jun 2003 16:13:25 +0100 (GMT/BST)
> > To: Ben Houlton <kaoru_cuthotmail.com>
> > Cc: php-generallists.php.net
> > Subject: Re: [PHP] Re: Warning Spammer
> >
> > Just as well I didnt bother looking it up. LOL
> >
> > Thanks, and now that I realize that this list is
> > archived and any idiot can get my email them ...sigh...
> > too bad.
> >
> > ---------
> > Quoting Ben Houlton <kaoru_cuthotmail.com>:
> >
> >> taken straight from google.com translation page... (
> > i'm not really
> >> portuguese ;))
> >> ei.... myphp Well-taken care of with what it speaks
> > the Cellular one... it
> >> tb has heard... to remove myphpeastlothian.org of
> > our list he answers
> >> this
> >> email and he places to remove in them pardons the
> > upheaval... ok?
> >>
> >>
> >>
> >> --
> >> 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
> >
>
>

attached mail follows:


> That was a good suggestion about filtering headers.Thanks.
>
> Perhaps this password protected archive should be
> impletmented. Who is really the idiot in these
> circumstances the few idiots that sends spam or the
> thousands that just put up with???
>

yes well i dont know how they do it , but as soon as i joined the mailing
list apart from viewing the list in outlook news viewer i started recieving
shit loads of spam to my domain email , same with the mysql list , i joined
the mysql list work and i now recieve tonnes of spam everyday , and its
spread like a virus i think other people in the company having the same
domain are recieving spam too now :|

so do they get the emails from the archive ? ?if so password protect
please !!

attached mail follows:


> so do they get the emails from the archive ? ?if so password protect
> please !!

Which one? This list is archived on numerous sites.

attached mail follows:


At 01:36 11.06.2003, danielelectroteque.org said:
--------------------[snip]--------------------
>so do they get the emails from the archive ? ?if so password protect
>please !!
--------------------[snip]--------------------

Not necessarily from the archives - they might as well subscribe a bot
address to multitude of lists, and simply parse the mails for _real_
addresses. As soon as you post for the first time their bot will add your
email to the database.

Unfortunately a subscription confirmation is of no real value - they would
simply confirm the bots address...

And, to be honest: don't you want to "impress your girlfriend"?
*ducking away*

--
>O Ernest E. Vogelsinger
   (\) ICQ #13394035
    ^ http://www.vogelsinger.at/

attached mail follows:


i dont know u tell me, all i know is thats how i'm being mail bombed

>> so do they get the emails from the archive ? ?if so password protect
>> please !!
>
> Which one? This list is archived on numerous sites.

attached mail follows:


On Wed, Jun 11, 2003 at 10:45:15AM +1000, daniel wrote:
> i dont know u tell me, all i know is thats how i'm being mail bombed
>
> >> so do they get the emails from the archive ? ?if so password protect
> >> please !!
> >
> > Which one? This list is archived on numerous sites.
>
So what your saying is that we password protect from ppl googleing up
answers so one person can avoid spam? I personaly think that day will be
a sad one. As of right now I see no php value to this thread so a;;
rplies will be nicely sent to /dev/null .

PS. Look into a good e-mail filter.
--
Jerry M. Howell II

attached mail follows:


And, to be honest: don't you want to "impress your girlfriend"?
*ducking away*

????

attached mail follows:


i dont know , i wasnt suggesting that , its silly , but all i know is i got
hit pretty hard with spam once i joined the list , i have proof because i
started getting the same my work email :|, any suggestions for a good
filter maybe on the server side , i've tried to get my mate to install one
i dont know if he has yet , but i really wish there was a way to get these
people back , i wish it was made illegal , i can honestly say not once has
spam worked on me ok enough now > /dev/null :O

attached mail follows:


Spamassassin with Razor works a treat.

> i dont know , i wasnt suggesting that , its silly , but all i know is i got
> hit pretty hard with spam once i joined the list , i have proof because i
> started getting the same my work email :|, any suggestions for a good
> filter maybe on the server side , i've tried to get my mate to install one
> i dont know if he has yet , but i really wish there was a way to get these
> people back , i wish it was made illegal , i can honestly say not once has
> spam worked on me ok enough now > /dev/null :O

attached mail follows:


Hey,
I myself use MailWasher pro....its a great little tool which will bounce
back spam mail to the spammer as if your address does not exist any
more...plus it automatically blacklists spam via spamcop and a crapload of
other features...
check it out here : http://entier.ecosm.com/system/redir.php?ad=15&aid=2310

Cheers,
-Ryan

----- Original Message -----
From: "Kevin Saenz" <ksaenzspinaweb.com.au>
To: <danielelectroteque.org>
Cc: <php-generallists.php.net>
Sent: Wednesday, June 11, 2003 2:06 AM
Subject: Re: [PHP] Re: Warning Spammer

> Spamassassin with Razor works a treat.
>
>
> > i dont know , i wasnt suggesting that , its silly , but all i know is i
got
> > hit pretty hard with spam once i joined the list , i have proof because
i
> > started getting the same my work email :|, any suggestions for a good
> > filter maybe on the server side , i've tried to get my mate to install
one
> > i dont know if he has yet , but i really wish there was a way to get
these
> > people back , i wish it was made illegal , i can honestly say not once
has
> > spam worked on me ok enough now > /dev/null :O
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


The MySQL mailing list is just a list where the emails people send for help
get send to EVERYONE on the mailing list so every message sent to the MySQL
mailing list gets sent to you and everyone else. It's not spam it's just a
crazymailing list idea... I joined of a day a, went to bed next morning had
110 new messages.
<danielelectroteque.org> wrote in message
news:43481.203.15.102.65.1055288164.squirrelwww.electroteque.org...
> > That was a good suggestion about filtering headers.Thanks.
> >
> > Perhaps this password protected archive should be
> > impletmented. Who is really the idiot in these
> > circumstances the few idiots that sends spam or the
> > thousands that just put up with???
> >
>
> yes well i dont know how they do it , but as soon as i joined the mailing
> list apart from viewing the list in outlook news viewer i started
recieving
> shit loads of spam to my domain email , same with the mysql list , i
joined
> the mysql list work and i now recieve tonnes of spam everyday , and its
> spread like a virus i think other people in the company having the same
> domain are recieving spam too now :|
>
> so do they get the emails from the archive ? ?if so password protect
> please !!
>
>

attached mail follows:


Nope sorry I never believe in paying for software, as long as there is
a free alternative. :)
As long as I can develop and support it why should I buy software :)

> Hey,
> I myself use MailWasher pro....its a great little tool which will bounce
> back spam mail to the spammer as if your address does not exist any
> more...plus it automatically blacklists spam via spamcop and a crapload of
> other features...
> check it out here : http://entier.ecosm.com/system/redir.php?ad=15&aid=2310
>
> Cheers,
> -Ryan
>
>
> ----- Original Message -----
> From: "Kevin Saenz" <ksaenzspinaweb.com.au>
> To: <danielelectroteque.org>
> Cc: <php-generallists.php.net>
> Sent: Wednesday, June 11, 2003 2:06 AM
> Subject: Re: [PHP] Re: Warning Spammer
>
>
> > Spamassassin with Razor works a treat.
> >
> >
> > > i dont know , i wasnt suggesting that , its silly , but all i know is i
> got
> > > hit pretty hard with spam once i joined the list , i have proof because
> i
> > > started getting the same my work email :|, any suggestions for a good
> > > filter maybe on the server side , i've tried to get my mate to install
> one
> > > i dont know if he has yet , but i really wish there was a way to get
> these
> > > people back , i wish it was made illegal , i can honestly say not once
> has
> > > spam worked on me ok enough now > /dev/null :O
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
--
Regards,

Kevin Saenz
 
Spinaweb
Your one stop shop for I.T solutions.
 
Ph: 02 4620 5130
Fax: 02 4625 9243
Mobile: 0418455661
Web: http://www.spinaweb.com.au

attached mail follows:


Anyone know how to change the magic_quotes_gpc? I need it to be on in PHP.

Running PHP 4.1.2

Thanks,

Steve Marquez
smarquezmarquez-design.com

attached mail follows:


> Anyone know how to change the magic_quotes_gpc? I need it to be on in
PHP.
>
> Running PHP 4.1.2

Change it in php.ini or in an .htaccess file.

---John W. Holmes...

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

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

attached mail follows:


Ok - let the war begin...

Question: Why doesn't the PHP community support using an Hungarian style of programming if it prevents errors?? I've gotten too darn many times now by a type mismatch using what the 'Bible' of PHP programming style recommends - PHP Coding Standard by Fredrik Kristiansen. I'm sorry - $MonkeyBrains doesn't tell me anything about what type is or what type it holds. $intMonkeyBrains DOES and I can tell instantly that $intValue shouldn't hold $strValue without a type coersion. (I know PHP will blindly stick the string in and replace the integer...)

Question: Is there a better way in classes to access/modify var's other than get_var, put_var functions? Works great for me and I know whether I'm saving a variable or accessing it. Sure, I'd like to be able to use a VB style Set/Get property but who wouldn't??

Feel free to email me directly if this will generate a firestorm in the maillist.

Robin E. Kopetzky
Black Mesa Computers/Internet Services
www.blackmesa-isp.net

attached mail follows:


At 01:34 11.06.2003, Sparky Kopetzky said:
--------------------[snip]--------------------
>Ok - let the war begin...

no war at all...

>Question: Why doesn't the PHP community support using an Hungarian style of
>programming if it prevents errors?? I've gotten too darn many times now by a

It's always a matter of personal likes and dislikes. If you feel
comfortable with it, then stick to it (I do it sometimes, not always, as I
feel it's more important to try to hide stuff like private instance data
than to blindly adhere to rigid coding standards, as long as you can read
your code two months later)

>Question: Is there a better way in classes to access/modify var's other than
>get_var, put_var functions? Works great for me and I know whether I'm saving

That's how OO is meant to be. Do it this way, even if the language doesn't
enforce it. There's _really_ only a very small performance loss (approx.
0.01 msec per access). However take care - accessing _big_ data (like huge
arrays, for example) using access functions may instantly measurable
decrease performance, since variables are _copied_ unless you're using
references.

>a variable or accessing it. Sure, I'd like to be able to use a VB style
>Set/Get property but who wouldn't??

Why don't you do it?

class CSampleClass
{
        var $m_a = 'value a';
        var $m_b = 'value b';

        function &Get($varname)
        {
                if (array_key_exists($varname,
get_class_vars(get_class($this))))
                        return $this->$varname;
                // demo only
                echo '[', get_class($this), "::Get: class variable doesn't
exist: $varname]";
                return null;
        }
        function &Set($varname, $value)
        {
                if (array_key_exists($varname,
get_class_vars(get_class($this))))
                        $this->$varname = $value;
                else
                        echo '[', get_class($this), "::Set: class variable
doesn't exist: $varname]";
        }
}

$sc = new CSampleClass();
echo "m_a = ", $sc->Get('m_a'), ", m_b = ", $sc->Get('m_b'),
     ", other = ", $sc->Get('other'), "\n";
$sc->Set('m_a', 'new data for m_a');
$sc->Set('m_b', 'new data for m_b');
$sc->Set('other', 'new data for other');
echo "m_a = ", $sc->Get('m_a'), ", m_b = ", $sc->Get('m_b'),
     ", other = ", $sc->Get('other'), "\n";

--
>O Ernest E. Vogelsinger
   (\) ICQ #13394035
    ^ http://www.vogelsinger.at/

attached mail follows:


On Tue, 2003-06-10 at 16:34, Sparky Kopetzky wrote:
> Ok - let the war begin...
>
> Question: Why doesn't the PHP community support using an Hungarian
> style of programming if it prevents errors?? I've gotten too darn many

Haven't really seen this one flamed over on this list before, but maybe
someone will step in an freak out later on. At any rate, you make the
assumption here that Hungarian notation somehow inherently prevents
errors. This is believed by some to be true, and by others, to be
false. Hungarian notation does provide a set of tools for helping to
prevent errors, true--but any proper coding convention does that. Past
that, there is little to choose between them except personal
preference.

There are compelling arguments both for and against any given
convention, and all have their adherents. In the end, one must be
chosen--and for this project, one has been. Personally, I think it is
an excellent choice.

> times now by a type mismatch using what the 'Bible' of PHP programming
> style recommends - PHP Coding Standard by Fredrik Kristiansen. I'm
> sorry - $MonkeyBrains doesn't tell me anything about what type is or
> what type it holds. $intMonkeyBrains DOES and I can tell instantly
> that $intValue shouldn't hold $strValue without a type coersion. (I
> know PHP will blindly stick the string in and replace the integer...)

That's the price of a loosely-typed language. Buys you more than it
costs IMHO, but I understand if you differ. :)

> Question: Is there a better way in classes to access/modify var's other
> than get_var, put_var functions? Works great for me and I know whether
> I'm saving a variable or accessing it. Sure, I'd like to be able to
> use a VB style Set/Get property but who wouldn't??

Well, you could check out the experimental overload extension at
http://www.php.net/manual/en/ref.overload.php, which may be what you're
looking for. Otherwise, just be careful with your references to try to
keep array/object copies down, and use accessor methods.

> Feel free to email me directly if this will generate a firestorm in the
> maillist.

Well, at least you didn't mention emacs or vi. ;)

Regards,

Torben

--
 Torben Wilson <torbenphp.net> +1.604.709.0506
 http://www.thebuttlesschaps.com http://www.inflatableeye.com
 http://www.hybrid17.com http://www.themainonmain.com
 -----==== Boycott Starbucks! http://www.haidabuckscafe.com ====-----

attached mail follows:


Cpt John W. Holmes wrote:
> Agree 100%. Don't assume that just because you use JSP, or any other
> language, your program is going to instantly "scale well" and be easy to
> maintain. You can write crappy, inefficient code in any language. You can
> also write good programs in most any language if you put the proper planning
> into it before hand.

Ok, I've got answers concerning the learning curve and maintainability
and some pros and cons that I have found very useful.

Now the one last point that I would like to really find out about is
persistence. I keep hearing that you can get *true* persistence with
jsp/servlets/beans/whatever. I'm still trying to find out more details
on this as I can't see how you can get that since HTML is stateless and
whatever the backend is it all eventually turns into an HTML connection ...

Sessions in PHP are nice but as everyone knows they don't allow for true
persistence. And if you want to have your objects persist over a
session, that's even more work (and in my short programming career I
have not yet found a case where persisting a PHP object across a session
was worth the trouble/overhead).

Can anyone offer an opinion on this? Is persistence with jsp that much
easier compared to PHP? And if true persistence is possible is it all
it's cracked up to be?

I've often dreamed of being able to have true persistence but if I had
it maybe I wouldn't find it all that useful once I'd had a go with it.

Thanks,

Jean-Christian Imbeault

attached mail follows:


Cpt John W. Holmes wrote:
> Agree 100%. Don't assume that just because you use JSP, or any other
> language, your program is going to instantly "scale well" and be easy to
> maintain. You can write crappy, inefficient code in any language. You can
> also write good programs in most any language if you put the proper planning
> into it before hand.

Ok, I've got answers concerning the learning curve and maintainability
and some pros and cons that I have found very useful.

Now the one last point that I would like to really find out about is
persistence. I keep hearing that you can get *true* persistence with
jsp/servlets/beans/whatever. I'm still trying to find out more details
on this as I can't see how you can get that since HTML is stateless and
whatever the backend is it all eventually turns into an HTML connection ...

Sessions in PHP are nice but as everyone knows they don't allow for true
persistence. And if you want to have your objects persist over a
session, that's even more work (and in my short programming career I
have not yet found a case where persisting a PHP object across a session
was worth the trouble/overhead).

Can anyone offer an opinion on this? Is persistence with jsp that much
easier compared to PHP? And if true persistence is possible is it all
it's cracked up to be?

I've often dreamed of being able to have true persistence but if I had
it maybe I wouldn't find it all that useful once I'd had a go with it.

Thanks,

Jean-Christian Imbeault

attached mail follows:


hi!

i run some really big apps (crms/email/shopping
carts/directories/forums/etc) that make use of persistance type data but
NEARLY all of it is just put in and removed from the DB - just all kinds
of little/big functions that need to maintain some data or state(s) of
some data - my system averages 20 queries per second - thousands and
thousands and thousands of simple queries - the only persistance is with
mysql connections

just my two cents

On Tue, 2003-06-10 at 17:51, Jean-Christian Imbeault wrote:
> Cpt John W. Holmes wrote:
> > Agree 100%. Don't assume that just because you use JSP, or any other
> > language, your program is going to instantly "scale well" and be easy to
> > maintain. You can write crappy, inefficient code in any language. You can
> > also write good programs in most any language if you put the proper planning
> > into it before hand.
>
> Ok, I've got answers concerning the learning curve and maintainability
> and some pros and cons that I have found very useful.
>
> Now the one last point that I would like to really find out about is
> persistence. I keep hearing that you can get *true* persistence with
> jsp/servlets/beans/whatever. I'm still trying to find out more details
> on this as I can't see how you can get that since HTML is stateless and
> whatever the backend is it all eventually turns into an HTML connection ...
>
> Sessions in PHP are nice but as everyone knows they don't allow for true
> persistence. And if you want to have your objects persist over a
> session, that's even more work (and in my short programming career I
> have not yet found a case where persisting a PHP object across a session
> was worth the trouble/overhead).
>
> Can anyone offer an opinion on this? Is persistence with jsp that much
> easier compared to PHP? And if true persistence is possible is it all
> it's cracked up to be?
>
> I've often dreamed of being able to have true persistence but if I had
> it maybe I wouldn't find it all that useful once I'd had a go with it.
>
> Thanks,
>
> Jean-Christian Imbeault
--
Jimmy Brake <jimmyisurge.com>

attached mail follows:


Hi,

As a matter of curiosity I've created a little script that will check what
screen resolution visitors to my site are using and store the information
into a MySQL database.

So far, I'm recording the users IP address, screen resolution, and the
date/time they visited. Now I'd like to be able to use this same script
for all my pages - but I don't want to have to add in a page title each
time I want to use the script, nor do I want to make page titles in PHP for
all my pages.

Is there a command in PHP that can get what's between the <title> and
</title> tags? I found a few scripts that can get page titles if they are
given a URL to go seek - but these scripts seem to store most of the pages
HTML code in memory and I don't think my web host would enjoy that.

TIA
-Tim

attached mail follows:


Forgive me if my question is confuing, but I am confused so asking the
question properly is difficult.

Currently, I have a PHP application that produces barcodes in HTML. It
uses the following line:

  // Create the Barcode
  if ($obj) {
     if ($obj->DrawObject($xres)) {
         echo "<td><img src='./image.php?code=" . $barcode . "&style=" .
$style . "&type=" . $type .
                 "&width=" . $width . "&height=" . $height . "&xres=" .
$xres . "&font=" . $font . "'></td>";
     } else {
         echo "<td><font color='#FF0000'>" . ($obj->GetError()) .
"</font></td>";
     }
  } else {
    echo "<td><font color='#FF0000'>Obj is false; Barcode = " . $barcode
. "</font></td>";
  }

where image.php is creating the image. Now I need to do the same thing
except for a PDF file.. In the following code, I am reading in a JPEG
file, but I want to avoid the use of a file, and want to use a "data
stream" instead.

$fn = "dsc_5525.jpg";
$fh = fopen($fn, "r");
$data = fread($fh, filesize($fn));
fclose($fh);
$image = $pdf->jfif_embed($data);
$pdf->image_place($image, 50, 0, $firstpage);

In other words, I want to put the barcode date into $data and I am not
sure how to do this. Any help is greatly appreciated.

Todd
--

attached mail follows:


How do I make it so when I log in the options such as delete message, edit message, are viewable, but when someone else logs in they can't view it. Could someone guide me to a tutorial or alike?
Thanks.

attached mail follows:


I've set the SMTP setting correctly (I've checked like 50 times) but it sill comes up with:
Warning: mail(): Failed to connect to mailserver at "mail.ihug.com.au" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Inetpub\wwwroot\test1.php on line 6

Any ideas?
Thanks.
-Ben

attached mail follows:


On Wednesday 11 June 2003 03:57 am, Ben Houlton wrote:
> I've set the SMTP setting correctly (I've checked like 50 times) but it
> sill comes up with: Warning: mail(): Failed to connect to mailserver at
> "mail.ihug.com.au" port 25, verify your "SMTP" and "smtp_port" setting in
> php.ini or use ini_set() in C:\Inetpub\wwwroot\test1.php on line 6
>
> Any ideas?
> Thanks.
> -Ben

does your smtp server requires authentication ?

attached mail follows:


Hi,

  How do i find schema of my active directory or ldap
server using php functions.
  
  e.g., in RDBMS it is possible to write a query to
find all database in the system, all table in the
database , all collumn_names in the table .....
Is there any function in php or c to know what is the
schema of my Active Directory or Ldap server.
  
    I am writting a web based admin tool for ldap
server using PHP. If you have any good code samples
of PHP + ldap , Pl send me.

Thanks in advance :)
                    

regards
CVR

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

attached mail follows:


Hi,

I know what the problem is, I also have no "cure" for it though - I'm still
investigating.

libcrypto (part of OpenSSL / SSH I believe) come standard with FreeBSD as
part of the source tree, installed in /usr/lib. There you should have a
libcrypto.so.1 & 2. SOMEWHERE a certain port also installs a libcrypto.so.4
in /usr/local/lib, and that is the culprit. Where it comes from, I don't
know as of yet.

mod_php for some reason, links against the libcrypto.so.2 as well as
libcrypto.so.4 and those two libraries conflict and cause the core dump. I
have reverted back to my old PHP (4.1.2) and it is still working fine now.
From what I can see, it's only the newest PHP (4.3.2) that has this problem.
I should actually take some time to bring this to the attention of the port
maintainers, but as I said - I'm not 100% yet on what the 3rd port is in
question here (that installs libcrypto.so.4).

You can check what your PHP is linked against with ldd. Basically, there
should only be one module type of each, and not 3 or 4 of the same (like I
had with libcrypto).

--
me

----- Original Message -----
From: "John Mearns" <johnmpsi.pair.com>
To: <savagesavage.za.org>
Sent: Tuesday, June 10, 2003 9:24 PM
Subject: usenet post on frebsd php port problem

> Hey, I just saw your post to php.general with apache dumping core with the
> new php. I seem to be having the same issue and wondered if you came up
> with a solution. I've went as far as removing both the apache13-modssl and
> mod_php4 and reinstalling with no luck. I've noticed I can start apache
> without ssl and its fine. Or I can start with ssl as long as I remove php
> support. Just wondered if you have managed to find a solution before I
> just compile myself from source :D
> Thanks,
> John
>