Dynadot โ€” .com Registration $8.99

Changed server to Fastcgi ..now get Internal Error

Spaceship Spaceship
Watch
Impact
9
We had our server changed from dso to

Default PHP Version (.php files) 5
PHP 5 Handler suphp
PHP 4 Handler none

Apache suEXEC on


And 2 months later I see a Form that is no longer working.. the page the form is on gets a Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.



The Form pulls from a mysql database and puts all the data in csv format for the user for download.

There are three "pages"

the config.php
csv.php
formpage.php

The Config has the data to access the db

"<?php

defined("MYSQL_SERVER") or define("MYSQL_SERVER","localhost");
defined("MYSQL_DB") or define("MYSQL_DB","db_name");
defined("MYSQL_USER") or define("MYSQL_USER","db_user1");
defined("MYSQL_PASS") or define("MYSQL_PASS","thedbpass");

?>"




and then the csv.php and formpage.php have in the header..

<?php

include('config.php');

$db = new mysqli(MYSQL_SERVER,MYSQL_USER,MYSQL_PASS,MYSQL_DB) or die(header('HTTP/1.1 500 Internal Server Error'));
$db->set_charset("utf8");



Cant get anything anymore except the error message..

So Far I have tried

Setting up new user with full db access, new password

Tried changing permission to all 3 "pages" to 777 (just temp as I test)

and still get the Internal Server error message..

Ideas? Suggestions? I've googled and not able to zero in on the problem..the guy that wrote the script/form for me is a NP member but he hasn't posted in a couple months ..cant reach him

Rest of the site and scripts works just fine
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Well it's the code you posted that generates that HTTP/500 error.
Perhaps you do not have the mysqli extension available. It's that particular line that must be causing the error.

You could create a simple .php page with this code:
PHP:
<?php
phpinfo();
?>
and call it from your browser, it will show you the extensions available on your server.

You could also remove
PHP:
or die
from the particular line of code...
PHP:
$db = new mysqli(MYSQL_SERVER,MYSQL_USER,MYSQL_PASS,MYSQL_DB )
Then (depending on the server configuration) PHP will perhaps show a more detailed error message.
 
0
•••
Thanks sd..which "extentions" are we looking for from the php page?

here is the sever set up

CGI/FastCGI


Umm also removed the or die from the formpage and the csv page but still get the same error

"Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] 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.



Sever log in whm? I'll also see if I can find that

any chance it could be the "defined" termminolgy set up.. defined("MYSQL_SERVER") or define("MYSQL_SERVER","localhost");
defined("MYSQL_DB") or define("MYSQL_DB","db_name");
defined("MYSQL_USER") or define("MYSQL_USER","db_user1");
defined("MYSQL_PASS") or define("MYSQL_PASS","thedbpass");

instead of what I am use to seeing something like

$mysql_server = 'localhost';
$mysql_username = 'myusername';
$mysql_password = 'mypassword';
$mysql_database = 'mydatabaser';

---------- Post added at 09:28 AM ---------- Previous post was at 09:24 AM ----------

INteresting ..

[notice] EACCELERATOR(3489): PHP crashed on opline 35 of bind_result() at /hom


for the form page file

---------- Post added at 09:36 AM ---------- Previous post was at 09:28 AM ----------

INteresting ..

[notice] EACCELERATOR(3489): PHP crashed on opline 35 of bind_result() at /hom


for the form page file

So Sd I searched on that error and found something similar ..

"Hi,

I have some problem with our Moodle. The apache webserver crash when someone tries to do a quiz and I have to restart it. I have pointed out the lines from the apache access and error log when the error occurs. There is no entry in php error log. I cannot reproduce this error in our test environment and this error occurs not every time when someone do a quiz. I think it could be the eAccelerator because of the message in our error log. For the moment I have disabled the eAccelerator but this slows down our server.

[Tue Jan 25 11:39:15 2011] [notice] EACCELERATOR(1444): PHP crashed on opline 214 of history(



So I'll see if i can locate EACCELERATOR and disable it for starters and see if that makes a difference

---------- Post added at 09:42 AM ---------- Previous post was at 09:36 AM ----------

No Luck

also put eaccelerator.enable 0
eaccelerator.optimizer 0

in .htacess and in php.ini
 
0
•••
Which PHP5 & eAccelerator version are you using? There are some versions of PHP & eAccelerator that do not play nice, and I know PHP 5 had a bug related to the error you are receiving.

You may want to try updating to PHP 5.3.8 and eAccelerator 0.9.6.1 (if you are not currently using these versions). Or, possibly rewrite the code to not use MySQLi
 
Last edited:
0
•••
Which PHP5 & eAccelerator version are you using? There are some versions of PHP & eAccelerator that do not play nice, and I know PHP 5 had a bug related to the error you are receiving.

You may want to try updating to PHP 5.3.8 and eAccelerator 0.9.6.1 (if you are not currently using these versions). Or, possibly rewrite the code to not use MySQLi

Eric 5.3.6 and 0.9.6.1

Probably have to have rewritten /converted to older mysql
 
0
•••
Unstoppable Domains
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back