[PHP] Find and Replace

2001-07-30 Thread Shrout, Ryan

This isn't exactly PHP I need help with, but it relates to what I learned
about security.  Up until now, I have been using *.inc extensions for my
include files.  Well, I didn't realize until recently that anyone can view
these files.  So, I want to rename them to *.inc.php.  BUT, in almost all of
my PHP pages, there are links to : include ('mydir/myfile.inc');

Can someone tell me how to do a recursive find and replace to look for
/myfile.inc and replace it with myfile.inc.php?  I am running Red Hat 7.1

Thanks!

Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] HTTP_REFERRER Problem

2001-07-26 Thread Shrout, Ryan

Here is the code I am trying to use:

setcookie('admin2amdmb',mysql_result($user_result, 0,
Username),time());
$tdate = date ('Y-m-d h:i:s', time());

$success_query = INSERT

INTO session (SessionID, IP, Login, Sucess, Date)

VALUES ('','$REMOTE_ADDR','$login','1','$tdate');

$success_result = mysql_query($success_query);

echo $PHP_SELF; echo $HTTP_REFERRER;

Header (Location: '$HTTP_REFERRER');

This code is inside login2.php, which has a form and a flag.  The form has
an action to: $PHP_SELF which works fine.  But, for some reason
$HTTP_REFERRER is always blank!  I want to use that to reload that page so
the cookie takes effect. What is going on? 

Ryan Shrout

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Example high-profile PHP sites

2001-07-26 Thread Shrout, Ryan

