www.webdeveloper.com
Results 1 to 6 of 6

Thread: Localhost issue

Hybrid View

  1. #1
    Join Date
    Mar 2005
    Posts
    262

    Localhost issue

    Hi and a Happy New Year,
    I have a issue with my local development platform, which isn't running at the moment, for some reason unbe-known to me.

    My development platform is as follows:
    Apache HTTP Server Version 2.2
    mysql-5.0.51b-osx10.5-x86_64
    I believe I'm running PHP 5.2.4 for Apache 2
    Optimizer-3.3.3

    I have a few questions:

    1. I'm not sure if I'm running a 32bit or 64bit or 84bit machine.

    I'm running a MacBook Pro Build 9G55 OS X Leopard on 2.5GHz Intel Core 2 Duo.

    2. For some reason when I load up localhost it gives me a Page Load Error: like attachment 1 depicts. But when I look in systems prefs > network it shows what attachment2 depicts, which it is on. Mysql is running, I can see this from the system prefs again. But I can't seem to use the command line and I'm not sure how to change the .bash file so I can run command lines anywhere in the terminal.

    I can't seem to get any errors to display to tell me what is going on can anyone please help it is driving me nuts.

    Thank you
    regards solidariti
    Attached Images Attached Images

  2. #2
    Join Date
    Jun 2003
    Location
    here
    Posts
    4,551
    Quote Originally Posted by solidariti View Post
    Hi and a Happy New Year,
    I have a issue with my local development platform, which isn't running at the moment, for some reason unbe-known to me.

    My development platform is as follows:
    Apache HTTP Server Version 2.2
    mysql-5.0.51b-osx10.5-x86_64
    I believe I'm running PHP 5.2.4 for Apache 2
    Optimizer-3.3.3

    I have a few questions:

    1. I'm not sure if I'm running a 32bit or 64bit or 84bit machine.

    I'm running a MacBook Pro Build 9G55 OS X Leopard on 2.5GHz Intel Core 2 Duo.
    You answered that yourself, x86 is 32 bit.
    2. For some reason when I load up localhost it gives me a Page Load Error: like attachment 1 depicts. But when I look in systems prefs > network it shows what attachment2 depicts, which it is on. Mysql is running, I can see this from the system prefs again. But I can't seem to use the command line and I'm not sure how to change the .bash file so I can run command lines anywhere in the terminal.

    I can't seem to get any errors to display to tell me what is going on can anyone please help it is driving me nuts.

    Thank you
    regards solidariti
    I've got a few things to try, first try a few different things instead, http://127.0.0.1 or your IP(Which I recommend you edit out of the image). If that solves the problem you should edit conf.d/fqdn in whatever folder apache is installed to, and just add the line
    Code:
    ServerName localhost
    Which should fix your problem after you restart the web server.

    If they don't work you could try netscan on yourself, or using a good firewall to see what ports are open. Might be the case that apache is not using the default port of 80, which is causing your problem. This can be edited using the main apache.conf file if it is the problem.
    If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
    The same applies to HTML and the forums [HTML][/HTML] tags.

  3. #3
    Join Date
    Mar 2005
    Posts
    262
    Quote Originally Posted by scragar View Post
    You answered that yourself, x86 is 32 bit.

    If they don't work you could try netscan on yourself, or using a good firewall to see what ports are open. Might be the case that apache is not using the default port of 80, which is causing your problem. This can be edited using the main apache.conf file if it is the problem.
    Using http://127.0.0.1 didn't work neither did using my ip address. It came up with the same screen.

    when I do sudo apachectl restart nothing happens.
    When I do sudo apachectl status this happens
    /usr/sbin/apachectl: line 106: lynx: command not found

    Oh I have just recently installed Zenp Optimiser 3.3 and after it installed it said that it couldn't restart apache so I did it manually but nothing seemed to happen.

    I use virtual hosts, which I have checked and checked and aren't the issue.

    I'm not sure what netscan is or how to use it, could you ellaborate please.

    I'm using the Port Scan that is bundled in with the Network Utility in Leopard. Is there a way to do that on the command line.

    Thanks for the tip with the ip addresses.

  4. #4
    Join Date
    Mar 2005
    Posts
    262
    Why does apachectl give an error at 106 of the apachectl:

    PHP Code:
    case $ARGV in
    start
    )
        
    $LAUNCHCTL load -w $LAUNCHD_JOB
        ERROR
    =$?
        ;;
    stop|graceful-stop)
        
    $LAUNCHCTL unload -w $LAUNCHD_JOB
        ERROR
    =$?
        ;;
    restart|graceful)
        
    $LAUNCHCTL unload -w $LAUNCHD_JOB 2> /dev/null
        $LAUNCHCTL load 
    -w $LAUNCHD_JOB
        ERROR
    =$?
        ;;
    startssl|sslstart|start-SSL)
        echo 
    The startssl option is no longer supported.
        echo 
    Please edit httpd.conf to include the SSL configuration settings
        
    echo and then use "apachectl start".
        
    ERROR=2
        
    ;;
    configtest)
        
    $HTTPD -t
        ERROR
    =$?
        ;;
    status)
        
    $LYNX $STATUSURL awk ' /process$/ { print; exit } { print } '
        
    ;;
    fullstatus)
        
    $LYNX $STATUSURL
        
    ;;
    *)
        
    $HTTPD $ARGV
        ERROR
    =$?
    esac

    exit $ERROR 

  5. #5
    Join Date
    Jun 2003
    Location
    here
    Posts
    4,551
    Sorry, netscan is a windows version(complete with a rather buggy graphical interface) to Nmap, an open source and very powerful tool that scans ports and more(a lot more if you know how to use it).

    I have no idea how you can run mac programs from the command line, I know it shares the same ancestry as linux, but I doubt skills will be 100% cross transferable.

    I would install lynx if you can, it's not a very large program, and apache appears to want to use it to show you it's status(it's a very basic command line browser). You can either compile it yourself(recommended for geeks to want a slightly faster system) or just download the package from apple downloads.

    Personally, I'm a geek so I'd compile it, if you just want to use it though download the prebuilt package from apple, it won't be as customised to your system, so it may run slightly slower, but you shouldn't notice any slowness(since it's a very fast browser to begin with).
    If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
    The same applies to HTML and the forums [HTML][/HTML] tags.

  6. #6
    Join Date
    Mar 2005
    Posts
    262
    thank you for the quick reply and background information I found it very informative. I have downloaded and installed Linx. And when I do:

    sudo apachectl fullstatus
    Code:
    Not Found
    
       The requested URL /server-status was not found on this server.
    
       Additionally, a 404 Not Found error was encountered while trying to use
       an ErrorDocument to handle the request.
    Whats does that mean that it couldnt find the server status???

    Ok so it turned out to be the virtual host that I was using but, the thing is it is the same as all the other virtual hosts.

    Code:
    ############################################################################
    # Site:     Staging.site.com
    # Synopsis: site
    ############################################################################
    <VirtualHost *:80>
      ServerName staging.site.com
     # ServerAlias staging.site.com
      ServerAdmin james.apps@propono.co.uk
      ErrorLog "/private/var/log/apache2/staging.site.com-error_log"
      CustomLog "/private/var/log/apache2/staging.site.com-access_log"
    
      DocumentRoot /Users/winner/Sites/site.com
    # ScriptAlias /cgi-bin/ "/Library/WebServer/beta-site-1/cgi-bin"
      <Directory "/Users/winner/Sites/site.com">
       Options FollowSymLinks MultiViews Includes
       AllowOverride All
       Order allow,deny
       Allow from all
      </Directory>
    </VirtualHost>
    HOSTS FILE

    Code:
    127.0.0.1 staging.site.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles