Re: [PHP] mac os x - not getting headers already sent error

2005-03-06 Thread Burhan Khalid
Jonathan Haddad wrote: I do all my development on mac os x. sometimes, to debut a script, i output the query to the page. quite often the page sends headers to go to another page. When i do this, i comment out the header() function and read the results. When i'm done i remove the comment So

Re: [PHP] SOLVED: Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Tom Rogers
Hi, Monday, March 7, 2005, 3:57:50 PM, you wrote: LG> Hello Tom, LG> Sunday, March 6, 2005, 10:00:17 PM, you wrote: TR>> Ok I see where is is going wrong, try this: LG> Oh, very close. Although you have it at $document_root and all LG> that needs to be added is '/include' like below: LG> $i

[PHP] SOLVED: Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Leif Gregory
Hello Tom, Sunday, March 6, 2005, 10:00:17 PM, you wrote: TR> Ok I see where is is going wrong, try this: Oh, very close. Although you have it at $document_root and all that needs to be added is '/include' like below: $include = $document_root . '/include'; Otherwise it's one directory too

[PHP] mac os x - not getting headers already sent error

2005-03-06 Thread Jonathan Haddad
I do all my development on mac os x. sometimes, to debut a script, i output the query to the page. quite often the page sends headers to go to another page. When i do this, i comment out the header() function and read the results. When i'm done i remove the comment Sometimes I've forgotten

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: Help with dates

2005-03-06 Thread Mattias Thorslund
Check out: http://pear.php.net/package/Date According to the description, it lets you compare dates that date pre 1970 and post 2038. /Mattias (If I could only get off ezmlm's "suspicious user list". I think there isn't much I can do, it's my ISP rejecting some PHP list postings.) Kevin wrote:

Re[2]: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Tom Rogers
Hi, Monday, March 7, 2005, 1:08:27 PM, you wrote: LG> Hello Tom, LG> Sunday, March 6, 2005, 6:18:54 PM, you wrote: TR>> and let me see what it prints LG> Still not quite there. LG> Site root LG> ** LG> File name: C:\Sambar\docs\test\test.php LG> Script: /test.php LG> Document root:

Re: [PHP] Can't figure mail & post out

2005-03-06 Thread anirudh dutt
On Mon, 7 Mar 2005 08:37:52 +0530, Zareef Ahmed <[EMAIL PROTECTED]> wrote: > Hi Robert, > > Please take a look at php manual and try to know something about > $_POST, $_GET etc. > Your code is full of errors. > > > On Sun, 6 Mar 2005 15:33:30 -0500, Robert <[EMAIL PROTECTED]> wrote: > > $sendt

[suspicious - maybe spam] [PHP] Re: [suspicious - maybe spam] Re: [PHP] Re: Help with dates

2005-03-06 Thread Kevin
Greetings Mr Mattias, I wish it was so simple. Because the dates that may need calculating can be before 1970. THis function I have.. and it's semi-working, but I've noticed irregularities during the conversion. Thanks for your suggestion!! Yours, Kevin "Mattias Thorslund" <[EMAIL PROTECTED]>

Re: [PHP] Can't figure mail & post out

2005-03-06 Thread Robert
Thanks, I fixed the problem and it's working great. Didn't need the $_POST in the email and needed double quotes around the sender header variable. "Zareef Ahmed" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Robert, > > Please take a look at php manual and try to know somet

RE: [PHP] which class it is?

2005-03-06 Thread yangshiqi
Sorry for that all my friends, I just came from a vocation during the weekend, so I can't read your threads. Thanks for all your help. The debug_backtrace() is powerful to debug, but when I construct my classes with simpleTest or other opensource applications, it contains lots of info that I don't

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Re: Help with dates

2005-03-06 Thread Mattias Thorslund
M. Sokolewicz wrote: well, you can simply use the unix timestamp, since the amount of days / seconds since 0 AD/BC will be a constant (it won't change, trust me), you can simply add it to that, and add a wrapper function to php's time(). You'll be working with VERY big numbers in that case, so

Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Leif Gregory
Hello Tom, Sunday, March 6, 2005, 6:18:54 PM, you wrote: TR> and let me see what it prints Still not quite there. Site root ** File name: C:\Sambar\docs\test\test.php Script: /test.php Document root: C:\Sambar\docs\test\test.php Base: test.php Include: C:\Sambar\docs\test\include OS:

Re: [PHP] Can't figure mail & post out

2005-03-06 Thread Zareef Ahmed
Hi Robert, Please take a look at php manual and try to know something about $_POST, $_GET etc. Your code is full of errors. On Sun, 6 Mar 2005 15:33:30 -0500, Robert <[EMAIL PROTECTED]> wrote: > Hi - > > I am very new to php and can't get this to work right. It keeps telling me > there is no

Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Leif Gregory
Hello Marek, Sunday, March 6, 2005, 7:08:24 PM, you wrote: >> I don't see where that tells me where the include folder would be. MK> If you know how the files are layed out in your application, you do. No... You missed the point of this whole thread which was explained in point 1 and point 2 of t

Re: [PHP] Help with dates

2005-03-06 Thread Kevin
Thank you.. duh... quite useful... not... Where do you think I check first? Yours, Kevin "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sunday 06 March 2005 22:11, Kevin wrote: > > > Right now I'm working on a script that would calculate dates from one > > calenda

Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Marek Kilimajer
Leif Gregory wrote: I'm not sure I'm completely following you. Let's say I had the following: Site root" "c:\apache\htdocs\test" A subfolder of site root "folder1" A subfolder of the above folder1 "folder2" If I call dirname(__FILE__) from a page in each folder I'll get the following respectively:

Re: [PHP] error from 4.3.10: The specified procedure could not be found.

2005-03-06 Thread Tom Rogers
Hi, Monday, March 7, 2005, 4:55:01 AM, you wrote: JM> Forgive me if this has been answered before, but all I was able to find JM> was a "bogus" bug report on this issue that did not contain any useful JM> information. When installing php 4.3.10 on a Win2k3 machine I'm getting JM> the "The specifi

Re: [PHP] Help with dates

2005-03-06 Thread Jason Wong
On Sunday 06 March 2005 22:11, Kevin wrote: > Right now I'm working on a script that would calculate dates from one > calendar to another. The normal calendar we use and a newly invented > one. > > In order to do that I need to find the exact days since the year 0 > BC/AD. However, the functions p

Re[2]: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Tom Rogers
Hi Leif, Monday, March 7, 2005, 10:03:48 AM, you wrote: LG> Hello Tom, LG> Friday, March 4, 2005, 9:13:41 PM, you wrote: TR>> This will set the include path just before the document root: LG> H. Not quite what I'm looking for. I set up some test folders and LG> files on a development machine

Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Leif Gregory
Hello Marek, Sunday, March 6, 2005, 4:23:51 PM, you wrote: MK> dirname(__FILE__) MK> and then get rid of the subpath where the check is made MK> ('/include' for example) I'm not sure I'm completely following you. Let's say I had the following: Site root" "c:\apache\htdocs\test" A subfolder of

Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Leif Gregory
Hello Tom, Friday, March 4, 2005, 9:13:41 PM, you wrote: TR> This will set the include path just before the document root: H. Not quite what I'm looking for. I set up some test folders and files on a development machine to play with your script. Here's how it was laid out: The document root

Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Marek Kilimajer
dirname(__FILE__) and then get rid of the subpath where the check is made ('/include' for example) Leif Gregory wrote: Hello Richard, Friday, March 4, 2005, 11:41:29 AM, you wrote: R> http://php.net/set_include_path Ok... Maybe I should put all this together in one e-mail so that all the issues c

Re: [PHP] stream_set_timeout & get_headers (PHP5)

2005-03-06 Thread Marek Kilimajer
Chris wrote: I'm requesting some remote files to cache on my own server and performing a get_headers() first to find out the file type, since I don't always know what it is. I've discovered some timeout problems with the remote server sometimes and my own script would end up with a fatal er

[PHP] Re: Help with dates

2005-03-06 Thread M. Sokolewicz
well, you can simply use the unix timestamp, since the amount of days / seconds since 0 AD/BC will be a constant (it won't change, trust me), you can simply add it to that, and add a wrapper function to php's time(). You'll be working with VERY big numbers in that case, so you can also do it th

[PHP] Re: Help with dates

2005-03-06 Thread Kevin
Hey mr. Barnett, Unfortunately, I do need an accurate calculation, because the calculation will run 2 ways. From and to our calendar. I have no problem creating my own datefunctions if I have some idea on how PHP handles the current ones as a template. Then I can figure out the rest for myself.

Re: [PHP] Re: Undefined Variable Problems...

2005-03-06 Thread Guillermo Rauch
Also, since this is a very massive list with high traffic, quote when necessary. For example, consider this message: > Can i draw something ? Yes you can > Thanks You're welcome In that case quote is quite useful :D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

RE: [PHP] Re: Undefined Variable Problems...

2005-03-06 Thread Nick Zukin
Sorry, as I said, I just joined and I didn't notice that it's set to reply-to the original sender rather than the list. A bit annoying. Thanks again. Nick -Original Message- From: Jason Barnett [mailto:[EMAIL PROTECTED] Sent: Sunday, March 06, 2005 1:10 PM To: php-general@lists.php.net

[PHP] Re: Undefined Variable Problems...

2005-03-06 Thread Jason Barnett
Please keep responses on the mailing list / newsgroup... Nick Zukin wrote: > Thanks for the quick response. > > Yes, had to turn register_globals on because it broke things. Many of these > sites aren't mine and I have no idea what's involved in trying to fix them > all. If you saw a full 1.2 GB

[PHP] Re: Help with dates

2005-03-06 Thread Jason Barnett
Kevin wrote: > Hi there, > > I seem to be in a bit of a pickle. > > Right now I'm working on a script that would calculate dates from one > calendar to another. The normal calendar we use and a newly invented one. > > In order to do that I need to find the exact days since the year 0 BC/AD. Do

[PHP] Can't figure mail & post out

2005-03-06 Thread Robert
Hi - I am very new to php and can't get this to work right. It keeps telling me there is no send header. I have tried multiple variations? Any ideas? I am simply trying to query the database and send out an email to each person in my database. Thanks, Robert $query = "SELECT first_name,

[PHP] Re: Undefined Variable Problems...

2005-03-06 Thread Jason Barnett
Nick Zukin wrote: ... > line 79, if ($forum_admin == 1) { > line 486, $uname = $cookie[1]; > line 216, $pwd = "$user[2]"; > > Line 79 is not part of a function or class. It is the first reference to > $forum_admin in the script. The other two are within functions and the > first call within tho

[PHP] Undefined Variable Problems...

2005-03-06 Thread Nick Zukin
Sorry if this has been covered before. I just joined this list. My host just upgraded PHP to 4.3.10 from 4.1.2. A couple of my clients are using systems such as PHP-NUKE or various message boards. I hadn't been paying attention to my log files, but all of a sudden they got huge, especially the

Re: [PHP] Opening files....

2005-03-06 Thread Guillermo Rauch
> Hello, > I want to open files in a directory other than the Document root via > HTTP on the client machine. How do i do it ? Yes, it's possible Just supose you have the images under /var/images/. This won't be acceded by apache since it's out of documentroot. You can set up some alias to /var/i

[PHP] Opening files....

2005-03-06 Thread Vaibhav Sibal
Hello, I want to open files in a directory other than the Document root via HTTP on the client machine. How do i do it ? For example I have .JPG files in a directory /toallocate on my Server running FC2, Apache2, Mysql, PHP5. I allocated certain .JPG files to some users and moved them to a director

[PHP] error from 4.3.10: The specified procedure could not be found.

2005-03-06 Thread Javier Muniz
Forgive me if this has been answered before, but all I was able to find was a "bogus" bug report on this issue that did not contain any useful information. When installing php 4.3.10 on a Win2k3 machine I'm getting the "The specified procedure could not be found." Error from any php page I attempt

Re: [PHP] Newbie question: qutoes?

2005-03-06 Thread Matt Harnaga
You might want to check this out as well: http://www.zend.com/zend/tut/using-strings.php rory walsh wrote: Can anyone tell me if there is a difference between double quotes and single quotes? Cheers, Rory. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Newbie question: qutoes?

2005-03-06 Thread rory walsh
Thanks guys, that clears up a lot! Cheers, actually I have to say goodbye to broadband for a while so I hope that I can make it on my own! That's why I have been asking all these obvious little questions! Cheers, Rory. Jochem Maas wrote: rory walsh wrote: Can anyone tell me if there is a differe

Re: [PHP] Newbie question: qutoes?

2005-03-06 Thread Matt Harnaga
Double quotes expand variables, that is, if $a = 2, then echo "The value is $a2"; will print "The value is 2". Single quotes return strings literally. So, echo 'The value is $a2' would print The value is $a2 Cheers rory walsh wrote: Can anyone tell me if there is a difference between double quote

Re: [PHP] Newbie question: qutoes?

2005-03-06 Thread Jochem Maas
rory walsh wrote: Can anyone tell me if there is a difference between double quotes and single quotes? Cheers, Rory. apart from the visual difference :-)... yes. with double quotes string interpolation is done. whats that? run this code to see the difference: $varA = 123; echo ' this is $varA';

Re: [PHP] Newbie question: qutoes?

2005-03-06 Thread James Williams
rory walsh wrote: Can anyone tell me if there is a difference between double quotes and single quotes? Cheers, Rory. What's up Rory... actually there *is* a difference. Double quotes are parsed by the php engine, meaning it goes through and finds variables and stuff which it can parse, ex. prin

Re: [PHP] Re: How can i calculate total process time?

2005-03-06 Thread James Williams
Eli wrote: On top use this: On the end use this: ".round($endtime-$starttime,3)." sec"; ?> If you want a nice object oriented solution that's easy to use over and over again which does pretty much the same thing, give this class a whirl. class page_gen { // // PRIVATE - DO NOT MODIFY // v

[PHP] Newbie question: qutoes?

2005-03-06 Thread rory walsh
Can anyone tell me if there is a difference between double quotes and single quotes? Cheers, Rory. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] 'Insulate' db connection

2005-03-06 Thread Andre Dubuc
On Sunday 06 March 2005 11:47 am, Mattias Thorslund wrote: > Since you can use fopen, I don't think open_basedir is the problem. > Read about open_basedir here: http://us3.php.net/features.safe-mode > > Maybe the path that you use in the include is wrong? > > /Mattias > > Andre Dubuc wrote: > >Hi,

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] 'Insulate' db connection

2005-03-06 Thread Mattias Thorslund
Since you can use fopen, I don't think open_basedir is the problem. Read about open_basedir here: http://us3.php.net/features.safe-mode Maybe the path that you use in the include is wrong? /Mattias Andre Dubuc wrote: Hi, I am trying to 'insulate' my database connection from prying eyes by moving

Re: [PHP] warning & question about mysql sessions & concurrency

2005-03-06 Thread Josh Whiting
On Sun, Mar 06, 2005 at 02:27:53PM +, Chris Smith wrote: > Josh Whiting wrote: > >I've been trying to switch to MySQL-based session storage instead of the > >native PHP session storage. In doing so, I've run into a lot of code on > >the web that exhibits a serious flaw regarding concurrent req

Re: [PHP] cache engine

2005-03-06 Thread Chris Smith
Evert - Rooftop Solutions wrote: Mark Charette wrote: Evert - Rooftop Solutions wrote: I heard that shared memory is actually slower than writing and reading a file and it is not available on windows systems. Hmmm ... that's an interesting thing you heard concerning shared memory. Care to share

Re: [PHP] warning & question about mysql sessions & concurrency

2005-03-06 Thread Chris Smith
Josh Whiting wrote: I've been trying to switch to MySQL-based session storage instead of the native PHP session storage. In doing so, I've run into a lot of code on the web that exhibits a serious flaw regarding concurrent requests from the same client. All the code I've seen has glossed over t

[PHP] Help with dates

2005-03-06 Thread Kevin
Hi there, I seem to be in a bit of a pickle. Right now I'm working on a script that would calculate dates from one calendar to another. The normal calendar we use and a newly invented one. In order to do that I need to find the exact days since the year 0 BC/AD. However, the functions php provid

[PHP] 'Insulate' db connection

2005-03-06 Thread Andre Dubuc
Hi, I am trying to 'insulate' my database connection from prying eyes by moving the db connection code to a directory above docroot and then calling it by an include. However, my IP has an open_basedir restriction in effect that defeats what I'm trying to do. Perhaps I'm unclear what what the

RE: [PHP] Re: check to see if a string contains sudden elements

2005-03-06 Thread Reinhart Viane
$ret = explode('|', $_GET['id']); if(count($ret) > 1) { $id = $ret[1]; } else { $id = $ret[0]; } Suberb, This indeed did the trick. Aargh I hate when things are this simple and I just can't seem to find them... Thx! -- PHP General Mailing List (http://www.php.net/) To unsubscri

[PHP] Re: How can i calculate total process time?

2005-03-06 Thread Eli
M. Sokolewicz wrote: fetch the microtime() at the top of the script, and at the bottom of the script you fetch it again. Subtract the first from the later, and you're left with the time it took. Then change it to a human-readable form, and you're done. You can't get closer without hacking the ZE

Re: [PHP] Passwords?

2005-03-06 Thread Jason Wong
On Sunday 06 March 2005 21:03, AdamT wrote: > If the password is stored in between the tags, then it > shouldn't get sent to the browser unless you specifically send it > there. For *any* php code it is best to use tags. These tags will work on *all* php enabled webservers. The short tags is

Re: [PHP] Passwords?

2005-03-06 Thread rory walsh
Cheers, I'll give your suggestions a go. Jochem Maas wrote: [EMAIL PROTECTED] wrote: Hi Rory You can use crypt to encode a password, let say you want the password to be "my password", create a new php file : echo crypt("my password"); then you get a unique encoded string something like 'A

[PHP] Re: check to see if a string contains sudden elements

2005-03-06 Thread M. Sokolewicz
Reinhart Viane wrote: I have a page which gets the id of a user from the url. $_GET[id] Now this id can have two forms: Normal: page.php?id=1 Not so normal: page.php?id=whatever|1 I can explode the second string so I only have the number (1). Explode ("|", $_GET(id)) But this command fails my

[PHP] check to see if a string contains sudden elements

2005-03-06 Thread Reinhart Viane
I have a page which gets the id of a user from the url. $_GET[id] Now this id can have two forms: Normal: page.php?id=1 Not so normal: page.php?id=whatever|1 I can explode the second string so I only have the number (1). Explode ("|", $_GET(id)) But this command fails my query in case w

Re: [PHP] Passwords?

2005-03-06 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Hi Rory You can use crypt to encode a password, let say you want the password to be "my password", create a new php file : echo crypt("my password"); then you get a unique encoded string something like 'ABC12Fdfi654sdfkfpr67UPL' copy it and delete the php file in

Re: [PHP] Passwords?

2005-03-06 Thread AdamT
On Sun, 06 Mar 2005 11:34:39 +, rory walsh <[EMAIL PROTECTED]> wrote: > I want to create a simple as possible password script, how secure is it > to have the password actually appear in the script? I only need one > password so I thought that this would be more straightforward than > having a f

RE: [PHP] Passwords?

2005-03-06 Thread YaronKh
Hi Rory You can use crypt to encode a password, let say you want the password to be "my password", create a new php file : echo crypt("my password"); then you get a unique encoded string something like 'ABC12Fdfi654sdfkfpr67UPL' copy it and delete the php file in your password validatio

[PHP] Passwords?

2005-03-06 Thread rory walsh
I want to create a simple as possible password script, how secure is it to have the password actually appear in the script? I only need one password so I thought that this would be more straightforward than having a file which contains the password. I am not using any database. Actually this le

Re: [PHP] unexplainable - page generation time class

2005-03-06 Thread Ian Firla
I think the problem is how, when and where you're calling things. Basically, your code is fine. I modified it slightly and get the correct output. This could still be cleaned up and optimised significantly; however, I think you can take it from here: Your Class: cls_start_time = $microstart[0]