Welcome Guest, Not a member yet? Register   Sign In
500 Internal Error
#1

Greetings!!
I am using CI 2.2.0 and looking forward to 3.0.
I have been testing in a localhost environment and have just moved everything to www.ccscdev.com which is hosted by NetworkSolutions.
I think I have resolved the database.php parameters, etc.

I am using ion_auth as my login so the url will specifiy www.ccscdev.com/auth/login which I think is correct.

FTP'd the MySQL database. For some reason the database was loaded as MYISAM vs INNODB and I do not know if that will be an issue as ion_auth uses foreign_keys.

When I try to load www.ccscdev.com I receive a 500 Internal Server Error with no indication where, etc.

My problem is I have no idea where to start!!

Any assistance will be greatly appreciated.
John
Reply
#2

Quote:When I try to load www.ccscdev.com I receive a 500 Internal Server Error with no indication where, etc.
First thing I would try would be to put a file called check.html with just some basic html in your website's root directory (may be called public_html or something like that).
Code:
<html>
<head></head>
<body>
<h1>Yes, it's working!</h1>
</body>
</html>
Can you then go to www.ccscdev.com/check.html and see the page? You will probably still get the 500 error, and then you can submit the problem via a support ticket. I don't think it's something you can fix on your end.
Hey, don't work without a PHP debugger. Several free IDEs have this features built in. Two are NetBeans and CodeLobster. Without a debugger, it's like you're driving with a blindfold on -- you are going to crash!
Reply
#3

RobertSF,
I created check.html, ran it and the message was display.
My problem is hard to diagnose because there is a quick error message than the 500 error screen.
I have turned on error logging in the config file but no errors show up.
Network Solutions directory structure for www.ccscdev.com is directory htdocs and under that directory is index.php and the directories application and system, etc.
I am having problems setting up the $config['base_url'] = '?????'; in the config.php file.
My best guess at this time is the BASEPATH in the index.php file is not being set correctly as there is a microsecond flash that mentions 'url?????'. I am not able to catch the whole phrase or find an error log that shows it.
I would appreciate any suggestions on this matter. Thanx John
Reply
#4

(02-18-2015, 08:18 AM)jfkirkpatrick Wrote: Network Solutions directory structure for http://www.ccscdev.com is directory htdocs and under that directory is index.php and the directories application and system, etc. . . . My best guess at this time is the BASEPATH in the index.php file is not being set correctly as there is a microsecond flash that mentions 'url?????'.

Hi John. Since check.html works fine, then you very well could be right.

Try this. First, look in index.php and make sure these two lines are like this.
PHP Code:
$system_path 'system';
$application_folder 'application'
You can use full paths there, but you don't need to with a standard out-of-the-box installation.

Then try renaming the .htaccess file in your htdocs directory, if there is one. You will now have to specify index.php in your Codeigniter urls, but if it starts working, you know there's something wrong in .htaccess.

Also check permissions. Permissions for all PHP files must be set to 644 and permissions for the directories (or folders) set to 755. Here's more info on that.
http://stackoverflow.com/questions/17628...d-settings
http://forums.cpanel.net/f185/why-644-75...36821.html

Just to make sure your host's PHP isn't the problem, rename check.html to check.php and include a line or two of PHP in it. Something like this.
PHP Code:
<?php echo var_dump(get_defined_vars()); ?>
If you get the 500 error, then the problem is your host's PHP installation.

I don't know what else, so I hope that helps!
Hey, don't work without a PHP debugger. Several free IDEs have this features built in. Two are NetBeans and CodeLobster. Without a debugger, it's like you're driving with a blindfold on -- you are going to crash!
Reply
#5

(02-18-2015, 01:38 PM)RobertSF Wrote:
(02-18-2015, 08:18 AM)jfkirkpatrick Wrote: Network Solutions directory structure for http://www.ccscdev.com is directory htdocs and under that directory is index.php and the directories application and system, etc. . . . My best guess at this time is the BASEPATH in the index.php file is not being set correctly as there is a microsecond flash that mentions 'url?????'.