Not to pimp my own site, but Amdmb.com ( http://www.amdmb.com/ ) uses MySQL
and PHP for everything.  We get about 5 million pages a month.

Ryan Shrout

-Original Message-
From: Unni [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 12:59 PM
To: Chad Day
Cc: Maurice Rickard; [EMAIL PROTECTED]
Subject: Re: [PHP] Example high-profile PHP sites


If every one is giving their website about mine
http://www.malayalamovies.com


Chad Day wrote:

 How about my site..  http://www.bangable.com
 
 Might not be the kind of site you want to put on your list, but we do get
a
 lot of traffic.. 4 million page views a month.   All PHP/mysql.
 
 Chad
 
 -Original Message-
 From: Maurice Rickard [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, July 26, 2001 12:36 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Example high-profile PHP sites
 
 
 For a number of reasons, I need to offer a client a list of big,
 impressive-sounding, high-profile sites using PHP.  I went looking
 for the list on PHP.net, and the closest I could find is
 http://pt2.php.net/sites.php  which, as you'll see, is suffering from
 a fatal error.
 
 I did find a list at http://php.datalogica.com/sites.php which, while
 helpful,  seems a bit dated.  Does anyone have some favorite examples
 that aren't on this list?
 
 I've been preparing other arguments as well, but the all the cool
 people are doing it examples will help.
 
 Thanks!
 --
 Maurice Rickard
 http://mauricerickard.com/
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Security Question

2001-07-25 Thread Shrout, Ryan

In a lot of PHP code that I have seen, there are lines such as this:

mysql_connect('localhost', 'mysql_login()', 'mysql_password()');

that is used to hide the login and password from someone should they
somehow view the code instead of the output of the PHP file.  My question
is, how do I set up those functions mysql_login and mysql_password?  Are
they just standard functions defined in a header someplace?  Or is this even
the best, most secure way of handling it?

Ryan Shrout

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Date/Time Query Help

2001-07-24 Thread Shrout, Ryan

Okay, I need help with this one:

I have a table with a column in the MySQL DATETIME format.  (2001-07-24
13:02:02)

I need a MySQL query that will select all the entries in it made within the
last hour.

I tried this, but it is not working correctly, what am I doing wrong?

SELECT * 
FROM session

WHERE (session.Date  DATE_SUB(NOW(), INTERVAL 1 HOUR))

Thanks!!!

Ryan Shrout

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Date/Time Query Help

2001-07-24 Thread Shrout, Ryan

Think of it this way:

WHERE session.Date  DATE_SUB(NOW(), INTERVAL 1 HOUR) is equal to:

WHERE 2001-07-24 15:03:24  SUBTRACTION( 2001-07-24 15:30:21, 00:01:00) =
WHERE 2001-07-24 15:03:24  2001-07-24 14:30:21 

That seems right now, but it doesn't work

Ryan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 2:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Date/Time Query Help


On Tue, 24 Jul 2001 15:09:14 -0400, [EMAIL PROTECTED]
(Ryan Shrout) wrote:
I need a MySQL query that will select all the entries in it made within the
last hour.

I tried this, but it is not working correctly, what am I doing wrong?

SELECT * 
FROM session

WHERE (session.Date  DATE_SUB(NOW(), INTERVAL 1 HOUR))

Now() will return the current time.  by definition, at the time it's
running, there will be zero or almost zero (depends on how 
fast the query runs... someone might insert a row between
when the now() gets executed and when the query ends)
rows.  you are basically asking for rows that were inserted
from now up to one hour in the future.  those rows aren't
there yet.

try testing for less than.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Date/Time Query Help

2001-07-24 Thread Shrout, Ryan

Heh.  :)  

So, does anyone know what I am doing wrong?

Ryan Shrout

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 3:34 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Date/Time Query Help


On Tue, 24 Jul 2001 15:23:10 -0400, [EMAIL PROTECTED]
(Ryan Shrout) wrote:

Think of it this way:

WHERE session.Date  DATE_SUB(NOW(), INTERVAL 1 HOUR) is equal to:

WHERE 2001-07-24 15:03:24  SUBTRACTION( 2001-07-24 15:30:21, 00:01:00) =
WHERE 2001-07-24 15:03:24  2001-07-24 14:30:21 

That seems right now, but it doesn't work

DATE_SUB.  heh.  that'll teach me not to read the whole
post and THINK about it :).


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Date/Time Query Help

2001-07-24 Thread Shrout, Ryan

When I run: SELECT * FROM session WHERE session.Date  DATE_SUB(NOW(),
INTERVAL 1 HOUR)
I get an empty set, but there are entries that satisfy it.

When I run: select Date from session order by Date desc limit 10 
I get:
+-+
| Date|
+-+
| 2001-07-24 04:00:45 |
| 2001-07-24 04:00:40 |
| 2001-07-24 04:00:20 |
| 2001-07-24 03:22:24 |
| 2001-07-24 03:02:25 |
| 2001-07-24 02:53:55 |
| 2001-07-24 02:27:09 |
| 2001-07-24 02:24:54 |
+-+
8 rows in set (0.00 sec)



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 3:43 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Date/Time Query Help


On Tue, 24 Jul 2001 15:23:10 -0400, [EMAIL PROTECTED]
(Ryan Shrout) wrote:

WHERE session.Date  DATE_SUB(NOW(), INTERVAL 1 HOUR) is equal to:

WHERE 2001-07-24 15:03:24  SUBTRACTION( 2001-07-24 15:30:21, 00:01:00) =
WHERE 2001-07-24 15:03:24  2001-07-24 14:30:21 

i just tested on my box (dialup connection logs, start is the datetime
the subscriber logged on) and when i do:

select login,start,end,secs from log where
  secs.startdate_sub(now(),interval 1 hour)

i get (it's after 3AM here... so the set is small):

+--+-+-+--+
| login| start   | end | secs |
+--+-+-+--+
| costales | 2001-07-25 02:52:35 | 2001-07-25 03:27:54 | 2119 |
| utopia   | 2001-07-25 03:19:38 | 2001-07-25 03:19:41 |3 |
+--+-+-+--+

works for me.  maybe it's a data problem? what version of 
mysql are you using?  what happens when you do:

select Date from session order by date desc limit 10;
?

tiger




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Function call from a hyperlink

2001-07-11 Thread Shrout, Ryan

Why not just pass a variable: a href=file.php?function

and then in the PHP file do:

if ($function) {
function();
}

Ryan Shrout
Amdmb.com

-Original Message-
From: Geer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 1:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Function call from a hyperlink


Hi,

Does someone know how I can call a function in a PHP script using a
hyperlink with
A HREF=.text/A

The function is in the same PHP script as the link.


Many thanks,

Geer



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Bandwidth?

2001-07-05 Thread Shrout, Ryan

I know this really isn't a correct list, but I know most of you have
experience in getting hosting, etc and you have been very helpful in my PHP
troubles, so maybe you can help me here, too!  :)

Anyway, my site is currently colocated at a small ISP, that charges as
follows:

$265 - 2U rackspace + 8 GB traffic
+$8 each GB over 8

I just got my invoice for June, totaled at $947.  That's 77 GB over my
alloted 8 GB.  The site is growing and is very popular, so I am not
questioning the bandwidth number, but I am asking about the bandwidth rate.

Is $8/GB too much?  Last I checked most hosting providers charge by how much
continuous bandwidth I use, for instance 512 kbps, 768 kbps, 1.5 mbps, etc.
What kind of numbers can you all give me for comparison?  I want to see if I
am getting ripped off

Ryan Shrout
http://www.amdmb.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Frames, PDF and links problem

2001-07-05 Thread Shrout, Ryan

Here is the problem I am facing now.  I have a site, with a sort-of shopping
cart but heavily modified for the job it does.  The site uses 2 frames: 1
for the cart and 1 for the content.

The customer has Acrobat PDF files that they want links in to add things to
the 'cart'.  If PDF files had the ability to add the target=cart
attribute, this would be a simple task.  However, I can't find it if it
does.  So, my current solution was to try this:  have the PDF file link to a
temp_add.php file in the same frame, that file then adds to the cart in
other frame, then reverts back to the sender by using the $HTTP_REFERER
variable.  For some reason, the $HTTP_REFERER variable is NULL when it comes
from a PDF file but reports just fine from a regular PHP file or HTML file.

Any ideas?

Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] how can I call a link? ??

