HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   apache not working (http://www.howtoforge.com/forums/showthread.php?t=16333)

cruz 19th October 2007 22:53

apache not working
 
I posted this someware else and I do not know if it was suppose to post it in this area. Anyhow. I changed the file /home/admispconfig/ispconfig/lib/config.inc.php. because I was getting errors on the php log
HTML Code:

an unknown filter was not added: PHP
I added the string that was told in this posting.
HTML Code:

This has already been fixed many releases ago. You will just have to change the line from:

$go_info["server"]["apache2_php"] = 'both'; // one string of one or more comma seperated options: 'filter' = set PHP filters, 'addtype' = Set PHP addtype, 'both' = Set Filter + Addtype, 'engine' = Use "php_admin_flag engine on/off", suphp = SuPHP wrapper enabled, 'addhandler' = Set PHP AddHandler (nescessary for SuSE 10.2)


to:

$go_info["server"]["apache2_php"] = 'addtype'; // one string of one or more comma seperated options: 'filter' = set PHP filters, 'addtype' = Set PHP addtype, 'both' = Set Filter + Addtype, 'engine' = Use "php_admin_flag engine on/off", suphp = SuPHP wrapper enabled, 'addhandler' = Set PHP AddHandler (nescessary for SuSE 10.2)


in the file /home/admispconfig/ispconfig/lib/config.inc.php

I do not know if this is what caused the web server not to work, but after I changed this it stoped working. I had copied the file before I changed it, so I recopied it back to the server. But it did not fix it. I looked into apache file and can see red marks on two files. php4.conf and php4.load. this is the error message I get when booting the server.
HTML Code:

syntac error on line 185 of/etc/apache2/apache2.config could not open configuration file /etc/apache2/mods-enable/php4.load no such file or directory
Now I have php5 on here. Why is it trying to load php4? Please help, my server is down. But I can login to the servers ispconfig councal, but my website is down. Thanks

P.S. new info. I went to the files that had the red marks and tried to open them with winSCP and it is telling me. can't open remote file.then it has the path to the files (php4.config php4.load) I hope this helps. thanks

giganet 19th October 2007 23:07

Have you tried powering down the server after first re-storing original files, then re-powering it?

cruz 19th October 2007 23:10

yes I tried that 4 times. I found this when I tried to open the files I mentioned.
Cannot open remote file '/etc/apache2/mods-enabled/php4.conf'.
No such file or directory.
Error code: 2
Error message from server: No such file
Request code: 3
It seems the files are gone.

cruz 19th October 2007 23:17

How can I reload these directory's? They are gone. or can I? Thanks for the help

giganet 19th October 2007 23:17

Hmm, have you tried to re-install PHP5?


When you say you are able to get to ISPConfig- are you accessing it VIA IP or domain?

When you are logged into ISPConfig and select the Services tab what does ISPConfig report there?

cruz 19th October 2007 23:30

I can login to ispconfig, but the when I click on servic, the web-sever is offline. I can see php5.config and php5.load. I open them up and they are small text code. I am getting the error from the php4, not 5. I don;t understand half this stuff. If I can replace the two files, I think it will work, but I do not know what code to put in them.

giganet 19th October 2007 23:49

what does the server return when you run 'php -v' ?

Try to restart ISPConfig '/etc/init.d/ispconfig_server restart'

cruz 20th October 2007 00:05

php -v command
 
take a look at this.
HTML Code:

server1:~# php -v
PHP Warning:  Module 'json' already loaded in Unknown on line 0
PHP 5.2.0-8+etch7 (cli) (built: Jul  2 2007 21:46:15)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies

what is json? this is what I get when I restart ispconfig
HTML Code:

server1:~# /etc/init.d/ispconfig_server restart
Shutting down ISPConfig system...
/root/ispconfig/httpd/bin/apachectl stop: httpd stopped
ISPConfig system stopped!
Starting ISPConfig system...
/root/ispconfig/httpd/bin/apachectl startssl: httpd started
ISPConfig system is now up and running!
server1:~#


giganet 20th October 2007 01:08

I have been Googling the PHP module 'json', this module is used by a variety of differing applications.

Here's what I Googled for you:

Quote:

(If you've installed the module php5-json and get warnings like this one:

PHP Warning: Module 'json' already loaded in Unknown on line 0

it means that the module got loaded twice. Open /etc/php5/cgi/php.ini, scroll down to the end and comment out the line extension=json.so:

vi /etc/php5/cgi/php.ini

[...]
;extension=json.so
[...]

Then restart Lighttpd again:

/etc/init.d/lighttpd restart

The warnings should now be gone.)
Instead of restarting Lighhttpd your will restart apache2:
'/etc/init.d/apache2 restart'

Please view the source of the above: http://agaricdesign.com/projects/sites/wsf2008

Google Search Term: php -v command shows module json loaded

cruz 20th October 2007 01:39

this is what i get
 
I folowed everything and when I restarted apache, this is the error message I got.
HTML Code:

server1:~# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)...grep: /etc/apache2/mods-enabled/php4.load: No such file or directory
grep: /etc/apache2/mods-enabled/php4.conf: No such file or directory
grep: /etc/apache2/mods-enabled/php4.load: No such file or directory
grep: /etc/apache2/mods-enabled/php4.conf: No such file or directory
apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/php4.load: No such file or directory
 failed!

these are the files that I was telling you that are gone for some reason. I can not figure it out. can I do a debian perfect setup onanother pc and get the files from it and replace the ones that have the red marks on them? I have to get my site back online. Boy I need a backup plan in case this ever happens again. I thank you for the info.


All times are GMT +2. The time now is 13:14.

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