![]() |
Turning on Personal Web Sharing..!!!
I am trying to get PHP and Apache to work with one another, I am going through a tutorial and it says to turn on the 'Personal Web Sharing' in the system preferences, however when i go to turn it on I click 'Start' and it just doesnt start, it sort of tries to and just consistntly says 'Web sharing is starting up' it never does Start up.
Does anybody know whats up, and why its not working? And how to get roung it? Any help would be greatly apprectiate. AjAy |
Open the Terminal and type sudo apachectl configtest, then enter your admin password when prompted. This will run a test on the config file, and report back any errors.
Copy and paste any interesting output back here... -rob. |
Cheers Rob,
Here is the feedback: "Last login: Fri Nov 5 23:46:11 on ttyp1 Welcome to Darwin! Aarrons-Computer:~ Aarron$ sudo apachectl configtest Syntax error on line 1 of /etc/httpd/httpd.conf: Invalid command '^W', perhaps mis-spelled or defined by a module not included in the server configuration Aarrons-Computer:~ Aarron$" i have just got my Mac and need to do an assignment with PHP for Uni. Thanks for you help. Aarron |
I just did that again and it returned:
Last login: Fri Nov 5 23:46:41 on ttyp1 Welcome to Darwin! Aarrons-Computer:~ Aarron$ Last login: Fri Nov 5 23:46:11 on ttyp1 Welcome to Darwin! Aarrons-Computer:~ Aarron$ sudo apachectl configtest Syntax error on line 1 of /etc/httpd/httpd.conf: Invalid command '^W', perhaps mis-spelled or defined by a module not included in the server configuration Aarrons-Computer:~ Aarron$ Aarron ttyp1 Fri Nov 5 23:52 still logged in Aarron ttyp1 Fri Nov 5 23:52 - 23:52 (00:00) Aarron ttyp1 Fri Nov 5 23:46 - 23:52 (00:06) Aarron ttyp1 Fri Nov 5 23:46 - 23:46 (00:00) Aarron ttyp1 Fri Nov 5 23:46 - 23:46 (00:00) Aarron ttyp1 Fri Nov 5 23:46 - 23:46 (00:00) Aarron ttyp1 Fri Nov 5 23:34 - 23:46 (00:12) Aarron ttyp1 Fri Nov 5 23:34 - 23:34 (00:00) Aarron ttyp1 Tue Nov 2 19:25 - 23:34 (3+04:08) Aarron ttyp1 Tue Nov 2 19:25 - 19:25 (00:00) Aarron ttyp1 Tue Nov 2 18:22 - 19:25 (01:02) Aarron ttyp1 Tue Nov 2 18:22 - 18:22 (00:00) Aarron ttyp1 Tue Nov 2 18:21 - 18:22 (00:01) Aarron ttyp1 Tue Nov 2 18:21 - 18:21 (00:00) Aarron ttyp1 Tue Nov 2 18:20 - 18:21 (00:00) Aarron ttyp1 Tue Nov 2 18:20 - 18:20 (00:00) Aarron ttyp1 Tue Nov 2 18:13 - 18:20 (00:07) Aarron ttyp1 Tue Nov 2 18:13 - 18:13 (00:00) wtmp begins Mon Nov 1 23:10 Aarrons-Computer:~ Aarron$ Welcome to Darwin! -bash: Welcome: command not found Aarrons-Computer:~ Aarron$ Aarrons-Computer:~ Aarron$ sudo apachectl configtest -bash: Aarrons-Computer:~: command not found Aarrons-Computer:~ Aarron$ Syntax error on line 1 of /etc/httpd/httpd.conf: -bash: Syntax: command not found Aarrons-Computer:~ Aarron$ Invalid command '^W', perhaps mis-spelled or defined by a module not included in the server configuration -bash: Invalid: command not found Aarrons-Computer:~ Aarron$ Aarrons-Computer:~ Aarron$ -bash: Aarrons-Computer:~: command not found Aarrons-Computer:~ Aarron$ Does this make sense to you? AjAy |
You need to open /etc -> httpd -> httpd.conf in a text editor in the Terminal (such as vi, pico [easiest for newcomers], or emacs), with root permissions:
$ cd /etc/httpd $ sudo pico httpd.conf Apparently the very first line has a Control-W at the end of it. Hopefully you can see it in pico; I'm not sure if you will or won't. If you can, delete it. If not, we'll have to try something else (but try this first :) ). -rob. |
Yey...
That worked, i now know Apache is working, however it does not recognise the php file when I open it, any idea's on that? All I need now is PHP working, your a star mate. Aarron |
You have to enable it in that same file; instructions for doing so in 10.3 are on the main site:
Enable the built-in PHP module -rob. |
I have entered all of that into the httpd document, but it still doesnt work.
Where do I put the web pages, is there an exact root that Apache wants them in? Cheers Aarron |
/Library/WebServer/Documents or in your user's Sites folder. The first can be reached at http://127.0.0.1, the second at http://127.0.0.1/~username
Make sure you restart the webserver after making the PHP changes. -rob. |
Yeah the first link works fine, the second one doesnt...
Here is what I now have in the httpd document: #LoadModule ssl_module libexec/httpd/libssl.so #LoadModule perl_module libexec/httpd/libperl.so LoadModule php4_module libexec/httpd/libphp4.so AddModule mod_php4.c AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps i have added thos few lines of code, still doesnt work..I have also restarted Web Sharing, any ideas? Aarron |
TUrning on Personal Web Sharing
im trying to turn it on but hapend the same, it dont work, i open the terminal and type sudo apachectl configtest,
and this is what is says: Processing config directory: /private/etc/httpd/users/*.conf Processing config file: /private/etc/httpd/users/albertep.conf Syntax OK i dont know what to do, i run permitions fix, resintall 10.3.6, but nothing.... |
Quote:
What happens when you click on the Start button in the Personal Web sharing section of Sharing preferences? |
startingup....
|
Quote:
Launch the "Console" application (under the Utilities folder) and look for relevant error messages. Click the Logs button (top left) and go into the /var/log section and then the httpd section. Look at the logs there. Show us relevant error messages. |
ok, yes stay that way forever, i chek the console and there is a lot of error, but i dont what to do
[crit] (48)Address already in use: make_sock: could not bind to port 80 that is one that apear much... [Sun Nov 7 18:05:30 2004] [warn] mod_rendezvous_apple: Skipping user 'albertep' - cannot read index file '/Users/albertep/Sites/index.html'. Processing config directory: /private/etc/httpd/users/*.conf Processing config file: /private/etc/httpd/users/albertep.conf [Sun Nov 7 18:05:30 2004] [crit] (48)Address already in use: make_sock: could not bind to port 80 |
the one that refers to the index.html, i already corrected, but it seems that the error that dont let me turn on personal web sharing is this one
Sun Nov 7 18:05:30 2004] [crit] (48)Address already in use: make_sock: could not bind to port 80 any help with that? |
Quote:
Did you by any chance install a startup item to start Apache? If so, you should uninstall that. Restart your Mac and then try again. |
thanks was the quicktime streaming server,
good nigth |
Turning on Personal Web Sharing..!!!
I am unable to turn on web sharing. The following error message appears:
[NGLG4:~] northerngifts% sudo /usr/sbin/apachectl start Password: Syntax error on line 263 of /etc/httpd/httpd.conf: Cannot add module via name 'mod_alias.c': not in list of loaded modules /usr/sbin/apachectl start: httpd could not be started [NGLG4:~] northerngifts% I don't know how to fix this. I would really appreciate help. Thank you, mag74 |
Quote:
|
Thanks for your prompt reply... ergh - I thought I must have caused this & I haven't saved it so I will have to get my install cd/dvd. I will do this tomorrow when I get back into work - Thanks!!
|
Same message, Web sharing starting up
I had web sharing working and now it isn't (unfortunately it is usually a few weeks between my newbie hobbyist efforts at this so I forget what I've done).
Now I get the web sharing starting up message that hangs. The appachectl start and config test (thanks for those) returns: [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName Then I tried to start and stop and got: Code:
whitecomputer:~ danielalbert$ sudo apachectl start |
| All times are GMT -5. The time now is 08:36 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.