Problem with Mail()In my PHP 5.0 at home, I'm using the following code to successfully
write to a database and also send out an email. For some reason, when
I take this code to work, it still writes to the database but doesn't
send mail so we're (me and the I.T. guy) trying to find out whether
it's the difference between PHP 4 or something else with email
security.
Does anyone here have experience with mail() in PHP 4 to know whether
PHP 4 had issues with mail() that were fixed with PHP 5 ???? We've
been chasing this from the mail server side at work when perhaps its
some nuance between versions of PHP.
Appreciate any help...
Chris
/* > $to = stripslashes($to); */
$to = stripslashes($to)."\r\n";
$subject = stripslashes($subject);
$text = stripslashes($text);
/* > mail('$to',$subject, $text); */
mail($to, $subject, $text, "From: admin@localhosthome.com");
cover wrote:
> $to = stripslashes($to)."\r\n";
>
Might or might not be the cause, but you should remove the trailing CRLF
here.
JW
On Mon, 27 Feb 2006 22:33:57 +0100, "Janwillem Borleffs"
<jw@jwscripts.com> wrote:
>cover wrote:
>> $to = stripslashes($to)."\r\n";
>>
>
>Might or might not be the cause, but you should remove the trailing CRLF
>here.
Thanks for the reply. I tried it after reading your post and no
change... Thanks again,
cover wrote:
> In my PHP 5.0 at home, I'm using the following co...
php's mail() function // permission problemsHi all.
I'm trying to get php's mail() function working. When I use it at the
moment, I get:
/var/log/messages:
Jul 14 13:23:27 mail sendmail[22171]: NOQUEUE: Milter (mimedefang): to
error state
/usr/local/apache2/logs/error_log:
Program mode requires special privileges, e.g., root or TrustedUser.
I have checked in the PHP newsgroups, and they assure me it is a problem
with my sendmail setup...
I have installed sendmail (8.12.8) as per included instructions and read
the SECURITY file. The following permissions set:
-r-xr-sr-x 1 root smmsp 611974 Mar 5 21:37 /usr/...
Scrolling problem with php web pageWhy doesn't my left nav bar scroll properly?
For some reason, my left nav bar does not scroll properly on my php page -
index2.php Below is a link to the page with a detailed description of the
problem. The page itself is a demonstration of the problem.
http://clearpointsystems.com/112/index2.php
I'm not sure if the problem is with the style sheet, IE6, my code, or what.
Any help is appreciated. Thanks!
"deko" <nospam@hotmail.com> wrote in message
news:GMgKc.11657$Pn7.9107@newssvr25.news.prodigy.com...
> Why doesn't my left nav bar scroll properly?
>
> For some reason, my left nav bar does not scroll properly on my php page -
> index2.php Below is a link to the page with a detailed description of the
> problem. The page itself is a demonstration of the problem.
>
> http://clearpointsystems.com/112/index2.php
>
> I'm not sure if the problem is with the style sheet, IE6, my code, or
what.
> Any help is appreciated. Thanks!
>
wrong newsgroup.... anyway, the problem appears to be referencing an
external stylesheet. when the css directives are placed within the page it
works fine. still, seems to be limitation with IE6 not rendering page and
scrollong properly when using external style sheet.
"deko" <nospam@hotmail.com> wrote in message
news:GMgKc.11657$Pn7.9107@newssvr25.news.prodigy.com...
> Why doesn't my left nav bar scroll properly?
>
> For some reason, my left na...
php mail functioni have set up a feedback form that emails the results. my web host says
it will not work if the email is coming from nobody. this is their
answer "you are just going to have to learn to tell your scripts to
generate th emails as someone@yourdmain - not just as nobody."
does anyone know how to make this happen?
Quinonez wrote:
> i have set up a feedback form that emails the results. my web host
> says it will not work if the email is coming from nobody. this is
> their answer "you are just going to have to learn to tell your
> scripts to generate th emails as someon...
Problem with PHP mail()The built in mail() function for PHP is supposed to return true/false.
Unfortunately, instead of mine returning a false, it crashes with an
"Internal Server Error" message.
Is this a common problem, and can it be fixed through code?
I called my IPP's tech support. The tech thought it was weird, and put in a
service order - but I'm still curious if it's an error I can handle.
Any thoughts?
..oO(Sanders Kaufman)
>The built in mail() function for PHP is supposed to return true/false.
>Unfortunately, instead of mine returning a false, it crashes with an
>...
php mail problemI think I have it narrowed down. If I do "sendmail -t dave@myhost.com"
it works great. No errors in the log. If I do "mail -s "test"
dave@myhost.com" it also works great. No errors in the log. So I feel
good in saying that sendmail is working properly. According to the
www.php.net website sendmail is what php uses. I also verified this in
the php.ini file.
So that leaves either a misconfiguration in php or bad data being fed to
the mail client. I did a "mail("dave\@myhost.com","test subject", "Test
Body"); " as sugg...
About PHP::: Error/Problem PHP Warning: mysql_fetch_array():Hi Everyone
==============================================================
About PHP::: Error/Problem PHP Warning: mysql_fetch_array():
==============================================================
In the past i use my code/script work fine with
Mandrake 9.1 - 10.1 ( + apache ,mysql )
Now i move to redhat EL4 with the same code/script
I got error can't login to my code.
and found error on /var/log/httpd/error_log like this
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL
result resource in /var/www/html/website_in_server/showdata.php
or
PHP Warning: my...
PHP Training Institute In Delhi, Live Projects on PHP. Short Term PHP Courses, PHP Scripts, PHP Training with Live Projects.Vserve Global offers short term PHP: Hypertext Preprocessor Training
Course, which is a widely used, general-purpose scripting language
that was originally designed for web development, to produce dynamic
web pages. It can be embedded into HTML and generally runs on a web
server, which needs to be configured to process PHP code and create
web page content from it. It can be deployed on most web servers and
on almost every operating system and platform free of charge.PHP is
installed on over 20 million websites and 1 million web servers.
TOPICS:-
>> Core PHP Language
>> HTML, Cascad...
PHP within PHP...I took over the support of a website that is set up something like
this inside one of the pages:
include_once("header.php");
<?php
//to get the content of the page they do this:
$content = mysql_query("select content etc...);
echo $content;
?>
include_once("footer.php");
I am having problems evaluating any php that is used in the mysql
content. Is there a way to get the mysql withing the mysql to run?
Thank you for your time,
Mandragon
On Sep 17, 12:56 pm, Mandrago...@gmail.com wrote:
> I took over the support of a website that is set up something like
> this inside one of the pages:
>
> include_once("header.php");
>
> <?php
> //to get the content of the page they do this:
> $content = mysql_query("select content etc...);
>
> echo $content;
> ?>
>
> include_once("footer.php");
>
> I am having problems evaluating any php that is used in the mysql
> content. Is there a way to get the mysql withing the mysql to run?
>
> Thank you for your time,
>
> Mandragon
Sorry, The question should read:
"Is there a way to get the php withing the echo $htmlcontent to run?"
Of course you are, $content is a resource. The MySQL Query resource.
try this:
$content = mysql_query('bla bla bla');
while ($row = mysql_fetch_assoc($content)) {
$result[] = $row;
}
$content = $result;
Now you can use $content ;).
In answer to your edit...
eval($co...
php outside php (?)Sounds weird, i know.
What i want/wonder is the following:
PHP can do the next:
<?php
if($foo == 'bar')
{
?>
Ow yeah, foo is bar!
<?php
};
?>
But how can i do the following:
<?php
$foo=
?>
this is what foo looks like.
<?php
};
?>
This way i could edit the content of $foo in DW's design-view.
I hope it's clear enough for you all to understand...
Greetings frizzle.
frizzle wrote:
> But how can i do the following:
>
> <?php
>
> $foo=
>
> ?>
> this is what foo looks like.
> <?php
>
> };
>
> ?>
>
> This way i could edit the content of $foo in DW's design-view.
> I hope it's clear enough for you all to understand...
<?php
ob_start();
?>
this is what foo looks like.
<?php
$foo=ob_get_clean();
?>
--
Justin Koivisto - justin@koivi.com
http://koivi.com
Wow, little late on the reply,
but i still wanted to thank you for your help.
This is exactly what i meant, and it works great! :D
Thanks again.
...
php to php objHi All,
Is there any tool to convert the .php files into its object files in
deploying the files to other's server like java classes are deployed?
Thanks in advance
--AR
John7481 <arjohn7481@hotmail.com> wrote or quoted:
> Is there any tool to convert the .php files into its object files in
> deploying the files to other's server like java classes are deployed?
To what end?
Do you want a PHP obfuscator? They tend not to be needed - since the code
remains on the server.
Do you want a PHP squeezer? Again - since PHP remains on the server
that is of reduced importance.
PHP obfuscators and squeezers are out there - but what exactly
are you looking for?
--
__________
|im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.
With total disregard for any kind of safety measures Tim Tyler
<tim@tt1lock.org> leapt forth and uttered:
> John7481 <arjohn7481@hotmail.com> wrote or quoted:
>
>> Is there any tool to convert the .php files into its object
>> files in deploying the files to other's server like java
>> classes are deployed?
>
> To what end?
>
> Do you want a PHP obfuscator? They tend not to be needed -
> since the code remains on the server.
>
> Do you want a PHP squeezer? Again - since PHP remains on the
> server that is of reduced importance.
>
> PHP obfuscators and squeezers are out there - but what exactly
> are you looking for?
I think he'...
PHP mail () function configurationhi every body,
i have a problem which is when i was checking my mail() form it work
fine but the problem is that the form configuration is not set
correctly, in details:
the from var is not working and the from is set to be my host provider
email is the sender, so they told me to configure the php.ini file and
i dont know what is this file and how to configure it.
thanks in advance
shror
www.s7els7.com
www.beachtoursegypt.com
www.mobidp.com
On Feb 22, 2:32 am, "shror" <shahi...@gmail.com> wrote:
> hi every body,
>
> i have a problem which is when i was checking my...
PHP mail() function and maillogHello.
Under linux, when I use the mail() function in php there seems to be no record
of it in any mail log file or system messages. Anyone know where the log of
mails sent might be stored? I know the code to send the mail is running, but
I want to confirm that the server is trying to send out the mails.
Thanks,
Dave.
--
Fermat was right.
David Gillen wrote:
> Hello.
>
> Under linux, when I use the mail() function in php there seems to be no record
> of it in any mail log file or system messages. Anyone know where the log of
> mails sent might be stored? I know the code to ...
PHP mail function is spammer?I don't understand why any message sent with mail functions is
automatically stored in the spam by Gmail.
Sillaba
While the city slept, Sillaba atona (NOSPAM@tin.it) feverishly typed...
> I don't understand why any message sent with mail functions is
> automatically stored in the spam by Gmail.
>
There could be many and varied reasons...
Are you setting a return path? And is that the same as the address the mail
"comes" from?
Does the mail you are sending have a "from" address that corresponds to the
server you are sending from?
Does the mail you are ...
php send mail problemCurrent, I have a function to send UTF-8 encoded HTML Format email to
user.
But my found that the produced email sometime accidently being injected
with the ! sign.......
e.g. <td> sometime become <!td>
here is the code for that function
$sql = "select * from user where userid='$userid'";
$res = send_sql($sql);
//Get Reserve staff info
$row = mysql_fetch_array($res);
$fusername = $row["UserName"];
$femail = $row["Email"];
$message= ERNST."<html><body>";
$message.= "Hi ".htmlspecialchars($fusername).",&l...
when receiving the mail(php mail function), the variable's last value is getting converted to $ or # replacing the digitBelow is my code:
But when I receive the mail, I don't get the last two digits in the $post_url.
I tried displaying the same message on the page and it displayes $post_url properly.
But when I receive the mail, I get the value of $post_url as www.32minutesforum.com/post_clicked.php?id$.
where as I should get www.32minutesforum.com/post_clicked.php?id<some number>.
i.e. www.32minutesforum.com/post_clicked.php?id15
Please help!
File:
<?php
include 'connect.php';
include 'header.php';
echo '<div class="holder_content">';
echo '<section class="group_text">';
echo 'Posted successfully. Check your post <a href="'.$_SESSION['reply_post_id'].'">HERE</a>';
$post_url = $_SESSION['reply_post_id'];
$to= $_SESSION['post_email'];
$subject="You just got a reply for your post in 32minutesforum.com";
$message='
<html>
<head>
<title>32 Minutes Forum</title>
</head>
<body>
<p>You got a reply for your post title: '. $_SESSION['post_title'].'.</p>
<p>Check your post in:<br/>www.32minutesforum.com/'.$post_url.'.</p>
<p>Thanks for using 32minutesforum.com.<br/>
Thank you,<br/>
32minutesforum.com Team.</p>
</body>
</html>';
...
does PHP mail() function depend on sendmail?We're installing a new server at the office and this will be the first
server we set up from which we host our website. We got tired of
dealing with Interland and decided to bring our hosting in-house. The
guy doing most of the work struggled with sendmail for awhile and then
gave up. Now he's installing Postit, or Postfix, or whatever it's
called.
Does the PHP mail function depend on sendmail, or can it use any mta
software?
Hi,
lawrence wrote:
> We're installing a new server at the office and this will be the first
> server we set up from which we host our website. W...
Problem sending e-mail from PHPI'm running FreeBSD 4.8 with Postfix and PHP.
Postfix is working fine.
I'm using a couple of PHP applications which fail to send mail.
I can't find anything in the maillog.
When using SMTP from PHP mail is being sent.
I want the native PHP mail function to work properly.
In my php.ini the sendmail_path points to the correct location for the
postfix sendmail wrapper.
The sendmail wrapper also works fine when used from a command line.
Here are the relevant parameters for mail in php.ini
[mail function]
; For Win32 only.
#SMTP = localhost
; For Win32 only.
#sendmail_from = me@localhost.com
; For Unix only. You may supply arguments as well (default:
"sendmail -t -i").
sendmail_path =/usr/sbin/sendmail -t -i
Any hints on what the problem might be and how to solve it ?
- Ron
In article <bfv7t4$mam$1@news.hccnet.nl>,
"Ron Bakker" <Ron.Bakker@hccnet.nl> wrote:
> I'm using a couple of PHP applications which fail to send mail.
> I can't find anything in the maillog.
> [snip]
> The sendmail wrapper also works fine when used from a command line.
> [snip]
> Any hints on what the problem might be and how to solve it ?
chmod 4755 /usr/libexec/sendmail/sendmail
Any luck?
hth
--
Bulworth : funha@fung.arg | My email address is ROT13 encoded, decode to mail
--------------------------|--------------------------------------------------
<http://www.phplab...
Anyone here follows the mailing list php-general@lists.php.net?I tried posting to it (I am subscribed and have posted to it
successfully before, but this time I got this error message:
>> This message was created automatically by mail delivery software.
>>
>> A message that you sent could not be delivered to one or more of its
>> recipients. This is a permanent error. The following address(es) >>
failed:
>>
>> php-general@lists.php.net
>> SMTP error from remote mail server after end of data:
>> host pair1.php.net [76.75.200.58]: 550 we're manly enough already
WTH...
PhP, Access/SQL, Date comparison problem. (I'm new to PhP)Hi All!
I'm fairly new to PhP and basicly trying to learn right now. Now I have
a problem - I have a fairly large collection of movies which people keep
borrowing from me. And then not returning. So I've put together an
Access database with three tables - my media library, a list of friends
and email addresses, and a borrow table which uses foreign keys from the
other two tables to see who has borrowed what. Borrow Table also has two
other fields - the date borrowed, which is set to equal now() inside of
access, and the date due, which is set to equal now()+14 - they are both
&...
html e-mail seding problem with php...Hi to all,
I have the following html mail sender code written in php. It is
working properly but my problem is, code doesn't send the text
correctly which is in the varible "$mesaj". Code sends some unreadable
text. Any help would be appreciated, Thanx all.
Note: I put the sample image of the problem in:
http://www.wiliw.com/problem2.gif
Cem Louis
<?
$mesaj = "��iİıIşŞğĞ";
$mailtext = "<html><head>";
$mailtext .= "<meta http-equiv=\"Content-Type\" content=\"text...
How to embed youtube player in php mail functioni want to send youtube player through php mail function .
Thanks in advance
ajay escribi�:
> i want to send youtube player through php mail function .
>
> Thanks in advance
I don't think so. But perhaps you want to send a mail message in HTML
format with code to embed a YouTube video, e.g.:
<object width="560" height="340"><param name="movie"
value="http://www.youtube.com/v/0gW25PZZHns&hl=es&fs=1&"></param><param
name="allowFullScreen" value="true"></param><param
name="allowscriptaccess" value="always"></param><embed
src="http://www.youtube.com/v/0gW25PZZHns&hl=es&fs=1&"
type="application/x-shockwave-flash" allowscriptaccess="always"
allowfullscreen="true" width="560" height="340"></embed></object>
I wouldn't even bother. No e-mail client I'm aware of allows to execute
code from a mail message, either JavaScript or browser plugins. Security
is a huge concern nowadays.
As for sending HTML, I'd recommend you use a third-party library like
PHPMailer or SwiftMailer.
--
-- http://alvaro.es - �lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programaci�n web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
ajay wrote:
> i want to send y...
Best PHP Training | PHP Development Training | PHP Training InstituteTops Technologies provides php and mysql certification courses in
ahmedabad, baroda, surat, Rajkot, Udaipur, Gujarat, india.PHP Training
with MySQL is an introductory course in the PHP and MySQL technology.
Mysql and php training course, php for beginners, sql training
courses, PHP Training courses, php courses, mysql training courses,
php mysql course.
For More Details :- http://www.tops-int.com
...
foreach problem moving from php v4.3.0 to php v4.3.10I am trying to figure out why the code listed below works in php v4.3.0 but
not in v4.3.10:
$string = "Param1=Val1;Param2=Val2;Param3=Val3";
$exploded_string = explode(";",$string);
foreach($exploded_string as $param){
list($key, $value) = split("=",$param);
...additional code...
}
It works fine in v4.3.0, but when I run it on a server running v4.3.10 I get
an error because $param is an Array. It should be a regular scaler variable.
On the first iteration $param should equal 'Param1=Val1...