PDA

View Full Version : Broke /etc/apache2/mods-enabled/php5.conf


woodies
14th October 2006, 02:10
Hey all
So im following The Perfect Setup - Ubuntu 6.06 LTS Server (Dapper Drake), i got through to the end and im setting up ispconfig, while running it i got an error about /etc/apache2/mods-enabled/php5.conf. So i check it and all thats there is

root@server1:/etc/postfix/ssl# vi /etc/mime.types
root@server1:/etc/postfix/ssl# vi /etc/apache2/mods-enabled/php5.conf
<IfModule mod_php5.c>
# AddType application/x-httpd-php .php .phtml .php3
# AddType application/x-httpd-php-source .phps
</IfModule>

when i force-reload it just says failed, any idea what i need to do? Should i reinstall?

falko
14th October 2006, 16:50
What's the exact error message? What's in Apache's error log (usually it's in /var/log/apache2)?

woodies
14th October 2006, 21:58
Checking for program httpd...
/usr/bin/httpd
OK
Checking the syntax of the httpd.conf...
Syntax error on line 1 of /etc/apache2/mods-enabled/php5.conf:
Invalid command 'root@server1:/etc/postfix/ssl#', perhaps mis-spelled or defined by a module not included in the server configuration
ERROR: The syntax of your httpd.conf is not ok! Please correct the error. The installation routine stops here!


Error log-

root@server1:/var/log/apache2# vi error.log
[Thu Oct 12 22:21:02 2006] [notice] Apache/2.0.55 (Ubuntu) configured -- resuming normal operations
[Thu Oct 12 22:23:44 2006] [notice] caught SIGTERM, shutting down
[Thu Oct 12 22:23:44 2006] [notice] Apache/2.0.55 (Ubuntu) PHP/5.1.2 configured -- resuming normal operations
[Thu Oct 12 22:27:27 2006] [notice] caught SIGTERM, shutting down

woodies
15th October 2006, 01:47
SHould i just uninstall apache? and re-install?

falko
15th October 2006, 15:32
No need to reinstall yet.

What's in /etc/apache2/mods-enabled/php5.conf?

woodies
15th October 2006, 21:49
Thats whats posted above, thats it.

root@server1:/home/admin# vi /etc/apache2/mods-enabled/php5.conf
------------PHP5.conf-----------------------------------------------------------
root@server1:/etc/postfix/ssl# vi /etc/mime.types
root@server1:/etc/postfix/ssl# vi /etc/apache2/mods-enabled/php5.conf
<IfModule mod_php5.c>
# AddType application/x-httpd-php .php .phtml .php3
# AddType application/x-httpd-php-source .phps
</IfModule>
---------------------------------------------------------
I think i accidently pretty much wiped it out, what is in the default php5.conf file?

falko
16th October 2006, 16:31
The file must read:

<IfModule mod_php5.c>
# AddType application/x-httpd-php .php .phtml .php3
# AddType application/x-httpd-php-source .phps
</IfModule>

woodies
17th October 2006, 06:06
So that worked but once it got to the mysqladmin: login it would accept anything for the password
I get
mysqladmin -u root password yourrootsqlpassword
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

and when i try to run ./setup again i get



########## make ##########

/usr/bin/make
OK

########## lex ##########

/usr/bin/lex
OK

########## INSTALLATION ##########

Preparing files. Please wait a moment...
cp: cannot stat `/home/admispconfig/ispconfig/lib/config.inc.php': No such file or directory
cp: cannot stat `/home/admispconfig/ispconfig/users': No such file or directory
cp: cannot stat `/home/admispconfig/ispconfig/adminmail.txt': No such file or directory

woodies
17th October 2006, 08:33
and
All prerequisites are fulfilled.
Here we go...


Warning: include(config.inc.php): failed to open stream: No such file or directory in /home/install_ispconfig/install.php on line 656

Warning: include(): Failed opening 'config.inc.php' for inclusion (include_path='.:') in /home/install_ispconfig/install.php on line 656

Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /home/install_ispconfig/install.php on line 676
Could not connect to db
Restarting some services...
./setup2: line 1104: [: ==: unary operator expected
./setup2: line 1122: /etc/init.d/ispconfig_server: No such file or directory
Congratulations! Your ISPConfig system is now installed. If you had to install quota, please take the steps described in the installation manual. Otherwise your system is now available without reboot.

root@server1:/home/install_ispconfig#

woodies
18th October 2006, 16:06
I just went ahead and reinstalled with LAMP, everything is fine now thanks!