php-general Digest 22 Jan 2008 13:29:55 -0000 Issue 5250

Topics (messages 267808 through 267828):

scandir() in automount/autofs
        267808 by: shiplu
        267818 by: Zoltán Németh
        267819 by: Robert Cummings
        267820 by: Zoltán Németh
        267821 by: Robert Cummings

Re: Upgrade to PHP5 and having issues with mysql
        267809 by: Tom Ray [Lists]
        267810 by: Robert Cummings

forms class
        267811 by: nihilism machine
        267812 by: Robert Cummings

form cleaning class
        267813 by: nihilism machine
        267814 by: Robert Cummings

Tool for programmer team
        267815 by: Ronald Wiplinger
        267816 by: Sándor Tamás (HostWare Kft.)
        267817 by: Robert Cummings
        267822 by: Colin Guthrie

Re: $_POST Array and Cleaning
        267823 by: Manuel Vacelet
        267824 by: mike

building php with DB extension without installing DB locally
        267825 by: Jochem Maas
        267827 by: dev.lenss.nl

Re: Resetting drop-downlists in input-fields for texts
        267826 by: Tor Vidvei

Re: Best Approach
        267828 by: Jay Blanchard

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
I configured autofs in my fedora so that when I plug any usb stick in
/dev/sda1 it automatically mounts in /mnt/auto/usb0

There is two lines where the problem arise.

$util->run_command("ls -1 /mnt/auto/usb0 | wc -l");    // it shows 13 when I
plug my usb stick.
$list = scandir("/mnt/auto/usb0 ");  // here $list is null

This script is in a php file which is running by apache.
the $util object is not actually running the command but it is inserting the
command in a queue. There is daemon who has root access processing the
queue.
It means the command in $util->run_command() is executing with root
privilege. this command mounts and get the total amount of file/folder very
nicely
But when I run the second line I see there is no file. How can I fill the
list with those file list.
It may look that the problem is regarding permission. But I don't think so.
Becasue I use the same command I mean the same 2 lines with /mnt/cdrom, and
it works very nicely

It works,
$util->run_command("ls -1 /mnt/cdrom | wc -l");    // it shows 200 in my CD
rom drive
$list = scandir("/mnt/cdrom");  // here I get full list of files/folders

Why its happening?

I want the $list to be filled. Also I need directory and file information so
that I can make another list like
array(array('Type'=>'DIR','Name'=>'music'),array('Type'=>'DIR','Name'=>'music1'),array('Type'=>'FIL','Name'=>'
elvis.mp3'),array('Type'=>'FIL','Name'=>'elvis2.mp3'),...);


-- 
shout at http://me.cmyweb.net/
comment on http://talk.cmyweb.net/
All time available for Hire/Contract/Full Time :)

--- End Message ---
--- Begin Message ---
2008. 01. 21, hétfő keltezéssel 20.23-kor shiplu ezt írta:
> I configured autofs in my fedora so that when I plug any usb stick in
> /dev/sda1 it automatically mounts in /mnt/auto/usb0
> 
> There is two lines where the problem arise.
> 
> $util->run_command("ls -1 /mnt/auto/usb0 | wc -l");    // it shows 13 when I
> plug my usb stick.
> $list = scandir("/mnt/auto/usb0 ");  // here $list is null
> 
> This script is in a php file which is running by apache.
> the $util object is not actually running the command but it is inserting the
> command in a queue. There is daemon who has root access processing the
> queue.
> It means the command in $util->run_command() is executing with root
> privilege. this command mounts and get the total amount of file/folder very
> nicely
> But when I run the second line I see there is no file. How can I fill the
> list with those file list.
> It may look that the problem is regarding permission. But I don't think so.
> Becasue I use the same command I mean the same 2 lines with /mnt/cdrom, and
> it works very nicely
> 
> It works,
> $util->run_command("ls -1 /mnt/cdrom | wc -l");    // it shows 200 in my CD
> rom drive
> $list = scandir("/mnt/cdrom");  // here I get full list of files/folders
> 
> Why its happening?

I'm pretty sure it is because of the permissions on the mounted usb
stick. for example my ubuntu automounts my usb stick with permissions
700 and user/group as me. so it would not be accessible by any other
user, except root. I think that's what happening in your case.

However, I do not know where you can set that up...

greets
Zoltán Németh

> 
> I want the $list to be filled. Also I need directory and file information so
> that I can make another list like
> array(array('Type'=>'DIR','Name'=>'music'),array('Type'=>'DIR','Name'=>'music1'),array('Type'=>'FIL','Name'=>'
> elvis.mp3'),array('Type'=>'FIL','Name'=>'elvis2.mp3'),...);
> 
> 

--- End Message ---
--- Begin Message ---
On Tue, 2008-01-22 at 09:10 +0100, Zoltán Németh wrote:
> 2008. 01. 21, hétfő keltezéssel 20.23-kor shiplu ezt írta:
> > I configured autofs in my fedora so that when I plug any usb stick in
> > /dev/sda1 it automatically mounts in /mnt/auto/usb0
> > 
> > There is two lines where the problem arise.
> > 
> > $util->run_command("ls -1 /mnt/auto/usb0 | wc -l");    // it shows 13 when I
> > plug my usb stick.
> > $list = scandir("/mnt/auto/usb0 ");  // here $list is null
> > 
> > This script is in a php file which is running by apache.
> > the $util object is not actually running the command but it is inserting the
> > command in a queue. There is daemon who has root access processing the
> > queue.
> > It means the command in $util->run_command() is executing with root
> > privilege. this command mounts and get the total amount of file/folder very
> > nicely
> > But when I run the second line I see there is no file. How can I fill the
> > list with those file list.
> > It may look that the problem is regarding permission. But I don't think so.
> > Becasue I use the same command I mean the same 2 lines with /mnt/cdrom, and
> > it works very nicely
> > 
> > It works,
> > $util->run_command("ls -1 /mnt/cdrom | wc -l");    // it shows 200 in my CD
> > rom drive
> > $list = scandir("/mnt/cdrom");  // here I get full list of files/folders
> > 
> > Why its happening?
> 
> I'm pretty sure it is because of the permissions on the mounted usb
> stick. for example my ubuntu automounts my usb stick with permissions
> 700 and user/group as me. so it would not be accessible by any other
> user, except root. I think that's what happening in your case.
> 
> However, I do not know where you can set that up...

Doesn't the root directory of a mounted partition inherit the
ownership/permissions of the directory upon which it is mounted?

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
2008. 01. 22, kedd keltezéssel 03.15-kor Robert Cummings ezt írta:
> On Tue, 2008-01-22 at 09:10 +0100, Zoltán Németh wrote:
> > 2008. 01. 21, hétfő keltezéssel 20.23-kor shiplu ezt írta:
> > > I configured autofs in my fedora so that when I plug any usb stick in
> > > /dev/sda1 it automatically mounts in /mnt/auto/usb0
> > > 
> > > There is two lines where the problem arise.
> > > 
> > > $util->run_command("ls -1 /mnt/auto/usb0 | wc -l");    // it shows 13 
> > > when I
> > > plug my usb stick.
> > > $list = scandir("/mnt/auto/usb0 ");  // here $list is null
> > > 
> > > This script is in a php file which is running by apache.
> > > the $util object is not actually running the command but it is inserting 
> > > the
> > > command in a queue. There is daemon who has root access processing the
> > > queue.
> > > It means the command in $util->run_command() is executing with root
> > > privilege. this command mounts and get the total amount of file/folder 
> > > very
> > > nicely
> > > But when I run the second line I see there is no file. How can I fill the
> > > list with those file list.
> > > It may look that the problem is regarding permission. But I don't think 
> > > so.
> > > Becasue I use the same command I mean the same 2 lines with /mnt/cdrom, 
> > > and
> > > it works very nicely
> > > 
> > > It works,
> > > $util->run_command("ls -1 /mnt/cdrom | wc -l");    // it shows 200 in my 
> > > CD
> > > rom drive
> > > $list = scandir("/mnt/cdrom");  // here I get full list of files/folders
> > > 
> > > Why its happening?
> > 
> > I'm pretty sure it is because of the permissions on the mounted usb
> > stick. for example my ubuntu automounts my usb stick with permissions
> > 700 and user/group as me. so it would not be accessible by any other
> > user, except root. I think that's what happening in your case.
> > 
> > However, I do not know where you can set that up...
> 
> Doesn't the root directory of a mounted partition inherit the
> ownership/permissions of the directory upon which it is mounted?

not if it is mounted with some umask and permissions and stuff specified
for mount, I think.
for example in the above case, my /media dir has permissions 755
owner/group root/root, but when automount mounts my usb stick
in /media/KINGSTON it becomes completely different

greets
Zoltán Németh

> 
> Cheers,
> Rob.

--- End Message ---
--- Begin Message ---
On Tue, 2008-01-22 at 09:20 +0100, Zoltán Németh wrote:
> 2008. 01. 22, kedd keltezéssel 03.15-kor Robert Cummings ezt írta:
> > On Tue, 2008-01-22 at 09:10 +0100, Zoltán Németh wrote:
> > > 2008. 01. 21, hétfő keltezéssel 20.23-kor shiplu ezt írta:
> > > > I configured autofs in my fedora so that when I plug any usb stick in
> > > > /dev/sda1 it automatically mounts in /mnt/auto/usb0
> > > > 
> > > > There is two lines where the problem arise.
> > > > 
> > > > $util->run_command("ls -1 /mnt/auto/usb0 | wc -l");    // it shows 13 
> > > > when I
> > > > plug my usb stick.
> > > > $list = scandir("/mnt/auto/usb0 ");  // here $list is null
> > > > 
> > > > This script is in a php file which is running by apache.
> > > > the $util object is not actually running the command but it is 
> > > > inserting the
> > > > command in a queue. There is daemon who has root access processing the
> > > > queue.
> > > > It means the command in $util->run_command() is executing with root
> > > > privilege. this command mounts and get the total amount of file/folder 
> > > > very
> > > > nicely
> > > > But when I run the second line I see there is no file. How can I fill 
> > > > the
> > > > list with those file list.
> > > > It may look that the problem is regarding permission. But I don't think 
> > > > so.
> > > > Becasue I use the same command I mean the same 2 lines with /mnt/cdrom, 
> > > > and
> > > > it works very nicely
> > > > 
> > > > It works,
> > > > $util->run_command("ls -1 /mnt/cdrom | wc -l");    // it shows 200 in 
> > > > my CD
> > > > rom drive
> > > > $list = scandir("/mnt/cdrom");  // here I get full list of files/folders
> > > > 
> > > > Why its happening?
> > > 
> > > I'm pretty sure it is because of the permissions on the mounted usb
> > > stick. for example my ubuntu automounts my usb stick with permissions
> > > 700 and user/group as me. so it would not be accessible by any other
> > > user, except root. I think that's what happening in your case.
> > > 
> > > However, I do not know where you can set that up...
> > 
> > Doesn't the root directory of a mounted partition inherit the
> > ownership/permissions of the directory upon which it is mounted?
> 
> not if it is mounted with some umask and permissions and stuff specified
> for mount, I think.
> for example in the above case, my /media dir has permissions 755
> owner/group root/root, but when automount mounts my usb stick
> in /media/KINGSTON it becomes completely different

The ownership/permissions of /media are not important it's the actual
mountpoint that is important. In this case "KINGSTON" but that is
probably being dynamically created. In which case to control the
ownership/perms it may be necessary to configure the mount manually
versus relying on automount. I'd be interested to see what happens if he
creates /mnt/auto/usb0 with appropriate ownership/perms before plugging
in the device and letting automount mount it.

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
Chris wrote:
Tom Ray [Lists] wrote:
Chris wrote:
Tom Ray [Lists] wrote:
Hey-

I'm trying to install PHP5 with mysql support and I keep running into the same problem over and over again. I run the configuration with this: --with-mysql=/usr/local/mysql and without fail I get this every time:

ext/mysql/php_mysql.o: In function `zif_mysql_create_db':
/home/tech/upgrades/php-5.2.5/ext/mysql/php_mysql.c:1227: undefined reference to `mysql_create_db'
ext/mysql/php_mysql.o: In function `zif_mysql_drop_db':
/home/tech/upgrades/php-5.2.5/ext/mysql/php_mysql.c:1266: undefined reference to `mysql_drop_db'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1

What am I doing wrong here? I'm running mysql 5.0.45 located at /usr/local/mysql which would my my lib directory at /usr/local/mysql/lib I have updated my ld.so.conf file to point to that and I'm still running into issues here.

Did you get any errors when configure ran? I'm not sure if it will stop configure working when it can't find a library you want to compile in or if it just ignores the error and keeps going.

No errors during the ./configure part only when I run "make"

What happens if you configure --with-mysqli not --with-mysql ?

Just wondering if it makes any diff.. it shouldn't really I don't think.

Yeah it doesn't still have issues with it. I need to upgrade to PHP5 since some of the new OpenSRS stuff needs it but this is being a damn pain,.
--- End Message ---
--- Begin Message ---
On Mon, 2008-01-21 at 18:01 -0500, Tom Ray [Lists] wrote:
> Hey-
> 
> I'm trying to install PHP5 with mysql support and I keep running into 
> the same problem over and over again. I run the configuration with this: 
> --with-mysql=/usr/local/mysql and without fail I get this every time:
> 
> ext/mysql/php_mysql.o: In function `zif_mysql_create_db':
> /home/tech/upgrades/php-5.2.5/ext/mysql/php_mysql.c:1227: undefined 
> reference to `mysql_create_db'
> ext/mysql/php_mysql.o: In function `zif_mysql_drop_db':
> /home/tech/upgrades/php-5.2.5/ext/mysql/php_mysql.c:1266: undefined 
> reference to `mysql_drop_db'
> collect2: ld returned 1 exit status
> make: *** [sapi/cgi/php-cgi] Error 1
> 
> What am I doing wrong here? I'm running mysql 5.0.45 located at 
> /usr/local/mysql which would my my lib directory at /usr/local/mysql/lib 
> I have updated my ld.so.conf file to point to that and I'm still running 
> into issues here.
> 
> Any thoughts or pointers on what I am doing wrong here? I've never had 
> an issue before but I never had to compile PHP with mysql support since 
> it was always part of the install.

What's your ld.so.conf pointing to for MySQL? It should be pointing to:

    /usr/local/mysql/lib/mysql

And not:

    /usr/local/mysql/lib

Presuming that /usr/local/mysql/ contains the following directories as
expected:

    bin/  include/  info/  lib/  libexec/  man/  mysql-test/
    share/  sql-bench/

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
Why isnt this cleaning my form $_POST's

class forms {

        var $UserInputClean;
        
        // Forms to variables
        function forms() {
                if (count($_POST) > 0) {
                        foreach($_POST as $curPostKey => $curPostVal) {
                                $curPostKey = forms::CleanInput($curPostVal);
                        }
                }
                // Debug
                print_r($_POST);
        }

        // Clean XSS
        function CleanInput($UserInput) {
$allowedtags = "<strong><em><a><ul><li><pre><hr><blockquote><img><span>"; $notallowedattribs = array("@javascript:|onclick|ondblclick| onmousedown|onmouseup" ."|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown| [EMAIL PROTECTED]");
                $changexssto = '';
$UserInput = preg_replace($notallowedattribs, $changexssto, $UserInput);
                $UserInput = strip_tags($text, $allowedtags);
                $UserInput = nl2br($UserInput);
                return $this->UserInputClean;
        }
}

--- End Message ---
--- Begin Message ---
On Mon, 2008-01-21 at 23:15 -0500, nihilism machine wrote:
> Why isnt this cleaning my form $_POST's
> 
> class forms {
> 
>       var $UserInputClean;
>       
>       // Forms to variables
>       function forms() {
>               if (count($_POST) > 0) {
>                       foreach($_POST as $curPostKey => $curPostVal) {
>                               $curPostKey = forms::CleanInput($curPostVal);

That should probably be something along the lines:

    $_POST[$curPostKey] = forms::CleanInput( $curPostVal );

>                       }
>               }
>               // Debug
>               print_r($_POST);
>       }
> 
>       // Clean XSS
>       function CleanInput($UserInput) {
>               $allowedtags =  
> "<strong><em><a><ul><li><pre><hr><blockquote><img><span>";
>               $notallowedattribs = array("@javascript:|onclick|ondblclick| 
> onmousedown|onmouseup"
>               ."|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown| 
> [EMAIL PROTECTED]");
>               $changexssto = '';
>               $UserInput = preg_replace($notallowedattribs, $changexssto,  
> $UserInput);
>               $UserInput = strip_tags($text, $allowedtags);
>               $UserInput = nl2br($UserInput);
>               return $this->UserInputClean;

WTF? BAD MONKEY!!! This function is called statically and so $this is
NOT available. You probably meant to do the following though:

return $UserInput;

>       }
> }

Other comments for you...

Don't use hard tabs, use spaces (preferrably 4). Switch to vertically
aligned braces it makes it easier for me to read your code ;)

if( $foo )
{
}

Cheers,
Rob
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message --- now my debug shows that with the following code, all of the $_POST['whatever'] values are blank.


class forms {

        var $UserInput;
        
        // Forms to variables
        function forms() {
                if (count($_POST) > 0) {
                        foreach($_POST as $curPostKey => $curPostVal) {
                                $_POST[$curPostKey] = 
forms::CleanInput($curPostVal);
                        }
                }
                // Debug
                print_r($_POST);
        }

        // Clean XSS
        function CleanInput($UserInput) {
$allowedtags = "<strong><em><a><ul><li><pre><hr><blockquote><img><span>"; $notallowedattribs = array("@javascript:|onclick|ondblclick| onmousedown|onmouseup" ."|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown| [EMAIL PROTECTED]");
                $changexssto = '';
$UserInput = preg_replace($notallowedattribs, $changexssto, $UserInput);
                $UserInput = strip_tags($text, $allowedtags);
                $UserInput = nl2br($UserInput);
                return $UserInput;
        }
}

--- End Message ---
--- Begin Message ---
On Mon, 2008-01-21 at 23:39 -0500, nihilism machine wrote:
> now my debug shows that with the following code, all of the  
> $_POST['whatever'] values are blank.
> 
> 
> class forms {
> 
>       var $UserInput;
>       
>       // Forms to variables
>       function forms() {
>               if (count($_POST) > 0) {
>                       foreach($_POST as $curPostKey => $curPostVal) {
>                               $_POST[$curPostKey] = 
> forms::CleanInput($curPostVal);
>                       }
>               }
>               // Debug
>               print_r($_POST);
>       }
> 
>       // Clean XSS
>       function CleanInput($UserInput) {
>               $allowedtags =  
> "<strong><em><a><ul><li><pre><hr><blockquote><img><span>";
>               $notallowedattribs = array("@javascript:|onclick|ondblclick| 
> onmousedown|onmouseup"
>               ."|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown| 
> [EMAIL PROTECTED]");
>               $changexssto = '';
>               $UserInput = preg_replace($notallowedattribs, $changexssto,  
> $UserInput);
>               $UserInput = strip_tags($text, $allowedtags);

I think $text should be $UserInput :)

>               $UserInput = nl2br($UserInput);
>               return $UserInput;
>       }
> }

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
What is a good tool to coordinate a team of programmers efficiently?

To give each one a different part of the project is a start, but it needs to
get combined at some points to be a working project.

Not to debug code you have written was a hint, to see actually bugs as a bug
and not as a feature.

Some hinted let programmer be on different places, others say put them
together on a big table, ...

Where can I find more information about that subject?

bye

R

--- End Message ---
--- Begin Message --- It depends. If the project built up of slightly different modules, putting the coders on a big, white table seems to be a good idea. But if the modules are completely different, you should separate them, so each of them can be focused on their own subject. In this case, you have to have some people to make the whole project as one, seeing other programmers' works to combine.

There are many tool you can use to manage the project. (I personally like open tools, like OpenProj which compatible with Microsoft Project, and if you want to have version controlling, I can suggest Microsoft Visual SourceSafe, or JEDI VCS). Each of them can handle a variety of subjects. OpenProj can organize jobs, and resources. Microsoft VSS and JEDI VCS are version controlling systems, which can handle the code itself, you can check-out modules, make changes, then check-in, so others can use your module as well. (and if you screwed something, you can change back to a previous version).

I hope you can use these advices. And I think, your question is not definitely PHP question ... :)

SanTa

----- Original Message ----- From: "Ronald Wiplinger" <[EMAIL PROTECTED]>
To: "php-general" <[EMAIL PROTECTED]>
Sent: Tuesday, January 22, 2008 8:40 AM
Subject: [PHP] Tool for programmer team


What is a good tool to coordinate a team of programmers efficiently?

To give each one a different part of the project is a start, but it needs to
get combined at some points to be a working project.

Not to debug code you have written was a hint, to see actually bugs as a bug
and not as a feature.

Some hinted let programmer be on different places, others say put them
together on a big table, ...

Where can I find more information about that subject?

bye

R


--- End Message ---
--- Begin Message ---
On Tue, 2008-01-22 at 08:52 +0100, Sándor Tamás (HostWare Kft.) wrote:
> It depends. If the project built up of slightly different modules, putting 
> the coders on a big, white table seems to be a good idea. But if the modules 
> are completely different, you should separate them, so each of them can be 
> focused on their own subject. In this case, you have to have some people to 
> make the whole project as one, seeing other programmers' works to combine.
> 
> There are many tool you can use to manage the project. (I personally like 
> open tools, like OpenProj which compatible with Microsoft Project, and if 
> you want to have version controlling, I can suggest Microsoft Visual 
> SourceSafe, or JEDI VCS). Each of them can handle a variety of subjects. 
> OpenProj can organize jobs, and resources. Microsoft VSS and JEDI VCS are 
> version controlling systems, which can handle the code itself, you can 
> check-out modules, make changes, then check-in, so others can use your 
> module as well. (and if you screwed something, you can change back to a 
> previous version).

With all the open source version control systems available (CVS,
Subversion, GIT) I wouldn't touch something closed source and more
importantly tainted by the Microsoft moniker :/ (yes I am fortunate
enough to work within Linux all day long).

As for other tools... a big stick >:)

Seriously though, a good method of communication can be useful, it can
also be annoying if someone has ADHD and keeps fire off messages or if
you constantly find yourself in boring bogged down in bureaucracy
meetings :( For project management I'd use something simple like the
Mantis bug tracking system (it's quite useful for managing tasks despite
being a bug tracking system).

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
Ronald Wiplinger wrote:
> What is a good tool to coordinate a team of programmers efficiently?
> 
> To give each one a different part of the project is a start, but it needs to
> get combined at some points to be a working project.
> 
> Not to debug code you have written was a hint, to see actually bugs as a bug
> and not as a feature.
> 
> Some hinted let programmer be on different places, others say put them
> together on a big table, ...
> 
> Where can I find more information about that subject?

For me:

 * SVN (http://www.subversion.org/) for code/VCS

 * Trac (http://trac.edgewall.org/) for Wiki, VCS viewing, tickets/tasks
+ more)

 * Timing And Estimation Plugin
(http://www.trac-hacks.org/wiki/TimingAndEstimationPlugin) for tracking
time spent on given tasks)

 * Work Log Plugin (http://www.trac-hacks.org/wiki/WorkLogPlugin) for
showing at a glance which tickets the devs are currently (or have
recently been) working on (and to add time automatically).

 * Clients Plugin (http://www.trac-hacks.org/wiki/ClientsPlugin) To
track tasks specific to different clients and send edited highlights of
development automatically.

 * Doxygen Plugin (http://www.trac-hacks.org/wiki/DoxygenPlugin) to show
doxygen generated code docs inside Trac.


Disclaimer: I wrote Work log and Clients. They integrate nicely with
Timing And Estimation which I also hacked on. There are lots of holes
and lots of improvements that could (and will eventually) be made.

Feel free to ask more questions, but the above works for me and my team.

Col

--- End Message ---
--- Begin Message ---
On Jan 21, 2008 3:22 AM, nihilism machine <[EMAIL PROTECTED]> wrote:
> I'm trying to create a function that will first take an array of
> $_POSTs and give them key/value pairs like variables. For instance, if
> i had $_POST['whatever'] = "whatever", that would be made into
> $whatever = "whatever", then i can clean for sql injection and xss.
> any ideas here?

Consider usage of a 3rd party lib like Inspekt:
http://code.google.com/p/inspekt/

-- Manuel

--- End Message ---
--- Begin Message ---
> On Jan 21, 2008 3:22 AM, nihilism machine <[EMAIL PROTECTED]> wrote:
> > I'm trying to create a function that will first take an array of
> > $_POSTs and give them key/value pairs like variables. For instance, if
> > i had $_POST['whatever'] = "whatever", that would be made into
> > $whatever = "whatever", then i can clean for sql injection and xss.
> > any ideas here?

i use a combination of php.net/filter, bounds checking for
integers/etc, appropriate text escaping (i.e. like
mysql_escape_string) prior to any db queries with text data,
intval($var) on anything needing to be converted to integer (although
filter will do that for you too)

also - suhosin might help with some things. i run both the patch and the module.

> Consider usage of a 3rd party lib like Inspekt:
> http://code.google.com/p/inspekt/

i'll look at this too, thanks

--- End Message ---
--- Begin Message ---
hi guys,

I want to build php with firebirdDB (ibase) extension (for the purposes
of this exercise it could just as well be mysql) without installing firebird
on the local machine (i'm moving the DB to a seperate server) ...

I can't figure out how to do this apart from installing firebird, building php
then removing firebird again - although I'm not sure this would even work.

Does anyone know the correct way to go about such a thing?

TIA

--- End Message ---
--- Begin Message ---
Quoting Jochem Maas <[EMAIL PROTECTED]>:

hi guys,

I want to build php with firebirdDB (ibase) extension (for the purposes
of this exercise it could just as well be mysql) without installing firebird
on the local machine (i'm moving the DB to a seperate server) ...

I can't figure out how to do this apart from installing firebird, building php
then removing firebird again - although I'm not sure this would even work.

Does anyone know the correct way to go about such a thing?

TIA

Think it's the same as compiling with the mysql extension. You need the client libraries to build PHP. So just install the firebird client and compile against that. That should work .. right?
--- End Message ---
--- Begin Message --- On Mon, 21 Jan 2008 17:25:06 +0100, "David Giragosian" <[EMAIL PROTECTED]> wrote:

I think this HTML is IE specific,

<form autocomplete="off">
...
</form>

Not sure if you can do it on a tag by tag basis or not, nor what versions it
might be limited by.

David

Thanks a lot!
This solution works fine in the three browser I have tested: IE, Firefox and Opera. (In my Opera there is no AutoComplete feature and the parameter is ignored.)

Tor

--- End Message ---
--- Begin Message ---
[snip]
Is PHP a correct approach to solve this tedious problem?? Can I access a
servers and get the results of a ls command for instance??
[/snip]

You can use some of PHP's functions, such as readdir() (roughly an ls in
PHP land http://www.php.net/readdir ). You can also use exec (to
execute) and other commands like fopen (to read, write, append). PHP
will actually work pretty well.

--- End Message ---

Reply via email to