Re: [PHP] two php.ini on the same server

2007-01-30 Thread Pierre Pintaric
Richard Lynch a écrit : On Fri, January 26, 2007 6:36 am, phpdevster wrote: Hi i am trying to run two Apache server on the same machine and that is work fine but the problem is how to create separate php.ini for each Apache server . is that possible ?? In Apache 2, there is a PHPIniD

[PHP] Parsing mail file

2007-01-30 Thread Pierre Pintaric
Hello there, I'm sure this question was ask 1,000 times, but I didn't find any archive about this, that's why I need help... Here is my problem: I receive mail file from my MTA (ie QMail), that works fine. Now, I would to find a class or a function that parse the mail and gives headers infor

[PHP] Parsing mail file

2007-01-30 Thread Pierre Pintaric
Hello there, I'm sure this question was ask 1,000 times, but I didn't find any archive about this, that's why I need help... Here is my problem: I receive mail file from my MTA (ie QMail), that works fine. Now, I would to find a class or a function that parse the mail and gives headers infor

Re: [PHP] time

2007-01-30 Thread Jim Lucas
Richard Kurth wrote: [snip] I am writing a program for managing leads and contacts. I would like to add the ability to see what TIME it is where the contact is not there server time. So if you looked at a list of contacts from all over the country you would see different times compared to what ti

Re: [PHP] Parsing mail file

2007-01-30 Thread Jim Lucas
Pierre Pintaric wrote: Hello there, I'm sure this question was ask 1,000 times, but I didn't find any archive about this, that's why I need help... Here is my problem: I receive mail file from my MTA (ie QMail), that works fine. Now, I would to find a class or a function that parse the mail

Re: [PHP] Parsing mail file

2007-01-30 Thread Pierre Pintaric
Jim Lucas a écrit : Pierre Pintaric wrote: Hello there, I'm sure this question was ask 1,000 times, but I didn't find any archive about this, that's why I need help... Here is my problem: I receive mail file from my MTA (ie QMail), that works fine. Now, I would to find a class or a function

Re: [PHP] Can a class instance a property of another class

2007-01-30 Thread Jochem Maas
Richard Lynch wrote: > On Sat, January 27, 2007 7:00 pm, Jochem Maas wrote: >> objects are always by reference in php5 - in php4 you have to >> use the 'reference' operator (the @ symbol) to make object be passed >> by reference. > > [pedantic for="archives"] > Not the @ symbol, which suppresses e

Re: [PHP] Parsing mail file

2007-01-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-30 10:18:54 +0100: > I receive mail file from my MTA (ie QMail), that works fine. Now, I > would to find a class or a function that parse the mail and gives > headers informations, body of the mail (even if it is a multi-part mail) > and file attachments. > I found

Re: [PHP] Parsing mail file

2007-01-30 Thread Pierre Pintaric
Roman Neuhauser a écrit : That's probably because you don't know enough about the field to use the right search terms, since PEAR *does* contain a package for parsing email messages, and I have no problems arriving at it from the search box on http://pear.php.net/ ... ftp://ftp.rfc-editor.org/in

Re[2]: [PHP] Parsing mail file

2007-01-30 Thread Mauro Lorenzutti
Hi Pierre, I have the same problem: I'm searching a function to parse an email file. I found this one: http://pear.php.net/package/Net_IMAP/ I think that you can extract the code you need from the function getParsedHeaders. Regards, Mauro Lorenzutti e-mail: [EMAIL PROTECTED] --

Re: [PHP] Parsing mail file

2007-01-30 Thread Dotan Cohen
On 30/01/07, Pierre Pintaric <[EMAIL PROTECTED]> wrote: If somebody uses a great function and want to share, I will please him... :-) Er, could you please define "I will please him"? I think that you've scared off a few potential helpers Dotan Cohen http://lyricslist.com/lyrics/artist_a

Re: [PHP] Parsing mail file

2007-01-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-30 12:17:01 +0100: > Roman Neuhauser a écrit : > >That's probably because you don't know enough about the field to use the > >right search terms, since PEAR *does* contain a package for parsing email > >messages, and I have no problems arriving at it from the search bo

RE: [PHP] time

2007-01-30 Thread Bob Dusek
If you have the timezone offset stored for each contact, you can compare that to the timezone offset of the server and do the math on a timestamp value. // return value format: hhmm // -0500 for US/EST, -5 hours relative to GMT $timeZoneOfServer = date("O"); > -Original Message- > Fro

[PHP] convert date to reversed date

2007-01-30 Thread Reinhart Viane
Is this a good way to convert 01/02/2007 to 20070201 $value='01/02/2007'; list($day, $month, $year) = split('[/.-]', $value); $filename=$year.''.$month.''.$day; It does work but i would like to verify if there are no better, more logical ways to do this. Thanks in advance

Re: [PHP] convert date to reversed date

2007-01-30 Thread Fredrik Thunberg
Reinhart Viane skrev: Is this a good way to convert 01/02/2007 to 20070201 $value='01/02/2007'; list($day, $month, $year) = split('[/.-]', $value); $filename=$year.''.$month.''.$day; It does work but i would like to verify if there are no better, more logical ways to do this. Thanks

Re: [PHP] convert date to reversed date

2007-01-30 Thread Fredrik Thunberg
date("Ymd", strotodate( $value )); Of course I mean: date( "Ydm", strtodate( $value )); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] convert date to reversed date

2007-01-30 Thread Reinhart Viane
I suppose you mean strtotime -Oorspronkelijk bericht- Van: Fredrik Thunberg [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 30 januari 2007 16:36 CC: php-general@lists.php.net Onderwerp: Re: [PHP] convert date to reversed date > date("Ymd", strotodate( $value )); > Of course I mean: date

Re: [PHP] convert date to reversed date

2007-01-30 Thread Arpad Ray
$filename = implode(array_reverse(explode('/', $value))); Arpad Reinhart Viane wrote: Is this a good way to convert 01/02/2007 to 20070201 $value='01/02/2007'; list($day, $month, $year) = split('[/.-]', $value); $filename=$year.''.$month.''.$day; It does work but i would like to ver

[PHP] return bounced email to specific email address

2007-01-30 Thread afan
hi, is it possible to specify email address in mail() function where bounced email could return? I checked http://us2.php.net/manual/en/function.mail.php but didn't find anything. thanks. -afan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

Re: [PHP] Parsing mail file

2007-01-30 Thread Jim Lucas
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-01-30 12:17:01 +0100: Roman Neuhauser a écrit : That's probably because you don't know enough about the field to use the right search terms, since PEAR *does* contain a package for parsing email messages, and I have no problems arriving at it fr

Re: [PHP] convert date to reversed date

2007-01-30 Thread Jim Lucas
Arpad Ray wrote: $filename = implode(array_reverse(explode('/', $value))); I think you ment $filename = implode('', array_reverse(explode('/', $value))); Arpad Reinhart Viane wrote: Is this a good way to convert 01/02/2007 to 20070201 $value='01/02/2007'; list($day, $month, $year) =

Re: [PHP] return bounced email to specific email address

2007-01-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-30 16:44:38 +0100: > is it possible to specify email address in mail() function where bounced > email could return? Yes, see ftp://ftp.rfc-editor.org/in-notes/rfc2821.txt > I checked http://us2.php.net/manual/en/function.mail.php but didn't find > anything. That's

Re: [PHP] convert date to reversed date

2007-01-30 Thread Jim Lucas
Jim Lucas wrote: Arpad Ray wrote: $filename = implode(array_reverse(explode('/', $value))); I should have checked before I wrote. It does work, but through me off, didn't realize that the first arg was optional. Sorry I think you ment $filename = implode('', array_reverse(explode('/',

RE: [PHP] time

2007-01-30 Thread Jay Blanchard
[snip] I am writing a program for managing leads and contacts. I would like to add the ability to see what TIME it is where the contact is not there server time. So if you looked at a list of contacts from all over the country you would see different times compared to what time it is where the use

RE: [PHP] time

2007-01-30 Thread Edward Kay
> [snip] > > I am writing a program for managing leads and contacts. I would like to > add > the ability to see what TIME it is where the contact is not there server > time. > > [/snip] > I have implemented this feature in our home-grown CRM system. I used the list of timezones on Wikipedia as a

Re: [PHP] Parsing mail file

2007-01-30 Thread Pierre Pintaric
Myron Turner a écrit : Jim Lucas wrote: he wants a cut/paste answer to his problem. He doesn't want to build something and learn how it all works. He just wants it to work out of the box. Why would someone want to read an RFC if he didn't have to? Maybe we should all start by writing our

RE: [PHP] Parsing mail file

2007-01-30 Thread Jay Blanchard
[snip] of course people read documentation before asking help [/snip] ROFLMMFAO! Sorry, that just made my day! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Can't get PHP extension to Load

2007-01-30 Thread Aaron Smith
I have a Microsoft 2003 server running IIS 6.0 and PHP 5.1.2. We have an application (Moodle) that uses a database connection to our MSSQL 2000 server. For whatever reason, it doesn't work properly with the built in php_mssql.dll so we have to use a replacement of either FreeTDS or OD

Re: [PHP] Parsing mail file

2007-01-30 Thread David Giragosian
On 1/30/07, Jay Blanchard <[EMAIL PROTECTED]> wrote: [snip] of course people read documentation before asking help [/snip] ROFLMMFAO! Sorry, that just made my day! Wow. I learned a new acronym. What a great day! David

Re: [PHP] Parsing mail file

2007-01-30 Thread Myron Turner
Jim Lucas wrote: he wants a cut/paste answer to his problem. He doesn't want to build something and learn how it all works. He just wants it to work out of the box. Why would someone want to read an RFC if he didn't have to? Maybe we should all start by writing our own GUI's. Nothing like

Re: [PHP] Parsing mail file

2007-01-30 Thread Jim Lucas
Pierre Pintaric wrote: Myron Turner a écrit : Jim Lucas wrote: he wants a cut/paste answer to his problem. He doesn't want to build something and learn how it all works. He just wants it to work out of the box. Why would someone want to read an RFC if he didn't have to? Maybe we should a

RE: [PHP] Parsing mail file

2007-01-30 Thread Tim
> -Message d'origine- > De : Dotan Cohen [mailto:[EMAIL PROTECTED] > Envoyé : mardi 30 janvier 2007 12:48 > À : Pierre Pintaric > Cc : php-general@lists.php.net > Objet : Re: [PHP] Parsing mail file > > On 30/01/07, Pierre Pintaric <[EMAIL PROTECTED]> wrote: > > If somebody uses a great

RE: [PHP] Can't get PHP extension to Load

2007-01-30 Thread Aaron Smith
It seems to me that if external libraries were required, they'd be in the PHP directory. But when I took the php directory from the production (non-working) server, and put it in place on the test server, it loaded the extension just fine. I'm going to, however, see if there are any differences b

[PHP] TR: Manipulating "categories" in a php database

2007-01-30 Thread Tim
Hello all, This is more of a conceptional question rather then a technical one. I am developping an online catalog, the catalog is a standard categorie/subcat/subsubcat system using the following logic in my database: cat_id cat_name 10DVD 1010 DVD/Action 1020 DVD/Adve

[PHP] nested, referenced foreach & implicit current array pointer issues

2007-01-30 Thread speedy
Hello PHP crew, As a followup to: http://bugs.php.net/bug.php?id=22879 I've stumbled upon this problem in a way: function f() { global $arr; foreach($arr as $k=>$v) { $v->do_something(); } } After digging through the docs I found that $arr is in fact a reference to original $

[PHP] Manipulating "categories" in a mysql database

2007-01-30 Thread Tim
Hello all, This is more of a conceptional question rather then a technical one. I am developping an online catalog, the catalog is a standard categorie/subcat/subsubcat system using the following logic in my database: cat_id cat_name 10DVD 1010 DVD/Action 1020 DVD/Adve

Re: [PHP] TR: Manipulating "categories" in a php database

2007-01-30 Thread Robert Cummings
On Tue, 2007-01-30 at 19:29 +0100, Tim wrote: > Hello all, > > This is more of a conceptional question rather then a technical one. > > I am developping an online catalog, the catalog is a standard > categorie/subcat/subsubcat system using the following logic in my database: > > cat_id cat_name

RE: [PHP] TR: Manipulating "categories" in a php database

2007-01-30 Thread Tim
Ok great stuff, thank you, that has enlightened me on the method I need to develop :) Oh and about the double msg, sorry fighting with outlook here, not my usual client ;) Regards, Tim -Message d'origine- De : Robert Cummings [mailto:[EMAIL PROTECTED] Envoyé : mardi 30 janvier 2007 19:

Re: [PHP] TR: Manipulating "categories" in a php database

2007-01-30 Thread Jim Lucas
Tim wrote: Hello all, This is more of a conceptional question rather then a technical one. I am developping an online catalog, the catalog is a standard categorie/subcat/subsubcat system using the following logic in my database: What type of DB? cat_id cat_name 10DVD 101

Re: [PHP] nested, referenced foreach & implicit current array pointer issues

2007-01-30 Thread Martin Alterisio
2007/1/30, speedy <[EMAIL PROTECTED]>: Hello PHP crew, As a followup to: http://bugs.php.net/bug.php?id=22879 That's not a bug, just an user doing things the wrong way and blaming the language. I've stumbled upon this problem in a way: function f() { global $arr; foreach($arr as $

Re: [PHP] Parsing mail file

2007-01-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-30 10:35:34 -0600: > Jim Lucas wrote: > >he wants a cut/paste answer to his problem. He doesn't want to build > >something and learn how it all works. He just wants it to work out of > >the box. > > > Why would someone want to read an RFC if he didn't have to? May

RE: [PHP] What search algorithm does in_array() use?

2007-01-30 Thread Ken Dozier
Thanks to all for your input, guys. Regarding the construction of the SQL query, I would love to try it with SUBSELECTs; but, alas, we are using RHEL 3 which ships with MySQL 3.23. I don't think RH supports any 4.0 or later versions of MySQL on RHEL 3, so I'm stuck with 3.23 for the time being.

[PHP] Socket problem

2007-01-30 Thread Scripter47
I'm making a simple socket server that just receive some data, and then send some data back again to the client. it is a program that send data by sockets, (not port 80) It has to a simple solution :) plz ask for more infomation. -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] Parsing mail file

2007-01-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-30 18:03:22 +0100: > I am so sorry, I'm so inferior to you great developper. [...] > Now, if you don't have any useful response - not sarcastic, :) > I only wanted to use libraries, but I can see that you never use them, > you code your onw low levels functions. No,

[PHP] XML error in browser

2007-01-30 Thread Skip Evans
Hey all, I have getting the following error page in the browser when trying to redirect to an iTunes XML file to open the player. === Cannot view XML input using style sheet. Please correct the error and then click the Refreshbutton, or try aga

Re: [PHP] time

2007-01-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-30 16:52:02 -: > BTW, you'll need to use a float since there are some non-integer timezone > differences. No need to lose information. Just store the offset in minutes, problem solved. -- How many Vietnam vets does it take to screw in a light bulb? You don't kn

Re[2]: [PHP] nested, referenced foreach & implicit current array pointer issues

2007-01-30 Thread speedy
Hello Martin, > Tuesday, January 30, 2007, 8:45:50 PM, you wrote: > > function f() > { >global $arr; > >foreach($arr as $k=>$v) { >$v->do_something(); >} > } > > I don't see your point anywhere... foreach iterates over a copy of > the array so where is the potential side-

Re: [PHP] Can't get PHP extension to Load

2007-01-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-30 12:09:44 -0500: > It loads a PHP extension called php_dblib.dll that replaces (the same > way ODBTP does) the php_mssql.dll. The problem is that on the > production machine, even though it is the same version of everything, it > refuses to load the php_dblib.dll.

Re: [PHP] XML error in browser

2007-01-30 Thread Skip Evans
Hey all, First, any apology. I had put in a filter to place all my list messages into a folder, and did not see Richard Lynch's reply to my earlier post about getting the iTunes player to open up inside PHP. I can see from what he said that my problem below is probably caused by the browser

Re: [PHP] Parsing mail file

2007-01-30 Thread Pierre Pintaric
Jim Lucas a écrit : But don't just ask us to hand you the answer. We are all here to teach each other to become better programmers. We should not be cut/paste junkies. Thanks for your help... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu

[PHP] RE: What search algorithm does in_array() use?

2007-01-30 Thread Ken Dozier
BINGO! I just tried your array_flip() suggestion, Greg. Awesome! Thanks for the tip; I wouldn't have thought of that. Ken. -Original Message- From: Gregory Beaver [mailto:[EMAIL PROTECTED] Sent: Monday, January 29, 2007 4:54 PM To: Ken Dozier Cc: php-general@lists.php.net Subject: Re

Re: [PHP] Socket problem

2007-01-30 Thread Stut
Scripter47 wrote: I'm making a simple socket server that just receive some data, and then send some data back again to the client. Lovely. it is a program that send data by sockets, (not port 80) Excellent. It has to a simple solution :) Simple is usually the best way to go. plz ask f

Re: [PHP] Parsing mail file

2007-01-30 Thread Pierre Pintaric
Roman Neuhauser a écrit : Because otherwise you cannot possibly understand how to use a ready-made library correctly? All of them (those who teach how to use Google) certainly knows all about GD (jpeg, gif, png, ...), zip, EXT3/FAT32/NTFS system, ... I am certainly on the wrong place, sorry.

Re: [PHP] Parsing mail file

2007-01-30 Thread Jon Anderson
I realize I'm probably stepping on some toes here, but I'm going to assume that there is (judging from the wording) a language barrier here. While I'm all for the "teach a man to fish" philosophy, I'm not sure that language isn't getting in the way of the lesson... Pierre Pintaric wrote: I don

RE: [PHP] Can't get PHP extension to Load

2007-01-30 Thread Aaron Smith
Interesting. Running that comes up with 2 missing dependencies: MSJAVA.DLL (delay-load dependency) and MSVCR71.DLL (apparently a required dependency). However, running the SAME thing on the test server results in the same errors...but it works over there. I did a search for those two files on bo

Fwd: [PHP] Fwd: Entries no longer appear in search

2007-01-30 Thread Kevin Jordan
Damn, wish replyto was set, I keep doing that. -- Forwarded message -- From: Kevin Jordan <[EMAIL PROTECTED]> Date: Jan 30, 2007 4:07 PM Subject: Re: [PHP] Fwd: Entries no longer appear in search To: Chris <[EMAIL PROTECTED]> Sorry, wasn't sure it went through the first time. O

RE: [PHP] Can't get PHP extension to Load

2007-01-30 Thread Aaron Smith
AHA! I have discovered the culprit, but am uncertain WHY it is the culprit. The production server as Microsoft.NET Framework 2.0 installed on it and the test server does not. I installed the 2.0 framework on the test server and BAM, the extension refused to load. I'll see if uninstalling it cau

[PHP] Help wtih a query?

2007-01-30 Thread Skip Evans
Hey all, I have the following query: $sql="SELECT count(*) AS count,votes.storyID,stories.title,stories.storyID as sID,stories.approved, stories.story,stories.userID, fname, lname FROM `bsp_story_votes` as votes, bsp_story_stories AS stories, users AS usr WHE

Re: [PHP] Help wtih a query?

2007-01-30 Thread Jon Anderson
Wrong list. Putting "$sql=..." in there doesn't make it a PHP question. ;-) Skip Evans wrote: Is that what the left/right joins do??? Yea. LEFT JOIN will give you NULL entries in the left joined table, so you'd just have to say WHERE ISNULL(.that table>). Of course, you'll need to do the right

Re: [PHP] Select record by ID

