Re: [PHP] sessions and trans-sid problem/question

2002-11-22 Thread Michael Sims
On Fri, 22 Nov 2002 15:08:31 +0100, you wrote: >I don't think the session handler checks session expiry - only gc does. I >haven't checked the PHP sources yet, but I found out that on my development >server (where we definetely don't have a lot of traffic ;->) session files >can persist over night

Re: [PHP] sessions and trans-sid problem/question

2002-11-24 Thread Michael Sims
On Sun, 24 Nov 2002 17:01:21 +0900, you wrote: >Michael Sims wrote: >> >> Then I suppose it's just an added feature of the session handler I am >> using. Maybe the OP should give it a shot, as I use it and I >> definitely don't have a problem with expired se

Re: [PHP] Detecting email bounces sent by the mail function?

2002-11-28 Thread Michael Sims
On Thu, 28 Nov 2002 17:54:46 -, you wrote: >Hello > >Is it possible to detect with PHP whether an email sent using the PHP >'mail' function has bounced back or has not been delivered? Hi, If you're using PHP on a unix/linux with sendmail you can set the envelope sender via the 5th parameter

Re: [PHP] Quota function

2002-11-30 Thread Michael Sims
On Sat, 30 Nov 2002 23:36:20 +0800, you wrote: >There is a php code from Internet, it is enable Quota function with wu-imap >server, but I can't run it into my server ( Linux Redhat system ) like There is a mailing list that is specifically for Imp. You'd have better luck getting answers if you

Re: [PHP] exec, system , backtick

2002-12-27 Thread Michael Sims
On Sat, 28 Dec 2002 02:55:44 +0530, you wrote: >I tried a simple command line script, in all cases no_file does not exist. I >do not want the command line script to show the error on the screen but to >deliver it in the variable $r. But alas, in all 3 cases i get 'rm: canoot >remove `no_file': No

Re: [PHP] exec, system , backtick

2002-12-28 Thread Michael Sims
On Sat, 28 Dec 2002 13:30:49 +0530, you wrote: >Im running a linux system so i have no problem, but how would one redirect >stderr to stdout on a Win machine, if it is possible at all I believe it works the same way on NT kernels (NT, 2000, XP) but I could be wrong. A friend of mine actually ha

Re: [PHP] imap_set_quota function

2002-12-29 Thread Michael Sims
On Sun, 29 Dec 2002 18:26:01 -0800 (PST), you wrote: >"This function requires the imap_stream to have been opened as the mail >administrator account. It will not work if opened as any other user. [...] >my question is, where do i set this admin called 'mailadmin' with password >'password'. do i se

Re: [PHP] PHP & PostgreSQL

2002-12-30 Thread Michael Sims
On Mon, 30 Dec 2002 04:11:02 -0700, you wrote: >The things that bothered me the most: > >o Pg doesn't have DATE_FORMAT() to_char() accomplishes the same thing, for example: select to_char(lastlogin, 'FMMM-DD- FMHH:MI AM') as lastloginf from users; >, or the types SET and ENUM. I'm not sure

Re: [PHP] function misfunction

2002-12-30 Thread Michael Sims
On Mon, 30 Dec 2002 14:48:13 +0100, you wrote: >function setCurrentDevGroup($devID) >{ >// start original routine >$query = "SELECT dev_group FROM tracking WHERE (computer = >

Re: [PHP] PHP & PostgreSQL

2002-12-30 Thread Michael Sims
On Mon, 30 Dec 2002 07:57:04 -0600, you wrote: >> >o Pg doesn't have DATE_FORMAT() >> to_char() accomplishes the same thing, for example: >> select to_char(lastlogin, 'FMMM-DD- FMHH:MI AM') as lastloginf >> from users; > >Unless I missed something, that function doesn't work with unix timestam

Re: [PHP] Getting short (DOS) name of file?

2002-12-31 Thread Michael Sims
On Tue, 31 Dec 2002 02:14:18 -0500, you wrote: >Thanks... thing is, it can be anything from c:\whatever.exe to >c:\program files\program name\bin\program.exe. I'll write a function >that goes to each directory in a string and does a dir /x if I have to, >but isn't there a simpler way? I don't

Re: [PHP] PHP and empty() if form value is 0

2003-01-04 Thread Michael Sims
On Sat, 4 Jan 2003 19:26:02 -0500, you wrote: >Whenever the form variable is equal to 0, the value is not passed into the >corresponding variable. > >For example, if isLogin = 1, then $isLogin = 1 >But if isRegistered = 0 then $isRegistered = {null} > >I do not understand why this happens, someon

Re: [PHP] PHP and empty() if form value is 0

2003-01-04 Thread Michael Sims
On Sat, 4 Jan 2003 20:33:14 -0500, you wrote: >I couldn't think of isset, so I winged it: > >if (strlen($var) > 0) {...} This should work most of the time, but be aware this will produce a warning if $var isn't set (and you haven't set your error reporting level to ignore warnings)... If you're

Re: [PHP] changing uid/gid

2003-01-06 Thread Michael Sims
On Mon, 6 Jan 2003 02:03:05 -0500, you wrote: >Is it posible to change the current uid/gid in a script that is being running >? of course, having the user and password ? like running su. I don't believe that it's possible to do this inside PHP. I would suggest writing a seperate script to do all

Re: [PHP] php-ldap - multiple modify actions within a single request

2003-01-07 Thread Michael Sims
On Tue, 07 Jan 2003 22:49:45 +0100, you wrote: >hi! > >is it possible to make different modify actions (add, delete, etc.) >during a single request? > >for changing a password in the NDS i would have to >first delete the 'userPassword' and right after that add the new >'userPassword' AFAIK it i

Re: [PHP] Re: custom error handling

2003-01-07 Thread Michael Sims
On Wed, 8 Jan 2003 08:28:58 +1100, you wrote: >> hi there i am trying to build a ustom error handler for the pear db aswell >> as catch fatal and parse errors , unfortunatly the pear db error message >> wont give me back the file and the line where the error is, how can i >> determine the line an

Re: [PHP] how to make server response to emails

2003-01-09 Thread Michael Sims
On Thu, 9 Jan 2003 17:33:02 +0800, you wrote: >I believe >that there is a way to make the mail server, or which ever it is, to >response specifically to text within the mail. [...] >However, I have no idea how this is accomplished and what this system is >called, so I need some precious help here.

Re: [PHP] Too many open files

2003-01-10 Thread Michael Sims
On Fri, 10 Jan 2003 10:38:31 + (GMT), you wrote: >On Wed, 8 Jan 2003, Macrosoft wrote: > >> Can anybody explain me what does mean error: >> >> Warning: main(footer.inc.php) [function.main.html]: failed to >> create stream: >> Too many open files in /www/sql/main.php on

Re: [PHP] Trapping PHP errors

2003-01-13 Thread Michael Sims
On Tue, 14 Jan 2003 23:38:11 +0100, you wrote: >Hi all, > >is there a way to execute a custom function as soon as an error happens in >PHP? I looked at the set_error_handler function, but it doesn't seem to trap >all the errors. What I want to achieve is to execute a function that mails >me the er

Re: [PHP] restore_error_handler() to default error handler

2003-01-14 Thread Michael Sims
On Tue, 14 Jan 2003 01:20:54 -0700, you wrote: >Hi, > >I was playing around with error handlers, and tried this: [...] >Which worked just fine. A little too good, in fact. > >I got over 1,200 emails in a matter of minutes (high traffic site). I'm not sure whey restore_error_handler() isn't worki

Re: [PHP] Trapping PHP errors

2003-01-14 Thread Michael Sims
On Wed, 15 Jan 2003 13:25:05 +0900, you wrote: >If it's not asking too much would you be willing to share that custome >error handler you wrote? It's a big long so I'm sending it to you off-list. If anyone else is interested just send me an email off list and I'll send you a copy... -- PHP Gen

Re: [PHP] Setcookie() and header()

2003-01-14 Thread Michael Sims
On Tue, 14 Jan 2003 22:34:49 -0700, you wrote: >Unless I am mistaken, the typical behavior for most browsers is exactly >as you described. Which is due to the browser receiving a Location >header and acting on it, disregarding any other headers. (ex: >cache/no-cache, cookies, etc) > >Anybody c

Re: [PHP] Setcookie() and header()

2003-01-14 Thread Michael Sims
On Wed, 15 Jan 2003 01:36:26 -0500, you wrote: >Wow. You hit the nail on the head. :) Well, I spent a good day or two hunting the problem down the first time I ran across it. Spending that much time on something tends to make it stick in your head. :) >I installed PHP on IIS via the executabl

Re: [PHP] Form won't submit when pressing enter key

2003-01-15 Thread Michael Sims
On Wed, 15 Jan 2003 17:23:26 -0800, you wrote: >I have a form created by this code (I don't know if it's important): > >if ($_POST["submit"]) { [...] >After you fill out the only field, you HAVE to click the submit button to >submit the form. If you press enter to submit the form it reloads the fo

Re: [PHP] alternative control structure syntax

2003-01-15 Thread Michael Sims
On Thu, 16 Jan 2003 12:34:26 +1100, you wrote: >Hi, > >Can someone point me to the page in the manual where this style of control >structure syntax is documented? > >$var = ($something) ? "foo" : "bah"; This is the ternary operator. It's kinda buried in the documentation: http://www.php.net/man

Re: [PHP] setcooke(...) before header("Location: XYZ") - Cookie doesn't set!

2003-01-21 Thread Michael Sims
[top-posting fixed] >"Jason K Larson" <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> Discussion on this list has suggested that it can work if PHP is set to >> run as ISAPI, not CGI. >> >Do you know how do do this? Although using the ISAPI dll version of PHP

Re: [PHP] setcooke(...) before header("Location: XYZ") - Cookie doesn't set!

2003-01-21 Thread Michael Sims
On Tue, 21 Jan 2003 20:17:40 -0700, you wrote: >I tried a test file with this, and the form is sent, and the nph-test2.php >file returns this > >Status: 302 >Content-type: text/html >X-Powered-By: PHP/4.3.0 >Location: test.php >Set-Cookie: testcookie=test I'm a bit confused. Is it working for yo

Re: [PHP] Files PHP in tmp ?

2003-01-24 Thread Michael Sims
On Fri, 24 Jan 2003 13:05:16 +0100, you wrote: >and my ls dir >-rw--- 1 nobody nobody 3687 Jan 23 14:25 phpqlG5ny >-rw--- 1 nobody nobody621 Jan 22 21:06 phpqt95I4 >-rw--- 1 nobody nobody424 Jan 23 00:04 phprM5Vkx [...] Some PHP applications do their

Re: [PHP] SSH change password!

2003-01-24 Thread Michael Sims
On Fri, 24 Jan 2003 11:48:50 -0600, you wrote: >What I need is to change users password on the server, I want to write >that script and it needs to be safe. So I don't know what should I use. >I think I will need to check username and password, then log in through >website with it and then use pas

Re: [PHP] Function Stack

2003-02-01 Thread Michael Sims
On Sat, 1 Feb 2003 07:08:05 -0500, you wrote: >Is there any way to access the Function Stack from php? Starting with PHP 4.3.0 you can use debug_backtrace(), which returns an array of caller stack information. You might want to build a wrapper around it which formats the information the way you

Re: [PHP] Line Number function?

2003-02-01 Thread Michael Sims
On Sat, 1 Feb 2003 19:59:00 -0800, you wrote: >PHP keeps track of what line# is being executed, so that when there's an >error (say in pg_exec() ) it reports what line the error occured on. [...] >Is there a function where I can access this information? Something like >"get_line();" or somethin

Re: [PHP] sorting multi-dimensional array where array elements are structs [simple class]

2003-02-10 Thread Michael Sims
On Mon, 10 Feb 2003 16:23:10 -0600, you wrote: >Hi. > >I’m working with a multidimensional array where the data in the >array is a class (struct). All the information is being stored correctly, >but I need to sort each “column” (AA0, BA0, etc. – see below) >by the fieldNo portion of the struc

Re: [PHP] sorting multi-dimensional array where array elements are structs [simple class]

2003-02-11 Thread Michael Sims
On Tue, 11 Feb 2003 08:27:57 -0600, you wrote: >Thanks for the reply. I had already tried usort previously. For some > reason, there is no data for the array fields at all in the cmp function > - not sure why. Does anyone know? All help is appreciated! Thanks. Can you post a short code sampl

Re: [PHP] is_writable for a dir?

2003-02-22 Thread Michael Sims
On Sat, 22 Feb 2003 07:23:20 -0500, you wrote: >Hi, all -- > >How can I tell if a directory is writable? It seems that is_writable >only works on file, and the mode I get out of stat() is [in this case, >anyway] '16895' for a 0777 dir. The 16895 is in decimal. Use decoct() to convert it to octa

Re: [PHP] is_writable for a dir?

2003-02-22 Thread Michael Sims
On Sat, 22 Feb 2003 11:49:09 -0500, you wrote: >The real problem still remains, however; if it's not writable for all, >then I need to see whether or not its writable, and preferably without >checking the making of a temp file or digging into UID/GID and group >membership and so on... I wouldn't

Re: [PHP] PHP to read MS-SQL (solution)

2003-02-27 Thread Michael Sims
On Thu, 27 Feb 2003 14:31:45 -0800 (PST), you wrote: >Basically, it runs on the >MS-SQL server and allows requests in XML format on a certain port. That's actually pretty cool, from a tech standpoint, but why not access the MS-SQL database directly? From Windows it's easy, you just need the SQL

Re: [PHP] email pipe

2003-03-01 Thread Michael Sims
On Sat, 1 Mar 2003 17:26:37 +0300, you wrote: >Dear Sirs, > >I wa using > >my @InBody = ; > >To get data from email after piping. I am not sure that what I should use to >have same result with php? Hi, Read the section beginning with "Table 23-2. CLI specific Constants" here: http://www.php.net

Re: [PHP] preg_match_all()

2003-03-03 Thread Michael Sims
On Mon, 3 Mar 2003 19:51:09 -0500, you wrote: >preg_match_all('/begincommand(.*)endcommand/',$messagebody,$commandOuttake,P >REG_PATTERN_ORDER); [...] > How >do I change the criteria to stop at the first instance of a match? How do I >parse out only up to the first instance of "endcommand"? Here

Re: [PHP] how to force a refresh?

2003-03-13 Thread Michael Sims
On Thu, 13 Mar 2003 02:25:57 -0800, you wrote: >Ok, well I have a form that uploads images, but of course the problem is, is >that IE caches the uploaded images. The only way to clear the cache is to >refresh, but that isn't a very user friendly approach. I've tried the >following header tags: Yo

[PHP] Looking for experienced PHP programmer in the Memphis, TN area

2003-07-12 Thread Michael Sims
Hi, Sorry if this is frowned upon, but my company is looking for another PHP developer, and I figured I'd post the job ad here. We haven't had much luck finding PHP people in the past so I was hoping maybe I'd catch some eyes of people who maybe aren't necessarily actively looking for a new job.

Re: [PHP] ANY ONE CAN TELL ME WHAT PORT mssql_connect uses?

2003-07-15 Thread Michael Sims
On Tue, 15 Jul 2003 11:00:27 +0300, you wrote: >WHAT PORTS PHP USE WHEN COMUNICATING WITH MSSQL SERVER OVER THE NETWORK? I only have experience with MS SQL Server 7. It listens on TCP port 1433. >I have an Linux server running Apache/PHP/MySQL. >and I need to connect to another server running

Re: [PHP] ANY ONE CAN TELL ME WHAT PORT mssql_connect uses?

2003-07-15 Thread Michael Sims
On Tue, 15 Jul 2003 19:36:42 +0300, you wrote: >how can i specify the port for the direct connection >mssql_connect() I've never had the need to do this, so I cannot verify that this works, but I believe you can supply a port number in the servername argument: mssql_connect('192.168.0.1:1433', '

Re: [PHP] call function as variable

2003-08-16 Thread Michael Sims
On Sat, 16 Aug 2003 07:58:27 +0200, you wrote: >$test = array(1=>foo,2=zoo); > >and i want to call the fuction foo() and zoo something like; > >$object->$test[1](); I've never used this myself, but this should work: call_user_func(&$object, $test[1]); See: http://www.php.net/manual/en/function

Re: [PHP] Fw: MD5 in PHP and MD5 in Perl dont match up.

2003-03-27 Thread Michael Sims
On Wed, 26 Mar 2003 17:23:33 +0100, you wrote: >Im Very Sorry / Embarrased.. my code example had a mistake with extra >linebreak. Here is the example with out it, which gives a different MD5 >hash. I don't know why this is, but if you call Digest::MD5->md5_hex() in a procedural rather than OO way

Re: [PHP] MSSQL using Sybase FreeTDS

2003-04-03 Thread Michael Sims
On Thu, 3 Apr 2003 12:17:50 +0100, you wrote: >Has anyone experienced this, and if so know of a possible solution?? I have >used addslashes() etc but still no joy. In addition to what the other respondents have said, you can set the INI setting magic_quotes_sybase to 1, and this will change addsl

Re: [PHP] number of files in a dir vs. performace

2002-07-22 Thread Michael Sims
On Mon, 22 Jul 2002 23:09:12 -0400, you wrote: >currently I am holding all of the files in 1 directory since the DB can >keep track of them, however their number has grown to over 400 at this >point > >my issue is whether it would be worth it (performance wise) to split them >into thumbs and w

Re: [PHP] Grab value of mail headers

2002-07-24 Thread Michael Sims
On Thu, 25 Jul 2002 05:47:57 +0200, you wrote: >Bonus points if you could tell me a way to parse the entire headers >into something useful like a set of key, value pairs using the header >name as key and the value as value. $lines = split("\r?\n",$headerstring); foreach($lines as $line) { if

Re: [PHP] preg_match() occurence position

2002-07-25 Thread Michael Sims
On Thu, 25 Jul 2002 15:05:36 +0200, you wrote: > l> for example: > l> $mem='this is a test'; > l> preg_match('/test/', ...) should return me somehow: 10 How about this: $mem='this is a test'; if(preg_match("/(.*)test/",$mem,$matches)) { echo strlen($matches[1]); } Of course, if "test" occur

Re: [PHP] How do I show the sourse code?

2002-07-27 Thread Michael Sims
On Sun, 28 Jul 2002 03:41:19 +0200, you wrote: >I have seen on some of the script-sites around some nice ways of presenting >the source code. Often in nice colors. So, the natural question is: how is >that done (cause I don't think anyone has the patience to put < and > >around all the <>) http:

Re: [PHP] running php with .html files?

2002-07-28 Thread Michael Sims
On Sun, 28 Jul 2002 08:18:40 +0100, you wrote: >Hi All, [...] >I have a php script that I wish to execute but I want to put it in >index.html (not index.php) > >I know there is a solution involving configuration files in either the >directory wher the file is held or specifically for the server.

Re: [PHP] Encrypting Passwords - Is it really necessary??

2002-07-29 Thread Michael Sims
On Mon, 29 Jul 2002 17:30:48 -0400, you wrote: >Is it really necessary to store passwords encrypted in a mySQL DB for a >membership site if you're not storing sensitive info such as credit card >numbers? How much security does that offer, really, and for whom? [...] >The reason I ask is because I

Re: [PHP] mailing list managers

2002-08-13 Thread Michael Sims
On Wed, 14 Aug 2002 01:09:32 +1000, you wrote: >I was hoping that maybe there's an opensource or commercial product out >there that I can install in my doc root (ie, PHP + MySQL support) which will >handle this in a more effective manner (ie, space the mailout across an hour >or so, etc etc). Ta

Re: [PHP] Comparing Data

2002-08-13 Thread Michael Sims
On Tue, 13 Aug 2002 21:31:22 -0400, you wrote: >Well, the only problem is, the data will be outputted into a dropdown box, so a loop >would cause duplicates of the ID. > >Guess I should have mentioned that there are approx 50 ID's and they are not unique. >The only way I can think of doing it

Re: [PHP] howto disable cron output

2002-08-13 Thread Michael Sims
On Tue, 13 Aug 2002 18:42:17 -0700 (PDT), you wrote: >i wrote an ecard script and added 'send at a future date' feature. >this feature is implemented via cron that runs daily at 1200 hours > >$> crontab -l looks like: >00 00 * * * wget http://ecard.domain.com/futuresend.php 2&1> /dev/null > >it w

Re: [PHP] location headers are crisco to cookie headers?

2002-08-13 Thread Michael Sims
On Tue, 13 Aug 2002 22:14:28 -0500, you wrote: >I had some headers that were working on one server (4.0.6), but isn't >working on my (nearly) fresh install of 4.2.2. Here's the conundrum: >header("Set-Cookie: mid=$mid"); >header("Location: $location"); >exit; >worked just fine. I mo

Re: [PHP] stupid question

2002-08-15 Thread Michael Sims
Liam MacKenzie wrote: >>Ok, I'm having a blonde day... >> >>If $idx == 1, 4 or 9 I don't want it to echo $results. >>I have this, what's the syntax to put multiple values in there? >> >> >>if ($idx != "1") { >>echo"$results"; >>} Another way to do it is by using in_array(), like so: if (!in_arr

Re: [PHP] how to fight backslash in char variable???

2002-08-20 Thread Michael Sims
On Tue, 20 Aug 2002 15:13:53 +0300, you wrote: >the problem is that from out.php I need to echo this $intext but I get: > >blablabla \' blablabla > >the question is.. how to fight this backslash out of there? The magic_quotes_gpc setting is enabled on your server. If you have access to the serv

Re: [PHP] Embeding images in HTML emails

2002-08-20 Thread Michael Sims
On Tue, 20 Aug 2002 14:52:21 +0300, you wrote: >Hi, > >Does anyone know how to embed images in HTML emails in order to avoid a >server request (no http://server/foo.img";>)? >Is this possible? It is possible. If you are sending a multipart MIME message, attach the image as MIME type image/gif o

Re: [PHP] trouble with function

2002-08-25 Thread Michael Sims
On Mon, 26 Aug 2002 01:12:56 +1000, you wrote: >However, I was hoping to use it in a similar way that I use mysql in the >above code... something like: >while($song = getSongByArtist(4)) >{ >echo song['title']; >echo song['writers']; >echo song['video']; >echo song['artist_id'

Re: [PHP] trouble with function

2002-08-25 Thread Michael Sims
On Sun, 25 Aug 2002 10:49:00 -0500, you wrote: >static $myrow; >if($myrow = mysql_fetch_array($result)) { [...] Oops. We want to remember the position of the result set, so it's $result that should be static, not $myrow. In addition, you'll have to put a check at the top of the function to see

Re: [PHP] foreach fails on unitialized array?

2002-08-27 Thread Michael Sims
On Wed, 28 Aug 2002 12:53:45 +0900, you wrote: >When I use foreach on a uninitialized array I get the following warning: > >Warning: Invalid argument supplied for foreach() in >/www/htdocs/jc/cart/add_item.php on line 21 > >I would expect foreach to treat an unitialized variable as an empty >a

Re: [PHP] Dumb Question

2002-08-31 Thread Michael Sims
On Sat, 31 Aug 2002 14:04:11 -0400, you wrote: >And I feel foolish asking... >What is meant by 'procedural code' ??? It's the opposite of "declarative code". Here's a page that briefly explains the difference: and

Re: [PHP] defining vars within functions as global

2002-09-06 Thread Michael Sims
On Fri, 06 Sep 2002 13:52:08 +1000, you wrote: >Hi, > >I'd like to be able to define multiple variables within a function, and have >it available outside the function from the point the function is called... How about this: "aaa", "bar" => "bbb" ); } extract(foo()); echo $foo; echo $

Re: [PHP] strtolower -> strtoupper

2002-09-11 Thread Michael Sims
On Thu, 12 Sep 2002 05:21:01 +0300, you wrote: [...] >$name = "mattson-hedman" # correct format is Mattson-Hedman, but user >can write in many ways. $name came from db. > >so how I can convert this $name format "Mattson-Hedman". [...] Try this: function uc_all ($str) { $temp = preg_split('/(

Re: [PHP] Good OO PHP resources? Open Source APIs?

2002-09-19 Thread Michael Sims
On Thu, 19 Sep 2002 00:50:56 -0400, you wrote: >By doing so I want more and more of my PHP to be purely OO. I'm fairly >aware of how to write my own classes for data but are their any frameworks >out there to do the foundation stuff already? Have you looked at PEAR? It comes with the PHP distr

Re: [PHP] checking if an array is empty

2002-09-21 Thread Michael Sims
On Sun, 22 Sep 2002 01:13:08 +1000, you wrote: >how can i check if an array is currently empty , for instance i have a file >input field with an array name for multiple images, i need to check if there >was no file uploaded in that field name and ignore it in the loop I find that empty() works w

Re: [PHP] checking if an array is empty

2002-09-21 Thread Michael Sims
On Sun, 22 Sep 2002 11:09:16 +1000, you wrote: >thats the thing , the word Array is what it returns even though there was no >input file. Oh, I see. Without seeing your code, the best recommendation I have is to loop through the array and remove the empty elements, then check to see if the arra

[PHP] Designing N-tier applications in PHP (long)

2002-09-22 Thread Michael Sims
I have a few application design questions that I was hoping someone might have some thoughts on. I'll warn you in advance that this post is kinda long winded. I'll try my best not to use two many trendy buzzwords, but I may not be able to avoid it. :-) I work for a real-estate company and one o

Re: [PHP] Designing N-tier applications in PHP (long)

2002-09-22 Thread Michael Sims
On Sun, 22 Sep 2002 11:31:17 -0500, you wrote: >Basically, it's really easy to create multiple interfaces to the same >business logic. Don't try to make things more complicated than >necessary, and since there is no need to use multiple languages in your >implementation, that is a complexity w

Re: [PHP] Designing N-tier applications in PHP (long)

2002-09-22 Thread Michael Sims
On Sun, 22 Sep 2002 13:07:05 -0500, you wrote: >Oh yeah, avoid that at all costs. Sounds like something like SOAP etc. >could have been an answer, but then it depends on how you write your >apps. Well, that is basically my question. I considered both SOAP and XML-RPC (which you mention later

Re: [PHP] session_start() --> no more output

2002-09-22 Thread Michael Sims
On Mon, 23 Sep 2002 00:54:07 +0200, you wrote: >session_register("bunt"); >phpinfo(); >?> > >This is just a simple example. The problem is that the script produces >no output at all when called with the browser. Is it possible that display_errors is set to "Off" in your php.ini? If this were the

Re: [PHP] Designing N-tier applications in PHP (long)

2002-09-22 Thread Michael Sims
On Sun, 22 Sep 2002 18:45:37 -0300, you wrote: >Hello, Hi Manuel... >Good idea, bad project. It is good that you diversify your knowlegde if >that helps your career but I think it is not a good idea to make >technology shift in a project that is already written and working well >in a certain

Re: [PHP] Designing N-tier applications in PHP (long)

2002-09-22 Thread Michael Sims
On Sun, 22 Sep 2002 16:40:06 -0500, you wrote: >I was just looking at my software architect book ... not half-way >through yet. Good book. CORBA is what is mentioned know, a bit >different than SOAP but I don't know enough of either yet to say for >sure. Something like CORBA looks good to me,

Re: [PHP] Re: session_start function breaks flush function in 4.2.1

2002-09-23 Thread Michael Sims
>"Chris Andrew" <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> I use a script which initially sends a friendly message to a browser, and >> then goes about some lengthy processing. The browser is IE and I am aware >of >> the 256 byte issue. >> >> The script w

Re: [PHP] XSLT and PHP

2002-09-24 Thread Michael Sims
On 24 Sep 2002 10:22:41 -0500, you wrote: >What I am looking for is either a way to use includes in xsl stylesheets >or something like Fusebox layouts for xml/xsl. Thank you You may get better answers if you post this in comp.text.xml... -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] time of day

2002-10-03 Thread Michael Sims
On Thu, 3 Oct 2002 14:43:37 -0700 (PDT), you wrote: >Hello, > >I was wondering if anyone has a good example of a way to do this. Kinda >lame, but like if the time is between 8am and 12pm, say "good morning", >between 12pm and 6pm, say good afternoon, and so on. > >I know this is probably pretty t

Re: [PHP] Battling with highlighting search criteria

2002-11-04 Thread Michael Sims
On Mon, 4 Nov 2002 11:59:20 +0200, you wrote: >Ok, this works. > >Just one more thing, > >How can I get the return in the same case as it was originally? Use backreferences to capture what matched and use that in the replace string. Example: $1", $str); echo $str; echo ""; $str = "Is this als

Re: [PHP] How do I convert an array into a mask?

2002-11-05 Thread Michael Sims
On Tue, 5 Nov 2002 20:56:33 -0800, you wrote: >Does anyone know of a nice efficient way to convert an array of values >into a "mask"... I'm going to assume that you mean a bitmask. I'm not exactly sure what you're trying to accomplish, so I may be off base here, but let me describe how I'm using

Re: [PHP] Convince teh boss

2002-11-07 Thread Michael Sims
On Thu, 07 Nov 2002 10:45:18 +0100, you wrote: >BTW, is there any reason why PostgreSQL is not mentioned here? While it >seems there are far more MySQL installations, I personally value PostgreSQL >higher... it's OpenSource as well, it's an OO database (you may inherit, >have object identifiers, e

Re: [PHP] set_error_handler() Keeps Triggering Errors

2002-11-10 Thread Michael Sims
On Sun, 10 Nov 2002 10:48:46 -0500, you wrote: >Hi Earnest. I found these user notes in the PHP manual, but, it's confusing >and seems to be a bit contradictory: It's simple: A user defined error handler cannot handle parse errors or compile time errors. That makes sense to me...if your script

Re: [PHP] isset doesn't like "->"?

2002-11-10 Thread Michael Sims
On Sun, 10 Nov 2002 18:34:52 -0600, you wrote: >PS: what is the proper term for the "->" syntax? pointer? In Perl it's called an infix operator. I think in PHP the technical term for it is that "->" thingy... :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

Re: [PHP] Would appreciate thoughts on session management

2002-11-12 Thread Michael Sims
On Tue, 12 Nov 2002 15:55:52 -0800, you wrote: >It's simple, which is one thing I like about it. My submit.php looks like >this: > >session_start(); >header('Location: ' . $_REQUEST['target']); [snip] I'm curious...your redirect doesn't include the session ID, so how you maintain ses

Re: [PHP] Would appreciate thoughts on session management

2002-11-12 Thread Michael Sims
On Tue, 12 Nov 2002 18:28:53 -0800, you wrote: [snip] >My Invisible GET method avoids all of this. If you get an example of this up and running somewhere why don't you post a link... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] BUG with session trans sid ?

2002-11-13 Thread Michael Sims
On Thu, 14 Nov 2002 01:58:49 +0200, you wrote: >So, I use php4.0.6 in default redhat installation. My code: > >ini_set('session.use_cookies', FALSE); >ini_set('session.use_trans_sid', TRUE); [snip] >TRANS SID feature doesnt working, but constant SID set >correctly (PHPSESSID=...). If I write SID i

Re: [PHP] posible bug, require and symlinks

2002-11-14 Thread Michael Sims
On Wed, 13 Nov 2002 20:12:44 -0500, you wrote: >When I require a file from index.php, if there's no .. on the path (a relative >path, but not going back), the relative path is from where the original file >is, but if there's a .. on the path, the relative path is from where the >symlink is (alt

Re: [PHP] imap_open

2002-11-17 Thread Michael Sims
On Sun, 17 Nov 2002 21:00:13 -0500 (EST), you wrote: >i'm looking for information on how to open mailboxes stored in user >directories using imap_open. i've lookd into the c-client documentation >as well as php.net and haven't had any luck. my experience so far is that imap_open >will >just ope

Re: [PHP] imap_open

2002-11-18 Thread Michael Sims
On Sun, 17 Nov 2002 22:08:36 -0800 (PST), you wrote: >> The function imap_open() is for opening an connection to an IMAP >> server. It doesn't operate directly on a file system and it is >> ignorant of the actual mailbox implementation as this is all >> abstracted by the IMAP protocol. Where the

Re: [PHP] sessions and trans-sid problem/question

2002-11-22 Thread Michael Sims
On Fri, 22 Nov 2002 14:57:23 +0900, you wrote: [...] >1- the user logs in >2- bookmarks the page >3- closes the browser >4- opens the browser >5- goes to the saved bookmark page > >He has access to the page. I.e. the session did not close/terminate when >he closed his browser ... I 'm not where

Re: [PHP] FTP routine

2002-07-04 Thread Michael Sims
On Thu, 4 Jul 2002 20:43:25 +0100, you wrote: >Not really a PHP question - more an FTP protocol question - try reading the >FTP RFC at http://www.ietf.org/rfc/rfc959.txt > >However, in a nutshell, to get all of the files in a directory - > >1. get a listing of that directory (read the RFC for ins

Re: [PHP] Dos Paths

2002-07-10 Thread Michael Sims
On Wed, 10 Jul 2002 13:14:44 +0100, you wrote: >I've got an application that requires dos folder names (8.3 standard) as >input. > >I also have PHP, which quite happily can cope with both. > >Can someone help me write a function to translate full paths to dos paths > >Thanks Maybe this can get y

Re: [PHP] Dos Paths

2002-07-10 Thread Michael Sims
On Wed, 10 Jul 2002 13:14:44 +0100, you wrote: >I've got an application that requires dos folder names (8.3 standard) as >input. > >I also have PHP, which quite happily can cope with both. > >Can someone help me write a function to translate full paths to dos paths Also, go to groups.google.com

Re: [PHP] Dos Paths

2002-07-10 Thread Michael Sims
t's going to translate that into >MYDIRE~1 which won't work. > >HTH > >Danny. Yeah, I mentioned that in my original post (see below). I left that particular issue as an exercise for the reader. :-) >- Original Message - >From: "Michael Sims" <[EMA

Re: [PHP] good article on creating a subscription form/script

2002-07-12 Thread Michael Sims
On Thu, 12 Jul 2001 14:32:57 -0600, you wrote: >I've looked on php.net, phpbuilder.com, and zend.com, but to no avail. >Any suggestions? I don't know of any articles, but I'm actually working on a project that is exactly what you are talking about. I'm going to code the signup interface in PHP

Re: [PHP] ErrorDocument 404 & Form

2002-07-17 Thread Michael Sims
On Thu, 18 Jul 2002 03:21:48 +0200, you wrote: > > Then again, I might not be remembering correctly, so ... > >Well it could have been it, but it doesn't work neither trying to set >the ErrorDocument into a .htaccess file. > >The problem is I am not even sure where is the trouble, and if it shoul

Re: [PHP] Re: Includes vs. Functions

2002-07-17 Thread Michael Sims
On Wed, 17 Jul 2002 17:46:25 -0400, you wrote: >Chris, thanks for describing your method. The reason I really dislike >Functions in PHP is because you have to pass every variable needed by a >function, even if that variable is global in the main script, which is a >pain in the ass when a function

Re: [PHP] Running a PHP Script from UNIX Command Line?

2002-07-17 Thread Michael Sims
On Wed, 17 Jul 2002 16:25:10 -0600, you wrote: >Check the archives on this... > >But you need the executable php Also in the archives are discussions on how to do this using lynx, which does not require an executable PHP, but does require that the script reside somewhere in the document root of

Re: [PHP] Creating Dynamic Variables

2002-07-17 Thread Michael Sims
On Wed, 17 Jul 2002 22:39:10 -0400, you wrote: >Hello, I have captured variables from any HTML that is POSTed to me from a >'foreach' clause. Now, possibly in this foreach clause I want to register >these name/value pairs into a session var. I have tried : >session_start(); >foreach ($HTTP_POST_V

Re: [PHP] Re: Includes vs. Functions

2002-07-18 Thread Michael Sims
On Thu, 18 Jul 2002 08:40:08 -0600, you wrote: See below... >At 09:20 PM 7/17/02 -0500, Michael Sims wrote: > >>$superglobals = array("var1", "var2", "var3", "var4", "var5", "..."); >> >>Now inside

Re: [PHP] Object References Problem

2003-10-30 Thread Michael Sims
On Thu, 30 Oct 2003 22:54:49 +0100, you wrote: >Hi there, > >I'm having trouble with passing objects as references. What I want to >do is something like this: [snip code] >The above code give the output: > >instance: >parent: test > >where I want it to give: > >instance: test >parent: test I do

Re: [PHP] Warning: Cannot send session cookie

2001-12-26 Thread Michael Sims
At 08:54 PM 12/26/2001 -0500, David Jackson wrote: >I'm trying use the script( and html page) to below to set session >variables, but >keep getting the follow errors: [...] > Browser Error Messages - >Warning: Cannot send session cookie - headers already sent by

  1   2   3   >