[PHP] Re: printf and number_format rounding

2006-05-03 Thread Dan Baker
"Duffy, Scott E" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Are printf and number_format supposed to round? echo ($hcount-$lcount)/$hilow." "; echo number_format(($hcount-$lcount)/$hilow,2,'.',''); 0.208333 0.21 0.145833 0.15 0.17 0.17 0.0833

[PHP] Re: programming contests as a way of finding/evaluating offshoretalent...

2006-04-19 Thread Dan Baker
"bruce" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > i'm looking for opinions on the "worth" of programming contests as a way > of > judging the talent of potential software developers... > > any thoughts/pros/cons would be appreciated.. My first thought is: "Won't be a good cri

[PHP] Re: set_time_limit(90*60) and still timing out after 5 minutes on Windows

2006-03-17 Thread Dan Baker
"Dan Baker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have a Windows server (IIS) with PHP and MySQL installed on it. > I have a script that is automatically ran every evening. This script has > a "set_time_limit(90*60)" (90 minutes)

[PHP] set_time_limit(90*60) and still timing out after 5 minutes on Windows

2006-03-17 Thread Dan Baker
I have a Windows server (IIS) with PHP and MySQL installed on it. I have a script that is automatically ran every evening. This script has a "set_time_limit(90*60)" (90 minutes) at the top, but the script seems to just stop functioning after 5 minutes. I do *not* get the line about "execution

[PHP] Re: fopen failing, permission denied

2006-03-01 Thread Dan Baker
(SOLVED, see below) "Dan Baker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Chris" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Dan Baker wrote: >>> I have the following code snippet: >>> $h

[PHP] Re: fopen failing, permission denied

2006-03-01 Thread Dan Baker
"Chris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dan Baker wrote: >> I have the following code snippet: >> $h = fopen("$path/file.txt", 'x+'); >> >> And it generates the following error: >> Warning: fope

[PHP] fopen failing, permission denied

2006-02-28 Thread Dan Baker
I have the following code snippet: $h = fopen("$path/file.txt", 'x+'); And it generates the following error: Warning: fopen(/home/./myarea/file.txt): failed to open stream: Permission denied The path is correct, but the php process doesn't seem to have file permissions in the folder. Is the

[PHP] Re: Reading binary http post

2006-02-21 Thread Dan Baker
"Dirk Vanden Boer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a C++ application that posts binary data to a php script that I > created using libcurl. Everything works fine except when my binary data > happens to start with the '&' symbol. In that case I can't r

[PHP] Re: Ternary operators

2006-02-15 Thread Dan Baker
"Carl Furst" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hey all, > > Question about ternary operators. You can't really use functions INSIDE > ternary operators, right? They can only be tokens and operators? You *can* use functions inside of ternary operators, as long as they r

[PHP] Re: define() or $variable for application settings?

2006-02-09 Thread Dan Baker
>"Matt Arnilo S. Baluyos (Mailing Lists)" <[EMAIL PROTECTED]> >wrote in message > >I have a config.inc.php file which basically contains all the >configuration info that the applications needs (directory/file >locations, database credentials, etc). The information there is set >using the define()

[PHP] Re: The Big Date and Time Debacle

2006-02-07 Thread Dan Baker
"Stephen Martindale" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I am having great difficulty understanding dates and times with PHP and >MySql. > > As far as I understand them, the PHP date and time construct is timezone > and DST aware, but MySql's DATETIME and TIMESTAMP field

[PHP] Re: How to destroy HTTP authentication (from PHP)?

2006-02-01 Thread Dan Baker
"Olaf Greve" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > > Alright: here's a bit of a "challenge" (so as to avoid the word "issue") > ;) my colleagues have run into previously: how to kill HTTP > authentication... The browser only remembers one authentication. So,

[PHP] Re: forwarding from virtual email account to real email account

2006-01-25 Thread Dan Baker
"Binay" <[EMAIL PROTECTED]> wrote: > Hi All, > > Is it possible that we create a virtual email account(no physical > existence) e.g [EMAIL PROTECTED] > which will be associated with a real email account e.g. [EMAIL PROTECTED] so > that if any body sends > the email to virtual email account [EMAIL

[PHP] Re: New to PHP

2006-01-19 Thread Dan Baker
"Jedidiah" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I mentioned earlier that I recently switched my site over to PHP. > I can no longer preview > my pages without uploading the files to the server. This can really > become > a problem when I am making slight formatting chang

[PHP] Re: href difference between OS's.

2005-12-12 Thread Dan Baker
"Marco Kaiser" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] just link directly to the specific file like Link Local NOTE: XP SP2 will *not* open this file. The new security will not open files on local drives. You will need to map a network drive to a folder on your local drive:

[PHP] Re: href links not working in XP

2005-12-12 Thread Dan Baker
"Marlin Unruh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I apologize because I posted this question earlier under Re: [PHP] href >difference between OS's, and am still struggling with the problem. I think >I have fished all the way around the lake, with no results. > > I canno

[PHP] Re: Re: Re: Re: better way to mix html and php code?

2005-11-22 Thread Dan Baker
"Robert Cummings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> I am interested in how this works, but am skeptical. > > No problem, the "programming in X template" instead of "programming in > PHP" objection is raised often. I've given previous arguments about the > merits of te

[PHP] Re: Re: Re: better way to mix html and php code?

2005-11-21 Thread Dan Baker
"Robert Cummings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mon, 2005-11-21 at 13:41, Dan Baker wrote: >> I'm curious ... how do you generally handle forms and urls? What if the >> programmer wants to add a link, something like: >&

[PHP] Re: Re: Re: better way to mix html and php code?

