LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-21-2008, 01:33 PM   #1
Torvitas
LQ Newbie
 
Registered: Jan 2008
Posts: 9

Rep: Reputation: 0
Question some php related questions


hi im running a debian 4.0 system on a root-server and i have 2 different but very important questions.
1. how to change apache 2 default directory to change this:
http://78.46.33.43/apache2-default/wbblite/portal.php
to this
http://78.46.33.43/FoH/wbblite/portal.php

2. how to get sendmail working?
I installed it via "apt-get install sendmail".
what do I have to do now? I only want to send mails for giving "activition-mails" and "forgot my passwd" mails from php pages. Would be nice if somebody could help a bloody noob xD

greetz and thx in advance Torvitas
 
Old 01-21-2008, 02:32 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Quote:
Originally Posted by Torvitas View Post
hi im running a debian 4.0 system on a root-server and i have 2 different but very important questions.
1. how to change apache 2 default directory to change this:
http://78.46.33.43/apache2-default/wbblite/portal.php
to this
http://78.46.33.43/FoH/wbblite/portal.php

2. how to get sendmail working?
I installed it via "apt-get install sendmail".
what do I have to do now? I only want to send mails for giving "activition-mails" and "forgot my passwd" mails from php pages. Would be nice if somebody could help a bloody noob xD

greetz and thx in advance Torvitas
1. Don't overthink it. simply go to /var/www and make a folder called "FoH". put index.php in there & you're set. Even better, simply put index.php in /var/www & you can just go to http://78.46.33.43/ to get to the page. Beyond that, your config files are in /etc/apache2/conf (IIRC). The file is called either httpd.conf or apache2.conf Just remember that if you edit anything in there you have to restart apache for the settings to take effect - "sudo /etc/init.d/httpd restart" (or possibly /etc/init.d/apache2 if you don't have httpd)

2. Is there anything that makes you think it's not working? If so, what? if you've installed through apt-get, you should be set. try using the "mail" function in php to test. Alternatively, you can run this command to test:

mail your_email@address.com -s "test" < /etc/fstab

... which will send you your own fstab as a test.

Last edited by BrianK; 01-21-2008 at 02:35 PM.
 
Old 01-21-2008, 03:00 PM   #3
Torvitas
LQ Newbie
 
Registered: Jan 2008
Posts: 9

Original Poster
Rep: Reputation: 0
i tried it via putty but no mail arrived what can be wrong?

part of phpinfo

sendmail_from no value no value
sendmail_path sendmail -t sendmail -t

any idea?
 
Old 01-21-2008, 03:19 PM   #4
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Quote:
Originally Posted by Torvitas View Post
i tried it via putty but no mail arrived what can be wrong?

part of phpinfo

sendmail_from no value no value
sendmail_path sendmail -t sendmail -t

any idea?
you tried the "mail" command via putty? What's the output of 'which mail' and 'which sendmail'

My phpinfo() looks a bit different, but it was the default from my php build:
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
 
Old 01-21-2008, 03:22 PM   #5
Torvitas
LQ Newbie
 
Registered: Jan 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by BrianK View Post
you tried the "mail" command via putty? What's the output of 'which mail' and 'which sendmail'
what do you mean? i entred "mail myemail_addy@gmail.com -s "test" < /etc/fstab" and there was no return. it take ~10 secs and then console returns to input
 
Old 01-21-2008, 03:32 PM   #6
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Quote:
Originally Posted by Torvitas View Post
what do you mean? i entred "mail myemail_addy@gmail.com -s "test" < /etc/fstab" and there was no return. it take ~10 secs and then console returns to input
Well, there would be no output.. Did you get the mail on your gmail account?

If there was no return, at least you know the program is installed & in your path (otherwise you would get a "unknown command" error). FYI - if you were wondering what I meant by asking the output of "which sendmail", I was asking you to putty into your machine & run the command "which sendmail". You don't need to do this now, as we've determined that it's installed on your machine.

You can look through your logs to see if they help... /var/log/mail.log is the one that will be most useful to you, I'd imagine.

Last edited by BrianK; 01-21-2008 at 03:33 PM.
 
Old 01-21-2008, 03:37 PM   #7
Torvitas
LQ Newbie
 
Registered: Jan 2008
Posts: 9

Original Poster
Rep: Reputation: 0
ok i made a apt-get remove sendmail
then i killed all sendmail processes per kill -9 processid
i made your mail command agein and sendmail started again.
everytime i try it a new sendmail process appears that must be closed per kill. why that?
 
Old 01-21-2008, 03:40 PM   #8
Torvitas
LQ Newbie
 
Registered: Jan 2008
Posts: 9

Original Poster
Rep: Reputation: 0
if i just enter "mail" this appears:
>U 1 root@ForgeofHeroe Sun Dec 09 06:25 22/1034 Cron <root@Debian-40-etch-3
U 2 root@ForgeofHeroe Sun Dec 16 06:25 22/1034 Cron <root@Debian-40-etch-3
U 3 root@ForgeofHeroe Thu Dec 20 15:20 22/902 Cron <smmsp@Debian-40-etch-
U 4 root@ForgeofHeroe Thu Dec 20 15:40 22/902 Cron <smmsp@Debian-40-etch-
U 5 root@ForgeofHeroe Thu Dec 20 16:00 22/902 Cron <smmsp@Debian-40-etch-
U 6 root@ForgeofHeroe Thu Dec 20 16:20 22/902 Cron <smmsp@Debian-40-etch-
U 7 root@ForgeofHeroe Thu Dec 20 16:40 22/902 Cron <smmsp@Debian-40-etch-
U 8 root@ForgeofHeroe Thu Dec 20 17:00 22/902 Cron <smmsp@Debian-40-etch-
U 9 root@ForgeofHeroe Thu Dec 20 17:20 22/902 Cron <smmsp@Debian-40-etch-
U 10 root@ForgeofHeroe Thu Dec 20 17:40 22/902 Cron <smmsp@Debian-40-etch-
U 11 root@ForgeofHeroe Thu Dec 20 18:00 22/902 Cron <smmsp@Debian-40-etch-
U 12 root@ForgeofHeroe Thu Dec 20 18:20 22/902 Cron <smmsp@Debian-40-etch-
U 13 root@ForgeofHeroe Thu Dec 20 18:40 22/902 Cron <smmsp@Debian-40-etch-
U 14 root@ForgeofHeroe Thu Dec 20 19:00 22/902 Cron <smmsp@Debian-40-etch-
U 15 root@ForgeofHeroe Thu Dec 20 19:20 22/902 Cron <smmsp@Debian-40-etch-
U 16 root@ForgeofHeroe Thu Dec 20 19:40 22/902 Cron <smmsp@Debian-40-etch-
U 17 root@ForgeofHeroe Thu Dec 20 20:00 22/902 Cron <smmsp@Debian-40-etch-
U 18 root@ForgeofHeroe Thu Dec 20 20:20 22/902 Cron <smmsp@Debian-40-etch-
U 19 root@ForgeofHeroe Thu Dec 20 20:40 22/902 Cron <smmsp@Debian-40-etch-
U 20 root@ForgeofHeroe Thu Dec 20 21:00 22/902 Cron <smmsp@Debian-40-etch-

is this normal`?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
basic questions on hostname and domain name + related postfix questions Moebius Linux - Newbie 7 09-04-2007 12:50 PM
TWO Security Related Questions as400 Solaris / OpenSolaris 15 07-13-2006 01:50 PM
Two MPlayer related questions yozhhh Linux - Software 2 01-04-2006 06:21 PM
php related blackzone Programming 1 08-20-2004 05:07 AM
3 non-related questions Rognon Slackware 5 02-06-2004 05:45 PM


All times are GMT -5. The time now is 11:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration