[PHP] ArrayObject - Posibillity to add key = value pair per default?

2009-01-14 Thread Edmund Hertle
Hey, I've just discovered the ArrayObject class, but it seems to not be well documented, so here is my problem: You can use ArrayObject::append() to add a new value to the array, but is there also a method to add a new key and value? And I know that I could extend the class and write my own

Re: [PHP] Re: ArrayObject - Posibillity to add key = value pair per default?

2009-01-14 Thread Edmund Hertle
Edmund Hertle schrieb: Hey, I've just discovered the ArrayObject class, but it seems to not be well documented, so here is my problem: You can use ArrayObject::append() to add a new value to the array, but is there also a method to add a new key and value? And I know that I could extend

Re: [PHP] PHP, Smarty, and Text

2009-01-14 Thread Edmund Hertle
Robert Cummings wrote: On Tue, 2009-01-13 at 18:18 -1000, Daniel Kolbo wrote: Phpster wrote: What about stripping out all the 'nuances' and just reducing it to just the text where you then control the display and using your templates and css? Bastien Sent from my iPod On Jan 13,

Re: [PHP] Basic Authentication

2009-01-14 Thread Edmund Hertle
2009/1/14 tedd tedd.sperl...@gmail.com What it is depends on what encryption routines you have installed. The algorithm to authenticate detects the algorithm based on the hash. 32-char : MD5 $1$ : SHA-1 $2$ : SHA-2 etc. (Apologies if I got my tokens/algorithms wrong) If you

Re: [PHP] Basic Authentication

2009-01-14 Thread Edmund Hertle
2009/1/15 tedd tedd.sperl...@gmail.com At 2:19 PM -0600 1/14/09, Shawn McKenzie wrote: As others have said, use crypt(). http://php.net/manual/function.crypt.php has Example #2 Using crypt() with htpasswd. Thanks, but that doesn't really solve my problem. You see, I know the password

[PHP] Parsing HTML href-Attribute

2009-01-15 Thread Edmund Hertle
Hey, I want to parse a href-attribute in a given String to check if there is a relative link and then adding an absolute path. Example: $string = 'a class=sample [...additional attributes...] href=/foo/bar.php '; I tried using regular expressions but my knowledge of RegEx is very limited. Things

Re: [PHP] To check for existing user in database

2009-01-15 Thread Edmund Hertle
2009/1/15 tedd tedd.sperl...@gmail.com At 9:46 AM -0800 1/15/09, Chris Carter wrote: Chris: That's not the way I would do it. After establishing a connection with the database, I would use the query: $query SELECT email FROM owners WHERE email = '$emailAddress' : $result =

Re: [PHP] Parsing HTML href-Attribute

2009-01-16 Thread Edmund Hertle
* http://www.google.com/search?q=php ... absolute path (yes, it's a URL, but treat it as absolute) * https://www.example.com/index.php ... absolute path (yes, it's a URL, but to the local server) * /index.php ... absolute path (no protocol given, true absolute path) * index.php ... relative

[PHP] How to use SVN + PHP

2009-01-19 Thread Edmund Hertle
Hey, I'm thinking about implementing Subversion to an existing php project for obvious reasons. But I have some trouble when thinking about the usage. Situation is: There are already 2 servers. One running the live/productive version and one for developing new features. Until now it works like:

[PHP] Re: How to use SVN + PHP

2009-01-19 Thread Edmund Hertle
2009/1/19 Nathan Rixham nrix...@gmail.com well the idea of svn is that should you find a problem you either rollback the file(s) to the good version (not rollback the whole site) or you commit updated files with the fix, then redeploy. No need to branch or such like. Well, yes, of course

[PHP] Re: How to use SVN + PHP

2009-01-19 Thread Edmund Hertle
2009/1/20 Nathan Rixham nrix...@gmail.com you don't have to locally develop, you can develop however you want :) svn is just version controlling all your files to make it easier to team work and to rollback code. you then tag good versions of the code in svn so you have a permanent easy to

[PHP] Re: How to use SVN + PHP

2009-01-19 Thread Edmund Hertle
2009/1/20 Nathan Rixham nrix...@gmail.com a merge is something you do manually, most of the time you just commit (overwrite) and svn will log the lines of code that changed - sometimes when multiple people work on the site you get a conflict, both changed the same lines - this is when you

