[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

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

2009-02-16 Thread Edmund Hertle
2009/2/16 Richard Heyes > > 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 use?

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

2009-02-16 Thread Edmund Hertle
2009/2/16 Richard Heyes > 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: > > Should

[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: US-

Re: [PHP] Clarity needed

2009-02-04 Thread Edmund Hertle
2009/2/4 tedd > 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 courses a

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 > 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 gracefully so th

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Edmund Hertle
2009/2/2 Robert Cummings > 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 writte

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Edmund Hertle
2009/2/2 Gavin Hodge > 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 2 being

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

2009-02-02 Thread Edmund Hertle
2009/2/1 Terion Miller > > > > > > 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 on

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

Re: [PHP] Re: Payment question in Canada

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

Re: [PHP] Coding for email response forms

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

Re: [PHP] Payment question in Canada

2009-01-30 Thread Edmund Hertle
2009/1/30 Bastien Koert > On Fri, Jan 30, 2009 at 2:11 PM, Ernie Kemp > 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 money from this but

Re: [PHP] Web Shop Management

2009-01-30 Thread Edmund Hertle
2009/1/30 Sancar Saran > 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 > > Customer > -- Pro

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

2009-01-30 Thread Edmund Hertle
2009/1/30 Eric Butera > On Fri, Jan 30, 2009 at 1:45 PM, Nitsan Bin-Nun > wrote: > > I was just wondering whether people enclosing their PHP tags > declarations, > > I don't close these really > > needs them, > > and for the second reason - if a space/tab/new line/etc will beneath them > it > >

Re: [PHP] Database Tables Relation Issue

2009-01-30 Thread Edmund Hertle
2009/1/30 Nitsan Bin-Nun > 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 `users` ( >

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

2009-01-28 Thread Edmund Hertle
2009/1/29 Daevid Vincent > At the very top of my login.php page I have this: > > 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: > https://example.com/vincentd/myda

Re: [PHP] Hidden costs of PHP arrays?

2009-01-27 Thread Edmund Hertle
2009/1/28 Clancy > 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 this > simple

Re: [PHP] Programming general question

2009-01-27 Thread Edmund Hertle
2009/1/28 Terion Miller > 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 in this) > > Can s

Re: [PHP] Re: Multiple queries in PHP

2009-01-26 Thread Edmund Hertle
2009/1/26 Chris > > >> 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 php-mysql > pac

Re: [PHP] Coding for email response forms

2009-01-26 Thread Edmund Hertle
2009/1/26 Tom > > "Shawn McKenzie" wrote in message > news:497e3ab9.2060...@mckenzies.net... > > > > > > Shawn McKenzie wrote: > >> > >> Tom Scott wrote: > >>> - Original Message - From: "Shawn McKenzie" > >>> > >>> Newsgroups: php.general > >>> To: > >>> Sent: Monday, January 26, 2009

Re: [PHP] Updating time in php

2009-01-26 Thread Edmund Hertle
2009/1/26 Gary > 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 this i

Re: [PHP] Re: Multiple queries in PHP

2009-01-26 Thread Edmund Hertle
2009/1/25 Ashley Sheridan > 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 > > > after.

Re: [PHP] Dirty Button

2009-01-25 Thread Edmund Hertle
2009/1/25 tedd > 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 solut

Re: [PHP] Dirty Button

2009-01-25 Thread Edmund Hertle
2009/1/25 tedd > 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 > Hey, It does not work as described, because the button will a

Re: [PHP] Authentication by client certificate

2009-01-25 Thread Edmund Hertle
2009/1/23 Jesus Campos > 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 > Hey, I do not really understand w

Re: [PHP] Time Wrong

2009-01-21 Thread Edmund Hertle
2009/1/21 Gary > Im pretty new with php, so this might be a pretty novice mistake, but the > time displays wrong on two computers. > > > > Shows up 2 hours late...time on both computers is correct. > > Thanks > > Do you mean on two computers visiting a php script? PHP is running on the server,

Re: [PHP] About printing functions

2009-01-21 Thread Edmund Hertle
2009/1/21 Thodoris > > >> 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

Re: [PHP] About printing functions

2009-01-21 Thread Edmund Hertle
2009/1/21 Jason Pruim > > 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 o

Re: [PHP] MySQL class. Thoughts?

2009-01-21 Thread Edmund Hertle
2009/1/21 Jay Moore > 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 mysqli-Class? 2. I

Re: [PHP] session mysteriously killed

2009-01-20 Thread Edmund Hertle
2009/1/20 clive > 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 out > //redirect to

Re: [PHP] maybe we could all?

2009-01-19 Thread Edmund Hertle
2009/1/20 Nathan Rixham > > 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? > > if so

Re: [PHP] maybe we could all?

2009-01-19 Thread Edmund Hertle
2009/1/20 Nathan Rixham > > 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!) Well, what

Re: [PHP] maybe we could all?

2009-01-19 Thread Edmund Hertle
2009/1/20 Nathan Rixham > 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 between many grea

[PHP] Re: How to use SVN + PHP

2009-01-19 Thread Edmund Hertle
2009/1/20 Nathan Rixham > > 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 need to manually

[PHP] Re: How to use SVN + PHP

2009-01-19 Thread Edmund Hertle
2009/1/20 Nathan Rixham > > 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 access good ver

[PHP] Re: How to use SVN + PHP

2009-01-19 Thread Edmund Hertle
2009/1/19 Nathan Rixham > > 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 there also will b

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

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

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

2009-01-15 Thread Edmund Hertle
2009/1/15 tedd > 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 = mysql_query($query) or die(

[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 = ''; I tried using regular expressions but my knowledge of RegEx is very limited. Things to consider: - $string could be quite long but my concern are

Re: [PHP] Basic Authentication

2009-01-14 Thread Edmund Hertle
2009/1/15 tedd > 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 and

Re: [PHP] Basic Authentication

2009-01-14 Thread Edmund Hertle
2009/1/14 tedd > 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 just t

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

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

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