[PHP] Re: xslt_process

2002-07-22 Thread Peter Clarke



Ctan wrote:
 > Hi all,
 >
 > I'm trying to use xslt_process() to transform a variable containing 
XML data
 > with an xsl file into a result using PHP. Incidentally the XML is from an
 > external source, i.e. a database. However despite following the 
examples in
 > www.php.net I am unable to do so. The code works out to something 
like this:
 >
 >
 > if (! empty($searchword ))
 >
 >$query = "SELECT aml FROM arguments WHERE aml LIKE '%$searchword%'";
 >$result = mysql_query($query) or die ("Query failed");
 >$line = mysql_fetch_array($result, MYSQL_ASSOC);
 >
 > var_dump($line);
 >
 > // Create an array
 > $arguments = array('/_xml'=> $line);
 >
 > //XSL file
 > $xsl = "./sheet1.xsl";
 >
 > // Create an XSLT processor
 > $xslthandler = xslt_create();
 >
 > // Perform the transformation
 > $html = xslt_process( $xslthandler, 'arg:/_xml', $xsl, NULL, $arguments);
 >
 > // Detect errors
 > if (!$html) die ('XSLT processing error: '.xslt_error($xslthandler));
 >
 > // Destroy the XSLT processor
 > xslt_free($xslthandler);
 >
 > // Output the resulting HTML
 > print $html; 
 >
 >
 > What I get on the screen is:
 >
 >
 > Array ( [0] => "With the contents of my variable...")
 >
 >
 > And:
 >
 >
 > Warning: Sablotron error on line 1: XML parser error 2: syntax error in
 > /home/httpd/html/ctan/resultworkingcopy2.php on line 93
 > XSLT processing error: XML parser error 2: syntax error
 >
 >
 > What gives? I'm really frustrated and would greatly appreciate it if 
someone
 > would point out where I've made an error before I start ripping all 
my hair
 > out! Thanks... Thanks... Thanks!
 >
 > Regards,
 > Chia

I may be missing something, but your not parsing XML. Your $line
contains an array of data from the database, not xml.






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




[PHP] Re: xslt_process

2002-07-22 Thread Peter Clarke



Ctan wrote:
> Hi all,
> 
> I'm trying to use xslt_process() to transform a variable containing XML data
> with an xsl file into a result using PHP. Incidentally the XML is from an
> external source, i.e. a database. However despite following the examples in
> www.php.net I am unable to do so. The code works out to something like this:
> 
> 
> if (! empty($searchword ))
> 
>$query = "SELECT aml FROM arguments WHERE aml LIKE '%$searchword%'";
>$result = mysql_query($query) or die ("Query failed");
>$line = mysql_fetch_array($result, MYSQL_ASSOC);
> 
> var_dump($line);
> 
> // Create an array
> $arguments = array('/_xml'=> $line);
> 
> //XSL file
> $xsl = "./sheet1.xsl"; 
> 
> // Create an XSLT processor
> $xslthandler = xslt_create();
> 
> // Perform the transformation
> $html = xslt_process( $xslthandler, 'arg:/_xml', $xsl, NULL, $arguments);
> 
> // Detect errors
> if (!$html) die ('XSLT processing error: '.xslt_error($xslthandler));
> 
> // Destroy the XSLT processor
> xslt_free($xslthandler);
> 
> // Output the resulting HTML
> print $html;  
> 
> 
> What I get on the screen is:
> 
> 
> Array ( [0] => "With the contents of my variable...")
> 
> 
> And:
> 
> 
> Warning: Sablotron error on line 1: XML parser error 2: syntax error in
> /home/httpd/html/ctan/resultworkingcopy2.php on line 93
> XSLT processing error: XML parser error 2: syntax error
> 
> 
> What gives? I'm really frustrated and would greatly appreciate it if someone
> would point out where I've made an error before I start ripping all my hair
> out! Thanks... Thanks... Thanks!
> 
> Regards,
> Chia

I may be missing something, but your not parsing XML. Your $line 
contains an array of data from the database, not xml.





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




RE: [PHP] email

2002-07-21 Thread Peter

> >try doing a echo eg
> >
> >$mail = mail( $to, $subj, $Message );
> >echo $to;
> >echo "";
> >echo $subj;
> >echo "";
> >echo $Message;
> >echo "";
> >echo $mail;
> >
> >and see if that is setting the variables...if $mail = 1 then on 
> php's side mail is sent if it's 0 then u have an error
> 
> How can I see what the error is?
> 


what do the echo's say? if they have no input then there's a error

also  but not 100% on this if u put 
error_reporting=E_ALL & ~E_NOTICE in php that might tell u where bouts the error is.. 


Re: Re[4]: [PHP] Submitting to cgi script

2002-07-21 Thread Peter James

> This worked now my question is. Is there a way to force it to submit with
> POST rather than GET
>

Look at the CURL functions on php.net



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




[PHP] Re: get line from file

2002-07-19 Thread Peter

You can try this.

"; // Display each line read from datafile

}

?>


"Yamin Prabudy" <[EMAIL PROTECTED]> schreef in bericht
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I got a file line like this
>
> 
> This is a line1
> this is a line2
> this is a line3
> this is a line4
> 
>
>
>
> how can i grep out the line1,line2,line3 ??
> do anyone out there have any idea ?
>



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




[PHP] Sorting array based on key string

2002-07-18 Thread Peter J. Pieczora

Pardon my sloppy explanation but here it is:

how can i sort an array based on key element ie.

key values are: a1, a2 ,a3 ..., b1, b2 ,b3, ...c1, c1, c3...
so doing this:
while (list($k, $v) = each($data)) {
for ($i=0; $i";
}
will list all the $k $v .
a = foo
a = bar
b = another foo
...
and so on

Now, how can i sort it according to $k[0]
where $k[0] = a, than the same for all b's and so on.


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




Re: [PHP] ErrorDocument 404 & Form

2002-07-18 Thread Peter

If you removed the
ErrorDocument 404 /phpinfo.php
from the apache conf (or reset it to original value), what happens? Do you
get a standard 404 not found error page?


"Fabien Penso" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Matt a écrit :
>
>  >> Well it still is in GET method because the url does still exist with
the
>  >> ?plop=foobar but in case I want to use POST method (which I will as my
>  >> form has huge textarea) everything disappear.
>  >> Also this is a turn around I don't like, I would first understand why
it
>  >> doesn't work, and if I can fix it.
>
>  > I  browsed the the apache source, and it looks to me that the message
body
>  > is simply read and dumped into the bit bucket on a 404 with an
ErrorDocument
>  > (and thus isn't passed as part of the internal request to the
ErrorDocument
>  > itself).  Perhaps you ought to ask the apache list.
>
> Apparently, as I do read
> http://www.geocrawler.com/archives/3/182/1999/4/0/1646542/, it's an
> Apache problem.
>
> Thanks, I move on an Apache user list :)
>
> --
> Fabien Penso <[EMAIL PROTECTED]> | LinuxFr a toujours besoin de :
> http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/



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




[PHP] Re: Sessions / logins / cookies / security

2002-07-17 Thread Peter James

There's a good article on authentication at phpbuilder.com

http://www.phpbuilder.com/columns/tim2505.php3

that may provide an idea or two.

- Original Message -
From: "Chad Day" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 16, 2002 10:30 AM
Subject: Sessions / logins / cookies / security


> I asked something similar a little while ago, but didn't do a good job
> clarifying.
>
> What I'm looking to do is when a user logs in, I start up the session.. I
> then have the registered session var to verify they are authenticated as
> they move throughout the site.
>
> Now, when they close the browser and come back, I want them to still be
> authenticated.  Obviously, I have to set a cookie.  But what do I set?  Do
I
> set just their user ID?  The MD5 of their password?  What's the most
secure
> way, that's not easily spoofed?  I don't know that much about cookies, but
> if I just use a user ID, couldn't someone just change that ID value and
> 'become' another user?
>
> Thanks for any advice,
> Chad
>



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




[PHP] Re: Restart process from code?

2002-07-17 Thread Peter

You need a program to control the ASP process. This is proably some sort of
command line tool and you just put whatever you would type in the
commandline into the exec() function. (in quotes of course!)


"Noah Spitzer-Williams" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is there a way to restart a process (actually the process to handle ASP
> pages) from code?
>
> - Noah
>
>



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




[PHP] Re: ErrorDocument 404 & Form

2002-07-17 Thread Peter

Can posting to a non existent page give a different error? I know it gives
404 on mine.
Probably not much help but it's a thought!

"Fabien Penso" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi.
>
> I got a trouble I don't know if Apache or PHP is in fault. Let's say I
> got something like :
>
> ErrorDocument 404 /engine.php
>
> If I make a form which use POST and redirect to something which doesn't
> exist, then a phpinfo() in engine.php won't show the variables. Am I
> wrong thinking it should ? Is there a way to make this work ?
>
> Thanks.
>
> --
> Fabien Penso <[EMAIL PROTECTED]> | LinuxFr a toujours besoin de :
> http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/



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




Re: [PHP] Of Jobs and Certs

2002-07-17 Thread Peter J. Schoenster


On 17 Jul 2002 at 12:55, Miguel Cruz wrote:

> On Wed, 17 Jul 2002, Martin Clifford wrote:
> > I'd like to get everyone's input on Jobs and Certs.  I know there
> > are a couple Certifications for web developers out there, such as
> > the CIW and CWP certifications.
> 
> I don't know if this is what you want to hear, but I can tell you that
> as a rule, I don't hire people who advertise certifications on their
> resume.
> 
> I've found that they correlate pretty strongly with incompetence, to
> the point where nothing saves me more time when filtering through
> resumes than first throwing away the ones covered with acroyms
> starting with C or MC.
> 
> People who have the skills, demonstrate it through their work
> experience, walking through their sample code with me, and their
> ability to explain how they would perform a task. People who trumpet
> certifications overwhelmingly seem to be people who were unable to
> advance their careers based on the strength of their skills, and so
> chose to resort to a paper method instead. I'm not saying anything
> about you here, just suggesting that you consider alternate means of
> impressing employers.

:) ... this is a laugh. 

There must be one Miguel for 10,000 other managers. What Miguel said above is what any 
rational, competent manager would do. I cannot tell you how many times I send my 
resume but I put a link to 
my code (they can download entire apps so they can see not only snippets but how I 
organize or disorganize my code). No one, not one, has ever bothered to look at my 
code and questioned me. I 
interviewed with Jeffrey Friedl of regex fame and even he did not look at my code 
(although when I said I did not know something he laughed and said he did not know 
either, "that's why we have 
reference books").

I think getting the CERTS is not bad. Certainly the smart person will do as Miguel 
suggests, but I think he's in the VAST minority. I know a guy who has a consulting 
firm. It's a M$ shop. They BLAST 
their M$ certs everywhere. The software business is too new imho. Most people who 
should know better will be bamboolzed by CERTS. 

One manager sent out an email to everyone who responded to an ad. He offered general 
suggestions to everyone. I thought that was a dern good thing. He suggested people 
send Brainbench exam 
results. I'm sure certs would have helped as well. Even though this guy was "nice" I 
doubt he could get around code. imho, there are just far, far too few people who can 
judge someone by their code. I 
say get the certs. Personally, I could never work for someone who needed that so I 
don't bother, but if you want a job, I can't see that it hurts AT ALL.

Heck, I'm gonna rant if I keep going ... ever have someone ask you if you know FTP :) 
... like a smart person could not show another smart person about that in 15 minutes. 
It's just amazing  what 
passes for competence in the IT world.  I had a boss who I swear sincerely said he 
could "double click a mouse". The guy was serious. I did not last at that job :)

Peter






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




[PHP] Tips for better PHP, wish I read yesterday

2002-07-17 Thread Peter J. Schoenster

Hi,

Awhile back I was asking for just what I'm reading here:

http://www.php9.com/index.php/section/articles/name/PHP%20Guidelines

Some snippets to give you an idea what you will find on that page:

> Another mistake I see around a lot is people writing scripts that will
> not work if register_globals is off. In the next release of PHP
> register_globals will be off by default, so you need to start writing
> your scripts with this in mind.


>  $name = 'Bill';
> echo "My name is
> $name"; ?>
> 
> No, don't do that.


> 
> 
> This is a short-hand in PHP for:
> 
> 


I have come across some of this in the documentation but not in your face like it is 
here (and 
should be).

Does anyone have any more links to articles like that?

Thanks,
Peter

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




Re: [PHP] Classes vs. Functions

2002-07-16 Thread Peter J. Schoenster

On 17 Jul 2002 at 12:43, Michael Hall wrote:


> There is no simple answer here. I have started using classes where I
> find I am writing a lot of related functions that share similar
> parameters. Database connection and queries are a good example.
> Authentication is another.

Yeah.

> I have another class that builds forms, because I just hate the tedium
> of coding HTML forms by hand. It is really just a collection of
> functions, though, and could work fine as such.

This is a gray area imho. I'd leave all html to the person who cares 
what it looks like, not what it does. I usually also use a code 
generator to create html and their forms but they are a separate 
layer. I use templates, wish a lot more php people would as well 
although I've seen some weird stuff where in this one bb they store 
templates in the database. That's interesting. 

> I'm still learning/exploring ... I am always guided by the principle
> that whatever makes less work for me (but achieves the same result) is
> probably a good thing.
> 
> IMHO classes are best for more universal code that really can be used
> in many different places. My functions tend to be more application
> specific.

Yeah, can't say too much more than that. There is the style of coding 
where one application is completely independent of another. Then you 
begin to realize, gee ... I could just cut and paste this code. And 
then there's always the funny repetion of the exact same code every 
30 lines or so (depending on memory of programmer I guesss). 
Eventually you begin to realize gee ... could I put this stuff in a 
library. A CLASS after all is just a collection of functions with a 
data model. But ... there is modular and then there is OO imho. I'm a 
die hard modular programmer who is trying to think in a more OO way. 
But of course when you just gotta get something done, do it. The 
value in spending a bit more time going the modular/OO route is that 
your application will be easier to evolve and debug.

Peter-- http://www.readbrazil.com/
Answering Your Questions About Brazil


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




[PHP] mcrypt

2002-07-16 Thread Peter

Howdy all..
does any one know of another place i can download a win32 ver of mcrypt other than
http://mcrypt.hellug.gr/  ?

as that site crashes my browser when i click any link on the page...

Cheers 

Peter 
"the only dumb question is the one that wasn't asked" 
 


[PHP] pros and cons of ezpublish

2002-07-16 Thread Peter J. Schoenster

Hi,

Someone wants to know what I can do with ezpublish and so I've downloaded 
it.

Wow ... just looking at it now. What a package. ezpublish. 

I'd like to test this on a virtural server (can't afford my own box on the net) and I 
have a host where I can modify my apache conf files ... but I wonder. I've even 
got access to imagemagick but I have to call it direct. 

Anyone with some experience or advice on ezpublish?  It's about 14 meg 
uncompressed. Bloatware or is it worth the effort?

Thanks,

Peter

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




Re: [PHP] Search Page question

2002-07-16 Thread Peter J. Schoenster

On 16 Jul 2002 at 10:51, Mark McCulligh wrote:

> I have newbie question.
> 
> I am building a search page that will return any number of records and
> want to display only 30 at a time say.  Then have one of though "Page
> 1 of 3  [1] [2] [3] Next>" on top of the record list.
> 
> What is the best way to do this.
> 
> I was looking at using the LIMIT feature in MySQL, but the MySQL
> manual said that if you use ORDER BY with LIMIT in the same SELECT it
> does the LIMIT before the ORDER BY.  Therefore it does the limit then
> orders the limit list only, not order the entire list then returns the
> limit from that.  Is this true? -OR- This it better to retrieve the
> entire record list, then jump to a starting position.  Say on Page 2
> start displaying at record 31.
> 
> If I use the second method, is there a PHP/MySQL function of move to a
> certain record.
> 
> I know there is probably many different solution to this problem, but
> what are some of them.  I was going to use my last option but if I
> have a 1000+ records loading each time the performance may be slow.

As common as this is I should have some template for it at least ... I did try that 
once. Here is an example I recently used. It's in Perl but since it's primarily SQL 
it's still 
a good example I reckon.

