Apache problems with personal web sharing

Posted:
in macOS edited January 2014
When i try to turn on personal web sharing in system prefs>sharing>services it will just say "starting up..." and it wont change. when i quit system prefs it turns off. I use Tiger with its installed Apache and PHP package. Help me, please...



I used another thread and followed their suggestion and typed 'sudo apachectl restart' in the terminal window.



This is what I got:



/usr/sbin/apachectl restart: httpd not running, trying to start

Processing config directory: /private/etc/httpd/users/*.conf

Processing config file: /private/etc/httpd/users/+entropy-php.conf

Processing config file: /private/etc/httpd/users/6to4.conf

Syntax error on line 5 of /private/etc/httpd/users/6to4.conf:

Invalid command '$in_if="";', perhaps mis-spelled or defined by a module not

included in the server configuration



Does anyone know what that means...thanks

Comments

  • Reply 1 of 7
    mdriftmeyermdriftmeyer Posts: 7,503member
    Quote:
    Originally Posted by cc1082 View Post


    When i try to turn on personal web sharing in system prefs>sharing>services it will just say "starting up..." and it wont change. when i quit system prefs it turns off. I use Tiger with its installed Apache and PHP package. Help me, please...



    I used another thread and followed their suggestion and typed 'sudo apachectl restart' in the terminal window.



    This is what I got:



    /usr/sbin/apachectl restart: httpd not running, trying to start

    Processing config directory: /private/etc/httpd/users/*.conf

    Processing config file: /private/etc/httpd/users/+entropy-php.conf

    Processing config file: /private/etc/httpd/users/6to4.conf

    Syntax error on line 5 of /private/etc/httpd/users/6to4.conf:

    Invalid command '$in_if="";', perhaps mis-spelled or defined by a module not

    included in the server configuration



    Does anyone know what that means...thanks



    I would consult this site for your PHP/Apache needs:



    http://www.entropy.ch/software/macosx/php/
  • Reply 2 of 7
    Quote:
    Originally Posted by mdriftmeyer View Post


    I would consult this site for your PHP/Apache needs:



    http://www.entropy.ch/software/macosx/php/



    Thanks for the hint. I know the Marc Liyanage website with the php5 entropy updates, but it did not help me before or now. I think my post topic might have been misleading: I think Apache is fine, I would say according to the error the problem might be in /private/etc/httpd/users/6to4.conf? But I don't know how to fix it.



    what should i do... thanks.
  • Reply 3 of 7
    MarvinMarvin Posts: 15,322moderator
    The .conf files are Apache settings files. You don't really need any except the entropy one. Is your OS X username 6to4? If not, just move the file out of there.



    You can do this by using the Finder's go menu and go to folder /private/etc/httpd/users/. Just drag the file to trash or somewhere else to backup and then move to trash. Open it first to see the entire contents.



    If you need to modify any of these files, drag the file somewhere and it will copy it by default because of the permissions. Modify it with Textedit, move the original to trash and put the modified one in its place entering your password when it asks.



    If your username is 6to4, the contents of 6to4.conf should be something like:



    <Directory "/Users/6to4/Sites/">

    Options Indexes MultiViews

    AllowOverride None

    Order allow,deny

    Allow from all

    </Directory>



    Your default server root is in /Library/webserver so you need to add support for your sites directory. You need to use some different settings to get .htaccess files working right.



    Once you've modified the file, turn off sharing and turn it on again to restart Apache.



    If you need to see the log files, open your Console app and drag the left side of the window, it shows a list of all your logs. The PHP error_log is in /var/logs/httpd/error_log. Can't remember if the Apache output goes into the console log.
  • Reply 4 of 7
    cc1082cc1082 Posts: 6member
    Quote:
    Originally Posted by Marvin View Post


    The .conf files are Apache settings files. You don't really need any except the entropy one. Is your OS X username 6to4? If not, just move the file out of there.



    You can do this by using the Finder's go menu and go to folder /private/etc/httpd/users/. Just drag the file to trash or somewhere else to backup and then move to trash. Open it first to see the entire contents.



    If you need to modify any of these files, drag the file somewhere and it will copy it by default because of the permissions. Modify it with Textedit, move the original to trash and put the modified one in its place entering your password when it asks.



    If your username is 6to4, the contents of 6to4.conf should be something like:



    <Directory "/Users/6to4/Sites/">

    Options Indexes MultiViews

    AllowOverride None

    Order allow,deny

    Allow from all

    </Directory>



    Your default server root is in /Library/webserver so you need to add support for your sites directory. You need to use some different settings to get .htaccess files working right.



    Once you've modified the file, turn off sharing and turn it on again to restart Apache.



    If you need to see the log files, open your Console app and drag the left side of the window, it shows a list of all your logs. The PHP error_log is in /var/logs/httpd/error_log. Can't remember if the Apache output goes into the console log.



    6to4 is a tunnel file.

    This is the content:





    # 6to4.conf

    # Configuration file for 6to4 tunnel

    #



    $in_if=""; # Inside (usually ethernet) interface -$



    $v6_net="1"; # 2002:x:x:v6_net::

    $v6_innernet="2"; # 2002:x:x:v6_innernet::

    $v6_prefixlen=16; # Change for more

    $hostbits6=":1"; # should be determined via MAC of $in_if



    # Possible remote 6to4 routers:

    # Anycast is default per RFC 3068, but can select another if desired



    $peer="6to4-anycast"; # RFC 3068 magic value

    #$peer="6to4.ipv6.fh-regensburg.de"; # Germany, Europe

    #$peer="asterix.ipv6.bt.com"; # Great Britain, Europe

    #$peer="6to4.kfu.com"; # USA, West coast

    #$peer="6to4.ipv6.microsoft.com"; # USA, West coast

    #$peer="ipv6-router.cisco.com"; # USA, West coast; register at$



    I guess its something with the ethernet at my work. I am still lost with this problem.



    BTW thanks so much for your help...
  • Reply 5 of 7
    cc1082cc1082 Posts: 6member
    Quote:
    Originally Posted by Marvin View Post


    The .conf files are Apache settings files. You don't really need any except the entropy one. Is your OS X username 6to4? If not, just move the file out of there.



    You can do this by using the Finder's go menu and go to folder /private/etc/httpd/users/. Just drag the file to trash or somewhere else to backup and then move to trash. Open it first to see the entire contents.



    If you need to modify any of these files, drag the file somewhere and it will copy it by default because of the permissions. Modify it with Textedit, move the original to trash and put the modified one in its place entering your password when it asks.



    If your username is 6to4, the contents of 6to4.conf should be something like:



    <Directory "/Users/6to4/Sites/">

    Options Indexes MultiViews

    AllowOverride None

    Order allow,deny

    Allow from all

    </Directory>



    Your default server root is in /Library/webserver so you need to add support for your sites directory. You need to use some different settings to get .htaccess files working right.



    Once you've modified the file, turn off sharing and turn it on again to restart Apache.



    If you need to see the log files, open your Console app and drag the left side of the window, it shows a list of all your logs. The PHP error_log is in /var/logs/httpd/error_log. Can't remember if the Apache output goes into the console log.



    Please disregard my last post. I was able to remove all the .conf files except for the username.conf and the entropy.conf. i ran te sudo apachectl restart again and got this error.



    /usr/sbin/apachectl restart: httpd not running, trying to start

    Processing config directory: /private/etc/httpd/users/*.conf

    Processing config file: /private/etc/httpd/users/+entropy-php.conf

    Processing config file: /private/etc/httpd/users/karenkelton.conf

    /usr/sbin/apachectl: line 194: 2027 Bus error $HTTPD

    /usr/sbin/apachectl restart: httpd could not be started



    Still appreciate your help...
  • Reply 6 of 7
    cc1082cc1082 Posts: 6member
    I figured it out...



    I found the answer in another forum.

    For others experiencing similar problems...



    ..comment out the following in your /etc/httpd/httpd.conf file.



    LoadModule php4_module libexec/httpd/libphp4.so

    and

    AddModule mod_php4.c



    I know it makes no sense because tutorials will tell you to uncomment those lines, but it worked for me.



    Thanks for all your help Marvin.



    Cheers...
  • Reply 7 of 7
    MarvinMarvin Posts: 15,322moderator
    Quote:
    Originally Posted by cc1082 View Post


    ..comment out the following in your /etc/httpd/httpd.conf file.



    LoadModule php4_module libexec/httpd/libphp4.so

    and

    AddModule mod_php4.c



    I know it makes no sense because tutorials will tell you to uncomment those lines, but it worked for me.



    You have to comment those out for the Entropy build of PHP. If you leave them uncommented, it tries to load the built-in OS X PHP (OS X comes bundled with it). The Entropy build is better because it includes the GD image library. Note, the Entropy build only interprets PHP files with the <?php ?> tags, it won't work with the shorthand <? ?> tags in case you notice your PHP coming through as plain text.
Sign In or Register to comment.