[PHP] Re: Help! the Error_Reporting doesn't work

2003-09-25 Thread Greg Beaver
Um, E_ALL & ~E_NOTICE disables notices. Try E_ALL Greg Luckyeagle wrote: I write some PHP files including some errors When it runs on another server,it will display "notice",but on my computer,it won't. "Luckyeagle" <[EMAIL PROTECTED]> дÈëÓʼþ news:[EMAIL PROTECTED] I have set the PHP.INI a

[PHP] Re: Help! the Error_Reporting doesn't work

2003-09-25 Thread LuckyEagle
I write some PHP files including some errors When it runs on another server,it will display "notice",but on my computer,it won't. "Luckyeagle" <[EMAIL PROTECTED]> дÈëÓʼþ news:[EMAIL PROTECTED] > I have set the PHP.INI as follow: > > error_reporting = E_ALL & ~E_NOTICE > display_errors = On > disp

Re: [PHP] Private Mail System?

2003-09-25 Thread Ryan Thompson
I would think you're asking on the wrong list. Try find a list for software or servers. Lee Herron QCS wrote: Anyone know of a private mail system, like say vbb has built-in, but stand alone? No, not interested in pop3 or smtp interfacing, simply a web based private mail system with nothing else.

Re: [PHP] Form Passed Multidimension Array

2003-09-25 Thread Robert Cummings
On Thu, 2003-09-25 at 22:33, Keith Spiller wrote: > Hello, > > I am trying to find out how to pass a multidimensional array within a hidden input > of a form. > Would it be something like this? > > > > Any advice would be forever appreciated... The following might work: echo ''; Cheers, R

[PHP] Form Passed Multidimension Array

2003-09-25 Thread Keith Spiller
Hello, I am trying to find out how to pass a multidimensional array within a hidden input of a form. Would it be something like this? Any advice would be forever appreciated... Keith

[PHP] Weird replacing

2003-09-25 Thread Anguz Web Design
Hi, I wrote a code to change the urls in my forum, to a new format. I did it with output buffering and inside it, I used preg_replace_callback, which worked great for me. But I shared this code with the forum program community and there's a person that can't make it work. He says his Apache gets c

Re: [PHP] Timezones and Daylight Savings Time

2003-09-25 Thread Tom Rogers
Hi, Friday, September 26, 2003, 2:55:51 AM, you wrote: JJ> Got a client site in Thailand that is about 13 hours JJ> different from the Web Server time so with any JJ> date/time stamping I need to add the 13 hours. JJ> However, when it comes time for DST, I'd hate to have JJ> to code for that or r

[PHP] Private Mail System?

2003-09-25 Thread Lee Herron QCS
Anyone know of a private mail system, like say vbb has built-in, but stand alone? No, not interested in pop3 or smtp interfacing, simply a web based private mail system with nothing else. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] One variable not equal to 2 values.

2003-09-25 Thread Robert Cummings
On Thu, 2003-09-25 at 19:49, Curt Zirzow wrote: > * Thus wrote Ed Curtis ([EMAIL PROTECTED]): > > > > How would I write this statement: > > > > if $thisvar is not equal to this value or that value. { do stuff } > > > > Ok. I have to throw this in for historical purposes :) > > switch ($thisv

Re: [PHP] One variable not equal to 2 values.

2003-09-25 Thread Curt Zirzow
* Thus wrote Ed Curtis ([EMAIL PROTECTED]): > > How would I write this statement: > > if $thisvar is not equal to this value or that value. { do stuff } > Ok. I have to throw this in for historical purposes :) switch ($thisvar) { case 'thisvalue': case 'thatvalue': break; default:

Re: [PHP] Re: Help! the Error_Reporting doesn't work

2003-09-25 Thread Curt Zirzow
* Thus wrote Raquel Rice ([EMAIL PROTECTED]): > On Thu, 25 Sep 2003 08:32:03 -0500 > "Shawn McKenzie" <[EMAIL PROTECTED]> wrote: > > > "Luckyeagle" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > I have set the PHP.INI as follow: > > > > > > error_reporting = E_ALL & ~E_NOTIC

[PHP] Checking mail with `mail`

2003-09-25 Thread Dan Phiffer
Is it practical to check for new mail from PHP using the UNIX mail utility? This would mainly be used to check for bounces from large mailings. Bonus points for anyone who can find me an article explaining the technique. Thanks! -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] What to use?

2003-09-25 Thread Ryan A
Hey, If anyones intrested, solved the problem like this: function cun($num) { $num = number_format($num,2,'.',','); return $num; } echo cun($var1); Cheers, -Ryan We will slaughter you all! - The Iraqi (Dis)information ministers

RE: RE: [PHP] PHP Editor - which to use?

2003-09-25 Thread Roger B.A. Klorese
> I guess you could call them helper scripts libraries. > > Example would be: You can program a script to create a switch > statement and > then have it prompt you for the number of case statements to > add in and if > you want them to break; or not. > > Things like that. Short cuts if you wil

Re: [PHP] What to use?

2003-09-25 Thread Robert Cummings
*slaps self* Yep, forgot about that part of number format :) Rob. On Thu, 2003-09-25 at 16:51, CPT John W. Holmes wrote: > From: "Robert Cummings" <[EMAIL PROTECTED]> > > > On Thu, 2003-09-25 at 16:28, Jeff McKeon wrote: > > > Correct me if I'm wrong please, but I think number_format() has the

[PHP] Broken pipe: core_output_filter: writing data to the network

2003-09-25 Thread Martin Greco
Hi. I have a Redhat 8 box with Apache 2.0.40, PHP 4.3.1, FreeTDS 0.61 working MS-SQL2000 server. When surfing any application sometimes when i hit a link or button the application dies (it does not load anything, the crash is instantaneous) and it shows this in the apache logs: [Mon Sep 22 14:00:

RE: [PHP] mysql.sock file location

2003-09-25 Thread Donald Tyler
Well after getting MySQL back up and running (After restarting the machine) the script worked fine. So it looks like editing the PHP.ini file worked. Thanks to everyone who helped. Don't know where I would be without you guys (& gals?). Donald. -Original Message- From: Jay Blanchard [mai

Re: [PHP] What to use?

2003-09-25 Thread Eugene Lee
On Thu, Sep 25, 2003 at 10:01:48PM +0200, Ryan A wrote: : : I am running a query on the database to get the avg of a few fields, I am : getting a result something like this: : : 5. : 4. : 5. : : I dont want to use such big averages and want to cut the last to digits off : so it will

Re: [PHP] What to use?

2003-09-25 Thread CPT John W. Holmes
From: "Jeff McKeon" <[EMAIL PROTECTED]> > Correct me if I'm wrong please, but I think number_format() has the > adverse effect of changing the value type from numeric to char and > therefore baring you from using it in mathematical equation later in the > script. You're correct (kind of). The _re

Re: [PHP] What to use?

2003-09-25 Thread CPT John W. Holmes
From: "Robert Cummings" <[EMAIL PROTECTED]> > On Thu, 2003-09-25 at 16:28, Jeff McKeon wrote: > > Correct me if I'm wrong please, but I think number_format() has the > > adverse effect of changing the value type from numeric to char and > > therefore baring you from using it in mathematical equati

RE: [PHP] What to use?

2003-09-25 Thread Robert Cummings
On Thu, 2003-09-25 at 16:28, Jeff McKeon wrote: > Correct me if I'm wrong please, but I think number_format() has the > adverse effect of changing the value type from numeric to char and > therefore baring you from using it in mathematical equation later in the > script. > > Anyway that's what it

RE: [PHP] What to use?

2003-09-25 Thread Jeff McKeon
Correct me if I'm wrong please, but I think number_format() has the adverse effect of changing the value type from numeric to char and therefore baring you from using it in mathematical equation later in the script. Anyway that's what it seemed to do to me when I used it on results from a MySQL qu

Re: [PHP] What to use?

2003-09-25 Thread Tyler Lane
round() and number_format() are what i would suggest using. On Thu, 2003-09-25 at 13:01, Ryan A wrote: > Hi, > I am running a query on the database to get the avg of a few fields, I am > getting a result something like this: > > 5. > 4. > 5. > > I dont want to use such big averages a

Re: RE: [PHP] PHP Editor - which to use?

2003-09-25 Thread Jim Lucas
Sorry, someone else responded to your email with the request. Jim Lucas - Original Message - From: "Chris W. Parker" <[EMAIL PROTECTED]> To: "Jim Lucas" <[EMAIL PROTECTED]>; "jeffrey pearson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, September 25, 2003 12:01 PM Subject: RE:

RE: [PHP] Understanding code.. again

2003-09-25 Thread Jeff McKeon
Thanks all! Jeff > -Original Message- > From: Chris Sherwood [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 25, 2003 4:15 PM > To: Jeff McKeon; [EMAIL PROTECTED] > Subject: Re: [PHP] Understanding code.. again > > > Yes the null is ignored when a var is passed > > <-- SNIP-->

Re: RE: [PHP] PHP Editor - which to use?

2003-09-25 Thread Jim Lucas
Something else entirely. I guess you could call them helper scripts libraries. Example would be: You can program a script to create a switch statement and then have it prompt you for the number of case statements to add in and if you want them to break; or not. Things like that. Short cuts if y

Re: [PHP] Understanding code.. again

2003-09-25 Thread Brad Pauly
Jeff McKeon wrote: Ok, so if an argument is supplied to the function, the "= null" is ignored? Yep. - Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Understanding code.. again

2003-09-25 Thread Chris Sherwood
Yes the null is ignored when a var is passed <-- SNIP--> Ok, so if an argument is supplied to the function, the "= null" is ignored? Jeff <-- snip --> chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Understanding code.. again

2003-09-25 Thread R'twick Niceorgaw
Jeff McKeon said the following on 9/25/2003 4:00 PM>> In the following code... --snip-- --snip-- What is the purpose in the function def of "($msgvar = null)"?? Why not just "function showmessage($msgvar)"?? It's to set a default value if no argument is passed to the function when called like

RE: [PHP] Understanding code.. again

2003-09-25 Thread Jeff McKeon
Ok, so if an argument is supplied to the function, the "= null" is ignored? Jeff > -Original Message- > From: Brad Pauly [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 25, 2003 4:09 PM > To: Jeff McKeon > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Understanding code.. again > > >

Re: [PHP] Understanding code.. again

2003-09-25 Thread Brad Pauly
Jeff McKeon wrote: Function Showmessage($msgvar = null) { echo $msgvar; } ?> --snip-- What is the purpose in the function def of "($msgvar = null)"?? Why not just "function showmessage($msgvar)"?? That sets a default value for $msgvar so you can call the function without an argument and i

RE: [PHP] What to use?

2003-09-25 Thread Jay Blanchard
[snip] I dont want to use such big averages and want to cut the last to digits off so it will be something like: 5.00 4.00 44.23 [/snip] http://www.php.net/number_format -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] What to use?

2003-09-25 Thread Ryan A
Hi, I am running a query on the database to get the avg of a few fields, I am getting a result something like this: 5. 4. 5. I dont want to use such big averages and want to cut the last to digits off so it will be something like: 5.00 4.00 44.23 etc I visited the manual and had a lo

[PHP] Understanding code.. again

2003-09-25 Thread Jeff McKeon
In the following code... --snip-- --snip-- What is the purpose in the function def of "($msgvar = null)"?? Why not just "function showmessage($msgvar)"?? Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reading Form Buttons

2003-09-25 Thread Robert Cummings
On Thu, 2003-09-25 at 15:39, Dan J. Rychlik wrote: > Oh, so its the same as reading post data from form fields. Cool. That > makes it easy. For the most part, but only the button submitted will be posted to your web server which is why you need to check for isset() Cheers, Rob. -- .---

Re: [PHP] Reading Form Buttons

2003-09-25 Thread Dan J. Rychlik
Oh, so its the same as reading post data from form fields. Cool. That makes it easy. Thank you - Original Message - From: "Jeff McKeon" <[EMAIL PROTECTED]> To: "Dan J. Rychlik" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, September 25, 2003 2:38 PM Subject: RE: [PHP] Reading

RE: [PHP] Reading Form Buttons

2003-09-25 Thread Jeff McKeon
If(isset($_post['update'])) { do something; } If(isset($_POST['delete'])) { do something; } Jeff > -Original Message- > From: Dan J. Rychlik [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 25, 2003 3:35 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Reading Form Butto

[PHP] Reading Form Buttons

2003-09-25 Thread Dan J. Rychlik
Hello, I cant figure this one out. In one form I have two button that needs to trigger their respective functions. In php, how would I read the values or the names of the buttons pressed? -Dan

Re: [PHP] Pause Timer ()

2003-09-25 Thread Jason Wong
On Friday 26 September 2003 03:11, Dan J. Rychlik wrote: > Is their a pause timer or timer function in PHP to pause a script for a > certain amount of seconds? sleep() -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Inter

Re: [PHP] Pause Timer ()

2003-09-25 Thread Robert Cummings
On Thu, 2003-09-25 at 15:11, Dan J. Rychlik wrote: > Is their a pause timer or timer function in PHP to pause a script for a certain > amount of seconds? Same as for almost every programming language under the sun: http://www.php.net/manual/en/function.sleep.php Cheers, Rob. -- .--

Re: [PHP] PHP form to fax?

2003-09-25 Thread Jason Wong
On Friday 26 September 2003 02:48, J J wrote: > I know in the past it wasn't possible to do something > like have a user fill out a web form and that > information would then be sent to a fax machine. This > would require some sort of dialing abilities on the > server. Still does. > Is there any

[PHP] Pause Timer ()

2003-09-25 Thread Dan J. Rychlik
Is their a pause timer or timer function in PHP to pause a script for a certain amount of seconds? -Dan

RE: [PHP] Help understanding code...

2003-09-25 Thread Robert Cummings
This isn't quite true. The strcmp() functions return 0, or false, when the strings are equal. Thus the ! ensures that the expression evaluates to true when the strings are equal. Cheers, Rob. On Thu, 2003-09-25 at 15:03, Giz wrote: > ! (not) reverses the value of the Boolean expression which fol

Re: [PHP] One variable not equal to 2 values.

2003-09-25 Thread Robert Cummings
Another version that is logically correct unlike some of the others I saw :) if( !($thisvar == "this value" or $thisvar == "that value") ) { // stuff to do. } Cheers, Rob. On Thu, 2003-09-25 at 14:59, Cesar Cordovez wrote: > But then... you have to use "and" not "or" > like: > > if (($this

RE: [PHP] Help understanding code...

2003-09-25 Thread Giz
! (not) reverses the value of the Boolean expression which follows it. All Boolean comparisons must evaluate to TRUE or FALSE. Without the ! the strcmp will proceed to the next block if strcmp returns TRUE. With the !, it will proceed to the next block if strcmp returns FALSE (ie NOT TRUE). Y

Re: [PHP] One variable not equal to 2 values.

2003-09-25 Thread Cesar Cordovez
Other way to do it is: $posible_values = array("this value", "that value", "other value"); if (in_array($thisvalue, $posible_values)) { // $thisvalue is in $posible_values } else { // $thisvalue is NOT in $posible_values } Cesar I wrote: But then... you have to use "and" not "or"

RE: RE: [PHP] PHP Editor - which to use?

2003-09-25 Thread Chris W. Parker
Jim Lucas on Thursday, September 25, 2003 11:52 AM said: > I already answered that question two days ago. I didn't ask you to answer it twice so I don't what you're talking about. c, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

RE: RE: [PHP] PHP Editor - which to use?

2003-09-25 Thread Roger B.A. Klorese
> you can create so-called assistants... > > You can create a loop that asks in a table how many rows and > columns do you > want in that table. > > Then you can have it create the table with all your favorite > default table > settings, but while it is generating it, you could have it > promp

Re: [PHP] One variable not equal to 2 values.

2003-09-25 Thread Cesar Cordovez
But then... you have to use "and" not "or" like: if (($thisvar != "this value") and ($thisvar != "thatvalue")) { // do stuff } Cesar Cordovez wrote: if (($thisvar != "this value") or ($thisvar != "thatvalue")) { // do stuff } cesar =) Ed Curtis wrote: How would I write this statemen

RE: [PHP] One variable not equal to 2 values.

2003-09-25 Thread Jay Blanchard
[snip] How would I write this statement: if $thisvar is not equal to this value or that value. { do stuff } [/snip] You already wrote it. Now if you want the PHP way RTFM about conditional statements. if($thisvar != thisval || $thisvar != thatval){ there be dragons here, because what ha

Re: [PHP] One variable not equal to 2 values.

2003-09-25 Thread Cesar Cordovez
if (($thisvar != "this value") or ($thisvar != "thatvalue")) { // do stuff } cesar =) Ed Curtis wrote: How would I write this statement: if $thisvar is not equal to this value or that value. { do stuff } Thanks, Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

[PHP] One variable not equal to 2 values.

2003-09-25 Thread Ed Curtis
How would I write this statement: if $thisvar is not equal to this value or that value. { do stuff } Thanks, Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Editor - which to use?

2003-09-25 Thread Jim Lucas
Nope, if you were to look at the responses that I have give to people in the past, you would notice that I indent just fine. Jim Lucas - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> To: "Jim Lucas" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, September 2

Re: RE: [PHP] PHP Editor - which to use?

2003-09-25 Thread Jim Lucas
I already answered that question two days ago. Jim Lucas - Original Message - From: "Chris W. Parker" <[EMAIL PROTECTED]> To: "Jim Lucas" <[EMAIL PROTECTED]>; "jeffrey pearson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, September 23, 2003 10:06 AM Subject: RE: RE: [PHP] PHP E

[PHP] PHP form to fax?

2003-09-25 Thread J J
I know in the past it wasn't possible to do something like have a user fill out a web form and that information would then be sent to a fax machine. This would require some sort of dialing abilities on the server. Is there anything available today that could perform such a function possibly withi

RE: [PHP] POST Variable Empty

2003-09-25 Thread Jay Blanchard
[snip] When I try to upload a larger file it fails. ...other non-relevant stuff... [/snip] check your php.ini for the following; ; Maximum allowed size for uploaded files. upload_max_filesize = 2M is the setting high enough? Also, what about your form, do you have something like this ...

Re: [PHP] Netcraft

2003-09-25 Thread Becoming Digital
> And ok, I wont post Perl things anymore ;-) That's no fun. I like hearing what I can do with yet another language. ;) Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: "Christophe Chisogne" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday,

Re: [PHP] POST Variable Empty

2003-09-25 Thread Becoming Digital
Check the following lines in your phi.ini file. ; Maximum size of POST data that PHP will accept. post_max_size = 8M Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: "Jonathan Pitcher" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday,

Re: [PHP] Really Simple

2003-09-25 Thread Becoming Digital
I'm not sure what the problem is. Everything's working smoothly on my end. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: "Kaan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, 25 September, 2003 13:08 Subject: [PHP] Rea

[PHP] POST Variable Empty

2003-09-25 Thread Jonathan Pitcher
I am pulling my hair trying to figure this out. Maybe some of you can shed some light on the problem. I am uploading a file through a web connection using the $_FILE array. Works perfectly on small files. The code executes and it goes through the script like a champ. BUT ... When I try to

RE: [PHP] Timezones and Daylight Savings Time

2003-09-25 Thread J J
They want everything set to their time, so it would probably be easier just to determine the server time and add as necessary. I think... --- Jeff McKeon <[EMAIL PROTECTED]> wrote: > What if you set the server to use UTC and then used > the clients local > system setting to offset it for each cl

RE: [PHP] problem with imagettfbbox() function

2003-09-25 Thread Jay Blanchard
[snip] I installed PHP 4.3.3 with default values. When I moved my sites, who use imagettfbbox() function, I received message -Fatal error: Call to undefined function: imagettfbbox() - everytime when I called this. GD library is installed and Freetype library I installed by hand. Hovewer infophp

Re: [PHP] problem with imagettfbbox() function

2003-09-25 Thread Jason Wong
On Friday 26 September 2003 01:02, Miroslav Puzder wrote: > I installed PHP 4.3.3 with default values. When I moved my sites, who use > imagettfbbox() function, I received message -Fatal error: Call to undefined > function: imagettfbbox() - everytime when I called this. > GD library is installed a

[PHP] Really Simple

2003-09-25 Thread Kaan
Hi Can someone look at this code for me For Some reason when I add any more: The form doesnt send!! What I want is to have two more hidden fields storing the data for country and contact thanks -Code--- Untitled Document Call-off Select the recipients and add the qu

RE: [PHP] Timezones and Daylight Savings Time

2003-09-25 Thread Jeff McKeon
What if you set the server to use UTC and then used the clients local system setting to offset it for each client? So the server would have it's time at UTC and a client in the Eastern US would be at -4. You could then detect the web client timezone setting and adjust as needed? This is just a

[PHP] problem with imagettfbbox() function

2003-09-25 Thread Miroslav Puzder
Hello, I installed PHP 4.3.3 with default values. When I moved my sites, who use imagettfbbox() function, I received message -Fatal error: Call to undefined function: imagettfbbox() - everytime when I called this. GD library is installed and Freetype library I installed by hand. Hovewer infoph

[PHP] yp_match() from another domain and master ?

2003-09-25 Thread Stephan van Beerschoten
Hi, I haven't found very many referenced for using php with YP/NIS aside from the occasional question answered. (Google is your friend), however I can't seem to find anything related to my latest quirrel: I want to access nismap data from another nisdomain which resides on another host, much like

Re: [PHP] Help understanding code...

2003-09-25 Thread Brent Baisley
Your assumptions are correct. It's called a ternary operator and it is a substitution or the if-else statements. I try not to overuse it since I don't think it's as readable as the block if statement. But for things not assigning a value to a variable, I think it's better than the block sta

[PHP] Timezones and Daylight Savings Time

2003-09-25 Thread J J
Got a client site in Thailand that is about 13 hours different from the Web Server time so with any date/time stamping I need to add the 13 hours. However, when it comes time for DST, I'd hate to have to code for that or remember to manually change the time stamping. Is there some kind of automat

RE: [PHP] Help understanding code...

2003-09-25 Thread Jeff McKeon
Thanks for the reply. What about he use of '!' with the strcmp() command. As I understand it, strcmp compairs two strings and returns <0 if str1 is less than str2, returns 0 if they are equal and returns >0 if str1 is greater than str2. At least that's what the PHP online manual says. How does t

Re: [PHP] Help understanding code...

2003-09-25 Thread Robert Cummings
On Thu, 2003-09-25 at 12:47, Jeff McKeon wrote: > I've just picked up a more advanced book on PHP and it has a lot of > example code in it. I understand most of it but some things I'm seeing I > don't understand. Like the following... > > code: > -

Re: [PHP] Help understanding code...

2003-09-25 Thread Jonathan Villa
! means not, for example $yes != $no Regarding the (xxx) ? x : x; Your assumption is correct I use it alot, but sometimes it's still better to use if/else statements On Thu, 2003-09-25 at 11:47, Jeff McKeon wrote: > I've just picked up a more advanced book on PHP and it has a lot of > example co

[PHP] Help understanding code...

2003-09-25 Thread Jeff McKeon
I've just picked up a more advanced book on PHP and it has a lot of example code in it. I understand most of it but some things I'm seeing I don't understand. Like the following... code: $couponcode = (! empty($_R

RE: [PHP] for loop break and continue

2003-09-25 Thread Jay Blanchard
[snip] Can't you let me have a shred of programming self-respect? Rich (I should have cracked the book) Fox [/snip] Nah, too easy! :) We all get bumped from time to time -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] for loop break and continue

2003-09-25 Thread Rich Fox
Can't you let me have a shred of programming self-respect? Rich (I should have cracked the book) Fox > On Thu, 2003-09-25 at 12:04, Rich Fox wrote: > > DOH! > > > > This is a new addition to PHP because it wasn't there before! > > > > Thanks for the slap. > > PHP has supported break for as long a

[PHP] parsing of large csv file for insert into pgsql via PHP

2003-09-25 Thread Dave [Hawk-Systems]
we have a number of csv dumps that occasionally have to be used to update tables in a postgres database... normally this is done by uploading the file and whomever running a php based parser which opens the file into an array via file(), does a split() on the comma, then executes an insert or upda

RE: [PHP] mysql.sock file location

2003-09-25 Thread Donald Tyler
Don't know yet, I've managed to stop mysql from loading now! (See my previous mail) -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 10:40 AM To: Donald Tyler; [EMAIL PROTECTED] Subject: RE: [PHP] mysql.sock file location [snip] I wasn't

RE: [PHP] mysql.sock file location

2003-09-25 Thread Donald Tyler
No not a network IP ping. A mysqladmin ping: Mysqladmin --user=root ping -Original Message- From: Brad Pauly [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 10:53 AM To: Donald Tyler Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mysql.sock file location Donald Tyler wrote: > Yes

Re: [PHP] Netcraft

2003-09-25 Thread Christophe Chisogne
In the Unix world with PHP, you can do OS fingerprinting by calling a system tool such as nmap (option: -O), but this require root privileges, and is not always perceived as well-behaviour by sysadmins. Or you can do everything you want with PHP sockets. I guess Netcraft use OS fingerprinting tool

Re: [PHP] for loop break and continue

2003-09-25 Thread Robert Cummings
On Thu, 2003-09-25 at 12:04, Rich Fox wrote: > DOH! > > This is a new addition to PHP because it wasn't there before! > > Thanks for the slap. PHP has supported break for as long as I can remember which goes back to about 1999 and PHP 3.something. Cheers, Rob. -- .

Re: [PHP] for loop break and continue

2003-09-25 Thread Rich Fox
DOH! This is a new addition to PHP because it wasn't there before! Thanks for the slap. "Robert Cummings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Take the sample code below, paste it to a PHP file, add a real > conditional, execute script. Voila, you've taken the first ste

Re: [PHP] Am stuck

2003-09-25 Thread Chris Sherwood
Why dont you trim the string first to ensure that there are no empty spaces at the end and beginning of it http://ca3.php.net/manual/en/function.trim.php and then do your count. Chris <-- SNIP --> Good day all I have a txt file that has values from various strings written to it. What Im lookin

Re: [PHP] fopen

2003-09-25 Thread Matt Grunden
Chris, Looks like all you need to do is insert a statement that writes an "\n" to the file, although what you have should work. Kind of puzzling now that I look at it. Try adding the "\n" to $header before using it in the fwrite statement. $header .= "\n"; $write = (fwrite($fp, $header)); f

Re: [PHP] mysql.sock file location

2003-09-25 Thread Brad Pauly
Donald Tyler wrote: Yes, I ping it and it says its alive. I don't understand. What did you ping? How does that mean it is running? Getting a response from a ping does not mean MySQL is running. Did you try connecting with a MySQL client from the command line? Have you looked at the running proce

RE: [PHP] mysql.sock file location

2003-09-25 Thread Donald Tyler
Argh! Wonderful. Now I have broken something else. I just restarted the machine and now MySQL won't start. I keep getting the error: 030925 10:30:10 mysqld started 030925 10:30:10 InnoDB: Operating system error number 13 in a file operation. InnoDB: See http://www.innodb.com/ibman.html for instal

[PHP] PHP & QT/KDE

2003-09-25 Thread Jackson Miller
Does anyone know of any projects to bring QT/KDE GUI bindings to PHP? It would be VERY cool to have something like PyKDE for PHP. Especially once PHP5 is released and SQLite is part of the KDe interpreter. I know there is PHP-GTK, but it's development appears stale. -Jackson -- jackson mille

Re: [PHP] for loop break and continue

2003-09-25 Thread Robert Cummings
Take the sample code below, paste it to a PHP file, add a real conditional, execute script. Voila, you've taken the first step towards helping yourself. Cheers, Rob. On Thu, 2003-09-25 at 11:42, Rich Fox wrote: > Hi, > Is there an equivalent to the C++ 'break' command to stop execution of a for

[PHP] for loop break and continue

2003-09-25 Thread Rich Fox
Hi, Is there an equivalent to the C++ 'break' command to stop execution of a for loop? I know I can use 'goto' but I don't want to unless I have to. for ($i=0; $i<$n; $i++) if (some condition) break; And, what about 'continue' which skips the rest of the code in the for loop and immed

RE: [PHP] mysql.sock file location

2003-09-25 Thread Jay Blanchard
[snip] I wasn't worried about short code =0P I would have done this if I was: $Connection = mysql_connect('localhost','**','**') or die(mysql_error()); =0P [/snip] Cool, but do you get errors? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

RE: [PHP] mysql.lock file location

2003-09-25 Thread Donald Tyler
Yeah I do that too. But I was reluctant to do that with something that just seemed like a fix for a problem that shouldn’t even exist. If the server with my scripts is configured correctly, then I should never have to specify a .sock file. I hope... -Original Message- From: Jackson Miller

RE: [PHP] mysql.sock file location

2003-09-25 Thread Donald Tyler
I wasn't worried about short code =0P I would have done this if I was: $Connection = mysql_connect('localhost','**','**') or die(mysql_error()); =0P -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 10:13

[PHP] fopen

2003-09-25 Thread Chris Grigor
Hi I am writing to a file different sources. The one writes the date and the next starts writing data. The date writes fine. $header = "0$gpsdate"; echo $out_file; $fp = fopen($out_file, "a"); $write = (fwrite($fp, "$header\n")); fclose($fp); Now I get to another batch process that in

RE: [PHP] mysql.sock file location

2003-09-25 Thread Didier McGillis
d-d-a is the proper way to say it but I pretty much go by everything including 'Hey you!' From: "Jay Blanchard" <[EMAIL PROTECTED]> To: "Didier McGillis" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> CC: <[EMAIL PROTECTED]> Subject: RE: [PHP] mysql.sock file location Date: Thu,

RE: [PHP] mysql.sock file location

2003-09-25 Thread Donald Tyler
Yes, I ping it and it says its alive. -Original Message- From: Brad Pauly [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 10:07 AM To: Donald Tyler Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mysql.sock file location Donald Tyler wrote: > Yeah I thought so to. But I did a chmod

Re: [PHP] Netcraft

2003-09-25 Thread Robert Cummings
On Thu, 2003-09-25 at 11:25, Christophe Chisogne wrote: > > That method is not reliable, as you can see. Other methods exist > to check OS (fingerprinting) etc. But it remain quite complex. > (round-robin DNS, load balancing, caching servers, firewalls...) Maybe not, but it's the method that Netcr

Re: [PHP] Netcraft

2003-09-25 Thread Chris Shiflett
--- Christophe Chisogne <[EMAIL PROTECTED]> wrote: > Robert Cummings wrote: > > can use a PHP script that opens a socket connection on port 80 > > For these interactive things, Perl seems much more appropriate for > me. Using libwww aka LWP for the web client (LWP::UserAgent or > LWP::RobotUA) Usi

Re: [PHP] Netcraft

2003-09-25 Thread Christophe Chisogne
Robert Cummings wrote: can use a PHP script that opens a socket connection on port 80 to get For these interactive things, Perl seems much more appropriate for me. Using libwww aka LWP for the web client (LWP::UserAgent or LWP::RobotUA) Using DBI for access to a DB to store/retreive results. I'm do

RE: [PHP] mysql.sock file location

2003-09-25 Thread Jay Blanchard
[snip] yes like the user and the password ** and ** arent working for me. ;) [/snip] Not to head way off topic, well, OTOH, yes I am... Didier, is that pronounced did-i-A or did-i-er, or am I way off base. I knew someone with the first iteration. -- PHP General Mailing List (http://www.

RE: [PHP] mysql.sock file location

2003-09-25 Thread Didier McGillis
yes like the user and the password ** and ** arent working for me. ;) From: "Jay Blanchard" <[EMAIL PROTECTED]> To: "Brad Pauly" <[EMAIL PROTECTED]>, "Donald Tyler" <[EMAIL PROTECTED]> CC: <[EMAIL PROTECTED]> Subject: RE: [PHP] mysql.sock file location Date: Thu, 25 Sep 2003 10:12:50 -0

RE: [PHP] mysql.sock file location

2003-09-25 Thread Jay Blanchard
[snip] > Here's the test script I am using: (Presume that's what you meant by > "connection string"? > > > if($Connection = mysql_connect('localhost', '**', '**')) > print 'Success!'; > else > print 'Failure'; > > ?> [/snip] Let's get a hair more

  1   2   >