GraphQL - Warning: rename .....access denied - php

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?

Related

MacOS XAMPP Access Forbidden 403 Laravel Project

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

php wamp; forbidden folder in www

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).

Why do I not have any laravel error pages on my server?

I'm using Laravel 5.0. So when I was messing around with laravel on Vagrant it was really easy to debug because of the laravel error pages. Now that I've installed again on an actual apache server, I get no error pages.
I have forced a error by typing a variable that wasn't there and all I get is a WSOD with chrome telling me its a 500 error. I take that variable away and everything works fine, so I know whats causing my 500 error.
Edit: I have already changed 'debug' to true in my config/app file.
Any idea on how to get these error pages back?
When installing laravel on a server you must ensure that you set the correct permissions to the storage directory
sudo chmod o+w storage

New laravel 4 installation on Cloud9, showing blank page when viewing /public folder

I've installed Laravel 4 on Cloud9 (www.c9.io) and I can access a view directly like so:
https://laravel-test-c9-anthonyhull.c9.io/tasks/app/views/hello.php (which displays a "you've arrived" message)
However, if I try to view:
https://laravel-test-c9-anthonyhull.c9.io/tasks/public
I just see a blank page.
I have ensured the following:
MCrypt is installed
app/storage permissions have been given write access
I've tried running php artisan serve
Not sure what else to try.
Ideally what I'm after is to get:
to automatically show the default page of my "tasks" app.
Looks like I just had to visit laravel-test-c9-anthonyhull.c9.io/tasks/public directly rather than with the built in Cloud9 IDE browser.
I think the issue is your web server assumingly apache and it's mod_rewrite module which must be installer and enabled. If you do this now, remember to reboot your server, then you also need to change the conf files of apache to allowoverrides and reboot.

Symfony project is not work on local pc

I have this trouble: i copy symfony project files on my pc, after that change paths and db settings, and it still not working, even dont tell about errors! Maybe there is some specific actions for setting up symhony on another server?
Almost the same problem How to configure symfony project in local server? but when i try execute "php symfony" it prints "no such file or directory"
There are no any php errors at all.
Using Fedora 15 OS, and apache. php work in command line, symfony is not working. I tried to find out what is happening - inside Controller.class some error, when it use processObjects method, it take 11 objects, and after first of them (header.object.php) it stops.
The white screen generally means symfony can't write to cache and/or log dir, check on apache error logs to see details.
if 'php symfony' on command line throws no such file or directory could mean php is not in your system path.
Please add more information to get answers
myabe, as said below is a permission problem of the caché and log files. Check if they are writable. Good Luck!

Categories