Re: [PHP] Prefered Method for User authetification on VHosts

2008-10-06 Thread Per Jessen
Michelle Konzack wrote:

> Currently I have
> [snip]


OK, so a plain file-password authentification. That's fine. 

> I like to know, whether this  is  good  enough  or  is  there  a 
> better solution?

Good enough depends entirely on your security requirements, i.e. how
safe do you need the authenticated access to be?  Are you protecting
something that is valuable to others? Etc etc.


/Per Jessen, Zürich


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



Re: [PHP] Best Search Algorithm for Millions of record

2008-10-06 Thread Hemant Patel
It will be a Postgres SQL Database and Fields will be like descriptive as
well as Area of land,of street etc specific...
With Regards,
Hemant Patel

On Mon, Oct 6, 2008 at 8:30 PM, Micah Gersten <[EMAIL PROTECTED]> wrote:

> What type of data is in the fields?  Also, which database engine?
>
> Thank you,
> Micah Gersten
> onShore Networks
> Internal Developer
> http://www.onshore.com
>
>
>
> Hemant Patel wrote:
> > I have couple of tables with 1,60,0 records and now i need to
> > search the records based on some crieteria...so which will help me...?
> >
> >
> > On Mon, Oct 6, 2008 at 12:30 PM, Micah Gersten <[EMAIL PROTECTED]
> > > wrote:
> >
> > The question is, what are you searching for in the records?
> >
> > Thank you,
> > Micah Gersten
> > onShore Networks
> > Internal Developer
> > http://www.onshore.com
> >
> >
> >
> > Hemant Patel wrote:
> > > My question is Whether I should go for Full Text Based search or
> > Database
> > > Search...?And is there algorithm in php which can help me in
> > this case...?
> > >
> > >
> >
> >
>


Re: [PHP] Re: db_* => pg_*/my_*/ifx_* ?

2008-10-06 Thread Larry Garfield
On Wednesday 01 October 2008 10:44:29 am Michelle Konzack wrote:
> Am 2008-09-30 19:58:03, schrieb Ashley Sheridan:
> > Hi Michelle, I'm not sure exactly what it is you're after. Are you
> > looking for software that will allow you to develop applications that
> > are database agnostic?
>
> What is "agnostic"?
>
> If you mean "database independant", the answer is yes.
>
> Most Applications do not need  complex  database  specific  queries  and
> generaly I need only
>
> db_connect($server, $port, $db, $user, $pass)
>   1)  using pconnect if possibel
>   2)  there are already significant differences
>   between pgsql and mysql
> db_error()
>   1)  Works different between pgsql and mysql and ifx
>
> db_close($handle)
>   1)  Works afaik with all databases the same way
>
> db_getarray() -> return array from SELECT
>   1)  Hell of SELECT FROM WHERE...
>
> db_insert($handle, $table, $what, $where)
> db_update($handle, $table, $what, $where)
> db_delete($handle, $table, $what, $where)
>   1)  Sometimes heavy differences for ALL databases...

PHP does offer a unified API: PDO.

http://www.php.net/pdo

It offers a lot of good features, although it doesn't abstract out the SQL 
itself or some more annoying design limitations of some databases (like 
BLOB/CLOB handling in Postgres or Oracle).

I actually just recently finished (OK, it's not done yet but the bulk of it 
is) implementing a PDO-based fully OOP DB abstraction layer for Drupal 7.  
It's actually quite slick, but is still somewhat Drupal dependent right now 
due to the need to know the table structure ahead of time for non-MySQL 
databases.  Eventually I want to split it out to its own standalone library, 
but it's not at that point yet.  (And due to the weirdness that is SQL, it's 
actually a lot harder than you think to do such a thing well, especially 
WHERE clauses and the excitement that are Merge queries.  Tip: A simple array 
is NOT sufficient for all of what WHERE can do.)

-- 
Larry Garfield
[EMAIL PROTECTED]

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



Re: [PHP] Drupal 6

2008-10-06 Thread Larry Garfield
On Monday 06 October 2008 9:19:03 am Nathan Rixham wrote:
> So as part of my "new job" I've been asked to research and indeed get
> used to drupal 6; recon I guess.
>
> I've been using it for the past week; figured out all the best modules
> to do everything I want etc etc.
>
> q: do you use drupal 6
> sub-q: and love it
> sub-q: and would rather not
> sub-q: have had to move away due to lack of functionality
> sub-q: have found it actually didn't speed up but rather slowed development
> sub-q: constantly need to write your own php to get it to do what you want.
>
> Thanks for all responses, and please no "go to drupal forums" responses,
> that's like asking microsoft for honest feedback on microsoft products;
> I need the feedback from you skilled php programmers.
>
> ps: personally I've found it's looks v powerful and been a learning
> curve setting it all up + researching modules; but finding it "not
> great" for actually making real world sites!
>
> Many Regards

Well, I'm biased, too, as I'm a Drupal core developer.  However, I also use it 
professionally to build web sites for clients, mostly institutional 
non-profits (museums, universities, etc.), and moving to Drupal was one of 
the best decisions my company has ever made.  You can't make Drupal do 
everything, but you can come very close to "everything" if you know how to 
work with it. :-)

In general, if you're not using Views and CCK, you're doing something wrong.  
Seriously, that is The Way Of The Future.  

You also need to not fall victim to the temptation to "just do it yourself", 
especially when it comes to theming.  Drupal's power comes from the fact 
that, when you get down to it, it really is smarter than you in many ways if 
you just learn to trust it.  Odds are that whatever you want to do, there's 
already a module that does 80% of it or more or else a way to piece together 
existing modules to get 90% of it or so.  I highly recommend these articles, 
written by a colleague of mine:

http://www.palantir.net/blog/sustainable-markup-how-be-a-themer-drupal
http://www.palantir.net/blog/graycor-drupal-theming-works

Along the same lines, use the Zen theme as a base theme (as discussed in those 
articles).  Again, learn to trust it and don't try to rewrite all of its CSS 
and change class names to what you're used to, etc.  It's CSS is *really* 
solid, and takes care of so much for you it's not even funny.  (Disclaimer: 
Zen was largely written by another colleague of mine.)

I've seen the same pattern in many people.  They try to think that their code 
is better than whatever Drupal happens to do, so they fight it and try to do 
things "their way".  And they waste time and produce something inflexible.  
Eventually they realize that wait, Drupal really is that flexible and can do 
what you want it to do, if you allow yourself to trust Drupal and go "with 
the grain" rather than fighting it.  Then you produce magic.

A smattering of Drupal sites that my company has done recently:

http://www.imamuseum.org/ (writeup: http://drupal.org/node/188312)
http://www.artic.edu/aic/collections (writeup: http://drupal.org/node/279485)
http://www.herron.iupui.edu/
http://artsci.wustl.edu/
http://www.firstbt.com/
http://www.virtualk.org/

For us, we no longer ask "so can Drupal do this?"  We go straight to "so how 
can we do this with Drupal?" because we are already confident that the answer 
to the first question is "Yes we can".  (Obama reference not intentional.)

-- 
Larry Garfield
[EMAIL PROTECTED]

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



Re: [PHP] The 'at' sign (@) variable prefix