Hi John. Since check.html works fine, then you very well could be right.

Try this. First, look in index.php and make sure these two lines are like this.

PHP Code:
$system_path 'system';
$application_folder 'application'
You can use full paths there, but you don't need to with a standard out-of-the-box installation.

Then try renaming the .htaccess file in your htdocs directory, if there is one. You will now have to specify index.php in your Codeigniter urls, but if it starts working, you know there's something wrong in .htaccess.

Also check permissions. Permissions for all PHP files must be set to 644 and permissions for the directories (or folders) set to 755. Here's more info on that.
http://stackoverflow.com/questions/17628...d-settings
http://forums.cpanel.net/f185/why-644-75...36821.html

Just to make sure your host's PHP isn't the problem, rename check.html to check.php and include a line or two of PHP in it. Something like this.

PHP Code:
<?php echo var_dump(get_defined_vars()); ?>
If you get the 500 error, then the problem is your host's PHP installation.

I don't know what else, so I hope that helps!
Reply
#6

Once again thank you for your time and suggestions.
First off, lines 59 and 76 of index.php do read as suggested: $system & $application.
I renamed all .htaccess files to .htaccess.txt, etc.
I then executed http://www.ccscdev.com/index.php and got the flash which I could not see and now I have a 404 error.
I also created check.php and got a var_dump which I will let the expert decipher!! You can easily duplicate it my entering www.ccscdev.com/check.php.
Thanx again.
Reply
#7

I have put the var_dump into index.php so we should be able to see BASEPATH, etc
Reply
#8

Plus the var_dump shows 2 PHP Header errors!!
Reply
#9

I have added this line to index.php around line 194
echo var_dump('System Path ', $system_path, 'Application Folder ', $application_folder), 'Base Path ', BASEPATH;
exit;
And received the following print out:
string(12) "System Path " string(53) "/data/22/3/51/129/3866618/user/4295300/htdocs/system/" string(19) "Application Folder " string(11) "application" Base Path /data/22/3/51/129/3866618/user/4295300/htdocs/system/
Reply
#10

(02-18-2015, 03:43 PM)jfkirkpatrick Wrote: I have added this line to index.php around line 194
       echo var_dump('System Path ', $system_path, 'Application Folder ', $application_folder), 'Base Path ', BASEPATH;
exit;
And received the following print out:
   string(12) "System Path " string(53) "/data/22/3/51/129/3866618/user/4295300/htdocs/system/" string(19) "Application Folder " string(11) "application" Base Path /data/22/3/51/129/3866618/user/4295300/htdocs/system/

That part looks normal. It's normal for there to be a long path before your htdocs directory. It's the full path, which is what variables with the word "path" in them usually want. The application "folder," on the other hand, is just "application" because CI doesn't need the full path.

I don't see anything wrong with the variables in the variable dump. Now that we know the server serves HTML and executes PHP without a problem, you can delete the check.* files if you want.

I would suggest you consider restarting instead of continuing trying to trouble shoot. Sometimes it's just easier to start all over. Instead of copying the Codeigniter installation from your localhost environment, try installing Codeigniter from the start on your web server. As you know, Codeigniter comes in a zip file. Don't open the zip file on your desktop computer and then try to FTP the files to your web server because that will take a long time. Instead, upload the zip file to your htdocs directory, and then use your control panel's file manager to unzip/extract the files. That will be much quicker. Configure everything step by step according to the documention, and get to the part where you can see the default Codeigniter greeting.

After that, delete whatever the standard Codeigniter installation left in your application folder, and copy your application folder over from your localhost environment. For extra speed, put it in a zip file, upload, and then extract it. It's much quicker to FTP one big file than many little ones.

I have to think that will work. It has to! 
Hey, don't work without a PHP debugger. Several free IDEs have this features built in. Two are NetBeans and CodeLobster. Without a debugger, it's like you're driving with a blindfold on -- you are going to crash!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB