Internal server Error - what should i do?

Status
Not open for further replies.

aiplvt

New Member
Messages
8
Reaction score
0
Points
0
Webmaster,


Iam getting the following error while accessing my stoli server.How do i go about solving it .


Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@aiplvt.x10hosting.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 mod_mono/2.4 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at aiplvt.x10hosting.com Port 80
 

Elesarr

New Member
Messages
193
Reaction score
3
Points
0
Webmaster,


Iam getting the following error while accessing my stoli server.How do i go about solving it .


Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@aiplvt.x10hosting.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 mod_mono/2.4 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at aiplvt.x10hosting.com Port 80

How were you accessing the Stoli server?

your cPanel?
your web site?

can you provide a link to your site so we can see if this error is occuring for other people as well who visit?

a 500 error can occur for many reasons including a page with bad code.

more info please ;)
 

zen-r

Active Member
Messages
1,937
Reaction score
3
Points
38
How were you accessing the Stoli server?

your cPanel?
your web site?

can you provide a link to your site so we can see if this error is occuring for other people as well who visit?

a 500 error can occur for many reasons including a page with bad code.

more info please ;)

Well, given thats he's stated an email address for his site, I'll takes a wild guess & say his site is www.aiplvt.x10hosting.com ! ;)

I get the same "404 Not Found" error if I try to load this web page. It also says "500 - Internal server error".

As Elesarr said, please give us your site name, it is even possible that you have mis-typed it.

Did your site used to work correctly? Can you log in to your cPanel & Account Panel? What does it say there for your site name?

There are a number of things which could be causing this, either by your error, or because of a corruption caused by the server upgrade work that is going on.
 
Last edited:

aiplvt

New Member
Messages
8
Reaction score
0
Points
0
Main Domain aiplvt.x10hosting.com
I can log into my cpanel url

Edit:
your account is currently in good standing
Hosting Type -Ad-Free

Email Address -xxxxxxxxx

Account ID -xxxxxxxxxx

Username - xxxxx

Domain -aiplvt.x10hosting.com

Server -Stoli.x10

Creation Date -7:29am thu, jun 11 2009

Package -adfree-adfree

Advertisement -Not Required

Disk Space -500M allotted

Bandwidth -0M allotted

PHP Version -5.2.8 Version 1 - Basic

http://stoli.x10hosting.com:2082

code

<?

// set some variables
$host = "69.162.76.170";

// don't timeout!
set_time_limit(0);

// create socket
$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create
socket\n");

// bind socket to port
$result = socket_bind($socket, $host, 0);

socket_getsockname($socket, $host, $socket_port);
echo "Success";
echo $socket_port;

// start listening for connections
$result = socket_listen($socket, 5) or die("Could not set up socket
listener\n");

// accept incoming connections
// spawn another socket to handle communication
$spawn = socket_accept($socket) or die("Could not accept incoming
connection\n");

// read client input
$input = socket_read($spawn, 1024) or die("Could not read input\n");

echo $input;

// clean up input string
$input = trim($input);

echo $input;

// reverse client input and send back
$output = strrev($input) . "\n";
socket_write($spawn, $output, strlen ($output)) or die("Could not write
output\n");

echo $output;

// close sockets
socket_close($spawn);
socket_close($socket);
?>

Error log

[24-Jun-2009 01:09:27] PHP Warning: socket_accept() [<a href='function.socket-accept'>function.socket-accept</a>]: unable to accept incoming connection [4]: Interrupted system call in /home/aiplvt/public_html/index.php on line 26
[24-Jun-2009 01:10:02] PHP Warning: socket_accept() [<a href='function.socket-accept'>function.socket-accept</a>]: unable to accept incoming connection [4]: Interrupted system call in /home/aiplvt/public_html/index.php on line 26
[24-Jun-2009 01:20:31] PHP Warning: socket_accept() [<a href='function.socket-accept'>function.socket-accept</a>]: unable to accept incoming connection [4]: Interrupted system call in /home/aiplvt/public_html/index.php on line 26
 
Last edited:

zen-r

Active Member
Messages
1,937
Reaction score
3
Points
38
Well, your cPanel info looks OK.

But I'll leave it to someone else here to check & advise you on your site's content, & whether that is the problem. Certainly your error log looks suspicious.

If everything else checks out OK, you'll need to get a Support ticket so they can fix it for you. Be prepared to wait, though, because they have a large backlog of tickets at the moment because of all the server upgrade work. :)
 
Last edited:

Elesarr

New Member
Messages
193
Reaction score
3
Points
0
Main Domain aiplvt.x10hosting.com
I can log into my cpanel url

Edit:
your account is currently in good standing
Hosting Type -Ad-Free

Email Address -xxxxxxxxx

Account ID -xxxxxxxxxx

Username - xxxxx

Domain -aiplvt.x10hosting.com

Server -Stoli.x10

Creation Date -7:29am thu, jun 11 2009

Package -adfree-adfree

Advertisement -Not Required

Disk Space -500M allotted

Bandwidth -0M allotted

PHP Version -5.2.8 Version 1 - Basic

http://stoli.x10hosting.com:2082

code

<?

// set some variables
$host = "69.162.76.170";

// don't timeout!
set_time_limit(0);

// create socket
$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create
socket\n");

// bind socket to port
$result = socket_bind($socket, $host, 0);

socket_getsockname($socket, $host, $socket_port);
echo "Success";
echo $socket_port;

// start listening for connections
$result = socket_listen($socket, 5) or die("Could not set up socket
listener\n");

// accept incoming connections
// spawn another socket to handle communication
$spawn = socket_accept($socket) or die("Could not accept incoming
connection\n");

// read client input
$input = socket_read($spawn, 1024) or die("Could not read input\n");

echo $input;

// clean up input string
$input = trim($input);

echo $input;

// reverse client input and send back
$output = strrev($input) . "\n";
socket_write($spawn, $output, strlen ($output)) or die("Could not write
output\n");

echo $output;

// close sockets
socket_close($spawn);
socket_close($socket);
?>

Error log

[24-Jun-2009 01:09:27] PHP Warning: socket_accept() [<a href='function.socket-accept'>function.socket-accept</a>]: unable to accept incoming connection [4]: Interrupted system call in /home/aiplvt/public_html/index.php on line 26
[24-Jun-2009 01:10:02] PHP Warning: socket_accept() [<a href='function.socket-accept'>function.socket-accept</a>]: unable to accept incoming connection [4]: Interrupted system call in /home/aiplvt/public_html/index.php on line 26
[24-Jun-2009 01:20:31] PHP Warning: socket_accept() [<a href='function.socket-accept'>function.socket-accept</a>]: unable to accept incoming connection [4]: Interrupted system call in /home/aiplvt/public_html/index.php on line 26

Whatever you have defined for your var $socket in the code below, the PHP settings/server settings do not like.

// accept incoming connections
// spawn another socket to handle communication
$spawn = socket_accept($socket) or die("Could not accept incoming
connection\n");

The error is quite clear and hence why you cannot access your page:

[24-Jun-2009 01:20:31] PHP Warning: socket_accept() [<a href='function.socket-accept'>function.socket-accept</a>]: unable to accept incoming connection [4]: Interrupted system call in /home/aiplvt/public_html/index.php on line 26

This is not a fault of x10Hosting but rather something in your coding, unless whatever sockets you are trying to allow access to may be blocked by x10 in which case there is not much you can do.


BTW, this is "intelligent" guess work on my part as I really don't know what the purpose of your script is ;)
 
Last edited:

aiplvt

New Member
Messages
8
Reaction score
0
Points
0
To be honest this code was working for 2 days after my signup to x10hosting but then after the server up gradation begun its not working. Could be because x10hosting blocked socket_accept(). anyways i don't have any options other than just to wait and see....
 

zen-r

Active Member
Messages
1,937
Reaction score
3
Points
38
Unless the code has become corrupted, & you need to reinstall/ restore it from a back-up?
 

aiplvt

New Member
Messages
8
Reaction score
0
Points
0
The code is not complex and the corruption is not possible. I would like to know if someone in x10hosting just like me have been successful in using socket_accept() in their script ? I would appreciate if there are any php guru's who can provide solution .
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
socket_accept is most likely disabled to prevent abuse. Unless you're on a VM, your site is not supposed to run anything that has high resource utilization, which includes services. Considering that a PHP script would bind a port every time the page loads, the potential for abuse, whether intentional or unintentional, is staggering.

Why did you write the script? Always state the overall goal, not just the problematic step, so that potential aides can suggest another way of achieving the goal when the step is untenable. If you wrote the script to learn socket programming, you should test it on your own personal computer. Furthermore, if you want to learn socket programming, C, Perl and Python are better suited to the task than PHP.
 

aiplvt

New Member
Messages
8
Reaction score
0
Points
0
Its definitely not for learning purpose . the intention is to make use of the web server to monitor the remotely running vehicles gps datas and speed . The vehicle connects to the server through GPRS. If you have got any other solution do let me know.
 
Status
Not open for further replies.
Top