LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-23-2005, 04:43 AM   #1
raduromeo
LQ Newbie
 
Registered: Nov 2005
Location: Greece Santorini
Distribution: Suse, Debian, Mandrake
Posts: 16

Rep: Reputation: 0
apache+php not working after restart


Hello !
I have one application that it's requaier apache2 , mysql & php.
I install with succes Apache2,mysql and php with all configuration that are requaier
I make a test for php with <? php phpinfo(); ?> were every thing seams to be ok. After I am restarting the system my apache server do not want to serve me the php pages.
If I open localhost I can see the default page for Apache server but when I am trying for example to open test.php error 404. even if I did not change anything, (the files are there, and I check my spelling many times.)

When I am running ./apachectl configtest
Syntax OK

My Linux distribution is > Suse 10.0 opensource
My instalation is
Apache2.0.55
mysql-5.0.15.
php 4.4.1
(all source compiled )

My httpd.conf (only some configuration that I change)

DocumentRoot "/usr/local/apache2/htdocs/"

DirectoryIndex index.html index.html.var index.php

AddType application/x-httpd-php .php
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule php4_module modules/libphp4.so

My php.ini change lines >

doc_root = "/usr/local/apache2/htdocs/"
file_uploads = Off

I even try to reinstall php when I discover that was working again but only until I restart the system and the problem came back. I think that has to do with a module that is not loaded.

This is my first linux sistem and I am useing it for 2 months only.
 
Old 11-23-2005, 05:07 AM   #2
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
If you have the test.php in /usr/local/apache2/htdocs/test.php then your apache config should be fine. The most common problem are the access rights on the file(test.php) or on any of the directory's(/usr/local/apache2/htdocs/). The apache user should be able to at least read the test.php file.
 
Old 11-23-2005, 05:37 AM   #3
raduromeo
LQ Newbie
 
Registered: Nov 2005
Location: Greece Santorini
Distribution: Suse, Debian, Mandrake
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the replay pk21

I think about this olso so I try to give full access 777 to all directory /htdocs recursiv but the problem continue to exist

This is it in my /usr/local/apache2/htdocs directory

drwxrwxrwx 19 root root 1160 2005-11-23 10:36 .
drwxr-xr-x 15 root root 384 2005-11-23 11:14 ..
drwxrwxrwx 3 radu users 456 2005-11-22 21:46 admin
drwxrwxrwx 3 radu users 224 2005-11-22 21:46 conf
-rwxrwxrwx 1 radu users 1114 2005-11-17 17:18 coolmenu.css
-rwxrwxrwx 1 radu users 23399 2005-11-17 17:18 coolmenus4.js
drwxrwxrwx 2 radu users 128 2005-11-22 21:46 CVS
-rwxrwxrwx 1 radu users 0 2005-11-17 17:18 debug.log
drwxrwxrwx 3 radu users 232 2005-11-22 21:46 docs
drwxrwxrwx 3 radu users 240 2005-11-22 21:46 drivers
-rwxrwxrwx 1 radu users 0 2005-11-17 17:18 error.log
drwxrwxrwx 3 radu users 1208 2005-11-22 21:46 fonts
-rwxrwxrwx 1 radu users 37306 2005-11-17 17:18 funs_common.php
-rwxrwxrwx 1 radu users 6455 2005-11-17 17:18 funs_install.php
-rwxrwxrwx 1 radu users 14062 2005-11-17 17:18 generic.js
-rwxrwxrwx 1 radu users 25752 2005-11-17 17:18 handyrestaurant_demo.webprj
drwxrwxrwx 3 radu users 944 2005-11-22 21:46 images
drwxrwxrwx 3 radu users 1680 2005-11-22 21:46 include
-rwxrwxrwx 1 radu users 3603 2005-11-17 17:18 includes.php
-rwxrwxrwx 1 radu users 3097 2005-11-17 17:18 index.php
-rwxrwxrwx 1 radu users 3656 2005-11-17 17:18 install.php
drwxrwxrwx 4 radu users 424 2005-11-22 21:46 jscalendar
drwxrwxrwx 3 radu users 232 2005-11-22 21:46 lang
drwxrwxrwx 3 radu users 896 2005-11-22 21:46 manage
-rwxrwxrwx 1 radu users 5077 2005-11-17 17:18 myhandyrestaurant_account_complete.sql
-rwxrwxrwx 1 radu users 4670 2005-11-17 17:18 myhandyrestaurant_account_struct.sql
-rwxrwxrwx 1 radu users 483196 2005-11-17 17:18 myhandyrestaurant_common_complete.sql
-rwxrwxrwx 1 radu users 23391 2005-11-17 17:18 myhandyrestaurant_common_struct.sql
drwxrwxrwx 4 radu users 584 2005-11-22 21:46 overlib
-rwxrwxrwx 1 radu users 9356 2005-11-17 17:18 reset.php
drwxrwxrwx 4 radu users 128 2005-11-22 21:46 stock
-rwxrwxrwx 1 radu users 4267 2005-11-17 17:18 styles.css.php
drwxrwxrwx 4 radu users 96 2005-11-22 21:46 templates
-rwxrwxrwx 1 root root 19 2005-11-23 10:36 test.php
drwxrwxrwx 3 radu users 472 2005-11-22 21:46 upgrade
drwxrwxrwx 3 radu users 232 2005-11-22 21:46 waiter
drwxrwxrwx 3 radu users 128 2005-11-22 21:46 xtemplate
 
