• 5
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

enter image description here
In the above picture is my console output which occurs when I run

sudo /usr/sbin/apachectl restart

the console doesn't have any messages of syntax errors or anything when I manually start and stop apache. So how do I debug this?

EDIT: list of things using ports

$ sudo lsof -i:80
Password:
COMMAND PID USER   FD   TYPE      DEVICE SIZE/OFF NODE NAME
httpd   734 root    5u  IPv6 0xf..0      0t0  TCP *:http (LISTEN)
httpd   736 _www    5u  IPv6 0xf..0      0t0  TCP *:http (LISTEN)
httpd   774 root    4u  IPv4 0xf..0      0t0  TCP *:http (LISTEN)
httpd   777 _www    4u  IPv4 0xf..0      0t0  TCP *:http (LISTEN)
httpd   822 _www    4u  IPv4 0xf..0      0t0  TCP *:http (LISTEN)

it's the exact some for -i:443, too. Why are there so many httpds? shouldn't there just be the one? (for each IP version, i guess)

when browsing to my server's IP address in (Your favorite web browser), It just says Internal Server Error.

And then the console on the server says "nstat_lookup_entry failed 2" =\

Obviously another program is already running on your MAC. Best guess would be Skype if you do not have any other server installed. It used to use those two ports.

Maybe easier - try this at the terminal as well to see what is listening:

sudo lsof -n -i4TCP:80 | grep LISTEN
  • 0
Reply Report

From your screenshot it seems the failing operation is trying to bind to the IPv6 equivalent of 0.0.0.0, i.e. [::]. It also seems that binding to the IPv4 "address" 0.0.0.0 succeeds. So after starting your Rails app check the output of netstat -64tulpen (or the appropriate equivalent on OS X) and see if it really isn't listening on the desired ports. Also try to find out what is using IPv6, bound to [::]:80 and [::]:443, and why.

  • 0
Reply Report

Trending Tags