Jump to content

Connected as a guest user instead of admin user in my local environment


Rodd
 Share

Recommended Posts

Hi everybody!

A few days ago, I wanted to recover the site I have in a production environment on a local environment. It's done ... or almost. 

First of all, I use WampServer.

Then, when I recover the site and install it for the first time, everything goes well, I can navigate on the site and develop as I wish. But as soon as I turn off my computer and turn it back on the next day, I can no longer access it. I have an error with the message:

Quote

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Error has been logged.

I looked at the log file, and I saw that I was still logged in as a guest and not as an admin. How can I fix this? Is there another solution that would allow me to continue to develop my site?

Thanks by advance!

Link to comment
Share on other sites

Eydun, thank you for your answer. But I didn't find a log file somewhere else than in the apache folder.

I don't have Tracy, but thanks for this. I'll install it when my issue will be resolved.

I try another way with an apache configuration instead of using MAMP. Let me explain:
I created a virtualhost in the '/etc/apache2' folder. Here is my .conf file

<VirtualHost *:80>
        ServerName dev.mywebsite.com
        ServerAlias www.dev.mywebsite.com
        DocumentRoot "/mnt/d/Websites/mywebsite"
        <Directory "/mnt/d/Websites/mywebsite">
                Options +FollowSymLinks
                AllowOverride all
                Require all granted
                Options Indexes
        </Directory>
        ErrorLog /var/log/apache2/error.dev.mywebsite.com.log
        CustomLog /var/log/apache2/access.dev.mywebsite.com.log combined
</VirtualHost>

I modified the 'hosts' file with this two lines

127.0.0.1       dev.mywebsite.com
::1     		dev.mywebsite.com

Then I reloaded the service apache2.

But I still have a problem. Indeed, when I go to 'dev.mywebsite.com', I have a page with the code of the index.php, and I don't know why. I thought it was because php, but I have the version php 7.4.3.

This is another way in order to resolve my first problem which is to launch my project locally without no longer working when I shut down my computer.

Can you help me? 

Thanks by advance!

Link to comment
Share on other sites

Ok, I found the solution. I had to execute this to lines :

Quote

sudo apt install libapache2-mod-php
sudo a2enmod php7.4

That seem ridiculous but yeah, I had php 7.4 but I didn't have the PHP module (libapache2-mod-php) for my Apache webserver.

Now I can have my project in a local environment... But I still have an issue ;(

This is about the database. I made an export of my website in production which contains a .sql file. But when I import it in my local database, I don't have the datas displayed on the website.

I use My SQL Workbench in order to manage the datas. When I do a simple query like 

SELECT * FROM website.field_body;

I have a result. So The import was correct. This is I don't know why it cannot display on the website

If anyone can help me on this issue, thnaks by advance again!

Link to comment
Share on other sites

Ok I found the solution about this database's issue. I didn't see before but I had an error about one field, so I delete it of the sql file and import again it. It works now. I just have to recreate this field manually.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...