2007-01-30 Thread nitrox .
Thanks to all who have replied. As you probably have noticed im a total novice to php who is trying to achieve big things. Richard, ive included your suggested code and now my php script is working properly. But I dont want to be a php copy/paste newb who has no clue of how things are working.

Re: [PHP] Help wtih a query?

2007-01-30 Thread Brad Bonkoski
Skip Evans wrote: Hey all, I have the following query: $sql="SELECT count(*) AS count,votes.storyID,stories.title,stories.storyID as sID,stories.approved, stories.story,stories.userID, fname, lname FROM `bsp_story_votes` as votes, bsp_story_stories AS stories, users AS usr

Re: [PHP] Select record by ID

2007-01-30 Thread Paul Novitski
At 1/30/2007 02:14 PM, nitrox . wrote: If its not too much would you (or anybody) give a brief explanation of what this code is doing? Or are there any tutorials online that I can read that will educate me on this? Thanks again to all for your replies. Ive saved them all for future reference.

Re: [PHP] Help wtih a query?

2007-01-30 Thread Philip Thompson
On Jan 30, 2007, at 4:33 PM, Skip Evans wrote: Hey all, I have the following query: $sql="SELECT count(*) AS count,votes.storyID,stories.title,stories.storyID as sID,stories.approved, stories.story,stories.userID, fname, lname FROM `bsp_story_votes` as votes, bsp_story_st

Re: [PHP] return bounced email to specific email address

2007-01-30 Thread Chris
[EMAIL PROTECTED] wrote: hi, is it possible to specify email address in mail() function where bounced email could return? I checked http://us2.php.net/manual/en/function.mail.php but didn't find anything. That's the right place. It's the 5th parameter you want to change. -- Postgresql & php t

Re: [PHP] Select record by ID

2007-01-30 Thread Craige Leeder
atleast this part: $user_id = mysql_real_escape_string((int) $_GET['user_id']); I'm not sure who put this in there, but you don't need to use mysql_real_escape_string() on that value if you're type casting it. If you are forcing it to be an integer, there is nothing to escape. Integers are perfe

[PHP] Re: Suggestions of GPL plugin-system?

2007-01-30 Thread Globalissa Info
Hello All (cc Ivo), We have numerous modules in various software titles and these are included by a simple conditional statement. If they exist, then include them. Example: ... another example: // your code here This works well for modules because if they don't exist th

[PHP] ereg() problem

2007-01-30 Thread jekillen
Hello php list; I am having trouble with ereg(). The following is the problem code $x = ereg("", $get_route, $m); testing $route I get: $route = $m[1]; print $route.''; jk/in' rec='a_378e6dc4.xml' /> (out put of print) jk is all I am looking for but is it greed that is missing the forward slash

RE: [PHP] What search algorithm does in_array() use?

2007-01-30 Thread Ligaya A. Turmelle
Don't use a theta join - use a left, right or inner preferably with ANSI syntax and make sure you indexes are set up correctly - this shouldn't take very long to execute at all. SELECT d.account FROM data d INNER JOIN accesslist a USING account (or ON d.account=a.account) WHERE a.username

[PHP] regarding ereg() problem

2007-01-30 Thread jekillen
Hi again; (Blush) I just did noticed that I did not mask out the two dots: $x = ereg("", $get_route, $m); I am trying again.. I still get the same result jk/in' rec='a_378e6dc4.xml' /> JK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Need tool to graphically show all includes/requires -- first version Announcement

2007-01-30 Thread Daevid Vincent
Impossible! HAH! So here's a first stab at this. http://daevid.com/examples/include_tree.zip It's not very pretty (yet), but should illustrate where I'm going with it. Next step is to make it a nice tree view in a .html page or something. I'm not quite sure what or how I want to do that just yet,

Re: [PHP] regarding ereg() problem

2007-01-30 Thread Jim Lucas
jekillen wrote: Hi again; (Blush) I just did noticed that I did not mask out the two dots: $x = ereg("", $get_route, $m); I am trying again.. I still get the same result jk/in' rec='a_378e6dc4.xml' /> JK Tell a little more about what you are trying to do? Example input and expected resu