Re: [PHP] Converting integer type to long

2005-08-02 Thread Torgny Bjers
Wee Keat wrote: >The problem is, I have not been able to convert PHP's integer/float type >to long because there is no function that does it. Or is there? > The reason why is because there's no real long support in PHP. But, since you mention a value such as 0.01, you are not looking for a long,

[PHP] dl exploit

2005-08-02 Thread Anas Mughal
There was a posting on http://us3.php.net/dl dated July 18th regarding the dl exploit problem. Following the advice in the posting, my shared hosting service disabled dl on our hosting server. I can't load my custom PHP extension anymore. I am wondering if anyone knows about any active developm

[PHP] Converting integer type to long

2005-08-02 Thread Wee Keat
Hi All, I'm facing a little problem here. I'm making a few query using SOAP protocol (NuSOAP class), that involves sending out an amount (e.g. 0.01), which is accepted in type of [long] in its WSDL, for recording purpose. Typical call: [code] $param = array('rewardSchemeId'=> $tnt_rewardSchemeId,

[PHP] Re: help with a bucle

2005-08-02 Thread sonu gill
Sorry clarification required to my previous answer... I sort of answered you in a hurry, and I made another assumption that I didn't define. I wanted to clarify that I'm assuming the array is setup as follows arr[day]=>report. arr[1]=>45 arr[2]=>56 arr[4]=>78 etc... $y = 31; for($x=0; $x < $

[PHP] Re: help with a bucle

2005-08-02 Thread sonu gill
>From what I gathered you simply want to print all days and the "reporte" field info and if there isn't any then 0. Assuming you used SQL and retrieved your information from the db into an associated Array $arr //the results from the DB... $y = 31; //Assuming you are working with 31 days...

[PHP] help with a bucle

2005-08-02 Thread Jesús Alain Rodríguez Santos
Hi, i have in my mysql db one table columm, some think like this: dayreporte ------ 145 256 478 689 790 etc... How can i print all the value from 'reporte' columm depending the 'day' columm, and if there is not exist a day print 0 value, for exa

Re: [PHP] array()

2005-08-02 Thread Jochem Maas
Rory Browne wrote: You're using a lot of negatives. nice catch on the double neg Rory :-) $data = array(); // You should initialise $data to array() for various reasons: // 1: self_documentation - to anyone who reads your code will be obvious // that $data should contain an empty arra

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread Jochem Maas
Justin Burger wrote: Good Morning, I was having a discussion with a fellow PHP Developer this morning and he mentioned that he put's an '@' sign in front of all function calls, and every time he accesses an array; I know that this is sloppy, and dangerous, but I don't know exactly what this expo

Re: [PHP] Re: editor in WEB PAGE

2005-08-02 Thread Graham Cossey
> > -Original Message- > > From: Graham Cossey [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 02, 2005 1:12 PM > > To: php-general@lists.php.net > > Subject: Re: [PHP] Re: editor in WEB PAGE > > > > Sorry to drag this up again, but I'm attempting to set up FCKeditor > > and am having p

Re: [PHP] parent::construct not reliable working on php5.1 b2/b3

2005-08-02 Thread Jochem Maas
Meno Abels wrote: it is only a typo in my email i use __construct ok - I would recommend cut-n-paste for this kind of output to prevent idiots like me pointing out you typos and to avoid confusion in general. the next questions would be: a, how many parents does the problem class (Link or Lin

Re: [PHP] cannot find the parse error

2005-08-02 Thread Jochem Maas
Miles Thompson wrote: At 11:45 AM 8/2/2005, John Nichel wrote: Jochem Maas wrote: John Nichel wrote: Jochem Maas wrote: did you look at line 44??? (actually I found the problem on line 69 when I cut and pasted into a editor - the editor also gave that line as the one with the error in

Re[2]: [PHP] Error Suppression with '@'

2005-08-02 Thread Richard Davey
Hello Justin, Tuesday, August 2, 2005, 8:43:09 PM, you wrote: JB> Does suppressing the error only suppress it from the screen, or JB> does it ignore the error? JB> ie: is the error still logged? It will ignore it totally, it doesn't even make it as far as the log files - which is why in most cas

Re: [PHP] Forming an SQL query

2005-08-02 Thread Jack Jackson
Ah, I had left out the third column the first time! Thanks. Now I can insert and not create dupes but for some reason it is not updating. Here's the code: if ( ($_POST['action'] == 'process') && (!sizeof($message) ) ) { foreach($_POST as $key=>$val) {

Re: [PHP] Re: editor in WEB PAGE

2005-08-02 Thread Graham Cossey
Sorry to drag this up again, but I'm attempting to set up FCKeditor and am having problems with the File Browser. Has anyone successfully got this running with the PHP connector? If so some hints & tips would be most appreciated. I've set my UserFilePath in config.php (relative to doc root) but th

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread Kristen G. Thorson
Example: I was working on a HORRIBLE piece of code for a cart app. The original programmer had a line like this: $result = mysql_query( "SELECT * FROM user_logins WHERE cookie='".$cookie."'" ); Where $cookie is a session id stored in a cookie (what else? ;). The problem was, he had some

Re: [PHP] Regex help

2005-08-02 Thread Dotan Cohen
On 8/2/05, Robin Vickery <[EMAIL PROTECTED]> wrote: > I don't suppose this is the place for a rant about the futility of > checking email addresses with a regexp? > > -robin Let Richard Lynch tell him. He's good at regex's, and it's HIS email address that never makes it through! Dotan Cohen ht

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread Justin Burger
Does suppressing the error only suppress it from the screen, or does it ignore the error? ie: is the error still logged? On Aug 2, 2005, at 12:18 PM, John Nichel wrote: Justin Burger wrote: Good Morning, I was having a discussion with a fellow PHP Developer this morning and he menti

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread John Nichel
Justin Burger wrote: Does suppressing the error only suppress it from the screen, or does it ignore the error? ie: is the error still logged? Please reply to the list. I don't know if it still logs the error (assuming you have error logging turned on). -- John C. Nichel ÜberGeek KegWorks

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread John Nichel
Justin Burger wrote: Good Morning, I was having a discussion with a fellow PHP Developer this morning and he mentioned that he put's an '@' sign in front of all function calls, and every time he accesses an array; I know that this is sloppy, and dangerous, but I don't know exactly what this expo

Re: [PHP] array()

2005-08-02 Thread Rory Browne
You're using a lot of negatives. $data = array(); // You should initialise $data to array() for various reasons: // 1: self_documentation - to anyone who reads your code will be obvious // that $data should contain an empty array // 2: security - if someone goes to // http://yoursite.com

Re: [PHP] how to mix two arrays into one and sort it by date/time?

2005-08-02 Thread [EMAIL PROTECTED]
Problem solved by mysql query (I thought it would be more tough :) ) my_query(" (select order_transaction_no, order_date from order_table_1 where order_date >= '". $date_yesterday ."') union (select order_transaction_no, order_date from order_table_2 where order_date >= '"

Re: [PHP] Java - toString() <-> php - ?

2005-08-02 Thread Adi Zebic
Rory Browne a écrit : I haven't a monkies what that code(your java) does, and I don't have time to analyse it(in expensive cybercafe), but you may want to consider www.php.net/print-r www.php.net/var-dump and www.php.net/var-export I think they may do what you want without using the toString met

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread Matt Darby
Justin Burger wrote: Good Morning, I was having a discussion with a fellow PHP Developer this morning and he mentioned that he put's an '@' sign in front of all function calls, and every time he accesses an array; I know that this is sloppy, and dangerous, but I don't know exactly what this exp

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread Rory Browne
On 8/2/05, Justin Burger <[EMAIL PROTECTED]> wrote: > Good Morning, > I was having a discussion with a fellow PHP Developer this morning and he > mentioned that he put's an '@' sign in front of all function calls, and > every time he accesses an array; Any chance of revealing his identity - so tha

Re: [PHP] Error Suppression with '@'

2005-08-02 Thread Torgny Bjers
Hello Justin, I would guess that this is mostly performance and memory related. When, for instance, trying to iterate an array, or a directory with files, using @ on all function calls, it will attempt to go through the array, attempting to allocate memory for each item, but when finding it empty/

Re: [PHP] AJAX & PHP

2005-08-02 Thread Graham Anderson
Has anyone integrated JPGraph [or another php graph class] into a PHP/AJAX setup ? I would really like to integrate interactive graphs based upon user variables. Would be fantastic. Are there any examples out there ? g -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] encrypting urls

2005-08-02 Thread Rory Browne
On 8/2/05, Torgny Bjers <[EMAIL PROTECTED]> wrote: > Another idea would be to Base64 encode/decode the parameters. I'm not sure why you sent this to me(and me only). It's not me, but rather the OP who wants to "encrypt" the url. > > Rory Browne wrote: > > >serialize/unserialize accompanied by s

[PHP] how to mix two arrays into one and sort it by date/time?

2005-08-02 Thread [EMAIL PROTECTED]
I have two tables with orders of different type of articles. order_table_1 order_table | order_transaction_no | order_date | ... 1 | 56982 | 2005-07-29 9:12:34 1 | 97163 | 2005-07-30 8:45:32 1 | 67452 | 2005-07-31 10:56:11 order_table_2 order_table | order_transaction_no | order_date | ... 2 | 36

[PHP] Error Suppression with '@'

2005-08-02 Thread Justin Burger
Good Morning, I was having a discussion with a fellow PHP Developer this morning and he mentioned that he put's an '@' sign in front of all function calls, and every time he accesses an array; I know that this is sloppy, and dangerous, but I don't know exactly what this exposes him to, can any one

[PHP] Re: Sorting in PHP

2005-08-02 Thread Mathieu Dumoulin
Found my problem, i'm runnig php 4.3.11, will update first then i will try again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Forming an SQL query

2005-08-02 Thread Jack Jackson
Hi, Thanks to everyone's help, that multipage monster of a form is now working properly (yay!). One problem I have though is that I stick the answers as each page is completed into a table. If the user hits the back button, rather than adding a new row to the table I'd rather update it if it'

[PHP] Sorting in PHP

2005-08-02 Thread Mathieu Dumoulin
Hi, i need to sort data using ksort. Its complex data out from a database (and no i can't sort it using the database sadly). I can change my code to reflect a new way of sorting but only to some extent, im limited. Now from the data i build an array of the things i need to display, using the n

Re: [PHP] Regular expression help

2005-08-02 Thread John Nichel
David Christensen wrote: I just plain suck at regex, so I was hoping to get some hints from you regex experts out there. I'm sure it's been done a thousand times, but I can't seem to find what I'm looking for with a simple google search: $phone could be "1234567890" OR $phone could be "123-456-

Re: [PHP] Sessions Issue

2005-08-02 Thread Jason Motes
We built a box about 7 months or so ago using the SuSE 9.1 cd's, straight install from the CDs. While I've read that sessions are turned on by default, when we try to call on the sessions functions (like with phpOpenChat or start_session()) we get calls to undefined function errors. This is lea

[PHP] Regular expression help

2005-08-02 Thread David Christensen
I just plain suck at regex, so I was hoping to get some hints from you regex experts out there. I'm sure it's been done a thousand times, but I can't seem to find what I'm looking for with a simple google search: $phone could be "1234567890" OR $phone could be "123-456-7890" OR $phone could be "(

Re: [PHP] encrypting urls

2005-08-02 Thread Rory Browne
serialize/unserialize accompanied by some compression/decompression should do the trick. Your output probably won't be any smaller with compresson overhead, but it would be non-obvious. It is also extremely easy to circumvent. On 8/2/05, Sebastian <[EMAIL PROTECTED]> wrote: > i need to mask (hide)

Re: [PHP] Running a PHP script everyday

2005-08-02 Thread Rory Browne
On 8/1/05, Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > What is the "-q" for? I can't find any documentation on it. If I do > a "php -h" or "man php", it is not listed. I am running php 5.0.3 on > RHEL ES 4 > [/snip] > > It means 'quiet'...in other words do not send anything to standard

Re: [PHP] Sessions Issue

2005-08-02 Thread Rory Browne
On 7/29/05, Tom Ray [Lists] <[EMAIL PROTECTED]> wrote: > We built a box about 7 months or so ago using the SuSE 9.1 cd's, > straight install from the CDs. While I've read that sessions are turned > on by default, when we try to call on the sessions functions (like with > phpOpenChat or start_sessio

Re: [PHP] varibles defination

2005-08-02 Thread Rory Browne
There are two ways of accomplishing what I think you're trying to acomplish. These ways are known as the right way and the wrong way. the right way results in an array like $func = array(0 => 0, 1 => 1, 2 => 2 ...) The wrong way results in a set of variables like you described $func1 = 0 $fu

Re: [PHP] Java - toString() <-> php - ?

2005-08-02 Thread Rory Browne
I haven't a monkies what that code(your java) does, and I don't have time to analyse it(in expensive cybercafe), but you may want to consider www.php.net/print-r www.php.net/var-dump and www.php.net/var-export I think they may do what you want without using the toString method, which for what you'

[PHP] XSL custom xmlns/urn in PHP5 for callbacks

2005-08-02 Thread Torgny Bjers
Hello, I recently started working with PHP5 after having spent quite some time with C#.NET (at work), and I was wondering if there's a way to create a custom callback namespace for XSL in PHP5? The example below should illustrate what I need: http://www.w3.org/1999/XSL/Transform"; xmlns:myap

RE: [PHP] How to determine if a script instance is already runnin g?

2005-08-02 Thread Jim Moseby
> -Original Message- > From: Matt [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 02, 2005 10:45 AM > To: php-general@lists.php.net > Subject: Re: [PHP] How to determine if a script instance is already > running? > > > Perhaps "svscan" and its associated "daemontools" programs could be

RE: [PHP] varibles defination

2005-08-02 Thread Jim Moseby
> If I want to define and display a set of varibles, for example : > $func1 = 0 > $func2 = 1 > $func3 = 2 > $func4 = 3 > $func5 = 4 > > How can we define and display the varibles by using for loop > function ? This uses an array, so, in this case, your variables would be referenced as $func[0]

Re: [PHP] cannot find the parse error

2005-08-02 Thread John Nichel
Miles Thompson wrote: John, Which editor does syntax checking? (In VB I find it a mixed blessing.) I personally use the Zend editor, but I'm pretty sure there are a few more out there (like ActiveState's IDE I think). -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED]

Re: [PHP] parent::construct not reliable working on php5.1 b2/b3

2005-08-02 Thread Meno Abels
it is only a typo in my email i use __construct Meno 2005/8/2, Jochem Maas <[EMAIL PROTECTED]>: > Pawel Bernat wrote: > > On Tue, Aug 02, 2005 at 03:42:00PM +0100, Meno Abels wrote: > > > >>Hello, > >> > >>With my application that uses heavily inherent classes, sometimes I > > dep class heir

Re: [PHP] parent::construct not reliable working on php5.1 b2/b3

2005-08-02 Thread Jochem Maas
Pawel Bernat wrote: On Tue, Aug 02, 2005 at 03:42:00PM +0100, Meno Abels wrote: Hello, With my application that uses heavily inherent classes, sometimes I dep class heirarchies can lead to brainfreeze - beware of going to deep :-) get the following message: PHP Fatal error: Call to un

Re: [PHP] cannot find the parse error

2005-08-02 Thread Miles Thompson
At 11:45 AM 8/2/2005, John Nichel wrote: Jochem Maas wrote: John Nichel wrote: Jochem Maas wrote: did you look at line 44??? (actually I found the problem on line 69 when I cut and pasted into a editor - the editor also gave that line as the one with the error in it: And to think that

Re: [PHP] cannot find the parse error

2005-08-02 Thread John Nichel
Jochem Maas wrote: John Nichel wrote: Jochem Maas wrote: did you look at line 44??? (actually I found the problem on line 69 when I cut and pasted into a editor - the editor also gave that line as the one with the error in it: And to think that I used to hate editors that did this at

Re: [PHP] How to determine if a script instance is already running?

2005-08-02 Thread Matt
Perhaps "svscan" and its associated "daemontools" programs could be used to monitor the script instead of relying on cron. http://cr.yp.to/daemontools.html On 8/2/05, André Medeiros <[EMAIL PROTECTED]> wrote: > On Tue, 2005-08-02 at 15:09 +0100, Stut wrote: > > André Medeiros wrote: > > > Do like

[PHP] varibles defination

2005-08-02 Thread edwardspl
Dear You, If I want to define and display a set of varibles, for example : $func1 = 0 $func2 = 1 $func3 = 2 $func4 = 3 $func5 = 4 How can we define and display the varibles by using for loop function ? Edward. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.

Re: [PHP] cannot find the parse error

2005-08-02 Thread Jochem Maas
John Nichel wrote: Jochem Maas wrote: did you look at line 44??? (actually I found the problem on line 69 when I cut and pasted into a editor - the editor also gave that line as the one with the error in it: And to think that I used to hate editors that did this at one time. :-) not su

Re: [PHP] Regex help

2005-08-02 Thread Robin Vickery
On 8/2/05, Chris Boget <[EMAIL PROTECTED]> wrote: > I'm trying to validate an email address and for the life of me I > cannot figure out why the following regex is not working: > > $email = "[EMAIL PROTECTED]"; > $regex = > "^([a-zA-Z0-9_\.\-\']+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-

Re: [PHP] How to determine if a script instance is already running?

2005-08-02 Thread André Medeiros
On Tue, 2005-08-02 at 15:09 +0100, Stut wrote: > André Medeiros wrote: > > Do like some services do: > > > > 1) Check if script.pid exists > > 2) If it doesn't > > 2.1) Write the process's PID onto the file > > (http://pt.php.net/manual/en/function.getmypid.php) > > 3) If it does > > 3.1) Die grac

Re: [PHP] cannot find the parse error

2005-08-02 Thread John Nichel
Jochem Maas wrote: did you look at line 44??? (actually I found the problem on line 69 when I cut and pasted into a editor - the editor also gave that line as the one with the error in it: And to think that I used to hate editors that did this at one time. -- John C. Nichel ÜberGeek KegWorks

Re: [PHP] regarding form submission and option pull down menu

2005-08-02 Thread John Nichel
Bruce Gilbert wrote: a few more questions about the submission process for a form with option choices. say I am using : selected="selected">Purchase value="construct_home">Construct Home Refinance

Re: [PHP] cannot find the parse error

2005-08-02 Thread John Nichel
Bruce Gilbert wrote: -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to determine if a script instance is already running?

2005-08-02 Thread Stut
André Medeiros wrote: Do like some services do: 1) Check if script.pid exists 2) If it doesn't 2.1) Write the process's PID onto the file (http://pt.php.net/manual/en/function.getmypid.php) 3) If it does 3.1) Die gracefully :) Personally I'd extend that slightly to have the process touch the P

Re: [PHP] regarding form submission and option pull down menu

2005-08-02 Thread Jochem Maas
Bruce Gilbert wrote: a few more questions about the submission process for a form with option choices. say I am using : selected="selected">Purchase value="construct_home">Construct Home Refinance

Re: [PHP] cannot find the parse error

2005-08-02 Thread Jochem Maas
Bruce Gilbert wrote: I am getting the following parsing error and don't see it off hand. Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form.php on line 44 did you loo

[PHP] regarding form submission and option pull down menu

2005-08-02 Thread Bruce Gilbert
a few more questions about the submission process for a form with option choices. say I am using : Purchase Construct Home Refinance - No Cash Refinance - Cash Out is it better to use a name for value (the same as the selectio

Re: [PHP] How to determine if a script instance is already running?

2005-08-02 Thread André Medeiros
On Tue, 2005-08-02 at 09:49 -0400, Jim Moseby wrote: > I have a command line script that needs to run continuously, and so I plan > to have cron execute it every so often. I want to have the script first > check to see if another instance is already running and, if so, die(). > > Now, I know I ca

[PHP] How to determine if a script instance is already running?

2005-08-02 Thread Jim Moseby
I have a command line script that needs to run continuously, and so I plan to have cron execute it every so often. I want to have the script first check to see if another instance is already running and, if so, die(). Now, I know I can exec the process list and parse through the output, but is th

[PHP] cannot find the parse error

2005-08-02 Thread Bruce Gilbert
I am getting the following parsing error and don't see it off hand. Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form.php on line 44 here is all of the code: if anyone

[PHP] Regex help

2005-08-02 Thread Chris Boget
I'm trying to validate an email address and for the life of me I cannot figure out why the following regex is not working: $email = "[EMAIL PROTECTED]"; $regex = "^([a-zA-Z0-9_\.\-\']+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-\']+\.)+))([a-zA-Z]{2,4}|[0-9]{

Re: [PHP] PHP form not working

u can also work out like this: $email_err ="Please enter your email address!/span>/>"; $message_err = "Please enter a message!"; this wil also work perfectly alrite. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] encrypting urls

i need to mask (hide) some vars in a url so they arent visible to the user. example, i want a url like this: page?id=3&something=12&more=12 to turn into: page?id=3;LyFU;MLFxvy so from "LyFU" i can access $something and from "MLFxvy" $more any ideas how i can do this? doesn't have to be 100%

Re: [PHP] Re: error checking a null array

Jack Jackson wrote: I can only swear this to the entire list: Before I come here for help, each time, I echo and var_dump and print_r until, yes, I need a doctor. I did say give it a rest when you start bleeding ;-) So by the time I come here, it's not laziness or lack of looking in the m

Re: [PHP] returning info. from a form selection

> > > > can anyone give me an idea on how to return info. from a forl > > pulldown menu > > > > and return that to an email address. > > > > A most basic question begs a most basic answer: > > if (!$_POST['submit']){ // Display form > ?> > > > Dropdown Value to Email > > > > > > Purchase >

Re: [PHP] Java - toString() <-> php - ?

Adi Zebic wrote: To print "state" of object in Java I can define toString() function and then I can do something like this: Java exemple: * import java.io.*; import java.util.*; public class ReadTextFromFile { private static String line; private stat

[PHP] Re: Sessions Issue

did you check the output of "phpinfo()"? if you did not made modifications or manual configurations, the session support should be on in defalt. ~viraj. On 8/1/05, Burhan Khalid <[EMAIL PROTECTED]> wrote: > > On Jul 29, 2005, at 8:07 PM, Tom Ray [Lists] wrote: > > > We built a box about 7 mo

Re: [PHP] array()

Edward Vermillion wrote: Sebastian wrote: is it always necessary to call array() when you do something like this: mysql_query("SELECT "); while($rows .) { $data[] = $rows; } if so, why? i have a habit of never calling array() and someone told me i shouldn't do this. If that's y