When I visit my site, I get an error:
This page isn’t working my---site.com is currently unable to handle this request. HTTP ERROR 500
I have taken the below steps but no luck.
In shared hosting server, I have changed the php version from 5.6 to 7.0.
Renamed in sites/all the folder "modules" to "nomodules".
In settings.php file, added "ini_set('memory_limit', '128M');"
Renamed sites folder to "nosites"
Un commented RewriteBase / this line in .htaccess file.
Called hosting company and they tested php file and database access. All good in the server.
I tried all of the above one at a time. I get same error. How can I fix the page is not working error in drupal 7 site?
On home directory in shared hosting, I see logs folder. I dont see any apache folder. Once I click logs folder, I saw few zip files. I uploaded the latest one. It might be the one you are asking for. I personally never looked logged files so I do not know what to get out of this log file. I get the same error for other pages. When I visit robots.txt file page, I can see the content. Also uploaded for you to see.
I am not sure what else I could do to fix it. Please let me know if you need any additional info.
Update 1 In cPanel metrics section, I see the below errors:
[Thu Mar 29 10:29:55.504048 2018] [autoindex:error] [pid 1019784:tid 1401110643131018112] [client xxx.xx.xxx.xx AH01276: Cannot serve directory /home/kar2015/a.com/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
[Thu Mar 29 10:19:52.133400 2018] [autoindex:error] [pid 109815:tid 14001164323507968] [client xxxxxxxx] AH01276: Cannot serve directory /home/kar2015/a.com/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
Update 2 index.php exists at the root directory.
Permission of index.php is set to 644
Code shows this:
<?php /** * @file * The PHP page that serves all page requests on a Drupal installation. * * The routines here dispatch control to the appropriate handler, which then * prints the appropriate page. * * All Drupal code is released under the GNU General Public License. * See COPYRIGHT.txt and LICENSE.txt. */ /** * Root directory of Drupal installation. */ define('DRUPAL_ROOT', getcwd()); require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); menu_execute_active_handler();
I just replaced the content by
<?php echo "Hello world!"; ?>
When I visit my page, it prints "Hello world". I guess problem is with the index.php. How can I fix it?