php-general Digest 1 Sep 2002 09:21:25 -0000 Issue 1559

Topics (messages 114789 through 114817):

Re: Last URL visited
        114789 by: Marcel Besancon

Re: Dumb Question
        114790 by: Michael Sims
        114805 by: Gerard Samuel

UPDATE Query
        114791 by: Sascha Braun
        114794 by: CHAILLAN Nicolas
        114803 by: Mark Charette

Download site down?
        114792 by: Rodolfo Gonzalez
        114793 by: Sperry Russ
        114807 by: Andrew Brampton

Re: newest entry in db
        114795 by: CHAILLAN Nicolas
        114815 by: Justin French

Re: Script Execution via URL
        114796 by: CHAILLAN Nicolas
        114797 by: CHAILLAN Nicolas
        114814 by: Justin French

Re: alter switch variable inside case?
        114798 by: CHAILLAN Nicolas
        114809 by: Joe Janitor

Re: posting form values doesn't work
        114799 by: CHAILLAN Nicolas

problem with links
        114800 by: Brad Lahr

database suggestions...
        114801 by: Matt Zur

whoops... here's the address...
        114802 by: Matt Zur

Re: Submit form from javascript code
        114804 by: Todd Pasley

Re: [PHP-LANG] About file premission
        114806 by: Bryan

image manipulation
        114808 by: tux

mail()  again...
        114810 by: Liam MacKenzie
        114811 by: Manuel Lemos

Re: few things...
        114812 by: Hosting-Canada

Re: SESSION ARRAY
        114813 by: Todd Pasley

turn off a warning with $GET_['var'];
        114816 by: Thoenen, Peter  Mr.  EPS
        114817 by: CHAILLAN Nicolas

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 ---
Hallo,

I don't know if I understood you correctly. But one way to get the url of
the last visited page is using

    $foobar = getenv('HTTP_REFERER');

This write the url of the last visited page to the variable $foobar.

Hope this helps

Best regards

Marcel


--- End Message ---
--- Begin Message ---
On Sat, 31 Aug 2002 14:04:11 -0400, you wrote:

>And I feel foolish asking...
>What is meant by 'procedural code' ???

It's the opposite of "declarative code".  Here's a page that briefly
explains the difference:

<http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_1.html>

and

<http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_2.html>

There may be other contexts that the term "procedural" could be used
in, and if so it may have other meanings that I am not aware of....
--- End Message ---
--- Begin Message ---
Here is my stab at it. One person described it as the opposite of OO.
So something similar to ->
<?php
do_this() {
   // do this code
}

do_that() {
    // do that code
}

if (isset( $_GET['foo'] )) {
    do_this();
} else {
    do_that();
}

?>

would be considered "procedural code".
If Im wrong I stand corrected....

Michael Sims wrote:

>On Sat, 31 Aug 2002 14:04:11 -0400, you wrote:
>
>  
>
>>And I feel foolish asking...
>>What is meant by 'procedural code' ???
>>    
>>
>
>It's the opposite of "declarative code".  Here's a page that briefly
>explains the difference:
>
><http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_1.html>
>
>and
>
><http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_2.html>
>
>There may be other contexts that the term "procedural" could be used
>in, and if so it may have other meanings that I am not aware of....
>
>
>  
>

-- 
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/


--- End Message ---
--- Begin Message ---
I want to know if its possible to update two databases with one query?

Please look at this example:

UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf', news_db.text = 
'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv', newsreferenz_db.kat_id = '3' 
WHERE news_db.id = '6' AND newsreferenz_db.news_id = '6'

it doesn't work.
--- End Message ---
--- Begin Message ---
Can you please post the exact error?

--
Merci de nous avoir choisi. - Thanks you for your choice.
Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.GroupAKT.com - Hébergement Group.
www.WorldAKT.com - Hébergement de sites Internet
"Sascha Braun" <[EMAIL PROTECTED]> a écrit dans le message de news:
000c01c25142$b4d1b990$[EMAIL PROTECTED]
I want to know if its possible to update two databases with one query?

Please look at this example:

UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf',
news_db.text = 'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv',
newsreferenz_db.kat_id = '3' WHERE news_db.id = '6' AND
newsreferenz_db.news_id = '6'

it doesn't work.



--- End Message ---
--- Begin Message ---
No, only one db at a time may be updated. The "where" clauses can contain
multiple db.

-----Original Message-----
From: Sascha Braun [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 31, 2002 7:04 PM
To: PHP Mailingliste
Subject: [PHP] UPDATE Query


I want to know if its possible to update two databases with one query?

Please look at this example:

UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf',
news_db.text = 'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv',
newsreferenz_db.kat_id = '3' WHERE news_db.id = '6' AND
newsreferenz_db.news_id = '6'

it doesn't work.

--- End Message ---
--- Begin Message ---
To the php.net webmaster, 

there seems to be a problem with the us2.php.net site: I reach it with 
ping, but going to 

http://us2.php.net/do_download.php?download_file=php-4.2.2-Win32.zip 

causes an eternal "Sending request" (and telneting to port 80 of that host 
doesn't open).

Regards.



--- End Message ---
--- Begin Message ---
Rodolfo Gonzalez wrote:
> To the php.net webmaster, 
> 
> there seems to be a problem with the us2.php.net site: I reach it with 
> ping, but going to 
> 
> http://us2.php.net/do_download.php?download_file=php-4.2.2-Win32.zip 
> 
> causes an eternal "Sending request" (and telneting to port 80 of that host 
> doesn't open).
> 
> Regards.
> 
> 
> 

I am new to PHP and found that I cannot download from any of the US 
Mirrors or any other countries I have tried.  What could be wrong?

Thanks,
Sperry Russ

--- End Message ---
--- Begin Message ---
It seems that php.net does load balancing of its downloads and every time
you open the downloads page it displays downloads from different
mirrors... so keep refreshing http://www.php.net/downloads.php until you
find a mirror which works for you.

Usually all the mirrors work first time but I did find the other day that
I wasn't able to download the PHP Source from one of the mirrors, but a
quick refresh of the download page supplied me with a working mirror :)

Andrew
----- Original Message -----
From: "Rodolfo Gonzalez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 01, 2002 12:17 AM
Subject: [PHP] Download site down?


> To the php.net webmaster,
>
> there seems to be a problem with the us2.php.net site: I reach it with
> ping, but going to
>
> http://us2.php.net/do_download.php?download_file=php-4.2.2-Win32.zip
>
> causes an eternal "Sending request" (and telneting to port 80 of that
host
> doesn't open).
>
> Regards.
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hi,
You should do a select into your db, order them by date DESC then you get
with mysql_fetch_row the first row ie $row[O].

--
Merci de nous avoir choisi. - Thanks you for your choice.
Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.GroupAKT.com - Hébergement Group.
www.WorldAKT.com - Hébergement de sites Internet
"Victor" <[EMAIL PROTECTED]> a écrit dans le message de news:
000101c2510b$0282eca0$[EMAIL PROTECTED]
> How can I use php to get the newest entry from  mysql database? Ie, if I
> make a timestamp and then I want to retrieve the last timestamp I made
> how do I go about doing it? Any php or mysql documentation?
>
> - Victor > www.argilent.com
>
>
> ______________________________________________________________________
> Post your ad for free now! http://personals.yahoo.ca


--- End Message ---
--- Begin Message ---
SELECT * FROM mytable ORDER BY timestampcolumn DESC LIMIT 1

or

SELECT * FROM mytable ORDER BY id DESC LIMIT 1


HTH

Justin French



on 01/09/02 2:25 AM, Victor ([EMAIL PROTECTED]) wrote:

> How can I use php to get the newest entry from  mysql database? Ie, if I
> make a timestamp and then I want to retrieve the last timestamp I made
> how do I go about doing it? Any php or mysql documentation?
> 
> - Victor > www.argilent.com
> 
> 
> ______________________________________________________________________
> Post your ad for free now! http://personals.yahoo.ca

--- End Message ---
--- Begin Message ---
Yes you can use that syntax.

--
Merci de nous avoir choisi. - Thanks you for your choice.
Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.GroupAKT.com - Hébergement Group.
www.WorldAKT.com - Hébergement de sites Internet
"Sascha Braun" <[EMAIL PROTECTED]> a écrit dans le message de news:
005601c250f7$dcd7ce70$[EMAIL PROTECTED]
Hi everybody,

i wrote a script which will be executed by HREF's. If a command is going to
be executed by a click on a link the page reloads itself and jumps
in the part of the script, which should be executed.

Normaly I wrote some like this for doing this:

echo '<a href="'.$PHP_SELF.'?action=delete&id='.$arrResult['id'].'"
class="text01">';

but now in a very special case i forgot to write $PHP_SELF like this

<a href="?action=delete&id='.$arrResult['id'].'" class="text01">

without knowing that I have forgotten to write this $PHP_SELF thing I
clicked on the Link and i did execute the Script, like i wanted it to.

Is it normal that it works so fine? Can I use this everytime I link on the
same page for script execusion?

Can I send Forms via an PHP Function like the submit() statement in
Javascript?

Have a nice day, and please answer.

Sascha Braun



--- End Message ---
--- Begin Message ---
Note that ./? is better than ?

--
Merci de nous avoir choisi. - Thanks you for your choice.
Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.GroupAKT.com - Hébergement Group.
www.WorldAKT.com - Hébergement de sites Internet
"Sascha Braun" <[EMAIL PROTECTED]> a écrit dans le message de news:
005601c250f7$dcd7ce70$[EMAIL PROTECTED]
Hi everybody,

i wrote a script which will be executed by HREF's. If a command is going to
be executed by a click on a link the page reloads itself and jumps
in the part of the script, which should be executed.

Normaly I wrote some like this for doing this:

echo '<a href="'.$PHP_SELF.'?action=delete&id='.$arrResult['id'].'"
class="text01">';

but now in a very special case i forgot to write $PHP_SELF like this

<a href="?action=delete&id='.$arrResult['id'].'" class="text01">

without knowing that I have forgotten to write this $PHP_SELF thing I
clicked on the Link and i did execute the Script, like i wanted it to.

Is it normal that it works so fine? Can I use this everytime I link on the
same page for script execusion?

Can I send Forms via an PHP Function like the submit() statement in
Javascript?

Have a nice day, and please answer.

Sascha Braun



--- End Message ---
--- Begin Message ---
This would work if the script you wished to call was default.php / index.php
/ etc etc...

what I mean to say is site.com/index.php?var=foo is the same as
site.com/?var=foo, as long as your server works that way.

leaving out PHP_SELF will give different results if the script you wish to
call ISN'T the default for that directory.


PHP forms are just HTML forms.  That is to say that once the code gets to
the browser, it's just HTML code.  So once the code is at the browser, it
works just like any other page, where a user (or a javascript program) has
to submit the form.


justin



on 01/09/02 12:08 AM, Sascha Braun ([EMAIL PROTECTED]) wrote:

> Hi everybody,
> 
> i wrote a script which will be executed by HREF's. If a command is going to be
> executed by a click on a link the page reloads itself and jumps
> in the part of the script, which should be executed.
> 
> Normaly I wrote some like this for doing this:
> 
> echo '<a href="'.$PHP_SELF.'?action=delete&id='.$arrResult['id'].'"
> class="text01">';
> 
> but now in a very special case i forgot to write $PHP_SELF like this
> 
> <a href="?action=delete&id='.$arrResult['id'].'" class="text01">
> 
> without knowing that I have forgotten to write this $PHP_SELF thing I clicked
> on the Link and i did execute the Script, like i wanted it to.
> 
> Is it normal that it works so fine? Can I use this everytime I link on the
> same page for script execusion?
> 
> Can I send Forms via an PHP Function like the submit() statement in
> Javascript?
> 
> Have a nice day, and please answer.
> 
> Sascha Braun
> 

--- End Message ---
--- Begin Message ---
Yes you can.

--
Merci de nous avoir choisi. - Thanks you for your choice.
Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.GroupAKT.com - Hébergement Group.
www.WorldAKT.com - Hébergement de sites Internet
"Joe Janitor" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> I'd like to be able to modify the switch variable inside a case
> statement, like this:
>
> switch ($foo) {
>   case 'step2':
>     do_step2();
>     if ($error) $foo='step1'; //repeat step1
>   break;
>
>   case 'step1':
>     do_step1();
>   break;
>
>   case 'a_third_thing':
>     do_something_else();
>   break;
> }
>
> Can you modify the variable ($foo) inside a case statement and
> have it evaluated for subsequent 'case's like this? If not, I
> will have to revert to a series of if statements, in which this can
> be done:
>
> if ($foo=='step2') {
>   do_step2();
>   if ($error) $foo='step1';
> }
> if ($foo=='step1') {
>   do_step1();
> }
> etc.
>
> Switch-case seems cleaner, and I'd prefer to stick with it.
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com


--- End Message ---
--- Begin Message ---
Could you elaborate? 

In the example I posted, setting
foo=step1 in the first case segment does NOT cause 
execution of the second case segment, as would be the
case if it was actually re-evaluating the match upon
subsequent case statements.

--- CHAILLAN Nicolas <[EMAIL PROTECTED]> wrote:
> Yes you can.
> 
> --
> Merci de nous avoir choisi. - Thanks you for your choice.
> Nicos - CHAILLAN Nicolas
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> www.GroupAKT.com - Hébergement Group.
> www.WorldAKT.com - Hébergement de sites Internet
> "Joe Janitor" <[EMAIL PROTECTED]> a écrit dans le message de news:
> [EMAIL PROTECTED]
> > I'd like to be able to modify the switch variable inside a case
> > statement, like this:
> >
> > switch ($foo) {
> >   case 'step2':
> >     do_step2();
> >     if ($error) $foo='step1'; //repeat step1
> >   break;
> >
> >   case 'step1':
> >     do_step1();
> >   break;
> >
> >   case 'a_third_thing':
> >     do_something_else();
> >   break;
> > }
> >
> > Can you modify the variable ($foo) inside a case statement and
> > have it evaluated for subsequent 'case's like this? If not, I
> > will have to revert to a series of if statements, in which this can
> > be done:
> >
> > if ($foo=='step2') {
> >   do_step2();
> >   if ($error) $foo='step1';
> > }
> > if ($foo=='step1') {
> >   do_step1();
> > }
> > etc.
> >
> > Switch-case seems cleaner, and I'd prefer to stick with it.
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Finance - Get real-time stock quotes
> > http://finance.yahoo.com
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--- End Message ---
--- Begin Message ---
This is not Javascript or HTML's newsgroup. You should read some docs about
PHP/HTML before doing that, you're currently using Javascript for nothing.

--
Merci de nous avoir choisi. - Thanks you for your choice.
Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.GroupAKT.com - Hébergement Group.
www.WorldAKT.com - Hébergement de sites Internet
"ØYstein HåLand" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> This is my form:
>  <FORM NAME="answerform" METHOD=POST>
>   Your name:<BR><INPUT TYPE=TEXT NAME="name" SIZE=20>
>   Group:<BR><INPUT TYPE=TEXT NAME="group" SIZE=8>&nbsp;&nbsp;
>   <INPUT TYPE=BUTTON VALUE=" OK!" onClick="Javascript:validate(this);">
>  </FORM>
>
> and the function validate:
> function validate() {
>   var ok=true;
>  if (document.answerform.name.value=='') {
>   ok=false;
>   alert('Please write Your name')
>   document.answerform.name.focus();
>   document.answerform.name.select();
>  }
>  if (document.answerform.group.value=='') {
>   ok=false;
>   alert('What group?')
>   document.answerform.group.focus();
>   document.answerform.group.select();
>  }
>  if (ok==true) {
>   location.href='groups/collect_answer.php?name=<?php echo $name;
> ?>&group=<?php echo $group; ?>';
>   return true;
>  } else { return false; }
> }
>
> and this doesn't work and I can't see why not
>
>


--- End Message ---
--- Begin Message ---
I compiled php on a linux machine and am experiencing problems whith
links.

going to www.domainname.com/index.php in a browser works fine.
Clicking on links on this page such as
www.domainname.com/?page=team&teamcode=4938412 just sends me back to the
main www.domainname.com page.

Did a forget to compile in a specific feature of php or apache?

Here is the commands I used when compiling php and apache.

cd php-4.2.2
./configure --with-apache=/usr/local/src/apache_1.3.26
make
make install

*** added AddModule modules/php4/libphp4.a  to
apache_1.3.26/src/configuration  ***

cd /usr/local/src/apache_1.3.26
./configure --activate-module=src/modules/php4/libphp4.a
make
make install

Any help is greatly appreciated.  I apoligize iin advance for being such
a newbie.

Brad



--- End Message ---
--- Begin Message ---
I released v1.5 today for my PHP toolbars for HomeSite v5.0.  The 
toolbars are free!

The biggest change was the additiona of a separate toolbar for db's.
So I'm asking for any suggestions to improve that, since I feel that is 
where most of the work should be done. If you have any other 
suggestions, send them along as well.

-Matt


-- 
Matt Zur
[EMAIL PROTECTED]
http://www.zurnet.com

Need a Web Site??? - Visit... www.zurnet.com

1997 - 2002 - 5th Anniversary!!!

--- End Message ---
--- Begin Message ---
http://zurnet.com/dl/hsphptb/

-Matt

Matt Zur wrote:
> I released v1.5 today for my PHP toolbars for HomeSite v5.0.  The 
> toolbars are free!
> 
> The biggest change was the additiona of a separate toolbar for db's.
> So I'm asking for any suggestions to improve that, since I feel that is 
> where most of the work should be done. If you have any other 
> suggestions, send them along as well.
> 
> -Matt
> 
> 


-- 
Matt Zur
[EMAIL PROTECTED]
http://www.zurnet.com

Need a Web Site??? - Visit... www.zurnet.com

1997 - 2002 - 5th Anniversary!!!

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

Instead of
>   retrun false;
im sure you meant
    return false;

The reason its working with confirm and the like is because of their return
code.... which is actually true.
Try changing it to return true, im pretty sure that will fix it.

Cheers,

Todd.

> -----Original Message-----
> From: Madjid Nasiri [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 31 August 2002 9:44 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Submit form from javascript code
>
>
> Hi all
> I need submit a form from javascript code. My code near this code:
>
> <!-- My Code -->
> <form name="myform" action="..." method="POST>
> <input type="hidden" name="id" value="0">
> </form>
> <script language="javascript">
> function submitform(iId)
> {
>   document.myform.elements['id'].value=iId;
>   document.myform.submit();
>   alert("foo"); // This is code is dummy
>   retrun false;
> }
> </script>
> <a href="..." onMouseDown="submitform(1);">Id One</a><br>
> <a href="..." onMouseDown="submitform(2);">Id Two</a><br>
>     ....
> <a href="..." onMouseDown="submitform(1000);">Id 1000</a><br>
> <!-- End My Code -->
>
> If I remove alert() call in submitform function, this code noting
> work, but
> if i used alert() or confirm() function this code working, Why?
> How can i remove alert() function and my code work?
>
> Thanks for Answer
>
> Madjid Nasiri
> [EMAIL PROTECTED]
> http://www.kawacomputer.com
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, September 01, 2002 2:25 AM
Subject: Re: [PHP-LANG] About file premission


> On Sun, 1 Sep 2002, PHP wrote:
>
> > i'm facing a problem that is when i create a new file on mmy server
(UNIX),
> > the error message is premission denied,
> > then i'm trying to change the file mode by using "chmod", but fail....
> >
> > how should i do?
>
> bug your hoster... (and you want the [EMAIL PROTECTED]
> mailinglist).
>
> Derick
>
>


--- End Message ---
--- Begin Message ---

Hey all,

I was just wondering if anyone could recommend any tutorials or books or
functions i should look into, to do the following:

- decrease the size(kilobytes wise not height/width) of an image
- imprint a transparent logo onto every picture displayed

any feedback greatly appreciated.

jo

--- End Message ---
--- Begin Message ---
It seems nearly everyone has a problem with this function, probably because
it relies on third party software.

It doesn't work.  That's my problem!
I'm using Sendmail as my MTA, not running as a Daemon as I have POP3/SMTP
server running on the same
machine (eXtremail)
I'm starting Sendmail like this:
/usr/lib/sendmail -q1h

When I do this:
$this = mail("[EMAIL PROTECTED]", "Subject", "Message goes here");
echo $this;

The scripts hangs, and eventually my browser times out.
Is there any way I can get some error messages?  Or at least get it to tell
me what on earth it's doing?
There's nothing in any of my Apache logs, nothing in eXtremail's logs, but I
get this in my syslog...

Sep  1 15:28:01 nudenurd sendmail[19146]: g815S1fW019146: from=nobody,
size=63, class=0, nrcpts=1,
msgid=<[EMAIL PROTECTED]>,
relay=nobody@localhost


Anyone got any ideas?  Anyone know if there's any docs on this kind of
thing?  I looked, I failed...
Or where I can get some information on where to get an alternate MTA that
WORKS out of the box (or tar.gz)

Thanks heaps!
Liam



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

On 09/01/2002 02:30 AM, Liam Mackenzie wrote:
> It seems nearly everyone has a problem with this function, probably because
> it relies on third party software.

Yes, mail() is probably the most problematic of the frequently used 
functions of PHP. That can be for many reasons like the need for manual 
configuration of PHP, useless/meaningless or non-existing error messages 
produced by mail(), inconsistent documentation of mail() in PHP manual, 
installation problems of the MTA, configuration problems of the user 
networks, anti-spam measures, etc...

The main difficulty is that it takes a lot of expertise to figure out 
which of these problems are affecting you.


> It doesn't work.  That's my problem!
> I'm using Sendmail as my MTA, not running as a Daemon as I have POP3/SMTP
> server running on the same
> machine (eXtremail)
> I'm starting Sendmail like this:
> /usr/lib/sendmail -q1h
> 
> When I do this:
> $this = mail("[EMAIL PROTECTED]", "Subject", "Message goes here");
> echo $this;
> 
> The scripts hangs, and eventually my browser times out.
> Is there any way I can get some error messages?  Or at least get it to tell
> me what on earth it's doing?

Adding -v to the configuration of sendmail in php.ini may provide you a 
clue. Anyway, my guess is that your machine may not have a reverse DNS 
address. What is its IP?


> There's nothing in any of my Apache logs, nothing in eXtremail's logs, but I
> get this in my syslog...
> 
> Sep  1 15:28:01 nudenurd sendmail[19146]: g815S1fW019146: from=nobody,
> size=63, class=0, nrcpts=1,
> msgid=<[EMAIL PROTECTED]>,
> relay=nobody@localhost

It seems you are missing seting th return-path. Use mail() 5th argument.


> Anyone got any ideas?  Anyone know if there's any docs on this kind of
> thing?  I looked, I failed...
> Or where I can get some information on where to get an alternate MTA that
> WORKS out of the box (or tar.gz)

If all else fails, you may want to try this PHP class, with several 
variants that let you send messages by several methods besides mail(), 
like: using sendmail directly, using qmail-inject or even relay on 
specific SMTP server or even the most drastic measure that is to send 
messages directly to the receipient SMTP server.

http://www.phpclasses.org/mimemessage

-- 

Regards,
Manuel Lemos

--- End Message ---
--- Begin Message ---
There is a difference between the two, but speed-wise it
should be irrelevant which one you use.  print() behaves
like a function in that you can do:

  $ret = print "Hello World";

And $ret will be 1

That means that print can be used as part of a more complex
expression where echo cannot.  print is also part of the
precedence table which it needs to be if it is to be used
within a complex expression.  It is just about at the bottom
of the precendence list though.  Only "," AND, OR and XOR
are lower.

echo is marginally faster since it doesn't set a return
value if you really want to get down to the nitty gritty.

If the grammar is:

 echo expression [, expression[, expression] ... ]

Then

 echo ( expression, expression )

is not valid.  ( expression ) reduces to just an expression
so this would be valid:

 echo ("howdy"),("partner");

but you would simply write this as:

 echo "howdy","partner";

if you wanted to use two expression.  Putting the brackets
in there serves no purpose since there is no operator
precendence issue with a single expression like that.

http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40

Regards!
Jocelyn
http://www.hosting-canada.com



Matt Zur wrote:

> First of all...
> I'm a bit confused is there really a difference between echo and print?
>     They seem to do the same thing?
>
> Also... I have trouble searching for these things in the docs:
> A Call Function to emulate a browser and contact a remote host?  For
> example... to load in a piece of text from another web site?
>
> Hidden fuction.  For example lets say I have a form with 10 variables.
> Is there a function where I can do something like:
>
> hidden($var1,$var2,$var3)  etc etc so it will write this:
> <input type="hidden" name="var1name" value="var1value">
> <input type="hidden" name="var2name" value="var2value">
> <input type="hidden" name="var2name" value="var2value">
>
> Thanks for the help!
>
> PHP Toolbar for Homesite v5.0 - http://zurnet.com/dl/hsphptb/
> Version 1.5 Coming Soon!!!
>
> --
> Matt Zur
> [EMAIL PROTECTED]
> http://www.zurnet.com
>
> Need a Web Site??? - Visit... www.zurnet.com
>
> 1997 - 2002 - 5th Anniversary!!!

--- End Message ---
--- Begin Message ---
Ooops, thats right. I should check over before i send i guess.

Sorry,

Todd

> $_SESSION is a predefined variable, session_start()
> session_register('BILLARRAY') should work though :)
>
> Keith Vance
> Vance Consulting LLC
> www.vanceconsulting.net
> (206) 355-2399
>
> Try my open source PHP authentication system, Rampart by visiting
http://rampart.sourceforge.net/. Commercial support is available at,
http://www.vanceconsulting.net/support/.
>
> On Fri, 30 Aug 2002, Todd Pasley wrote:
>
> > > What is the proper syntax for storing an array in a session?
> > >
> > > is it $_SESSION["BILLARRAY"]=$ARRAY?
> >
> > Yep,  providing youre using session_start() and
session_register("_SESSION")
> > you can assign any type of data, just like a regular hash.
> >
> > Todd.
> >
> > ----- Original Message -----
> > From: "Randy Johnson" <[EMAIL PROTECTED]>
> > To: "phplist" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Friday, August 30, 2002 9:08 AM
> > Subject: [PHP] SESSION ARRAY
> >
> >
> > > What is the proper syntax for storing an array in a session?
> > >
> > > is it $_SESSION["BILLARRAY"]=$ARRAY?
> > >
> > >
> > > Randy
> > >
> > >
> > >
> > > --
> > > 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
> >
> >
>

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

trying to figure a way to turn off the following warning.  .... @ doesn't
seem to work neither does switch (isset($_GET['status'])){

Notice: Undefined index: status in E:\php\tt\index.php on line 6

switch ($_GET['status']){

scenario is this var is set in every instance but the first GET request ...
subsequent request this is set so no warning.

Cheers,

-Peter

##################################
Peter Thoenen - Systems Programmer
Commercial Communications
Camp Bondsteel, Kosovo
##################################

"Stumbled Upon"...heh (Score:5, Funny) /.
by $carab on 23:00 23 August 2002 (#4131637)

"ForensicTec officials said they stumbled upon the military networks about
two months ago, while checking on network security for a private-sector
client."

Someone new to a Dvorak probably tried to type in "lynx
http://www.google.com"; but instead got "nmap -v -p 1-1024 -sS -P0 army.mil
-T paranoid".
--- End Message ---
--- Begin Message ---
What about
switch(@isset($_GET['status'])) ?
or
@switch(isset($_GET['status']))
--
Merci de nous avoir choisi. - Thanks you for your choice.
Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.GroupAKT.com - Hébergement Group.
www.WorldAKT.com - Hébergement de sites Internet
"Peter Mr. Eps Thoenen" <[EMAIL PROTECTED]> a écrit
dans le message de news:
[EMAIL PROTECTED]
> Hello,
>
> trying to figure a way to turn off the following warning.  .... @ doesn't
> seem to work neither does switch (isset($_GET['status'])){
>
> Notice: Undefined index: status in E:\php\tt\index.php on line 6
>
> switch ($_GET['status']){
>
> scenario is this var is set in every instance but the first GET request
...
> subsequent request this is set so no warning.
>
> Cheers,
>
> -Peter
>
> ##################################
> Peter Thoenen - Systems Programmer
> Commercial Communications
> Camp Bondsteel, Kosovo
> ##################################
>
> "Stumbled Upon"...heh (Score:5, Funny) /.
> by $carab on 23:00 23 August 2002 (#4131637)
>
> "ForensicTec officials said they stumbled upon the military networks about
> two months ago, while checking on network security for a private-sector
> client."
>
> Someone new to a Dvorak probably tried to type in "lynx
> http://www.google.com"; but instead got "nmap -v -p 1-1024 -sS -P0 army.mil
> -T paranoid".


--- End Message ---

Reply via email to