php-general Digest 11 Feb 2008 15:25:09 -0000 Issue 5287

Topics (messages 269064 through 269084):

Trouble with PHP server script
        269064 by: Robert Cox
        269065 by: Nirmalya Lahiri
        269066 by: Jim Lucas
        269072 by: Nathan Rixham

Re: urgent !!! Please Help preg_replace !!!!!!!!!!!!!!!!!!!!!
        269067 by: Michael Moyle
        269068 by: Robert Cummings

Re: Ajax, an HTML form being saved in mySQL
        269069 by: Manuel Lemos
        269070 by: Manuel Lemos

Re: Hex Strings Appended to Pathnames
        269071 by: Nathan Rixham

\n problems when creating an email
        269073 by: Angelo Zanetti
        269074 by: Stut
        269075 by: Angelo Zanetti
        269076 by: Nathan Rixham
        269083 by: Wolf

Exception handling with file()
        269077 by: John Papas
        269080 by: Zoltán Németh
        269081 by: Al

Re: generate xls file on fly
        269078 by: Hiep Nguyen

Re: PEAR website and MSIE 6
        269079 by: Zoltán Németh

Security scanner
        269082 by: Emil Edeholt
        269084 by: admin.buskirkgraphics.com

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 ---
Is it possible to use the "$_SERVER['PHP_AUTH_USER'];" construct in a URL
forwarded site?  I am trying to find the authorised user id so that I can
access an SQL database with it.  Anyone got some ideas?
 
