[PHP] php cgi

2003-10-23 Thread Michael P. Carel
Hi, I have here a problem for having the php-cgi binary in linux. I compiled php with php-cli and php-cgi but after installation i can't find the php-cgi binary, i only have the php-cli under /usr/local/bin/. Any idea why? Please help.. here's what i've did: './configure' '--with-mysql' '--with

Re: [PHP] Problem with RAND()

2003-10-23 Thread Jason Wong
On Friday 24 October 2003 11:02, Chuck PUP Payne wrote: > I am trying to understand how RAND (), because I've had this problem before > with other langs., I am using with this with MySQL statement that is in my > php script, but it's only put the first files. I only have three files, do > I need m

Re: [PHP] Re: Code optimization: single vs. double quotes?

2003-10-23 Thread Jason Wong
On Friday 24 October 2003 10:58, Shawn McKenzie wrote: > Thanks guys! I want to hear all opinions, but hopefully a PHP dev will > give us the straight poop. Why? This issue has been thoroughly discussed to death (well maybe not quite as people still like to bring it up now and again). Just run

Re: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Michael Mauch
Pablo Gosse wrote: > Hi Raditha. Thanks very much for your reply. I've not been having much > luck with this one. > > This is how the images should appear: > http://web.unbc.ca/~gossep/sample_images/1.gif > http://web.unbc.ca/~gossep/sample_images/nav-02.jpg > > And here is how they appear afte

[PHP] Problem with RAND()

2003-10-23 Thread Chuck PUP Payne
Hi, I am trying to understand how RAND (), because I've had this problem before with other langs., I am using with this with MySQL statement that is in my php script, but it's only put the first files. I only have three files, do I need more files in my database? Is RAND() or RAND (), please help

[PHP] Re: Code optimization: single vs. double quotes?

2003-10-23 Thread Shawn McKenzie
Thanks guys! I want to hear all opinions, but hopefully a PHP dev will give us the straight poop. -Shawn "Shawn McKenzie" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I came across this post and was hoping to get a gurus opinion on the > validity. TIA > > -Shawn > > I remember

Re: [PHP] Code optimization: single vs. double quotes?

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 20:43, Shawn McKenzie wrote: > I came across this post and was hoping to get a gurus opinion on the > validity. TIA > > -Shawn > > I remember reading somewhere re: PHP coding that it is a better coding > practice to use single quotes as much as possible vs. using double quo

Re: [PHP] Code optimization: single vs. double quotes?

2003-10-23 Thread Jordan S. Jones
I remember reading something very very similar from one of the main php developers.. However, for the life of me, I can't remember where it was exactly... Jordan S. Jones Shawn McKenzie wrote: I came across this post and was hoping to get a gurus opinion on the validity. TIA -Shawn I remembe

Re: [PHP] Ways to break up XML into Arrays????

2003-10-23 Thread John Nichel
>On Thursday 23 October 2003 17:02, Scott Fletcher wrote: Hi Fellas! I don't want to use the PHP's XML feature at this moment because I found out that I need to recompile PHP with the XML support which I can't do at this moment. So, instead of recompiling, does anyone know of a good sample c

Re: [PHP] Ways to break up XML into Arrays????

2003-10-23 Thread daniel
> Try looking through http://pear.php.net for something. > check out the xml functions, its an xml parser -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Ways to break up XML into Arrays????

2003-10-23 Thread Raditha Dissanayake
While it's possible to process XML using regular expression. The whole point of using XML is that you wouldn't have to use hacked solutions like that :-) Scott Fletcher wrote: Hi Fellas! I don't want to use the PHP's XML feature at this moment because I found out that I need to recompile PH

Re: [PHP] Ways to break up XML into Arrays????

2003-10-23 Thread Ryan Thompson
Try looking through http://pear.php.net for something. On Thursday 23 October 2003 17:02, Scott Fletcher wrote: > Hi Fellas! > > I don't want to use the PHP's XML feature at this moment because I > found out that I need to recompile PHP with the XML support which I can't > do at this moment.

[PHP] Code optimization: single vs. double quotes?

2003-10-23 Thread Shawn McKenzie
I came across this post and was hoping to get a gurus opinion on the validity. TIA -Shawn I remember reading somewhere re: PHP coding that it is a better coding practice to use single quotes as much as possible vs. using double quotes in scripts. When using double quotes, you are forcing PHP to

