Re: [PHP] Re: php java intregration

2006-06-02 Thread Vedanta Barooah
So i tried to install the java support using the info available at php.net/java but things here are still upset: here is my configure: './configure' '--with-apxs2=/home/vedanta/srv/httpd2/bin/apxs' '--with-config-file-path=/home/vedanta/srv/php5' '--prefix=/home/vedanta/srv/php5' '--with-java=/o

[PHP] HTTP HEADERS

2006-06-02 Thread kartikay malhotra
Hi all! I use HTTP POST to upload a file. I've a PHP script running on the server. Are HTTP headers passed with this request? How can I see the headers passed to the server? Thanks KM

[PHP] Recall: [PHP] Parse error: syntax error, unexpected '}'

2006-06-02 Thread Bagus Nugroho
Bagus Nugroho would like to recall the message, "[PHP] Parse error: syntax error, unexpected '}'".

Re: [PHP] Parse error: syntax error, unexpected '}'

2006-06-02 Thread Mark Sargent
Hi All, sorry, found it. Forgot the ; after $age++. Cheers. Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: php java intregration

2006-06-02 Thread Vedanta Barooah
if i am not wrong the bridge is better if you are trying to put in php into a java app server. i do know to create the jar in linux i will try some other combinations and keep things posted. i am not able to find the jar, anywhere yet though :( - vedanta On 6/3/06, Jon Anderson <[EMAIL PROTEC

RE: [PHP] Parse error: syntax error, unexpected '}'

2006-06-02 Thread Bagus Nugroho
how about like this --- $insert = "INSERT INTO age (age_label) VALUES ('$age')"; --- From: Mark Sargent [mailto:[EMAIL PROTECTED] Sent: Sat 03-Jun-2006 10:02 To: PHP List Subject: [PHP] Parse error: syntax error, unexpected '}' Hi All, can anone see what's w

[PHP] RE: SPL Iterator and Associative Array

2006-06-02 Thread Jason Karns
> -Original Message- > From: Greg Beaver [mailto:[EMAIL PROTECTED] > Sent: Friday, June 02, 2006 10:39 PM > To: Jason Karns > Cc: php-general@lists.php.net > Subject: Re: SPL Iterator and Associative Array > > Jason Karns wrote: > > I'm going to try my best to explain what I'm trying to d

Re: [PHP] Parse error: syntax error, unexpected '}'

2006-06-02 Thread Rick Emery
Quoting Mark Sargent <[EMAIL PROTECTED]>: Hi All, can anone see what's wrong with the below code? I get this error, *Parse error*: syntax error, unexpected '}' in */usr/local/apache2/htdocs/moviedata2.php* on line *18 * $age=1; while($age<=100) { $insert = "INSERT INTO age (age_label) VALUES

[PHP] Parse error: syntax error, unexpected '}'

2006-06-02 Thread Mark Sargent
Hi All, can anone see what's wrong with the below code? I get this error, *Parse error*: syntax error, unexpected '}' in */usr/local/apache2/htdocs/moviedata2.php* on line *18 * $age=1; while($age<=100) { $insert = "INSERT INTO age (age_label) VALUES ($age)"; $results = mysql_query($insert)

[PHP] Re: SPL Iterator and Associative Array

2006-06-02 Thread Greg Beaver
Jason Karns wrote: > I'm going to try my best to explain what I'm trying to do. > > I have my own class that has an array member. This class itself implements > Iterator. One of the fields in the array is itself an array that I would > like to iterate over. Here's some code: > > class Folio imp

[PHP] SPL Iterator and Associative Array

2006-06-02 Thread Jason Karns
I'm going to try my best to explain what I'm trying to do. I have my own class that has an array member. This class itself implements Iterator. One of the fields in the array is itself an array that I would like to iterate over. Here's some code: class Folio implements Iterator { $projects = ar

[PHP] sessions expiring

2006-06-02 Thread John Gunther
I can't find the proper settings to keep unattended sessions from expiring in about an hour. Specifically, the $_SESSION variable contents disappear. I've read the docs, but nothing seems to work. Any ideas? Here are the session parameters that are in effect: session.auto_startOn session.bug_

Re: [PHP] Re: php java intregration

2006-06-02 Thread Vedanta Barooah
it was not about windows! :) it was about php getting into IIS instead of than .net or java - vedanta On 6/3/06, tedd <[EMAIL PROTECTED]> wrote: >really no one? > >On 6/2/06, Vedanta Barooah <[EMAIL PROTECTED]> wrote: >>hello all, >>i am setting up php_java.dll extension under windows/iis, my

Re: [PHP] Help with enter key in Forms

2006-06-02 Thread Martin Alterisio
2006/6/2, George Babichev <[EMAIL PROTECTED]>: Awesome, thank you so much! It works! On 6/1/06, Chris <[EMAIL PROTECTED]> wrote: > > George Babichev wrote: > > Ok, I sent it to everyone and you. Now can you answer my question > please? > > I type in > > 1 > > > > > > > > 2 > > into my form in t

[PHP] Re: php java intregration

2006-06-02 Thread Vedanta Barooah
really no one? On 6/2/06, Vedanta Barooah <[EMAIL PROTECTED]> wrote: hello all, i am setting up php_java.dll extension under windows/iis, my php version is 5.1.2. can any one point me to the download location of php_java.jar which is needed for the setup. i searched all the sites/mirrors but it

RE: [PHP] OO purism sucks - sell me on PHP5?

2006-06-02 Thread Kilbride, James P.
> -Original Message- > From: tedd [mailto:[EMAIL PROTECTED] > Sent: Friday, June 02, 2006 3:11 PM > To: Rasmus Lerdorf; tedd > Cc: php-general@lists.php.net > Subject: Re: [PHP] OO purism sucks - sell me on PHP5? > SNIP > > So for now, I'll stay with my "tried and true" box-step and

[PHP] Re: Retrieving Content

2006-06-02 Thread Adam Zey
Rodrigo de Oliveira Costa wrote: I just discovered the problem I have to retrieve the output of the site and not the url since its dynamic. Ca I do it like retrieve the output of this url: www.tryout.com/1/2/ And of course store it on a variable? How to do it? I founr the func below but couldnt

Re: [PHP] OO purism sucks - sell me on PHP5?

2006-06-02 Thread tedd
At 10:51 AM -0700 6/2/06, Rasmus Lerdorf wrote: >tedd wrote: >>At 9:00 AM -0700 6/2/06, Rasmus Lerdorf wrote: >>>[EMAIL PROTECTED] wrote: >> >> >>-snip- (a bunch of things over my head) > >I thought I kept the examples pretty simple actually. If you have specific >questions on them I would be hap

Re: [PHP] OO purism sucks - sell me on PHP5?

2006-06-02 Thread Rasmus Lerdorf
tedd wrote: At 9:00 AM -0700 6/2/06, Rasmus Lerdorf wrote: [EMAIL PROTECTED] wrote: -snip- (a bunch of things over my head) I thought I kept the examples pretty simple actually. If you have specific questions on them I would be happy to explain them in more detail. -Rasmus -- PHP Gener

[PHP] Re: Retrieving Content

2006-06-02 Thread Rodrigo de Oliveira Costa
I just discovered the problem I have to retrieve the output of the site and not the url since its dynamic. Ca I do it like retrieve the output of this url: www.tryout.com/1/2/ And of course store it on a variable? How to do it? I founr the func below but couldnt understand how to make it work wi

[PHP] Retrieve output from HTML or PHP file

2006-06-02 Thread Rodrigo de Oliveira Costa
Can I do the below to an URL, like retrieving the output of a site and store it on a variable? Thanks, Rodrigo Hi Peter, Ah, I understand now. If the file echo'ed it's output you could do: ob_start(); include('file.php'); $output = ob_get_contents(); ob_end_clean(); or: $output = exec('sc

[PHP] Re: Retrieving Content

2006-06-02 Thread Adam Zey
Rodrigo de Oliveira Costa wrote: Actualy I went a slightly diffent way, I tried to use the file() like on the script below and I get the content of the whole page but when I try to get a single line from the array it all goes sideways. Here goes the script with the correct urls, remembering that

[PHP] php java intregration

2006-06-02 Thread Vedanta Barooah
hello all, i am setting up php_java.dll extension under windows/iis, my php version is 5.1.2. can any one point me to the download location of php_java.jar which is needed for the setup. i searched all the sites/mirrors but its not available. do i have to compile from source to get that jar? ...

[PHP] Try XMLWriter ... was Re: [PHP] OO purism sucks - sell me on PHP5?

2006-06-02 Thread D. Dante Lorenso
[EMAIL PROTECTED] wrote: What are some of the other "killer features" of PHP5 that I may be sleeping on here. You have got to get your hands on XMLWriter. I don't write any XHTML inside php any more. I've wrapped the XMLWriter object inside my own object and now I can create 100% proper

Re: [PHP] Am I supposed to be using SPL?

2006-06-02 Thread Kevin Waterson
This one time, at band camp, "Richard Lynch" <[EMAIL PROTECTED]> wrote: > So, of all the things that COULD go wrong, we just assume it's "No > files Found"??? > > I don't think I'll ever learn to like SPL or try/catch... Ok, I think my example was a little too simplistic... You could of course

Re: [PHP] OO purism sucks - sell me on PHP5?

2006-06-02 Thread tedd
At 9:00 AM -0700 6/2/06, Rasmus Lerdorf wrote: >[EMAIL PROTECTED] wrote: -snip- (a bunch of things over my head) >Note that for all of this I am referring to PHP 5.1.x, not 5.0.x. > >-Rasmus Damn -- remind me to never disagree with you (as if I could). My self-perceived position on the food c

[PHP] Re: Retrieving Content

2006-06-02 Thread Rodrigo de Oliveira Costa
Actualy I went a slightly diffent way, I tried to use the file() like on the script below and I get the content of the whole page but when I try to get a single line from the array it all goes sideways. Here goes the script with the correct urls, remembering that I'm using it on the local server

Re: [PHP] OO purism sucks - sell me on PHP5?

2006-06-02 Thread Rasmus Lerdorf
[EMAIL PROTECTED] wrote: "If it ain't broke, don't fix it" works for a while, but if there are easier and/or better ways to do things in PHP5, I want in! So someone sell me on this from the point of view of someone who's upgraded and has learned the joys of PHP5. So far what I've found onli

Re: [PHP] HTML Mail script reading text from MySQL

2006-06-02 Thread Rabin Vincent
On 6/2/06, Tom Chubb <[EMAIL PROTECTED]> wrote: What I meant is say a page outputs an HTML table eg: [snipped] But I want to get that code into the $message variable. I have written many mail scripts before it's just getting the data into the variable. Should I be using something like CURL?

Re[2]: [PHP] Extended Ascii Characters

2006-06-02 Thread tedd
Richard: The discussion was in February, I looked and couldn't find what I remembered. So, I'm thinking that the coder sent it to me directly, but I searched my files and again I came up with nothing -- it's not like me to lose code. What I remember was a function that took Unicode HEX and prod

Re: [PHP] HTML Mail script reading text from MySQL

2006-06-02 Thread Tom Chubb
I've just read a similar post and think that I should use file_get_contents and the preg_match for the & tags. ...But if anyone knows a better way I'm all ears! On 02/06/06, Tom Chubb <[EMAIL PROTECTED]> wrote: Sorry Mark, What I meant is say a page outputs an HTML table eg: a

[PHP] Re: Retrieving Content

2006-06-02 Thread Adam Zey
Rodrigo de Oliveira Costa wrote: Hi guys, I'm trying to retrieve a certain variable from a site. Here it goes: The site has a SELECT box that is dynamicaly updated, I need to put a script running that will retrieve the specified SELECT with its contents, that are labels and values. Is there a w

RE: [PHP] If value is odd or not

2006-06-02 Thread tedd
At 10:10 AM -0500 6/2/06, Jay Blanchard wrote: >[snip] >It's interesting to dangle bait above a pool of programmers and see what >rises. :-) > >There used to be a contest to create the most complicated solution to >accomplish a very trivial task, like turning on a light switch. However, >I can't re

Re: [PHP] HTML Mail script reading text from MySQL

2006-06-02 Thread Tom Chubb
Sorry Mark, What I meant is say a page outputs an HTML table eg: a b c d e f g h i j k l m n o p q r s t u v w x y But I want to get that code into the $message variable. I have written many mail scr

Re: [PHP] If value is odd or not

2006-06-02 Thread Adam Zey
IG wrote: Jochem Maas wrote: Jonas Rosling wrote: Hi all, is there any easy why to check if a value is odd or not? ignore every answer that doesn't use the % operator. Thanks // Jonas ie my answer! I think the % operator is the best way, but there was nothing wrong with the answer I g

Re: [PHP] Reading an XML outputting PHP file as XML

2006-06-02 Thread Adam Zey
Jochem Maas wrote: IG wrote: Hi. I have a PHP file that outputs as XML from a database. i have used the header() function to output the correct header but when I use the simplexml function it is trying to parse the php file itself and not the output of the php file. I can't get my head round

RE: [PHP] If value is odd or not

2006-06-02 Thread Jay Blanchard
[snip] It's interesting to dangle bait above a pool of programmers and see what rises. :-) There used to be a contest to create the most complicated solution to accomplish a very trivial task, like turning on a light switch. However, I can't remember what the contest was called -- it was something

RE: [PHP] If value is odd or not

2006-06-02 Thread tg-php
The Obfuscated C contest had a category for most complicated solution to a simple problem. Like 50 lines of code to add two numbers together, stuff like that. -TG = = = Original message = = = At 9:52 AM -0500 6/2/06, Jay Blanchard wrote: >[snip] >It might be interesting to see how long of a p

Re: [PHP] OO purism sucks - sell me on PHP5?

2006-06-02 Thread tg-php
I'm kind of coming from the outside here, so forgive my ignorance on some matters. I have some OO experience, just not with PHP and have only worked with PHP4 so again.. kind of on the outside of all this. Rasmus, you make a great point here. OO is structured and is all about constraints wher

RE: [PHP] If value is odd or not

2006-06-02 Thread tedd
At 9:52 AM -0500 6/2/06, Jay Blanchard wrote: >[snip] >It might be interesting to see how long of a piece of code could be >written to answer the same question. >[/snip] > >I can think of a really long one using a callback function It's interesting to dangle bait above a pool of programmers and s

[PHP] HTML Mail script reading text from MySQL

2006-06-02 Thread Tom Chubb
I can't work out how to load the text from a recordset result into a variable for sending using mail in a script. I have a script which creates a dynamic table then I want to load the table's HTML into a variable which will be echoed in the mail function. I can't work out how to do this. I've trie

RE: [PHP] If value is odd or not

2006-06-02 Thread Jay Blanchard
[snip] It might be interesting to see how long of a piece of code could be written to answer the same question. [/snip] I can think of a really long one using a callback function -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] If value is odd or not

2006-06-02 Thread tedd
At 5:14 PM +0300 6/2/06, Dimiter Ivanov wrote: >I doubt that Jonas ever expected 'the rain of answers' that will >follow his humble question ;] Well... at least the answers are getting shorter. It might be interesting to see how long of a piece of code could be written to answer the same questio

Re: [PHP] OO purism sucks - this is a rant for anyone who is allergic to that kind of thing...

2006-06-02 Thread Rasmus Lerdorf
Jochem Maas wrote: I understand the point you made below - you have made this argument before and I, for one, accepted it as valid when I first read the discussion on internals - which is why I avoided ranting about that (and changes like it) But you didn't avoid it, you used it as an example

Re: [PHP] If value is odd or not

2006-06-02 Thread John Meyer
Steven Osborn wrote: $odd = array("1","3","5","7","9"); if(inarray(substr($var,strlen($var)-1,1),$od) { //haha } else { //even } How about this if ($var % 2 == 0) { //it's even } else { //it's odd } -- Online library -- http://pueblonative.110mb.com 126 books and counting. -- PHP Gener

Re: [PHP] If value is odd or not

2006-06-02 Thread Steven Osborn
$odd = array("1","3","5","7","9"); if(inarray(substr($var,strlen($var)-1,1),$od) { //haha } else { //even } p.s. sorry for the direct mail Jonas Rosling wrote: Hi all, is there any easy why to check if a value is odd or not? Thanks // Jonas -- PHP General Mailing List (http://www.ph

[PHP] Retrieving Content

2006-06-02 Thread Rodrigo de Oliveira Costa
Hi guys, I'm trying to retrieve a certain variable from a site. Here it goes: The site has a SELECT box that is dynamicaly updated, I need to put a script running that will retrieve the specified SELECT with its contents, that are labels and values. Is there a way to retrieve the page and then se

Re: [PHP] If value is odd or not

2006-06-02 Thread Dimiter Ivanov
I doubt that Jonas ever expected 'the rain of answers' that will follow his humble question ;] On 6/2/06, tedd <[EMAIL PROTECTED]> wrote: At 3:32 PM +0200 6/2/06, Jonas Rosling wrote: >Hi all, >is there any easy why to check if a value is odd or not? Jonas: echo($num & 1); This produces 1 for

Re: [PHP] If value is odd or not

2006-06-02 Thread Jochem Maas
John Nichel wrote: Jochem Maas wrote: Jonas Rosling wrote: Hi all, is there any easy why to check if a value is odd or not? ignore every answer that doesn't use the % operator. if ( is_int ( $value / 2 ) ) { // Even } LOL. :-p -- PHP General Mailing List (http://www.php.net

Re: [PHP] If value is odd or not

2006-06-02 Thread tedd
At 3:32 PM +0200 6/2/06, Jonas Rosling wrote: >Hi all, >is there any easy why to check if a value is odd or not? Jonas: echo($num & 1); This produces 1 for odd and 0 for even. tedd -- http://sperling.com htt

RE: [PHP] If value is odd or not

2006-06-02 Thread Jay Blanchard
[snip] if ( is_int ( $value / 2 ) ) { // Even } [/snip] :) More? $oddArray = array(1,3,5,7,9); if(in_array(substr($integer, -1, 1))){ echo $integer . " is odd\n"; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] If value is odd or not

2006-06-02 Thread Jochem Maas
IG wrote: Jochem Maas wrote: Jonas Rosling wrote: Hi all, is there any easy why to check if a value is odd or not? ignore every answer that doesn't use the % operator. Thanks // Jonas ie my answer! I think the % operator is the best way, but there was not just your answer. nothi

Re: [PHP] If value is odd or not

2006-06-02 Thread John Nichel
Jochem Maas wrote: Jonas Rosling wrote: Hi all, is there any easy why to check if a value is odd or not? ignore every answer that doesn't use the % operator. if ( is_int ( $value / 2 ) ) { // Even } :-p -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of B

Re: [PHP] If value is odd or not

2006-06-02 Thread IG
Jochem Maas wrote: Jonas Rosling wrote: Hi all, is there any easy why to check if a value is odd or not? ignore every answer that doesn't use the % operator. Thanks // Jonas ie my answer! I think the % operator is the best way, but there was nothing wrong with the answer I gave in that

RE: [PHP] If value is odd or not

2006-06-02 Thread Ford, Mike
On 02 June 2006 14:32, Jonas Rosling wrote: > Hi all, > is there any easy why to check if a value is odd or not? if ($value%2): // $value is odd endif; Cheers! Mike - Mike Ford, Electronic Information Services Adv

Re: [PHP] If value is odd or not

2006-06-02 Thread Jochem Maas
Jonas Rosling wrote: Hi all, is there any easy why to check if a value is odd or not? ignore every answer that doesn't use the % operator. Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reading an XML outputting PHP file as XML

2006-06-02 Thread Jochem Maas
IG wrote: Hi. I have a PHP file that outputs as XML from a database. i have used the header() function to output the correct header but when I use the simplexml function it is trying to parse the php file itself and not the output of the php file. I can't get my head round this. Can anyone hel

Re: [PHP] If value is odd or not

2006-06-02 Thread Jochem Maas
Jonas Rosling wrote: Hi all, is there any easy why to check if a value is odd or not? the modulos operator: read about what it does here: http://php.net/manual/en/language.operators.arithmetic.php here is a simple example of how to check if something is odd or not (odd number that is ;-): $x

Re: [PHP] If value is odd or not

2006-06-02 Thread IG
Jonas Rosling wrote: Hi all, is there any easy why to check if a value is odd or not? Thanks // Jonas $value = 3; if (strpos(($value/2),".") === FALSE) {echo "even";} else {echo "odd";} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

SV: [PHP] If value is odd or not

2006-06-02 Thread Jonas Rosling
-Ursprungligt meddelande- Fran: Eric Mol [mailto:[EMAIL PROTECTED] Skickat: den 2 juni 2006 15:34 Till: 'Jonas Rosling'; 'PHP List' Amne: RE: [PHP] If value is odd or not If ($var/2==round($var/2)){ // not odd }else{ // odd } Greetings, Eric Thanks (all)! -Oorspronkelijk berich

Re: [PHP] If value is odd or not

2006-06-02 Thread Brad Bonkoski
if ($value % 2 == 0 ) echo "Value is even"; else echo "Value is odd"; Jonas Rosling wrote: Hi all, is there any easy why to check if a value is odd or not? Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] If value is odd or not

2006-06-02 Thread Dave Goodchild
On 02/06/06, Jonas Rosling <[EMAIL PROTECTED]> wrote: Hi all, is there any easy why to check if a value is odd or not? Thanks // Jonas Yep, use the modulo operator like so: if ($value % 2 ==0) $odd = false; -- http://www.web-buddha.co.uk dynamic web programming from Reigate, Surre

[PHP] If value is odd or not

2006-06-02 Thread Jonas Rosling
Hi all, is there any easy why to check if a value is odd or not? Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Reading an XML outputting PHP file as XML

2006-06-02 Thread IG
Hi. I have a PHP file that outputs as XML from a database. i have used the header() function to output the correct header but when I use the simplexml function it is trying to parse the php file itself and not the output of the php file. I can't get my head round this. Can anyone help me? --

Re: [PHP] PHP/Mysql: Making binary field available for download - extra browser window ?

2006-06-02 Thread Jochem Maas
Matthew Pegg wrote: Hi all, Working on a PHP script at the moment where I want to be able to extract a file (PDF file) from a mysql database and force the popup of the File Download dialog, to allow the user to either save or open the document (ie. and bypass loading the file using the browser's

Re: [PHP] OO purism sucks - this is a rant for anyone who is allergic to that kind of thing...

2006-06-02 Thread Jochem Maas
hi Rasmus, I understand the point you made below - you have made this argument before and I, for one, accepted it as valid when I first read the discussion on internals - which is why I avoided ranting about that (and changes like it) But I am wondering what if any your views might be on the ori

Re[2]: [PHP] Extended Ascii Characters

2006-06-02 Thread Richard Luckhurst
Hi Tedd, I had a hunt in the archives and couldn't find anything. Do you have any clue about when it was? Richard t> At 9:46 AM +1000 6/2/06, Richard Luckhurst wrote: >>Hi All >> >>I am in the process of cleaning up an application that was left half >>finished. I >>am fairly new to PHP so I am

Re: [PHP] Problem with a script

2006-06-02 Thread Chris
Ministério Público wrote: I showed where the problem is and after var_dump all I get is NULL. I just sent the code cause I thought it would be easier to see it in context, not to make somebody trawl trough it. If its not an array how to find out what it is? What can I do about it? Put debug