Welcome Guest, Not a member yet? Register   Sign In
Local Works but 500 Error on Server... how come?
#1

[eluser]dhall[/eluser]
My site works perfectly on my local.
On my server the main page loads just fine, even pulling data from my database; but as soon as I click on a menu item to go to another page I get the following error:

Code:
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.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

I checked my apache server error log and see the following:
Code:
[Wed Aug 15 15:23:15 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/phpMyAdmin-2.5.5-rc1
[Wed Aug 15 15:23:15 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/404.shtml
[Wed Aug 15 15:23:15 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/phpMyAdmin-2.5.5-rc2
[Wed Aug 15 15:23:15 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/404.shtml
[Wed Aug 15 15:23:15 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/phpMyAdmin-2.5.5
[Wed Aug 15 15:23:15 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/404.shtml
[Wed Aug 15 15:23:16 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/phpMyAdmin-2.5.5-pl1
[Wed Aug 15 15:23:16 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/404.shtml
[Wed Aug 15 15:23:16 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/phpMyAdmin-2.5.6-rc1
[Wed Aug 15 15:23:16 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/404.shtml
[Wed Aug 15 15:23:16 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/phpMyAdmin-2.5.6-rc2
[Wed Aug 15 15:23:16 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/404.shtml
[Wed Aug 15 15:23:17 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/phpMyAdmin-2.5.6
[Wed Aug 15 15:23:17 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/404.shtml
[Wed Aug 15 15:23:17 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/phpMyAdmin-2.5.7
[Wed Aug 15 15:23:17 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/404.shtml
[Wed Aug 15 15:23:17 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/phpMyAdmin-2.5.7-pl1
[Wed Aug 15 15:23:17 2012] [error] [client 211.125.67.192] File does not exist: /var/www/html/404.shtml

I don't understand why it is showing all those phpMyAdmin errors... my home page which loads just fine pulls data from the database.
Any ideas? Thanks for the help
#2

[eluser]jotorres1[/eluser]
Have you made sure that you have uploaded the files? Or even checked your config files are synced?
#3

[eluser]dhall[/eluser]
Yeah I checked that. All my files are there, config file is correct, index file correct. I do not see any errors in my coding.
Why would I have not a single error on my local but have this major error on the server I just do not understand.
#4

[eluser]TWP Marketing[/eluser]
Something is triggering the error, but it cannot locate the 404.html file to display that error.

Since the main page loads and displays, it may be that the path to the menu links is not accessible on your production server.

Check permission on sub-directories and their files.

If that looks ok, please post your menu code and your directory structure so we can analyze deeper.
#5

[eluser]dhall[/eluser]
How do I go about checking sub-directory permissions?
Sorry if this is something simple...
#6

[eluser]TWP Marketing[/eluser]
On a production server, your access tools should allow you to display the permissions on any file or directory. It's hard for me to guess, not knowing your server, it's configuration etc.

Who installed the code on the production server?
What tools were used to do that?
What does your admin panel have available?
#7

[eluser]dhall[/eluser]
My server has DirectAdmin for access.
I installed the files pulling from my repository on BitBucket.
#8

[eluser]TWP Marketing[/eluser]
Not familiar with Directadmin, but it should allow you to view your directories and files, usually in a tree structure.

Try right clicking on a directory and inspecting the menu options. Look for "permissions" or "access rights" or something similar. You want to see the rights granted for access on directories and files.
#9

[eluser]NeoArc[/eluser]
Make sure your htaccess file is properly configured in your production server.

Perhaps the RewriteBase value points to a development directory. If you uploaded the website using ftp, there's a possibility the old htaccess file was deleted.
#10

[eluser]dhall[/eluser]
Here is my htaccess file. Does everything look correct?

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    
    #Change this to match the domain name of your site.
    #RewriteBase /local_dev/
    RewriteBase /beta.example/

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    
    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css documents, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>




Theme © iAndrew 2016 - Forum software by © MyBB