Re: [PHP] maybe we could all?

2009-01-19 Thread Edmund Hertle
2009/1/20 Nathan Rixham nrix...@gmail.com Project: PHP Common Objects and Datatypes method: for everybody who wishes to contribute, and for everybody to review, discuss and work on the same classes. what are they: classes we can all use, that have been discussed, reviewed and agreed

Re: [PHP] maybe we could all?

2009-01-19 Thread Edmund Hertle
2009/1/20 Nathan Rixham nrix...@gmail.com sounds good; (discussion begins) - but if we're all going to use them in production maybe we'd need to use say php 5.1.6 or the most common accross all os's and servers..? how many servers will have php 5.3 support from the off (think redhat servers!)

Re: [PHP] maybe we could all?

2009-01-19 Thread Edmund Hertle
2009/1/20 Nathan Rixham nrix...@gmail.com sounds like a starting point. and the starting point imho, interfaces and abstracts, then implementations. [can't wait for a discussion on the implementation of Email lmfao] can i gather that this is a postive response and a few interested parties?

Re: [PHP] session mysteriously killed

2009-01-20 Thread Edmund Hertle
2009/1/20 clive clive_li...@immigrationunit.com further to my last email, the bit of code that checks if the person is logged in looks something like this: if ( isset ( $_SESSION['loggedin'] ) ) { //check some other session variables } else { //log reason for logging the user

Re: [PHP] MySQL class. Thoughts?

2009-01-21 Thread Edmund Hertle
2009/1/21 Jay Moore jaymo...@accu-com.com This is a MySQL class I use and I wanted to get everyone's thoughts on how/if I can improve it. This is for MySQL only. I don't need to make it compatible with other databases. I'm curious what you all think. Thanks, Jay Hey, 1. You know the

Re: [PHP] About printing functions

2009-01-21 Thread Edmund Hertle
2009/1/21 Jason Pruim japr...@raoset.com On Jan 21, 2009, at 1:33 PM, Thodoris wrote: Hi gang, Lets say that you have a function that prints something to the output simply like this: function print_str() { print blah blah blah; } I was wondering if there is a way to use this

Re: [PHP] About printing functions

2009-01-21 Thread Edmund Hertle
2009/1/21 Thodoris t...@kinetix.gr On Jan 21, 2009, at 1:33 PM, Thodoris wrote: Hi gang, Lets say that you have a function that prints something to the output simply like this: function print_str() { print blah blah blah; } I was wondering if there is a way to use this output

Re: [PHP] Time Wrong

2009-01-21 Thread Edmund Hertle
2009/1/21 Gary gwp...@ptd.net Im pretty new with php, so this might be a pretty novice mistake, but the time displays wrong on two computers. ?php echo date('l F jS, o h i A');? Shows up 2 hours late...time on both computers is correct. Thanks Do you mean on two computers visiting a

Re: [PHP] Authentication by client certificate

2009-01-25 Thread Edmund Hertle
2009/1/23 Jesus Campos jesus...@cm-barcelos.pt Hi there, I would like to create a application that can be able to authenticate by client certificate. Can I make this by apache/php? Anyone can recomend me documantation? Thanks, JCampos http://www.php.net/unsub.php Hey, I do not really

Re: [PHP] Dirty Button

2009-01-25 Thread Edmund Hertle
2009/1/25 tedd t...@sperling.com Hi gang: I had a problem and solved it -- here's the write-up: http://www.webbytedd.com/b/update-select/index.php What do you think of the solution? Cheers, tedd http://www.php.net/unsub.php Hey, It does not work as described, because the button

Re: [PHP] Dirty Button

2009-01-25 Thread Edmund Hertle
2009/1/25 tedd tedd.sperl...@gmail.com At 1:02 PM -0500 1/25/09, Robert Cummings wrote: On Sun, 2009-01-25 at 12:55 -0500, tedd wrote: Hi gang: I had a problem and solved it -- here's the write-up: http://www.webbytedd.com/b/update-select/index.php What do you think of the

Re: [PHP] Re: Multiple queries in PHP

2009-01-26 Thread Edmund Hertle
2009/1/25 Ashley Sheridan a...@ashleysheridan.co.uk On Sun, 2009-01-25 at 15:07 -0600, Shawn McKenzie wrote: Ashley Sheridan wrote: Hi all, I've run into a bit of a problem. I put together a query using mysql variables in the form set @m:= 0; with the select that uses it directly

Re: [PHP] Updating time in php

2009-01-26 Thread Edmund Hertle
2009/1/26 Gary gwp...@ptd.net I have a small php snippet in a page that displays the time and date. Is there a way to have the time to update every minute so that it displays the correct time, andnot just the time that the page was loaded? Thanks Gary Hey Gary, because of how php works

Re: [PHP] Coding for email response forms

2009-01-26 Thread Edmund Hertle
2009/1/26 Tom obeli...@comcast.net Shawn McKenzie sh...@mckenzies.net wrote in message news:497e3ab9.2060...@mckenzies.net... Shawn McKenzie wrote: Tom Scott wrote: - Original Message - From: Shawn McKenzie nos...@mckenzies.net Newsgroups: php.general To:

Re: [PHP] Re: Multiple queries in PHP

2009-01-26 Thread Edmund Hertle
2009/1/26 Chris dmag...@gmail.com This extension does not have to be installed. If your server is running php5, then this extension is installed No it's not. The mysql extension no longer ships with php by default, you have to build it when you ./configure or install the external

Re: [PHP] Programming general question

2009-01-27 Thread Edmund Hertle
2009/1/28 Terion Miller webdev.ter...@gmail.com I googled this and didn't find an answer my question is how do you know when to use an object or array would an object just be 1 instance, and array is several things together ( I know infantile coder language I use..but I'm a baby still

Re: [PHP] Hidden costs of PHP arrays?

2009-01-27 Thread Edmund Hertle
2009/1/28 Clancy clanc...@cybec.com.au PHP arrays permit extremely concise programming; for example if I have all my contacts in an array $contacts, I can write: $my_phone_no = $contacts['clancy']['phone']; However it is clear that there must be a lot going on behind the scenes to achieve

Re: [PHP] help with require/includes pathing frustration

2009-01-28 Thread Edmund Hertle
2009/1/29 Daevid Vincent dae...@daevid.com At the very top of my login.php page I have this: ?php require_once('./includes/gui/gui_setup.inc.php'); ... ? (I've tried with and without the ./ prefix as if that might make a difference) When I try to load the URL:

Re: [PHP] Database Tables Relation Issue

2009-01-30 Thread Edmund Hertle
2009/1/30 Nitsan Bin-Nun nit...@binnun.co.il Hi there, I'm working on something similar to mailing list in which every registered user has the ability to create a mailing list and join others mailing lists. My users table is something like that (in short): CREATE TABLE IF NOT EXISTS

Re: [PHP] PHP Enclosing Tags? Do You Close Your PHP Declarations?

2009-01-30 Thread Edmund Hertle
2009/1/30 Eric Butera eric.but...@gmail.com On Fri, Jan 30, 2009 at 1:45 PM, Nitsan Bin-Nun nit...@binnun.co.il wrote: I was just wondering whether people enclosing their PHP tags declarations, I don't close these ?php tags just because the interpreter doesn't really needs them, and

Re: [PHP] Web Shop Management

2009-01-30 Thread Edmund Hertle
2009/1/30 Sancar Saran sancar.sa...@evodot.com Hello everyone, Maybe it was bit off topic. Recently we move our web server. Of course there where tons of WTF ??? So is there any kindof web based management system to handle. Web based projects. I'm looking for someting like this

Re: [PHP] Payment question in Canada

2009-01-30 Thread Edmund Hertle
2009/1/30 Bastien Koert phps...@gmail.com On Fri, Jan 30, 2009 at 2:11 PM, Ernie Kemp ernie.k...@sympatico.ca wrote: My question is one of pay; hope this is the correct forum. A couple of people have asked me to write some PHP code for their website backend. I need the

Re: [PHP] Coding for email response forms

2009-01-31 Thread Edmund Hertle
2009/1/30 Tom obeli...@comcast.net Shawn McKenzie nos...@mckenzies.net wrote in message news:47.36.08436.e8b80...@pb1.pair.com... Tom wrote: Clancy clanc...@cybec.com.au wrote in message news:c77vn4pri9tsbaqg9avv3i7dnfb8nvk...@4ax.com... On Mon, 26 Jan 2009 17:57:29 -0600,

[PHP] Includes only if required?

2009-02-02 Thread Edmund Hertle
Hey, normally I prefer to do all my includes (classes + config files) at the beginning if my php files. But recently I thought about including some classes only if they are needed later in my code (like pear Mail and Mail_mime only if an e-mail is about to be sent) because of speed issues. So my

Re: [PHP] Re: More questions about SESSION use

2009-02-02 Thread Edmund Hertle
2009/2/1 Terion Miller webdev.ter...@gmail.com This is how it was originally written: if (empty($_SESSION['AdminLogin']) || $_SESSION['AdminLogin'] != true){ header (Location: LogOut.php); $_SESSION['user']=$UserName; $_SESSION['AdminID']=$AdminID; --*I added this

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Edmund Hertle
2009/2/2 Robert Cummings rob...@interjinn.com On Tue, 2009-02-03 at 00:07 +1100, Gavin Hodge wrote: In Java / C# / C, $bool = $anotherBool; is shorthand for $bool = $bool $anotherBool; So = forces a reference assignment? No, = forces reference assignment. = works as you have

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Edmund Hertle
2009/2/2 Gavin Hodge gavin.ho...@gmail.com Hi, I'm fairly new to PHP, having migrated from the Java / C# world. I wrote some code similar to the following: $success = true; $success = operation1(); $success = operation2(); if ($success === true) { operation3(); // depends on 1 and

Re: [PHP] Re: Payment question in Canada

2009-02-02 Thread Edmund Hertle
2009/2/1 Michelle Konzack linux4miche...@tamay-dogan.net Am 2009-01-30 22:47:10, schrieb Edmund Hertle: Read this discussion. I think this will help you: http://marc.info/?t=12329898971r=1w=2 Address Not Found www.marc.info could not be found. Please check the name and try again

Re: [PHP] How can I do the opposite of property_exists(), maybe a creat_property() in PHP5?

2009-02-02 Thread Edmund Hertle
2009/2/3 Daevid Vincent dae...@daevid.com Is there a way to create a new property via PHP 5.2.4? I get a hash back from an authentication server. I'm not guaranteed that someone in another department won't add new key/values to the returned hash/array. I'm trying to work around that part

Re: [PHP] Clarity needed

2009-02-04 Thread Edmund Hertle
2009/2/4 tedd t...@sperling.com Hi gang: I need some fog removed. I have a problem where I have an unlimited number of tutors teaching an unlimited number of courses. When I call upon a tutor, I want to see all the courses they teach. In my old days, I would just set up a linked list of

[PHP] E-Mail Attachment Filename Encoding Problem

2009-02-16 Thread Edmund Hertle
Hey, my problem is that I send an e-mail with an attachment (pdf file). I get the filename out of a mysql table. While using echo or downloading the file, the filename is showed as expected but as an attachment it is not properly encoded: Should be: PC-Beschaffung 2008 (nur für Lehre) Will be:

Re: [PHP] E-Mail Attachment Filename Encoding Problem

2009-02-16 Thread Edmund Hertle
2009/2/16 Richard Heyes rich...@php.net Hi, my problem is that I send an e-mail with an attachment (pdf file). I get the filename out of a mysql table. While using echo or downloading the file, the filename is showed as expected but as an attachment it is not properly encoded:

Re: [PHP] E-Mail Attachment Filename Encoding Problem

2009-02-16 Thread Edmund Hertle
2009/2/16 Richard Heyes rich...@php.net I'm already using pear Mail_Mime. [Ducks and runs off] -- Richard Heyes HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari: http://www.rgraph.org (Updated February 14th) Can someone explain to me why pear mail_mime is not a good idea to

[PHP] User Authentication across multiple server

2009-03-06 Thread Edmund Hertle
Hey, I've got 2 server, both having the same authentication scripts and using the same database. My problems are: 1.: User logs in on server1 - trys to use a part of the site which is physically located on server2 - has to login again on server2 2.: There is a wiki on server2, which also depends