I am working on MacOS Big Sur.
I am trying to setup my laravel project in XAMPP using Virtual Hosts. I am following this tutorial.
When I try to access the site via Virtual Host I get this page saying:
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
After googling around, it seems that this is due to some permissions, but I can't seem to figure it out.
I will document below how I set it up, and what I have tried.
enabled virtual hosts in /Applications/XAMPP/xamppfiles/etc/httpd.conf
added my site to the VirtualHosts list in /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf
Added the site to my /etc/hosts file
When I hit localHost, I get the dashboard. When I go to localhost/phpmyadmin, that works as well. However, going to Http://seqwens_new/ does not
Reading other resources online, I see that I should change the User name in the httpd.conf to my username:
When I do that, restart apache, and try to hit http//seqwens_new/, it does not work
but also, when I try to hit localhost/phpmyadmin, I get the error:
Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.
session_start(): Session data file is not created by your uid
session_start(): Failed to read session data: files (path: /Applications/XAMPP/xamppfiles/temp/)
I am out of ideas and I need suggestions
Related
my local GraphQL backend throws Internal server errors, when I try to fetch stuff from the DB. The live environment which is identical runs without those errors. In the chrome DevTools under Network GraphQL outputs following debug message when I try to fetch the data from the frontend (ionic):
debugMessage: "Warning: rename(D:\pathToLocalBackendFolder\var\cache\dev/doctrine/orm/Proxies__CG__AppEntityProperty.php.6058d378460452.39776425,D:\pathToLocalBackendFolder\var\cache\dev/doctrine/orm/Proxies__CG__AppEntityProperty.php): Zugriff verweigert (code: 5)"
"Zugriff verweigert" translates to "Access denied"
The backend is Symfony 5.1. And I run a local apache server with Wampserver64 under Windows10 Pro.
The apache hosts my backend with SSL (wasn't easy to setup) but the problem persists also when I create a virtualhost without SSL.
It does seem to fetch all the data anyways but I would like to fix those error messages anyways, because later on it could stab me in the back.
What I tried so far to resolve it:
Write umask(0000); in the beginning of bin/console and public/index.php
Run the wampapache64 and wampmysqld64 services as a local admin user (tested the renaming functionality of the specific files by logging in as that user. So the user I let the services run from has all the necessary permissions. Also I double checked by echoing 'whoami' from within GraphQL. It was the correct user I specified before.)
Gave the var/cache folder and all subfolder and all subfiles full permission (via chmod command and also via Windows folder properties)
Cleared the cache (var/cache) of symfony a couple of times. Sometimes with php bin/console cache:clear or even by deleting tha content manually
I did try everything I could from that link: https://symfony.com/doc/current/setup/file_permissions.html
And I also checked out this link and try to apply it: https://symfony.com/doc/current/setup/web_server_configuration.html
What can I try next?
If I have a subfolder in the directory"C:\Program Files (x86)\Ampps\www\php.dev\myproject\index.php". I added the domain "php.dev" on Ampps, but whenever I run index.php a window pops up saying 404 error and another times I get:
ERROR
The requested URL could not be retrieved
The following error was encountered while trying to retrieve the URL:
http://php.dev/
Access Denied.
Access control configuration prevents your request from being allowed
at this time. Please contact your service provider if you feel this is
incorrect.
How can I add a domain to run the subfolder "myproject" inside "..www\php.dev\" folder? Is there a problem in PhpStorm or Ampps setting? Thanks!
Solved after removing and reinstalling Ampps.
I have my Wordpress on Shared IIS hosting using Plesk. Today, just by itself, some of my uploaded files started to give this error:
HTTP Error 500.50 - URL Rewrite Module Error. The page cannot be
displayed because an internal server error has occurred.
Most likely causes: IIS received the request; however, an internal
error occurred during the processing of the request. The root cause of
this error depends on which module handles the request and what was
happening in the worker process when this error occurred. IIS was not
able to access the web.config file for the Web site or application.
This can occur if the NTFS permissions are set incorrectly. IIS was
not able to process configuration for the Web site or application. The
authenticated user does not have permission to use this DLL. The
request is mapped to a managed handler but the .NET Extensibility
Feature is not installed.
Things you can try: Ensure that the NTFS permissions for the
web.config file are correct and allow access to the Web server's
machine account. Check the event logs to see if any additional
information was logged. Verify the permissions for the DLL. Install
the .NET Extensibility feature if the request is mapped to a managed
handler. Create a tracing rule to track failed requests for this HTTP
status code. For more information about creating a tracing rule for
failed requests, click here.
The interesting thing is that, when a file is uploaded, it's other dimension versions are created, and I have no problem accessing those. But when I try to access the original file, I'm getting that error. When I try to inspect file permissions on my Plesk control panel, the wp-content and the uploads folder does have the write permission to my user, but when I check the problematic file, Plesk can't access it from the control panel too:
Unable to get the object (C:\Inetpub\vhosts\PATH-TO-MY-IMAGE) security
info: (5) Access is denied. at execute "C:\Program Files
(x86)\Parallels\Plesk\admin\bin\filemng.exe" MY_USER_NAME
--permissions --list-common "--file=C:\Inetpub\vhosts\PATH-TO-MY-IMAGE"
"--accounts=tmpB575.tmp"(RunTime::RunAsUser::run line 260) (Error code
1)
---------------------- Debug Info -------------------------------
I can't even read the permissions on that file. Trying to delete the file using FileZilla results in an error too. This happened to SOME files today, and NOT to others, regardless of upload order, file name or type.
I've checked out many pages regarding this, but they all point to one thing: editing PHP.ini file to change the upload folder. After some search I've created a new PHP.ini like this:
upload_tmp_dir = "C:\Inetpub\vhosts\PATH_TO_A_FOLDER_THAT_I_CAN_WRITE_TO_IN_MY_HTTPDOCS_FOLDER"
Uploaded it to my httpdocs folder, restarted my app pool from Plesk, but no avail. I try uploading new files and I still get the same error. What I haven't understood is that why this started happening today and why is this happening completely randomly (I haven't changed any setting, I haven't entered into any settings pages for weeks). Is this something related to my configuration or should I contact my hosting provider?
It turned out to be a problem with my hosting company at their side. There was nothing I could do.
I have instlled wordpress in server and i've created virtual directories.In server it is working fine.
Here is my problem,i want to create virtual directories in wordpress in windows system with IIS.But i'm not able to do that.When i'm trying to access that virtual directory i'm getting error message like below:
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
I did same thing in IIS what i have done in server.
Pls help me out.
I am using wamp and am creating a uLogin PHP Authentication Library(http://ulogin.sourceforge.net/). I have access to phpmyadmin, the local host seems to work, phpinfo() runs, everything on there seems to be working.
The problem is the c:/wamp/www/ulogin is giving me a forbidden 403 in the console. The error log for apache(2.4.9) is giving me AH01797: client denied by server configuration: My windows event log is giving me: an attempt was made to query the existence of a blank password for an account.
Is this a prblem with the wamp set up in apache or in the mysql setup; or both? I have run other php programs via www; this is the first time I ran into this problem.
I have researched this extensively and found a lot of the same answer, but it was for older versions of the program. Also, while developing on the localhost I can allow to all, I would prefer just to set it up as if the website was live.
Steps to check what's wrong:
1) Check your apache config: Check Directory-entries for your target directory and above. Look out for Order and Allow from (or Require for 2.4+)
2) Check whether there are any .htaccess files in your target directory or above. Again, look out for Allow / Deny and Require.
3) Check if the 403 is emitted by apache or your application: Add some debug message at the very top of your application logic (commonly some sort of index.php).