2008-10-06 Thread Jochem Maas
mike schreef:
>  Mon, Oct 6, 2008 at 12:17 PM, Daniel Brown <[EMAIL PROTECTED]> wrote:
> 
>>> I will get an error, but if I prefix the value with '@',
>>>
>>> [EMAIL PROTECTED]"q"];
>>The @ is an error control operator, used to buffer the output and
>> store it in a variable - $php_errormsg.
> 
>>It's better to write clean, secure code, of course but
>> sometimes error control is a good thing, too.
> 
> why not just use:
> $query = isset($_GET['q']) ? $_GET['q'] : '';
> 
> that way it's always set.
> 
> or even better (what I recommend):
> $query = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING);
> 
> and get an empty string or a sanitized string, depending on if something 
> exists.
> 

Mike's ways are both better than suppressing the error not only because error
suppression in general sucks but because it's actually less performant to 
trigger
this kind of error.


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



Re: [PHP] Required files not being parsed properly...

2008-10-06 Thread Eric Butera
On Mon, Oct 6, 2008 at 7:28 PM, Stephen Johnson
<[EMAIL PROTECTED]> wrote:
> OK .. I am upgrading to PHP5 on a clients box, and  after doing so I have
> run into the problem that files that get brought in by a require statement,
> or include, end up just getting dumped to the browser as text..
>
> For instance :
>
> require("/home/tnr/incs/tnr_db.php");
> $db = new mysql();
>
> Produces what you see here :
>
> http://www.thumbnailresume.com/index.html?allow=1
>
> Any one have any thoughts on what is going on?
>
> --
> Stephen Johnson c | eh
> The Lone Coder
>
> office:  562.366.4433
> fax: 562.278.0133
>
> http://www.thelonecoder.com
> continuing the struggle against bad code
>
> http://www.fortheloveofgeeks.com
> I¹m a geek and I¹m OK!
> --
>
>
>
>



$user_id = $_COOKIE['user_id'];

$logFile = "/home/tnr/query_logs/tnr.".$user_id.".query.log";

uh oh...


Re: [PHP] Required files not being parsed properly...

2008-10-06 Thread Jim Lucas
Stephen Johnson wrote:
> OK .. I am upgrading to PHP5 on a clients box, and  after doing so I have
> run into the problem that files that get brought in by a require statement,
> or include, end up just getting dumped to the browser as text..
> 
> For instance : 
> 
> require("/home/tnr/incs/tnr_db.php");
> $db = new mysql();
> 
> Produces what you see here :
> 
> http://www.thumbnailresume.com/index.html?allow=1
> 
> Any one have any thoughts on what is going on?
> 
> --
> Stephen Johnson c | eh
> The Lone Coder
> 
> office:  562.366.4433
> fax: 562.278.0133
> 
> http://www.thelonecoder.com
> continuing the struggle against bad code
> 
> http://www.fortheloveofgeeks.com
> I¹m a geek and I¹m OK!
> --
> 
> 
> 
> 

Well, if you look at the source for the page, you will notice that you have a
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Required files not being parsed properly...

2008-10-06 Thread Stephen Johnson
OK .. I am upgrading to PHP5 on a clients box, and  after doing so I have
run into the problem that files that get brought in by a require statement,
or include, end up just getting dumped to the browser as text..

For instance : 

require("/home/tnr/incs/tnr_db.php");
$db = new mysql();

Produces what you see here :

http://www.thumbnailresume.com/index.html?allow=1

Any one have any thoughts on what is going on?

--
Stephen Johnson c | eh
The Lone Coder

office:  562.366.4433
fax: 562.278.0133

http://www.thelonecoder.com
continuing the struggle against bad code

http://www.fortheloveofgeeks.com
I¹m a geek and I¹m OK!
--





Re: [PHP] How to capture origional client machine _directory_ and file name on uploads?

2008-10-06 Thread Ashley Sheridan
On Mon, 2008-10-06 at 12:35 -0400, J. Hill wrote:
> [Sorry Nathan.]
> 
> Yes, I should have said "autopopulate".  And from what I have found, 
> you're right; it does appear java applets can do it, but I had hoped to 
> avoid that option.
> 
> > Eric Butera -- The file upload will only exist in the specified temp 
> > directory . . ..
> Perhaps I should have explained more. If they make an error, I only 
> wanted to autopopulate the field with the correct value rather than 
> tracking the temp file. However, it appears your solution may be the 
> best solution, other than using java applets. Messy. Bummer.
> 
> > Richard Heyes -- Tes, keep your pesky nose out . . .
> I would love to keep my nose out ;-)Unfortunately, the request has 
> been made by our paying clients who are the ones uploading the files.
> 
> While I do appreciate the security issues, there are so many other 
> vulnerabilities, the basic autopopulate concept seems to add very little 
> to the mix.
> 
> Thanks to all for the input.
> 
> Jeff
> 
> 
> Nathan Rixham wrote:
> > J. Hill wrote:
> >> This should be trivial, but apparently not -- or maybe I just need 
> >> more caffeine. My searches have come up empty.
> >>
> >> I am trying to get not only the original file name on uploads, but 
> >> also the original directory on the client machine as well.
> >>
> >> The purpose is for users who make a mistake on another part of the 
> >> form; when the form is returned for them to complete properly, all of 
> >> the correct values are automatically filled in. That's trivial in 
> >> most instances, but I'm not finding a solution for file uploads.
> >>
> >> This seems like a common need. Any suggestions?
> >>
> >> Thanks in advance,
> >>
> >> Jeff
> >>
> >>
> >
> > AFAIK that info is outside the security sandbox of web browsers; just 
> > like you can't resend the file or autopopulate what file you want them 
> > to upload.
> >
> > only way is to use a third party browser extension or app; java 
> > uploader or such like and you may have some luck.
> >
> 
This isn't possible, as people have explained, for security reasons.
What you can do though, is capture and semi-process the file uploaded in
the unsuccessful form submission and keep it in a sandbox until the form
gets submitted correctly. This would get round your problems, but you
will need a clean-up method to remove files that get left behind by
people giving up filling in the form correctly.


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] AJAX and PHP

2008-10-06 Thread Ashley Sheridan
On Mon, 2008-10-06 at 17:09 +0200, Alain Roger wrote:
> And AFAIK it does not work on linux platform
> 
> On Mon, Oct 6, 2008 at 3:36 PM, Wolf <[EMAIL PROTECTED]> wrote:
> 
> > 
> > > yes, flex is "flash for developers"; the main language is AS3 and it
> > > outputs swf's; flex is basically a program which allows you to use mix
> > > of pre-made ui elements & classes, css and AS3 to quickly make great
> > RIA's.
> >
> > Yup, but you have to have flash enabled.  But some of us don't except for
> > specific sites due to ads being swfs as well.
> >
> > Wolf
> >
> 
> 

It can be made to work, but there is a lot of messing about. Not tried
it myself, but I have spoken to some people on the Papervision team who
have done it.


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] Re: db_* => pg_*/my_*/ifx_* ?

2008-10-06 Thread Ashley Sheridan
On Wed, 2008-10-01 at 17:44 +0200, Michelle Konzack wrote:
> Am 2008-09-30 19:58:03, schrieb Ashley Sheridan:
> > Hi Michelle, I'm not sure exactly what it is you're after. Are you
> > looking for software that will allow you to develop applications that
> > are database agnostic?
> 
> What is "agnostic"?
> 
> If you mean "database independant", the answer is yes.
> 
> Most Applications do not need  complex  database  specific  queries  and
> generaly I need only
> 
> db_connect($server, $port, $db, $user, $pass)
>   1)  using pconnect if possibel
>   2)  there are already significant differences
>   between pgsql and mysql
> db_error()
>   1)  Works different between pgsql and mysql and ifx
> 
> db_close($handle)
>   1)  Works afaik with all databases the same way
> 
> db_getarray() -> return array from SELECT
>   1)  Hell of SELECT FROM WHERE...
> 
> db_insert($handle, $table, $what, $where)
> db_update($handle, $table, $what, $where)
> db_delete($handle, $table, $what, $where)
>   1)  Sometimes heavy differences for ALL databases...
> 
> 
> Thanks, Greetings and nice Day/Evening
> Michelle Konzack
> Systemadministrator
> 24V Electronic Engineer
> Tamay Dogan Network
> Debian GNU/Linux Consultant
> 
> 
I think you may need to write these wrappers yourself if you need them.
I don't know of any library that will provide these, and most PHP
systems I've used have their own like this as well.


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] Re: php framework vs just php?

2008-10-06 Thread farid lópez
what is your framework??? uacaman.

i'm using symfony, but i'm reading the book. it's hard but there are so many
things you can do easily with symfony!

2008/10/7 uaca man <[EMAIL PROTECTED]>

> To be or not to be dump it your choice.
>
> My framework it not just awesome it is super awesome.
>
> Angelo
>
> 2008/10/6 Dan Joseph <[EMAIL PROTECTED]>:
> > On Mon, Oct 6, 2008 at 1:01 PM, Jason Pruim <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> But... Which framework is better? :P
> >>
> >>
> >>
> >>
> > Oh my.. now we're gonna get all those guys popping back up telling us how
> > dumb we are and how awesome their frameworks are again!
> >
> > --
> > -Dan Joseph
> >
> > www.canishosting.com - Plans start @ $1.99/month.
> >
> > "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."
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Atte
Farid H. López Durán

"La naturaleza del hombre es tal que puede conseguir la perfección
únicamente cuando
trabaja para el bienestar y la dignidad de sus conciudadanos".  Karl Marx


Re: [PHP] The 'at' sign (@) variable prefix

2008-10-06 Thread mike
 Mon, Oct 6, 2008 at 12:17 PM, Daniel Brown <[EMAIL PROTECTED]> wrote:

>> I will get an error, but if I prefix the value with '@',
>>
>> [EMAIL PROTECTED]"q"];
>
>The @ is an error control operator, used to buffer the output and
> store it in a variable - $php_errormsg.

>It's better to write clean, secure code, of course but
> sometimes error control is a good thing, too.

why not just use:
$query = isset($_GET['q']) ? $_GET['q'] : '';

that way it's always set.

or even better (what I recommend):
$query = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING);

and get an empty string or a sanitized string, depending on if something exists.

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



Re: [PHP] The 'at' sign (@) variable prefix

2008-10-06 Thread Daniel Brown
On Mon, Oct 6, 2008 at 3:03 PM, Crash Dummy <[EMAIL PROTECTED]> wrote:
> I learned through osmosis that I could use the '@' sign to prevent an
> error with an uncertain variable. For example, if there is no $_GET[]
> value in this line,
>
> $query=$_GET["q"];
>
> I will get an error, but if I prefix the value with '@',
>
> [EMAIL PROTECTED]"q"];

The @ is an error control operator, used to buffer the output and
store it in a variable - $php_errormsg.

Check it out:
http://php.net/manual/en/language.operators.errorcontrol.php

It's better to write clean, secure code, of course but
sometimes error control is a good thing, too.

-- 

More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

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



Re: [PHP] The 'at' sign (@) variable prefix

2008-10-06 Thread uaca man
Documentation  is at:
http://br.php.net/manual/en/language.operators.errorcontrol.php

Angelo

2008/10/6 Crash Dummy <[EMAIL PROTECTED]>:
> I learned through osmosis that I could use the '@' sign to prevent an
> error with an uncertain variable. For example, if there is no $_GET[]
> value in this line,
>
> $query=$_GET["q"];
>
> I will get an error, but if I prefix the value with '@',
>
> [EMAIL PROTECTED]"q"];
>
> and no value is available, a null string is returned, and no error is
> generated.
>
> This is great, but I'd like to see it in writing. I can't find this
> feature in the documentation. Can someone steer me to it?
> --
> Dave
>
>
>
>
> --
> 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] Re: php framework vs just php?

2008-10-06 Thread uaca man
To be or not to be dump it your choice.

My framework it not just awesome it is super awesome.

Angelo

2008/10/6 Dan Joseph <[EMAIL PROTECTED]>:
> On Mon, Oct 6, 2008 at 1:01 PM, Jason Pruim <[EMAIL PROTECTED]> wrote:
>
>>
>> But... Which framework is better? :P
>>
>>
>>
>>
> Oh my.. now we're gonna get all those guys popping back up telling us how
> dumb we are and how awesome their frameworks are again!
>
> --
> -Dan Joseph
>
> www.canishosting.com - Plans start @ $1.99/month.
>
> "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."
>

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



[PHP] The 'at' sign (@) variable prefix

2008-10-06 Thread "Crash" Dummy
I learned through osmosis that I could use the '@' sign to prevent an
error with an uncertain variable. For example, if there is no $_GET[]
value in this line,

$query=$_GET["q"];

I will get an error, but if I prefix the value with '@',

[EMAIL PROTECTED]"q"];

and no value is available, a null string is returned, and no error is
generated.

This is great, but I'd like to see it in writing. I can't find this
feature in the documentation. Can someone steer me to it?
-- 
Dave




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



Re: [PHP] Re: php framework vs just php?

2008-10-06 Thread Dan Joseph
On Mon, Oct 6, 2008 at 1:01 PM, Jason Pruim <[EMAIL PROTECTED]> wrote:

>
> But... Which framework is better? :P
>
>
>
>
Oh my.. now we're gonna get all those guys popping back up telling us how
dumb we are and how awesome their frameworks are again!

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

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


RE: [PHP] NTLM Auth For grabbing data.

2008-10-06 Thread Boyd, Todd M.
> -Original Message-
> From: DJ Necrogami [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 06, 2008 12:41 PM
> To: [EMAIL PROTECTED]; php-general@lists.php.net
> Subject: [PHP] NTLM Auth For grabbing data.
> 
> Content-Length1656
> Content-Type  text/html
> ServerMicrosoft-IIS/6.0
> WWW-Authenticate  Negotiate NTLM
> X-Powered-By  ASP.NET
> MicrosoftSharePointTeamServices   12.0.0.6023
> 
> I'm needing to authenticate against that with php. Is this possible?
> I can manually provide the details but the http auth script only
> allows basic auth not NTLM.
> 
> I'm not trying to have the user authenticate against it. I'm trying to
> get the server to authenticate against NTLM because i'm trying to grab
> and parse html pages.
> 
> If anyone can help thank you.
> 
> If there is a method of doing this easily in php normally please let
> me know. ZF or PHP either way.

STFW:

http://blog.thinkphp.de/archives/125-Accessing-NTLM-secured-resources-wi
th-PHP.html
http://forums.whirlpool.net.au/forum-replies-archive.cfm/630826.html
http://bytes.com/forum/thread9108.html
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/
PHP/Q_21586189.html
http://rabaix.net/articles/2008/3/13/using-soap-php-with-ntlm-authentica
tion
http://siphon9.net/loune/2007/10/simple-lightweight-ntlm-in-php/


Todd Boyd
Web Programmer

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



[PHP] NTLM Auth For grabbing data.

2008-10-06 Thread DJ Necrogami
Content-Length  1656
Content-Typetext/html
Server  Microsoft-IIS/6.0
WWW-AuthenticateNegotiate NTLM
X-Powered-ByASP.NET
MicrosoftSharePointTeamServices 12.0.0.6023

I'm needing to authenticate against that with php. Is this possible?
I can manually provide the details but the http auth script only
allows basic auth not NTLM.

I'm not trying to have the user authenticate against it. I'm trying to
get the server to authenticate against NTLM because i'm trying to grab
and parse html pages.

If anyone can help thank you.

If there is a method of doing this easily in php normally please let
me know. ZF or PHP either way.

-- 
Anton C. Swartz IV
PHPLogic Development Services http://www.phplogic.net - Co-Owner
Necrogami http://www.necrogami.com - Personal Blog
Based in Indianapolis, IN

"The Opposite of war is not Peace it is Creation."


"Yes," she murmured. "Wise enough to be afraid. To understand, at
least in part. How does it feel, to know what you know, child?" My
voice came out unsteady, and more quiet than I would have liked. "Sort
of like Tokyo when Godzilla comes up on the beach."

Don't let sin rule your body. After all, your body is bound to die, so
dont obey its desires or let any part of it become slave to evil. Give
yourselves to God, as people who have been raised from death to life.
Make every part of your body a slavethat pleases God. Don't let sin
keep ruling your lives.You are ruled by God's Kindness and not by the
law.
Romans 6:12-14

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



Re: [PHP] Re: php framework vs just php?

2008-10-06 Thread uaca man
Lets raise the dead once more.

I have been using the Prado framework, prado uses the .net
architecture, so it is easy and fast to learn for those who came from
a Microsoft platform, anyway prado is very good to build UI, but there
is always a *but*!! Prado database abstraction model it is just bad
something like hibernate mixed with some ORM, or maybe i just don't
like the java way of doing things.

Angelo

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



Re: [PHP] Re: php framework vs just php?

2008-10-06 Thread Jason Pruim


On Oct 6, 2008, at 12:57 PM, Daniel Brown wrote:

On Mon, Oct 6, 2008 at 11:41 AM, clive <[EMAIL PROTECTED] 
> wrote:


I agree with Tony.


   And you raise the dead.  That thread died five and a half months
ago  Let it rest in peace!  ;-P


But... Which framework is better? :P


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
[EMAIL PROTECTED]





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



Re: [PHP] Re: php framework vs just php?

2008-10-06 Thread Daniel Brown
On Mon, Oct 6, 2008 at 11:41 AM, clive <[EMAIL PROTECTED]> wrote:
>
> I agree with Tony.

And you raise the dead.  That thread died five and a half months
ago  Let it rest in peace!  ;-P

-- 

More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

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



Re: [PHP] How to capture origional client machine _directory_ and file name on uploads?

2008-10-06 Thread J. Hill

[Sorry Nathan.]

Yes, I should have said "autopopulate".  And from what I have found, 
you're right; it does appear java applets can do it, but I had hoped to 
avoid that option.


Eric Butera -- The file upload will only exist in the specified temp 
directory . . ..
Perhaps I should have explained more. If they make an error, I only 
wanted to autopopulate the field with the correct value rather than 
tracking the temp file. However, it appears your solution may be the 
best solution, other than using java applets. Messy. Bummer.



Richard Heyes -- Tes, keep your pesky nose out . . .
I would love to keep my nose out ;-)Unfortunately, the request has 
been made by our paying clients who are the ones uploading the files.


While I do appreciate the security issues, there are so many other 
vulnerabilities, the basic autopopulate concept seems to add very little 
to the mix.


Thanks to all for the input.

Jeff


Nathan Rixham wrote:

J. Hill wrote:
This should be trivial, but apparently not -- or maybe I just need 
more caffeine. My searches have come up empty.


I am trying to get not only the original file name on uploads, but 
also the original directory on the client machine as well.


The purpose is for users who make a mistake on another part of the 
form; when the form is returned for them to complete properly, all of 
the correct values are automatically filled in. That's trivial in 
most instances, but I'm not finding a solution for file uploads.


This seems like a common need. Any suggestions?

Thanks in advance,

Jeff




AFAIK that info is outside the security sandbox of web browsers; just 
like you can't resend the file or autopopulate what file you want them 
to upload.


only way is to use a third party browser extension or app; java 
uploader or such like and you may have some luck.





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



RE: [PHP] How to capture origional client machine _directory_ and file name on uploads?

2008-10-06 Thread Boyd, Todd M.
> -Original Message-
> From: J. Hill [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 06, 2008 10:48 AM
> To: php-general@lists.php.net
> Subject: [PHP] How to capture origional client machine _directory_ and
> file name on uploads?
> 
> This should be trivial, but apparently not -- or maybe I just need
more
> caffeine. My searches have come up empty.
> 
> I am trying to get not only the original file name on uploads, but
also
> the original directory on the client machine as well.
> 
> The purpose is for users who make a mistake on another part of the
> form;
> when the form is returned for them to complete properly, all of the
> correct values are automatically filled in. That's trivial in most
> instances, but I'm not finding a solution for file uploads.
> 
> This seems like a common need. Any suggestions?

It is a common WANT. Unfortunately, it's also a doorway to incredible
security risks--any direct knowledge of or access to the client's file
system could be compromised and leveraged for ugly, terrible,
unspeakable things.

I ran into this doozy when I was working on a submission form with file
attachments--if the submission fails, the user has to re-attach the
files. PERIOD. (Well... they could be cached on the first submission and
left there on the SERVER continuously for additional submissions, but
you get my drift, yes?)

HTH,


Todd Boyd
Web Programmer

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



Re: [PHP] How to capture origional client machine _directory_ and file name on uploads?

2008-10-06 Thread Richard Heyes
> Any suggestions?

Yes, keep your pesky nose out. It's my machine and my file system is
none of your business. Simply, you get whatever is in $_FILES and
that's it. From memory thats the filename, the path to it on your
machine, and size info. And maybe something else. Try print_r()ing
$_FILES, that's what you get.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

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



[PHP] Re: How to capture origional client machine _directory_ and file nameon uploads?

2008-10-06 Thread Nathan Rixham

J. Hill wrote:
This should be trivial, but apparently not -- or maybe I just need more 
caffeine. My searches have come up empty.


I am trying to get not only the original file name on uploads, but also 
the original directory on the client machine as well.


The purpose is for users who make a mistake on another part of the form; 
when the form is returned for them to complete properly, all of the 
correct values are automatically filled in. That's trivial in most 
instances, but I'm not finding a solution for file uploads.


This seems like a common need. Any suggestions?

Thanks in advance,

Jeff




AFAIK that info is outside the security sandbox of web browsers; just 
like you can't resend the file or autopopulate what file you want them 
to upload.


only way is to use a third party browser extension or app; java uploader 
or such like and you may have some luck.


--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

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



Re: [PHP] How to capture origional client machine _directory_ and file name on uploads?

2008-10-06 Thread Eric Butera
On Mon, Oct 6, 2008 at 11:48 AM, J. Hill <[EMAIL PROTECTED]> wrote:
> This should be trivial, but apparently not -- or maybe I just need more
> caffeine. My searches have come up empty.
>
> I am trying to get not only the original file name on uploads, but also the
> original directory on the client machine as well.
>
> The purpose is for users who make a mistake on another part of the form;
> when the form is returned for them to complete properly, all of the correct
> values are automatically filled in. That's trivial in most instances, but
> I'm not finding a solution for file uploads.
>
> This seems like a common need. Any suggestions?
>
> Thanks in advance,
>
> Jeff
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

The file upload will only exist in the specified temp directory for
the request.  So if you redisplay the form you're going to have to
deal with making the file persist yourself.

You can use move_uploaded_file into a temp staging area (so it
persists beyond the original request) along with a session value to
keep track of it until the form has been successfully completed.  But
then you've got to deal with cleaning it up if the user bails out,
uploads a different file, etc.  I'm lazy and just make them re-upload
it since most clients I deal with are on broadband.

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



[PHP] How to capture origional client machine _directory_ and file name on uploads?

2008-10-06 Thread J. Hill
This should be trivial, but apparently not -- or maybe I just need more 
caffeine. My searches have come up empty.


I am trying to get not only the original file name on uploads, but also 
the original directory on the client machine as well.


The purpose is for users who make a mistake on another part of the form; 
when the form is returned for them to complete properly, all of the 
correct values are automatically filled in. That's trivial in most 
instances, but I'm not finding a solution for file uploads.


This seems like a common need. Any suggestions?

Thanks in advance,

Jeff



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



Re: [PHP] Re: php framework vs just php?

2008-10-06 Thread clive

Tony Marston wrote:
I agree that finding the right framework to use can be very difficult, which 
is why a lot of programmers (like me) prefer to roll their own. But if you 
can find an off-the-shelf framework that does the job it can save you an 
awful amount of time.


  

I agree with Tony.

I think I have written many of my own 'frameworks' over the years, one 
mistake I made was never adding on to an existing one as I always 
thought I could do better 2nd ,3rd or Nth time around.


I have recently had some exposure to the Zend Framework and I must say 
that I do like it :) , In particular I find the Zend_Form component very 
useful. Generating, validating and then inserting/updating data is super 
easy. This weekend I started a new project and started hand coding a 
login form, then though wth am I doing, a few lines of code and 
Zend_Form had my login form up and running.


Im not saying that a custom framework is the right way, just that I 
would choose one thats considered a loosely coupled framework So you can 
choose what parts you want to use or not use, this is why I like the ZF, 
it allows me to choose my own toilet paper to wipe my ass with or even 
if I should give it a wipe  not that I wouldn't.


Clive


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



[PHP] Re: Php4 => Php5

2008-10-06 Thread Nathan Rixham

Operacion Control wrote:

Hi Lists,
 
I am planning to migrate from Php4 to Php5 in a few days.

Do anyone know which applications/services are upset with the migration?
I dont have enough servers to instalt each using Php4 and then install Php5 to 
test.
I mean sendmail, qmail, joomla, egroupware, hordeetc
 
Thanks in advance
 
Carlos



  


replying late, but that's the new trend :)

why not set up a L/W(amp) on your local machine with php 5; stick on 
error reporting and spend some time - TBH most of the error's you 
encounter will probably be syntax changes and different php.ini defaults.


--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

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



Re: [PHP] AJAX and PHP

2008-10-06 Thread Philip Thompson

On Oct 4, 2008, at 7:38 AM, Ashley Sheridan wrote:


On Sat, 2008-10-04 at 13:48 +0200, Nitsan Bin-Nun wrote:
It depends how much stuff you have in the first div, it there are a  
lot of
images and the user will have to load them again (in case there is  
no cache)
and you care for the traffic those images cost - it would be better  
to use

AJAX.

But generally - they both okay, I personally would use reload of  
the whole
page just because of the time it would take me to develop it with  
ajax ;)


HTH,
Nitsan

On Sat, Oct 4, 2008 at 12:10 PM, Alain Roger <[EMAIL PROTECTED]>  
wrote:



HI,

i'm currently working on some web application and i would like to  
know what

is the best way to do what i want.
basically like all application i have a menu and based on selected  
item

menu
i want to display a page (basically 50 % of this new page is DB
result/grid.

As usual i have 2 divs, one for the menu one for the content of DB  
to

display.
i would like to know if it's not better to use AJAX to load the  
content of
the second div (DB result and other stuff) instead to every time  
load a new

page which load menu and content of DB ?

what are your experiences on such thing ?
thx.

--
Alain

Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Also, it depends on who you think will be visiting the site, as an
increasing number of people browse the web with devices that have no
JavaScript capabilities, so they wouldn't be able to use an Ajax site.


Jump into the now. As an increasing number of people browse the web  
with (handheld?) devices, the support will also increase. However, it  
also depends on the audience you're trying to reach. IMO, I wouldn't  
limit your site for the few who a) don't have js enabled or b) have a  
device that doesn't support any standard web browser features anyway.


~Philip

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



Re: [PHP] AJAX and PHP

2008-10-06 Thread Nathan Rixham

> wrote:


 > yes, flex is "flash for developers"; the main language is AS3 and it
 > outputs swf's; flex is basically a program which allows you to
use mix
 > of pre-made ui elements & classes, css and AS3 to quickly make
great RIA's.

Yup, but you have to have flash enabled.  But some of us don't
except for specific sites due to ads being swfs as well.

Wolf


Alain Roger wrote:
> And AFAIK it does not work on linux platform
>

development wise adobe flex 3 SDK works on linux; afaik flex builder 
(the wysiwyg ide for eclipse) doesn't yet.


clientside (the apps you develop) work anywhere flash player 9 does.

a great reason to "get in to" flex now is that flex 4 will also be 
supporting most of the major smartphones so you're app's will work 
virtually everywhere (and look nicer + dev time wayyy down).


can you tell I like it? (+it's got native E4X support)

--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

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



Re: [PHP] AJAX and PHP

2008-10-06 Thread Alain Roger
And AFAIK it does not work on linux platform

On Mon, Oct 6, 2008 at 3:36 PM, Wolf <[EMAIL PROTECTED]> wrote:

> 
> > yes, flex is "flash for developers"; the main language is AS3 and it
> > outputs swf's; flex is basically a program which allows you to use mix
> > of pre-made ui elements & classes, css and AS3 to quickly make great
> RIA's.
>
> Yup, but you have to have flash enabled.  But some of us don't except for
> specific sites due to ads being swfs as well.
>
> Wolf
>



-- 
Alain

Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Re: [PHP] Best Search Algorithm for Millions of record

2008-10-06 Thread Micah Gersten
What type of data is in the fields?  Also, which database engine?

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Hemant Patel wrote:
> I have couple of tables with 1,60,0 records and now i need to
> search the records based on some crieteria...so which will help me...?
>
>
> On Mon, Oct 6, 2008 at 12:30 PM, Micah Gersten <[EMAIL PROTECTED]
> > wrote:
>
> The question is, what are you searching for in the records?
>
> Thank you,
> Micah Gersten
> onShore Networks
> Internal Developer
> http://www.onshore.com
>
>
>
> Hemant Patel wrote:
> > My question is Whether I should go for Full Text Based search or
> Database
> > Search...?And is there algorithm in php which can help me in
> this case...?
> >
> >
>
>

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



Re: [PHP] mt_rand() - the same forever?

2008-10-06 Thread Janek
On Mon, Oct 6, 2008 at 1:53 PM, Eric Butera <[EMAIL PROTECTED]> wrote:
> On Sun, Oct 5, 2008 at 2:25 PM, Janek <[EMAIL PROTECTED]> wrote:
>> I wonder whether I can rely on the stability of mt_srand() and
>> mt_rand(). I want them to generate the same sequence for a fixed seed,
>> regardless of PHP version. Do you think I can trust it?
>> Janek
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
> A while ago I saw on internals where someone was talking about why
> their random numbers weren't giving the same response using the same
> seed anymore after upgrading.  The dev's said a random number is a
> random number and should never be relied upon to give the same result,
> ever.  That may have been a different function, but I'm sure that
> mindset would persist across all random functions.
>

Thanks, that settles it. I think I will use the second idea from
Jochem or something like that.

Janek

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



Re: [PHP] Php4 => Php5

2008-10-06 Thread Philip Thompson

On Oct 3, 2008, at 12:22 PM, Jim Lucas wrote:


Maciek Sokolewicz wrote:


P.S. you are quite late with migrating, PHP 5 has been out for  
several

years now



As stated in many other threads.  Some people do not have a choice.   
They are

not allowed to upgrade.  Or, as is in many cases, the cost of fixing
everything after upgrading out weighs the benefits of the upgrade  
itself.


Or wait a little bit longer because 6 will be out soon†. ;)