(note, thank god, in Perl we don't have to quote literals in a hash, I hate doing that)

  if($input{next}) {
$sql = qq|SELECT * FROM images WHERE location = ? AND image_id < $input{next} 
ORDER BY born DESC LIMIT $input{spread}|;  
  }elsif($input{previous}) {
$sql = qq|SELECT * FROM images WHERE location = ? AND image_id > 
$input{previous} ORDER BY born LIMIT $input{spread}|;  
  } else {
$sql = qq|SELECT * FROM images WHERE location = ? ORDER BY born DESC LIMIT 
$input{spread}|;#
  }

Explanation:

SELECT * FROM images WHERE location = ? AND image_id < $input{next} ORDER BY born DESC 
LIMIT $input{spread}

$input{next} is the ($input{spread} +  current position) so if my spread is 5 I will 
have

1-5
6-10
11-15
and $input{next} will always be 10,15,20, etc.

Now from here:

http://www.mysql.com/doc/L/I/LIMIT_optimisation.html

> If you use LIMIT # with ORDER BY, MySQL will end the sorting as soon
> as it has found the first # lines instead of sorting the whole table.

Umm ... my system worked. I don't think though that the above line indicates it would. 
You can see the snippets I show from above here:

http://www.memphisart.com/superframes/index.cgi

I set the spread to 2 so you can see it working and I uploaded a few images. The guy 
who wanted that wanted to sort by last in first up. 

There are probably many more ways of doing this. Hope we see some more responses. I 
never thought to use the LIMT X,Y option. I will test that later.

Peter



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




AW: [PHP] IIS5 and PHP4 problems

2002-07-16 Thread Peter Stöcker

Hi!

The register_globals are "on".

But using $_POST will cause some problems, because I also use generated
links like "test.php?id=4&usr=test" without using a form!

So I don't get the variables by both these genrated links and forms.

Bye,
Peter

-Ursprüngliche Nachricht-
Von: Nookie [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 16. Juli 2002 12:30
An: Peter Stöcker
Cc: [EMAIL PROTECTED]
Betreff: Re: [PHP] IIS5 and PHP4 problems


Hello Peter,

Tuesday, July 16, 2002, 12:28:06 PM, you wrote:

PS> Hi there!

PS> I have a problem with the IIS5.

PS> After I have installed PHP4 following the instruction on php.net,
everything
PS> works fine instead of handling forms.

PS> Each variable deliverd by a form (e.g. test.php?id=5) is empty (id==""
is
PS> true).


PS> Can anybody help??


Check your php.ini -> register_globals ...

Try use $HTTP_POST_VARS['id'] or $_POST['id']



--
Pozdrowienia,
 Nookie  mailto:[EMAIL PROTECTED]
 http://www.shakira-online.net
 http://www.xtina.pl
 http://www.jessica.prv.pl





[PHP] IIS5 and PHP4 problems

2002-07-16 Thread Peter Stöcker

Hi there!

I have a problem with the IIS5.

After I have installed PHP4 following the instruction on php.net, everything
works fine instead of handling forms.

Each variable deliverd by a form (e.g. test.php?id=5) is empty (id=="" is
true).


Can anybody help??


Thanks,
Peter



Re: [PHP] Submit code

2002-07-15 Thread Peter Janett

The Snoopy class would do this nicely.  http://snoopy.sourceforge.net/

That may be too complicated of class as you mentioned, but it's probably the
best solution for you, and once setup, your task will be very easy to do
with
this class.  I had a similar situation where I needed to do a simple form
post, and found some very basic code, but it slowed by app down so much it
had to be replaced eventually anyway.

HTH,

Peter Janett

New Media One Web Services

New Upgrades Are Now Live!!!
Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25,
Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43

PostgreSQL coming soon!

http://www.newmediaone.net
[EMAIL PROTECTED]
(303)828-9882

- Original Message -
From: "Martin Towell" <[EMAIL PROTECTED]>
To: "'MindHunter'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, July 16, 2002 12:33 AM
Subject: RE: [PHP] Submit code


> three methods that I can think of:
> 1. header("location: url");
> 2. 
> 3. Hidden form + JavaScript
>
> -Original Message-
> From: MindHunter [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 16, 2002 4:33 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Submit code
>
>
> I am looking for PHP code that will submit (post) a form automaically to a
> ANOTHER php page.  I do not want to press a submit button.  I have found a
> class at PHPClasses but it is too complicated for my needs.  What is the
> simplest way of doing this?  What is the theoretical approach?
>
> The reason I need this is that I have a table output from a database after
> one submits 'n list of variables (form inputs).  I want to update a graph
in
> another Iframe automatically without clicking on another submit button.
>
> Tx
> MH
>



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




Re: [PHP] integrating usenet into http? how is this done???

2002-07-15 Thread Peter J. Schoenster

On 15 Jul 2002 at 14:55, Andy wrote:

> I just found a site where they have integrated a usenet forum into
> their own forum. I am wondering how this is technicaly done? The
> postings seem to be pretty up to date ( I did compare them with the
> usenet ones) Here is the link:

> Has anybody an idea how they do this. I think the forum software is
> phpbb. But they do not provide such a function as far as I know. All
> the data inside phpbb comes out of a db usually. How is this done with
> copyrights anyway?

Think about the datamodel for a usenet post. Each has a unique id and from there you 
are good to go. 

http://www.workbrazil.com/admin/kb.php

That's a copy of a site I'm working on. I happen to use a Perl script that is run by 
cron and connects to a few newsgroups and uses filters to 
select messages (essentially email) and store them in a mysql table. That script could 
easily be written in PHP I guess.  So you get the 
message and you re-arrange to fit the datamodel of your database and insert it.

About the copyrights. I looked into this a bit and I'm not lawyer but I found nothing 
that said what I was doing would be wrong. I certainly reject 
any copyrighted material which is often posted but all that guy seems to be doing is 
to be reposting. In my case I'm actually culling  data to 
repurpose and if I use chunks of posts from someone I give them credit.

Here is the table I use to store data. I did this quickly and need to pare this down 
to the essentials. 

CREATE TABLE news (
  Content_Disposition varchar(20) default NULL,
  Content_Transfer_Encoding varchar(20) default NULL,
  Content_Type varchar(50) default NULL,
  Reply_To varchar(50) default NULL,
  Subject varchar(100) default NULL,
  X_Accept_Language varchar(20) default NULL,
  X_Admin varchar(20) default NULL,
  X_Complaints_To varchar(20) default NULL,
  X_MSMail_Priority varchar(20) default NULL,
  X_Mailer varchar(20) default NULL,
  X_MimeOLE varchar(20) default NULL,
  X_Newsreader varchar(20) default NULL,
  X_No_Archive varchar(20) default NULL,
  X_Priority varchar(20) default NULL,
  X_Received_Date varchar(20) default NULL,
  X_Server_Date varchar(20) default NULL,
  X_Trace varchar(20) default NULL,
  X_UserInfo1 varchar(20) default NULL,
  Xref varchar(20) default NULL,
  MIME_Version varchar(20) default NULL,
  Message_ID varchar(20) NOT NULL default '',
  NNTP_Posting_Date varchar(20) default NULL,
  NNTP_Posting_Host varchar(20) default NULL,
  XFrom varchar(200) default NULL,
  Born varchar(20) default NULL,
  Distribution varchar(20) default NULL,
  XLines varchar(20) default NULL,
  Newsgroups varchar(50) default NULL,
  Organization varchar(20) default NULL,
  XReferences varchar(100) default NULL,
  body text,
  article_id int(11) default NULL,
  mysql_born date default NULL,
  tz char(3) default NULL,
  hour timestamp(14) NOT NULL,
  Name varchar(50) default NULL,
  this_group varchar(50) default NULL,
  visibility tinyint(4) default NULL,
  editor int(11) default NULL,
  PRIMARY KEY  (Message_ID)
) TYPE=MyISAM;


Peter

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




RE: [PHP] Does not work

2002-07-14 Thread Peter



> -Original Message-
> From: Saci [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 15 July 2002 12:51 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Does not work
> 
> 
> To say the minumum yor reply does not help in nothing.
> 
> Who cares about privacy on my own company Intranet ?
> 
> 
u the bosses.. the employees tring to hide where they been from the bosses... the 
network admin... the list goes on and on and on and on and on and on and on ...


Re: [PHP] Variables aren't being passed to php page

2002-07-14 Thread Peter

I totally agree. No offence to all the ppl who have asked, but didn't it say
on the download page that there had been "major changes to the way variables
are used"??


"John Holmes" <[EMAIL PROTECTED]> wrote in message
000a01c22b3d$e4755790$b402a8c0@mango">news:000a01c22b3d$e4755790$b402a8c0@mango...
> > I've recently upgraded from PHP 4.0.4p11 -> PHP 4.2.1, but now there
> seems
> > to be a problem that variables from POST/GET are not being passed to
> the
> > PHP page. For example, with the following file test.php, using the URL
> > 'test.php?mid=1' displays 'nope'.
>
> Do you always upgrade programs without reading to see what changes have
> been made? If so, I have this update program that I'll send you...just
> run it for me, okay?
>
> Check your register_globals setting, like the others said, and read the
> changelog for your new installation of PHP.
>
> ---John Holmes...
>



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




Re: [PHP] PHP, JAva history

2002-07-14 Thread Peter J. Schoenster

On 14 Jul 2002 at 13:42, Saci wrote:

> I would like to see from where visitor come from mypage i need a
> function who return the last visited page prior to mine.
> 
> I didn't found any function on php for that purpose and I'm thinking
> in mix Java and php for that purpose, using the browser history, Can
> someone show-me how can I do that.

Sounds like you want the REFERER, misspelling on purpose.

Take a look here:

http://www.php.net/manual/en/reserved.variables.php

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


Peter

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




Re: [PHP] Trying to build intelligent query from question

2002-07-14 Thread Peter J. Schoenster

> > foreach($words as $Key=>$Value) {
> > if($ignoreWords[strtolower($Value)]) {
> > continue;
> > }
> 
> You would be better off using array_diff().

Jason,

Thanks, that works except that it doesn't account for case. I want to ignore case as 
it doesn't apply here. But I was able to get rid of the 
associative array. So I reckoned it best to LC the question and copy it because I want 
to return the original question as is back to the browser.

$_string = strtolower ($Config['input']['question']);

$words = explode(" ",$_string);
$ignoreWords = 
array('brazil','like','the','this','that','why','are','there','where','find',);

$FindTheseWords = array_diff($words, $ignoreWords);

Peter

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




[PHP] Trying to build intelligent query from question

2002-07-14 Thread Peter J. Schoenster

Hi,

I may be doing this all the wrong way :) so feel free to let me know, thanks.

I've been developing a q/a database. I don' want to search on "what I consider" 
common words. Certainly there must be a list of these. Anyhow, I explode the 
question string into words and then iterate as such:


foreach($words as $Key=>$Value) {
if($ignoreWords[strtolower($Value)]) {
continue;
}

Here is my $ignoreWords array:

$ignoreWords = 
array('brazil'=>1,'like'=>1,'the'=>1,'this'=>1,'that'=>1,'why'=>1,'are'=>1,'there'=>
1,'where'=>1,'find'=>1,);

What do you think? Do I just build up $ignoreWords like I'm doing or this there 
another way I've missed? Also, does someone have a list of "common words 
to ignore"?

Thanks,

Peter



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




[PHP] Animated GIFs

2002-07-13 Thread Peter

I know GIF support was dropped from the GD library, but can you make
animated GIFs in any version of GD?



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




[PHP] Re: Can this be done with mail()?

2002-07-13 Thread Peter

Yes. I'm sure you could just mail out the table in an email. You'd have to
do it as a multipart email (i think that's what it's called) as just mailing
out the html code wouldn't show as a table in a mail client.
Here's the source of a HTML spam I got this morning - should give you an
idea how to do it.  Note: you still mail out using the mail() function.

Received: from xmail02.nationala-1advertising.com ([208.236.10.104]) by
mc2-f11.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905);
  Sat, 13 Jul 2002 02:38:25 -0700
Received: (qmail 22574 invoked from network); 12 Jul 2002 23:51:55 -
Received: from unknown (HELO CAMPAIGN) (208.236.10.4)
  by 0 with SMTP; 12 Jul 2002 23:51:55 -
From: AccuLotto <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: WIN $10,000 in 6 months - Guaranteed! [EMAIL PROTECTED]
Date: Fri, 12 Jul 2002 19:54:23 -0700
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="Boundary.."
Return-Path: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
X-OriginalArrivalTime: 13 Jul 2002 09:38:25.0416 (UTC)
FILETIME=[09287880:01C22A51]

--Boundary..
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit

This message can only be viewed in HTML

--Boundary..
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit





http://www.acculotto.com/p.pl/M2"; TARGET="_blank">

http://208.236.11.23/custom/acculotto/images/acculotto.gif";
BORDER="0">




If the above
links
do not work or appear, simply copy this URL and paste it into your browser's
address field: 
http://www.acculotto.com/p.pl/M2"; TARGET="_blank">
http://www.acculotto.com/p.pl/M2





Note: This email was sent to you because you registered at Free.com and
subscribed to this newsletter. The email address was then verified and the
agreement confirmed by someone responding from your email address that
required confirmation of registration. This is a double opt-in list and can
NOT in any way be construed as spam. If you wish to unsubscribe from
Free.com, please click the link below:
http://www.Free.com/OptOut.asp?o=227825";>Unsubscribe Here
and you will never receive another wonderful, free offer from us! Please
note, it may take up to a week for you to be removed from our database.





--Boundary..--




"Manuel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I need to query a database and return a resultset. A php script will then
sort through the data and send the data to the browser in the form of a
table.
>
> Is it possible to gather the the results with html tags and store them in
a variable so that the results can be emailed to someone? If so, how would
this be done?
>
>
>
> -
> Do You Yahoo!?
> Yahoo! Autos - Get free new car price quotes



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




[PHP] Re: How do I send files with HTTP socket post (PostToHost)

2002-07-13 Thread Peter

can you not open the file in binary mode and then transfer it as you would
with ASCII?


"Kevin Stone" <[EMAIL PROTECTED]> wrote in message
070301c229d5$42420130$6501a8c0@kevin">news:070301c229d5$42420130$6501a8c0@kevin...
> Okay enough answering questions this week, now I have a question to ask.
:)
>
> I have a situation where two web servers need to share files with one
> another.  FTP is not an option.  So I am resorting to HTTP socket
> connection.  I am able to open the connection (using Rasmus's PostToHost
> function) to PHP scripts running on both servers and send structured
queries
> back and forth.  This was easy.  The queries can trigger actions so that I
> can communicate seamlessly and do work.  But I cannot for the life of me
> figure out how to send whole files (mostly image files).  There's
obviously
> more to it than just sending the ASCII conversion.
>
> I really don't have any meaningful code to show you.  The code is all
> standard anyway so if you know what I'm talking about then you have
probably
> coded it yourself at one point or another.  Are there any tutorials or
> examples out there that will show me how to send files using fsocketopen()
> and POST method?
>
> Much thanks!
> Kevin Stone
> Helpelf, Inc.
>



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




RE: [PHP] HELP!!! Word count

2002-07-11 Thread Peter

if i remember correctly there was something on word counts posted in the last week or 
or .. maybe even last couple days... have a scroll thru and u will find it :)

> -Original Message-
> From: Dan McCullough [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 12 July 2002 11:08 AM
> To: PHP General List
> Subject: [PHP] HELP!!! Word count
> 
> 
> I have some clients who want to charge a flat rate for words 
> entered, but over a certain number of
> words there is an additional charge, to complicate matters there 
> is an option/addon where you can
> bold the lines, and there is a charge per line, so you have to 
> calculate the total number of lines
> based on character total.
> 
> Anyone know of way to accomplish this, I know that it will have 
> to be done in seperate ways.  but
> does anyone have an idea or two .. hlp 
> 
> thanks,
> 
> dan
> 
> __
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


[PHP] weird....php 4.2.1 with apache2 ver 2.0.39

2002-07-11 Thread Peter

howdy...

any one come accross this before...

down loaded apache 2.0.39  when I tried to install it as a service on win2k with php 
included in the httpd conf file as a module it was saying...

C:\PHPDEV\APACHE\APACHE2\BIN>apache -k install
APACHE: module "c:\php4build\snap\sapi\apache2filter\sapi_apache2.c" is not comp
atible with this version of Apache.
Please contact the vendor for the correct version.

but when tried to install php as CGI had no problems wot so ever...

now i'd prefer it as a module.. and have searched around thru php.ini httpd.conf and 
the like to find where it was referencing 
"c:\php4build\snap\sapi\apache2filter\sapi_apache2.c" but no luck... can't see it any 
where.. tried a search on google for module installation problems on this .. but no 
luck...

any idea's as to why?


Cheers 

Peter 
"the only dumb question is the one that wasn't asked" 
 


Re: [PHP] PHP and geographic maps

2002-07-11 Thread Peter J. Schoenster

Was written:

> > Using coordinates to accomplish this seems possible, but overly
> > complex. You'll literally be creating a 3D world and that means

At pixxures.com the client just entered their ADDRESS. Then the backend (probably a 
bit too much for javascript) would return a sattelite view of that address. I believe 
they were using Russian data or 
something. But as I mentioned before, they had serverS that only took requests, cut 
out images, returned images. Oh heck, they are still in business, take a look:

http://www.pixxures.com/

But I can't wait for them to serve up any images as they are dreadfully slow.


Peter

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




Re: [PHP] PHP and geographic maps

2002-07-11 Thread Peter J. Schoenster

On 11 Jul 2002 at 16:42, Lowell Allen wrote:

> A client wants a database-driven site that records information about
> real estate properties and includes geographic maps of property
> locations (throughout the US). The client has seen a presentation of a
> JavaScript-powered, Windows-only product that doesn't seem to fit well
> with my preference for PHP/MySQL. I've been Google-searching info on
> GIS and GPS and GMT, but thought it might be worthwhile to ask this
> discussion list for input.
> 
> Can anyone direct me to info on PHP presentation of geographic maps --
> tied to a database with locating coordinates?

Well heck, you've peaked my interest. I don't see how javascript makes any difference. 
The power of the app MUST be some server-side app otherwise it would work in any 
Browser (or please 
correct me in any way). 

I'd like to hear more details about this. What kind of maps do they produce? I once 
worked with on a map site called pixxures.com and they had MANY servers that were 
SPECFICALLY designed 
to process requests and return images (ran on linux and solaris and might have worked 
on windows as the app itself was in java I believe). We only had to provide 
coordinates from the web form to 
these apps and they'd return a slice of an image.


Peter

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




[PHP] php4apache.dll...

2002-07-10 Thread Peter

Howdy

can any one remember where to get the apache2 ver of php4apache.dll?

Cheers 

Peter 
"the only dumb question is the one that wasn't asked" 
 


RE: [PHP] need help about this

2002-07-10 Thread Peter

means the table ur trying to create already is there... if u don't want to keep the 
table do a DROP tablaename in mysql or if not  then change the name of the table you 
are trying to create

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 11 July 2002 4:52 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] need help about this
> Importance: High
> 
> 
> MySQL Error : Database Error
> Error Number: 1050 Table 'book_auth' already exists
>   
> what this meant?
> what should i do for correct this
> thaank you for your help
> 
> sincerly your
> -- tjandra
> 
> 
> ==
> This email is confidential and may also be privileged.
> If you are not the intended recipient, please notify me immediately and
> delete the original message.  You should not copy or use it for any
> other purpose, nor disclose its
> contents to any other person.  Thank you.
> 
> 


RE: [PHP] How do I import tables into MySQL from web page ...

2002-07-10 Thread Peter

using dan's test below if u add a '/s' like so

 $output = system('dir /s c:\books', $return_var);

you will get all contents os subdir's as well  
how ever i suggest working on a format as this tree's out along the page
so maybe if u add a '/w' after the '/s'as well that will sort of solve that problem .. 

though does create one massive block of filenames in ur browser...

Cheers


> -Original Message-
> From: Fargo Lee [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 11 July 2002 11:54 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] How do I import tables into MySQL from web page ...
> 
> 
> I ran a few tests as well and the few system commands I tried 
> only saved the
> *last* line of the output in a variable on success as the manual 
> suggests it
> should - better than nothing - but not the entire output as you seem to
> suggest you were able to do and what I have been trying to do.
> 
> "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > On Wed, Jul 10, 2002 at 12:14:58PM -0700, Fargo Lee wrote:
> > >
> > > This suggests, as do a few posts I just noticed in the manual,  that
> > > one cannot assign the output of system() and perhaps passthru() and
> exec()
> > > to a variable.
> >
> > I forgot to mention, that's not accurate.  I just ran a test to 
> make sure.
> > Got the results just fine.
> >
> > Just for clarity, here's my test (PHP 4.2.1, NT 4.0):
> >
> > #   real directory.
> > #   result:  output shows file list, false no, return 0
> > #   $output = system('dir c:\books', $return_var);
> >
> > #   fake directory.
> > #   result:  output shows nothing, false yes, return 1
> >$output = system('dir y:\fake', $return_var);
> >
> >echo "output: $output";
> >echo '';
> >echo 'output false? ' . ( ($output == FALSE) ? 'yes' : 'no' );
> >echo '';
> >echo "return: $return_var";
> >
> >
> > --Dan
> >
> >
> >  I think this is only possible using backticks, which I can't
> > > use as this needs to be run in safe mode. So I guess I just 
> need to use
> the
> > > return_var as you suggested. Thanks!
> > >
> > > "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in
> message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > On Tue, Jul 09, 2002 at 11:41:47PM -0700, Fargo Lee wrote:
> > > >
> > > > > got it to assign a 0 (success) or 1 (failure) to the return_var
> argument
> > > as
> > > > > you suggested so I am happy.
> > > >
> > > > Good!
> > > >
> > > >
> > > > > What mixed me up and I still don't understand is the manual entry
> for
> > > > > system() says ...
> > > > >
> > > > > "Returns the last line of the command output on success, and FALSE
> on
> > > > > failure."
> > > > >
> > > > > When it says it "Returns", where does it return this 
> information and
> how
> > > can
> > > > > it be captured for comparison?
> > > >
> > > > The thing that's tripping you up is, I believe, executing MySQL
> programs
> > > > at a prompt doesn't produce any visible output.  But, if 
> you executed
> a
> > > > command that returns some output to STDOUT, like "ls", you'd see the
> last
> > > > line of output therefrom in the "Return."
> > > >
> > > > --Dan
> > > >
> > > > --
> > > >PHP classes that make web design easier
> > > > SQL Solution  |   Layout Solution   |  Form Solution
> > > > sqlsolution.info  | layoutsolution.info |  formsolution.info
> > > >  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
> > > >  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > --
> >PHP classes that make web design easier
> > SQL Solution  |   Layout Solution   |  Form Solution
> > sqlsolution.info  | layoutsolution.info |  formsolution.info
> >  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
> >  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


Re: [PHP] Development Tools

2002-07-10 Thread Peter J. Schoenster

On 10 Jul 2002 at 18:07, Uwe Birkenhain wrote:

> I think that - on windows - nothing is better than textpad
> (www.textpad.com).
> Simply the best editor the world has seen so far!
> 
> What makes development tools better than a good editor? (serious
> question)

Well let me get my 2 cents in. It's a religious question. But oh 
well.  I recently had a lot of trouble with someone at work about 
this, so I'm gonna rant.

I too use TextPad and have been since I'm too lazy to get really good 
at vi or emacs. I also know and use Perl extensively as a code 
generator. Someone talked about the work in creating a form, just 
give me the keys and boom form is done and read to be handed to the 
designers to ruin in their special way.  You could use Ruby or Rebol 
or even Python I guess or PHP on the command line but I can't imagine 
anyting being faster than a Perl script (to write).

I keep trying these IDE tools. I type about 70+ wpm, so you can 
imagine I'm not a fan of my hand speding half it's time in the air 
between keyboard and mouse. I also try never to repeat the same code 
twice so I don't cut and paste ... I put common functions in modules 
and use them but few IDEs that I've used easily allow me to use those 
or I haven't seen how. If anyone wants to create a great IDE for Perl 
I'd love to help. It should work for PHP as well.

I also separate my programming from my view and since I'm a 
programmer and not a designer the visual view is not paramount to me 
and can always be done later or at the same time by me or someone 
else. I have a feeling that most PHP programmers also do their own 
design and that's a reason for so much PHP stuff to have html strewn 
all over the place.  In any case I always think in terms of a theme 
and since I've got most of my html code abstracted into "boxes" it's 
just a question of my program to manipulate and supply the proper 
data to the template.

So for me, the best development tools are:

1. Imagination
2. Knowledge of your tools (language, PHP, HTML, CSS, etc. in this 
case)
3. Knowledge of the computer and it's potential (I use NT as desktop 
but have cygwin and use unix command tools and lots and lots of perl 
scripts to aid 
in development)

4. A good text editor (there are lots, they all have macros, revision 
control, keyboard commands for as much as possible).

Personally, I've never worked with a programmer who taught me 
anything who used Dreamweaver or FrontPage etc ... all the good ones 
I know use vi, emacs, textpad, etc.  I'd suggest using a text editor 
and then moving to an IDE or more advanced GUI and knowing that it is 
faster for you as opposed to starting with an IDE or GUI because 
you'll probably end up like most people and begin to think 
possiblities are what your tool allows you.

Peter
-- http://www.readbrazil.com/
Answering Your Questions About Brazil


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




[PHP] Re: Generate a file

2002-07-10 Thread Peter

Maybe this will solve your problem

This code wil save and excel of word file from an MySql query

http://www.pscode.com/xq/ASP/txtCodeId.625/lngWid.8/qx/vb/scripts/ShowCode.h
tm

Peter

-

"Phillip S. Baker" <[EMAIL PROTECTED]> schreef in bericht
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Okay here is what I want to do.
>
> Select the field of a database that I want.
> Hit submit.
> Execute a query of a database based on the said form.
> Gather all the data and rows and plug them into an excel generated file.
> Display a dialogue box asking the user the save the file.
> The saved file being an excel file with data generated from a database.
>
> Make sense?
>
> Would the header calls be something like this?
> header("Content-type: application/xls");
> header("Content-Disposition: attachment; filename=downloaded.xls");
>
> Now if that is cool, how would I get the data into the downloaded.xls file
> to have this work?
>
> Thanks
>
> Phillip
>



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




Re: [PHP] Commit/Roll Back Transaction in PHP/mySQL

2002-07-09 Thread Peter J. Schoenster

On 9 Jul 2002 at 22:07, Thomas Edison Jr. wrote:

> why the transaction is interrupted, i would like the
> transaction to roll back.. that is, all the records
> entered before the interruption SHOULD NOT remain in
> the database, they should get deleted or something, so
> that the transaction can begin Fresh from next time. 
> 
> How can i make such a function that will see this
> happens, in my PHP/mySQL.

Well be sure that your MySQL supports transactions. InnoDB or something. In perl it's 
just a case of eval {sql here} if($@ ) {rollback}else commit, the $@ is empty unless 
the eval created an error. 
Now, let me see how PHP does this, Google, where are you?

http://www.google.com/search?sourceid=navclient&q=mysql+php+rollback

Might want to be sure your MySQL supports transactions and is configure appropriately 
or you can drive yourself nuts.

http://www.mysql.com/doc/I/n/InnoDB_transaction_model.html 

And then some ideas about how to do it with PHP:

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

(wow, right from php.net)

http://hotwired.lycos.com/webmonkey/02/11/index4a_page3.html?tw=backend

I've never used mysql for anything but a data store so I have no examples myself.

Peter

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




RE: [PHP] T_string error

2002-07-09 Thread Peter

wot's the few lines before it ? just because it says that line doesn't always mean it 
is that line ... and have found quite often it's the line above it...

> -Original Message-
> From: admin [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 10 July 2002 1:32 PM
> To: PHP List
> Subject: [PHP] T_string error
> 
> 
> Can someone tell me what the following error means,
> and how to fix it...please?
> 
> Parse error:
> parse error, unexpected T_STRING in
> c:\program files\apache
> group\apache\htdocs\phpbb\language\lang_english\lang_main.php
>  on line 629
> 
> this is the code on that page:
> 
> $lang['Avatar_filesize'] = 'The avatar image file size must be 
> less than %d
> kB'; // The avatar image file size must be less than 6 kB
> 
> (than 6 kB < this part of that line is on the next line down)
> 
> <*** http://www.myispnet.net ***>
>Administrator
>My ISP Network
>[EMAIL PROTECTED]
> <*** http://www.myispcentral.net ***>
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


RE: [PHP] rh 7.3

2002-07-09 Thread Peter

Yamin,

grab ur self a copy of bison and install it see this line..

configure: warning: You will need bison if you want to regenerate the PHP 
parsers. ) 

make sure lex is in ur path on your machine..
cheers

> -Original Message-
> From: Yamin Prabudy [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 10 July 2002 12:44 PM
> To: PHP List
> Subject: [PHP] rh 7.3
> 
> 
> Hi guys,... In configure PHP 4.2.1 on RedHat 7.3 I found this problem
> checking for ranlib... ranlib
> checking whether ln -s works... yes
> checking for gawk... (cached) gawk
> checking for bison... no
> checking for byacc... no
> configure: warning: You will need bison if you want to regenerate the PHP 
> parsers.
> checking for flex... lex
> checking for yywrap in -ll... no
> checking lex output file root... ./configure: lex: command not found
> configure: error: cannot find output from lex; giving up
> [yamin@dusak php-4.2.1]$
> 
> what's wrong with it ???
> 
> thanks in advance
> 
> Yamin
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


[PHP] PHP code optimization

2002-07-09 Thread Peter Thoenen

Question on optimizing code for quicker runtimes. 
Which is quicker (this is on a webpage also..NOT
commandline)?



OR

 abc 

Both do the same thing and are legit but wondering
which is better from an optimization standpoint (NOT
interested in readability or *proper* code here)

-Peter

__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




Re: [PHP] hiding submitted variable values in location bar of browser !

2002-07-09 Thread Peter J. Schoenster

On 9 Jul 2002 at 22:09, [EMAIL PROTECTED] wrote:

> Is there any way to hide my form submitted variables (like
> passwords etc)
> in the location
> bar "http://somedomain.org/checkpassword.php?
> password=mypassword"
> or atleast show in an encypted form n the location bar.

But why bother? Certainly you would not think it secure. Use https for security, 
anything else is a mirage afaik.

There is a module in Perl that encrypts and unencrypts post/get data intended for 
hidden fields. I guess it uses a checksum as well.

I personally prefer to just create a session and keep it on the server side. 

Oh heck, but now as I read your email closer I guess you are asking how it can be done 
from a form the first time. Perhaps with javascript but then use post instead of get 
and of course make 
it via a secure connection if security is a concern.

Peter

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




Re: [PHP] Postal / Zip Code Proximity Search

2002-07-09 Thread Peter J. Schoenster

On 9 Jul 2002 at 10:39, Ray Hunter wrote:

> One suggestion is to use the geo functionality of Postgres
> 
> We use postgres to calculate city, state, and/or country by using the
> geo functions in postgresql.

> - Original Message -
> From: "Brandon Pearcy" <[EMAIL PROTECTED]>

> >I have a couple of questions with respect to creating a postal /
> > zip code proximity search that is remotely accurate. The system I am
> > using now is OK for small distances, but is terrible at calculating
> > large distances.

> > Not only does it need to find the establishments, it needs to
> > calculate the distances (straight line, of course).

I don't know what you mean by straight line. AFAIK all of this will be as "the crow 
flies".

The following came from Jann Linder of cgi-list fame and it worked for me. Odd, I used 
it in PostgreSQL not knowing that there was something homegrown. 

SELECT /*+FIRST_ROWS */ 
   o.zip, 
   (3956 * (2 * ASIN(SQRT(
POWER(SIN(((z.latitude-o.latitude)*0.017453293)/2),2) +
  COS(z.latitude*0.017453293) * 
  COS(o.latitude*0.017453293) * 
  POWER(SIN(((z.longitude-o.longitude)*0.017453293)/2),2)
  dist
FROM zipcodes z,
 zipcodes o
WHEREz.zip=94112
AND  (3956 * (2 * ASIN(SQRT(
POWER(SIN(((z.latitude-o.latitude)*0.017453293)/2),2) +
  COS(z.latitude*0.017453293) *
  COS(o.latitude*0.017453293) *
  POWER(SIN(((z.longitude-o.longitude)*0.017453293)/2),2)
  < 5 order by dist;
 
 
CREATE TABLE zipcodes (
  recordid int(11) unsigned NOT NULL auto_increment,
  zip varchar(5) NOT NULL default '',
  state char(2) NOT NULL default '',
  city varchar(50) NOT NULL default '',
  longitude double NOT NULL default '0',
  latitude double NOT NULL default '0',
  sure tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY (recordid),
  KEY idx_zip(zip),
  KEY idx_state(state),
  KEY idx_city(city),
  KEY idx_latitude(latitude),
  KEY idx_longitude(longitude),
  KEY idx_sure(sure)
) TYPE=MyISAM;



More stuff about this here:

http://mathforum.org/library/drmath/view/51711.html
http://www.movable-type.co.uk/scripts/LatLong.html
http://earth.uni-muenster.de/~eicksch/GMT-Help/msg00147.html


Peter

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




Re: [PHP] Best Content Management METHOD...

2002-07-08 Thread Peter J. Schoenster

On 9 Jul 2002 at 11:54, Justin French wrote:

> I'm a firm believer in option 1.  750,000 page views per month is only
> 1 page every 3.4 seconds (ish) on average, so I don't believe you'd
> see any server load even in peak periods.
> 
> If there IS server load, you can have an option 3, which basically
> combines option 1 and 2.  Keep the raw article data in a database
> which is there forever.  Then run a program which batch-creates 'HTML'
> pages from templates and the database, and publish a static website
> (as per option 2).

I'm with Justin on this. Here is a very good article that goes into depth on the 
subject by a guy who seems to have disappeared:

http://philip.greenspun.com/internet-application-workbook/content-management


Peter

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




[PHP] help pls..

2002-07-08 Thread Peter

howdy all

my aim is to have a user submit a form and then from there replace cell colours with 
in a table. I'm referencing the cells by cell id's  eg 

 
   id="ph1">1 
  
   id="ph2">2 
  
   id="ph3">3 
  
   id="ph4">4 
  


now using a switch statement eg 

switch( $bg )
{
case "red":
print( "#FF" );
break;
//a few more colours in here
default:
print( "#FF" );
break;
}
what would be the best way to tell it what  cell colours to replace on submit would it 
be an if, for or a do/while statement that would be the better option ( or any others 
that  4 that matter) if i wanted to have just the cells with the ids of ph2 & ph3 to 
be changed?


Cheers 

Peter 
"the only dumb question is the one that wasn't asked" 
 


[PHP] Re: [PHP-DB] PDF

2002-07-08 Thread Peter Janett

I needed to create invoices, one per page, that could be printed, and chose
to use http://www.fpdf.org/.

It was easy to take my HTML formated output and change it to PDF.

HTH,

Peter Janett

New Media One Web Services

New Upgrades Are Now Live!!!
Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25,
Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43

PostgreSQL coming soon!

http://www.newmediaone.net
[EMAIL PROTECTED]
(303)828-9882

- Original Message -
From: "Chris Boget" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 08, 2002 2:53 PM
Subject: Re: [PHP-DB] PDF


> > > If someone has any idea, please let me know
> > I would strongly suggest that you use a PDF class of some sort. There're
> > quite a few available. I've had good results with pc4p.
>
> Typically, most PDF classes require that it be working from some sort of
> static template.  If that is fine, then definitely check out any of the
PDF
> classes out there.  If you can't use a static template, check out an app
> called "htmldoc".  I use it here with great success.
>
> Chris
>
>
>
> --
> PHP Database 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




Re: [PHP] is their a jobs mailing list?

2002-07-08 Thread Peter

I think a mailing list would be a good idea, but the job's always going to
be awarded to the best person, and companies are more likely to go with
someone experienced than someone cheap :o(


"César aracena" <[EMAIL PROTECTED]> wrote in message
003401c226c0$8dc3a220$2fed0dd1@gateway">news:003401c226c0$8dc3a220$2fed0dd1@gateway...
> The only problem I see if projects are thrown to developers, is that the
> beginners will have less work... maybe it would be a good idea to divide
> it into two categories:
>
> 1) Developers for hire (local & foreign)
>
> 2) Projects to Develop (Interested developers *BID* at them)
>
> C.
>
> > -Original Message-
> > From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, July 08, 2002 6:57 AM
> > To: PHP General List
> > Subject: RE: [PHP] is their a jobs mailing list?
> >
> > Yes... I agree...
> >
> > I would like formyself and anyothers interested if this was to
> go-ahead...
> > develop similar to but not as deep as and more importantly FREE
> version of
> > elance or something like that...
> >
> > Can anyone from PHP let us (this thread) know if this is a viable
> > prospect?
> >
> > > -Original Message-
> > > From: Chris Hewitt [mailto:[EMAIL PROTECTED]]
> > > Sent: 08 July 2002 10:42 AM
> > > To: PHP General List
> > > Subject: Re: [PHP] is their a jobs mailing list?
> > >
> > >
> > > As not all work involving PHP need be on a customer's site
> > > (the type of
> > > work that agencies deal with), I'd like to suggest that the site is
> > > flexible enough to offer PHP "work" in the broader sense, not just
> > > on-site contract/employment. E.g. an end customer can post that they
> > > need a particular piece of work done and ask for
> > > tenders/interested people.
> > >
> > > Chris
> > >
> > > Brian McGarvie wrote:
> > >
> > > >Yeh sure...
> > > >
> > > >I have worked on a recruitment site for a UK agency.
> > > >
> > >
> > >
> > > --
> > > 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
>



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




[PHP] Re: Difference between executable and Apache server

2002-07-08 Thread Peter

I'm not too familiar with Linux systems. See if there are two copies of your
PHP.ini file. One might be in the conf directory and the other in the PHP
directory. Make modifications to one and see what effect it has-have a
fiddle!

"Peter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On my system, the PHP executeable looks for the PHP.INI file in the same
> directory as the executeable, whereas the Apache module uses the one in my
> C:\WINDOWS directory. Are you using Windows?
> Due to this, I suppose you can have two different PHP setups if you
wanted.
>
> "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
> 002501c226bc$87a28f40$8102a8c0@niigziuo4ohhdt">news:002501c226bc$87a28f40$8102a8c0@niigziuo4ohhdt...
> > Good afternoon,
> >
> > We have some cases where we run PHP as a standalone executable for
> scripting
> > certain processes that can be called from CRON, and we also have PHP for
> > Apache. Does the php.ini affect both? Specifically script times?
> >
> > Thanks!
> >
> > Jay
> >
> >
>
>



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




[PHP] Re: Difference between executable and Apache server

2002-07-08 Thread Peter

On my system, the PHP executeable looks for the PHP.INI file in the same
directory as the executeable, whereas the Apache module uses the one in my
C:\WINDOWS directory. Are you using Windows?
Due to this, I suppose you can have two different PHP setups if you wanted.

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
002501c226bc$87a28f40$8102a8c0@niigziuo4ohhdt">news:002501c226bc$87a28f40$8102a8c0@niigziuo4ohhdt...
> Good afternoon,
>
> We have some cases where we run PHP as a standalone executable for
scripting
> certain processes that can be called from CRON, and we also have PHP for
> Apache. Does the php.ini affect both? Specifically script times?
>
> Thanks!
>
> Jay
>
>



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




[PHP] Re: PHP Script Speed

2002-07-08 Thread Peter

I understand what you're getting at, I'm not sure of the answer though.
I know it would stop you using FrontPage or Dreamweaver but if for example
you had
Index page";
print "Current: $_Current";
print "Percent Change: $_ChangePercent";
print "";
?>
You'd eliminate that problem.


"Christopher Crane" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a question on speed but also dealing with the method of scripting.
> I have a few pages where I get things like weather and stocks. I get the
> data, which is usually in the form of a Comma delimited string like the
> stock quotes from Yahoo.com. In the past, I also wrote a function to get
the
> data and split into variables like $S_Current, $S_ChangePercent,
> $S_ChangeDollar ect  Then I would print out a whole HTML table with
the
> variables embedded within. This function was called from a PHP type web
> page. Lately, I have been making the variables global and using them when
I
> need them. For instance, I have a page called index.php. At the stock
> section of the page, I have a function that is called and returns the
major
> indices, like NASDAQ, DOW and S&P. I global the variables and then within
> the index.php page I called the variables as I need them in tables. This
> makes designing the page simple. I can do it in Frontpage or Dreamweaver
or
> whatever. The old way was to call the function and the function would
print
> out the HTML table as part of the function.
>
> I hope I am explaining this well enough to understand. Doing it the newer
> way for me with the global variables makes it easier to design the web
page,
> but I am wondering if it is at the cost of a slower page loading. The
reason
> I think this is whenever I would like to display a variable I have to put
in
> a script tag like . I might have as many as 20
of
> these on a page. Every time doesn't PHP have to start again and parse out
> this information causing it to be really slow?
>
> The old way was for me to call the function like  and
> then the function would print out;
> 
> 
> Dow
> NASDAQ
> S & P
> 
> 
> $Dow_Current
> $Nas_Current
> $Snp_Current
> 
> 
>
> Which is faster? Which is better? Is there another way?
>
> Christopher J. Crane
> Network Operations Manager
>
> IKON Office Solutions
> 860.659.6464
>
>
>



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




[PHP] seeking experienced PHP programmer in Houston, TX (no telecommuting)

2002-07-08 Thread Peter J. Schoenster

Hello,

I'm posting this ad for the company looking for a PHP programmer. I have no clue if 
the company 
is good or not. Do your due dilligence.

__BEGIN JOB POST

We are a Houston, Texas based company in need of 1-2 VERY GOOD AND
EXPERIENCED PHP programmers for 4-6 weeks to build a new web site.  This
project will be very exciting and involves many very challenging and
elaborate programming feature-sets.  ABSOLUTELY NO TELECOMMUTING.  All
programming for the scope of this project must be performed in our office
Monday - Friday from 8AM - 5PM Central Standard Time.  We would prefer
programmers who currently live in the Houston area opposed to programmers
willing to relocate to the Houston area for the duration of the 4-6 week
development period but we will consider all options.  This opportunity
could possibly lead to fulltime permanent employment following completion
of the initial development.  All experienced PHP programmers interested
should email Evan Esnard at [EMAIL PROTECTED] or call during
regular business hours at 832-264-1001.

The web site will include a MySQL database backend, e-commerce shopping
cart-style ad submission form on front-end with real-time credit card
authorization through CardService International, several other ad
submission forms on both front-end and back-end, and an extensive back-end
Web Admin Control Panel for us to control various features and components
of the web site.  We will be happy to share further details on the
feature-sets with any interested programming candidates for this project.


__END JOB POST



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




[PHP] is their a jobs mailing list?

2002-07-07 Thread Peter J. Schoenster

Hi,

I was here first:

http://www.php.net/manual/en/faq.mailinglist.php#faq.mailinglist.guideline

> Before you post to the list please have a look in this FAQ 

But I found nothing about a jobs mailing list. I'm really a Perl programmer and 
we have jobs.perl.org which has a list which does a really good job. 

A person from Houston, TX asked me if I knew of any PHP people in Houston. 
I advertise on Google and Overture as a developer for hire.

I don't sugget he post to this list as I'm not sure of the etiquette and I've never 
seen jobs posted to this list; I know they are accepted heartily on the 
mod_perl list. 

Anything simple but effective like this site for PHP?

http://jobs.perl.org/

Peter




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




RE: [PHP] PHP/mysql connection problem

2002-07-07 Thread Peter


> Hey all, this is probably more to do with Mysql but I figured i'd 
> ask here as well.
> 
> The problem:
> When connecting to the mysql server on the local machine its 
> fine, but when you connect to a remote machine 
> eg $db = mysql_connect("x.x.x.x", "user", "password");
> and request something from the database, it connects, BUT it 
> takes about 5 minutes...
that depends on load on the server & or network i think... how much info are you tring 
to get? try it will a very small amount and see if there is a difference...


RE: [PHP] Buy & Sell

2002-07-07 Thread Peter

you could do some little modifcations to something like phpnuke ( http://phpnuke.org) 
that could work for you.. it's primarily a news style format where people can post 
things to .. but you can set it so the administrator has to aprove any posts to the 
site..

Cheers


> -Original Message-
> From: César Aracena [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 28 June 2002 3:50 AM
> To: PHP General List
> Subject: [PHP] Buy & Sell
> 
> 
> Hi all.
>  
> Have anyone used a PHP pre-made program before that can manage
> classifieds by only administrator managed? I want to set up a Buy & Sell
> site for houses, vehicles, etc… Pretty much like a Real State on-line
> site.
>  
> Any help appreciated,
>  
> Cesar Aracena  
> CE / MCSE+I
> Neuquen, Argentina
> +54.299.6356688
> +54.299.4466621
>  
> 


RE: [PHP] Calander with highlighting

2002-07-07 Thread Peter

George,

it's not quite what I'm looking for but it's very similar to what I am after & would 
go along way to acheiving what I am after..

> 
> 
> Take a look at http://www.bucharest-accommodation.ro/flat_univstudio.php
> .That is what you want?
> 
> --
> 
> 
> Best regards,
> George Nicolae
> 


[PHP] Re: suppressing errors with "@"

2002-07-07 Thread Peter

Doesn't @ surpress output (in general)?
Variables don't usually produce an output so putting @ before it shouldn't
make any difference.


"Uri Even-Chen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I tried to suppress warnings in isset expressions (Uninitialized string
> offset warnings).  The original line was something like this:
>
> if (!(isset($GLOBALS['SPEEDY_GLOBAL_VARS']['PAGE_NAME'])))
>
> When I added the "@" sign like this:
>
> if (!(isset(@$GLOBALS['SPEEDY_GLOBAL_VARS']['PAGE_NAME'])))
>
> My program stopped working, and I got errors like:
>
> PHP Parse error:  parse error, expecting `T_VARIABLE' or `'$'' 
>
> Eventually, I put the "@" in this place:
>
> if (!(@isset($GLOBALS['SPEEDY_GLOBAL_VARS']['PAGE_NAME'])))
>
> Which works, but why didn't it work the other way?  Is it some kind of
> PHP bug?
>
> I'm using PHP Version 4.1.2
>
> Thanks,
> Uri.
> 



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




[PHP] Linked drop down selection lists and dynamically generated links

2002-07-06 Thread Peter Goggin

I have two related tables. The first has about 12 records, each of which is
related to about 12 records in the second table.  I want to have two
interconnectedt dropdown list fields. The fisrt is used to select from the
first table and when the value has been selected, use it to determine the
contents of the second drop down list.  Once the second field has been
selected I want to use this data to otain the name of the form to be used to
display data selected using the two fields.

Obviously I can do this by having interrelated pages where the value from
the first fields is carried to the second page and used to populate the
second drop down list. I can then presumably dynamically generate the link
to the required page and pass over what paraeters are needed.

Is there any way of doing this so within a single page?

Can this be done using only PHP or do I need to use Javascripts?
Where would I be able to find examples of code which does this sort of
processing?

Any adivice would be gratefully received.
Regards


Peter Goggin

Regards

Peter Goggin


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




[PHP] Session not expiring

2002-07-05 Thread Peter Atkins

All,

My session is not expiring and I believe that I set this correctly.
I'm looking for a 15 minute expiration time.

My current setting:

session.cookie_lifetime   = 900 ; lifetime in seconds of cookie
; or if 0, until browser is restarted

Is this the correct why to achieve this? If so what else can it be?

Thanks,
-p

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




Re: [PHP] Re: $this in an XML data handler ... in a class

2002-07-04 Thread Peter Clarke

I hadn't noticed that. My php.ini was set to on, changing it to off gave the
warning.
Having changed:
xml_set_object($this->parser,&$this);
to:
xml_set_object($this->parser,$this);
Stops the warning and the parser works fine.

This is the class I'm using and it works fine:

class parse_words_xml  {
 var $words;

 function parse_words_xml($xml_data) {
 $this->words = array();
 $this->parser = xml_parser_create();
 xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);
 xml_set_element_handler($this->parser,"tag_open","tag_close");
 xml_set_character_data_handler($this->parser,"cdata");
 $this->parse($xml_data);
 }

 function parse($xml_data) {
  xml_set_object($this->parser,$this);
  reset ($xml_data);
  while (list (, $data) = each ($xml_data)) {
  if (!xml_parse($this->parser, $data)) {
  die(sprintf( "XML error: %s at line %d\n\n",
  xml_error_string(xml_get_error_code($this->parser)),
  xml_get_current_line_number($this->parser)));
  }
  }

 }

 function tag_open($parser,$tag,$attributes) {
 $this->current_tag = $tag;
 switch($tag){
 case 'Word':
$this->id = $attributes['id'];
$this->words[$attributes['id']] = 1;
 break;
 default:
 break;
 }
 }

 function cdata($parser,$cdata) {
  $this->temp = $cdata;
 }

 function tag_close($parser,$tag) {
 switch($tag){
 case 'Word':
$this->words[$this->id] = $this->temp;
$this->temp = '';
 break;
 default:
 break;
 }
 }

}


"Clay Loveless" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Unfortunately, the xml_set_object function does not work to solve this
> problem. I tried using it, and my results were the same as they were when
I
> was not using it.
>
> [I found that the array($this, 'function_name') method instead of 'string
> function_name' for the xml_set_*_handler functions worked just as well,
only
> without this Warning message one gets from PHP 4.2.1 upon using
> xml_set_object($this->parser, &$this):
>
> "PHP Warning:  Call-time pass-by-reference has been deprecated - argument
> passed by value;  If you would like to pass it by reference, modify the
> declaration of xml_set_object().  If you would like to enable call-time
> pass-by-reference, you can set allow_call_time_pass_reference to true in
> your INI file.  However, future versions may not support this any
longer."]
>
>
> Still searching for an answer on this one ...
>
> Thanks,
> -Clay
>
>
>
> > "Peter Clarke" <[EMAIL PROTECTED]>
> >
> > Have a look at:
> > http://www.php.net/manual/en/function.xml-set-object.php
> >
> > xml_set_object($this->parser, &$this);
> >
> >
> >
> > "Clay Loveless" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >> Here's a brain-bender ... At least it is for me at the moment. : )
> >>
> >> When I use an XML parser inside a class, the xml_*_handler functions
> > aren't
> >> recognizing "$this->" variables. I can kind of see why ... But would
like
> > it
> >> to work anyway. : )
> >>
> >> Here's an example:
> >>
> >> class Blah
> >> {
> >> var $xmlparser;
> >> var $current_element;
> >>
> >> // ...
> >>
> >> function _parseXML($data)
> >> {
> >> $this->xmlparser = xml_parser_create();
> >> xml_set_element_handler(
> >> $this->xmlparser,
> >> array($this,"_xml_start_element"),
> >> array($this,"_xml_end_element"));
> >> xml_set_character_data_handler(
> >> $this->xmlparser,
> >> array($this,"_xml_character_data"));
> >> xml_parse($this->xmlparser, $data);
> >> xml_parser_free($this->xmlparser);
> >> }
> >>
> >> function _xml_start_element($p, $e_name, $e_attributes)
> >> {
> >> $this->current_element = $e_name;
> >> }
> >>
> >> function _xml_end_element($p, $e_name)
> >> {
> >> // ...
> >> }
> >>
> >> function _xml_character_data($p, $data)
> >> {
> >> echo "element is: ".$this->current_element."\n";
> >> echo "data is: $data\n";
> >> }
> >>
> >> } // end of class Blah
> >>
> >>
> >>
> >> When this XML parser gets called from within the Blah class, the
"element
> >> is:" portion of _xml_character_data comes out blank!
> >>
> >> This sort of makes sense, because the callback functions are "children"
of
> >> the xml_parser_create "parent" ... But should that make the children
> >> ignorant of the "grandparent" variables referred to by $this->varname?
> >>
> >> I hope this makes sense ... Has anyone else encountered this sort of
> >> problem? I'm an old hat at PHP, but am relatively new to both XML
parsing
> >> and writing my own classes.
> >>
> >> Thanks,
> >> Clay
> >>
> >
> >
>


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




[PHP] Re: Script Security: Best coding practices

2002-07-03 Thread Peter James

A suggestion would be to make sure that the variables you're receiving are
coming from where you think they're coming from...

For instance,

$_SESSION['logged_in']  is also (generally) $logged_in
but so is
$_GET['logged_in']

A smart user could fake it if they wanted to... check the $_SESSION or
$_COOKIE or $_POST arrays when it's important, don't just check
$logged_in...

P.



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




[PHP] Authentication

2002-07-03 Thread Peter

On my site, when a user logs in, their password is encrypted using md5() and
the username and encrypted password is then passed from page to page using
hidden form inputs (clicking on a link submits the form using POST).
Does anyone have any comments on this method e.g. security wise? I know I
could use sessions or cookies but is it relly necessary?



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




[PHP] Re: $this in an XML data handler ... in a class

2002-07-03 Thread Peter Clarke


"Clay Loveless" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Here's a brain-bender ... At least it is for me at the moment. : )
>
> When I use an XML parser inside a class, the xml_*_handler functions
aren't
> recognizing "$this->" variables. I can kind of see why ... But would like
it
> to work anyway. : )
>
> Here's an example:
>
> class Blah
> {
> var $xmlparser;
> var $current_element;
>
> // ...
>
> function _parseXML($data)
> {
> $this->xmlparser = xml_parser_create();
> xml_set_element_handler(
> $this->xmlparser,
> array($this,"_xml_start_element"),
> array($this,"_xml_end_element"));
> xml_set_character_data_handler(
> $this->xmlparser,
> array($this,"_xml_character_data"));
> xml_parse($this->xmlparser, $data);
> xml_parser_free($this->xmlparser);
> }
>
> function _xml_start_element($p, $e_name, $e_attributes)
> {
> $this->current_element = $e_name;
> }
>
> function _xml_end_element($p, $e_name)
> {
> // ...
> }
>
> function _xml_character_data($p, $data)
> {
> echo "element is: ".$this->current_element."\n";
> echo "data is: $data\n";
> }
>
> } // end of class Blah
>
>
>
> When this XML parser gets called from within the Blah class, the "element
> is:" portion of _xml_character_data comes out blank!
>
> This sort of makes sense, because the callback functions are "children" of
> the xml_parser_create "parent" ... But should that make the children
> ignorant of the "grandparent" variables referred to by $this->varname?
>
> I hope this makes sense ... Has anyone else encountered this sort of
> problem? I'm an old hat at PHP, but am relatively new to both XML parsing
> and writing my own classes.
>
> Thanks,
> Clay
>


Have a look at:
http://www.php.net/manual/en/function.xml-set-object.php

xml_set_object($this->parser, &$this);



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




Re: [PHP] Dealing with XML charsets

2002-07-02 Thread Peter

On Tue, 2 Jul 2002 15:23:38 -0600, [EMAIL PROTECTED] (Ray Hunter) wrote:
> Check here:
> http://www.chilkatsoft.com/ChilkatXml.asp

Doesn't look as if it'll run under Unix?

> Google search:
> http://www.google.com/search?sourceid=navclient&q=convert+xml+charset

I've been googling ont he topic for the past couple of days, and had no luck :-(




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




Re: [PHP] Dealing with XML charsets

2002-07-02 Thread Peter

On Tue, 02 Jul 2002 14:33:35 -0700, [EMAIL PROTECTED] (Clay Loveless) wrote:
> I haven't tried this myself yet, but will soon be facing a similar need.
> 
> http://www.php.net/iconv
> 
> That's probably the way I'll start off on tackling this problem ... Grab
> your XML document, check to see if it's in windows-1252, and if it is, run
> it through the iconv functions, then parse the XML data.

Thanks.  I tried this on my Windows development server and got absolutely no output 
from these functions, so gave up.  Now i'm wondering whether 
it's just a Windows-only bug: I'll have to look and see if my web hosting has this 
installed as it would be a smart option if it did work.

Using the unicode translation tables I built some kind of translation table which 
seemed to work, but it converted to utf-16 rather than utf-8, 
so everything showed as little squares rather than characters :-(  Otherwise this 
would have worked nicely (contact me if you want more details).

Thanks
Peter



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




[PHP] Dealing with XML charsets

2002-07-02 Thread Peter

Hi,

Has anyone any advice as to how to deal with XML documents encoded in windows-1252: a 
character set that PHP's XML extension won't process?  I've 
got a large number of such documents, and using xml_parse_into_struct() would be the 
easiest way to handle them - but because of the encoding 
problem I keep on ending up with ? instead of characters in the document in certain 
places.  Is there any way I could convert the charset?

Thanks
Peter



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




[PHP] Passing more than one variable with alink

2002-07-01 Thread Peter Goggin

I need to pass more than one variable with a link.

I cannot see the syntax listed anywhere.

I am using :
printf ("",$catitempage,$catrange);


Obviously the separators between the two variablesare incorrect.   i.e. I
have: ?catitempage=%s;?catrange=%s

Can anyone tell me what it should be or where I can find a reference to
these sort of syntax problems.


Regards

Peter Goggin


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




[PHP] str_replace() not accepting arrays?

2002-07-01 Thread Peter

Hi,

In the documentation it says that str_replace() accepts an array as its subject.  I 
have been trying to use it with a multidimensional array, but 
keep on getting the following error:

Notice: Array to string conversion in c:\code\xml\index.php on line 85

And my arrays are flattened :-(

$foo = array(
'0' => array('foo => 'bar'),
'1' => array('fff' => 'f',
'feen' => 'foo')
);

Returns an array like
Array ( [0] => Array [1] => ) when printed out.

Is the documentation wrong or is PHP 4.2.1 broken?

Thanks
Peter



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




Re: [PHP] checking date is not greater than today

2002-06-30 Thread Peter J. Schoenster

On 30 Jun 2002 at 22:31, Timothy J. Luoma wrote:

> 
> I am trying to compare a given date string (i.e. June 30, 2002 is
> 20020630).  I want to make sure that the input string that is given is
> not greater than today (i.e. if today is June 30, and you ask for
> 20020701, I want to be able to throw an error).

> I'm a newbie, so I'm not sure the best way to do this.  My thought was
> that if I take the year () and add on the day-of-year (i.e. Feb 10
> = 041) then I would be able to compare them as you would any other
> numbers.

[...] snipped

I ignored the rest as it was beyond me. I'm also a newbie to PHP but I looked into 
dates in Perl. I quickly began using a module from CPAN as I realized this was more 
complicated than meets the eye 
and you seem to indcate that when you mention leap years.

I would question why you accept input as a particular format. It's certainly easier to 
work with timestamps than arbitrary representations of dates.  I would not be so quick 
to assume you have to accept 
input as is.  Or at least have it fixed to a format ... but the Perl modules I've 
worked with are liberal with what they receive  :) Anyhow, I'd just find a PHP 
module ot handle this. 

I found this:

http://www.phpbuilder.com/columns/akent2610.php3

but I'd just want a class (guess you call it that in PHP).


And then this looks real interesting:

> Date/Time Processing with PHP
> By The Disenchanted Developer
> March 19, 2002

http://zope1.devshed.com/zope.devshed.com/Server_Side/PHP/DateTime/page1.html

In Perl I happen to use this moduel for date manipulation:

http://search.cpan.org/doc/STBEY/Date-Calc-5.0/Calc.pod

There must be something similar in PHP but since I too am a newbie (and lazy to boot) 
I don't know what it is. 

Peter




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




RE: [PHP] PHP with CSS

2002-06-30 Thread Peter

Bruce...

there is nothing stopping it from working unless they are turned off in the browser's 
settings... just be mindful that CSS works slightly differently in netscape to ie..

-Original Message-
From: Bruce Karstedt [mailto:[EMAIL PROTECTED]]
Sent: Monday, 1 July 2002 2:32 PM
To: PHP - General List (E-mail)
Subject: [PHP] PHP with CSS


Quick question?

Is their anything in Apache or PHP that would keep styles from working. Both
external (CSS) and inline styles are ignored.

Environment :

Win XP Pro
Apache 2.0.39
PHP 4.2.1

Writing & Debugging on Homesite 4.0.1

Bruce Karstedt
President
Technology Consulting Associates, Ltd.
Tel: 847-735-9488
Fax: 847-735-9474


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




Re: [PHP] Getting IP from behind proxies

2002-06-30 Thread Peter

why not assign your user a unique id when they first visit you site and this
is registered in a database. The unique id is then passed from page to page
in the URL (i.e. get method)
when they submit their vote, the PHP page:
1: check to see if that Unique ID is stored in the database (checks it
hasn't just been made up)
2: checks to see if the "Voted" field is set to false
if either of the above return as FALSE reject the vote because either the
user has already voted or they modified the unique id to try and cheat the
system.
Now, the only way for them to make multiple votes is to keep getting to the
voting page by going back to your homepage and following the links to your
vote page or to make up a unique id and hope it's already been created by
someone else.
Every time you change the poll, you should empty the database as there could
be a few unique ids that were created but the visitor didn't vote.

It's a bit overkill for a web poll though!!!


"Bruce Karstedt" <[EMAIL PROTECTED]> wrote in message
000401c22047$925f4840$768c3841@c3">news:000401c22047$925f4840$768c3841@c3...
> Why not create a cookie for that poll. When the vote check for the cookie.
> Unless a user clears the cookie himself, you basically limit votes to one
> per computer or one per computer per user.
>
> Bruce Karstedt
> President
> Technology Consulting Associates, Ltd.
> Tel: 847-735-9488
> Fax: 847-735-9474
>
>
> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, June 29, 2002 10:34 PM
> To: JJ Harrison
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Getting IP from behind proxies
> Importance: Low
>
>
> You need to assign each person a unique identifier of some sort.  ie.
> assign them a login and password and verify that information by sending a
> message to their email address.  Then only people with multiple email
> addresses can spam your system with votes.
>
> Beyond that it comes down to verifying each voter manually.  Get a phone
> number and call each one up.  Even that is not quite foolproof.
>
> Personal certificates might be an option here, but that is rather
> cumbersome for everyone involved.
>
> Basically there is no good solution for this problem.  Until everyone in
> the world has a unique and non-spoofable, easily verifiable id number,
> what you are trying to do is impossible.
>
> Basically live with the fact that your voting system will be inaccurate
> and spoofable.
>
> -Rasmus
>
> On Sun, 30 Jun 2002, JJ Harrison wrote:
>
> > what esle could i use?
> > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > You can only get it if the proxy provides you with this data.  Most
> don't,
> > > so this is not a reliable approach.
> > >
> > > -Rasmus
> > >
> > > On Sat, 29 Jun 2002, JJ Harrison wrote:
> > >
> > > > I want to check to see if people have voted yet for a poll.
> > > >
> > > > How can I get the ip of a user from both behind a proxy and the
> proxies
> > ip?
> > > >
> > > > is this simple?
> > > >
> > > > will i have trouble with firewalls etc?
> > > >
> > > >
> > > > --
> > > > JJ Harrison
> > > > [EMAIL PROTECTED]
> > > > www.tececo.com
> > > >
> > > >
> > > >
> > > > --
> > > > 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
> >
>
>
> --
> 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




[PHP] Re: Blank emails

2002-06-30 Thread Peter

Can you post the code on here?
There must be some headers somewhere because the mail has been sent to
you -> to header.
Have you clicked on the email in Outlook and looked at the headers / message
source?

"César aracena" <[EMAIL PROTECTED]> wrote in message
002a01c22019$21a0c210$dfc405c8@gateway">news:002a01c22019$21a0c210$dfc405c8@gateway...
Hi all.

I know it's Sunday morning and that I'm NOT getting many responses right
now ;-)

I connected to the net, opened my browser, pointed it towards an e-mail
script I've installed this afternoon in my site (SquirrelMail) qnd got
into the INBOX. once there, I opened my MS Outlook and received 21
messages regarding PHP mailing list stuff, but all these had no FROM,
SUBJECT, TO or CC... I mean, they had body content but no headers to
show. ¿¿¿???

  Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621







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




RE: [PHP] Keeping "Secrets" in PHP Files

2002-06-28 Thread Peter J. Schoenster

On 28 Jun 2002 at 17:54, Jonathan Rosenberg wrote:

> -Original Message-
> > From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
> > Subject: Re: [PHP] Keeping "Secrets" in PHP Files
> 
> > With shell access, you can't see each others
> > files.  This is where the permissions come into
> > play, because you are logged into the box as a
> > specific user, you can only access  your files.
> > If I change the permissions
> > on my files, you can't see them.
> 
> I've been thinking some more about the issue of keeping PHP
> source files secure in a shared hosting environment.  I've now
> convinced myself that there is simply no way to protect these
> files, even if safe_mode is turned on, as long as other users can have
> telnet (or ssh) access to the box.

snip

> I hope wrong.  Can anyone find the hole in my reasoning?

Yeah, you are assuming an environment that does not necessarily have to be. Why must 
one Apache server serve all users? Simply because that's the easiest 
way to do right out of the box?  You have 2 scenarios as I see it:

1. Your own box -- no troubles other than the obvious
2. Virtual Server - One Apache for all users ... seems insecure
3. Virtual Server - One Apache for EACH user ... seems quite secure and experience 
confirms.


> http://www.freevsd.org/

> freeVSD is an advanced web-hosting platform for ISPs, educational
> institutions and other large organisations. It allows multiple Virtual
> Servers to be created on a single hosting server, each with a truly
> separate and secure web-hosting environment. This reduces an ISP's
> hardware outlay and also lowers the cost of support due to delegated
> administration. 
> 
> Distributed under the GPL, freeVSD comes complete with a documented
> administration protocol and an open-source web-based administration
> system. 

That pretty much describes the server I've used at the company once known as iserver 
which was bought by Verio and Verio used much of their website but 
renamed it to viaverio.com (was iserver.com). It looks like they've done the same 
thing with Oracle. The above people have done it with Linux. I've only used 
iserver for 7 years now at 3 different companies but that freeVSD really looks good.

If someone is using Joe's 4.95 a month hosting solution ...well, what the heck do they 
expect. 

Peter






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




Re: [PHP] Rookie Question RE: Specific Coldfusion equivalent in PHP

2002-06-27 Thread Peter Janett

header ("Location: http://whatever";);

You probably want to put:
exit;
After that line, so you script stops at that point.  (Exit; is like
)  :)

HTH,

Peter Janett

New Media One Web Services

New Upgrades Are Now Live!!!
Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25,
Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43

PostgreSQL coming soon!

http://www.newmediaone.net
[EMAIL PROTECTED]
(303)828-9882

- Original Message -
From: "bailie" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 27, 2002 2:04 PM
Subject: [PHP] Rookie Question RE: Specific Coldfusion equivalent in PHP


> Hello All,
>
> I am trying to find out what the PHP equivalent is to coldfusion's
> http://whatever";>
>
> Obviously, this cf tag forwards to whatever page is indicated in the url
> arguement.
>
> After having googled and searched all the php sites I know of, I just
cannot
> seem to figure out how this is done.
>
> TIA for any pointers.
>
> JB
>
>
>
> --
> 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




[PHP] Re: Generating Barcodes and printing

2002-06-27 Thread Peter

Read the stuff you find on google first though - there was an article I read
about certain inks absorbing InfraRed light so barcodes printed in them will
not work!
The HP ink used in the Deskjet 693 and 660 seems to be ok for this job.


"Phpcoder" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
> I would like to generate barcodes and have it print out the barcode
> automatically from awebpage, is this possible? How?
> Thanks
>



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




RE: [PHP] closing a browser-window with php

2002-06-26 Thread Peter

Nik,

for that you will have to use JavaScript as PHP is server side only .. not Client side

Cheers

-Original Message-
From: nik crosina [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 27 June 2002 12:12 PM
To: [EMAIL PROTECTED]
Subject: [PHP] closing a browser-window with php


hi news group

my first post, so please be gentle ;-)

my problem is that i have to open a browser page of specific size and
coordinates from a macromedia director movie.

but:   the only call i can send from there is for a browser window without
any attributes (so i can't control size or location).

can i use php to call a webpage that calls a php script and immediately
(without user interaction such as confirming a dialoguebox) opens the
'actual' browser window at the correct location and the right size?

thanks in advanced for your help!!

nik crosina



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




[PHP] preg and Perl 6 (upcoming..not current preg handling)

2002-06-26 Thread Peter Thoenen

Anybody know if PHP 4.x (5.x?) will be sticking with
Perl5 RegEx syntax for preg's or will it be changing
to the new Perl6 RegEx syntax (which I really dislike
but what can you do, Larry has spoken).

If we do plan to move to Perl6 RegEx, please implement
the P5 modifier 

-Peter

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Re: [PHP] Seperating presentation from logic

2002-06-26 Thread Peter J. Schoenster

On 25 Jun 2002 at 17:40, Jean-Christian Imbeault wrote:

> Some of the "issues" are things like how to make it painless for both
> the designers and me if one day, out of the blue, a designers decides
> that the background colour should be changed, or the graphics changed.
> Or even worse the two column layout should be a three column layout.
> 
> But to start off with simple things like:
> 
> Designer:
>  - on this page a dynamic table will be generated according to the
>  search 
> criteria entered by the user
>  - lines will have alternating colours
> 
> I can code this easily, but what if the designer then decides that he
> wants each *third* line to alternate colour, or he wants to use three
> colours instead of two (a pattern 1,2,3,1,2,3 instead of 1,2,1,2).
> 
> How can I make it so that he can do these changes without coming to
> see me to change the code that outputs the data used in the table?
> 
> Simple things like that ;)

There was a recent thread on the mod_perl list related to this concept: MVC. 

http://st-www.cs.uiuc.edu/users/smarch/st-docs/mvc.html

I have an image gallery app in Perl. There are controllers (cgi, mod_perl handler, 
script) which call functions in the "models" which simply or not perform functions and 
return data in hashes and 
arrays and arrays of hashes of arrays ... :)  then the controller calls the viewer 
it wants to use (works with HTML::Template or Template::Toolkit) and sends the results 
back to the client 
making the request (and depeneding on that client, one or other view would be used). I 
rebelled when my boss wanted me to write an app for a handheld ... oh sure ... I'll 
just cut and paste and 
... what a mess you will get into.  You can see that here:

http://www.memphisart.com/gallery/

I am in the process of applying some themes from this site:

http://www.oswd.org/

Takes about 10 minutes to 1 hour depending on how the theme is written.

The same concepts apply to PHP. I have 2 php sites and I've kind of tried to avoide a 
mishmash of html and PHP code all over the place. I used the concept of the Wrapper 
from 
Template::Toolkit for with a port of HTML::Template to PHP here:

http://www.coremodules.com/
http://www.coremodules.com/talent/index.php

A page calls which wrapper it wants to use. So in the case of talent it uses a one 
table body whereas most other pages use the 3 column wrapper.  The pages simply gather 
the content ... the 
design of the page (for the site as a whole therefore) is done in one location.

BUT, BUT ... now that I've seen this site:

http://www.interakt.ro/products/Krysalis/

I'm going to try and scrap my PHP hack above and use the above. I was never able to 
use cocoon because I always use virtual hosts. If I can get the above to work on my 
PHP sites then I 
might use PHP a lot more. I have a good Perl system but I've only played with PHP for 
now. Anyone can write the spagetti code which is 90% of what I see in PHP. Most Perl 
programmers I 
know write their own template system ... just a common sense sort of thing and usually 
it starts from ignorance of a good existing templating system ... I've worked at a few 
different companies 
and I much prefer to find code that follows a standard than code that follows the 
whims of the programmer who happened to string it all together.

Oh one more thing. The best projects I've worked on have an "html guy". This guy is in 
between a programmer and a designer.  We get the designer to do their stuff in 
photoshop or similar and 
the html guy converts that into the screen shots we need with our data model and 
template tags.   Of course most companies think they can get those 2 and someone to 
answer the phone all 
in one package for double minimum wage ... oh well ... If your designers use GUIs and 
think they know what they are doing ... well  I don't know. Maybe M$ has a 
solution that works for that 
environment. 


Peter


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




[PHP] New Newsgroups

2002-06-26 Thread Peter

Does anyone else out there use Outlook Express to get the posts from this
newsgroup?
Yesterday a dialog popped up to say there were new newsgroups (php.docs.de
etc), I acknowledged this but the same message came up again just now!
Did this happen to anyone else or was it just me?!




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




[PHP] Security problem?

2002-06-25 Thread Peter

When you have the standard

$link = mysql_connect("localhost","username","secretpassword");

Would it not be possible for someone to use PHP from another server to
download your source and find out your MySQL details including password?




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




[PHP] Re: PHP 4.2

2002-06-24 Thread Peter

If you want an all in one solution without having to have two versions,
can't you read the status of register_globals from the config file and base
the rest of the script on this?
eg
if (register_globals == 'on') {
$name = _POST['name'];
$address = _GET['address'];
}

then you can access the variables as if register_globals = on even if it
isn't
"Simon Troup" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've written a small freeware script that gets installed on a variety of
> different platforms running various PHP versions.
>
> I've read through the manual about the super global arrays and how post
and
> get vars are no longer registered by default, but am confused about when
it
> would be a good idea to "upgrade" the script.
>
> If I change everything in the script and use $_GET and $_POST etc. then
> those people who are still using earlier versions won't be able to
upgrade.
>
> Does anyone know what the uptake of the latest version is? What is
everyone
> else doing about this? If I were developing for one client it wouldn't be
a
> problem as obviously you'd know what you were developing for.
>
> I'd just like some feedback on when would be a good time to upgrade the
> scripts while causing the minimum disruption and maintaining maximum happy
> users.
>
> Thanks
>
> Zim
>



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




RE: [PHP] Using Oracle Data base store procedure (function, procedure, package)

2002-06-23 Thread Peter

I don't know ... am only just starting to use php & oracle today :)


-Original Message-
From: èdy kurniawan [mailto:[EMAIL PROTECTED]]
Sent: Monday, 24 June 2002 12:46 PM
To: Peter; php general
Subject: Re: [PHP] Using Oracle Data base store procedure (function,
procedure, package)


Peter,

Thanks for your ASAP response,
Have you ever touch with oracle scripting ?
The manual doesn't show how we can execute kind of oracle store procedure ..

I thought that PHP only supporting for SQL - query only but not supported to
retrieve PL-SQL,
When I do the samething with Oracle developer in PHP environment so I have
to convert my PL-SQL which stored in Oracle DB to PHP script. In my mind it
shows that PHP only use Oracle just only 'data storage', could not retrieve
many additional features of oracle itself.

CMIIW,
edyk


- Original Message -
From: "Peter" <[EMAIL PROTECTED]>
Subject: RE: [PHP] Using Oracle Data base store procedure (function,
procedure, package)


> have a look here ... this would be a good starting point...
>
> http://www.php.net/manual/en/ref.oracle.php
>
> I am sure this would be available in many other languages apart from just
english :)
>
>
> -Original Message-
> From: èdy kurniawan [mailto:[EMAIL PROTECTED]]
> procedure, package)
>
>
> very thanksful if you could refering to me what part (kinda) manual that
> shows my case ?
> i've ever read the PHP manual in english, but i can't find what i need.
>
> please..
>
> sincerely,
> edyk





RE: [PHP] Using Oracle Data base store procedure (function, procedure, package)

2002-06-23 Thread Peter

have a look here ... this would be a good starting point...

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

I am sure this would be available in many other languages apart from just english :)


-Original Message-
From: èdy kurniawan [mailto:[EMAIL PROTECTED]]
Sent: Monday, 24 June 2002 12:20 PM
To: Peter; php general
Subject: Re: [PHP] Using Oracle Data base store procedure (function,
procedure, package)


very thanksful if you could refering to me what part (kinda) manual that
shows my case ?
i've ever read the PHP manual in english, but i can't find what i need.

please..

sincerely,
edyk


- Original Message -
From: "Peter" <[EMAIL PROTECTED]>
Subject: RE: [PHP] Using Oracle Data base store procedure (function,
procedure, package)


> by looking in the manual :) there is someinfo there..
>
> -Original Message-
> From: èdy kurniawan [mailto:[EMAIL PROTECTED]]
>
> Dear pals,
>
> how can we execute  Oracle Data base store procedure (function, procedure,
> package) and retrieve the result/s via PHP ?
>



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




RE: [PHP] Limiting text inputs by character count?

2002-06-23 Thread Peter

 for standard text input use

  that will only allow 10 
characters

not sure if that will also work for text area's

-Original Message-
From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
Sent: Monday, 24 June 2002 11:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Limiting text inputs by character count?


Is there a way to limit the number of characters that may be inputed into:
a) a  input
b) a  input

I would like to control the maximum number of characters for each of these 
inputs.

Any suggestions of where to look, or how to do it, if it's possible, would be 
greatly appreciated.

Tia,
Andre


-- 
Please pray the Holy Rosary to end the holocaust of abortion.
Remember in your prayers the Holy Souls in Purgatory.

May God bless you abundantly in His love!
For a free Cenacle Scriptural Rosary Booklet: http://www.webhart.net/csrb/

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




RE: [PHP] Using Oracle Data base store procedure (function, procedure, package)

2002-06-23 Thread Peter

by looking in the manual :) there is someinfo there..

-Original Message-
From: èdy kurniawan [mailto:[EMAIL PROTECTED]]
Sent: Monday, 24 June 2002 11:24 AM
To: php general
Subject: [PHP] Using Oracle Data base store procedure (function,
procedure, package)


Dear pals,

how can we execute  Oracle Data base store procedure (function, procedure,
package) and retrieve the result/s via PHP ?

any example ?

TIA,
edyk


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




[PHP] Old config options still showing after updating PHP

2002-06-21 Thread Peter Janett

I have been compiling some extra configure options into PHP (4.1.2), such
as --enable-xslt --with-xslt-sablot, and have had no problem getting PHP to
configure, then make, then make install.

Even after recompiling PHP, and then restarting (stopping, then starting)
apache, phpinfo still shows the old configuration options.  (I tried
deleting config.cache and re compiling, but that didn't help.)

I remember having this issue last time I upgraded, and when I figured it out
it was kind of a dumb thing I was forgetting to do, but I can't seem to
remember what it was.

Any help appreciated.

Thanks,

Peter Janett

New Media One Web Services
http://www.newmediaone.net
[EMAIL PROTECTED]







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




[PHP] Status code and Header("Location: ")

2002-06-20 Thread Peter Thoenen

PHP Manual says there are two special cases for
headers, Location and Status.  Not to concerned about
status here, but it states that Location: always
returns an status code 302.  Now HTTP/1.1 depreciates
302 since browsers were incorrectly implementing it
anyways.  It was replaces 302 with the MUSTS 303 and
304.  (304 is the correctly handled 302, and 303 is
the current incorrect way most browsers implement 302)

Since PHP seems to always return 302, is it possible
to force HTTP/1.1 compliance and return 303 or 304
depending on my situation?

-Peter


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




[PHP] dynamic water marks?

2002-06-18 Thread Peter

howdy 

does any one know if it's possible to assign a dynamic watermark to am image
or place a watermark effect over a images so it looks like it's on the file
when it's not really?...with out going into layers hopefully ... for
example...

a user up loads a simple image to the site say in jpg format
when the image is displayed on any page a watermark is disply over part of
the image .. to try and bluff other people into thinking the watermark is
part of the image...



Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




RE: [PHP] table porblem in netscape!!

2002-06-18 Thread Peter

this will work a treat 4 ya...

   
  

Cheers


> -Original Message-
> From: Anil Garg [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 5:35 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] table porblem in netscape!!
> 
> I have made a table as shown below..
> But when i open it in netscape in shows some blank space where i have
used
>  tag.
> Can anyone plz help me with this!!
> -
>cellpadding=0 cellspacing=0
height=25
> width=100%>
> 
>  
>  
> 
>  
>  
>  
>   Welcome !
>      
>  
> 
>
> 
> thanks
> anil
> 
> 
> --
> 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



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




RE: [PHP] php server - ive installed linux red hat 7.2 now what?!?

2002-06-18 Thread Peter

try ifconfig -a ...

-Original Message-
From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 19 June 2002 3:50 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php server - ive installed linux red hat 7.2 now what?!?


okay, so I've installed linux red hat 7.2 and it's working well!
 
ive heard that php/apache/mysql comes preinstalled with red hat.
 
what do i need to do to get php/mysql up and running?
 
also, how do i figure out my linux box's IP address?  ipconfig doesn't
work hehe.
 
Thanks for your time!!!


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




[PHP] Re: php server on Windows

2002-06-14 Thread Peter

You can run PHP as a module / extension for apache or let Apache load and
run the php.exe program for each php file.
Loading and running the program in quick succession strains the system
somewht but the extension is always loaded and is just used when needed -
much faster and efficient.


"Phil Schwarzmann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> So I'm thinking about setting up a little php/mysql web server here at
> work and want to use Windows as my platform instead of Linux and have a
> couple questions...
>
> I know that PHP on Windows has some limitations as compared to Linux.
> What are these limitations?
>
> Which version of Windows would be best ?
>
> Is this gonna be a real pain in the ass to get PHP & MySQL & Apache &
> Windows to get along well?
>
> Can I use IIS instead of Apache ?
>
> Thanks!
>



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




[PHP] Re: php server on Windows

2002-06-13 Thread Peter

Win98, Apache, PHP 4.0.6 and MySQL with a whole bunch of other apps has been
running fine at our school for ages - never crashed yet! (Doesn't get heavy
usage though either!)
We use the apache extension thingy, not the CGI version of PHP which helps a
lot.


"Phil Schwarzmann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> So I'm thinking about setting up a little php/mysql web server here at
> work and want to use Windows as my platform instead of Linux and have a
> couple questions...
>
> I know that PHP on Windows has some limitations as compared to Linux.
> What are these limitations?
>
> Which version of Windows would be best ?
>
> Is this gonna be a real pain in the ass to get PHP & MySQL & Apache &
> Windows to get along well?
>
> Can I use IIS instead of Apache ?
>
> Thanks!
>





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




[PHP] Re: goto

2002-06-13 Thread Peter

maybe switch() would be of some use?  Your could save the values for $type
in an array and look them up to get a numbe to use with switch(). You can
also have a "case else" with switch.


"Stephen Brewster" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am wirting a code seperation engine for PHP, the idea of which is it
will
> remove the need for me to have to build the majority of the websites at my
> company. The designers will be able to build the html in dreamweaver or
> similar and then insert custom tags into their code. The engine will parse
> the code and insert the necessary PHP code. For the most part this engine
is
> working. However under some cirtumstances (like the one shown below) I
need
> to be able to perfom a loop or if statement. This is proving to be
> incredably difficult since I would end up with code like below. For
obvious
> reasons the compiler does not like this code. This would be simple if PHP
> had GOTO's. Does anyone know of a way around this situation?
>
> HTML
> 
> 
>
>
>   
>   
>
>
> 
>
>
> PHP
> ---
>
> if($type == 'LOOP') {
>$sql = 'SELECT * FROM products';
>$result = mysql_query($sql, $db);
>$record = $mysql_fetch_array($result, MYSQL_ASSOC);
>{
> }
>
> if($type == 'TEXT')
>echo($record[$field]);
>
> if($type == 'ENDLOOP') {
>}
> }
>
> --
>
> --
> Stephen Brewster
> Email: [EMAIL PROTECTED]
> Tel: 0116 2335545
> Mobile: 07776 475849
> ICQ: 383095
> --
>
> UNIX SEX
> unzip; strip; touch; finger; mount; fsck; more; yes; umount; sleep
>
>
>



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




RE: [PHP] Varible Varibles

2002-06-12 Thread Peter

Ok,...

what sort situations would you benifit using the first method?

ie

is it more suiteable to making some conditions

eg

$a = foo;
while {$$a <= bar)
echo "$a";
endwhile;







-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 13 June 2002 12:44 PM
To: 'Peter'; Php
Subject: RE: [PHP] Varible Varibles


well, the first method is the same as saying
$a = "foo";
$foo = "bar";
echo "$a $foo";

whereas the second method is appending "bar" to $a (thus making it "foobar")

In first method, you get two variables, the second, just one

-Original Message-
From: Peter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 12:42 PM
To: Php
Subject: [PHP] Varible Varibles


howdy,
I'm just curious here about varible varibles ... I know that you can, well
it's documented that you can, do the following



which will produce  foo bar

now what I am curious about is, how much of a difference does that really
make when you compare it to..






Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




[PHP] Varible Varibles

2002-06-12 Thread Peter

howdy,
I'm just curious here about varible varibles ... I know that you can, well
it's documented that you can, do the following



which will produce  foo bar

now what I am curious about is, how much of a difference does that really
make when you compare it to..






Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




RE: [PHP] Creatng a PHP chatroom

2002-06-12 Thread Peter

have a look on www.phpbuilder.com zend.com, www.phpwizard.net & the like and
have a look there .. particually phpwizard as there is  phpirc in there
under projects

Cheers
Peter

-Original Message-
From: Phil Powell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 13 June 2002 10:02 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] Creatng a PHP chatroom


I am intrested in creating a chatroom entirely in PHP involving streaming
text.  Where can someone help me to find such a means of doing so?

Thanx
Phil
http://valsignalandet.com



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




RE: [PHP] Include question

2002-06-11 Thread Peter

Tom,

just did ur test on win2k php 4.2.1 with apache and when i just did .. 



i get a blank screen as I should

the only way you should be getting anything is by calling the values...

-Original Message-
From: Tom Ray [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 12 June 2002 11:36 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Include question


Yes, but according to http://www.php.net/manual/en/function.include.php 
I should be able to delcare the include and then pull the information 
out normally. So by what the manual says I can do this

somefile.php


callfile.php


But when I just do



It prints:
$apple = 'green'; $pear = 'yellow':


Why is that?


John Holmes wrote:

>Umm...that's what it's supposed to do...it's "including" it...
>
>---John Holmes...
>
>  
>
>>-Original Message-
>>From: Tom Ray [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, June 11, 2002 9:29 PM
>>To: [EMAIL PROTECTED]
>>Subject: [PHP] Include question
>>
>>I'm trying to use the include function in some PHP scripts, but when I
>>
>>
>do
>  
>
>>include 'config.inc'; or include 'config.php;
>>
>>It returns all the information in the file when I look at my test php
>>file (which calls the include) Anyone know why this is?
>>
>>
>>--
>>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



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




RE: [PHP] get pwd on windows

2002-06-11 Thread Peter

Jim,

Try it and find out ;) just do a simple echo of that and you find it does
what it says it returns the path to the document root of ur sever ie where
the page is located on the machine.

Cheers

Peter

-Original Message-
From: Jim lucas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 12 June 2002 10:13 AM
To: Lazor, Ed; 'Shane Wright'; [EMAIL PROTECTED]
Subject: Re: [PHP] get pwd on windows


what does $GLOBALS['DOCUMENT_ROOT'] return?

Jim Lucas
- Original Message -
From: "Lazor, Ed" <[EMAIL PROTECTED]>
To: "'Shane Wright'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 4:35 PM
Subject: RE: [PHP] get pwd on windows


> Will getcwd() work for you?
>
> Also, try phpinfo() to find out which variables are set.
>
> -Original Message-
> From: Shane Wright [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 10:45 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] get pwd on windows
>
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi
>
> Ok, I need to write this little script to run on a Windows box (don't
> ask...),
> but I'm getting completely shafted by the inconsistent use of long
> filenames.
>
> I need to get the current directory, but it must have long filenames and
not
>
> be chopped to xxx~1 or anything.   $SCRIPT_FILENAME is not set, there is
no
> pwd utility, nothing is set in the environment and realpath('./') returns
> cropped firectory names.
>
> Is there a way to do this or am I condemned to bang my head against a wall
> and
> swear some more?
>
> Cheers
>
> - --
> Shane
> http://www.shanewright.co.uk/
> Public key: http://www.shanewright.co.uk/files/public_key.asc
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE9Bjcw5DXg6dCMBrQRAjjbAJ4iz2jRJ5rMzkV7Md5GHpTd3YcX1wCfZb6B
> 44Qwj0u6jdfNpGtf+LTEX+w=
> =HgUp
> -END PGP SIGNATURE-
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

> This message is intended for the sole use of the individual and entity to
> whom it is addressed, and may contain information that is privileged,
> confidential and exempt from disclosure under applicable law.  If you are
> not the intended addressee, nor authorized to receive for the intended
> addressee, you are hereby notified that you may not use, copy, disclose or
> distribute to anyone the message or any information contained in the
> message.  If you have received this message in error, please immediately
> advise the sender by reply email and delete the message.  Thank you very
> much.
>
> --
> 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



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




RE: [PHP] Installation and/or configuration problems w 4.2.1 on NT

2002-06-11 Thread Peter


George,

your problem seems to be with your ACL ( Access Control List ) in other
words the user permissions on the machine you are remotely logging into ..
you need to have full Administrator rights inorder to install php onto NT..
get the People who are local to the machine to give you the full admin
rights and it should be fine. If they won't then walk them through the
installation via phone or what eva

Cheers
Peter

-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 3:48 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Installation and/or configuration problems w 4.2.1 on NT


Hi all,

I have PHP running happily on three of my servers (NT/2000/Linux) and need
to set it up on NT on a server 400 miles away. I have remote access to the
server.

I have followed the instructions for both the ISAPI version and the CGI
version with no success.

This is the error message I get when I try to call phpinfo.php:

HTTP Error 401
401.3 Unauthorized: Unauthorized due to ACL on resource

I'm now just about to start pulling my hair out, so can someone help before
I'm totally bald.


This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.

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




RE: [PHP] NEWBIE- Is this possible? How?!

2002-06-06 Thread Peter

 have a look at something like http://phpnuke.org   or the like ... maybe
this is what ur after ...



-Original Message-
From: Kevin J [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 June 2002 11:50 AM
To: [EMAIL PROTECTED]
Subject: [PHP] NEWBIE- Is this possible? How?!



Hello All Helpers!  :)

I was wondering if it is possible to mix Dynamic Content with Layers?

If not I was wondering if someone can help me with my idea:

I have designed a website for a band (see below name) and I would like to
add a feature where the band members can log in and write something, and
have it displayed on the page...i guess kinda like a guestbook, but I would
like to have the content to be overwritable. I guess if the band members
had their own page, they could add their own content whenever they wanted
to, and it would update accordingly.

Be warned I have no background in PhP.

I would basically like to know what it is I am looking for to creating this.
I have bought Beginning PhP 4 by Wrox, and I am slowly getting into it. I
just need some direction please.

Thanks,

Kevin

Thanks,

Kevin J

--
http://www.wishpocket.com




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




[PHP] Tree structures, references & segfaults

2002-06-06 Thread Peter Blokland

Hi,

I'm trying to build a tree of objects in PHP, and having all sorts of
trouble. Ideally, I'd like to end up with a reference to an object, 
which has an array of (references to) child-objects. Each child-object,
except the root, also contains a reference to its parent. A sample :

name = $name;
$this->children = array();

  }

}

