Set up a (Wordpress) local website using WAMP. For security reasons, in phpmyadmin, created a new user and deleted user root. New user was supposed to have global privileges, but had none.
Used the following post to recreate user root deleted-mysql-root-user-using-phpmyadmin-how-to-restore. It worked, partially (i.e. recreated root user, that has Global Privileges, yet still can't create new databases, as it says "Create database: Documentation; No Privileges"). But now site is broken. I get the following error when going to localhost/mywebsite :
Warning: require(C:\wamp64\www\wordpress1\wordpress/wp-includes/session.php): failed to open stream: No such file or directory in C:\wamp64\www\wordpress1\wordpress\wp-settings.php on line 150
Call Stack
# Time Memory Function Location
1 0.0000 236160 {main}( ) ...\index.php:0
2 0.0025 239304 require( 'C:\wamp64\www\wordpress1\wordpress\wp-blog-header.php' ) ...\index.php:17
3 0.0025 259856 require_once( 'C:\wamp64\www\wordpress1\wordpress\wp-load.php' ) ...\wp-blog-header.php:13
4 0.0050 271784 require_once( 'C:\wamp64\www\wordpress1\wordpress\wp-config.php' ) ...\wp-load.php:39
5 0.0075 403592 require_once( 'C:\wamp64\www\wordpress1\wordpress\wp-settings.php' ) ...\wp-config.php:92
Fatal error: require(): Failed opening required 'C:\wamp64\www\wordpress1\wordpress/wp-includes/session.php' (include_path='.;C:\php\pear') in C:\wamp64\www\wordpress1\wordpress\wp-settings.php on line 150
Call Stack
# Time Memory Function Location
1 0.0000 236160 {main}( ) ...\index.php:0
2 0.0025 239304 require( 'C:\wamp64\www\wordpress1\wordpress\wp-blog-header.php' ) ...\index.php:17
3 0.0025 259856 require_once( 'C:\wamp64\www\wordpress1\wordpress\wp-load.php' ) ...\wp-blog-header.php:13
4 0.0050 271784 require_once( 'C:\wamp64\www\wordpress1\wordpress\wp-config.php' ) ...\wp-load.php:39
5 0.0075 403592 require_once( 'C:\wamp64\www\wordpress1\wordpress\wp-settings.php' ) ...\wp-config.php:92
All files exist. I presume problem is server does not have access to the files or database. The following question/answer may have the answer to my problem: php-failed-to-open-stream-no-such-file-or-directory/36577021. But I do not understand the instructions provided on point 4 of the accepted answer - see below:
/*To check under what user the server is running you can use posix_getpwuid :*/
$user = posix_getpwuid(posix_geteuid());
var_dump($user);
How do I do that?
-- To find out the permissions on the file, type the following command in the terminal:
ls -l <C:/wamp64/www/wordpress1/wordpress>
Did not work for me. Typing that in the terminal results in an arrow after pressing enter.
I have spent 12 full hours on this and I am at wits end. Would greatly appreciate any help. Thank you.