Re: [PHP] Replacing text in a PDF file -- suggestions.

2003-10-23 Thread Curt Zirzow
* Thus wrote Ray Van Dolson ([EMAIL PROTECTED]): > > Anyways, just looking for some suggestions. Right now I am thinking > that generating the PDF file myself will be easier than figuring out how > to match and replace text in Adobe's PDF 5+ files. FDF... http://php.net/fdf Curt -

Re[2]: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Tom Rogers
Hi, Friday, October 24, 2003, 2:11:43 AM, you wrote: PG> Hi Tom. >> make sure you have ENCTYPE="multipart/form-data" in the form tag PG> Thanks for the tip, but that's not the problem. My code is below, and PG> as you can see there is nothing in the code that would be causing this. PG> It has t

[PHP] Replacing text in a PDF file -- suggestions.

2003-10-23 Thread Ray Van Dolson
I have a PDF file generated in Adobe Acrobat 5.0 in which there are several fields I would like to make customizeable. My thought was to create fields in the PDF file named %%STUDENT_NAME%% and then basically do a search/replace on the PDF file with PHP resulting in a PDF with the student's na

Re[2]: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Tom Rogers
Hi, Friday, October 24, 2003, 2:11:43 AM, you wrote: PG> Hi Tom. >> make sure you have ENCTYPE="multipart/form-data" in the form tag PG> Thanks for the tip, but that's not the problem. My code is below, and PG> as you can see there is nothing in the code that would be causing this. PG> It has t

Re: [PHP] What does the word 'parse' meant when you do a XML parse...

2003-10-23 Thread John Nichel
Scott Fletcher wrote: What does the word, 'parse' meant when you do a XML parse? What is it and what does it exactly do? Thanks, Scott F. Ummm...it parses the XML document. Yeah, yeah, good answer!!! -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http:

RE: [PHP] Conversion project problem

2003-10-23 Thread Vail, Warren
On the insert query remove the "$result = " since the insert will return a null and wipe out the result set produced by the first query. Warren Vail -Original Message- From: Mike Alderson [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 3:52 PM To: [EMAIL PROTECTED] Subject: [PH

Re: [PHP] Conversion project problem

2003-10-23 Thread Eugene Lee
On Thu, Oct 23, 2003 at 03:51:30PM -0700, Mike Alderson wrote: : : I am trying to gather information from one database, : process it, and insert it into a new one. When I run : this script I am getting the following error: : : Warning: mysql_fetch_array(): supplied argument is not : a valid My

[PHP] Conversion project problem

2003-10-23 Thread Mike Alderson
Hello all. I am trying to gather information from one database, process it, and insert it into a new one. When I run this script I am getting the following error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\web\aldersonfamily\convert.php on line 1

Re: [PHP] Age from birthdate?

2003-10-23 Thread Mike Migurski
>Lastly, where in the world did you get "pedant"? word for the day or >something? :-D Thats a real unusual word for normal everyday use, unless >you were trying to act pedant?? :- The correct adverbial form is "pedantically" ;) ---

[PHP] Re: What does the word 'parse' meant when you do a XML parse...

2003-10-23 Thread Dennis Sterzenbach
"Scott Fletcher" <[EMAIL PROTECTED]> wrote: > What does the word, 'parse' meant when you do a XML parse? What is it and > what does it exactly do? > > Thanks, > Scott F. Sorry, but I don't get clearly what you are asking for. Could you ask your question again being more precise? -- Dennis Ster

Re: [PHP] What does the word 'parse' meant when you do a XML parse...

2003-10-23 Thread Chris Shiflett
--- Scott Fletcher <[EMAIL PROTECTED]> wrote: > What does the word, 'parse' meant when you do a XML parse? http://dictionary.reference.com/search?q=parse http://en.wikipedia.org/wiki/Parse Hope that helps. Chris = My Blog http://shiflett.org/ HTTP Developer's Handbook http://http

[PHP] What does the word 'parse' meant when you do a XML parse...

2003-10-23 Thread Scott Fletcher
What does the word, 'parse' meant when you do a XML parse? What is it and what does it exactly do? Thanks, Scott F. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP not remembering sessions

2003-10-23 Thread Golawala, Moiz M (IndSys, GE Interlogix)
I added the code you mentioned. Below is the result from the browser. I notice that the sessionId is the correct one from the previous page. I think this is good new.. :) 2 [Array ( [PHPSESSID] => 0572d98f00483accdc6e61348b359287 [loopCount] => 2 ) ] Thanks moiz -Original Message--

RE: [PHP] PHP not remembering sessions

2003-10-23 Thread Vail, Warren
Sounds to me like the browser you are using has cookies disabled? Curious, do you see a parameter in your php.ini labeled session.name? In fact, why don't you compare your setup to the following from a foxserv installation of sessions; Directive Local Value M

RE: [PHP] PHP not remembering sessions

2003-10-23 Thread Chris Shiflett
--- "Golawala, Moiz M (IndSys, GE Interlogix)" <[EMAIL PROTECTED]> wrote: > I am sorry to call it a cookie.. I see the data in a session file > (not a cookie) OK, so you just look in this file manually? > I don't have a html file. I simply call the .php file by typing the > url as http://localhos

[PHP] New Install - 405 Method Errors

2003-10-23 Thread Jeff - Harbornet
We are installing PHP 4.3.3 on a web server (NT4, IIS 4.0). When attempting to run the following script, We are getting the classic: 405 Method Not Allowed The method specified in the Request Line is not allowed for the resource identified by the request. Please ensure that you have the proper MI

[PHP] Ways to break up XML into Arrays????

2003-10-23 Thread Scott Fletcher
Hi Fellas! I don't want to use the PHP's XML feature at this moment because I found out that I need to recompile PHP with the XML support which I can't do at this moment. So, instead of recompiling, does anyone know of a good sample coding or class out there on the Internet that would work

RE: [PHP] PHP not remembering sessions

2003-10-23 Thread Golawala, Moiz M (IndSys, GE Interlogix)
Chris, I am sorry to call it a cookie.. I see the data in a session file (not a cookie) I don't have a html file. I simply call the .php file by typing the url as http://localhost/page1.php Thanks moiz -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED] Sent: Thursday, O

RE: [PHP] PHP not remembering sessions

2003-10-23 Thread Golawala, Moiz M (IndSys, GE Interlogix)
Hi Warren, Ahh.. now i know what you mean by save handler routines.. I don't have any in any of my php files. yes, the save_path was pointing to the place where I have the web files stored. I can see the session files in that directory. I have tried to point to another directory too. But I hav

Re: [PHP] PHP not remembering sessions

2003-10-23 Thread Chris Shiflett
--- Daniel Guerrier <[EMAIL PROTECTED]> wrote: > Use > $_SESSION['var'] > > instead of > > $_SESSION["var"] That won't make any difference. As for the original question, I don't notice any immediate problems with the code: > > in page1.php: > > > $_SESSION["var"] = "Please help"; ?> > >

[PHP] Re: problem with intval and !=

2003-10-23 Thread DvDmanDT
Outputs Number: 12, Value: 12.3 Bad for me running XP home nosp, Apache 1.3.28 mod_php 4.3.4rc2, or as standalone cgi... -- // DvDmanDT MSN: [EMAIL PROTECTED] Mail: [EMAIL PROTECTED] "Cesar Cordovez" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > Can somebody explain me why is

RE: [PHP] PHP not remembering sessions

2003-10-23 Thread Vail, Warren
while this doesn't mean that save handler routines are not used, it provides some clues. Does the directory pointed to by the session.save_path contain session files (they will usually have an encrypted filename)? save handler routines are actually defined in your php files, usually dynamically,

[PHP] Re: File attachment to mail() doesn't work....

2003-10-23 Thread Scott Fletcher
The problem I was having turned out that I need to add extra "\n" to some of the lines to the $EmailMsg. It turned out that MS-Outlook doesn't work without some extra "\n" for some reason. Some other people told me they have this same problem with different Mail Client software as well, so it see

[PHP] Re: Attachments with Mail()

2003-10-23 Thread Manuel Lemos
Hello, On 10/23/2003 09:13 AM, Don Mc Nair wrote: Can anyone tell me how to add a file as an attachment to an email sent with something like the following ? $headers = "From: <".$fromaddress.">\r\n"; $headers .= "Reply-To: <$fromaddress>\r\n"; mail($toaddress, $subject, $mailcontent, $headers

RE: [PHP] PHP not remembering sessions

2003-10-23 Thread Golawala, Moiz M (IndSys, GE Interlogix)
I was surfing the web to find out if I was the only one with this strange problem and I found out that I was not alone.. Aparently there was a bug in php version 4.1.0 regarding this. However there is no bugs like this noted for php version 4.3.2 (which is what I am running). rgds moiz -O

Re: [PHP] PHP not remembering sessions

2003-10-23 Thread Dennis Sterzenbach
"Moiz M Golawala" <[EMAIL PROTECTED]> wrote: > This is what is defined in the php.ini file for save handler routines.. > I am newbie, I left it with default values: > > session.save_handler = files > session.save_path = c:/Program Files/Apache Group/Apache2/htdocs/Alarms/ > > thanks > moiz Change

Re: [PHP] Age from birthdate?

2003-10-23 Thread Ryan A
Nope, am a newbie here and I myself admit my grasp of php aint aint the best, but dont you think something as "interesting" as this should be discusses offlist? (And yes, I do see the irony of cc'ing this to the list...) Lastly, where in the world did you get "pedant"? word for the day or somethi

RE: [PHP] PHP not remembering sessions

2003-10-23 Thread Golawala, Moiz M (IndSys, GE Interlogix)
This is what is defined in the php.ini file for save handler routines.. I am newbie, I left it with default values: session.save_handler = files session.save_path = c:/Program Files/Apache Group/Apache2/htdocs/Alarms/ thanks moiz -Original Message- From: Vail, Warren [mailto:[EMAIL PRO

RE: [PHP] PHP not remembering sessions

2003-10-23 Thread Vail, Warren
are you using "session save handler" routines? If not make sure you have a "/tmp" directory on your server, in fact you can check phpinfo() to find out what the session save directory is (provided you are not using save handler routines). good luck Warren Vail -Original Message- From: C

Re: [PHP] PHP not remembering sessions

2003-10-23 Thread Curt Zirzow
* Thus wrote Golawala, Moiz M (IndSys, GE Interlogix) ([EMAIL PROTECTED]): > > I noticed that 2 cookies were created one for each session start. When I opened one > of the cookies, I noticed that the data "Please help" was in the session cookie. > Somehow php thinks a session is not already crea

Re: [PHP] PHP not remembering sessions

2003-10-23 Thread Dennis Sterzenbach
"Pablo Gosse" <[EMAIL PROTECTED]> wrote: Strange, because I just set up the code exactly as posted below, under Win2K and Apache 2.0, and it worked fine. Cheers, Pablo -Original Message- From: Golawala, Moiz M (IndSys, GE Interlogix) [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2

Re: [PHP] PHP not remembering sessions

2003-10-23 Thread Curt Zirzow
* Thus wrote Daniel Guerrier ([EMAIL PROTECTED]): > Use > $_SESSION['var'] > > instead of > > $_SESSION["var"] This doesn't matter. Curt -- "My PHP key is worn out" PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ -- PHP General Mailing List (http://www.php.net

Re: [PHP] Age from birthdate?

2003-10-23 Thread Nicholas Robinson
Oh, you're such a pedant. On Thursday 23 Oct 2003 9:08 pm, Ryan A wrote: > Now HERES a good PHP related thread thats been going on for around 2 > days...:-D > > >Yes, but think about all the presents, hangovers, etc. they miss. > > On Thursday 23 Oct 2003 2:12 am, Mike Migurski wrote: > > >> >I do

RE: [PHP] PHP not remembering sessions

2003-10-23 Thread Pablo Gosse
Strange, because I just set up the code exactly as posted below, under Win2K and Apache 2.0, and it worked fine. Cheers, Pablo -Original Message- From: Golawala, Moiz M (IndSys, GE Interlogix) [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 1:11 PM To: Daniel Guerrier; [EMAIL

RE: [PHP] PHP not remembering sessions

2003-10-23 Thread Golawala, Moiz M (IndSys, GE Interlogix)
It seems that there is a problem with the session management on windows/apache. I was surfing the web to find an answer, and I noticed that there are couple of other people who have the same problem. But alas, there were no answers posted to this problem. So someone, please help me if you know w

Re: [PHP] Age from birthdate?

2003-10-23 Thread Ryan A
Now HERES a good PHP related thread thats been going on for around 2 days...:-D >Yes, but think about all the presents, hangovers, etc. they miss. On Thursday 23 Oct 2003 2:12 am, Mike Migurski wrote: > >> >I do wonder what the rule for those born on Feb 29'th. Do they > >> >celebrate they're

Re: [PHP] Is it worth $49? - codeSECURE 1.0 released - - Protecting PHP code

2003-10-23 Thread John Black
Hi Andrei, Thank you for writing. >I have read announcement about CodeSecure. I am sorry to say, but I am >not sure this product is worth $49. No problem, that is totally your opinion and you have a right to it. > The problem is not $49, which is very small amount indeed, Yes, this is aimed at

Re: [PHP] PHP not remembering sessions

2003-10-23 Thread Daniel Guerrier
Use $_SESSION['var'] instead of $_SESSION["var"] --- "Golawala, Moiz M (IndSys, GE Interlogix)" <[EMAIL PROTECTED]> wrote: > Hi All, > > I have a problem with PHP not remembering sessions. > for example: > > in page1.php: > > $_SESSION["var"] = "Please help"; ?> > >maxleng

[PHP] Re: get user attributes php/ldap/win2k active directory

2003-10-23 Thread Justin Patrin
I've been getting entries from an Active Directory server through LDAP for a while now. Here's some example code: //connect and bind //$ds should be the handle returned from ldap_connect //Search LDAP for all users // note, your OU entries may differ $sr = ldap_search($ds, 'OU=Employees,OU=Active

[PHP] PHP not remembering sessions

2003-10-23 Thread Golawala, Moiz M (IndSys, GE Interlogix)
Hi All, I have a problem with PHP not remembering sessions. for example: in page1.php: in page2.php what I see above is only data for loopCount. I am not able to see the "Please help" on page2 I noticed that 2 cookies were created one for each session s

Re: [PHP] Age from birthdate?

2003-10-23 Thread Nicholas Robinson
Yes, but think about all the presents, hangovers, etc. they miss. On Thursday 23 Oct 2003 2:12 am, Mike Migurski wrote: > >> >I do wonder what the rule for those born on Feb 29'th. Do they > >> >celebrate they're birthday before or after it on non leap years? > >> > >>Neither. They celebrat

Re: [PHP] Avoiding blank lines in HTML when field is empty

2003-10-23 Thread Eugene Lee
On Thu, Oct 23, 2003 at 12:46:29PM -0500, Robb Kerr wrote: : : I'm a PhP /MySQL newbie so please excuse the simple question. I'm returning : results from a MySQL query on a webpage. My code includes... : : :, : : : : , : : Phone: : :

Re: [PHP] Avoiding blank lines in HTML when field is empty

2003-10-23 Thread Jordan S. Jones
Robb, You pretty much have it.. Here is what you will most likely want: if (!empty($row_rsVandyDivAddresses['Address']) && strlen (trim ($row_rsVandyDivAddresses['Address'])) > 0) { echo $row_rsVandyDivAddresses['Address']) . ''; } ?> Feel free to format as you wish. Jordan S. Jones Robb

Re: [PHP] Avoiding blank lines in HTML when field is empty

2003-10-23 Thread Chris Shiflett
--- Robb Kerr <[EMAIL PROTECTED]> wrote: > Here's the problem. Some of the fields are empty (for instance > 'Address') and the way my code is configured a blank line appears in > the returned data when the field is empty. How do I change this code > to add a conditional that only echos the field co

[PHP] Avoiding blank lines in HTML when field is empty

2003-10-23 Thread Robb Kerr
I'm a PhP /MySQL newbie so please excuse the simple question. I'm returning results from a MySQL query on a webpage. My code includes... , , Phone: Email: Here's the problem. Some of the fields are empty (for instance 'Address') an

[PHP] get user attributes php/ldap/win2k active directory

2003-10-23 Thread Redmond Militante
hi all my first email to the list re: php/ldap/win2k AD garnered no responses. i've got most of the problem solved, however i can't get attributes from the ldap server. i have a login script that authenticates against our win2k active directory domain controller. i'm able to open a connection

Re: [PHP] problem with intval and !=

2003-10-23 Thread Curt Zirzow
* Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): > I got the error again: > http://bugs.php.net/search.php?search_for=&boolean=0&limit=10&order_by=&direction=ASC&cmd=display&status=All&bug_type%5B%5D=Scripting+Engine+problem&php_os=windows&phpver=&assign=&author_email=&bug_age=0 That reminds me o

Re: [PHP] problem with intval and !=

2003-10-23 Thread Marek Kilimajer
I got the error again: http://bugs.php.net/search.php?search_for=&boolean=0&limit=10&order_by=&direction=ASC&cmd=display&status=All&bug_type%5B%5D=Scripting+Engine+problem&php_os=windows&phpver=&assign=&author_email=&bug_age=0 Curt Zirzow wrote: * Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): T

RE: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Pablo Gosse
Thanks Raditha. At least now I know I've been looking in the wrong place! I'll look forward to the perl script to see if it sheds any more light on this situation. I'm currently running Windoze, but when I boot to Linux later I'll try Khexedit to see what I can come up with. Cheers, Pablo

RE: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Ricardo C. Fernandez de C.
Something wrong is with your "uploader" program... look at this: Content-Disposition: form-data; name="upload"; filename="C:\Documents and Settin gs\gossep\Desktop\ewimages\1.gif" And if you look closer to the data in the file, you will see it has 2 GIF or something (GIF8 twice)... so yep, you ha

Re: [PHP] problem with intval [CONCLUSION]

2003-10-23 Thread Cesar Cordovez
Everybody: This problem solved. It is not PHP's fault, It is mine. When I fixed some problems that I thought where non intrusive in this problem, everything started working as a charm. Here is the finished function, it is part of a class called xValidate. function integer(&$msg, $prompt, $val

Re: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Raditha Dissanayake
Hi Pablo Pablo Gosse wrote: Hi Raditha. Thanks very much for your reply. I've not been having much luck with this one. welcome This is how the images should appear: http://web.unbc.ca/~gossep/sample_images/1.gif http://web.unbc.ca/~gossep/sample_images/nav-02.jpg And here is how they appear af

RE: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Pablo Gosse
Hi Raditha. Thanks very much for your reply. I've not been having much luck with this one. This is how the images should appear: http://web.unbc.ca/~gossep/sample_images/1.gif http://web.unbc.ca/~gossep/sample_images/nav-02.jpg And here is how they appear after being uploaded: http://web.unbc.c

Re: [PHP] fsock sending bad request

2003-10-23 Thread Raditha Dissanayake
Hi hey Curt, I missed that one. Daniel have you looked at RFC 2616? Curt Zirzow wrote: * Thus wrote [EMAIL PROTECTED] ([EMAIL PROTECTED]): Hi there the following code doesnt seem to work, i am getting a bad request sent back from the server, what could be the problem of something so simple ? $h

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 13:01, Marek Kilimajer wrote: > This echoes out "Bad" on my LAMP server as it should, but "Good" on > Cesar's windows server: Aaaah how true. I wasn't following this much earlier so I don't know if he is using the most up to date version, in which case it may already be fixe

Re: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Raditha Dissanayake
Hi Pablo, Could you explain what exactly you mean by transferred in ASCII mode? do you find that cr/lf combinations are translated (there by corrupting your image) or some other corruption takes place? Have you opened the files with a hex editor to see the contents? I am sorry if you have ment

Re: [PHP] problem with intval and !=

2003-10-23 Thread Marek Kilimajer
This echoes out "Bad" on my LAMP server as it should, but "Good" on Cesar's windows server: $value = "12.3"; $number = intval($value); echo "Number: $number, Value: $value"; // echoes: Number: 12, Value: 12.3 if ($number != $value) { echo "Bad"; } else { echo "Good"; // echoes Good!!

Re: [PHP] Array in SQL-table

2003-10-23 Thread Jordan S. Jones
If the field isn't required to be searchable, you could just serialize the array and shove that into a VARCHAR column.. Then unserialize the return value for that column. Jordan S. Jones Reidar wrote: I want to store an ARRAY in a SQL-table but don't know how to define it in the table. The PHP

[PHP] Array in SQL-table

2003-10-23 Thread Reidar
I want to store an ARRAY in a SQL-table but don't know how to define it in the table. The PHP-stuff is working OK but the "DB-thing" isn't. Anyone tried this? Hopefully it is Reidar Solberg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 12:41, John W. Holmes wrote: > Greg Beaver wrote: > > > http://www.php.net/is_numeric > > > > is the function you are looking for. No need for fancy regexps. > > The OP is looking for an integer, but is_numeric() will return true for > float values and also for numbers in

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 12:43, Marek Kilimajer wrote: > These are all workarounds around the real problem. If php gets it wrong > fix php. Could you explain how PHP has it "wrong"? Rob. -- .. | InterJinn Application Framework - http://ww

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 12:28, Greg Beaver wrote: > Hello all, > > http://www.php.net/is_numeric > > is the function you are looking for. No need for fancy regexps. Sorry, that doesn't cut it. He want's integers not floats, and I'm also sure he doesn't want exponential notation to pass either. C

Re: [PHP] problem with intval and !=

2003-10-23 Thread Marek Kilimajer
These are all workarounds around the real problem. If php gets it wrong fix php. Robert Sedlacek wrote: On Thu, 23 Oct 2003 11:59:44 -0400, Cesar Cordovez wrote: So, how can I check if what ever the user writes is an integer or not, knowing that he will write it in a string field. Idea: if(

Re: [PHP] problem with intval and !=

2003-10-23 Thread John W. Holmes
Greg Beaver wrote: http://www.php.net/is_numeric is the function you are looking for. No need for fancy regexps. The OP is looking for an integer, but is_numeric() will return true for float values and also for numbers in scientific notation. So "12.3" and "12E3" will be TRUE. The original $n

Re: [PHP] problem with intval and !=

2003-10-23 Thread Jordan S. Jones
Cesar, You can take a look into is_numeric () (http://www.php.net/is_numeric). It will tell you whether the value is a number or a numeric string, but it will also return true if the value is a float. However, at that point you know your working with the right type of variable. Jordan S. Jone

Re: [PHP] problem with intval and !=

2003-10-23 Thread Marek Kilimajer
Status: All Return only bugs in categories: Scripting Engine Problem Return bugs with operating system: windows But it is ok now. Curt Zirzow wrote: * Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): This should be reported as a bug. I tried few searches and I got Warning: mysql_fetch_array():

Re: [PHP] problem with intval and !=

2003-10-23 Thread Greg Beaver
Hello all, http://www.php.net/is_numeric is the function you are looking for. No need for fancy regexps. Regards, Greg -- phpDocumentor http://www.phpdoc.org Cesar Cordovez wrote: Sorry, typo, this is what I meant, !is_integer("12thisisnotanumber") retuns true. but also, is_integer("12") ret

Re: [PHP] problem with intval and !=

2003-10-23 Thread Curt Zirzow
* Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): > This should be reported as a bug. > > I tried few searches and I got > > Warning: mysql_fetch_array(): 9 is not a valid MySQL result resource in > /local/Web/sites/php-bugs-web/search.php on line 182 The search seems to work now, what did you

RE: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Pablo Gosse
Hi Tom. > make sure you have ENCTYPE="multipart/form-data" in the form tag Thanks for the tip, but that's not the problem. My code is below, and as you can see there is nothing in the code that would be causing this. It has to be something in the server, and while there have been a few posts to

Re: [PHP] Email Body

2003-10-23 Thread Don Read
On 22-Oct-2003 micro brew wrote: > I am sending an email using mail() and it works fine. > But the formatting of the body of the email is wrong. > I want to format part of it in columns sort of like > this: > Name Quantity Price > > Can this be done neatly without using an html e

Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
Sorry, typo, this is what I meant, !is_integer("12thisisnotanumber") retuns true. but also, is_integer("12") return false. therefore, is_integer(12) return true. So, how can I check if what ever the user writes is an integer or not, knowing that he will write it in a string field. Any how,

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 11:51, Robert Cummings wrote: > On Thu, 2003-10-23 at 11:21, Cesar Cordovez wrote: > > > > At this point, I think I have to change the procedure. This is not > > good. Any sugestions on how to now if the user types an integer number > > in a field? > > > > Here's a real

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 11:21, Cesar Cordovez wrote: > > At this point, I think I have to change the procedure. This is not > good. Any sugestions on how to now if the user types an integer number > in a field? > Here's a really simple way: if( ereg( '^[[:space:]]*[[:digit:]]+[[:space:]]*', $

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 11:41, Cesar Cordovez wrote: > Because is_integer("12thisisnotanumber") retuns true. > Not for me it doesn't. Returns false. Prolly because it's a string. Even the following returns false for me: is_integer("12") Cheers, Rob. -- .--

Re: [PHP] sql query/displaying results question

2003-10-23 Thread Jason Wong
On Thursday 23 October 2003 22:06, Adam Williams wrote: > So I will have 1 query that needs to print the document $title at the top > of the page and then when it starts showing results. I won't know what > the document title is until the database is queried (because they are > doing a query for

Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
Because is_integer("12thisisnotanumber") retuns true. Andrea Pinnisi wrote: why don't you use this?? http://it.php.net/manual/it/function.is-integer.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] problem with intval and !=

2003-10-23 Thread Marek Kilimajer
This should be reported as a bug. I tried few searches and I got Warning: mysql_fetch_array(): 9 is not a valid MySQL result resource in /local/Web/sites/php-bugs-web/search.php on line 182 on bugs.php.net Cesar Cordovez wrote: This is getting weird by the minute. I changed the script: if (

Re: [PHP] in_array()/finding page Problem

2003-10-23 Thread Marek Kilimajer
Ben G. McCullough wrote: I agree - my solution is VERY resource intensive, but I think I may have over simplified my question. Each item is listed by two categories, $medium and $period. Users can get to the item via a 'browse' of either category. I want to user to be able to get back to the

Re: [PHP] German Date - GMDATE Function

2003-10-23 Thread Don Read
On 22-Oct-2003 Steve Vernon wrote: > Hello, > > When I use the gmdate function, I get the English date, e.g. October. Is > it > possible to get the date in German or another language? I really need the > server setting up so that it can handle different languages. > $locale='de_CH.ISO_8859-1';

Re: [PHP] problem with intval and !=

2003-10-23 Thread Andrea Pinnisi
why don't you use this?? http://it.php.net/manual/it/function.is-integer.php Cesar Cordovez ha scritto: This is getting weird by the minute. I changed the script: if ($number != $value) { echo "Bad"; } else { echo "Good"; // echoes Good!! } to: ($number != $value) ($number !== $v

Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
This is getting weird by the minute. I changed the script: if ($number != $value) { echo "Bad"; } else { echo "Good"; // echoes Good!! } to: ($number != $value) ($number !== $value) ($number === $value) and I get the Good stuff... At this point, I think I have to change the

Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
The other purpose of this procedure is if the user types "12asdasd" into $value, $number will be assigned "12" so $value and $number are not the same, meaning $value is not a number. Which is correct, but the procedure is not working correctly in PHP when it should. (It works in c, c++, fortr

Re: [PHP] array of java-objects

2003-10-23 Thread Helke Schröder
Hi, thanks for the replay the var_dump on the array of java-objects looks interesting: the first, which is ok: array(8) { [0]=> &object(java)(1) { [0]=> int(3) } [1]=> &object(java)(1) [0]=> int(4) } [2]=> &object(java)(1) { [0]=> int(5) } [3]=> &object(java)(1) { [0]=> int(6) } [4]=> &object(

[PHP] sql query/displaying results question

2003-10-23 Thread Adam Williams
I have a php page I am writing with an SQL query. I am going to query the database for a couple of fields. One of the fields I am querying is the title oh the document someone is searching for. The title will be used at the top of the html page and will say: "you are searching for document n

Re: [PHP] there has to be a better way...

2003-10-23 Thread Raquel Rice
On Thu, 23 Oct 2003 01:04:55 -0500 "Walter Torres" <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: Colin Kettenacker [mailto:[EMAIL PROTECTED] > > > > Hi Walter, > > > > You may want to look into PEAR's config package. It does pretty > > much all you > > have listed here and a

Re: [PHP] problem with intval and !=

2003-10-23 Thread Curt Zirzow
* Thus wrote Cesar Cordovez ([EMAIL PROTECTED]): > Curt: > > My fault! You are right, but thats not what I want. $value comes from a > form filled by a user. I want $value to be an integer. Not a float. > So if the user types "12.3" the system has to send an error msg. Yeah, after reading me

Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
Curt: My fault! You are right, but thats not what I want. $value comes from a form filled by a user. I want $value to be an integer. Not a float. So if the user types "12.3" the system has to send an error msg. Therefore the procedure. By-the-way, Im using PHP 4.3.3 (on windows XP profesion

  1   2   >