session_start();

if(!$_SESSION['root']) {

  $root = new myObj("root");
  $child1 =& new myObj("child1");
  $child1->parent =& $root;
  $root->children[] =& $child1;
  $child2 =& new myObj("child2");
  $child2->parent =& $child1;
  $child1->children[] =& $child2;

  $_SESSION['root'] =& $root;

}

?>

Load this to create the session, reload it to (try to) use the session.
This code works on Linux (php 4.2.1), and segfaults on OpenBSD (also
php 4.2.1) with one or more of these when reloaded :

[Thu Jun  6 22:24:31 2002] [notice] child pid 12335 exit signal 
Segmentation fault (11)
- or -
FATAL:  erealloc():  Unable to allocate -541078048 bytes
- or -
[Thu Jun  6 22:25:00 2002] [notice] child pid 23244 exit signal 
Illegal instruction (4)

After some searching, I found a bug report stating that circular references 
are not supported, and probably won't be for some time to come. 
What I'd like to know is :
 - are circular refs the problem here, and if so, why does it seem
   to work on linux ?
 - could somebody point me to a better way of building an n-ary tree of
   objects that can be stored in sessions ? I tried searching, but found
   little usefull code so far.
   in the app I'm trying to get started, each object could be one of a
   set of classes, all derived from the same base-class, which should
   hold all tree-manipulation methods. something like the class DomNode,
   but more extensible (in the regular PHP-sense of 'extends').

-- 
CUL8R, Peter.


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




<    9   10   11   12   13   14   15   16   17   18   >