~Philip

† Relative term


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



[PHP] Prefered Method for User authetification on VHosts

2008-10-06 Thread Michelle Konzack
Hello,

I have at my hosting provider only 1 GByte of Diskspace and can  install
VHosts as much as I want.  The problem is, that I  have  "no access"  to
the OS for OS-Level autentification.

Currently I have

${CUSTOMERPATH}/htdocs/index.php

which handel all VHosts and get ist config from directories like

${CUSTOMERPATH}/CONFIG_.tamay-dogan.net/...

in which I currently use files like

:

and then I use:

[ STDIN ]---
function login($user, $pass, $redirect) {

  if ($user != '' and $pass != '') {

$SHADOW=exec("grep \"^$user:\" " . DIR_HOST . "/.shadow |cut -d: -f2");
if (empty($SHADOW)) {
  header("Content-Type: text/html");
  die("\nErrorThe username \"$user\" does not exist.");
}

$SALT=exec("grep \"^$user:\" " . DIR_HOST . "/.shadow |cut -d: -f2 |cut -d$ 
-f1-3");
$ENCRYPTED=crypt($pass, $SALT);
if ($SHADOW != $ENCRYPTED) {
  header("Content-Type: text/html");
  die("\nErrorWrong password for user \"$user\".");
}
$TIME_NOW=date("U");
$SESSID=exec("echo \"${user}${TIME_NOW}\" |md5sum |sed 's| .*||'");
setcookie('TDSESSION', "$SESSID");
setcookie('USER', $user);
exec("echo '" . date("U") . " " . $user . "' >" . DIR_SESSIONS . "/" . 
$SESSID);
  }
  if (empty($redirect)) {
$redirect="/";
  }
  header("Content-Type: text/html");
  die("");
}


which is working properly...

I like to know, whether this  is  good  enough  or  is  there  a  better
solution?

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
Michelle Konzack   Apt. 917  ICQ #328449886
+49/177/935194750, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


[PHP] Drupal 6

2008-10-06 Thread Nathan Rixham


So as part of my "new job" I've been asked to research and indeed get 
used to drupal 6; recon I guess.


I've been using it for the past week; figured out all the best modules 
to do everything I want etc etc.


q: do you use drupal 6
sub-q: and love it
sub-q: and would rather not
sub-q: have had to move away due to lack of functionality
sub-q: have found it actually didn't speed up but rather slowed development
sub-q: constantly need to write your own php to get it to do what you want.

Thanks for all responses, and please no "go to drupal forums" responses, 
that's like asking microsoft for honest feedback on microsoft products; 
I need the feedback from you skilled php programmers.


ps: personally I've found it's looks v powerful and been a learning 
curve setting it all up + researching modules; but finding it "not 
great" for actually making real world sites!


Many Regards

--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

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



[PHP] Re: Wanted PHP Developers LogicManse

2008-10-06 Thread Michelle Konzack
Am 2008-09-30 13:50:14, schrieb Robert Cummings:
> BTW, while we're off topic... my wife delivered our third child (second
> boy) 3 minutes after midnight yesterday :)
> 
> Cheers,
> Rob.

Congratulations from Strasbourg/France!

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
Michelle Konzack   Apt. 917  ICQ #328449886
+49/177/935194750, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


[PHP] Re: db_* => pg_*/my_*/ifx_* ?

2008-10-06 Thread Michelle Konzack
Am 2008-09-30 19:58:03, schrieb Ashley Sheridan:
> Hi Michelle, I'm not sure exactly what it is you're after. Are you
> looking for software that will allow you to develop applications that
> are database agnostic?

What is "agnostic"?

If you mean "database independant", the answer is yes.

Most Applications do not need  complex  database  specific  queries  and
generaly I need only

db_connect($server, $port, $db, $user, $pass)
1)  using pconnect if possibel
2)  there are already significant differences
between pgsql and mysql
db_error()
1)  Works different between pgsql and mysql and ifx

db_close($handle)
1)  Works afaik with all databases the same way

db_getarray()   -> return array from SELECT
1)  Hell of SELECT FROM WHERE...

db_insert($handle, $table, $what, $where)
db_update($handle, $table, $what, $where)
db_delete($handle, $table, $what, $where)
1)  Sometimes heavy differences for ALL databases...


Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
Michelle Konzack   Apt. 917  ICQ #328449886
+49/177/935194750, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


Re: [PHP] AJAX and PHP

2008-10-06 Thread Wolf

> yes, flex is "flash for developers"; the main language is AS3 and it 
> outputs swf's; flex is basically a program which allows you to use mix 
> of pre-made ui elements & classes, css and AS3 to quickly make great RIA's.

Yup, but you have to have flash enabled.  But some of us don't except for 
specific sites due to ads being swfs as well.

Wolf

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



Re: [PHP] AJAX and PHP

2008-10-06 Thread Nathan Rixham

Alain Roger wrote:

Alain:

The only difference the user experiences between having AJAX, or
not, is refreshing the page. If page refresh is not a problem,
then don't complicate your life. On the other hand, if page
refresh is annoying, or not wanted, then AJAX is you're only
solution.

But as it has been said before, not all users have javascript
turned on and as such AJAX will not work -- after all, it
javascript.

However, there are way to degrade gracefully from a AJAX site to
a normal site. Google
javascript graceful degradation" for references.

Please note, going the AJAX route does not make your coding
simpler -- it's a different critter. But it does (with help from
jQuery et al) offer exciting new ways to present data.

Cheers,

tedd


this is a standard response for me recently; but have you looked in
to using flex 3 to build the clientside?

additionally ajax's main benefit (in my mind) is that it allows you
to pull down/update only the data you need, and not the whole page -
often this means you can skip out a large part of the templating and
make the php server side scripts so much lighter; very beneficial
when polling. Other than that, as everyone has mentioned - it's
mainly a cosmetic thing.

-- 
nathan ( [EMAIL PROTECTED]  )


 
Without mixing themes (flex in PHP forum) flex is similar to AS3, no ?


yes, flex is "flash for developers"; the main language is AS3 and it 
outputs swf's; flex is basically a program which allows you to use mix 
of pre-made ui elements & classes, css and AS3 to quickly make great RIA's.


--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

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



Re: [PHP] AJAX and PHP

2008-10-06 Thread Alain Roger
>
> Alain:
>>
>> The only difference the user experiences between having AJAX, or not, is
>> refreshing the page. If page refresh is not a problem, then don't complicate
>> your life. On the other hand, if page refresh is annoying, or not wanted,
>> then AJAX is you're only solution.
>>
>> But as it has been said before, not all users have javascript turned on
>> and as such AJAX will not work -- after all, it javascript.
>>
>> However, there are way to degrade gracefully from a AJAX site to a normal
>> site. Google
>> javascript graceful degradation" for references.
>>
>> Please note, going the AJAX route does not make your coding simpler --
>> it's a different critter. But it does (with help from jQuery et al) offer
>> exciting new ways to present data.
>>
>> Cheers,
>>
>> tedd
>>
>>
> this is a standard response for me recently; but have you looked in to
> using flex 3 to build the clientside?
>
> additionally ajax's main benefit (in my mind) is that it allows you to pull
> down/update only the data you need, and not the whole page - often this
> means you can skip out a large part of the templating and make the php
> server side scripts so much lighter; very beneficial when polling. Other
> than that, as everyone has mentioned - it's mainly a cosmetic thing.
>
> --
> nathan ( [EMAIL PROTECTED] )


Without mixing themes (flex in PHP forum) flex is similar to AS3, no ?


Re: [PHP] Join The Team

2008-10-06 Thread Govinda

On Oct 6, 2008, at 12:00 AM, Hemant Patel wrote:


Hi...ALL...
With Regads,
Hemant Patel


Namaste Hemant :-)
(I as in Uttar Kashi for 7 years.)

I am sure you all are quite aware of this, but in India 16,000,000 is  
written 160,00,000.


-Govinda

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



Re: [PHP] AJAX and PHP

2008-10-06 Thread Nathan Rixham

tedd wrote:

At 12:10 PM +0200 10/4/08, Alain Roger wrote:

HI,

i'm currently working on some web application and i would like to know 
what

is the best way to do what i want.
basically like all application i have a menu and based on selected 
item menu
i want to display a page (basically 50 % of this new page is DB 
result/grid.


As usual i have 2 divs, one for the menu one for the content of DB to
display.
i would like to know if it's not better to use AJAX to load the 
content of
the second div (DB result and other stuff) instead to every time load 
a new

page which load menu and content of DB ?

what are your experiences on such thing ?
thx.

--
Alain


Alain:

The only difference the user experiences between having AJAX, or not, is 
refreshing the page. If page refresh is not a problem, then don't 
complicate your life. On the other hand, if page refresh is annoying, or 
not wanted, then AJAX is you're only solution.


But as it has been said before, not all users have javascript turned on 
and as such AJAX will not work -- after all, it javascript.


However, there are way to degrade gracefully from a AJAX site to a 
normal site. Google

javascript graceful degradation" for references.

Please note, going the AJAX route does not make your coding simpler -- 
it's a different critter. But it does (with help from jQuery et al) 
offer exciting new ways to present data.


Cheers,

tedd



this is a standard response for me recently; but have you looked in to 
using flex 3 to build the clientside?


additionally ajax's main benefit (in my mind) is that it allows you to 
pull down/update only the data you need, and not the whole page - often 
this means you can skip out a large part of the templating and make the 
php server side scripts so much lighter; very beneficial when polling. 
Other than that, as everyone has mentioned - it's mainly a cosmetic thing.


--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

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



Re: [PHP] Best Search Algorithm for Millions of record

2008-10-06 Thread Nathan Rixham

Hemant Patel wrote:

But still i am asking...if anybody has ever worked on other Full Text Based
Search Algorithm then please help me to choose the best one as I need to
search in 160,00,000 records
And I have to maintain my response time as less as possible...
Looking forward to your help and thnaks in advance...:)



16 million or 160 million records?
what database are you using currently?
does the full text need to be over all records?
average size of data in a single record?

--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

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



Re: [PHP] Best Search Algorithm for Millions of record

2008-10-06 Thread Hemant Patel
Yeah sure...I have read about Lucene Implementation in Zend Framework and
its Lucene Search class will help us to easily create our Text Based Search
Functionality in our own application.
http://devzone.zend.com/node/view/id/91

But still i am asking...if anybody has ever worked on other Full Text Based
Search Algorithm then please help me to choose the best one as I need to
search in 160,00,000 records
And I have to maintain my response time as less as possible...
Looking forward to your help and thnaks in advance...:)

With Regards,
Hemant Patel

On Mon, Oct 6, 2008 at 5:54 PM, Stut <[EMAIL PROTECTED]> wrote:

> Please keep replies to the list so everyone can benefit from the
> discussion.
>
> On 6 Oct 2008, at 13:13, Hemant Patel wrote:
>
>> I found on other blogs that Lucene Implementation is quite easy and
>> flexible also...Is there any major differences between Sphinx and Lucene
>> ...if you know then please lemme know...:)
>>
>
> Dunno, I've never tried Lucene. All I know is that Sphinx rocks.
>
> I suggest you try them both and use the one that fits the specific
> requirements of your app best.
>
> -Stut
>
> --
> http://stut.net/
>
>
>  On Mon, Oct 6, 2008 at 2:18 PM, Stut <[EMAIL PROTECTED]> wrote:
>> On 6 Oct 2008, at 07:17, Hemant Patel wrote:
>> My question is Whether I should go for Full Text Based search or Database
>> Search...?And is there algorithm in php which can help me in this case...?
>>
>> I can fully recommend Sphinx Search: http://sphinxsearch.com/. It's not
>> as easy to implement as a full-text index but the power and flexibility you
>> get are well worth the effort.
>>
>> -Stut
>>
>> --
>> http://stut.net/
>>
>>
>


Re: [PHP] Best Search Algorithm for Millions of record

2008-10-06 Thread Stut
Please keep replies to the list so everyone can benefit from the  
discussion.


On 6 Oct 2008, at 13:13, Hemant Patel wrote:
I found on other blogs that Lucene Implementation is quite easy and  
flexible also...Is there any major differences between Sphinx and  
Lucene ...if you know then please lemme know...:)


Dunno, I've never tried Lucene. All I know is that Sphinx rocks.

I suggest you try them both and use the one that fits the specific  
requirements of your app best.


-Stut

--
http://stut.net/


On Mon, Oct 6, 2008 at 2:18 PM, Stut <[EMAIL PROTECTED]> wrote:
On 6 Oct 2008, at 07:17, Hemant Patel wrote:
My question is Whether I should go for Full Text Based search or  
Database
Search...?And is there algorithm in php which can help me in this  
case...?


I can fully recommend Sphinx Search: http://sphinxsearch.com/. It's  
not as easy to implement as a full-text index but the power and  
flexibility you get are well worth the effort.


-Stut

--
http://stut.net/




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



Re: [PHP] mt_rand() - the same forever?

2008-10-06 Thread Eric Butera
On Sun, Oct 5, 2008 at 2:25 PM, Janek <[EMAIL PROTECTED]> wrote:
> I wonder whether I can rely on the stability of mt_srand() and
> mt_rand(). I want them to generate the same sequence for a fixed seed,
> regardless of PHP version. Do you think I can trust it?
> Janek
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

A while ago I saw on internals where someone was talking about why
their random numbers weren't giving the same response using the same
seed anymore after upgrading.  The dev's said a random number is a
random number and should never be relied upon to give the same result,
ever.  That may have been a different function, but I'm sure that
mindset would persist across all random functions.

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



Re: [PHP] mt_rand() - the same forever?

2008-10-06 Thread Richard Heyes
> fair point; I've been trying to change my mindset on this of late, but there
> is no replacement for simply writing you're own code. Well said.

How many numbers are you likely to need?

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

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



Re: [PHP] mt_rand() - the same forever?

2008-10-06 Thread Nathan Rixham

Stut wrote:

On 6 Oct 2008, at 10:58, Nathan Rixham wrote:

Janek wrote:

On Sun, Oct 5, 2008 at 10:05 PM, Ashley Sheridan
<[EMAIL PROTECTED]> wrote:

On Sun, 2008-10-05 at 21:57 +0200, Janek wrote:

I know, but I *want* to seed it. My goal is to have a fixed
pseudorandom sequence for each integer (seed) and I don't want those
sequences to change regarding PHP version.

Janek

On Sun, Oct 5, 2008 at 9:52 PM, Richard Heyes <[EMAIL PROTECTED]> wrote:

I wonder whether I can rely on the stability of mt_srand() and
mt_rand(). I want them to generate the same sequence for a fixed 
seed,

regardless of PHP version. Do you think I can trust it?
Janek

Keep in mind (if you're not already) that mt_rand() doesn't
technically need to be seeded.

--
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph


Doesn't it also rely on the system clock as well?


Ash
www.ashleysheridan.co.uk



No. When I give a fixed seed to mt_srand(), each time I get the same
sequence of mt_rand()s. My question is wheather the actual algorithm
behind these functions is likely to change in the next version of PHP
or not.
Janek


why not give us your code and expected results, a few of us can run it 
on our various php installs and post back the results.


No other way to find out for sure!


On the contrary... find the implementation for that function in the PHP 
source code and check the complete CVS history to see if its ever 
changed. That's the only way you'll know for sure.


Personally I wouldn't bother. It will be easier and safer to find the 
code, port it to PHP and use that instead. That way it's your code, you 
control it and you can *know* it's not going to change regardless of PHP 
version.


-Stut



fair point; I've been trying to change my mindset on this of late, but 
there is no replacement for simply writing you're own code. Well said.


--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

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



Re: [PHP] mt_rand() - the same forever?

2008-10-06 Thread Stut

On 6 Oct 2008, at 10:58, Nathan Rixham wrote:

Janek wrote:

On Sun, Oct 5, 2008 at 10:05 PM, Ashley Sheridan
<[EMAIL PROTECTED]> wrote:

On Sun, 2008-10-05 at 21:57 +0200, Janek wrote:

I know, but I *want* to seed it. My goal is to have a fixed
pseudorandom sequence for each integer (seed) and I don't want  
those

sequences to change regarding PHP version.

Janek

On Sun, Oct 5, 2008 at 9:52 PM, Richard Heyes <[EMAIL PROTECTED]>  
wrote:

I wonder whether I can rely on the stability of mt_srand() and
mt_rand(). I want them to generate the same sequence for a  
fixed seed,

regardless of PHP version. Do you think I can trust it?
Janek

Keep in mind (if you're not already) that mt_rand() doesn't
technically need to be seeded.

--
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph


Doesn't it also rely on the system clock as well?


Ash
www.ashleysheridan.co.uk



No. When I give a fixed seed to mt_srand(), each time I get the same
sequence of mt_rand()s. My question is wheather the actual algorithm
behind these functions is likely to change in the next version of PHP
or not.
Janek


why not give us your code and expected results, a few of us can run  
it on our various php installs and post back the results.


No other way to find out for sure!


On the contrary... find the implementation for that function in the  
PHP source code and check the complete CVS history to see if its ever  
changed. That's the only way you'll know for sure.


Personally I wouldn't bother. It will be easier and safer to find the  
code, port it to PHP and use that instead. That way it's your code,  
you control it and you can *know* it's not going to change regardless  
of PHP version.


-Stut

--
http://stut.net/

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



Re: [PHP] mt_rand() - the same forever?

2008-10-06 Thread Nathan Rixham

Janek wrote:

On Sun, Oct 5, 2008 at 10:05 PM, Ashley Sheridan
<[EMAIL PROTECTED]> wrote:

On Sun, 2008-10-05 at 21:57 +0200, Janek wrote:

I know, but I *want* to seed it. My goal is to have a fixed
pseudorandom sequence for each integer (seed) and I don't want those
sequences to change regarding PHP version.

Janek

On Sun, Oct 5, 2008 at 9:52 PM, Richard Heyes <[EMAIL PROTECTED]> wrote:

I wonder whether I can rely on the stability of mt_srand() and
mt_rand(). I want them to generate the same sequence for a fixed seed,
regardless of PHP version. Do you think I can trust it?
Janek

Keep in mind (if you're not already) that mt_rand() doesn't
technically need to be seeded.

--
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph


Doesn't it also rely on the system clock as well?


Ash
www.ashleysheridan.co.uk




No. When I give a fixed seed to mt_srand(), each time I get the same
sequence of mt_rand()s. My question is wheather the actual algorithm
behind these functions is likely to change in the next version of PHP
or not.

Janek


why not give us your code and expected results, a few of us can run it 
on our various php installs and post back the results.


No other way to find out for sure!

--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

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



Re: [PHP] Best Search Algorithm for Millions of record

2008-10-06 Thread Nathan Rixham

Stut wrote:

On 6 Oct 2008, at 07:17, Hemant Patel wrote:

My question is Whether I should go for Full Text Based search or Database
Search...?And is there algorithm in php which can help me in this 
case...?


I can fully recommend Sphinx Search: http://sphinxsearch.com/. It's not 
as easy to implement as a full-text index but the power and flexibility 
you get are well worth the effort.


-Stut



As a complete alternative apache solr is rather(very) good:
http://lucene.apache.org/solr/features.html

Regards

--
nathan ( [EMAIL PROTECTED] )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

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



Re: [PHP] SESSION array problems [ANOTHER SOLUTION]

2008-10-06 Thread Yeti
register_globals has been deprecated as of PHP6.
So writing PHP code to work without global registering not just
prevents variable poisoning, it also increases the life span of your
scripts.
I still wonder if using
php_flag register_globals off
in .htaccess might affect servers running PHP4 and using safe mode as in ...
http://forum.mamboserver.com/showthread.php?t=44514

A yeti

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



Re: [PHP] Best Search Algorithm for Millions of record

2008-10-06 Thread Stut

On 6 Oct 2008, at 07:17, Hemant Patel wrote:
My question is Whether I should go for Full Text Based search or  
Database
Search...?And is there algorithm in php which can help me in this  
case...?


I can fully recommend Sphinx Search: http://sphinxsearch.com/. It's  
not as easy to implement as a full-text index but the power and  
flexibility you get are well worth the effort.


-Stut

--
http://stut.net/

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



Re: [PHP] Best Search Algorithm for Millions of record

2008-10-06 Thread Micah Gersten
The question is, what are you searching for in the records?

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Hemant Patel wrote:
> My question is Whether I should go for Full Text Based search or Database
> Search...?And is there algorithm in php which can help me in this case...?
>
>   

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