[PHP] scandir() permissions

2009-07-26 Thread kranthi
code:

http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] This is the kind of [expletives deleted] answer that is certain to prevent bugs being reported.

2009-07-26 Thread Per Jessen
Robert Cummings wrote:

> Don't forget nobody is being paid to handle bug reports, it's all on a
> volunteer basis and I'm quite certain they get oodles of real bogus
> bugs.

Hi Robert

it's a two-way thing - nobody is paying me to write any bug reports, I'm
also volunteering my time and effort. Not just to PHP, but too quite a
few projects.  Fobbing people off like "jani" did me, is just not
conducive to getting better bugreports nor to improving the project in
general. 

HOWEVER - I've been studying the issue a bit more, and it appears that
it IS indeed the responsibility of the application to call 

setlocale(LC_ALL, "");

to become portable to all locales.  Definitely not what I would have
expected, but it's difficult to ignore the setlocale() man page:

> On startup of the main program, the portable "C" locale is selected as
> default.  A program may be made portable to all locales by calling:
>
>  setlocale(LC_ALL, "");


/Per

-- 
Per Jessen, Zürich (18.7°C)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] open source forum

2009-07-26 Thread mrfroasty
Hello,

I need some advice in picking a PHP forum for a group of people, I know
there are couple of them but could somebody from here give advice on
which one to choose.

***My strongest requirements I need localization support, as that
software might need to be translated into a language other than English.
***Also the software should be a little bit easy to use, interms of
administration as the clients computer literacy isnt so high enough.
***LAMP based software please :-)
***ofcourse open source software... :-P

I know this phpBB, but what are other options?I have never played with a
forum before.


Thanks for the input...

GR
mrfroasty

-- 
Extra details:
OSS:Gentoo Linux
profile:x86
Hardware:msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,VB,VHDL,bash,PHP,SQL,HTML,CSS
Typo:40WPM
url:http://www.mzalendo.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] open source forum

2009-07-26 Thread David Robley
mrfroasty wrote:

> Hello,
> 
> I need some advice in picking a PHP forum for a group of people, I know
> there are couple of them but could somebody from here give advice on
> which one to choose.
> 
> ***My strongest requirements I need localization support, as that
> software might need to be translated into a language other than English.
> ***Also the software should be a little bit easy to use, interms of
> administration as the clients computer literacy isnt so high enough.
> ***LAMP based software please :-)
> ***ofcourse open source software... :-P
> 
> I know this phpBB, but what are other options?I have never played with a
> forum before.
> 
> 
> Thanks for the input...
> 
> GR
> mrfroasty
> 

Have a look at the assortment of forums (fora?) at
http://php.opensourcecms.com/scripts/show.php?catid=5&cat=Forums

They have sandbox sites that you can play with and get a feel for the
application. 


Cheers
-- 
David Robley

After a number of decimal places, nobody gives a damn.
Today is Boomtime, the 61st day of Confusion in the YOLD 3175. 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] open source forum

2009-07-26 Thread mrfroasty
Thanks I will have a look at those list

GR
mrfroasty

David Robley wrote:
> mrfroasty wrote:
>
>   
>> Hello,
>>
>> I need some advice in picking a PHP forum for a group of people, I know
>> there are couple of them but could somebody from here give advice on
>> which one to choose.
>>
>> ***My strongest requirements I need localization support, as that
>> software might need to be translated into a language other than English.
>> ***Also the software should be a little bit easy to use, interms of
>> administration as the clients computer literacy isnt so high enough.
>> ***LAMP based software please :-)
>> ***ofcourse open source software... :-P
>>
>> I know this phpBB, but what are other options?I have never played with a
>> forum before.
>>
>>
>> Thanks for the input...
>>
>> GR
>> mrfroasty
>>
>> 
>
> Have a look at the assortment of forums (fora?) at
> http://php.opensourcecms.com/scripts/show.php?catid=5&cat=Forums
>
> They have sandbox sites that you can play with and get a feel for the
> application. 
>
>
> Cheers
>   


-- 
Extra details:
OSS:Gentoo Linux
profile:x86
Hardware:msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,VB,VHDL,bash,PHP,SQL,HTML,CSS
Typo:40WPM
url:http://www.mzalendo.net



Re: [PHP] open source forum

2009-07-26 Thread K. N. Lesmer
On Sun, 26 Jul 2009 14:50:03 +0200
mrfroasty  wrote:

> Hello,
> 
> I need some advice in picking a PHP forum for a group of people, I
> know there are couple of them but could somebody from here give
> advice on which one to choose.
> 
> ***My strongest requirements I need localization support, as that
> software might need to be translated into a language other than
> English. ***Also the software should be a little bit easy to use,
> interms of administration as the clients computer literacy isnt so
> high enough. ***LAMP based software please :-)
> ***ofcourse open source software... :-P
> 
> I know this phpBB, but what are other options?I have never played
> with a forum before.

I can strongly recommend Phorum (http://www.phorum.org/).

> Thanks for the input...
> 
> GR
> mrfroasty
> 
> -- 
> Extra details:
> OSS:Gentoo Linux
> profile:x86
> Hardware:msi geforce 8600GT asus p5k-se
> location:/home/muhsin
> language(s):C/C++,VB,VHDL,bash,PHP,SQL,HTML,CSS
> Typo:40WPM
> url:http://www.mzalendo.net
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


---
Mange venlige hilsner/Best regards

Kim Naim Lesmer
Programmer/Unix systemadministrator

Web: www.bitflop.com
E-mail : k...@bitflop.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Language translation

2009-07-26 Thread Phpster





On Jul 25, 2009, at 9:37 PM, Skip Evans  wrote:


Hey all,

We got a new project and language translation of content is a major  
priority. I've googled around and seen lots of options, but I'd like  
to hear from the list about more real world experiences about what  
some of you found and what both you as a coder and the client were  
most satisfied with.


Big Hugs,
Skip

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
-- Kurt Vonnegut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Skip,

What type of content are you looking to franslate? Forms or more  
narrative blog type entries?


How many languages are you looking to support?

From my experience where the app I am involved with does real time  
translation of forms and essentially builds the forms on the fly, is  
that translation is a real bottleneck. I lost the vote on this since  
my goal was to cache out the forms in their individual languages.


The future versions of this type of app will most certainly allow  
caching of the forms to only do the translation once and only when the  
form changes require it. It will also use google's translate to  
translate the form' elements into the defined system languages.


Bastien

Sent from my iPod 
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Language translation

2009-07-26 Thread Miles Thompson
gettext -not PHP, but a GNU project.
PHP hooks: http://ca.php.net/manual/en/book.gettext.php, which
contains a link to the project.

In the past I've coded arrays of prompts, this is a more native solution.

Cheers - Miles

On Sat, Jul 25, 2009 at 10:37 PM, Skip Evans wrote:
> Hey all,
>
> We got a new project and language translation of content is a major
> priority. I've googled around and seen lots of options, but I'd like to hear
> from the list about more real world experiences about what some of you found
> and what both you as a coder and the client were most satisfied with.
>
> Big Hugs,
> Skip
>
> --
> 
> Skip Evans
> Big Sky Penguin, LLC
> 503 S Baldwin St, #1
> Madison WI 53703
> 608.250.2720
> http://bigskypenguin.com
> 
> Those of you who believe in
> telekinesis, raise my hand.
>  -- Kurt Vonnegut
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] OOP Design Software

2009-07-26 Thread Daniel Kolbo
Hello,

Is there an objected oriented programming software that can help me keep
track of my methods and properties of my objects.  My memory is not what
it used to be, and i'd like to have a quick 'overview' or layout of all
the objects I have to work with.  Maybe the software would even let make
a process flow chart.  This would really help my design (and save me time).

Thanks,
dK
`

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] OOP Design Software

2009-07-26 Thread Caner BULUT

Hi Daniel,

You can use Eclipse with plugin PDT or Zend Studio. They can track your
classes and methods. They can remember your methods and classes also they
have code completion abilities.

Thanks
Caner.

-Original Message-
From: Daniel Kolbo [mailto:kolb0...@umn.edu] 
Sent: 26 July 2009 19:46
To: PHP General
Subject: [PHP] OOP Design Software

Hello,

Is there an objected oriented programming software that can help me keep
track of my methods and properties of my objects.  My memory is not what
it used to be, and i'd like to have a quick 'overview' or layout of all
the objects I have to work with.  Maybe the software would even let make
a process flow chart.  This would really help my design (and save me time).

Thanks,
dK
`

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] OOP Design Software

2009-07-26 Thread Eddie Drapkin
On Sun, Jul 26, 2009 at 12:54 PM, Caner BULUT wrote:
>
> Hi Daniel,
>
> You can use Eclipse with plugin PDT or Zend Studio. They can track your
> classes and methods. They can remember your methods and classes also they
> have code completion abilities.
>
> Thanks
> Caner.
>
> -Original Message-
> From: Daniel Kolbo [mailto:kolb0...@umn.edu]
> Sent: 26 July 2009 19:46
> To: PHP General
> Subject: [PHP] OOP Design Software
>
> Hello,
>
> Is there an objected oriented programming software that can help me keep
> track of my methods and properties of my objects.  My memory is not what
> it used to be, and i'd like to have a quick 'overview' or layout of all
> the objects I have to work with.  Maybe the software would even let make
> a process flow chart.  This would really help my design (and save me time).
>
> Thanks,
> dK
> `
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

There's plugins for Eclipse that generate UML, too.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] OOP Design Software

2009-07-26 Thread Daniel Kolbo


Caner BULUT wrote:
> Hi Daniel,
> 
> You can use Eclipse with plugin PDT or Zend Studio. They can track your
> classes and methods. They can remember your methods and classes also they
> have code completion abilities.
> 
> Thanks
> Caner.
> 
> -Original Message-
> From: Daniel Kolbo [mailto:kolb0...@umn.edu] 
> Sent: 26 July 2009 19:46
> To: PHP General
> Subject: [PHP] OOP Design Software
> 
> Hello,
> 
> Is there an objected oriented programming software that can help me keep
> track of my methods and properties of my objects.  My memory is not what
> it used to be, and i'd like to have a quick 'overview' or layout of all
> the objects I have to work with.  Maybe the software would even let make
> a process flow chart.  This would really help my design (and save me time).
> 
> Thanks,
> dK
> `
> 
Wow.  Thanks for the reference.  I've been playing with EclipsePDT for
about 30-45 minutes.  I've been developing strictly off of a text editor
(with some syntax coloring but that's it).  This Eclipse project looks
so big.  There'll be a bit of a learning curve with the EclipsePDT but
seeing that it was developed in part by Zend and also that smarty.net
uses it, i can rest assured that my time learning/implementing eclipse
will save me a great deal of time in the long haul.  I am glad to see it
has integration with xdebug and CVS.  I'll have to postpone my weekend
coding goals to learn Eclipse and see how to integrate it into my
development process.  Thanks for the recommendation (and quick too).
Thanks,
dK
`

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Language translation

2009-07-26 Thread Rudi Ullon
I'm also starting with a multilanguage project, and after a little research,
we've decided to use this gettext

http://savannah.nongnu.org/projects/php-gettext/

Take a look.. might be useful to you also.

---
Regards / Saludos

Rudi Ullon


Re: [PHP] Sorting mySQL query - one order from multiple fields

2009-07-26 Thread George Langley
	In case anyone else was wondering, the command to use is COALESCE()  
as in:


$theQuery = mysql_query("select variousFields from theTable where  
date = '$currDate' ORDER BY COALESCE(rotime2,rotime1,time)");


COALESCE() will use "one" of the variables, being the one it finds a  
value for first, for each record. Note how this differs from a multi  
sort, which sorts by the first field, then subsorts by the second,  
third, etc.

Hope this helps someone.


George Langley
Multimedia Developer, Audio/Video Editor, Musician, Arranger, Composer

http://www.georgelangley.ca
-
On 14-Jun-09, at 8:30 PM, George Langley wrote:

	Hi all. Am trying to sort baseball games by time, where there can  
be up to 3 times listed per game.
	Each game has an original "date" and "time" field, plus fields for  
2 rain-out dates/times ("rodate1" "rotime1", "rodate2", "rotime2"),  
to use if the game gets rained out. Note that rotime1 and rotime2  
are NULL if no time has been entered. Also note that the original  
date and time fields are not changed - they are kept for posterity.
	Usually, the rain-out date is set to a day that the teams were  
already going to play each other again, with the rain-out game  
going first. So need to sort those 2 games in order: rain-out  
first, then normally-scheduled.
	But, I can't just sort on the "time" field, as the rain-out game  
could now have a different time. I need to use the rotime2 (if it  
exists), else use the rotime1 (if it exists), else use the time.

Can not get my query order to work. One of the variations I've tried:

$theQuery = mysql_query("select variousFields from theTable where  
date = '$currDate' ORDER BY CASE WHEN rotime2 THEN rotime2 WHEN  
rotime1 THEN rotime1 ELSE time");


	Is there a query sort that will work in this case? Is not the  
usual "sort by last name, then sort by first name" scenario!

Thanks for any pointers.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] JS alert that links to a file

2009-07-26 Thread Skip Evans

Okay, I know I've done this before, but now I'm blanking out.

I have code that creates a CSV file, and when it's done I want 
a JS alert to pop up and let them save the file.


Isn't this some kind of alert() type call on the JS side???

I know I've done this before and I've been on Google an hour now!

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] JS alert that links to a file

2009-07-26 Thread Paul M Foster
On Sun, Jul 26, 2009 at 09:55:14PM -0500, Skip Evans wrote:

> Okay, I know I've done this before, but now I'm blanking out.
>
> I have code that creates a CSV file, and when it's done I want
> a JS alert to pop up and let them save the file.
>
> Isn't this some kind of alert() type call on the JS side???
>
> I know I've done this before and I've been on Google an hour now!

Not sure I understand your question, but there is a function called
alert() in javascript. It opens a window with your error message in it.

I don't know of a way to trigger this from PHP, since PHP is server-side
and Javascript is client-side. You might be able to have javascript scan
for the existence/closing of the file in question and then alert the
user. Or you could have PHP, when the file is complete, launch a new
page which contains the javascript code to alert the user.

Paul

-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Saving server side file to local machine with JS

2009-07-26 Thread Skip Evans

Sorry, I should have been clearer.

When PHP finishes creating the file I need one of the JS alert 
type windows to appear that says..


"Your file has completed, would you like to save it to your 
machine?"


Like you get when you download a file.

If I knew the JS code to do this I perhaps could embed it in 
the PHP at the end of the function that creates the file???


Is that clearer?

Thanks,
Skip


Paul M Foster wrote:
> On Sun, Jul 26, 2009 at 09:55:14PM -0500, Skip Evans wrote:
>
>> Okay, I know I've done this before, but now I'm blanking out.
>>
>> I have code that creates a CSV file, and when it's done I want
>> a JS alert to pop up and let them save the file.
>>
>> Isn't this some kind of alert() type call on the JS side???
>>
>> I know I've done this before and I've been on Google an 
hour now!

>
> Not sure I understand your question, but there is a 
function called
> alert() in javascript. It opens a window with your error 
message in it.

>
> I don't know of a way to trigger this from PHP, since PHP 
is server-side
> and Javascript is client-side. You might be able to have 
javascript scan
> for the existence/closing of the file in question and then 
alert the
> user. Or you could have PHP, when the file is complete, 
launch a new

> page which contains the javascript code to alert the user.
>
> Paul
>

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] JS alert that links to a file

2009-07-26 Thread LinuxManMikeC
On Sun, Jul 26, 2009 at 8:55 PM, Skip Evans wrote:
> Okay, I know I've done this before, but now I'm blanking out.
>
> I have code that creates a CSV file, and when it's done I want a JS alert to
> pop up and let them save the file.
>
> Isn't this some kind of alert() type call on the JS side???
>
> I know I've done this before and I've been on Google an hour now!
>
> --
> 
> Skip Evans
> Big Sky Penguin, LLC
> 503 S Baldwin St, #1
> Madison WI 53703
> 608.250.2720
> http://bigskypenguin.com
> 
> Those of you who believe in
> telekinesis, raise my hand.
>  -- Kurt Vonnegut
>

If I understand you correctly, you have PHP code (lets call it
makecsv.php) that makes a CSV file and returns it to the user.  When
the user visits the script makecsv.php you want them to be prompted to
save the CSV file you just generated.  If that is what you meant, this
is not a JavaScript thing.  Just set the Content-type and
Content-Disposition headers in your PHP script.  The browser will then
bring up a "Save as" dialog box when it receives the output from the
script.  http://us.php.net/manual/en/function.header.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] JS alert that links to a file

2009-07-26 Thread Skip Evans

LinuxManMikeC wrote:






Okay, right, I remember this.

But it has to be in it's own file, otherwise you get the 
'headers already sent error', right?


Is there any way around that? Any way to get it right at the 
end of where the file is created???


Thanks!
Skip

--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Correct code ?? PHP Basic pw athentication with mysql

2009-07-26 Thread Jason Guritz
I cant seem to get this to work.

Any ideas??

And If I have post this to the wrong area.. My sincere apologies!

Thank you in advance!

Jason



You are a valid user";
 echo "Your username is: {$_SERVER['PHP_AUTH_USER']}";
 echo "Your password is: {$_SERVER['PHP_AUTH_PW']}";
  }
 else {
 echo "You are not authorized!";
 }
}
 ?>


Re: [PHP] JS alert that links to a file

2009-07-26 Thread Jim Lucas

Skip Evans wrote:

LinuxManMikeC wrote:






Okay, right, I remember this.

But it has to be in it's own file, otherwise you get the 'headers 
already sent error', right?


Is there any way around that? Any way to get it right at the end of 
where the file is created???


Thanks!
Skip



No, what he gave as an example was just right.

only if you try calling header() after you echo something will it give you the header's already sent 
error.


--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Correct code ?? PHP Basic pw athentication with mysql

2009-07-26 Thread Jim Lucas

Jason Guritz wrote:

I cant seem to get this to work.

Any ideas??

And If I have post this to the wrong area.. My sincere apologies!

Thank you in advance!

Jason




Plus, you should really look at sanitizing those variables before you stuff them in an SQL 
statement!  Run them through mysql_real_escape_string() at least.


$sql = "SELECT id
FROMusers
WHERE   username = '$_SERVER[PHP_AUTH_USER]'
AND `password` = '$_SERVER[PHP_AUTH_PW]'";


$result = mysql_query($sql) or die ("Couldn't get results.");
$num = mysql_numrows($result);

The above function is actually named  mysql_num_rows().  You're missing an 
underscore.

if ( $num == 1 ) {
echo "You are a valid user";
echo "Your username is: {$_SERVER['PHP_AUTH_USER']}";
echo "Your password is: {$_SERVER['PHP_AUTH_PW']}";

Again, you should sanitize your input before you use it!

} else {
echo "You are not authorized!";
}
}
?>


Side question, what happens if you get 2 or more results?  Are you expecting their to be a 
possibility that you could have more then two results?


--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php