[PHP] Custom pipe script failure code

2007-10-02 Thread Alan Fullmer

Hello,

I have a quick question regarding the pipe function in Postfix and the 
use of PHP as a mail sorter/parser.   I've looked around and see many 
people have used PHP as a quick and dirty solution for putting mail data 
into a database.


I am taking all incoming mail, parsing out headers and putting the mail 
into a MySQL database.   The problem I have is, if the script cannot 
connect to the database, the script fails.  What I want is to have this 
message return back into the normal mail queue with a temporary failure 
or something so it can retry at a later time without disappearing into 
never never land.  The reason for this, is if there is a connection 
failure, or the database stops for some reason, I don't want these 
messages to be lost due to a script failure.


Here is my pipe command:
spamfilter unix - n n - - pipe
 flags=DRq user=spamfilter argv=/scripts/spamfilter.sh -f ${sender} -- 
${recipient}


Here is my spamfilter.sh command:
#!/bin/bash
/usr/bin/spamc -f -u "$4"  |  /scripts/parsemessage.php "$4"
exit $?


So is there a way to exit(); with some sort of code to put that message 
back into the queue?  I have read that I need to exit(75); but that does 
not work.  If anyone could help, that would be more than fantastic.


Thanks,
Alan

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



RE: [PHP] Session Problem

2007-02-15 Thread Alan Fullmer
Does your system have permission to write to the temp directory?

Put on error_reporting(E_ALL) and see if it throws an error. 

-Original Message-
From: LoneWolf [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 15, 2007 2:35 PM
To: php-general@lists.php.net
Subject: [PHP] Session Problem

I am having a problem where it appears that the session is not being saved
properly.

While on a page, I can start a session and set variables to it. however,
when I go to the next page.. the session variables appear to have been
cleared out.

first page:
session_start();

$_SESSION["user_level"] = "test";



second page:

session_start();

echo $_SESSION["user_level"] ;



We just installed php on the 2003 server.  Is there maybe a problem with the
php.ini file that I need to fix?

--
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] html forms in php

2005-09-15 Thread Alan Fullmer
This might help you.






function confirmDelete()
{
var agree=confirm("WARNING!  This will blah blah delete etc yada yada
\n\rPress Cancel to go back, or OK to Continue.");
if (agree)
return true ;
else
return false ;
}





-Original Message-
From: Murray @ PlanetThoughtful [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 15, 2005 12:32 PM
To: 'Philippe Reynolds'; php-general@lists.php.net
Subject: RE: [PHP] html forms in php

> Good day all,
> 
> I have a problem for you all..
> I have a form that has has the ability to delete a lot of information from
> my MySQL database.
> 
> I would like to create a bit of security, in case the user hits the button
> by accident.
> I would like to create an additionnal window that would appear that would
> ask:
> "Are you sure?" and then a "yes" and "no" buttons to confirm the deletion
> or
> to cancel the command.
> 
> Any thougts??

Hi Phil,

You can achieve this in several ways. One would be to use a JavaScript
onClick event on the 'dangerous' button to pop up a dialog with your 'Are
you sure?' prompt and the yes/no buttons. If the user clicks on the 'no'
button, you use JavaScript to cancel the page submission. If they click on
the 'yes' button, the page submits. This approach would mean assuming that
your users have JavaScript enabled.

A second approach would be to have an intermediary page between the page
with the button, and the page that performs the actual delete. The
intermediary page would be little more than another form with the yes/no
buttons.

Much warmth,

Murray
---
"Lost in thought..."
http://www.planetthoughtful.org

-- 
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] error message while mysqling on php

2005-09-13 Thread Alan Fullmer
I see two things that could be it.

#1 your $result is not $result = mysql_query("queryline");

Or #2  your syntax on your query line is bad.

You can try doing something like this:

$query = "SELECT * FROM table etc blah";
$result = mysql_query($query) or die(mysql_error());
$num = mysql_num_rows($result);


Sometimes the error message can be more explicit if you tell it to print it.
If you get no error on that query statement, then your query is fine.

-Original Message-
From: Murray @ PlanetThoughtful [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 13, 2005 3:05 PM
To: 'Michal Krezolek'; php-general@lists.php.net
Subject: RE: [PHP] error message while mysqling on php

> I have received an error: Warning: mysql_num_rows(): supplied argument is
> not a valid MySQL result resource in /home/www/mksystem.net when trying to
> execute $num = mysql_num_rows($result);
> 
> Please go to http://mksystem.net/phpinfo.php and tell me whether it is due
> to the version of php I have on server and an easy workaround would be
> appreciated.

Check the syntax of your SQL statement, it's very possible you have an error
in it somewhere. If you have PHPMyAdmin, or some other interface to MySQL
such as MySQL Query Browser, etc, try executing the SQL statement in one of
them directly, to see if they return a valid resultset.

Much warmth,

Murray
---
"Lost in thought..."
http://www.planetthoughtful.org

-- 
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] Open source portal systems???

2005-03-07 Thread Alan Fullmer



I must concur.   PHP nuke has never even been the slightest resource hog
on any of my machines.   



 <http://www.xnote.com/>    
Alan Fullmer
Owner / Administrator   
[EMAIL PROTECTED]   





-Original Message-
From: Warren Vail [mailto:[EMAIL PROTECTED]
Sent: Friday, February 25, 2005 3:26 PM
To: Kostyantyn Shakhov; php-general@lists.php.net
Subject: RE: [PHP] Open source portal systems???

Where did you hear that PHP Nuke required a powerful server?  I personally
implemented PHP Nuke on a Windoz box (one strike there), that ran on a 166
mmx box (a big second strike), and benchmarked it handling 90 concurrent
users, with no noticeable delays.  If I were you, I'd dig deeper into what
you heard and you may find that someone had another agenda in mind when
they passed along that info.  It's unfortunate, but there are lots of
people in the IT field that distort results to justify an already
conceived opinion.

go figure,
Warren Vail

> -Original Message-
> From: Kostyantyn Shakhov [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 25, 2005 9:34 AM
> To: php-general@lists.php.net
> Subject: [PHP] Open source portal systems???
>
>
> I've got an order for the media portal. Thus, I'm looking for an open
> source portal systems. First that comes to my mind is PHP-Nuke, but I
> heared that it requires a powerful server and i'll have just a
> middle-level one. So, could someone knows another PHP-based open
> source portal systems? Thank you in advance.
>
> --
> Best regards,
>  Kostyantyn  mailto:[EMAIL PROTECTED]
>
>
> --
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Small HTTP Server and PHP

2003-12-29 Thread Alan Fullmer
Http?  Apache? or what server software?

Alan Fullmer Owner / Administrator [EMAIL PROTECTED] Xnote Communications
www.xnote.com
- Original Message - 
From: "Ryan A" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 29, 2003 12:15 PM
Subject: [PHP] Small HTTP Server and PHP


> Hi,
> I have downloaded and am fooling around with small http server...while
> reading the documentation I see that you can intergrate it with PHP/PERL
etc
> but the details are a little "high funda" for me, just too scarce or not
> written properly (the authors first language is not english - but he wrote
a
> great piece of software)
>
> My question is: Anybody here using that software? and if yes, have you
been
> able to "plug" php and mySql into it?
> again, if yes...how?
>
> Thanks,
> -Ryan
>
> -- 
> 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] question about security

2003-11-21 Thread Alan Fullmer



Is php capable of recognizing things such as in a text box, someone were to put  and display say, variables?

do i have to htmlspecialchars every entry?

does this make any sense?

thanks in advance.