HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   php and phpmyadmin not working (http://www.howtoforge.com/forums/showthread.php?t=49206)

MBAngel 2nd October 2010 21:57

php and phpmyadmin not working
 
I am helping a friend set up their server. I do most of my helping from ssh, so I'll need a clue how to post things like logs and config files.

We've tried for 2 weeks on this, searching the forums and the web for more info. This is our second clean install.


Php and phpmyadmin are broken. We set up the server following the perfect debian server guide. http://www.howtoforge.com/perfect-se...nny-ispconfig3

This is a single server setup.

I can not access myphpadmin from ipaddress/myphpadmin, ipaddress:8080/myphpadmin nor from domainname/myphpadmin or domainname:8080/myphpadmin

I put a php file in a web site which was created thru ispconfig to test if mysql is responding, and ftp works, as I was able to post the file on that web site. I see only the code - which means php is not working.

I find it interesting that on the phpmyadmin site, the install directions say to have php, apache and mysql installed first, yet the perfect server directions install php after phpmyadmin.

I am eagerly following this thread - http://www.howtoforge.com/forums/sho...t=49100&page=2
I don't want to hijack someone else's thread tho, that gets confusing for people who want to resolve their issue by reading the forum.

locate phpmyadmin.conf
Code:

/var/lib/dpkg/info/phpmyadmin.conffiles
/var/lib/dpkg/info/phpmyadmin.config

I can't seem to find a copy of what phpmyadmin.conf should read by default. I tried to copy /var/lib/dpkg/info/phpmyadmin.config to /etc/apache2/conf.d/phpmyadmin.conf and I still can't see phpmyadmin, and it caused errors in apache restarting.

ls -la /etc/apache2/conf.d seems to indicate all files are owned by root, total 28

Errors in the apache error log indicate that /var/www/phpmyadmin directories do not exist.


when I do netstat - tap


Code:

tcp        0        0        localhost.localdo:35748        localhost.locald:domain        TIME_WAIT
tcp        0        0        localhost.localdo:36724        localhost.localdoma:ftp        TIME_WAIT
tcp        0        0        localhost.localdo:55088        localhost.localdoma:www        TIME_WAIT
tcp        0        0        localhost.localdo:mysql        localhost.localdo:42868        TIME_WAIT
tcp        0        0        localhost.localdo:42868        localhost.localdo:mysql        TIME_WAIT

Then I get a long list of this
Code:

unix 3  [ ]    STREAM    CONNECTED  ####
unix 2  [ ]    DGRAM                ####

some of them have directory info after them, like this:
Code:

unix 3  [ ]    STREAM    CONNECTED  #### /var/run/dbus/system_bus_socket
getenforce returns "command not found"


iptables -L

Code:

Chain INPUT (policy ACCEPT)
target    prot opt source              destination
fail2ban-ssh tcp -- anywhere        anywhere       

Chain FORWARD (policy ACCEPT)
target    prot opt source              destination       

Chain OUTPUT (policy ACCEPT)
target    prot opt source              destination

chain fail2ban-ssh (1 references)
target    prot opt source              destination
RETURN        all  --  anywhere                anywhere

dpkg-reconfigure phpmyadmin - I ran this and chose apache2 in the box and it ran with no errors, but nothing has changed after restart of apache


So, overall it appears to me that the apache, php and phpmyadmin installs went slightly wonky. How can I fix this?

Other questions:
1 how do I make it so /webmail works for all domains?
2 how are outlook settings configured - taking into consideration that I followed the tutorial and have made no customizations - if username is user1 and client name is test and the user id is 1?
3 Can I change the default email login to username@domainname.com?

MBAngel 2nd October 2010 23:11

phpmyadmin fixed
 
I reran this command

dpkg-reconfigure phpmyadmin

I hit space, which put an x in the already selected apache2 box. Now php myadmin can be seen from ip/myphpadmin and domainame/phpmyadmin

I still don't have php working on the web site so it seems off to have phpmyadmin working, lol.

MBAngel 2nd October 2010 23:28

ok, lol... everyone gets a free giggle. I have a code error in my php file, so it was loading as text. I fixed one error and it told me I have another error, but it was a php error message.

I do still have those other questions tho:

1 how do I make it so /webmail works for all domains?
2 how are outlook settings configured - taking into consideration that I followed the tutorial and have made no customizations - if username is user1 and client name is test and the user id is 1?
3 Can I change the default email login to username@domainname.com?

MBAngel 2nd October 2010 23:52

ok, this is odd

http://server1.domainname.com/webmail/ works. the hostname of my server is server1.domainname.com

How can I change this to either webmail.domainname.com or domainname.com/webmail ?

MBAngel 3rd October 2010 00:26

lol, this works in outlook client settings
mail.domainname.tld for incoming and outgoing servers
username@domainname.tld and password for login
more settings, outgoing server = check the box for requires autherntication, and same as incoming.

I am having problems sending, but telnet to port 25 works internally, but not externally, which puts it squarely in the router section of troubleshooting.

falko 3rd October 2010 18:26

Quote:

Originally Posted by MBAngel (Post 240797)
I am having problems sending, but telnet to port 25 works internally, but not externally, which puts it squarely in the router section of troubleshooting.

It's also possible that your ISP is blocking port 25.

MBAngel 8th October 2010 20:20

Ok, it was MY isp that was blocking port 25. So, we added a 2nd listener -

following these directions:
1. Edit this file /etc/postfix/master.cf and add an entry like below causes Postfix to listen to port 2525: -

2525 inet n - n - - smtpd

2. Then, restart your Postfix service as below: -

service postfix restart


Now the smtp server answers, but won't accept the username and password that it's been accepting all week for incoming mail.

I could use some complete settings for outlook clients.

I've tried checking the box for ssl on the advanced tab. I have "my server requires authentication" "same as incoming mail" on the outgoing server tab.

It just refuses my password now.

PS I love you falco, please help :-)

Edit: so I have tried
username
c1_username
c0_username
web1_username
clientname_username

all of the above with and without @domainname.tld

I have tried it with the checkboxes checked and without - my server requires auth on outgoing server tab, and use ssl on advanced tab

The way it works best is username@domainname.tld, without ssl checked, my server requires auth on outgoing server tab checked (use same as incoming). of the checks outlook runs, the only one that fails is sending test email, and it just keeps asking for username and password.

MBAngel 10th October 2010 02:30

I sure could use some help to even figure out where the error might be. I can contact the smtp server but it refuses the username or password.

I can't telnet to 2525 either.

It's the last step and it'll be ready to go, please help. (lifts the skirt and shows some leg, while smiling pretty)

MBAngel 10th October 2010 04:51

Yes!! I got it by george!!

ok, there is a line that was commented out in /etc/postfix/master.cf

-o smtpd_sasl_auth_enable=yes

as soon as I uncommented this it worked!

I also changed this line
2525 inet n - n - - smtpd
to this
2525 inet n - - - - smtpd (chroot default)

remember to restart
postfix reload


All times are GMT +2. The time now is 07:36.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.