Re: [PHP] stream_socket_accept() on an SSL socket

2008-12-02 Thread German Geek
When you "talk" to an SSL server directly with sockets, I believe you need to implement the SSL protocol yourself, which would probably be overkill. There must be a PHP library which does or a native function. You should probably look at this page: http://nz.php.net/manual/en/wrappers.http.php and

Re: [PHP] Accessing the 'media' attribute in php

2008-12-02 Thread German Geek
PHP is a server side language... On Wed, Dec 3, 2008 at 2:16 PM, Clancy <[EMAIL PROTECTED]> wrote: > Is it possible to access the 'media' attribute from php, so (for > example) you can tailor a page for printing? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: h

Re: [PHP] Accessing the 'media' attribute in php

2008-12-02 Thread German Geek
it in php. > > Thank you for your help. > > On Wed, 3 Dec 2008 14:34:20 +1300, [EMAIL PROTECTED] ("German Geek") > wrote: > > >PHP is a server side language... > > > >On Wed, Dec 3, 2008 at 2:16 PM, Clancy <[EMAIL PROTECTED]> wrote: > > &g

Re: [PHP] IE8 and HTML5

2008-12-04 Thread German Geek
Recently, I installed IE8 beta 2 and whenever I start it, DEP comes in and says, this application is not secure... I haven't got it to run as yet. The reason I installed it was because a client reported problems with a web app written by me with IE8. Now I can't run IE altogether lol. Yeah, I knew

Re: [PHP] Will not report errors what can I do

2008-12-04 Thread German Geek
On Fri, Dec 5, 2008 at 4:26 PM, Robert Cummings <[EMAIL PROTECTED]>wrote: > On Thu, 2008-12-04 at 15:07 -0800, Jim Lucas wrote: > > Terion Miller wrote: > > > Hey everyone I am still fighting the same problem that my script isn't > > > working and its not reporting errors, when you click to "view"

Re: [PHP] Parsing Strings

2008-12-07 Thread German Geek
Why not preg_split ( http://nz.php.net/manual/en/function.preg-split.php ): $str = 'SCOTTSDALE, AZ 85254'; $ar = preg_split('/,? ?/', $str); //optional comma, followed by optional space // $ar = array('SCOTTSDALE', 'AZ', '85254'); On Sat, Dec 6, 2008 at 1:18 PM, Jason Todd Slack-Moehrle < [EMAIL

Re: [PHP] A MySQL Question

2008-12-07 Thread German Geek
EXIST? Yeah I certainly have seen it before in the result of a mysqldump, but from the top of my head, I probably wouldn't have known in exactly what context it is used. I've used MySQL for 5 years now and i think if you ask such a question, you don't know what you should be asking because the con

Re: [PHP] A MySQL Question

2008-12-07 Thread German Geek
On Mon, Dec 8, 2008 at 2:59 PM, Chris <[EMAIL PROTECTED]> wrote: > German Geek wrote: > >> EXIST? Yeah I certainly have seen it before in the result of a mysqldump, >> but from the top of my head, I probably wouldn't have known in exactly >> what >>

Re: [PHP] A MySQL Question

2008-12-07 Thread German Geek
On Mon, Dec 8, 2008 at 3:24 PM, Chris <[EMAIL PROTECTED]> wrote: > > And 'exists' is not for mysqldump. >> >> >> DROP TABLE IF EXISTS `mytable`; >> > > "if exists" can be used in lots of places other than "drop table", like > triggers, functions and i'm sure other things. > > I said, I've see

Re: [PHP] A MySQL Question

2008-12-07 Thread German Geek
On Mon, Dec 8, 2008 at 5:06 PM, Chris <[EMAIL PROTECTED]> wrote: > German Geek wrote: > >> >> >> On Mon, Dec 8, 2008 at 3:24 PM, Chris <[EMAIL PROTECTED] > [EMAIL PROTECTED]>> wrote: >> >> >> And 'exists

Re: [PHP] A MySQL Question

2008-12-07 Thread German Geek
On Mon, Dec 8, 2008 at 5:50 PM, Chris <[EMAIL PROTECTED]> wrote: > > Sorry, I couldnt find EXIST there, only EXISTS. >> >> >>If you're going to be that pedantic, "exist" isn't in mysqldump >>either :P >> >> I know it's pedantic, but unfortunately computers are strictly pedantic >>

Re: [PHP] A MySQL Question

2008-12-07 Thread German Geek
On Mon, Dec 8, 2008 at 7:06 PM, Chris <[EMAIL PROTECTED]> wrote: > > Right >> >> So, how are these different: >> >> SELECT * FROM t1 WHERE id EXISTS (SELECT id FROM t2) >> > > If there are *any* results for the subselect, the exists returns true. > > It's the equivalent of: > > select * from

Re: [PHP] Include directive..

2008-12-08 Thread German Geek
On Tue, Dec 9, 2008 at 12:47 AM, dele454 <[EMAIL PROTECTED]> wrote: > > Hi, > > I am modifying the apache config file on my domain to include the path to > the Zend Framework on a specified location outside the public folder. > > So in my http.conf file i simply include the path to where the inclu

Re: [PHP] Accounting component in PHP

2008-12-08 Thread German Geek
You can do raw SQL queries with ORM as well, at least in symfony ;). An ORM makes other, rather trivial queries a whole lot easier though and a framework like symfony makes development of generic requirements a lot faster and cleaner. On Tue, Dec 9, 2008 at 4:07 AM, altern <[EMAIL PROTECTED]> wrot

