Activating the CC (C compiler) on my UNIX terminal

[Belaran:~] belaran% sudo apachectl restart
Password:
/usr/sbin/apachectl restart: httpd restarted

at this point i was enthousiast !

[Belaran:~] belaran% apachectl graceful
/usr/sbin/apachectl graceful: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users
Processing config file: /private/etc/httpd/users/belaran.conf
fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl graceful: httpd could not be started
[Belaran:~] belaran%

now i want to cry...
 
Err, you wouldn't need to do apachectl graceful after the first command, it would get it up and running. Try doing ps -auxc and look for httpd. If you're using the default httpd.conf file, you should see three of them in the output. That lets you know it's up and running. If you see that, you don't need to try it again ;)
 
i found three entry :

www 460 0.0 0.3 15472 632 ?? S 3:34PM 0:00.02 httpd
www 396 0.0 0.3 15988 640 ?? S 3:24PM 0:00.10 httpd
root 394 0.0 0.6 15472 1232 ?? Ss 3:24PM 0:00.22 httpd

HTTPD seems to be running, so normally i should be able to run a .php file no ?
 
In httpd.conf , i "uncommented" those lines:

LoadModule php4_module
LoadModule hfs_apple_module
AddModule mod_php4.c
AddModule mod_hfs_apple.c

Anyway, i can access to some of my file as there was a webpage ( i can type http://127.0.0.1/~belaran/myfile.html ) but "php page" still aren't working.

I believed that apachectl graceful was a command that simply ask the apache server "are you there ?" and "how are you ?" or DarkShadows seems to imply that it's not the case. Do you know a command that follow my initial idea ?
 
No, apachectl graceful does (according to apachectl) "a graceful restart by sending a SIGUSR1 or start if not running"

And since you weren't root, it was trying to start with the permissions your user has, so it wasn't restarting...actually it probably never stopped apache, since you would've needed to be root to do that.

As to why the php pages aren't running...you need to add this into the httpd.conf file as well:

Under <IfModule mod_mime.c>:
AddType application/x-httpd-php .php

After you do that, you'll need to restart apache again (sudo apachectl restart)

That let's the server know that .php files are to be run as PHP.
 
Thanks a lot, now i get it through. from the beginning i tried to restart or to start httpd with my user rights and not my "root" rights, so i was denied see access by the system.
My Apche server is (and always been) working just fine ! ... even with the mess i've been doing try to fix it ! °)

But now i go to case "departure" of my initial problem. all my pages .php are not " reconized " wich basicly means that all the stuff include between "<?php" and "?>" is ignored by all my browser (camino & explorer) !

It's not my apache server and i believe i've done all the proper modifications on my httpd.conf (see previous entry), my page are all labelled .php, what could going wrong ?
 
Yes i did it to , no problem there....


But i've some news !

It's seems that my explorers can't read any of my file "as localhost" 'cause :

Forbidden
You don't have permission to access /~belaran/CD_Romain/index.html on this server.

------------------------------------------------------------------------
Apache/1.3.27 Server at belaran.local Port 80


Maybe i forgot some configurations but i don't wich one ! I know for a fact that my "Web Sharing" is started and that the only thing i know which could create such a problem ( by being turned off, of course)...

 
Back
Top