2005-11-21 Thread Dan Baker
"Robert Cummings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mon, 2005-11-21 at 13:41, Dan Baker wrote: > There are two ways for retrieving data. The first you have seen is the > tag form, but obviously that's a problem when the data goes int

[PHP] Re: Re: better way to mix html and php code?

2005-11-21 Thread Dan Baker
"Robert Cummings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Here is an example of a layout template: > > - > > > > > > > > > > > >

[PHP] Re: Re: better way to mix html and php code?

2005-11-17 Thread Dan Baker
"Robert Cummings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thu, 2005-11-17 at 14:34, Dan Baker wrote: >> <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> > Hi to all, >> > always wondered what's bet

[PHP] Re: better way to mix html and php code?

2005-11-17 Thread Dan Baker
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi to all, > always wondered what's better way to mix html and php code. Here are three > "ways" of the same code. Which one you prefer? (And why, of caurse :)) (snip) > I think third solution would be the best solution? IF you are doi

[PHP] Re: Formatting of a number

2005-11-17 Thread Dan Baker
"Scott Parks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi- > > I have a number that I am trying to format. It is data coming from a > main frame and > has 8 characters assigned to it (6 and two decimal places). I have > zerofill set up in > MySQL on this field and am worki

[PHP] Re: Good user comment system?

2005-11-14 Thread Dan Baker
How about good ol' phpbb? http://www.phpbb.com/ DanB "Guy Brom" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > > Anyone familiar with a good user-comment system for PHP, preferably one > that works with adodb and has thread-like design (where users can answer > each ot

[PHP] Re: Create a numeric hash from a text string?

2005-11-14 Thread Dan Baker
Quick-n-easy: int crc32 ( string str ) -- make sure to read the manual about the unsigned/signed issue. DanB "Brian Dunning" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anyone know if there's a handy way to create a numeric hash from a > text string? I'm trying to gen

[PHP] Re: PDF printing under windows.

2005-10-24 Thread Dan Baker
"Dave Lists" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm generating PDFs under windows using PDFlib and all is easy. What I am > wondering though, and google reveals nothing usefull, can I print the PDF > to a network printer from windows? I'm presuming to print the file I

[PHP] Re: Question about including files and server load

2005-10-14 Thread Dan Baker
"Jay Paulson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I just started working with a new company and they handed me some of their > php code for me to look over. I noticed that they have a TON of include > files being called into their scripts. For example, instead of having

[PHP] Re: Server Time Out

2005-10-04 Thread Dan Baker
"Kevin Cloutier" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I'm new to this newsgroup and I'm psyched I found it. But, my newsreader > (Thunderbird), keeps returning a "Connection to server news.php... has > timed out" when ever I try to dload or refresh the messages.

[PHP] Re: trying to figure out the best/efficient way to tell whois loggedintoa site..

2005-09-15 Thread Dan Baker
"Ben" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dan Baker wrote: >> The *main* reason I use $_REQUEST is so I can code up GET and POST pages >> that all are handled by the same php functions. I may have an item >> called "Key"

[PHP] Re: trying to figure out the best/efficient way to tell whois loggedinto a site..

2005-09-14 Thread Dan Baker
"Ben" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dan Baker wrote: > >> Why is using $_REQUEST a security issue? You know every value in the >> entire array came from the end-user, and needs to be validated somehow. >> If your code

[PHP] Re: Re: trying to figure out the best/efficient way to tellwhois logged into a site..

2005-09-14 Thread Dan Baker
"Jim Moseby" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >> (snipped) >> "Ben" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> > Gustav Wiberg wrote: >> >> if (isset($_REQUEST["frmUsername"])) { >> >> >> >> $un = $_REQUEST["frmUsername"]; >> > >> > If you're goi

[PHP] Re: trying to figure out the best/efficient way to tell whois logged into a site..

2005-09-14 Thread Dan Baker
(snipped) "Ben" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Gustav Wiberg wrote: >> if (isset($_REQUEST["frmUsername"])) { >> >> $un = $_REQUEST["frmUsername"]; > > If you're going to use $_REQUEST you might as well just turn on register > globals (no, don't!). > > If you're exp

[PHP] Re: How large string in cookie?

2005-09-09 Thread Dan Baker
"Gustav Wiberg" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > How large can a string be in a cookie? (the value-parameter) If you need (or want) a lot of data stored in cookies, I recommend doing the following: store a single cookie with a unique id (something like "CookieID=ajh

[PHP] Sessions, URL, --enable-trans-id

2005-09-06 Thread Dan Baker
I am using sessions, but every relative URL gets a "?PHPSESSID=..." appended to it. I'm assuming this is happening because of some setting that has been set in PHP. I work on an ISP server, so I don't have much control over the PHP configuration. Is there any way I can turn this "feature" off,

[PHP] Re: sscanf() not returning info

2005-08-29 Thread Dan Baker
"Simon Fredriksson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Can anyone tell me what is wrong here? > > $data = "Pic 1"; > $info = sscanf($data,"%s"); > var_dump($info); > ?> One way to do this is: Pic 1"; sscanf($data,"%s", $class, $href, $text); echo "Class = $class"; echo

[PHP] Re: PHP vs. ColdFusion

2005-08-22 Thread Dan Baker
"Rick Emery" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Quoting Rick Emery <[EMAIL PROTECTED]>: > >> My employer has (finally) decided to take full advantage of our intranet, >> and wants to move from client-server applications to web-based >> applications. > > [snipped] > >>

[PHP] Re: PHP MySQL insert

2005-08-18 Thread Dan Baker
"Jon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Please help with an insert problem. > > Sometimes $data1 could have a comma and that messes up the insert. how do > I > get around that? > > $query = "insert into testtable6 (indx, col1, col2) values (NULL, > '$data1', > '$data