-2

I have just moved a Drupal 7 site to a new server. The website loads ok but if I log in as an admin person and click on any of the admin menu options I get the error

The website encountered an unexpected error. Please try again later.

I have edited the index.php file and added the following lines

error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE);

but still no errors show. There are also no errors in the httpd error log. In the php.ini I have the following lines:

error_reporting = E_ALL
display_errors = On display_startup_errors = On log_errors = On

so no errors show on screen or in the log. I haven't used Drupal before and I have no idea where to try next

I have searched for answers to this question but they all say to edit the index.php file as above and the errors will show on screen and they don't. Or they say to go to the admin menu and change settings which I can't as I can't load any of the admin menu options

8
  • Have you checked the Drupal setup with drush?
    – LvB
    May 27 '21 at 0:20
  • It might be "not enough PHP memory problem". Check in info.php how much PHP memory you have actually applied, you can find online the exact file and function to use.
    – prkos
    May 27 '21 at 18:01
  • ok, so done lots of checking and testing. I installed drush and ran drush watchdog-show and then tried clicking on People/Add, it came up with the error "the website encountered an error please try later" but nothing showed in the log. I am getting errors in the log saying the upload directory public://field/image for the file field field-image could not be created. May 28 '21 at 12:48
  • I have changed the ownership of every file and directory to www-data and made sure that www-data has read, write and execute permissions on all the folders and files May 28 '21 at 12:49
  • I have searched the website for a file called info.php and can't find one. I loaded phpinfo and that says that the memory limit is 128Mb. I can't find anywhere what the memory limit should be for a drupal site May 28 '21 at 12:52
0

Problem solved. I discovered there was another admin account and when I login using that, I can see everything I need. I am currently doing a Drupal 7 course so hopefully, I will learn all these things I need :)

2
  • While being logged in at the other account, you might find more information on what was wrong with the first account. Have a look at the Error log from Drupal. It seems like some data corruption issue where required fields cannot be read or something. May 28 '21 at 14:59
  • even using the 2nd admin account there are lots of menu options that are not available one being the permissions page so I currently can't see what permissions the number 1 account doesn't have. I discovered that all the people who add content to the site use the 2nd admin account (something else I will have to change) so I can see why the original developer locked down the menus. I'm sure once I finish my course, I can figure out who to change things with no access to menus :) Jun 1 '21 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.