Re: [PHP] A MySQL Question

2008-12-08 Thread German Geek
On Tue, Dec 9, 2008 at 2:46 PM, Micah Gersten <[EMAIL PROTECTED]> wrote: > Robert Cummings wrote: > > On Tue, 2008-12-09 at 00:16 +, Nathan Rixham wrote: > > > >> Ashley Sheridan wrote: > >> > >>> On Mon, 2008-12-08 at 23:23 +, [EMAIL PROTECTED] wrote: > >>> > Presumable, the EXISTS s

Re: [PHP] A MySQL Question

2008-12-08 Thread German Geek
On Tue, Dec 9, 2008 at 3:51 PM, Micah Gersten <[EMAIL PROTECTED]> wrote: > German Geek wrote: > > On Tue, Dec 9, 2008 at 2:46 PM, Micah Gersten <[EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]>> wrote: > > > > Robert Cummings wrote: > >

Re: [PHP] Accounting component in PHP

2008-12-09 Thread German Geek
You can do raw queries also... Just makes trivial queries and your model (if you believe in modelling) easier to manage. Believe me, I thought like you did before using symfony. On Tue, Dec 9, 2008 at 10:52 PM, altern <[EMAIL PROTECTED]> wrote: > > All my queries are complex. If I will use ORM, t

Re: [PHP] A MySQL Question

2008-12-09 Thread German Geek
On Tue, Dec 9, 2008 at 10:49 PM, Yeti <[EMAIL PROTECTED]> wrote: > As a matter of fact, in space you can't even scream. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > I don't know if there is a "better" or "best" solution to this,

[PHP] pear Mail/Mime problem on new Ubuntu Linux server

2008-12-09 Thread German Geek
Hi All, Can someone think of a reason why when changing from a Windows 2003 Web Edition server running PHP 5.2 to a Ubuntu machine, also with PHP 5.2 can cause the following problem: The emails sent from the server, which should be in HTML format (the client wanted this specifically) now only sho

Re: [PHP] Re: file_exists and wildcard/regex

2008-12-09 Thread German Geek
On Wed, Dec 10, 2008 at 1:13 PM, Stut <[EMAIL PROTECTED]> wrote: > > On 9 Dec 2008, at 23:24, Daniel Kolbo wrote: > > Maciek Sokolewicz wrote: >> >>> Daniel Kolbo wrote: >>> What is the preferred method with php to test and see if a file [pattern] exists? For example, i only n

[PHP] usort for sorting an array of objects

2008-12-09 Thread German Geek
Hi Guys, I need to sort an array of objects. I found this ( at a url that didnt let me send this msg... ) and I would know how to do it, but I believe there might be a cleaner, more elegant way to do it. In Java, you just need to implement the interface Comparable and provide a method called compa

Re: [PHP] usort for sorting an array of objects

2008-12-10 Thread German Geek
On Wed, Dec 10, 2008 at 10:27 PM, Stut <[EMAIL PROTECTED]> wrote: > On 10 Dec 2008, at 04:15, German Geek wrote: > >> I need to sort an array of objects. I found this ( at a url that didnt let >> me send this msg... ) and I would know how to do it, but I believe there >

Re: [PHP] usort for sorting an array of objects

2008-12-10 Thread German Geek
On Thu, Dec 11, 2008 at 6:43 AM, Robert Cummings <[EMAIL PROTECTED]>wrote: > On Thu, 2008-12-11 at 01:31 +1300, German Geek wrote: > > On Wed, Dec 10, 2008 at 10:27 PM, Stut <[EMAIL PROTECTED]> wrote: > > > > > On 10 Dec 2008, at 04:15, German Geek wrote: >

Re: [PHP] usort for sorting an array of objects

2008-12-10 Thread German Geek
On Thu, Dec 11, 2008 at 12:28 PM, <[EMAIL PROTECTED]> wrote: > > > Inefficiency for me is when it takes longer to code. > > How long can this take? That's why i like PHP. It's very quick to do stuff in, even if arrays are not always the ultimate data structure, they're easy to handle with all the

