-1

I have a CodeIgniter website nulearnedu.in that works perfectly on my local and another VPS server. Now i have another hosting server by godaddy and I upload all the files and database on it. Now my website is not working getting an error "This page isn’t working, the website is currently unable to handle this request. HTTP ERROR 500".

I create a test page that is not linked with the MySQL database. That is working fine.

My .htaccess looks like this if it has something to do with it.

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

RewriteCond %{HTTP_HOST} ^nulearnedu.in [NC]
RewriteRule ^(.*)$ http://www.nulearnedu.in/$1 [L,R=301,NC]

  • Does this answer your question? [How do I get PHP errors to display?](https://stackoverflow.com/questions/1053424/how-do-i-get-php-errors-to-display) – DarkBee Jun 28 '23 at 05:42
  • No, 'display_errors = on' but there is no error showing in log file – Narinder Kumar Jun 28 '23 at 05:49
  • 1
    Check the Apache log file too, 500 errors can sometimes come from the webserver rather than PHP – ADyson Jun 28 '23 at 08:33
  • @ADyson I am not able to find Apache log file in GoDaddy shared hosting plan – Narinder Kumar Jun 28 '23 at 09:28
  • You could ask the hosting provider if they can see anything, then. Also have you tried to narrow it down at all, e.g. by removing or editing the htaccess to see if it removes the problem? – ADyson Jun 28 '23 at 09:30
  • @ADyson I contact with Godaddy team, and they are also not able to resolve the issue. I removed and edit the htaccess file but there are no changes. The site is working fine on my localhost. – Narinder Kumar Jun 28 '23 at 10:15
  • They didn't give you a dump of the Apache log of your site, to study for yourself then? Sometimes you can find such things in cPanel too, if GoDaddy uses that. I don't think it's an issue they could resolve for you necessarily, my suggestion was to ask them to give you extra information so you could investigate. – ADyson Jun 28 '23 at 10:24
  • Anyway, we need to narrow it down further. Without the htaccess in place can you, for example, make a simple "` page and see if that will load? Can you then make one which connects to the database without crashing? etc etc. Build it up more complicated step by step, until you encounter a problem again. That will help you to decide which area of functionality may be causing issues. Something is clearly not right in the environment and/or configuration, since the code works locally. Without knowing the underlying error behind the 500 status, we cannot help you much. – ADyson Jun 28 '23 at 10:25
  • Is the `codeigniter-2` tag accurate? That version hasn't been active since 2015. – James Jun 29 '23 at 15:32

1 Answers1

-1

Try changing your config/app.php file, the $baseURL, to the new domain.

General Grievance
  • 4,555
  • 31
  • 31
  • 45