Re: [PHP] get value of array without key

2004-07-13 Thread Prasit Narkdee
"Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wednesday 14 July 2004 11:54, Prasit Narkdee wrote: > > $tmp = unpack("d", substr($this->data, $spos + 6, 8)); > > // It machine machine dependent > > > > if ($this->isDate($spos)

[PHP] Compile Php5: --with-mysql and --with-mysqli

2004-07-13 Thread Jacob Friis Larsen
How do I install Php5 with both --with-mysql and --with-mysqli? MySQL is 4.1.3-beta and installed as official MySQL RPM. This didn't work: ./configure --with-mysql=/usr/include/mysql --enable-embedded-mysqli ./configure --with-mysql=/usr/include/mysql --with-mysql=/usr/bin/mysql_config ./configure

[PHP] PHPEdit almost as good as s*x (with a women in bikini)

2004-07-13 Thread EE
Sorry Guys, I know that this is off-topic. In one of the sites,I saw the subject AD {PHPEdit almost as good as s*x (with a women in bikini)}. This is really irritating. What sex has to do with PHP. Does the PHPEdit folks think that I will use their product if it is as good as s*x. Sorry, really sor

RE: [PHP] A question not directly related to PHP

2004-07-13 Thread Ed Lazor
How are you resolving hostnames? Are relevant IPs/Hostnames in your hosts file? Does the local machine have mynotebook mapped to 127.0.0.1? > -Original Message- > A curious thing has been happening. When I run the PHP script on my > machine using localhost, the script executes perfectl

Re: [PHP] DAYLIGHT SAVINGS TIME OR NOT

2004-07-13 Thread Curt Zirzow
* Thus wrote Chirag Shukla: > > This function can be used to know whether it is Daylight Savings time or > not for the given date. It may not be the most optimized program, but > may be helpful. > > If there is a modified code, please let me know. ok. > > > // here is the date. We w

Re: [PHP] get value of array without key

2004-07-13 Thread Jason Wong
On Wednesday 14 July 2004 11:54, Prasit Narkdee wrote: > $tmp = unpack("d", substr($this->data, $spos + 6, 8)); > // It machine machine dependent > > if ($this->isDate($spos)) { > list($string, $raw) = $this->createDate($tmp['']); >

[PHP] get value of array without key

2004-07-13 Thread Prasit Narkdee
$tmp = unpack("d", substr($this->data, $spos + 6, 8)); // It machine machine dependent if ($this->isDate($spos)) { list($string, $raw) = $this->createDate($tmp['']); // $this->addcell(DateRecord($r, 1));

Re: [PHP] Opinion: PHP Sessions or Cookies

2004-07-13 Thread Jason Wong
On Wednesday 14 July 2004 12:45, Chris Shiflett wrote: > The way I interpret your question is to ask whether it's better to store > session data on the server (in $_SERVER) or on the client (in cookies). So that people don't get confused: $_SERVER should be $_SESSION. -- Jason Wong -> Gremlins

Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Josh Close
That sounds about right. It pretty much described the behavior between the two versions. Thanks for the info. On Tue, 13 Jul 2004 18:44:06 -0500, Michael Sims <[EMAIL PROTECTED]> wrote: > Curt Zirzow wrote: > > * Thus wrote Josh Close: > >> if($var) > >> > >> used to work for > >> > >> if($var

Re: [PHP] Opinion: PHP Sessions or Cookies

2004-07-13 Thread Chris Shiflett
--- Ed Lazor <[EMAIL PROTECTED]> wrote: > I'm using PHP sessions for user tracking. My host provider's server is > dropping session data. He swears it's my scripts and says I should be > using cookies for better security. That goes completely opposite to my > understanding, so I'd like to run it

Re: [PHP] FW: NO SUCH ADDRESS

2004-07-13 Thread Jason Wong
On Wednesday 14 July 2004 11:29, Curt Zirzow wrote: > > I've already added that domain to my spam list and forgot lazy people > > who does not unsubscribe from the list. > > I've mentioned this everytime this topic comes up, and every time > it comes up, this solution is always given. And I'm goin

[PHP] A question not directly related to PHP

2004-07-13 Thread Feroze Arif
Hi, I am using a notebook running Windows XP Professional with IIS for my PHP development. I am developing an application that generates RTF files on the fly and stores them in a directory. A curious thing has been happening. When I run the PHP script on my machine using localhost, the scri

Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Josh Close
That sounds about right. It pretty much described the behavior between the two versions. Thanks for the info. On Tue, 13 Jul 2004 18:44:06 -0500, Michael Sims <[EMAIL PROTECTED]> wrote: > Curt Zirzow wrote: > > * Thus wrote Josh Close: > >> if($var) > >> > >> used to work for > >> > >> if($var !

[PHP] DAYLIGHT SAVINGS TIME OR NOT

2004-07-13 Thread Chirag Shukla
This function can be used to know whether it is Daylight Savings time or not for the given date. It may not be the most optimized program, but may be helpful. If there is a modified code, please let me know. Thank you. Sincerely, Chirag Shukla. // here is the date. We wont worry about t

[PHP] GMT to local time (CDT in this case)

2004-07-13 Thread Chirag Shukla
// I am using the convention (assumption) of "07/04/2004 14:45" $processdate = "07/04/2004 14:45"; // gmttolocal is a function // i am passing it 2 parameters: // 1)the date in the above format and // 2)time difference as a number; -5 in our case (G

Re: [PHP] FW: NO SUCH ADDRESS

2004-07-13 Thread Curt Zirzow
* Thus wrote Jordi Canals: > Ed Lazor wrote: > > >Am I the only one getting these every time I post to the list? > > > Everyone is getting it. But we cannot know wich address is giving back > this message, as it is not reported. Just we know the domain it comes from. I've put in a request to uns

[PHP] Grab a range of rows from a mysql result

2004-07-13 Thread [EMAIL PROTECTED]
I need to grab a range of rows from a mysql result resource. The resource is made up of 1000+ records from a mysql table that I am breaking up to make my PHP application run faster. I have figured out how to compute the range but I don¹t know how to pull out a group of rows within a range from a

Re: [PHP] Grab a range of rows from a mysql result

2004-07-13 Thread Travis Low
select * from foo limit n, m n == starting index, zero-based m == maximum number of rows to return. You probably shouldn't cross-post to different mailing lists. cheers, Travis [EMAIL PROTECTED] wrote: I need to grab a range of rows from a mysql result resource. The resource is made up of 1000+ rec

[PHP] Compiling PHP 5.0.0 on Windows with IIS 5.1

2004-07-13 Thread Sean Vasey
Could anyone explain how to install PHP 5 on Windows running IIS 5.1? I following the supplied instructions but the extensions were not loading and I had them configured correctly in php.ini and when I would create a phpinfo page, there would be access errors and the PHP and Zend logos would not

Re: [PHP] Some weong when I start the apache and PHP

2004-07-13 Thread YY Liu
Yes! I try to point the browser to http://localhost:8081 and it works! Thank you all! Michal Migurski <[EMAIL PROTECTED]> wrote: > Hello everyone! > > I just have installed the apache and PHP. When I installed apache, I ran > the command "./apachectl start" in its directory and there was an > i

Re: [PHP] Some weong when I start the apache and PHP

2004-07-13 Thread Michal Migurski
> Hello everyone! > > I just have installed the apache and PHP. When I installed apache, I ran > the command "./apachectl start" in its directory and there was an > information showing that it has been running, but when I input > "http://localhost/"; in browser I can't link to localhost.The error >

[PHP] Some weong when I start the apache and PHP

2004-07-13 Thread YY Liu
Hello everyone! I just have installed the apache and PHP. When I installed apache, I ran the command "./apachectl start" in its directory and there was an information showing that it has been running, but when I input "http://localhost/"; in browser I can't link to localhost.The error mesage i

RE: [PHP] FW: NO SUCH ADDRESS

2004-07-13 Thread Ed Lazor
> -Original Message- > Everyone is getting it. But we cannot know wich address is giving back > this message, as it is not reported. Just we know the domain it comes > from. The guy lists [EMAIL PROTECTED] as his email address on the site. I bet that's the one bouncing. -Ed -- PHP Gene

Re: [PHP] FW: NO SUCH ADDRESS

2004-07-13 Thread Jordi Canals
Ed Lazor wrote: Am I the only one getting these every time I post to the list? Everyone is getting it. But we cannot know wich address is giving back this message, as it is not reported. Just we know the domain it comes from. I've already added that domain to my spam list and forgot lazy people

Re: [PHP] PHP on MAC

2004-07-13 Thread Michael Collins
At 7:32 PM -0400 7/13/04, Larry E. Ullman wrote: We've just bought a new Power Mac G5 Macintosh computer for the office and I'll need to do some backend engineering work using it. I've never worked with PHP on MAC, so I really have no experience with what happens on a MAC... are there on issues reg

[PHP] WAMP5 1.0 : now includes PHP 5.0.0

2004-07-13 Thread romain bourdon
It just comes out of the oven, WAMP5 1.0 now includes PHP 5.0.0 released a few hours ago. This new version installs PHP 5.0.0, apache 1.3.31, MySQL 4.0.18, a service manager as a tray icon...and much more : http://www.en.wampserver.com (english) http://www.wampserver.com (français) Thanks to th

RE: [PHP] PHP on MAC

2004-07-13 Thread PHP Junkie
Astrum Et Securis AWESOME!! Needed to hear something like that.. Thanks a ton! And I will definitely get the Installer from the mentioned location. Thank you. Dominor, RSJ -Original Message- From: Larry E. Ullman [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 13, 2004 7:32 PM To: PHP J

Re: [PHP] Templates Are Driving me Nuts

2004-07-13 Thread Paul Bissex
On Tue, 13 Jul 2004 10:48:34 -0400, John W. Holmes <[EMAIL PROTECTED]> wrote: [snip] > Everyone has their own ideas on whether this is needed and what kind of > templates to use. There are a ton of engines out there that you can use. > Some are simple and some turn into programming languages of the

Re: [PHP] HTTP Session Recorder?

2004-07-13 Thread Justin Patrin
On Tue, 13 Jul 2004 19:42:19 -0400, John W. Holmes <[EMAIL PROTECTED]> wrote: > Does anyone know of a program that'll "record" the clicks and requests > as I go through a site? Something that'll watch as I click on links, > fill in forms, etc and then be able to perform the same requests > (duplica

[PHP] HTTP Session Recorder?

2004-07-13 Thread John W. Holmes
Does anyone know of a program that'll "record" the clicks and requests as I go through a site? Something that'll watch as I click on links, fill in forms, etc and then be able to perform the same requests (duplicating the forms, cookies, etc)?? Maybe a PHP script that can be dropped into an exi

RE: [PHP] php 4.3.7/5.0

2004-07-13 Thread Michael Sims
Curt Zirzow wrote: > * Thus wrote Josh Close: >> if($var) >> >> used to work for >> >> if($var != 0) or if($var != "0") >> >> but that doesn't seem to work since I upgrade. So I'm just going to >> do >> >> if((int)$var) > > I still think this is unnecessary > > if ("0") { echo '"0"'; } > if ("") {

Re: [PHP] PHP on MAC

2004-07-13 Thread Larry E . Ullman
We've just bought a new Power Mac G5 Macintosh computer for the office and I'll need to do some backend engineering work using it. I've never worked with PHP on MAC, so I really have no experience with what happens on a MAC... are there on issues regarding working with PHP on a MAC? Not at all. O

[PHP] PHP on MAC

2004-07-13 Thread PHP Junkie
Astrum Et Securis We've just bought a new Power Mac G5 Macintosh computer for the office and I'll need to do some backend engineering work using it. I've never worked with PHP on MAC, so I really have no experience with what happens on a MAC... are there on issues regarding working with PHP on a

[PHP] PHP 5.0.0 Released!

2004-07-13 Thread Andi Gutmans
The PHP development team is proud to announce the official release of PHP 5. Some of the key features of PHP 5 include: - The Zend Engine II with a new object model and dozens of new features. - XML support has been completely redone in PHP 5, all extensions are now focused around the excellent li

Re: [PHP] Yay!

2004-07-13 Thread rogerk
Quoting Matthew Sims <[EMAIL PROTECTED]>: > > PHP5 released today! (for those that don't know yet) ;) Jeez, now my users will be demanding we run a .0.0 release of a language that's incompatible with what they were running yesterday... :) Seriously, congrats. -- PHP General Mailing List (http:

[PHP] Yay!

2004-07-13 Thread Matthew Sims
PHP5 released today! (for those that don't know yet) ;) http://www.php.net/ --Matthew Sims -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Jason Wong
On Wednesday 14 July 2004 05:07, Jamie wrote: > > You want to specifically check for > > > > $_SERVER["HTTPS"] == "on" > > > > because if you're not using HTTPS then $_SERVER["HTTPS"] does not exist. > > If this is the case why does it work ok on my windows box? Who cares what happens on a Wind

Re: [PHP] Re: Anyone knows when PHP5 is released?

2004-07-13 Thread John W. Holmes
Ben Ramsey wrote: Aidan Lister wrote: "When it's ready" Hopefully we'll see the stable release in the next 24 hours. There was a post to the internals@ list yesterday. Andi announced a test roll of 5.0.0 saying that he would release PHP 5 within the next 24 hours "if all goes well." Keep your

Re: [PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Curt Zirzow
* Thus wrote Jamie: > The code im using to test is: > if ($_SERVER["HTTPS"] == "off") > { > print "We are not using HTTPS"; > } > else > { > print "We are using HTTPS"; > } > > > On my windows machine it works as expected with it displaying the correct > message when using https and http. When i

[PHP] Re: PHP and Excel

2004-07-13 Thread Kim Steinhaug
I might be wrong, but if your client are using all the functions available in Excel Im pretty sure you wont get this to work. Ive tested a few of the Excel converters for PHP and they all work nice with simple Excel spreadsheets, but once you start doing it Excel style... Your on your own... If yo

[PHP] Re: Opinion: PHP Sessions or Cookies

2004-07-13 Thread Kim Steinhaug
Sessions are the best thing to use, cookies are nice as a supplement. If you want your users to be able to "auto-login" cookies are just the thing to use, but apart from this cookies are not my favourite. Another thing is that many browsers nowaydays have turned cookies all off.. I remember a frie

[PHP] Re: encryption needed?

2004-07-13 Thread Kim Steinhaug
if there is a system of your id's, like 1.. 2... 3... 4.. and such, you should consider obfuscating the id's. Especially if you dont have any form of login system that serve the client the id they want. What you really should consider is having a login system that after the user is logged in you s

RE: [PHP] encryption needed?

2004-07-13 Thread Ed Lazor
I wouldn't encrypt the ID, but I can't help wonder why you don't want people knowing the company's ID. They can get access to it if you're storing it client-side. This is like using a single script to view documents where you provide the ID of the document to display. http://localhost/view.php?I

Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Curt Zirzow
* Thus wrote Josh Close: > I'm positive that it will always be set, 'cause I set it. It's just > going the comparison. > > if($var) > > used to work for > > if($var != 0) or if($var != "0") > > but that doesn't seem to work since I upgrade. So I'm just going to do > > if((int)$var) I still t

Re: [PHP] FW: NO SUCH ADDRESS

2004-07-13 Thread Justin Patrin
Nope, I'm getting them too. This address should be removed from the list...whatever it is. On Tue, 13 Jul 2004 15:19:41 -0700, Ed Lazor <[EMAIL PROTECTED]> wrote: > Am I the only one getting these every time I post to the list? > > > > > > -Original Message- > > From: GUNSMOKE MAIL DAE

[PHP] FW: NO SUCH ADDRESS

2004-07-13 Thread Ed Lazor
Am I the only one getting these every time I post to the list? > -Original Message- > From: GUNSMOKE MAIL DAEMON [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 13, 2004 3:13 PM > To: Ed Lazor > Subject: NO SUCH ADDRESS > > This is an automated message from the email daemon at Gunsmoke.

[PHP] encryption needed?

2004-07-13 Thread klaus
Hi all, I am to set up a service where users can view news of companies. To identify the company selected an easy way is to use the company-id. The id is not displayed but stored in the client browser as JS-variable. Question: Is it ok to use the company-id or do I have to encrypt the id using mc

RE: [PHP] Opinion: PHP Sessions or Cookies

2004-07-13 Thread Ed Lazor
> -Original Message- > Looks like /tmp directory is out of space. Change the directory to your > own, it's more secure anyway. I keep watching and /tmp seems ok space-wise, but I like the idea of overriding where session files are stored. I just made that change and I'm waiting for feed

Re: [PHP] Opinion: PHP Sessions or Cookies

2004-07-13 Thread Justin Patrin
Sounds like it could be a permissions issue to /tmp, but that's not likely as some work and some don't. More likely, /tmp isn't big enough. Ask the provider to check to see if it's being filled up (you can also check yourself with the 'df' command on the command-line). It could also be an old vers

Re: [PHP] Opinion: PHP Sessions or Cookies

2004-07-13 Thread Marek Kilimajer
Ed Lazor wrote: I'm using PHP sessions for user tracking. My host provider's server is dropping session data. He swears it's my scripts and says I should be using cookies for better security. That goes completely opposite to my understanding, so I'd like to run it by you guys. Which is more sec

[PHP] Opinion: PHP Sessions or Cookies

2004-07-13 Thread Ed Lazor
I'm using PHP sessions for user tracking. My host provider's server is dropping session data. He swears it's my scripts and says I should be using cookies for better security. That goes completely opposite to my understanding, so I'd like to run it by you guys. Which is more secure: PHP session

[PHP] Re: How to make HTTP call to another address?

2004-07-13 Thread Manuel Lemos
Hello, On 07/12/2004 02:24 PM, Matt Busche wrote: I've recently set up some Tomcat/Java/Servlet stuff that provides some high-level functions I wish to make available from PHP. In other words, from PHP, I want to make an HTTP call to an address like: http://mycompany.com/myservlet?request=doSometh

[PHP] Re: Sending email without an email server

2004-07-13 Thread Manuel Lemos
Hello, On 07/13/2004 07:46 AM, Robert Mena wrote: I have a small script hosted in a win32/apache/php4 enviroment where I do not have a local email server. I was wondering how could I send emails either connecting directly to the mx or sending through a relay. These classes together do exactly that.

Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Josh Close
I'm positive that it will always be set, 'cause I set it. It's just going the comparison. if($var) used to work for if($var != 0) or if($var != "0") but that doesn't seem to work since I upgrade. So I'm just going to do if((int)$var) from now on, 'cause that should always work. I'll typecast

Re: [PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Jamie
> You want to specifically check for > > $_SERVER["HTTPS"] == "on" > > because if you're not using HTTPS then $_SERVER["HTTPS"] does not exist. > If this is the case why does it work ok on my windows box? Shouldnt it have same output accross all platforms? -- PHP General Mailing List (http://

Re: [PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Jason Wong
On Wednesday 14 July 2004 04:57, Jamie wrote: > The code im using to test is: > if ($_SERVER["HTTPS"] == "off") > { > print "We are not using HTTPS"; > } > else > { > print "We are using HTTPS"; > } > > > On my windows machine it works as expected with it displaying the correct > message when using

Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread deseavers
http://marc.theaimsgroup.com/?l=php-general&m=108646344905178&w=2 -Original Message- From: Matthew Sims <[EMAIL PROTECTED]> Sent: Jul 13, 2004 12:15 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] php 4.3.7/5.0 > I've noticed that in the last release of php 4.3.7 (or 5.0.0), that > when chec

Re: [PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Jamie
> Try $_ENV['HTTPS'] That prints nothing at all on windows and linux. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Jamie
The code im using to test is: if ($_SERVER["HTTPS"] == "off") { print "We are not using HTTPS"; } else { print "We are using HTTPS"; } On my windows machine it works as expected with it displaying the correct message when using https and http. When i use my linux box it constantly displays "We ar

Re: [PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Marek Kilimajer
More about your setup? Try $_ENV['HTTPS'], or access phpinfo() page using https and see what you get. Jamie wrote: Hi, That code I sent is running on a Cobalt Linux server. -Dan Joseph Why does it work for you then and not for me on a rhl 9 setup? On phpinfo I have: SCRIPT_URI https://host.mydo

RE: [PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Dan Joseph
Hi, Can you post your code so we can look at it? -Dan Joseph > -Original Message- > From: Jamie [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 13, 2004 4:48 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Detecting if browser is using a HTTP or > HTTPS connection to view the

Re: [PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Jamie
> Hi, > > That code I sent is running on a Cobalt Linux server. > > -Dan Joseph > Why does it work for you then and not for me on a rhl 9 setup? >On phpinfo I have: > >SCRIPT_URI > https://host.mydomain.com/phpinfo.php >_SERVER["SCRIPT_URI"] > https://host.mydomain.com/phpinfo.php > >Michael. Ac

RE: [PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Dan Joseph
Hi, That code I sent is running on a Cobalt Linux server. -Dan Joseph > -Original Message- > From: Jamie [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 13, 2004 3:37 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Detecting if browser is using a HTTP or > HTTPS connection to view the

Re: [PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Michael Gale
Hello, What about the following variables: On phpinfo I have: SCRIPT_URI https://host.mydomain.com/phpinfo.php _SERVER["SCRIPT_URI"] https://host.mydomain.com/phpinfo.php Michael. On Tue, 13 Jul 2004 20:37:07 +0100 "Jamie" <[EMAIL PROTECTED]> wrote: > Thanks for your reply Dan, > > I

Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Josh Close
I think I'll just have to typecast everything, that should always work then. On Tue, 13 Jul 2004 15:47:40 -0400, Adam Bregenzer <[EMAIL PROTECTED]> wrote: > On Tue, 2004-07-13 at 15:35, Josh Close wrote: > > The problem is, if 0 gets changed to "0" somewhere throughout. That's > > why I've alway

Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Adam Bregenzer
On Tue, 2004-07-13 at 15:35, Josh Close wrote: > The problem is, if 0 gets changed to "0" somewhere throughout. That's > why I've always used if($var) because it's usually not cared what the > type is, but it seems to now. You can typecast values as well, this may be a good way to achieve what you

RE: [PHP] php 4.3.7/5.0

2004-07-13 Thread Michael Sims
Josh Close wrote: > $result = mssql_query($sql); > $row = mssql_fetch_array($result); > $var = $row[0]; > > So it should be an int. And if it's copied into a function it > shouldn't be changed. > > But doing > > if($var) > > doesn't seem to work after I upgraded versions. Which is making me > think

Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Justin Patrin
On Tue, 13 Jul 2004 14:35:32 -0500, Josh Close <[EMAIL PROTECTED]> wrote: > Well, the actual code is hard to tell. It's grabbed from a db so it > should be an int. But it's also run through some functions. That's why > I'd like a to tell what's going on better. > > The variable is always set. Basi

Re: [PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Jamie
Thanks for your reply Dan, I have tried the $_SERVER['HTTPS'] on windows and it works fine. It replys off when HTTPS isnt working and on when it is. But on linux it does nothing. Can someone please confirm if this works or it does not work as i need a method that is cross platform compatitable. T

Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Josh Close
Well, the actual code is hard to tell. It's grabbed from a db so it should be an int. But it's also run through some functions. That's why I'd like a to tell what's going on better. The variable is always set. Basically $result = mssql_query($sql); $row = mssql_fetch_array($result); $var = $row[0

Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Curt Zirzow
* Thus wrote Josh Close: > I've noticed that in the last release of php 4.3.7 (or 5.0.0), that > when checking the value of a variable has changed. > > ex: > > if($var){ /* do something */ } These values will all *not* do something: var_dump((bool) 0); var_dump((bool) array()); var_dump(

Re: [PHP] php 4.3.7/5.0

2004-07-13 Thread Matthew Sims
> I've noticed that in the last release of php 4.3.7 (or 5.0.0), that > when checking the value of a variable has changed. > > ex: > > if($var){ /* do something */ } > > doesn't work anymore. I've had to change code to > > if($var > 0) > > but the problem is, what if $var was converted to $var = "0

RE: [PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Dan Joseph
Hi, if ($_SERVER["HTTPS"] != "on") { $newurl = "https://"; . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; header("location: $newurl"); die; } That's how I do it.. -Dan Joseph > Is there a way to detect if a browser is using

[PHP] php 4.3.7/5.0

2004-07-13 Thread Josh Close
I've noticed that in the last release of php 4.3.7 (or 5.0.0), that when checking the value of a variable has changed. ex: if($var){ /* do something */ } doesn't work anymore. I've had to change code to if($var > 0) but the problem is, what if $var was converted to $var = "0" instead of $var =

[PHP] Detecting if browser is using a HTTP or HTTPS connection to view the page

2004-07-13 Thread Jamie
Is there a way to detect if a browser is using a HTTPS or HTTP. As i can get the scripts self and the host its running off but i cannot seem to find a way to grab if the connection is secure or not. Thanks for any help in advance Jamie -- PHP General Mailing List (http://www.php.net/) To unsubsc

Re: [PHP] Session Variables ~ Best Practices

2004-07-13 Thread Justin Patrin
On Tue, 13 Jul 2004 17:52:44 +0100, Harlequin <[EMAIL PROTECTED]> wrote: > I'm right in the middle of developing some pages that will require session > cookies. Now I have a few questions and hope I don't bore you too much... > > I presume I am right in assuming that I can declare variables anywhe

Re: [PHP] Session Variables ~ Best Practices

2004-07-13 Thread Michal Migurski
> I presume I am right in assuming that I can declare variables anywhere I > like providing I have started a session on the page but I cannot > actually use those variables until a post or some similar action has > been performed by the user. No, you can use them right away - they are stored serve

RE: [PHP] Session Variables ~ Best Practices

2004-07-13 Thread Jay Blanchard
[snip] I am also wondering if I need to declare all my variables one after the other or can I simply declare variables that I will be using immediately upon submission. [/snip] Since PHP is not strongly typed (like C or C++) you need not declare any variables. There are some caveats (see http://ww

[PHP] Session Variables ~ Best Practices

2004-07-13 Thread Harlequin
I'm right in the middle of developing some pages that will require session cookies. Now I have a few questions and hope I don't bore you too much... I presume I am right in assuming that I can declare variables anywhere I like providing I have started a session on the page but I cannot actually us

Re: [PHP] Anyone knows when PHP5 is released?

2004-07-13 Thread Curt Zirzow
* Thus wrote Gabriel Medina: > So is there a date set yet or is it just to wait? No fixed date, but it will be very soon. Probably sometime this week. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trap

Re: [PHP] Email, Hotmail and PHP?

2004-07-13 Thread Tristan . Pretty
really? me.. I've not turned that on in over a year? That's a worry... when was this...? I'll tell our tech support group, perhaps there was a problem.. cheers for the heads up! raditha dissanayake <[EMAIL PROTECTED]> 13/07/2004 16:46 Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTE

Re: [PHP] Anyone knows when PHP5 is released?

2004-07-13 Thread Matthew Sims
> So is there a date set yet or is it just to wait? > > How is the progrese one the respons to RC3? Is it many bugs left? > > Dear Reagrds I've been using RC3 for the past month and so far I haven't run into any problems. I want to get used to the new OO setup. --Matthew Sims --

[PHP] RE: using htmlentities with data in textarea

2004-07-13 Thread Dennis Gearon
When setting up a site, you should: A/ write a page with only the function 'phpinfo()' on it. B/ Call the page phpinfo.php, and put it in your document root. C/ Now tell us the location of your site so we can all view all your security information :-) do only A above and see if you have

Re: [PHP] RE:$_Request from 4.3 to v5.x

2004-07-13 Thread John W. Holmes
Dennis Gearon wrote: Isn't $_REQUEST the same as the old GPC variables in global namespace? A way to get requested variables without paying attention to whether they came in via cookies, post, or get? That's been my understanding so I've been using $_GET, $_POST, $_COOKIE instead, because that

RE: [PHP] How to make HTTP call to another address?

2004-07-13 Thread Jay Blanchard
[snip] I've recently set up some Tomcat/Java/Servlet stuff that provides some high-level functions I wish to make available from PHP. In other words, from PHP, I want to make an HTTP call to an address like: http://mycompany.com/myservlet?request=doSomething&arg1=meat&arg2=potato es and then u

Re: [PHP] How to make HTTP call to another address?

2004-07-13 Thread raditha dissanayake
I sometimes wonder why we keep ignoring lowly old include("http://yoururlhere.com";); -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] Email, Hotmail and PHP?

2004-07-13 Thread raditha dissanayake
[EMAIL PROTECTED] wrote: I get the distinct impression that this idea is not a favourable one? Let's hope what ever solution you come up with does not include an auto responder. :-) I was referring to the barrage we used to recieve from your auto responder. -- Raditha Dissanayake.

[PHP] RE:$_Request from 4.3 to v5.x

2004-07-13 Thread Dennis Gearon
Isn't $_REQUEST the same as the old GPC variables in global namespace? A way to get requested variables without paying attention to whether they came in via cookies, post, or get? That's been my understanding so I've been using $_GET, $_POST, $_COOKIE instead, because that way I don't have to

Re: [PHP] using htmlentities with data in textarea

2004-07-13 Thread John W. Holmes
Hull, Douglas D wrote: But if one enters: w' my word ends up w\' Run stripslashes() on the entire string before you begin processing it. If you eventually insert the data into the database, you'll need to run addslashes() on it though, to prevent errors/sql injection from the unescaped quotes. -

[PHP] using htmlentities with data in textarea

2004-07-13 Thread Hull, Douglas D
As John H told me (which is true) I should run my words through htmlentities. I have a textarea in a form for individuals to type in a list of words. From there I place these words in an array and then perform calculations and echo the words back out with the resulting calculations. But if o

Re: [PHP] Email, Hotmail and PHP?

2004-07-13 Thread Jordi Canals
[EMAIL PROTECTED] wrote: Indeed... who doesn't enjoy a brief break to see what's happening in their world? I ended up using 'hail' (http://www.hailware.com/) As far as I can tell, it doesn't allow attatchments... Spending lunch hour checking personal mails... who can honestly admit that it never

Re: [PHP] $_Request from 4.3 to v5.x

2004-07-13 Thread Justin Patrin
If you turn off notices in your app, you won't get that. error_reporting = E_ALL & ~E_NOTICE Or, you could use isset to make sure that it was submitted (best option). $searchtype = isset($_REQUEST['searchtype'] ? $_REQUEST['searchtype'] : false; On Wed, 14 Jul 2004 00:18:22 +1000, Michael Purdy

Re: [PHP] $_Request from 4.3 to v5.x

2004-07-13 Thread John W. Holmes
Michael Purdy wrote: I have a script which accepts three POSTed variables from a basic form. Under 4.3.7 the script runs fine and the variables are successfully passed to the script. I am testing 5.0 C3 and receive the following error PHP Notice: Undefined index: searchtype in c:\http\cgi\list7

Re: [PHP] Templates Are Driving me Nuts

2004-07-13 Thread John W. Holmes
EE wrote: Please help. This template thing is driving my nuts. I though maybe when I read more articles things will clear up; however, things got even worse. Every article writer has a different idea. Can anyone explain to me what are Templates for? What are the advantages of using them? If I use a

Re: [PHP] Templates Are Driving me Nuts

2004-07-13 Thread Justin Patrin
A template system allows you to (in most cases) use a special language, different than PHP, to write your HTML. At the simplest level, template languages replace special markers with content from PHP. More complicated types involve looping and other contro structures (if, then, else, etc.). Basica

Re: [PHP] How to make HTTP call to another address?

2004-07-13 Thread Justin Patrin
I would suggest using the PEAR HTTP_Request package for single-shot requests and HTTP_Client for multiple requests to the same server (like if you need your script to login first). http://pear.php.net/packahe/HTTP_Request http://pear.php.net/packahe/HTTP_Client On Mon, 12 Jul 2004 11:24:19 -0600,

Re: [PHP] Email, Hotmail and PHP?

2004-07-13 Thread Tristan . Pretty
I get the distinct impression that this idea is not a favourable one? Just trying to earn brownie points with the misses... not trying to annoy 'the man'. Ho hum... Back to surfing for porn at work ;-) raditha dissanayake <[EMAIL PROTECTED]> wrote on 13/07/2004 14:56:38: > [EMAIL PROTECTED] w

[PHP] $_Request from 4.3 to v5.x

2004-07-13 Thread Michael Purdy
Folks I am currently using 4.3.7. I have a script which accepts three POSTed variables from a basic form. Under 4.3.7 the script runs fine and the variables are successfully passed to the script. I am testing 5.0 C3 and receive the following error PHP Notice: Undefined index: searchtype in

[PHP] $_Request from 4.3 to v5.x

2004-07-13 Thread Michael Purdy
Folks I am currently using 4.3.7. I have a script which accepts three POSTed variables from a basic form. Under 4.3.7 the script runs fine and the variables are successfully passed to the script. I am testing 5.0 C3 and receive the following error PHP Notice: Undefined index: searchtype in c

RE: [PHP] Templates Are Driving me Nuts[Scanned]

2004-07-13 Thread Michael Egan
I looked at these briefly a couple of years ago but never really made great use of them. I also remember seeing an article in LinuxFormat about them which can be found at: http://www.linuxformat.co.uk/archives/LXF35.tut_php.pdf My understanding is that they are mainly intended for use in develo

  1   2   >