Old 11-23-2005, 05:41 AM   #4
malo_umoran
Member
 
Registered: Dec 2003
Distribution: Desktop: Slackware 13.1 &13.37 | Server: Debian 6.0
Posts: 270

Rep: Reputation: 32
what do logs say? what is being written in error_log when you try to open the file?

usually /var/log/apache/error_log

M.
 
Old 11-23-2005, 06:04 AM   #5
raduromeo
LQ Newbie
 
Registered: Nov 2005
Location: Greece Santorini
Distribution: Suse, Debian, Mandrake
Posts: 16

Original Poster
Rep: Reputation: 0
Thank you very muchmalo_umoran. I know now what happened. I was using /usr/local/apache2/htdocs when it seams that I should put my file in srv/www/htdocs.

I hope in a few month that I will be able to help others. Thank to all.


this is my error log >

[Tue Nov 22 11:49:52 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Nov 22 11:49:52 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Tue Nov 22 11:49:53 2005] [notice] Apache/2.0.54 (Linux/SUSE) configured -- resuming normal operations
[Tue Nov 22 11:50:52 2005] [error] [client ::1] script '/srv/www/htdocs/install.php' not found or unable to stat
[Tue Nov 22 11:51:00 2005] [error] [client ::1] File does not exist: /srv/www/htdocs/test
[Tue Nov 22 11:51:06 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 11:52:26 2005] [error] [client ::1] script '/srv/www/htdocs/install.php' not found or unable to stat
[Tue Nov 22 11:55:37 2005] [error] [client ::1] script '/srv/www/htdocs/install.php' not found or unable to stat
[Tue Nov 22 11:57:20 2005] [error] [client ::1] script '/srv/www/htdocs/install.php' not found or unable to stat
[Tue Nov 22 12:34:46 2005] [error] [client 127.0.0.1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 12:53:06 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 12:54:05 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 13:00:56 2005] [error] [client 127.0.0.1] File does not exist: /srv/www/htdocs/install
[Tue Nov 22 13:01:01 2005] [error] [client 127.0.0.1] script '/srv/www/htdocs/install.php' not found or unable to stat
[Tue Nov 22 13:36:33 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 13:57:04 2005] [notice] caught SIGTERM, shutting down
[Tue Nov 22 13:57:05 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Nov 22 13:57:05 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Tue Nov 22 13:57:06 2005] [notice] Apache/2.0.54 (Linux/SUSE) configured -- resuming normal operations
[Tue Nov 22 13:57:33 2005] [error] [client ::1] script '/srv/www/htdocs/install.php' not found or unable to stat
[Tue Nov 22 16:02:56 2005] [error] [client ::1] script '/srv/www/htdocs/install.php' not found or unable to stat
[Tue Nov 22 16:03:13 2005] [notice] caught SIGTERM, shutting down
[Tue Nov 22 16:04:23 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Nov 22 16:04:23 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Tue Nov 22 16:04:25 2005] [notice] Apache/2.0.54 (Linux/SUSE) configured -- resuming normal operations
[Tue Nov 22 16:05:36 2005] [error] [client ::1] script '/srv/www/htdocs/install.php' not found or unable to stat
[Tue Nov 22 16:05:49 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 16:16:15 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 16:19:18 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 16:27:39 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 16:27:50 2005] [error] [client ::1] File does not exist: /srv/www/htdocs/test.php:8080
[Tue Nov 22 16:27:57 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 16:28:06 2005] [error] [client ::1] script '/srv/www/htdocs/reset.php' not found or unable to stat
[Tue Nov 22 16:48:15 2005] [notice] caught SIGTERM, shutting down
[Tue Nov 22 16:50:53 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Nov 22 16:50:53 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Tue Nov 22 16:50:54 2005] [notice] Apache/2.0.54 (Linux/SUSE) configured -- resuming normal operations
[Tue Nov 22 16:59:35 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 17:53:06 2005] [notice] caught SIGTERM, shutting down
[Tue Nov 22 17:53:06 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Nov 22 17:53:06 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Tue Nov 22 17:53:08 2005] [notice] Apache/2.0.54 (Linux/SUSE) configured -- resuming normal operations
[Tue Nov 22 17:53:34 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 18:03:10 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 18:03:14 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 18:05:28 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Tue Nov 22 18:45:49 2005] [notice] caught SIGTERM, shutting down
[Wed Nov 23 10:38:19 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Nov 23 10:38:19 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Wed Nov 23 10:38:22 2005] [notice] Apache/2.0.54 (Linux/SUSE) configured -- resuming normal operations
[Wed Nov 23 10:39:14 2005] [error] [client ::1] script '/srv/www/htdocs/install.php' not found or unable to stat
[Wed Nov 23 10:46:34 2005] [error] [client ::1] script '/srv/www/htdocs/install.php' not found or unable to stat
[Wed Nov 23 10:59:30 2005] [error] [client ::1] script '/srv/www/htdocs/install.php' not found or unable to stat
[Wed Nov 23 11:01:47 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Wed Nov 23 11:08:05 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Wed Nov 23 11:12:37 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Wed Nov 23 11:15:22 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Wed Nov 23 11:15:24 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Wed Nov 23 11:18:43 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Wed Nov 23 11:19:02 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
[Wed Nov 23 11:42:44 2005] [notice] caught SIGTERM, shutting down
[Wed Nov 23 11:42:44 2005] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Nov 23 11:42:44 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Wed Nov 23 11:42:45 2005] [notice] Apache/2.0.54 (Linux/SUSE) configured -- resuming normal operations
[Wed Nov 23 11:43:06 2005] [error] [client ::1] script '/srv/www/htdocs/install.php' not found or unable to stat
[Wed Nov 23 12:50:57 2005] [error] [client ::1] script '/srv/www/htdocs/install.php' not found or unable to stat
[Wed Nov 23 13:30:54 2005] [error] [client ::1] script '/srv/www/htdocs/test.php' not found or unable to stat
 
Old 11-23-2005, 06:16 AM   #6
malo_umoran
Member
 
Registered: Dec 2003
Distribution: Desktop: Slackware 13.1 &13.37 | Server: Debian 6.0
Posts: 270

Rep: Reputation: 32
log files are often useful

M.
 
  


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
Apache config for PHP (not working) Thanotos Slackware 2 11-30-2005 12:52 AM
Apache/PHP not working Seventh Linux - Software 1 06-23-2005 05:37 PM
Apache + PHP not working WiWa Linux - Networking 3 10-18-2004 06:48 AM
php, mysql, apache not working together like expected atheist Debian 2 09-06-2004 11:48 AM
PHP not working with Apache, nor mysql wldkos Linux - Software 18 05-16-2003 12:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:05 PM.

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
Open Source Consulting | Domain Registration