PHP looks like this....
 
 <?php
 //Get User
  $user = $_SERVER['PHP_AUTH_USER'];
  
 // Get User type
  $db = mysql_connect(localhost, ....., .....) or die("Can't connect to
database: ".mysql_error());
        mysql_select_db(................) or die("Can't select database:
".mysql_error());
  
  $query = "SELECT * FROM user WHERE staffid LIKE $user";
  $result = mysql_query($query) or die ('Not a valid User: ' .
mysql_error());
....
?>
 
 

--- End Message ---
--- Begin Message ---
--- Robert Cox <[EMAIL PROTECTED]> wrote:

> Is it possible to use the "$_SERVER['PHP_AUTH_USER'];" construct in
> a URL
> forwarded site?  I am trying to find the authorised user id so that
> I can
> access an SQL database with it.  Anyone got some ideas?
>  
> PHP looks like this....
>  
>  <?php
>  //Get User
>   $user = $_SERVER['PHP_AUTH_USER'];
>   
>  // Get User type
>   $db = mysql_connect(localhost, ....., .....) or die("Can't
> connect to
> database: ".mysql_error());
>         mysql_select_db(................) or die("Can't select
> database:
> ".mysql_error());
>   
>   $query = "SELECT * FROM user WHERE staffid LIKE $user";
>   $result = mysql_query($query) or die ('Not a valid User: ' .
> mysql_error());
> ....
> ?>
>  

Robert,
 I think this link will help you to solve the problem.....
http://bugs.php.net/bug.php?id=29132

---
Nirmalya Lahiri
[+91-9433113536]


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

--- End Message ---
--- Begin Message ---
Robert Cox wrote:
Is it possible to use the "$_SERVER['PHP_AUTH_USER'];" construct in a URL
forwarded site?  I am trying to find the authorised user id so that I can
access an SQL database with it.  Anyone got some ideas?
PHP looks like this.... <?php
 //Get User
  $user = $_SERVER['PHP_AUTH_USER'];
// Get User type
  $db = mysql_connect(localhost, ....., .....) or die("Can't connect to
database: ".mysql_error());
        mysql_select_db(................) or die("Can't select database:
".mysql_error());

You should always run mysql_real_escape_string() on any variables that you use in an SQL statement.

  $query = "SELECT * FROM user WHERE staffid LIKE $user";

You need to make sure that you surround your string with quotes. This is only if the $user is a string, if it is an int/number, the forget the quotes.

$query = "SELECT * FROM user WHERE staffid LIKE '$user'";

The following should always reference your above DB resource $db

Plus, this isn't how you should be checking for a valid user.
The following would only hit the die() statement if there was an error with the SQL statement. Not if it didn't return any results.

mysql_query($query, $db) or die('Not a valid user: '.mysql

  $result = mysql_query($query) or die ('Not a valid User: ' .
mysql_error());
....
?>

Note: You need to make sure that magic_quotes_gpc is not enabled. That will mess with doing things this way.

Note: I am assuming that you will only match one and only one. If that is the case you need to switch the like to an = instead.

        staffid = '{$user}'

don't worry about the curly braces, they are for PHP to identify the variable. They wont show up in your actual SQL statement.


All that being said, try this instead.

<?php

// Get User type
$db = mysql_connect(localhost, ....., .....) or
        die("Can't connect to database: ".mysql_error());
mysql_select_db(................) or
        die("Can't select database: ".mysql_error());

//Get User
$user = mysql_real_escape_string(@$_SERVER['PHP_AUTH_USER'], $db);

$query = "SELECT * FROM user WHERE staffid = '{$user}'";

$result = mysql_query($query, $db) or
        die('Error with query: '.mysql_error());

if ( mysql_num_rows($result) == 0 ) {
        // No results found, assume user does not exist
} else {
        // User exists, do something about it.
}

....

?>

--- End Message ---
--- Begin Message ---
Robert Cox wrote:
Is it possible to use the "$_SERVER['PHP_AUTH_USER'];" construct in a URL
forwarded site?  I am trying to find the authorised user id so that I can
access an SQL database with it.  Anyone got some ideas?
PHP looks like this.... <?php
 //Get User
  $user = $_SERVER['PHP_AUTH_USER'];
// Get User type
  $db = mysql_connect(localhost, ....., .....) or die("Can't connect to
database: ".mysql_error());
        mysql_select_db(................) or die("Can't select database:
".mysql_error());
$query = "SELECT * FROM user WHERE staffid LIKE $user";
  $result = mysql_query($query) or die ('Not a valid User: ' .
mysql_error());
....
?>

Robert,

print_r($_SERVER); will answer all your questions :)

Nathan

--- End Message ---
--- Begin Message ---
Rob,


> $reps = array
> (
>     array
>     (
>         'match'   => '#<a.*</a>#Uims',

Can you explain what the 'U' from #Uims does? Does it have to do with
Unicode? I can't find it anywhere (preg_match doc, man perlre, man
perlop).

Thanks!
Michael

--- End Message ---
--- Begin Message ---
On Mon, 2008-02-11 at 13:42 +0900, Michael Moyle wrote:
> Rob,
> 
> 
> > $reps = array
> > (
> >     array
> >     (
> >         'match'   => '#<a.*</a>#Uims',
> 
> Can you explain what the 'U' from #Uims does? Does it have to do with
> Unicode? I can't find it anywhere (preg_match doc, man perlre, man
> perlop).


It makes the match "Ungreedy". Look at the following example:

    $text = "<a href="">blah</a> ... <a href="">bleh</a>";

If we match with the following:

    preg_match_all( '#<a.*</a>#Uims', $html, $matches )

Then $matches will contain 2 matches...

    1. <a href="">blah</a>
    2. <a href="">bleh</a>

However if we match with the following:

    preg_match_all( '#<a.*</a>#ims', $html, $matches )

Then $matches will only get 1 match...

    1. <a href="">blah</a> ... <a href="">bleh</a>

This is because the default behaviour is greedy, it will match as much
as possible even if a shorter match exists.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
Hello,

on 02/11/2008 12:19 AM Ron Piggott said the following:
> I am trying to bring my programming skills together ... but I have hit a
> road block.
> 
> I am writing my own ledger (accounting) software.
> 
> I am needing help to pass 2 variables generated by Ajax through my form
> to be saved in a mySQL table.
> 
> A sample of what ledger_select_account.js outputs is as follows --- the
> PHP script it accesses queries a table and then echo's this to the
> screen.

This is a bit confusing, but it seems you want a typical linked select
input form. Take a look here and see if this is similar to what you want:

http://www.meta-language.net/forms-examples.html?example=test_linked_select

That was done with this forms generation and validation class. It comes
with plug-in that can link select inputs in order to switch the options
of one when another changes the selected value. It comes with a variant
of that plug-in that can perform an AJAX request and retrive the new
options from a MySQL database.

http://www.phpclasses.org/formsgeneration



-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--- End Message ---
--- Begin Message ---
Hello,

on 02/11/2008 12:19 AM Ron Piggott said the following:
> I am trying to bring my programming skills together ... but I have hit a
> road block.
> 
> I am writing my own ledger (accounting) software.
> 
> I am needing help to pass 2 variables generated by Ajax through my form
> to be saved in a mySQL table.
> 
> A sample of what ledger_select_account.js outputs is as follows --- the
> PHP script it accesses queries a table and then echo's this to the
> screen.

This is a bit confusing, but it seems you want a typical linked select
input form. Take a look here and see if this is similar to what you want:

http://www.meta-language.net/forms-examples.html?example=test_linked_select

That was done with this forms generation and validation class. It comes
with plug-in that can link select inputs in order to switch the options
of one when another changes the selected value. It comes with a variant
of that plug-in that can perform an AJAX request and retrive the new
options from a MySQL database.

http://www.phpclasses.org/formsgeneration



-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--- End Message ---
--- Begin Message ---
Richard Lynch wrote:
I don't know if it's before/after, but PHP can't change the GET
request to something it wasn't...

So THAT was the URL requested.

You might have some kind of funky mod_rewrite rule messing you up...



On Tue, January 29, 2008 5:22 am, Mick wrote:
Richard Lynch wrote:
On Sun, January 27, 2008 7:57 am, Mick wrote:

Operating System: CentOS 4.6
PHP Version: 4.3.9-3.22.9
Zend Optimizer (free) version: 3.2.6

Hello.

I've got somewhat of a strange problem here involving Squirrelmail.
Basically, what is happening is that one of our customers is logged
out
of his Squirrelmail session at random intervals.  This can occur
when
he  goes to read an email or, after composing an email, when he
clicks
on the Send button.

The following log entries correspond with those times that the
customer
is logged out.

[error] [client X.X.X.X] File does not exist:
/var/www/squirrelmail/src/redirect.php3a5def33
[error] [client X.X.X.X] File does not exist:
/var/www/squirrelmail/src/redirect.php29e09f87
[error] [client X.X.X.X] File does not exist:
/var/www/squirrelmail/src/move_messages.phpf9f96dfb
[error] [client X.X.X.X] File does not exist:
/var/www/squirrelmail/src/redirect.phpdc6cc80a

So what would be the cause of appending those hex strings to those
pathnames?

You'll probably have to ask the squirrelMail guy...

Unless you can reproduce it with other applications, it's not in PHP
itself, probably.

PS
I'm a squirrelMail user, and I get logged out a lot too. :-(


Hi Richard.

Thank you for your reply.

You'll probably have to ask the squirrelMail guy...
I've already asked him, and he referred me to the PHP/Zend guys i.e.
to
here. ;)

Actually, what the access logs show for these events is this for
example:

"GET /squirrelmail/src/compose.php9e99b821 HTTP/1.1" 404
"GET /squirrelmail/src/redirect.php3a5def33 HTTP/1.1" 404

Do you know if logging for the access log is performed before or after
the URL is passed through to php?

Cheers,
Mick.





Hi Richard.

So THAT was the URL requested.
As I had suspected.
You might have some kind of funky mod_rewrite rule messing you up...
There is no rewrite rule.  It's an extremely strange problem.


Cheers,
Mick.

I see this is a strange problem, the puzzle for me though is why is the user getting logged out? surely a 404 can't end a session..
--- End Message ---
--- Begin Message ---
Hi guys, 

I am making email text based on some fields the user fills in and then email
the admin the details.

I am having a problem where sometimes the \n (new line) works and sometimes
it just does nothing. Im not sure the cause but I cant seem to figure it
out.

Here is a segment of code: 

                                                ."\nHow far would they be
prepared to travel to "
                                                ."\n event venue?
\n\t\t\t\t\t".  $travel         
                                                 
                                                ."\nDo you have a specific
location "
                                                ." \n of preference?
\n\t\t\t\t\t".  $locationPref           
                                                ."\n City or country
preference:\t".  $cityPref              


Here is the output: 

How far would they be prepared to travel to  event venue? 
                                        Z Logic e Business Cape
Do you have a specific location
 of preference? 
                                        Z Logic e Business Cape
 City or country preference:    Z Logic e Business Cape
 

As you can see the first line doesn't go to the next row before "event"

But it works fine for the location \n preference

Is there any reason it works for the 1 piece of code and not the next? Do
spaces affect anything?


Kind regards, 
Angelo Zanetti 
Application Developer   
________________________________


Telephone: +27 (021) 552 9799 
Mobile:       +27 (0) 72 441 3355 
Fax:            +27 (0) 86 681 5885

Web: http://www.elemental.co.za 
E-Mail: [EMAIL PROTECTED] 

--- End Message ---
--- Begin Message ---
Angelo Zanetti wrote:
I am making email text based on some fields the user fills in and then email
the admin the details.

I am having a problem where sometimes the \n (new line) works and sometimes
it just does nothing. Im not sure the cause but I cant seem to figure it
out.

Looks like you're using Outlook. It has an annoying feature where it "helpfully" removes "extra" line breaks. This would appear to be what's happening here.

When it does this it usually displays a notice somewhere to say it's done this and offers a way to undo it.

-Stut

--- End Message ---
--- Begin Message ---
Looks like you're using Outlook. It has an annoying feature where it 
"helpfully" removes "extra" line breaks. This would appear to be what's 
happening here.

When it does this it usually displays a notice somewhere to say it's 
done this and offers a way to undo it.


----------------
Thanks, dam I been wasting my time trying to figure out the solution...

However I see that with the tabbed (\t) formatting its very inconsistent in
many email and web clients... Do you have a solution to ensure that the
output is consistent always?

Please send some links or any advice, TIA

--- End Message ---
--- Begin Message ---
exactly as stut said, try using double /n's or convert the email to html.

whilst testing always view email source to verify what your creating.

Nath

Stut wrote:
Angelo Zanetti wrote:
I am making email text based on some fields the user fills in and then email
the admin the details.

I am having a problem where sometimes the \n (new line) works and sometimes
it just does nothing. Im not sure the cause but I cant seem to figure it
out.

Looks like you're using Outlook. It has an annoying feature where it "helpfully" removes "extra" line breaks. This would appear to be what's happening here.

When it does this it usually displays a notice somewhere to say it's done this and offers a way to undo it.

-Stut

--- End Message ---
--- Begin Message ---
I've found it to be a lost cause to add pure white space in tabs during emails. 
 Most clients are "helpful" in making things "user friendly" by removing 
leading white space.  What i found did work on most machines at the time was 
either just a newline or a "Q: <question>\nA: <answer>\n" which isn't as 
formatted, but does the readabilty job.

Wolf

-----Original Message-----
From: Angelo Zanetti <[EMAIL PROTECTED]>
Sent: Monday, February 11, 2008 7:23 AM
To: 'Stut' <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] \n problems when creating an email


Looks like you're using Outlook. It has an annoying feature where it 
"helpfully" removes "extra" line breaks. This would appear to be what's 
happening here.

When it does this it usually displays a notice somewhere to say it's 
done this and offers a way to undo it.


----------------
Thanks, dam I been wasting my time trying to figure out the solution...

However I see that with the tabbed (\t) formatting its very inconsistent in
many email and web clients... Do you have a solution to ensure that the
output is consistent always?

Please send some links or any advice, TIA

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

--- End Message ---
--- Begin Message ---
I need to open a remote file with file() and I would like to put it
inside a try-catch but as far as I can tell file() does not raise an
exception if it fails. The following code:

        try {
           $data = file('http://myserver.com/myfile.txt');
           $date = substr($data, 0);
        } catch (Exception $e) {
           $data = "it failed";
        }
        
        echo $data;

echoes a warning:

        Warning: file('http://myserver.com/myfile.txt') [function.file]:
failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in.....

--- End Message ---
--- Begin Message ---
2008. 02. 11, hétfő keltezéssel 14.34-kor John Papas ezt írta:
> I need to open a remote file with file() and I would like to put it
> inside a try-catch but as far as I can tell file() does not raise an
> exception if it fails. The following code:
> 
>       try {
>          $data = file('http://myserver.com/myfile.txt');
        $data = @file('http://myserver.com/myfile.txt');
        if ($data === FALSE) throw new Exception('whatever');


hope that helps
Zoltán Németh

>          $date = substr($data, 0);
>       } catch (Exception $e) {
>          $data = "it failed";
>       }
>       
>       echo $data;
> 
> echoes a warning:
> 
>       Warning: file('http://myserver.com/myfile.txt') [function.file]:
> failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
> in.....
> 

--- End Message ---
--- Begin Message ---
I've just started using Try/catch and found the doc is a bit weak.

Best I can tell most, and likely all, our regular system functions do not "throw " and an exception for the Exception handler.

Thus, you can put your code in a personal function, with a throw, or use the old fashion way, e.g.,

if(!$data = file('http://myserver.com/myfile.txt'){
die(foo);}//if it's critical, or whatever if it's not

I've started using try/catch a lot and found it very useful.

John Papas wrote:
I need to open a remote file with file() and I would like to put it
inside a try-catch but as far as I can tell file() does not raise an
exception if it fails. The following code:

        try {
           $data = file('http://myserver.com/myfile.txt');
           $date = substr($data, 0);
        } catch (Exception $e) {
           $data = "it failed";
        }
        
        echo $data;

echoes a warning:

        Warning: file('http://myserver.com/myfile.txt') [function.file]:
failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in.....

--- End Message ---
--- Begin Message ---
On Fri, 8 Feb 2008, Jason Pruim wrote:


On Feb 8, 2008, at 10:14 AM, Hiep Nguyen wrote:


On Fri, 8 Feb 2008, Per Jessen wrote:

Hiep Nguyen wrote:

is there anyway to generate this into xls file w/o using fopen &
fwrite to the server?  my goal is to have a link after the table and
user can click on that link and a save window pop up to allow user to
save to local disk.

Yes - have a link like this:

<a href="<yourscript.php?parameters>">Get XLS file</a>

in yourscript.php, you evaluate the parameters given and build the XSL
file as output:

header("Content-Type: application/excel");
header("Content-Disposition: attachment; filename=\"filename\"");

print
.
.
.
.
.


done.

i already got this method, but the problem that i have is the parameters is mysql statement and it's very long. i don't think a good idea to pass this in the url. also, the page that i'm working on is a search page, therefore the mysql statement is very complicate and long. that's why i don't want to pass via url.

is there way to do within this page???


I have actually done what you are looking for... Here is how I do it:

On the search page, write the search phrase into a session variable so you can access it from another page and then run this code:

<?PHP

$sortOrder = $_SESSION['order'];
$search = $_SESSION['search'];
$select = "SELECT * FROM ".$table." WHERE blah blah blah blah blah"";

why not store the whole SQL statement in a session variable, so it can work with any table??? i never use session before, but i'll look into it to see if it works for me.

any suggestion for a tutorial on session in php??? thanks.


$export = mysql_query($select);
$fields = mysql_num_fields($export);

for ($i = 0; $i < $fields; $i++) {
        $header .= mysql_field_name($export, $i) . "\t";
}

while($row = mysql_fetch_row($export)) {
        $line = '';
        foreach($row as $value) {
                if ((!isset($value)) or ($value == "")) {
                        $value = "\t";
                }
                else
                {
                        $value = str_replace('"', '""', $value);
                        $value = '"' . $value . '"' . "\t";
                }                       $line .= $value;
        }
        $data .= trim($line). "\n";
}
$data = str_replace("\r", "", $data);

if ($data =="") {
        $data ="\n(0) Records Found!\n";
}
header("Content-type: application/x-msdownload");
header("Content-Disposition: attachment; filename=Export.xls");
header("Pragma: no-cache");
header("Expires: 0");


print "$header\n$data";


?>

What that does is it writes the current search pattern into an excel file called Export.xls and downloads it to your harddrive. I am in the process of re-writing it to work as a function, but have had mixed results so far. I'm learning functions right now :)

If you know functions, and want to take a stab at re-writing it, I can provide you with the code I have so far :)


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]



--- End Message ---
--- Begin Message ---
2008. 02. 1, péntek keltezéssel 04.40-kor Robert Cummings ezt írta:
> On Fri, 2008-02-01 at 10:11 +0100, Zoltán Németh wrote:
> > 2008. 01. 31, csütörtök keltezéssel 12.47-kor Robert Cummings ezt írta:
> > > On Thu, 2008-01-31 at 18:18 +0100, Jochem Maas wrote:
> > > > Eric Butera schreef:
> > > > > On Jan 31, 2008 12:02 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> > > > >> Robert Cummings schreef:
> > > > >>> On Thu, 2008-01-31 at 17:14 +0100, Jochem Maas wrote:
> > > > >>>> let's not forget that nobody outside of IT actually uses Opera
> > > > >>> Please back up that st-ass-tistic please. Methinks you reached 
> > > > >>> around
> > > > >>> and pulled it out of your lightless nether regions.
> > > > >> given that you can prove anything with statistics, I'd say that's 
> > > > >> where
> > > > >> all stats come from - well not all from my ass but always someone's 
> > > > >> ;-)
> > > > >>
> > > > >> let me guess you use Opera ... and you work in IT right? :-P
> > > > >>
> > > > >>> Cheers,
> > > > >>> Rob.
> > > > >>
> > > > > 
> > > > > My wife uses Opera and she doesn't know much about computers.  I
> > > > > installed IE7, FF, Opera, & Safari for Windows and she picked Opera on
> > > > > her own.  I can't really get into it though.
> > > > 
> > > > I guess the shitty interface is appealing to people with more taste 
> > > > than us :-)
> > > > Steve Job's would be annoyed though - which is funny in and of itself 
> > > > :-P
> > > 
> > > I dunno, Opera comes with a built in flag for disabling that wretching
> > > thing called tabbed browsing. Firefox requires you to install a plugin.
> > 
> > ahh the Great Browser Holy War :)
> > I must join in...
> > 
> > I never wanted to turn tabbed browsing off (in fact I find it useful and
> > convenient), so it is not a real concern
> > 
> > > Also, I find the configurability of Opera's interface to be superior to
> > > what I last used for Firefox.
> > 
> > okay, then how do you stop Opera caching? I tried to turn it off
> > everywhere but it keeps on creating local files while I browse.
> > (ubuntu linux/opera 9.25)
> 
> I never noticed that before... with a little ingenuity though I found the
> following to be successful:
> 
> cd ~/.opera
> sudo chown root:root cache4
> sudo chmod 000 cache4
> 
> ;)

that indeed does work, at least in the last few days opera couldn't work
it around ;)
however it is not a proof of the superior configurability...

aside from that, does anyone know some plugin for Opera which does the
same as AdBlock Plus does for FF?

greets
Zoltán Németh

> 
> Cheers,
> Rob.

--- End Message ---
--- Begin Message ---
Hi!

I've been trying Nessus to search for sql injections and other security issues. I'm quite sure Nessus is missing a lot of possible sql injections (and maybe other stuff too). Are there any other tools that I can install on my server that searches a bit more carefully? What do you use and why?

Any other good security tools for LAMP that one should know of?

Kind Regards Emil

--- End Message ---
--- Begin Message ---
Injections only work on sloppy code.

If you are using globals you are asking for injections. Turn your globals off, 
use $_POST[var_name] and filter all user input.

Just my opinion, I am sure some will disagree.

Richard L. Buskirk
## Show me a man with no fear, I will point out the date on his tomb stone. ##


>Hi!
>
>I've been trying Nessus to search for sql injections and other >security 
>issues. I'm quite sure Nessus is missing a lot of possible sql 
>injections (and maybe other stuff too). Are there any other tools that >I 
>can install on my server that searches a bit more carefully? What do >you 
>use and why?
>
>Any other good security tools for LAMP that one should know of?
>
>Kind Regards Emil

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

--- End Message ---

Reply via email to