Re: [PHP] Can GD make a JPG thumbnail of a PDF?

2008-12-10 Thread German Geek
On Thu, Dec 11, 2008 at 1:59 PM, Stephen Johnson <[EMAIL PROTECTED] > wrote: > I think you want something like this : > exec("convert -density 360x360 -enhance $pdfFile $pdfFile.gif"); > Yes, that's how i did it here. Didn't find a better solution yet. Was looking at the php module for imagemagic

Re: [PHP] Re: converting a vid with ffmpeg - howto do progress bars?

2008-12-10 Thread German Geek
On Thu, Dec 11, 2008 at 1:53 PM, Rene Veerman <[EMAIL PROTECTED]> wrote: > Colin Guthrie wrote: > >> 'Twas brillig, and Rene Veerman at 10/12/08 23:03 did gyre and gimble: >> >>> Well, nowhere can i find the frame count being printed, but there _is_ a >>> duration: hh:mm:ss:ms field outputted, and

Re: [PHP] Re: converting a vid with ffmpeg - howto do progress bars?

2008-12-10 Thread German Geek
On Thu, Dec 11, 2008 at 2:27 PM, Rene Veerman <[EMAIL PROTECTED]> wrote: > German Geek wrote: > >> On Thu, Dec 11, 2008 at 1:53 PM, Rene Veerman <[EMAIL PROTECTED]> [EMAIL PROTECTED]>> wrote: >> >>Colin Guthrie wrote: >> >>'Tw

Re: [PHP] array_intersect question

2008-12-10 Thread German Geek
On Tue, Dec 2, 2008 at 11:06 PM, Andrej Kastrin <[EMAIL PROTECTED]>wrote: > It works like a charm. > > Thanks, Andrej > > Tim | iHostNZ wrote: > >> I know there must be a more elegant way with array_reduce or something, >> but >> I would simply write a function called >> >> function array_intersec

Re: [PHP] Need help on MySQL query

2008-12-10 Thread German Geek
On Thu, Dec 11, 2008 at 4:52 PM, Rahat Bashir <[EMAIL PROTECTED]>wrote: > Hi Experts, > > EID Mubarak to all. > > I need your help on writing a MySQL query. > > Scenario: > > CREATE TABLE transaction > ( > `id` int NOT NULL ATUTO INCREMENT, > `date` datetime NOT NULL, > `withdrawn` double (12,2)

Re: [PHP] how to not show login info in the url ...what am I looking for?

2008-12-11 Thread German Geek
On Fri, Dec 12, 2008 at 7:03 AM, tedd wrote: > At 11:23 AM -0500 12/11/08, Robert Cummings wrote: > >> On Thu, 2008-12-11 at 11:05 -0500, tedd wrote: >> > When I say "Hack a site" I mean to do something to get the site to >> >>> provide an unintended result as expected by the author. >>> >>>

Re: [PHP] Need a brain to bounce some Mysql/DB thoughts off of!!

2008-12-11 Thread German Geek
This list seems to be turning into a MySQL list with a few PHP questions... Tim-Hinnerk Heuer http://www.ihostnz.com On Fri, Dec 12, 2008 at 1:53 PM, bruce wrote: > Hi guys. > > Architecting an app that's going to have users interacting with different > levels of the db/tbls, and trying to fig

Re: [PHP] Need a brain to bounce some Mysql/DB thoughts off of!!

2008-12-11 Thread German Geek
s... the season of giving and tolerance :| > > > On Fri, 2008-12-12 at 13:56 +1300, German Geek wrote: > > This list seems to be turning into a MySQL list with a few PHP > questions... > > Tim-Hinnerk Heuer > > > > http://www.ihostnz.com > > > > > &g

Re: [PHP] php client

2008-12-14 Thread German Geek
On Mon, Dec 15, 2008 at 11:07 AM, Stephen wrote: > idan72 wrote: > >> Hi, >> >> I am new to PHP. >> I want to write a web client in PHP that will data to a server written in >> Java. >> I want that the client will send an object to the server. > > Don't know if that would be easy in PHP. I presum

Re: [PHP] Good PHP book?

2008-12-14 Thread German Geek
The best book is php.net, if you already know a programming language ;-). Otherwise Ashley is probably right. I haven't read any books on php, got all the info off the web, but it's still my main language atm. Tim-Hinnerk Heuer http://www.ihostnz.com On Mon, Dec 15, 2008 at 11:48 AM, Ashley She

Re: [PHP] Chrome 1.0 released

2008-12-14 Thread German Geek
Conspiracy against M$? I thought they were conspiring against the world :-) Tim-Hinnerk Heuer http://www.ihostnz.com On Mon, Dec 15, 2008 at 2:22 PM, Yeti wrote: > It more and more seems like a conspiracy against M$ to me. A company > trying to make up its own standards every once in a while,

Re: [PHP] Create unique non-autoincrement key for 700,000 records?

2008-12-15 Thread German Geek
If i had to guess, it would be the column/field in the table that has the autoincrement value. Tim-Hinnerk Heuer http://www.ihostnz.com On Tue, Dec 16, 2008 at 5:29 PM, Rob Gould wrote: > > > update mytable set hash_field = md5(AutoIdField + unix_timestamp()) > > I _think_ I understand that -

Re: [PHP] SimpleXML - issue with getting data out of the object returned

2008-12-18 Thread German Geek
Tim-Hinnerk Heuer http://www.ihostnz.com On Fri, Dec 19, 2008 at 3:50 PM, Dan Joseph wrote: > Hi, > > I have a basic XML document that I am grabbing with > simplexml_load_string(), > here is the print_r: > > SimpleXMLElement Object > ( >[Package] => SimpleXMLElement Object >( >

Re: [PHP] Variable as an index

2008-12-21 Thread German Geek
$users is an array and you are trying to simply put it in a string. $x seems to be undefined ergo it's not printing anything. If 'U' is the index in the array for your variable, use the '.' operator to concatenate strings: echo " '" . $users[$x]['U'] ."' "; Tim-Hinnerk Heuer http://www.

Re: [PHP] Variable as an index

2008-12-21 Thread German Geek
://www.ihostnz.com On Mon, Dec 22, 2008 at 11:12 AM, Marc Steinert wrote: > German Geek schrieb: > >> Why is the first method faster and uses less memory? >> >> >> > Because the concatenation operator first reassembles a new string, stores > it in memory then passes t

Re: [PHP] Variable as an index

2008-12-21 Thread German Geek
Why is the first method faster and uses less memory? Tim-Hinnerk Heuer http://www.ihostnz.com On Mon, Dec 22, 2008 at 10:59 AM, Marc Steinert wrote: > MikeP schrieb: > >> I have tried putting the quotes all over and all I get is: >> 'Array[U]'. >> >> >> > Try to avoid accessing the two-dimens

Re: [PHP] Variable as an index

2008-12-21 Thread German Geek
Yes, i agree with this. Even if it takes a few nano seconds more to write out more understandable code, it's worth doing it because code management is more important than sqeezing out the last nano second. And then also an $var = "Hello"; echo "$val World"; has less characters than and is more rea

[PHP] shell_exec seems to hang other web requests while running convert

2008-12-22 Thread German Geek
Hi All, The following problem: Our client is converting pdfs to images with a web interface. At the moment I'm using convert from imagemagick with shell_exec (i know i could use the imagick module, but this would require quite a bit of recoding and time at the moment, it was originally running on

Re: [PHP] shell_exec seems to hang other web requests while running convert

2008-12-22 Thread German Geek
08 at 9:06 PM, German Geek wrote: > >> Hi All, >> >> The following problem: >> >> Our client is converting pdfs to images with a web interface. At the >> moment >> I'm using convert from imagemagick with shell_exec (i know i could use the >>

Re: [PHP] More microptimisation (Was Re: [PHP] Variable as an index)

2008-12-22 Thread German Geek
agree, ++$i wont save u nething, it just means that the variable is incremented after it is used: $i = 0; while ($i < 4) echo $i++; will output 0123 while $i = 0; while ($i < 4) echo ++$i; will output 1234 Tim-Hinnerk Heuer http://www.ihostnz.com On Tue, Dec 23, 2008 at 7:25 PM, Nathan Nob

Re: [PHP] shell_exec seems to hang other web requests while running convert

2008-12-23 Thread German Geek
r thoughts though. Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com On Tue, Dec 23, 2008 at 7:41 PM, Nathan Nobbe wrote: > On Mon, Dec 22, 2008 at 11:34 PM, German Geek wrote: > >> cron is a good idea, havent thought about that. One could use the nice >> program then to

Re: [PHP] More microptimisation (Was Re: [PHP] Variable as an index)

2008-12-23 Thread German Geek
oops, yes of course lol Tim-Hinnerk Heuer http://www.ihostnz.com On Tue, Dec 23, 2008 at 7:43 PM, Lars Torben Wilson wrote: > 2008/12/22 German Geek : > > agree, ++$i wont save u nething, it just means that the variable is > > incremented after it is used: > > You meant &q

Re: [PHP] eof bof in php

2008-12-23 Thread German Geek
Totally agree. Whenever i can i put html outside of php tags mainly because the code gets more readable because in eclipse u get syntax highlighting etc. Tim-Hinnerk Heuer http://www.ihostnz.com On Wed, Dec 24, 2008 at 4:13 AM, tedd wrote: > At 2:21 PM -0500 12/22/08, Anthony Gentile wrote: >

[PHP] MERRY XMAS

2008-12-23 Thread German Geek
Merry xmas to everyone! Thanks for the support and fun discussions. Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com

[PHP] PHP Linux/Windows Outlook 2003 HTML email problem

2009-02-01 Thread German Geek
Hi All, We've got a problem with our Ubuntu Linux machine sending HTML emails to Outlook 2003: It's an Ubuntu Server (uname -a Linux CDR2-221 2.6.24-19-server #1 SMP Wed Jun 18 15:18:00 UTC 2008 i686 GNU/Linux) with the newest version of Postfix installed as the Mail server. Unfortunately, all

Re: [PHP] PHP Linux/Windows Outlook 2003 HTML email problem

2009-02-02 Thread German Geek
It seems like this solves the issue: http://pear.php.net/bugs/bug.php?id=12032 Sorry, just hadn't found this before. Tim-Hinnerk Heuer http://www.ihostnz.com On Mon, Feb 2, 2009 at 7:24 PM, Chris wrote: > German Geek wrote: > >> Hi All, >> >> We've got a pro

Re: [PHP] Sometime the code works and sometimes doesn't

2009-02-05 Thread German Geek
I would also suggest that you hash the passwords at least (better even with a salt value) and then reset the password to something random before sending it to the user. Email can be sniffed relatively easily and this would expose a possible carefully chosen password by the user and then they have t

Re: [PHP] function_exists question

2009-02-05 Thread German Geek
Why can't you update to Version 5? I might be a bit anal about trying to always get the newest version of everything, but seriously version 3 has surely more known security issues as well as performance costs. What's the cost of upgrading compared to the cost of writing code that works in every ve

Re: [PHP] German characters Ö,Ä etc. show up as ?

2009-02-05 Thread German Geek
Do they show up as ? just in the web page or in the source returned? Did you check the source of the page? I had this problem before and as far as i remember, i just needed to encode them like oe (have an american keyboard ;-) ö etc. If it's a literal ? in the source, it's PHP and you might need to

Re: [PHP] How can I use a function's default arguments but change one of the end ones in the list?

2009-02-05 Thread German Geek
I've thought about this problem before but couldn't think of a solution either. How does func_get_args() solve this? You could make a wrapper function without that. How would u (php) know which parameter u mean in a particular case? I think it would just be useful to have an IDE that can write ou

Re: [PHP] Question about version control.. sorta..

2009-02-05 Thread German Geek
I use GIT and Subversion. Subversion is still a bit hard to use (branching etc) and not distributed but that was before i knew about GIT :-P. You have a central repository that you need to commit to and it's still quite CVS like (which is really confusing and horrible). GIT is nice and fast and al

Re: [PHP] Session variables

2009-02-06 Thread German Geek
The session data is stored on the server. In the user's browser, only a session cookie is stored, usually a random session id string. I could never retrieve the session variables with any browser tools, always only with PHP by echoing them out or something. Also, a cookie is simply a text file with

Re: [PHP] Session variables

2009-02-07 Thread German Geek
Yeah i guess the cookie doesn't need to be stored on the server since it's in the header anyway. Thanks for clearing that up. Tim-Hinnerk Heuer http://www.ihostnz.com Charles M. Schulz - "I love mankind; it's people I can't stand." 2009/2/7 Stuart > 2009/2/7 Paul M Foster : > > I'm not too c

Re: [PHP] Re: move_uploaded_file() problem

2009-02-07 Thread German Geek
make sure the permissions on the folders are right, so at least read for the httpd in the tmp folder and write in the destination folder. since its moving i would make them both writeable to the webserver daemon user. permissions can be annoying are necessary though... They caught me quite a few ti

Re: [PHP] PHP OOP

2009-02-10 Thread German Geek
A loosely typed language like PHP might not be the best choice for teaching OOP, because even though PHP makes it easier with loose types, you should know about them and how they are stored etc. PHP is a great language but maybe not strict enough for students to understand all the errors that can

[PHP] (Perl) Regular Expressions - oposite match or get the non-matches of a substring

2009-02-10 Thread German Geek
Hi all, I consider myself quite good with Regular Expression, but i could never find out how to match something like: "match this but not this and that" so i would like to match the first "match this" (or "another this") but not "not this". Seems pretty straight forward but i haven't found a (g

Re: [PHP] Re: Looking for some PHP OO programming guides

2009-02-10 Thread German Geek
I try to avoid nesting loops altogether if possible. Usually dont go beyond 3 levels of nesting... How can you require 8 levels of nesting? surely there must be something wrong or a more efficient algorithm... Tim-Hinnerk Heuer http://www.ihostnz.com Garry Shandling - "I'm dating a woman now who

Re: [PHP] Simple open source CMS as a starting point

2009-02-12 Thread German Geek
Drupal is probably not the easiest at first, but has a good API and buckets full of modules, themes and all that stuff. If a framework would be what you are looking for, i would recommend Symfony. Also heard good things about eZ Publish, Textpattern, Typo3, Website Baker and WordPress. You can find

Re: [PHP] Happy 1234567890 day!

2009-02-13 Thread German Geek
It's not the 1234567890th day! Its the 12345Gmail - [PHP] Happy 1234567890 day! - th.he...@gmail.com 67890 second since beginning of 1970: 2009-02-14 12:31:30 is the result of $a = 1234567890;// * 60*60*24; die(date("Y-m-d H:i:s", $a)); Anyway happy 1234567890 second to all of you, although i'm

[PHP] for the security minded web developer - secure way to login?

2009-02-14 Thread German Geek
Hi All, A few months ago it came to my mind, that it might be possible to make non-https session (reasonably) secure by at least not letting people login that shouldn't because they might have sniffed the password from a user. Please let me know if you can find a loop hole in this process. I think

Re: [PHP] [Fwd] How to make a secured login form

2009-02-14 Thread German Geek
Have a look at my post called "for the security minded web developer - secure way to login?". It seems like a similar idea with less overhead. Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com Joan Rivers - "Never floss with a stranger." 2009/2/14 Virgilio Quilario > > I have secured the

Re: [PHP] Execute EXE with variables

2009-02-14 Thread German Geek
Hi, I've had a lot of problems with shell_exec too. Mostly it was permissions or environment variables not being set. i dont know if there is a way to set environment variables in the php.ini but if not you can set them with shell_exec as well, at least on unix it works. You can simply concatenate

Re: [PHP] list all constitute group of array ?

2009-02-14 Thread German Geek
Do you want exactly that list or simply all the possible combinations? If you want all possible combinations, search for a permute or permutation function in php... Does sound like homework lol. :-) Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com Alanis Morissette - "We'll love you just

Re: [PHP] for the security minded web developer - secure way to login?

2009-02-14 Thread German Geek
Hi gang, Was just thinking of a cheap solution for sites that don't require absolute security. A SSL cert cost about $150 a year. Sites like facebook could use this... Of course it's not for banks etc. You could degrade gracefully when javascript is turned off to just sending the form and checkin

Re: [PHP] for the security minded web developer - secure way to login?

2009-02-15 Thread German Geek
OK, i hear about this self signed certificate. Whenever i signed anything it just came up with all these warnings in FF which confuses users and i think is not good at all. Can someone paste a link in here to a website with a self signed cert please? Would like to see if there are any warnings etc.

Re: [PHP] for the security minded web developer - secure way to login?

2009-02-15 Thread German Geek
t is so expensive? Is it maybe just the hassle of setting it up? Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com Fred Allen - "California is a fine place to live - if you happen to be an orange." 2009/2/16 Michael A. Peters > German Geek wrote: > >> OK, i hear a

Re: [PHP] Re: Sorting times

2009-02-15 Thread German Geek
The easiest would probably to use http://nz.php.net/manual/en/function.strnatcmp.php . It would happen to sort it the right way because am is before pm ;-). You can of course make it more challenging by converting it into a timestamp etc. That would be better if you want to sort by date as well et

Re: [PHP] Re: Sorting times

2009-02-15 Thread German Geek
ornia is a fine place to live - if you happen to be an orange." 2009/2/16 Mattias Thorslund > German Geek wrote: > >> The easiest would probably to use >> http://nz.php.net/manual/en/function.strnatcmp.php . It would happen to >> sort >> it the right way

Re: [PHP] Back to Basics - Re: [PHP] Re: for the security minded web developer - secure way to login?

2009-02-16 Thread German Geek
rough POST, handle results */ ) > } > > > PHP, on receiving the login form data: > > // walk through all the records in users table, for each, calculate: >user_hash = onewayHash ( users[user_id].user_login_hash + challenge > ); >pass_hash = onewayHash

Re: [PHP] Re: Sorting times (SOLVED before tedds crappy SOLVED)

2009-02-16 Thread German Geek
Remember we have copy-on-write in PHP. Beat this :P : Tim-Hinnerk Heuer http://www.ihostnz.com Fred Allen - "California is a fine place to live - if you happen to be an orange." 2009/2/16 Jochem Maas > Shawn McKenzie schreef: > > Shawn McKenzie wrote: > > ... > > >>> Not tested: > > no shit

Re: [PHP] Full versus relative URLs

2009-02-16 Thread German Geek
Should be the same as the dns request is cached and a request needs to be made anyway. You could argue that relative URLs are less secure, but i cannot really see why. Well i guess someone can easier steal your source but it doesnt get much harder with absolute URLs. Tim-Hinnerk Heuer http://www

Re: [PHP] Apache odd behavior

2009-02-16 Thread German Geek
Symfony uses exactly this method for pretty urls. Check it out. Maybe it has everything you want :). Have a look at symfony's .htaccess rewrite rules at least. You have a few possibilities here: You can make ur own rewrite for urls that contain index.php or rewrite http://mysite.com/alfa/bravo/char

Re: [PHP] Back to Basics - Re: [PHP] Re: for the security minded web developer - secure way to login?

2009-02-16 Thread German Geek
you happen to be an orange." 2009/2/17 Jason Pruim > > On Feb 16, 2009, at 6:11 AM, German Geek wrote: > > Brilliant. Someone who understood my intentions :) It's not only a good >> exercise but also useful. Once done in PHP and various JS frameworks, we >> cou

Re: [PHP] Re: for the security minded web developer - secure way to login?

2009-02-16 Thread German Geek
But maybe worth a thought. regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com Alanis Morissette - "We'll love you just the way you are if you're perfect." 2009/2/17 Colin Guthrie > 'Twas brillig, and Michael A. Peters at 16/02/09 00:10 did gyre and gimble: >

Re: [PHP] Full versus relative URLs

2009-02-16 Thread German Geek
Tim-Hinnerk Heuer http://www.ihostnz.com Mike Ditka - "If God had wanted man to play soccer, he wouldn't have given us arms." 2009/2/17 Paul M Foster > On Mon, Feb 16, 2009 at 07:39:29PM +0200, Thodoris wrote: > > > > >> Here's a question related to my last post. When specifying a link in a >

Re: [PHP] Opinions Please, Describing PHP as Web Framework of C and C++

2009-02-16 Thread German Geek
I thought its an interface as in Common Gateway Interface. :-P You are right it isn't a specific connection to C. CGI can basically be used with any language. A protocol to me is something like TCP/IP or http etc. Like a language between a network of nodes. Tim-Hinnerk Heuer http://www.ihostnz.

[PHP] shell_exec - asynchronous would be cool!

2009-02-18 Thread German Geek
Hi all, A while ago, i had a problem with shell_exec: I was writing some code to execute imagemagick to convert a bunch of images. This could take ages to execute and the page therefore ages to load. The solution was to get a linux box and append a & at the end to do it in the background or make

Re: [PHP] shell_exec - asynchronous would be cool!

2009-02-18 Thread German Geek
com George Burns - "I would go out with women my age, but there are no women my age." 2009/2/19 Ashley Sheridan > On Thu, 2009-02-19 at 10:30 +1300, German Geek wrote: > > Hi all, > > > > A while ago, i had a problem with shell_exec: > > > > I was

Re: [PHP] Accessors

2009-02-19 Thread German Geek
It's not a bad idea but usually having accessor and mutator methods are used to validate the data first before writing it to the properties. If you don't have validation, you might as well set them directly and make them public and don't really need a generic setter/getter method. Although, this w

[PHP] XML -> XSLT transformation using XSLTProcessor class

2009-02-20 Thread German Geek
Hi All, We are trying to import some xml data into the database. My idea was to make an xslt and then transform the xml to php code which generates the queries necessary and then gets evaled as php code for the actual import... Anyway, i got it working (mostly)! But i need to get the current ele

Re: [PHP] XML -> XSLT transformation using XSLTProcessor class

2009-02-20 Thread German Geek
hostnz.com Bill Watterson - "There is not enough time to do all the nothing we want to do." 2009/2/21 Boyd, Todd M. > > -Original Message- > > From: th.he...@gmail.com [mailto:th.he...@gmail.com] On Behalf Of > > German Geek > > Sent: Friday, Februa

Re: [PHP] Re: mysql_real_escape_string("asdasddas") ??? wtf

2009-02-21 Thread German Geek
Ah, ic. Mh, why wouldn't a function like that function without a db connection? Does it use the db? Isn't that less efficient? I might just use str_replace, because i can't think of any way that one could get a sql injection into str_replace("'", "\\\'", $value); // might need to replace a literal

[PHP] headers: setting right for browser to force reload at a certain point in time

2009-02-23 Thread German Geek
Hi All, We have an application that generates dynamic ebooks. One of the (minor) problems (but yet annoying) is that when a user comes back to an ebook, they have to actually delete the cache and reload the page to not get the cached version which might be wrong because the content or even the fla

Re: [PHP] headers: setting right for browser to force reload at a certain point in time

2009-02-23 Thread German Geek
t;If two wrongs don't make a right, try three." 2009/2/23 Per Jessen > German Geek wrote: > > > Hi All, > > > > We have an application that generates dynamic ebooks. One of the > > (minor) problems (but yet annoying) is that when a user comes back to &

Re: [PHP] headers: setting right for browser to force reload at a certain point in time

2009-02-23 Thread German Geek
2009/2/23 Per Jessen > German Geek wrote: > > > Yes, that's what i thought, but with my FF 3.0 the resources > > (swf,png,jpg) don't get reloaded. I have to reload the page (after > > deleting cache). > > > > Something to do with the Apache config

Re: [PHP] adding whitespace to a timestamp

2009-02-23 Thread German Geek
Maybe the issue is that you are displaying the output in a browser and spaces are not shown. Try puttung   instead of a literal space. Tim-Hinnerk Heuer http://www.ihostnz.com Henny Youngman - "When I told my doctor I couldn't afford an operation, he offered to touch-up my X-rays." 2009/2/24 A

Re: [PHP] www.soongy.com

2009-03-01 Thread German Geek
Also check this one out: google uses it in gmail: http://code.google.com/p/jquery-multifile-plugin/downloads/detail?name=multiple-file-upload.zip&can=2&q= Cheers, Tim Tim-Hinnerk Heuer http://www.ihostnz.com Groucho Marx - "I have had a perfectly wonderful evening, but this wasn't it." 2009/3/2

Re: [PHP] 0.T Java IDE

2009-03-03 Thread German Geek
Give the free eclipse a go. If you need an easy to use gui editor IBM Websphere (which is also based on Eclipse): http://www-01.ibm.com/software/websphere/ Eclipse is great, has PDT (PHP Development Tools) too... Regards, Tim Tim-Hinnerk Heuer http://www.ihostnz.com Dick Cavett - "If your pare

[PHP] Fwd: catching up

2009-04-16 Thread German Geek
just in case/tim(e). Yes its me :) Tim-Hinnerk Heuer http://www.ihostnz.com Mitch Hedberg - "I drank some boiling water because I wanted to whistle." -- Forwarded message -- From: Tim | iHostNZ Date: 2009/4/17 Subjec

Re: [PHP] array manipulation

2009-04-16 Thread German Geek
soln: YOU NEED A 2 WEEK HOLLIDAY at least! You need to learn to say no. Tim-Hinnerk Heuer http://www.ihostnz.com Samuel Goldwyn - "A wide screen just makes a bad film twice as bad." 2009/4/17 PJ > The more I get into arrays, the l

Re: [PHP] pup

2009-04-16 Thread German Geek
>From What i learned, yes you can write pup here. Does anyone print this mailing list? wtf?? i keep overestimating people's intelligence, im sorry! Tim-Hinnerk Heuer http://www.ihostnz.com Charles de Gaulle - "The better I get to

Re: [PHP] Sorting times (SOLVED)

2009-05-15 Thread German Geek
Just a draft i thought should not go unnoticed on the list :-) just cleaning up. OK, How about a super efficient soln where each string is only converted once and a fast sorting algorithm is used: http://www.ihostnz.com Fred Allen - "California is a fine place to live - if you happen to be an or

Re: [PHP] Script to Compare Database Structures

2009-07-31 Thread German Geek
have you tried mysqldiff? ++Tim Hinnerk Heuer++ http://www.ihostnz.com (should be .org) Sponsors welcome to put ads under a linked to page. This is not automated just yet. Only image, swf or preferably text or short html ads, no animations please. Price negotiable. 2009/8/1 Matt Neimeyer > I

Re: [PHP] Searching on AlphaNumeric Content Only

2009-09-02 Thread German Geek
Hi, It's definitely possible to do when you do it in PHP, but not sure about on the database side. You could read all records into memory and then iterate over it with something like: $toSearch = "4D24487PS" $charsToIgnore = array('-','+',...); foreach ($items as $k=>$item) { $itemVal = str_re

Re: [PHP] File To Blob Corruption

2009-11-14 Thread German Geek
Hi, Could it have something to do with an eof character being encoded or something like that? Do you really need to store the files in the DB? It uses more processing power if stored in the DB because on retrieval, you have to unescape the string and return it. Modern filesystems are optimised bett

Re: [PHP] uniqid() and repetition of numbers generated

2009-11-14 Thread German Geek
2009/11/14 tedd > A > Interesting thought. My idea on this is to use the approach used when replicating a DB. It is similar to the namespace idea if not the same: Say you have 3 databases, you could use mod 3 numbers for A=0, B=1 and C=2 So on A you would have 0, 3, 6, 9, ... on B 1, 4, 7, 10,

  1   2   >