2001-07-05 Thread Shrout, Ryan

I don't really no how to word this.  How can I use a single PHP to update
two sides of a framed page?

like a call to: add.php?add=4ffqe45manual=123.33fn=ex1

I want it to update the left frame with a call to:

http://serverview_cart.php?add=4ffqe45

and I want it to update the right frame with a call to:

http://server/pdf/ex1.pdf

The only page updating/refreshing/goto'ing I know of in PHP is the header (
Location: ) command, but that only does a single page and must be in the
header (obviously).  

What can I do?

Ryan Shrout

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mail function fails

2001-07-02 Thread Shrout, Ryan

I am having a problem with the PHP mail() function.  Here is the code:

if (mail ([EMAIL PROTECTED], Quote Request,  $message)) {
echo Email sent!;
} else {
echo Email NOT sent!;
}

Everytime, I receive the Email NOT sent message and the email isn't sent.
However, from the console on the same machine, I can run the mail command:
mail [EMAIL PROTECTED] and send an email just fine.

Any ideas as to what could be wrong?

I am using the latest PHP version and am running Red Hat Linux 7.1

Ryan Shrout

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] mail function fails

2001-07-02 Thread Shrout, Ryan

I tried that in this format:

if ( mail([EMAIL PROTECTED], Quote Request, $message, From:
[EMAIL PROTECTED]\nX-Mailer: PHP/ . phpversion()) ) {
echo Email sent!;
} else {
echo Email NOT sent!;
}

and still get the Email NOT sent and no emails go anywhere.  Is there
another solution?  How about a way to get an error message of some kind?

Ryan

-Original Message-
From: Tim Taubert [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 9:09 AM
To: PHP Mailingliste
Subject: RE: [PHP] mail function fails


hey ryan try something like this

mail([EMAIL PROTECTED], Quote Request, $message, From:
[EMAIL PROTECTED]\nX-Mailer: PHP/ . phpversion());

hope this helps

cya tim

-
   Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/
-

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 3:01 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] mail function fails


I am having a problem with the PHP mail() function.  Here is the code:

if (mail ([EMAIL PROTECTED], Quote Request,  $message)) {
echo Email sent!;
} else {
echo Email NOT sent!;
}

Everytime, I receive the Email NOT sent message and the email isn't sent.
However, from the console on the same machine, I can run the mail command:
mail [EMAIL PROTECTED] and send an email just fine.

Any ideas as to what could be wrong?

I am using the latest PHP version and am running Red Hat Linux 7.1

Ryan Shrout

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] mail function fails

2001-07-02 Thread Shrout, Ryan

Darn, still didn't work.

Anyone else have a suggestion?  Or a way to view an error message of some
kind?

Ryan Shrout

-Original Message-
From: Tim Taubert [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 9:51 AM
To: PHP Mailingliste
Subject: RE: [PHP] mail function fails


mh..

?php
if (mail([EMAIL PROTECTED], Quote Request, test)) {
echo Email sent!;
} else {
echo Email NOT sent!;
}
?

this worked successfully... don't have any other ideas..

bye tim

-
   Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/
- 

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 3:30 PM
To: PHP Mailingliste
Subject: RE: [PHP] mail function fails


I tried that in this format:

if ( mail([EMAIL PROTECTED], Quote Request, $message, From:
[EMAIL PROTECTED]\nX-Mailer: PHP/ . phpversion()) ) {
echo Email sent!;
} else {
echo Email NOT sent!;
}

and still get the Email NOT sent and no emails go anywhere.  Is there
another solution?  How about a way to get an error message of some kind?

Ryan

-Original Message-
From: Tim Taubert [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 9:09 AM
To: PHP Mailingliste
Subject: RE: [PHP] mail function fails


hey ryan try something like this

mail([EMAIL PROTECTED], Quote Request, $message, From:
[EMAIL PROTECTED]\nX-Mailer: PHP/ . phpversion());

hope this helps

cya tim

-
   Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/
-

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 3:01 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] mail function fails


I am having a problem with the PHP mail() function.  Here is the code:

if (mail ([EMAIL PROTECTED], Quote Request,  $message)) {
echo Email sent!;
} else {
echo Email NOT sent!;
}

Everytime, I receive the Email NOT sent message and the email isn't sent.
However, from the console on the same machine, I can run the mail command:
mail [EMAIL PROTECTED] and send an email just fine.

Any ideas as to what could be wrong?

I am using the latest PHP version and am running Red Hat Linux 7.1

Ryan Shrout

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] mail function fails

2001-07-02 Thread Shrout, Ryan

I don't think that is it anymore.  I have a new discovery.  Upon running the
actually PHP script from the console, the code works!  But only when I am
logged in as root.  When logging is as anyone else, the mail() function
fails with a Permission Denied on /usr/sbin/sendmail

So, it would appear that sendmail is not configured to allow others to use
it?  Is there a quick easy way to fix this?

Thanks!

Ryan

-Original Message-
From: Michael Geier, CDM Systems Admin [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 10:57 AM
To: Shrout, Ryan
Subject: RE: [PHP] mail function fails


RPM's tend to hose installations.  May I suggest:
rpm -qa | grep php
rpm -e [insert php rpm name here]
rpm -e [apache rpm]

get the source for apache 1.3.20 (http://www.apache.org)
get the source for php and compile per installation docs on php
website

You will enjoy the results alot more.

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 9:46 AM
To: 'Michael Geier, CDM Systems Admin'
Subject: RE: [PHP] mail function fails


Well, just using Red Hat 7.1 and sendmail with PHP 4.0.5.  Sendmail was
installed default in the RH installation, and then I installed the latest
PHP RPM afterwards.

Oh well.

Ryan

-Original Message-
From: Michael Geier, CDM Systems Admin [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 10:45 AM
To: Shrout, Ryan
Subject: RE: [PHP] mail function fails


Are you trying to use a MTA besides Sendmail?

Some info would be helpful, such as:
OS
MTA (Sendmail Qmail, etc)
PHP version

If you installed PHP without sendmail installed, mail() will not work.  
That doesn't mean that you can't use a different MTA.

When I switched to Qmail on a new server, a had a problem with mail() 
not working.

I reinstalled OS (redhat 7.1) with sendmail, installed PHP (4.05),
installed QMAIL per docs concerning replacing sendmail, changed 
php.ini file to reflect sendmail_path = /var/qmail/bin/qmail-inject.

HTH
---
Michael Geier
CDM Sports, Inc. - Systems Administrator
email: [EMAIL PROTECTED]
phone: 314.991.1511 x 6505
pager: 314.318.9414

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 9:23 AM
To: PHP Mailingliste
Subject: RE: [PHP] mail function fails


Darn, still didn't work.

Anyone else have a suggestion?  Or a way to view an error message of some
kind?

Ryan Shrout

-Original Message-
From: Tim Taubert [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 9:51 AM
To: PHP Mailingliste
Subject: RE: [PHP] mail function fails


mh..

?php
if (mail([EMAIL PROTECTED], Quote Request, test)) {
echo Email sent!;
} else {
echo Email NOT sent!;
}
?

this worked successfully... don't have any other ideas..

bye tim

-
   Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/
- 

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 3:30 PM
To: PHP Mailingliste
Subject: RE: [PHP] mail function fails


I tried that in this format:

if ( mail([EMAIL PROTECTED], Quote Request, $message, From:
[EMAIL PROTECTED]\nX-Mailer: PHP/ . phpversion()) ) {
echo Email sent!;
} else {
echo Email NOT sent!;
}

and still get the Email NOT sent and no emails go anywhere.  Is there
another solution?  How about a way to get an error message of some kind?

Ryan

-Original Message-
From: Tim Taubert [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 9:09 AM
To: PHP Mailingliste
Subject: RE: [PHP] mail function fails


hey ryan try something like this

mail([EMAIL PROTECTED], Quote Request, $message, From:
[EMAIL PROTECTED]\nX-Mailer: PHP/ . phpversion());

hope this helps

cya tim

-
   Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/
-

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 3:01 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] mail function fails


I am having a problem with the PHP mail() function.  Here is the code:

if (mail ([EMAIL PROTECTED], Quote Request,  $message)) {
echo Email sent!;
} else {
echo Email NOT sent!;
}

Everytime, I receive the Email NOT sent message and the email isn't sent.
However, from the console on the same machine, I can run the mail command:
mail [EMAIL PROTECTED] and send an email just fine.

Any ideas as to what could be wrong?

I am using the latest PHP version and am running Red Hat Linux 7.1

Ryan Shrout

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED