|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help
lists.php.net
Date: Tue Feb 19 2008 - 22:21:14 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 20 Feb 2008 04:21:14 -0000 Issue 5303
Topics (messages 269629 through 269684):
Re: www. not working
269629 by: Daniel Brown
269649 by: Richard Lynch
269652 by: Daniel Brown
269654 by: Wolf
269683 by: Larry Garfield
Re: Question about cURL, and iFrames...
269630 by: Dan Joseph
269647 by: Shawn McKenzie
Re: System errno in PHP
269631 by: Nick Stinemates
269645 by: Richard Lynch
269648 by: Richard Lynch
Re: mysql input
269632 by: Daniel Brown
269636 by: admin.buskirkgraphics.com
269650 by: Richard Lynch
269651 by: Richard Lynch
Re: More than one values returned?
269633 by: Nick Stinemates
269658 by: Greg Donald
269659 by: Greg Donald
269660 by: Steve Edberg
269674 by: Greg Donald
269682 by: Nick Stinemates
Re: Hiding all browser toolbars - how?
269634 by: Daniel Brown
269644 by: Richard Lynch
Thread Safety
269635 by: Thiago Pojda
269638 by: Daniel Brown
269640 by: Thiago Pojda
269641 by: Daniel Brown
269661 by: Tom Rogers
MySQL Stored Procedures
269637 by: admin.buskirkgraphics.com
269665 by: Chris
Re: js to php help
269639 by: Brady Mitchell
269662 by: tedd
Re: Call PHP script from MySQL
269642 by: Richard Lynch
unable to unset reference
269643 by: Sylvain Rabot
269653 by: Shawn McKenzie
269655 by: Shawn McKenzie
269656 by: Shawn McKenzie
269657 by: Wolf
269664 by: Chris
269666 by: Shawn McKenzie
269667 by: Shawn McKenzie
269668 by: Chris
Re: [PHP-INSTALL] Re: [PHP] Thread Safety
269646 by: Thiago Pojda
Re: fopen never ends?
269663 by: Chris
269671 by: Richard Lynch
Re: Session destruction problem
269669 by: Adil Drissi
xpath question
269670 by: RJO
269681 by: Andrew Ballard
Re: classes
269672 by: Richard Lynch
What community software package gets your vote? PHPfox etc...
269673 by: TS
269677 by: Greg Donald
269684 by: TS
Re: open a secondary window/tab in the browser from php
269675 by: Richard Lynch
Re: Protected ZIP file with password
269676 by: Richard Lynch
269678 by: Richard Lynch
269679 by: Richard Lynch
Re: Converting tab delimited file to CSV
269680 by: Richard Lynch
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
On Feb 19, 2008 4:43 AM, Christoph <christoph.boget
gmail.com> wrote:
> > Don't do that.
> > Some sites may or may not use www. for whatever reason...
> > Usually screwed-up A-name records by incompetent sysadmins, but there
> > it is...
>
> Really? So
>
> games.yahoo.com
> blogreport.salon.com
> mirror1.downloads.com
>
> are examples of screwed up records by incompetent sysadmins?
No, they're properly-configured FQDNs. They're just irrelevant
examples to the context in which Rich was relaying to the OP.
Picture a server where the A records or CNAMEs don't exist for the
www. alias. Or, conversely, where the only way to access the domain
is by using the www. alias.
Those, Christoph, are some of the things incompetent sysops do....
and on a surprisingly frequent basis.
Take the website of the wonderful Commonwealth of Pennsyltucky for example:
Doesn't Work Works
---------------------
-----------
dot.state.pa.us
www.dot.state.pa.us
lcb.state.pa.us
www.lcb.state.pa.us
psp.state.pa.us www.psp.state.pa.us
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
On Tue, February 19, 2008 3:43 am, Christoph wrote:
>> Don't do that.
>> Some sites may or may not use www. for whatever reason...
>> Usually screwed-up A-name records by incompetent sysadmins, but
>> there
>> it is...
>
> Really? So
>
> games.yahoo.com
> blogreport.salon.com
> mirror1.downloads.com
>
> are examples of screwed up records by incompetent sysadmins?
No, those are the examples of people who did it on purpose.
But there are tons of sites where www.example.com does not resolve to
example.com, and for no good reason -- Just sheer ignorance on the
part of whomever set up example.com
These far outnumber the folks such as your example.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
attached mail follows:
These new kids have no respect. ;-P
On Feb 19, 2008 2:33 PM, Richard Lynch <ceo
l-i-e.com> wrote:
>
>
> On Tue, February 19, 2008 3:43 am, Christoph wrote:
> >> Don't do that.
> >> Some sites may or may not use www. for whatever reason...
> >> Usually screwed-up A-name records by incompetent sysadmins, but
> >> there
> >> it is...
> >
> > Really? So
> >
> > games.yahoo.com
> > blogreport.salon.com
> > mirror1.downloads.com
> >
> > are examples of screwed up records by incompetent sysadmins?
>
> No, those are the examples of people who did it on purpose.
>
> But there are tons of sites where www.example.com does not resolve to
> example.com, and for no good reason -- Just sheer ignorance on the
> part of whomever set up example.com
>
> These far outnumber the folks such as your example.
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/from/lynch
> Yeah, I get a buck. So?
>
> --
>
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
---- Christoph <christoph.boget
gmail.com> wrote:
> > Don't do that.
> > Some sites may or may not use www. for whatever reason...
> > Usually screwed-up A-name records by incompetent sysadmins, but there
> > it is...
>
> Really? So
>
> games.yahoo.com
> blogreport.salon.com
> mirror1.downloads.com
>
> are examples of screwed up records by incompetent sysadmins?
>
> thnx,
> Chris
No, these are examples of ones set up specifically for specific purposes.
Just like http://lonewolf.homelinux.net/ can actually resolve correctly when www is placed at the front due to my settings.
However a site like http://nc4h.org actually NEEDS to have the www in the front because the sysadmins haven't corrected a known issue for 3 years now.
But the point is, there are a number of sites which don't have a www in the front for a specific and valid reason, and other times where the sysadmins are just morons.
Making any site re-direct to www as a cause is just overhead not needed, either your site works correctly or you talk with your sysadmin about getting the records corrected and the server correct to respond to requests in any flavor for your site's specific needs. And if you do it right, you use the server to mod_rewrite the url and you are golden.
Wolf
attached mail follows:
On Tuesday 19 February 2008, Daniel Brown wrote:
> On Feb 19, 2008 4:43 AM, Christoph <christoph.boget
gmail.com> wrote:
> > > Don't do that.
> > > Some sites may or may not use www. for whatever reason...
> > > Usually screwed-up A-name records by incompetent sysadmins, but there
> > > it is...
> >
> > Really? So
> >
> > games.yahoo.com
> > blogreport.salon.com
> > mirror1.downloads.com
> >
> > are examples of screwed up records by incompetent sysadmins?
>
> No, they're properly-configured FQDNs. They're just irrelevant
> examples to the context in which Rich was relaying to the OP.
>
> Picture a server where the A records or CNAMEs don't exist for the
> www. alias. Or, conversely, where the only way to access the domain
> is by using the www. alias.
>
> Those, Christoph, are some of the things incompetent sysops do....
> and on a surprisingly frequent basis.
I see, so because I have garfieldtech.com and www.garfieldtech.com pointing to
two entirely different servers in different states because I want them to do
different things, I'm an incompetent sysop. Thanks, good to know.
DNS was used for a lot of things long before the web came around, ya know.
--
Larry Garfield AIM: LOLG42
larry
garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
attached mail follows:
On Feb 19, 2008 9:44 AM, Jason Pruim <japruim
raoset.com> wrote:
> Thanks for the response. Do you think that there is a better way to
> pull in another webpage other then curl? I mean, could I simply
> include 'HTTP://www.mykillersite.com <http://www.mykillersite.com/>'; and
> have all the link work?
> I'll have to try that in a little bit when I get some development time
> and see how it works...
>
The links probably wouldn't work. What is going to happen is this:
you pull in www.google.com
Now people are looking at www.mykillersite.com and they are seeing Google's
content. If you scrubbed all the hyperlinks and replaced google.com with
mykillersite.com, when they clicked on the Advertising link, they'd end up
on www.mykillerlink.com/intl//ads/ instead, which would 404 of course unless
you created that too.
--
-Dan Joseph
"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."
attached mail follows:
Jason Pruim wrote:
> Happy friday to all of you!
>
> May the Beer[1] flow freely from the kegs to your lips after work!
>
> I am trying to think through something, I am writing a simple proxy
> script for my own knowledge and to simplify my life :)
>
> What I want to do is bring in multiple website by going to 1 webpage
> (Think RSS for the entire website) have all the links work properly,
> login to the pages etc. etc. etc. I think I can do this with cURL which
> can pull the page in and display it properly, but I'm wondering if I
> should be displaying in an iFrame to keep my navigation links at the top
> to go around my site?
>
> Another thing that I'm trying to figure out, is if you can automacially
> fill in usernames/passwords if you can find the name of the box it goes
> in? simply put... txtUsername = "$_POST['Username']; will that fill it
> in on the remote site?
>
> Anyone ever done anything like this that I could look at some code for?
>
> I keep searching for stuff like PHP Proxy, and get all of these sites
> that ARE proxy's... Not quite what I want...
>
> Thanks for looking!
>
>
>
> [1]Or coke, Pepsi, Liquor, etc. etc. etc....
> --
>
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 3251 132nd ave
> Holland, MI, 49424
> www.raoset.com
> japruim
raoset.com
So it looks like iframes. That's the only way to not break links, images
etc...
-Shawn
attached mail follows:
Michal Maras wrote:
> I am now using filesystem functions fopen, fread, fclose, ...
>
> On 19/02/2008, Stut <stuttle
gmail.com> wrote:
>
>> Michal Maras wrote:
>>
>>> Coud somebody tell me if it is possible to get integer value of
>>>
>> variable
>>
>>> which name in C is errno end in perl $!.
>>> I am PHP beginner so I am sorry if question is 'stupid'.
>>>
>> What function are you calling where you expect to get a system error?
>> Check the manual page for that function - it will tell you how to detect
>> errors.
>>
>> -Stut
>>
>> --
>> http://stut.net/
>>
>>
>
>
http://php.net/fopen
--
==================
Nick Stinemates (nick
stinemates.org)
http://nick.stinemates.org
AIM: Nick Stinemates
MSN: nickstinemates
hotmail.com
Yahoo: nickstinemates
yahoo.com
==================
attached mail follows:
On Tue, February 19, 2008 7:13 am, Michal Maras wrote:
> Coud somebody tell me if it is possible to get integer value of
> variable
> which name in C is errno end in perl $!.
> I am PHP beginner so I am sorry if question is 'stupid'.
If you use exec() you can get that as a returned value for the third arg.
If you just mean out of the existing environment, almost for sure it's
there in something kinda obvious like $errno or somesuch...
vardump($_ENV) will probably show it.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
attached mail follows:
PHP catches all thsoe and prints nifty error message.
I presume the error number is in the guts somewhere, and could be
exposed easily enough if you worked at it...
But I don't think there is any kind of variable today with it in there.
php_errmsg used to have the error message in it, but that depends on
php.ini setting, and seems to be passe these days...
On Tue, February 19, 2008 7:36 am, Michal Maras wrote:
> I am now using filesystem functions fopen, fread, fclose, ...
>
> On 19/02/2008, Stut <stuttle
gmail.com> wrote:
>>
>> Michal Maras wrote:
>> > Coud somebody tell me if it is possible to get integer value of
>> variable
>> > which name in C is errno end in perl $!.
>> > I am PHP beginner so I am sorry if question is 'stupid'.
>>
>> What function are you calling where you expect to get a system
>> error?
>> Check the manual page for that function - it will tell you how to
>> detect
>> errors.
>>
>> -Stut
>>
>> --
>> http://stut.net/
>>
>
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
attached mail follows:
On Feb 18, 2008 11:24 PM, Shawn McKenzie <nospam
mckenzies.net> wrote:
> nihilism machine wrote:
> > I have a user saving a VARCHAR(255) field in a mysql db which has single
> > quotes in the text, how can i replace them so that they dont fuck up my
> > mysql command?
> >
> > -e
>
>
> Have you tried: dont_fuck_up_my_mysql_command()
That has thrown E_DEPRECATED since PHP 4.1. RTFM, n00b. ;-D
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Filter the data
$data = str_replace("'", "", $data);
I am sure there are many ways to filter the data before insert.
(If you are SURE you have "A.D.D." then it wont matter what I say to you.)
Rick B.
On Feb 18, 2008 11:24 PM, Shawn McKenzie <nospam
mckenzies.net> wrote:
> nihilism machine wrote:
> > I have a user saving a VARCHAR(255) field in a mysql db which has single
> > quotes in the text, how can i replace them so that they dont fuck up my
> > mysql command?
> >
> > -e
>
>
> Have you tried: dont_fuck_up_my_mysql_command()
That has thrown E_DEPRECATED since PHP 4.1. RTFM, n00b. ;-D
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
On Mon, February 18, 2008 10:05 pm, nihilism machine wrote:
> I have a user saving a VARCHAR(255) field in a mysql db which has
> single quotes in the text, how can i replace them so that they dont
> fuck up my mysql command?
http://php.net/mysql_real_escape_string
Google for "SQL injection" for (way) more info.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
attached mail follows:
On Mon, February 18, 2008 10:19 pm, Bastien Koert wrote:
> mysql_real_escape_string()
Yes.
> addslashes()
No, not right for different charsets. See above.
> htmlentities()
Completely and wildly inappropriate.
Might as well use a cannon to slice a tomato.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
attached mail follows:
Nathan Rixham wrote:
> Robert Cummings wrote:
>> On Mon, 2008-02-18 at 21:09 -0600, Larry Garfield wrote:
>>> On Monday 18 February 2008, Nick Stinemates wrote:
>>>
>>>>>> I have found, however, that if I ever need to return /multiple/
>>>>>> values,
>>>>>> it's usually because of bad design and/or the lack of proper
>>>>>> encapsulation.
>>>>> You mean you've never had a function like getCoordinates()? Or
>>>>> getUsers(), or any other of a zillion perfectly valid and reasonable
>>>>> functions that return multiple values as an array? Wow, how odd!
>>>>>
>>>>> Cheers,
>>>>> Rob.
>>>> getCoordinates() would return a Point object
>>>> getUsers() would return a Group object...
>>>>
>>>> Not rocket science ;)
>>> I wouldn't consider an array of user objects to be "multiple
>>> things". I consider it a single aggregate thing, and return arrays
>>> all the time. That's conceptually different from wanting two
>>> separate return values from a function, which is indeed conceptually
>>> icky.
>>
>> Yes, an aggregate is comprised of multiple things usually. Hence when
>> decomposing the concept you are indeed returning multiple values-- both
>> points of view are valid. If you receive a parcel of 100 pens. I can
>> say, "has the parcel arrived yet" (one entity) or "have the pens arrived
>> yet" (multiple entities).
>>
>> At any rate, the O.P. wanted to return multiple values called $x and $y.
>> It seems quite reasonable to assume he was returning something akin to
>> coordinates but didn't know how to do so by binding them in an
>> aggregating structure such as an array, or if you wish, an object.
>>
>> Cheers,
>> Rob.
>
> seriously, whats wrong with returning an array? half the standard php
> functions return array's, therefore at least half of php has been
> designed badly..?
>
> ps: when working with co-ordinates / GIS data you should really be
> using wkb data instead, it's much faster. [unpack]
>
What's wrong with it? Hmm..
Half of PHP functions DO return arrays, I'll grant you that. The reason?
It's untyped. If PHP were a typed language, and it still returned arrays
for a lot, I definitely think it would be designed poorly.
At any rate, returning an array from your Objects increases the burden
and shifts it to the client of your API. For instance, if we take an
example mentioned above *getUsers()* which returned an arbitrary number
of User objects you could potentially use it like this.
userupdater.php
<?php
$x = Users::getUsers($somefilter)
foreach ($x as $user) {
$user->update();
}
?>
Keep in mind. You'll have to rewrite that functionality in multiple
areas. As opposed to:
<?php
$x = Users::getGroup($somegroup); // returns a group of users
$x->update(); // can be reused wherever instead of having to loop
through every user on the client side.
?>
I hope you can see past my (basic) example to understand where I am
headed with this.
--
==================
Nick Stinemates (nick
stinemates.org)
http://nick.stinemates.org
AIM: Nick Stinemates
MSN: nickstinemates
hotmail.com
Yahoo: nickstinemates
yahoo.com
==================
attached mail follows:
On 2/18/08, Nick Stinemates <nick
stinemates.org> wrote:
> I have found, however, that if I ever need to return /multiple/ values,
> it's usually because of bad design and/or the lack of proper encapsulation.
Yeah, that's probably why most popular scripting languages support it.
In Ruby:
def foo
1, 2
end
a, b = foo
In Python:
def foo
return 1, 2
a, b = foo
In Perl:
sub foo
{
return (1, 2);
}
(my $a, my $b) = foo;
--
Greg Donald
http://destiney.com/
attached mail follows:
On 2/18/08, Robert Cummings <robert
interjinn.com> wrote:
> I'd just return arrays unless I had a specific need for incurring object
> overhead for such simple datatypes.
w0rd.
--
Greg Donald
http://destiney.com/
attached mail follows:
At 4:57 PM -0600 2/19/08, Greg Donald wrote:
>On 2/18/08, Nick Stinemates <nick
stinemates.org> wrote:
>> I have found, however, that if I ever need to return /multiple/ values,
>> it's usually because of bad design and/or the lack of proper encapsulation.
>
>Yeah, that's probably why most popular scripting languages support it.
>
>In Ruby:
>
>def foo
> 1, 2
>end
>
>a, b = foo
>
>
>In Python:
>
>def foo
> return 1, 2
>
>a, b = foo
>
>
>In Perl:
>
>sub foo
>{
> return (1, 2);
>}
>
>(my $a, my $b) = foo;
For completeness sake, this is pretty much the same in PHP:
function test() {
return array(1,2);
}
list($a,$b) = test();
works as above. Works fine with complex arrays as well:
function test() {
return array(1,array('a','b'));
}
list($a,$b) = test();
steve
--
+--------------- my people are the people of the dessert, ---------------+
| Steve Edberg http://pgfsun.ucdavis.edu/ |
| UC Davis Genome Center sbedberg
ucdavis.edu |
| Bioinformatics programming/database/sysadmin (530)754-9127 |
+---------------- said t e lawrence, picking up his fork ----------------+
attached mail follows:
On Feb 19, 2008 5:23 PM, Steve Edberg <sbedberg
ucdavis.edu> wrote:
> For completeness sake, this is pretty much the same in PHP:
>
> function test() {
> return array(1,2);
> }
>
> list($a,$b) = test();
Yup, just a few more keystrokes is all.
--
Greg Donald
http://destiney.com/
attached mail follows:
Greg Donald wrote:
> On 2/18/08, Nick Stinemates <nick
stinemates.org> wrote:
>
>> I have found, however, that if I ever need to return /multiple/ values,
>> it's usually because of bad design and/or the lack of proper encapsulation.
>>
>
> Yeah, that's probably why most popular scripting languages support it.
>
> In Ruby:
>
> def foo
> 1, 2
> end
>
> a, b = foo
>
>
> In Python:
>
> def foo
> return 1, 2
>
> a, b = foo
>
>
> In Perl:
>
> sub foo
> {
> return (1, 2);
> }
>
> (my $a, my $b) = foo;
>
>
>
> --
> Greg Donald
> http://destiney.com/
>
>
Support != good design habits. Please read my other post which explains
the reasoning.
--
==================
Nick Stinemates (nick
stinemates.org)
http://nick.stinemates.org
AIM: Nick Stinemates
MSN: nickstinemates
hotmail.com
Yahoo: nickstinemates
yahoo.com
==================
attached mail follows:
On Feb 19, 2008 9:10 AM, Matty Sarro <msarro
gmail.com> wrote:
> Greetings everyone! I am currently working on a web application (aren't we
> all?). The main page which users will look at is simply a login prompt, and
> upon logging in a new browser window will be launched. I would like that
> window to have no browser bars, etc so all of the space taken up by the
> window is dedicated to the app.
JavaScript. Google: window.open().
> I know this can be done in ASP (my company's software does it)
> but I am curious if its possible or not with PHP?
Anything ASP can do, PHP can do better. ;-)
.... just not that. No server-side language (PHP, Perl, Java,
ASP, any CGIs, Python, et cetera) can control client-side parameters.
At least not as of now, and I don't really see a need forcing that to
change.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
With target and JS, yes.
It's not PHP.
It's not even ASP.
It's just HTML and JavaScript.
On Tue, February 19, 2008 8:10 am, Matty Sarro wrote:
> Greetings everyone! I am currently working on a web application
> (aren't we
> all?). The main page which users will look at is simply a login
> prompt, and
> upon logging in a new browser window will be launched. I would like
> that
> window to have no browser bars, etc so all of the space taken up by
> the
> window is dedicated to the app. I know this can be done in ASP (my
> company's
> software does it) but I am curious if its possible or not with PHP? If
> not,
> maybe javascript? Any advice at all would be wonderful, thanks!
> -Matthew
>
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
attached mail follows:
Not quite sure if this is the right list, but here I am...
I'm trying to use zend platform and it requires the Thread Safety option set
to off.
I just compiled php and I can't find what argument to build php that way,
what am I missing?
PHP 4.4.8
Thanks!
Atenciosamente,
<http://www.softpartech.com.br/> www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
thiago.pojda
softpartech.com.br
Excelência em Softwares Financeiros
attached mail follows:
On Feb 19, 2008 12:00 PM, Thiago Pojda <thiago.pojda
softpartech.com.br> wrote:
> Not quite sure if this is the right list, but here I am...
>
> I'm trying to use zend platform and it requires the Thread Safety option set
> to off.
>
> I just compiled php and I can't find what argument to build php that way,
> what am I missing?
To modify thread safety options, unfortunately it requires a full
reconfiguration and recompilation of the binaries. There's no INI
setting, it's compiled right into the core.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
I was expecting that. I just compiled it to enable oci8 module and the
source is ready for modifications. :)
Isn't there any argument you pass to ./configure to disable Thread Safety? I
didn't find any and neither google or php-install list answer anything.
Thanks.
-----Mensagem original-----
De: Daniel Brown [mailto:parasane
gmail.com]
Enviada em: terça-feira, 19 de fevereiro de 2008 15:16
Para: Thiago Pojda
Cc: php-general
lists.php.net
Assunto: Re: [PHP] Thread Safety
On Feb 19, 2008 12:00 PM, Thiago Pojda <thiago.pojda
softpartech.com.br>
wrote:
> Not quite sure if this is the right list, but here I am...
>
> I'm trying to use zend platform and it requires the Thread Safety
> option set to off.
>
> I just compiled php and I can't find what argument to build php that
> way, what am I missing?
To modify thread safety options, unfortunately it requires a full
reconfiguration and recompilation of the binaries. There's no INI setting,
it's compiled right into the core.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
On Feb 19, 2008 1:21 PM, Thiago Pojda <thiago.pojda
softpartech.com.br> wrote:
> I was expecting that. I just compiled it to enable oci8 module and the
> source is ready for modifications. :)
>
> Isn't there any argument you pass to ./configure to disable Thread Safety? I
> didn't find any and neither google or php-install list answer anything.
Don't quote me on this, and I'll defer to someone that may know
better than I in this case, but I believe that you can pass
'--enable-thread-safety' to ./configure to enable it (default), so I'd
imagine '--disable-thread-safety' would be the flag to send.
You may want to try subscribing to the php-install list (go to
http://php.net/mailing-lists.php). I'm CC'ing your email to that list
in hopes that someone there can better help you.
====
ORIGINAL MESSAGE
====
Not quite sure if this is the right list, but here I am...
I'm trying to use zend platform and it requires the Thread Safety option set
to off.
I just compiled php and I can't find what argument to build php that way,
what am I missing?
PHP 4.4.8
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Hi,
Wednesday, February 20, 2008, 3:00:28 AM, you wrote:
TP> Not quite sure if this is the right list, but here I am...
TP>
TP> I'm trying to use zend platform and it requires the Thread Safety option set
TP> to off.
TP>
TP> I just compiled php and I can't find what argument to build php that way,
TP> what am I missing?
TP>
TP> PHP 4.4.8
TP>
TP>
TP> Thanks!
--disable-zts should do it
--
regards,
Tom
attached mail follows:
I want to thank all who helped me on this issue.
My Problem was when I tried to return a parameter to the C++ script.
CREATE PROCEDURE `tracinsert`(CaldNumber varchar(12), CaldTime varchar(50), CallerID varchar(12))
BEGIN
INSERT INTO IncCalls (CaldNumber, CaldTime, CallerID)
VALUES
(CaldNumber, CaldTime, CallerID);
SELECT Introp FROM CaNumbers WHERE PNumber = CaldNumber;
END
I just did not get the fact that the Select feature returned the parameter data automactically without being declared. The script above works, my only wish was that more people wrote more articles about the proper structure.
Yes I understand this has NOTHING to do with php but it will one day.
Rick B.
attached mail follows:
> my only wish was that more people wrote more articles about the proper structure.
You mean like the example on the mysql website?
http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html
--
Postgresql & php tutorials
http://www.designmagick.com/
attached mail follows:
On Feb 19, 2008, at 712AM, tedd wrote:
> Hi gang:
>
> I have a date picker in javascript working, but I need to take the
> date selections to php.
>
> Here's the link and code:
>
> http://www.webbytedd.com/a/calendar/index.php
>
> How can I get what is selected in javascript to POST?
Have you tried placing the form before the Calendar.setup() calls?
Seems like I had to do that when I used that javascript calendar widget.
Brady
attached mail follows:
At 10:18 AM -0800 2/19/08, Brady Mitchell wrote:
>On Feb 19, 2008, at 712AM, tedd wrote:
>
>>Hi gang:
>>
>>I have a date picker in javascript working, but I need to take the
>>date selections to php.
>>
>>Here's the link and code:
>>
>>http://www.webbytedd.com/a/calendar/index.php
>>
>>How can I get what is selected in javascript to POST?
>
>Have you tried placing the form before the Calendar.setup() calls?
>Seems like I had to do that when I used that javascript calendar
>widget.
>
>Brady
Brady:
Bingo!!!
We have a winner. It now works. Strange stuff.
Many thanks.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Tue, February 19, 2008 5:58 pm, Mário Gamito wrote:
> >> Is it possible to call from within MySQL an external PHP script ?
> >> I've read "MySQL Stored Procedure Programming" from O'Reilly but
> >> found nothing :(
> > I'd really like to see an example of why you need this
> functionality,
> > if that'd be okay. Not to judge, just to learn :)
>
> I'm inserting values in a Linux/MySQL table from an ASP.NET/C# page.
> I need to insert the password field with the correct hash (vpopmail).
>
> So, after the first insert leaving the password field blank, I need to
> invoke a PHP script that calculates the hash and then insert it.
Finding a correct implementation of the hash in ASP.NET/C# will
probably be MUCH easier and more maintainable.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
attached mail follows:
Hello,
First of all I would like to know if one day we will be able to unset
$this into a class in order to destroy the object. It could really be
useful to prevent big memory usage.
As it can't be done I tried to unset an object by unsetting a reference
of this object but it has no effect on the object but only on the
reference.
Should unset destroy the reference itself and the object ???
if you don't think so can you think of something different to destroy
both of them like I don't know, destroy($obejctsreference)
Regards.
Reproduce code:
---------------
<?
$x = new stdClass();
$x->a = 'ayayaye';
$b[0] =& $x;
unset($b[0]);
var_dump($x);
?>
Expected result:
----------------
NULL
Actual result:
--------------
object(stdClass)#1 (1) {
["a"]=>
string(7) "ayayaye"
}
attached mail follows:
Sylvain Rabot wrote:
> Hello,
>
> First of all I would like to know if one day we will be able to unset
> $this into a class in order to destroy the object. It could really be
> useful to prevent big memory usage.
>
> As it can't be done I tried to unset an object by unsetting a reference
> of this object but it has no effect on the object but only on the
> reference.
>
> Should unset destroy the reference itself and the object ???
>
> if you don't think so can you think of something different to destroy
> both of them like I don't know, destroy($obejctsreference)
>
> Regards.
>
> Reproduce code:
> ---------------
> <?
>
> $x = new stdClass();
> $x->a = 'ayayaye';
>
> $b[0] =& $x;
>
> unset($b[0]);
>
> var_dump($x);
>
> ?>
>
> Expected result:
> ----------------
> NULL
>
> Actual result:
> --------------
> object(stdClass)#1 (1) {
> ["a"]=>
> string(7) "ayayaye"
> }
So if you unset a reference you are dereferencing it. If you want to
unset both, then unset the object, in this case $x.
-Shawn
attached mail follows:
Shawn McKenzie wrote:
> Sylvain Rabot wrote:
>> Hello,
>>
>> First of all I would like to know if one day we will be able to unset
>> $this into a class in order to destroy the object. It could really be
>> useful to prevent big memory usage.
>>
>> As it can't be done I tried to unset an object by unsetting a reference
>> of this object but it has no effect on the object but only on the
>> reference.
>>
>> Should unset destroy the reference itself and the object ???
>>
>> if you don't think so can you think of something different to destroy
>> both of them like I don't know, destroy($obejctsreference)
>>
>> Regards.
>>
>> Reproduce code:
>> ---------------
>> <?
>>
>> $x = new stdClass();
>> $x->a = 'ayayaye';
>>
>> $b[0] =& $x;
>>
>> unset($b[0]);
>>
>> var_dump($x);
>>
>> ?>
>>
>> Expected result:
>> ----------------
>> NULL
>>
>> Actual result:
>> --------------
>> object(stdClass)#1 (1) {
>> ["a"]=>
>> string(7) "ayayaye"
>> }
>
> So if you unset a reference you are dereferencing it. If you want to
> unset both, then unset the object, in this case $x.
>
> -Shawn
Actually dereference was obviously the wrong word. You are actually
just destroying the reference.
attached mail follows:
Shawn McKenzie wrote:
> Sylvain Rabot wrote:
>> Hello,
>>
>> First of all I would like to know if one day we will be able to unset
>> $this into a class in order to destroy the object. It could really be
>> useful to prevent big memory usage.
>>
>> As it can't be done I tried to unset an object by unsetting a reference
>> of this object but it has no effect on the object but only on the
>> reference.
>>
>> Should unset destroy the reference itself and the object ???
>>
>> if you don't think so can you think of something different to destroy
>> both of them like I don't know, destroy($obejctsreference)
>>
>> Regards.
>>
>> Reproduce code:
>> ---------------
>> <?
>>
>> $x = new stdClass();
>> $x->a = 'ayayaye';
>>
>> $b[0] =& $x;
>>
>> unset($b[0]);
>>
>> var_dump($x);
>>
>> ?>
>>
>> Expected result:
>> ----------------
>> NULL
>>
>> Actual result:
>> --------------
>> object(stdClass)#1 (1) {
>> ["a"]=>
>> string(7) "ayayaye"
>> }
>
> So if you unset a reference you are dereferencing it. If you want to
> unset both, then unset the object, in this case $x.
>
> -Shawn
Ignore everything that I have said or may say, I'm completely wrong :-(
attached mail follows:
---- Shawn McKenzie <nospam
mckenzies.net> wrote:
> Shawn McKenzie wrote:
> > Sylvain Rabot wrote:
> >> Hello,
> >>
> >> First of all I would like to know if one day we will be able to unset
> >> $this into a class in order to destroy the object. It could really be
> >> useful to prevent big memory usage.
> >>
> >> As it can't be done I tried to unset an object by unsetting a reference
> >> of this object but it has no effect on the object but only on the
> >> reference.
> >>
> >> Should unset destroy the reference itself and the object ???
> >>
> >> if you don't think so can you think of something different to destroy
> >> both of them like I don't know, destroy($obejctsreference)
> >>
> >> Regards.
> >>
> >> Reproduce code:
> >> ---------------
> >> <?
> >>
> >> $x = new stdClass();
> >> $x->a = 'ayayaye';
> >>
> >> $b[0] =& $x;
> >>
> >> unset($b[0]);
> >>
> >> var_dump($x);
> >>
> >> ?>
> >>
> >> Expected result:
> >> ----------------
> >> NULL
> >>
> >> Actual result:
> >> --------------
> >> object(stdClass)#1 (1) {
> >> ["a"]=>
> >> string(7) "ayayaye"
> >> }
> >
> > So if you unset a reference you are dereferencing it. If you want to
> > unset both, then unset the object, in this case $x.
> >
> > -Shawn
>
> Ignore everything that I have said or may say, I'm completely wrong :-(
>
Sure Shawn, you're just trying to increase your rankings for this week... ;)
Personally, objects are a b!tch to use, but I'm gradually working myself to the point of having to learn and play nice with them.
Wolf
attached mail follows:
Sylvain Rabot wrote:
> Hello,
>
> First of all I would like to know if one day we will be able to unset
> $this into a class in order to destroy the object. It could really be
> useful to prevent big memory usage.
I doubt the php-dev's will ever allow something like that, seems rather
dangerous to me.
> As it can't be done I tried to unset an object by unsetting a reference
> of this object but it has no effect on the object but only on the
> reference.
>
> Should unset destroy the reference itself and the object ???
No, it's not meant to (and I doubt it will change). Why do you want it
to do that?
What is the original problem you're trying to solve?
--
Postgresql & php tutorials
http://www.designmagick.com/
attached mail follows:
Chris wrote:
> Sylvain Rabot wrote:
>> Hello,
>>
>> First of all I would like to know if one day we will be able to unset
>> $this into a class in order to destroy the object. It could really be
>> useful to prevent big memory usage.
>
> I doubt the php-dev's will ever allow something like that, seems rather
> dangerous to me.
>
>> As it can't be done I tried to unset an object by unsetting a reference
>> of this object but it has no effect on the object but only on the
>> reference.
>>
>> Should unset destroy the reference itself and the object ???
>
> No, it's not meant to (and I doubt it will change). Why do you want it
> to do that?
>
> What is the original problem you're trying to solve?
>
Hence my previous gibberish, I would expect a reference to be destroyed
when the object is, but obviously it's not.
-Shawn
attached mail follows:
Chris wrote:
> Sylvain Rabot wrote:
>> Hello,
>>
>> First of all I would like to know if one day we will be able to unset
>> $this into a class in order to destroy the object. It could really be
>> useful to prevent big memory usage.
>
> I doubt the php-dev's will ever allow something like that, seems rather
> dangerous to me.
>
>> As it can't be done I tried to unset an object by unsetting a reference
>> of this object but it has no effect on the object but only on the
>> reference.
>>
>> Should unset destroy the reference itself and the object ???
>
> No, it's not meant to (and I doubt it will change). Why do you want it
> to do that?
>
> What is the original problem you're trying to solve?
>
Hence my previous gibberish, I would expect a reference to be destroyed
when the object is, but obviously it's not.
-Shawn
attached mail follows:
> Hence my previous gibberish, I would expect a reference to be destroyed
> when the object is, but obviously it's not.
It has nothing specifically to do with objects, it's all about how
references are handled.
$ php -a
Interactive mode enabled
<?php
$a = '12345';
$b = &$a;
unset($a);
var_dump($b);
string(5) "12345"
Sara Goleman will explain it much better than I can:
http://blog.libssh2.org/index.php?/archives/51-Youre-being-lied-to..html
ie - it's by design and will (probably) not change.
--
Postgresql & php tutorials
http://www.designmagick.com/
attached mail follows:
-----Mensagem original-----
<quote.
De: Daniel Brown [mailto:parasane
gmail.com]
Assunto: [PHP-INSTALL] Re: [PHP] Thread Safety
On Feb 19, 2008 1:21 PM, Thiago Pojda <thiago.pojda
softpartech.com.br>
wrote:
> I was expecting that. I just compiled it to enable oci8 module and the
> source is ready for modifications. :)
>
> Isn't there any argument you pass to ./configure to disable Thread
> Safety? I didn't find any and neither google or php-install list answer
anything.
Don't quote me on this, and I'll defer to someone that may know better
than I in this case, but I believe that you can pass
'--enable-thread-safety' to ./configure to enable it (default), so I'd
imagine '--disable-thread-safety' would be the flag to send.
You may want to try subscribing to the php-install list (go to
http://php.net/mailing-lists.php). I'm CC'ing your email to that list in
hopes that someone there can better help you.
</quote>
./configure --disable-thread-safety did not do the trick, neither did
--with-tsrm-pthreads=no.
I've tried php-install mailing list and no1 answered.
Going trougth configure script, there are some places with thread_safe
arguments, but messing around didn't help me much.
Perhaps something to do with apxs2?
This is the default configure I need to run, where I'm trying to add no TS
commands:
./configure --with-oci8-instant-client=/oracle/instantclient
--with-apxs2=/usr/bin/apxs2
====
ORIGINAL MESSAGE
====
Not quite sure if this is the right list, but here I am...
I'm trying to use zend platform and it requires the Thread Safety option set
to off.
I just compiled php and I can't find what argument to build php that way,
what am I missing?
PHP 4.4.8
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
>> Perhaps concider moving to fsockopen or stream_socket_client with
>> timeout parameters to solve your issue.
>
> fsockopen has no context
Maybe I'm missing something but it returns a resource just like fopen.
http://php.net/fsockopen
--
Postgresql & php tutorials
http://www.designmagick.com/
attached mail follows:
On Tue, February 19, 2008 5:49 pm, Chris wrote:
>
>>> Perhaps concider moving to fsockopen or stream_socket_client with
>>> timeout parameters to solve your issue.
>>
>> fsockopen has no context
>
> Maybe I'm missing something but it returns a resource just like fopen.
>
> http://php.net/fsockopen
And you can control its timeout for OPENING with an ini_set of that
one timeout setting.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
attached mail follows:
Hi,
Below you'll find my code. I think now that the
problem is in my algorithm, because the is created
anytime the page is refreshed. But i don't know how to
check if the client was logged out or it is a real new
connexion to the page. As you will see one can click
on logout, then press the back button of the browser,
and then refresh the page, but he is still connected.
I would like to help me fixe that. Here is the code:
-----------index.php------------------
//the first page where the user enters his login and
password
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<link rel="stylesheet" type="text/css"
href="../styles/style.css" media="screen" />
<title>Login page</title>
</head>
<body>
<form name = "manage" action = "manage.php"
method="post">
<div style = "padding-top: 40px; padding-bottom:
40px;height = 100%;">
<center><table width = "100%" cellspacing="10">
<tr><td width = "50%" align = "right">Login</td><td
width = "50%" align = "left"><input type="text"
name="login" /></td></tr>
<tr><td width = "50%" align = "right">Password</td><td
width = "50%" align = "left"><input type="password"
name="password" /></td></tr>
</table>
<input type="submit" name="connect" value =
"Connect"/>
<br/><br/><br/>
</center>
</form>
</body>
</html>
------------- manage.php ------------
//where the form posts data and here is where the
session is created
<?php
session_start();
$sessionid = session_id();
$referer =
$HTTP_REFERER;
if (isset($_REQUEST['connect'])){
$passwd = addslashes($_POST['password']);
$login = addslashes($_POST['login']);
require_once "../../../includes/connexion.php";
$sql = mysql_query("SELECT * FROM user WHERE login
='".$login."' and password = '".$passwd."'") or
die("Incorrect username or password.");
$result = mysql_fetch_array($sql);
if (($result[0] != null)) {
$_SESSION['sessioname'] = $_POST['login'];
}
else Header ("Location: ./index.php");
mysql_close();
}
else if(!isset($_SESSION['sessioname'])) {
Header ("Location: ./index.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
</head>
<body>
<?php
if(isset( $_SESSION['sessioname'])) {
echo $_SESSION['sessioname'] ;
echo ", ". session_id();
echo ", <a href = 'logout.php'>Log Out</a>
";
}
else echo "<a href = 'index.php'>Login</a>
";
?>
</body>
</html>
------------ logout.php ------------------
<?php
session_start();
unset($_SESSION["sessioname"]);
$_SESSION = array();
session_destroy();
header("location: index.php");
?>
--- Richard Lynch <ceo
l-i-e.com> wrote:
> On Sat, February 16, 2008 2:31 pm, Adil Drissi
> wrote:
> > I need help with sessions.
> > I have a simple authentification relying only on
> > sessions (i don't use cookies).
>
> Do you mean that you are also using the "no_cookie"
> setting in PHP and
> using the URL to pass around the session ID?
>
> Or jut that you don't use "extra" cookies on top of
> the one PHP uses
> by default?
>
> > After the user submits
> > his username and password, the script checks if
> that
> > corresponds to a record in a mysql table. If this
> is
> > the case "$_SESSION['sessioname'] =
> $_POST['login'];".
> > the $_SESSION['sessioname'] is checked in
> subsequent
> > pages to see if the user is connected or not.
> > The problem is after the user logs out, and after
> that
> > uses the previous button of the browser he becomes
> > connected. How can i prevent this please.
>
> If the URL has the old session ID, and you aren't
> destroying it
> completely somehow, then they'll be logged in once
> they go back to the
> URL with the session ID.
>
> <?php
> session_start();
> unset($_SESSION["sessioname"]);
> session_destroy();
> header("location: index.php");
> ?>
>
> If you want to destroy the session completely, use:
> $_SESSION = array();
> to wipe out ALL the session data.
>
> Also, on *some* browsers, sending the cookies
> session_start (if you
> are using cookies) and the Location: header with an
> INCOMPLETE URL
> means the browser will screw up.
>
> Use the COMPLETE URL in your header("Location")
>
> And use a capital "L" in Location, as well, to be
> totally kosher, I
> think.
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/from/lynch
> Yeah, I get a buck. So?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
attached mail follows:
Hey guys,
I have a form accepting a KML file from users and from there I want to
draw polylines based on a KML file's
<Placemarker><LineString><coordinates> element.
The problem I am having is that sometimes the KML file can have a
<document><folder> or <folder><document> or none of the above, or any
number of random scenarios in the KML file making it hard to parse.
To deal with this randomness I'm using an xpath and I think I have it
right but it just wont work... the code:
$result = $xml->xpath('Placemark/LineString/coordinates');
An the particular XML file I am trying to pull from looks like:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
<name>coehilltotweed.kml</name>
<Style id="lineStyle">
<LineStyle>
<color>64eeee17</color>
<width>6</width>
</LineStyle>
</Style>
<Folder>
<name>23-SEP-06</name>
<Snippet maxLines="2">
</Snippet>
<description><![CDATA[<table>
<tr><td><b>Distance</b> 139.0 mi </td></tr>
<tr><td><b>Min Alt</b> 451.4 ft </td></tr>
<tr><td><b>Max Alt</b> 1168.9 ft </td></tr>
</table>]]></description>
<Placemark>
<name>Path</name>
<styleUrl>#lineStyle</styleUrl>
<LineString>
<tessellate>1</tessellate>
<coordinates>
-77.827985,44.851878,311.109985
-77.82702000000001,44.852114,313.993896
-77.827213,44.85067600000001,313.513306
-77.827792,44.850955,313.513306
-77.830389,44.85333700000001,315.916504
-77.833114,44.858379,317.358643
-77.83193300000001,44.858508,313.993896 </coordinates>
</LineString>
</Placemark>
</Folder>
</Document>
</kml>
Any ideas why this won't work?
Thanks!
attached mail follows:
On Feb 19, 2008 8:13 PM, RJO <rjo
rynet.com> wrote:
> Hey guys,
>
> I have a form accepting a KML file from users and from there I want to
> draw polylines based on a KML file's
> <Placemarker><LineString><coordinates> element.
>
>
> The problem I am having is that sometimes the KML file can have a
> <document><folder> or <folder><document> or none of the above, or any
> number of random scenarios in the KML file making it hard to parse.
>
>
> To deal with this randomness I'm using an xpath and I think I have it
> right but it just wont work... the code:
> $result = $xml->xpath('Placemark/LineString/coordinates');
>
>
> An the particular XML file I am trying to pull from looks like:
> <?xml version="1.0" encoding="UTF-8"?>
> <kml xmlns="http://earth.google.com/kml/2.1">
> <Document>
> <name>coehilltotweed.kml</name>
> <Style id="lineStyle">
> <LineStyle>
> <color>64eeee17</color>
> <width>6</width>
> </LineStyle>
> </Style>
> <Folder>
> <name>23-SEP-06</name>
> <Snippet maxLines="2">
> </Snippet>
> <description><![CDATA[<table>
> <tr><td><b>Distance</b> 139.0 mi </td></tr>
> <tr><td><b>Min Alt</b> 451.4 ft </td></tr>
> <tr><td><b>Max Alt</b> 1168.9 ft </td></tr>
> </table>]]></description>
> <Placemark>
> <name>Path</name>
> <styleUrl>#lineStyle</styleUrl>
> <LineString>
> <tessellate>1</tessellate>
> <coordinates>
> -77.827985,44.851878,311.109985
> -77.82702000000001,44.852114,313.993896
> -77.827213,44.85067600000001,313.513306
> -77.827792,44.850955,313.513306
> -77.830389,44.85333700000001,315.916504
> -77.833114,44.858379,317.358643
> -77.83193300000001,44.858508,313.993896 </coordinates>
> </LineString>
> </Placemark>
> </Folder>
> </Document>
> </kml>
>
> Any ideas why this won't work?
>
> Thanks!
>
>
It's the namespace. I'm not positive (I can't test on this computer)
but try this:
$result = $xml->xpath("*[local-name()='Placemark' and
namespace-uri()='http://earth.google.com/kml/2.1']/*[local-name()='LineString'
and namespace-uri()='http://earth.google.com/kml/2.1']/*[local-name()='coordinates'
and namespace-uri()='http://earth.google.com/kml/2.1']");
That may be a little off, but that's the idea, anyway.
Andrew
attached mail follows:
On Mon, February 18, 2008 2:25 pm, nihilism machine wrote:
> if i declare an instance of a class in the top of my php file, then
> have html, then later on user $myClassInstance->myMethod(); --
> myMethod() does not execute, only when i have the instantiation of the
> class right before the call to the method does it work. any ideas?
Your HTML must have some PHP code in there that is wiping out the
instance somehow...
There's no specific "rule" that you can't call a method after
outputting some HTML, though it's usually a bad separation of logic
and presentation.
Unless, of course, the method call IS a presentation...
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
attached mail follows:
Hello everyone. I'm not sure what the budget is but, obviously inexpensive
would be nice. Someone turned me on to PHPfox. Yet I don't have any others
to compare it to. If you all would be so kind as to put a shout out and vote
on your favorite, I'd be very grateful.
Extendability would also be nice along with customization in terms of
design.
Much Appreciation,
T
attached mail follows:
On Feb 19, 2008 8:41 PM, TS <sunnrunner
gmail.com> wrote:
> Hello everyone. I'm not sure what the budget is but, obviously inexpensive
> would be nice. Someone turned me on to PHPfox. Yet I don't have any others
> to compare it to. If you all would be so kind as to put a shout out and vote
> on your favorite, I'd be very grateful.
What about security? Do you care if it has a large number of publicly
disclosed exploits in it's past? That'd be the first thing to come to
(my) mind if I were about to put code someone else wrote on my web
server.
For example:
http://search.securityfocus.com/swsearch?sbm=%2F&metaname=alldoc&query=phpfox&x=0&y=0
Two exploits doesn't seem bad, but in what time span were they?
Something to think about.
--
Greg Donald
http://destiney.com/
attached mail follows:
Well security is an issue always IMHO. However, there's no full proof
security. I'm hoping for the groups expertise while voting on this to
consider all of these things of course. In other words, picking the lesser
evil is where I'm stand with your previous question.
Thankyou for your comment.
-----Original Message-----
From: Greg Donald [mailto:gdonald
gmail.com]
Sent: Tuesday, February 19, 2008 9:51 PM
To: php-general
lists.php.net
Subject: Re: [PHP] What community software package gets your vote? PHPfox
etc...
On Feb 19, 2008 8:41 PM, TS <sunnrunner
gmail.com> wrote:
> Hello everyone. I'm not sure what the budget is but, obviously inexpensive
> would be nice. Someone turned me on to PHPfox. Yet I don't have any others
> to compare it to. If you all would be so kind as to put a shout out and
vote
> on your favorite, I'd be very grateful.
What about security? Do you care if it has a large number of publicly
disclosed exploits in it's past? That'd be the first thing to come to
(my) mind if I were about to put code someone else wrote on my web
server.
For example:
http://search.securityfocus.com/swsearch?sbm=%2F&metaname=alldoc&query=phpfo
x&x=0&y=0
Two exploits doesn't seem bad, but in what time span were they?
Something to think about.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
On Mon, February 18, 2008 1:04 pm, Shawn McKenzie wrote:
> julian wrote:
>>
>>
>> Hi,
>>
>> I have an application that along filling in some forms, it produces
>> a
>> pdf file, as confirmation of all entered data.
>>
>> I want to send this pdf file to a different window/tab of the
>> browser,
>> so it is displayed and can latter be printed.
>>
>> In the mean time, the original window contains a confirmation
>> message,
>> to continue with the work flow.
>>
>> I would like to do this without use of JavaScript....
>>
>> Any combination of headers ??
>>
>> Any hints appreciated.
>>
>> JCG
>
> AFAIK you must use javascript. The two scenarios I see are:
>
> 1. Your form uses target=_blank" to open the PDF and there is some
> onsubmit javascript that updates your form.
> 2. Your form updates itself when submitted and there is some onsubmit
> javascript to open the PDF in a new window.
Actually, I think a PDF can have an "action" at the launch that opens
up a web page...
I vaguely remember this...
But maybe I'm just imagining it...
Or it could be that I'm thinking of an FDF which *has* to open up a
PDF URL to function.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
attached mail follows:
You can dig out what 127 means from perror, or you can just go with
the "usual" suspects of paths and permissions.
PHP does not run as "you" from the command line and does not use
"your" shell and does not have "your" environment.
Use FULL PATH everywhere. E.g.:
exec("/usr/bin/zip /home/www/bastos.com/example/files/", $output,
$error);
Also make sure the PHP User has read/write access to whatever it needs
to do the job. And be VERY CAREFUL about who else then has access
because of this!!!
For ultimate geekiness, you can install a custom PHP extension I wrote
to print out the error message matching 127:
http://l-i-e.com/perror
:-)
On Mon, February 18, 2008 12:57 pm, Petrus Bastos wrote:
> Hey folks,
>
> I got access to exec method for test! But, it's not working... :(
> the
> function returns 127 and don't create the zip file, I've tested on
> Linux
> command tool and works! Do you have any idea why didn't work?
>
> Thanks again and sorry for the inconvenience,
> Petrus Bastos.
>
> On Feb 18, 2008 2:37 PM, Nick Stinemates <nick
stinemates.org> wrote:
>
>> Petrus Bastos wrote:
>> > Richard,
>> >
>> > Unfortunately, I can't get out of the zip password rut
>> because the
>> > destination system read only this file format. I can't change the
>> > destination system.
>> >
>> > Thanks,
>> > Petrus.
>> >
>> > On Feb 18, 2008 2:11 PM, Richard Lynch <ceo
l-i-e.com> wrote:
>> >
>> >
>> >> On Mon, February 18, 2008 5:59 am, Petrus Bastos wrote:
>> >>
>> >>> Thanks again for your worry. So, let's go, here goes my
>> situation.
>> >>> I'm
>> >>> exporting data to another system. That system have an option to
>> be
>> >>> feed by a
>> >>> password protected zip file. The export activity will be occur
>> in this
>> >>> way:
>> >>> the user will generate the file on my application and will put
>> this
>> >>> file
>> >>> into that another system. So, I need generate that file. Maybe
>> one
>> >>> solution
>> >>> is to generate the file unzipped and determine that user should
>> zip
>> >>> the file
>> >>> with password on his Windows or Linux operating system. But, I
>> can't
>> >>> let
>> >>> that responsibility on user hands. So, because that I need to
>> generate
>> >>> the
>> >>> file already protected.
>> >>>
>> >> Perhaps you could use SCP (or SSH tunneling) to transfer the file
>> from
>> >> system to system, so that it need not ever be visible to the
>> outside
>> >> world, and thus not need the rather lame zip password.
>> >>
>> >> Another option would be to take the whole file and 2-way encrypt
>> it
>> >> with a public/private key pair, and install the private key on
>> the
>> >> receiving server.
>> >>
>> >> In other words, get out of the zip password rut, and protect the
>> file
>> >> some other way.
>> >>
>> >> --
>> >> Some people have a "gift" link here.
>> >> Know what I want?
>> >> I want you to buy a CD from some indie artist.
>> >> http://cdbaby.com/from/lynch
>> >> Yeah, I get a buck. So?
>> >>
>> >>
>> >>
>> >
>> >
>> Sounds like a creative challenge... this is what makes programmers
>> problem solvers. You can write the code, you have the knowledge..
>> and
>> then you get requirements like this one. How annoying!
>>
>> I found out some interesting information researching your issue. It
>> seems that encryption by password is actually not built in to ZIP
>> itself, but was an implementation detail apps like WinZip added to
>> the
>> mix. Because of that, the original ZIP libs don't have any notions
>> of
>> password protection.
>>
>> It seems like this isn't a language specific issue, either.
>>
>> I think it's time to get creative, Petros. You're in a bind, and I
>> assume you need to get this done, so you have the following options
>> (in
>> the order I would do it in..)
>> -> Turn on exec()
>> -> You can use/modify an app I wrote (in python) which accepts UDP
>> packets and executed commands based off of it. You can strip out the
>> really insecure things and just accept 'zip' commands. The lib/app
>> is
>> really small and lightweight. There are no dependencies outside of I
>> think 3 python modules. If I couldn't turn on exec(), this is the
>> route
>> I would go.
>> -> Use some form of file/directory montoring + zip.
>> -> Pass the request on to an environment that has zip()
>>
>> --
>> ==================
>> Nick Stinemates (nick
stinemates.org)
>> http://nick.stinemates.org
>>
>> AIM: Nick Stinemates
>> MSN: nickstinemates
hotmail.com
>> Yahoo: nickstinemates
yahoo.com
>> ==================
>>
>>
>>
>
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
attached mail follows:
On Mon, February 18, 2008 4:16 pm, Shawn McKenzie wrote:
> In your php code you'll need the full path to biblioteca.php and to
> t.zip and the web user will need write permissions to the dir where
> you
> create t.zip.
nitpik:
The user needs write permission to just t.zip
Unless zip does something funky with temp files within the directory
containing t.zip or something weird-o like that?
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
attached mail follows:
Use exec() and get any output that may be happening.
I also suspect that the PATH you are using isn't a TRUE path, but some
hacked up thing from your webhost.
Look at the output of <?php phpinfo();?> in biblioteca and see what
PHP thinks is the current working directory.
I had one webhost where some kind of chroot jail thingie made the
paths look completely different in FTP, shell and PHP...
On Mon, February 18, 2008 4:32 pm, Petrus Bastos wrote:
> I've tried without success...
>
> system("/usr/local/bin/zip -P 1111
> /.automount/ipojuca/export/homeg03/golapa/public_html/mapdenguepe128/site/php/biblioteca/t.zip
> /.automount/ipojuca/export/homeg03/golapa/public_html/mapdenguepe128/site/php/biblioteca/biblioteca.php",$ret_val);
>
>
> On Feb 18, 2008 7:16 PM, Shawn McKenzie <nospam
mckenzies.net> wrote:
>
>> In your php code you'll need the full path to biblioteca.php and to
>> t.zip and the web user will need write permissions to the dir where
>> you
>> create t.zip.
>>
>> -Shawn
>>
>> Petrus Bastos wrote:
>> > Wolf,
>> >
>> > I'm sure actually working from the command line.
>> >
>> > > /usr/local/bin/zip -P 1111 t.zip biblioteca.php
>> > adding: biblioteca.php (deflated 73%)
>> > >
>> >
>> >
>> > On Feb 18, 2008 6:37 PM, Wolf <lonewolf
nc.rr.com
>> > <mailto:lonewolf
nc.rr.com>> wrote:
>> >
>> >
>> > ---- Petrus Bastos <petrusbastos
gmail.com
>> > <mailto:petrusbastos
gmail.com>> wrote:
>> > > Actually, I don't know anything about FreeBSD. I never
>> used
>> > this system.
>> > > But, here my zip command works fine at command line, why
>> doesn't
>> > works with
>> > > PHP?
>> > >
>> > >
>> > <! -- SNIP -->
>> >
>> > Have you talked with your server admins about the use of zip?
>> > Sounds like you have an environment set up by a blind monkey.
>> >
>> > Are you sure the command is actually working from the command
>> line?
>> > What is the command and output?
>> >
>> > Wolf
>> >
>> >
>>
>
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
attached mail follows:
On Mon, February 18, 2008 12:08 pm, Graham Cossey wrote:
> proceed accordingly... My biggest gripe with tab delimited files is
> that they are quite a bit bigger than comma delimited files so I may
> have to split the large files I receive into smaller 'chunks' to allow
> them to be uploaded.
This is not making sense...
A tab-delimited file wil have a TAB character "\t" instead of comma ","
A tab WITHIN the data then needs escaping as "\t" or somesuch.
But commas to not need escaping with quotes.
And quotes don't need escaping with double-quotes.
So tab-delimited should be a TINY bit smaller or the same size.
Perhaps your users are jus