Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing Apache2 with PHP5.x (incl. old Apache+PHP4.x)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
rex123
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 272

PostPosted: Fri Nov 19, 2004 9:36 am    Post subject: Reply with quote

-TooL wrote:
When I do that command i get the output that you have.

...
and im still getting the same error, unable to open logs


Sorry - I wasn't very clear.
Now that you see that /usr/lib/apache2/logs is a link to /var/log/apache2, you need to check that that directory exists, and is writable by the appropriate user.
So try
Code:

$ ls -ld /var/log/apache2/
drwxr-xr-x  2 root root 4096 Nov 18 14:45 /var/log/apache2/


The output here shows that the directory is owned by the user root, and writable only by that user.

So make sure you're running apache2 as root, and it should work.

If you get something like "no such directory" then you have a broken symlink (one that points to something that isn't there).

-TooL wrote:

should i create a new topic for this? since this is buried really really deep in this thread


Probably no need. It is quite likely a permissions issue not a symlink one anyway.
Back to top
View user's profile Send private message
To
Veteran
Veteran


Joined: 12 Apr 2003
Posts: 1145
Location: Coimbra, Portugal

PostPosted: Fri Nov 19, 2004 11:59 am    Post subject: Reply with quote

carpman wrote:
sorted, the configuarations file had .dist missiong off it


hello, ok i setup apache2 php mysql for use as local webdev testing, default server is /var/www/localhost

test.php works



I have the website dev files in

/home/michael/public_html/dev/site1


I have setup an alias in default server

http://localhost/site1


But when trying to install mambo i get

Code:


Warning: main(/path/to/mambo/install/includes/version.php): failed to open stream: No such file or directory in /home/michael/public_html/site1/includes/mambo.php on line 27

Warning: main(): Failed opening '/path/to/mambo/install/includes/version.php' for inclusion (include_path='.:/usr/lib/php') in /home/michael/public_html/site1/includes/mambo.php on line 27

Warning: main(/path/to/mambo/install/includes/database.php): failed to open stream: No such file or directory in /home/michael/public_html/site1/includes/mambo.php on line 29

Fatal error: main(): Failed opening required '/path/to/mambo/install/includes/database.php' (include_path='.:/usr/lib/php') in /home/michael/public_html/site1/includes/mambo.php on line 29



The lines it is refering to are


Code:

include_once( $mosConfig_absolute_path . "/includes/version.php" );

require_once( $mosConfig_absolute_path . "/includes/database.php" );




both these files exist so it must a path issue somewhere?




any ideas?

cheers


Donno if it's too late for this, but: in the error you have "/path/to/mambo/" you're suposed to edit your config file and specify the path where manbo is :wink:


_________________

------------------------------------------------
Linux Gandalf 3.2.35-grsec
Gentoo Base System version 2.2
------------------------------------------------
Back to top
View user's profile Send private message
-TooL
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2004
Posts: 75

PostPosted: Fri Nov 19, 2004 8:35 pm    Post subject: Reply with quote

ahh I was not in Root when I tried running it either, Ill try that once I get some other things done that im messing with right now
Back to top
View user's profile Send private message
-TooL
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2004
Posts: 75

PostPosted: Fri Nov 19, 2004 9:23 pm    Post subject: Reply with quote

rex123 wrote:

Now that you see that /usr/lib/apache2/logs is a link to /var/log/apache2, you need to check that that directory exists, and is writable by the appropriate user.
So try
Code:

$ ls -ld /var/log/apache2/
drwxr-xr-x  2 root root 4096 Nov 18 14:45 /var/log/apache2/


The output here shows that the directory is owned by the user root, and writable only by that user.

So make sure you're running apache2 as root, and it should work.

If you get something like "no such directory" then you have a broken symlink (one that points to something that isn't there).


As root im getting:
Code:
ls: /var/log/apache2/: No such file or directory


for the above ls command...
Back to top
View user's profile Send private message
-TooL
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2004
Posts: 75

PostPosted: Fri Nov 19, 2004 9:38 pm    Post subject: Reply with quote

ohh blah i tried making the directory apache2..

now im getting the error:

Code:
(40)Too many levels of symbolic links: apache2: could not open error log file /usr/lib/apache2/logs/error_log.
Unable to open logs


ID-10T error... heh
Back to top
View user's profile Send private message
zdawg
n00b
n00b


Joined: 06 Feb 2004
Posts: 25
Location: Canada

PostPosted: Sun Nov 21, 2004 5:03 am    Post subject: Reply with quote

I'm thinking you made the /usr/lib/apache2, which resulted in your error message.
The way I resolved the same issue is:
Code:
mkdir /var/log/apache2 && chown apache /var/log/apache2


HTH
_________________
Me, myself and I are fighting ... now none of US are speaking..
Back to top
View user's profile Send private message
lramos85
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jun 2004
Posts: 141
Location: Riverside, Ca

PostPosted: Sun Dec 12, 2004 4:29 am    Post subject: Reply with quote

I get an error when starting apache (apache -k start). Something about error opening log file, I don't know exactly because i'm not in my linux box, but I'll post the exact error later.
_________________
Registered Linux User #328996
Register Now!
Adpot an unanswered post today!
Back to top
View user's profile Send private message
lramos85
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jun 2004
Posts: 141
Location: Riverside, Ca

PostPosted: Sun Dec 12, 2004 5:14 am    Post subject: Reply with quote

I just created the file it was looking for manually and it now works, thanks.
_________________
Registered Linux User #328996
Register Now!
Adpot an unanswered post today!
Back to top
View user's profile Send private message
plonka2000
Apprentice
Apprentice


Joined: 02 Dec 2004
Posts: 160
Location: UK, Surrey

PostPosted: Tue Dec 14, 2004 12:50 am    Post subject: Reply with quote

Can someone PLEASE help me?

Here is the history:

I emerged apache using this command:
Code:
emerge apache mod_php mod_mp3 php mysql phpmyadmin php-cgi


First I was having trouble starting Apache, getting this error:
Code:
bash-2.05b# apache2 -k start
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(2)No such file or directory: apache2: could not open error log file /usr/lib/apache2/logs/error_log.
Unable to open logs


Then I had some progress...
I've backtracked what its referring to and I've found that /usr/lib/apache2/logs is actually some kind of symlink to the /var/log/apache2 folder.
This folder did not exist though, so I created it and it helped somewhat.
Then I just got this error:
Code:
bash-2.05b# apache2 -k start
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName


Then more progress:
Edited /etc/apache2/conf/apache2.conf and uncommented the line for ServerName. Now I dont get an error message, however, my server does not seem to be working as I cant access it from outside.

Can someone please assist?

Thanks.

K.

EDIT: Here is a dump from my file:/var/log/apache2/error_log file:
Code:
[Tue Dec 14 00:55:27 2004] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "libby"
Configuration Failed


I have a feeling it has something to do with my hostname as thats what 'libby' is...
_________________
-Do not be afraid of what is different.
-Do not be afraid of being different.
-After all, ignorance is not an excuse.

Using Gentoo and Windows XPee.

Check my site here
Back to top
View user's profile Send private message
plonka2000
Apprentice
Apprentice


Joined: 02 Dec 2004
Posts: 160
Location: UK, Surrey

PostPosted: Tue Dec 14, 2004 1:19 am    Post subject: Reply with quote

I tried restarting the PC as well. I now get this error during startup:
Code:
*Bringing up eth0 via DHCP...                   [!!]
*ERROR: Problem starting needed services.
*       "netmount" was not started.
*ERROR: Problem starting needed services.
*       "apache2" was not started.


I'm assuming this is to do with apache2 since I was not getting the 'netmount' error before now.

I'm really stuck now.
_________________
-Do not be afraid of what is different.
-Do not be afraid of being different.
-After all, ignorance is not an excuse.

Using Gentoo and Windows XPee.

Check my site here
Back to top
View user's profile Send private message
skerb1
n00b
n00b


Joined: 14 Dec 2004
Posts: 24

PostPosted: Tue Dec 14, 2004 4:19 am    Post subject: SSL? Reply with quote

Does anyone have an idea on how to make the http and https servers point to separate documentroots??

In my apache2.conf file I have:
DocumentRoot /var/www/localhost/htdocs

In my 41_mod_ssl.default-vhost.conf file I have:
DocumentRoot "/var/www/localhost/sslhtdocs"

Both directories exist ane are owned by root and in group root. The two directories have perms 755. The files in each of the directories are owned by root and in group root as well. The perms on the files are all 644. Thus there should be no permissions problems. However when I start the server and browse to https://127.0.0.1/index.html (which definitely exists with perms described above) I get the following error:
Forbidden
You don't have permission to access /index.html on this server.
Apache/2.0.52 (Gentoo/Linux) mod_ssl/2.0.52 OpenSSL/0.9.7d DAV/2 PHP/4.3.9 Server at 127.0.0.1 Port 443

This makes no sense to me since it seems from the config files everything is cool. I reset the https documentroot to:
DocumentRoot /var/www/localhost/htdocs
and then it works when I go to https://127.0.0.1/index.html

However I want the insecure http server to serve different items then the https server.
Does anyone know what might be going on with my apache2.conf or my 41_mod_ssl.default-vhost.conf files?
Thanks...
Back to top
View user's profile Send private message
plutek
n00b
n00b


Joined: 04 Oct 2004
Posts: 37
Location: Ontario, Canada

PostPosted: Thu Dec 16, 2004 6:55 pm    Post subject: Reply with quote

greetings!

after having followed the howto in this thread, i was getting an error when trying to start apache, saying:
Code:
(20)Not a directory: apache2: could not open error log file /usr/lib/apache2/logs/error_log.
Unable to open logs

it seems the installation did not create the log dir.
after doing:
Code:
mkdir /var/log/apache2

apache starts successfuly.

hth somebody.

-p
Back to top
View user's profile Send private message
To
Veteran
Veteran


Joined: 12 Apr 2003
Posts: 1145
Location: Coimbra, Portugal

PostPosted: Thu Dec 16, 2004 7:22 pm    Post subject: Reply with quote

Don't forget to chown the dir /var/log/apache2 to apache.


_________________

------------------------------------------------
Linux Gandalf 3.2.35-grsec
Gentoo Base System version 2.2
------------------------------------------------
Back to top
View user's profile Send private message
plutek
n00b
n00b


Joined: 04 Oct 2004
Posts: 37
Location: Ontario, Canada

PostPosted: Thu Dec 16, 2004 7:28 pm    Post subject: Reply with quote

To wrote:
Don't forget to chown the dir /var/log/apache2 to apache.


thanks.... forgot about that!

-p
Back to top
View user's profile Send private message
Azerix
Guru
Guru


Joined: 19 Dec 2004
Posts: 346
Location: NL

PostPosted: Tue Dec 21, 2004 11:11 pm    Post subject: Reply with quote

I kan´t start apache2
When i rebootmy gentoo i get this error
Quote:

*ERROR: "/etc/init.d/apache2" has syntax errors in it; not executing....

Kan any one help me?
when stop apache2 i get this message
Quote:

httpd (no pid file) not running
Back to top
View user's profile Send private message
cmaurand
n00b
n00b


Joined: 21 Dec 2004
Posts: 42
Location: Biddeford, ME

PostPosted: Wed Dec 22, 2004 4:03 am    Post subject: mod_ssl wants apache-1.3 Reply with quote

I read all of the instructions, but I've run into a problem. I've used ufed to set everything to apache2, but every time I run emerge -p mod_ssl or mod_perl or some such module, Apache-1.3 shows up in the install list even thought Apache 2.0.nn is installed. Any help here would be good. I installed PHP with mysql support and it works fine and its loading as a module.


Thanks in advance,

Curtis Maurand
Back to top
View user's profile Send private message
cleaner
n00b
n00b


Joined: 10 May 2004
Posts: 16
Location: 127.0.0.1

PostPosted: Wed Dec 22, 2004 7:00 am    Post subject: mod_ssl wants apache-1.3 Reply with quote

Maybe you should do something like this:

USE="apache2" emerge -p mod_ssl
Back to top
View user's profile Send private message
cmaurand
n00b
n00b


Joined: 21 Dec 2004
Posts: 42
Location: Biddeford, ME

PostPosted: Wed Dec 22, 2004 1:57 pm    Post subject: mod_ssl wants apache-1.3 Reply with quote

Here is what I get when I do that. Its also set in make.conf and doesn't seem to make any difference.

orion # USE="apache2" emerge -p mod_ssl

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild NS ] net-www/apache-1.3.32-r1
[ebuild N ] net-www/mod_ssl-2.8.21
_________________
Curtis
Back to top
View user's profile Send private message
cleaner
n00b
n00b


Joined: 10 May 2004
Posts: 16
Location: 127.0.0.1

PostPosted: Wed Dec 22, 2004 2:36 pm    Post subject: mod_ssl wants apache-1.3 Reply with quote

mmm, what USE flags are mentioned in your make.conf?
Back to top
View user's profile Send private message
cmaurand
n00b
n00b


Joined: 21 Dec 2004
Posts: 42
Location: Biddeford, ME

PostPosted: Wed Dec 22, 2004 3:02 pm    Post subject: mod_ssl wants apache-1.3 Reply with quote

I have

USE="-* phpapache2 clamav innodb php"
_________________
Curtis
Back to top
View user's profile Send private message
ratsche
n00b
n00b


Joined: 19 May 2004
Posts: 64
Location: frankfurt/germany

PostPosted: Sat Sep 17, 2005 9:06 am    Post subject: Reply with quote

this works fine for me.

nice work ...really easy installation ;)

greetz,
ratsche
Back to top
View user's profile Send private message
German3D
Guru
Guru


Joined: 30 Nov 2004
Posts: 446
Location: ../madrid/mostoles

PostPosted: Sun Sep 25, 2005 1:34 am    Post subject: Reply with quote

Hi , i need help :\
I cant runing apache , and i dont understand why
Code:
servidor ~ # /etc/init.d/apache2 start
 * Starting apache2 ...
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
no listening sockets available, shutting down
Unable to open logs

Change 98756 times ServerName ... but dont work :(
Tnx in advance
_________________
A mi lo que mas me gusta , es el espiritu linux :) ...
No leais esto!
El único problema de Gentoo es , que provoca adicción :\
Back to top
View user's profile Send private message
German3D
Guru
Guru


Joined: 30 Nov 2004
Posts: 446
Location: ../madrid/mostoles

PostPosted: Sun Sep 25, 2005 9:38 pm    Post subject: Reply with quote

ok now only give me this error
Code:
servidor conf # apache2 -k start
no listening sockets available, shutting down
Unable to open logs

:roll: :roll: :roll:
_________________
A mi lo que mas me gusta , es el espiritu linux :) ...
No leais esto!
El único problema de Gentoo es , que provoca adicción :\
Back to top
View user's profile Send private message
theProphecy
n00b
n00b


Joined: 29 Oct 2003
Posts: 50
Location: Denmark, Århus-->Åbyhøj

PostPosted: Fri Dec 09, 2005 1:25 am    Post subject: Updated! Reply with quote

Hi all...

Seems there has been some activity on this subject, so I figured I would update the tutorial to focus on Apache 2.x with PHP 5.x, but still including the old tutorial. Hope this new updated tutorial might help a few more people. :)
_________________
Michael Dahl
theprophecy software
innovations make the future
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Fri Dec 09, 2005 10:59 pm    Post subject: Awesome HowTo! Thanks so much! very thurough and helpful Reply with quote

Well, maybe all the pertinent info was available from the output of emerge ,but with the thousands of lines each emerge does it's pretty hard to pay attention to every single little colored asterick ; ). Thank you sooo much for making this easier on me. I am stoked to start learning PHP; my friends tell me there's lots of money there and i think some of it ought to be mine ; ).

BTW, according to my computer, The php apache module emerge and the command-line php emerge conflict with the dev-lang/php emerge . I don't know why that would be but whatever. Maybe that'll help someone or something. And FYI everybody this howto is still completely relevent.

Thanks again, you rock!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 5 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum