Laravel 5 database setup - php

I have installed laravel 5 on my mac using composer.
I am struggling with database configuration.
after i remove the ENV() in database.php setting, to without ENV(), it works.
The access is denied error is solved, however, why i cannot open localhost/phpmyadmin?
I read the few source about locating the .env file, however seems like i cannot locate it.
How do i properly setup database and how do i open localhost/phpmyadmin as now it says that access denied.
Thanks in advance

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

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

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?

TYPO3 v9 caching error with site-configuration.php-file?

I'm working on a new project in TYPO3. It's my frist installation of TYPO3 9.5.5 so I don't know if this is some sort of bug or anything but sometimes, and I really can't give you any more information about it since I dont know where it comes from and how to reproduce this error, my enire typo3 crashes with this error message:
(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: rename(/var/www/html/var/cache/code/cache_core/5cab444370d80224649952.temp,/var/www/html/var/cache/code/cache_core/site-configuration.php): No such file or directory in /var/www/html/public/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php line 234
Since it's in my var directory I figured to just delete the entire folder but as soon as I try to delete it Windows tells me I don't have permission to delete this file or even change it. When I try to open it in an editor it tells me that the file doesn't exist and I can't do anything about it unless I restart my entire PC.
I've found some people with the same issue here, but no way to fix it or anything on how to prevent it from happening.
I'm using the composer installation of TYPO3 with ddev on Windows 10.
Does anyone know about this error or can tell me anything on how to fix it?
Did you try to flush all TYPO3 caches?
To do so, go to Admin Tools => Maintenance => Flush TYPO3 and PHP Cache.
If the problem persists, you can try to got to Admin Tools => Environment => Directory Status and check if all permissions are set properly.
And since you run TYPO3 with ddev, you can use the shell (Putty or whatwever) and do a ddev ssh to login directly to the container and delete the files there.

Moodle 3.3.2 ERR_TOO_MANY_REDIRECTS

I've installed successfully Moodle version 3.3.2 and at the end, i got an error to connection database. But as i've seen it generated all tables in database moodle.
Now, i can't enter, ERR_TOO_MANY_REDIRECTS on loading pages.
URL: http://example.com/admin/index.php?cache=1.
Additional Server information:
OS: Ubuntu 16.04
PHP: 5.6
Mysql: 5.7.20-0ubuntu0.16.04.1
Different approach to solving this problem after checking and making sure that apache and php configuration are ok. I the added this line of code to my noodle config file.
$CFG->sslproxy = true;
And this resolved the issue.
go on your server directory such as "www=>moodle directory=>admin
open index.php
find following
"redirect("index.php?sessionstarted=1&lang=$CFG->lang");"
and comment it
i find this on line 712 in moodle 3.7. it might be changed with version
save file and refresh page
Search the moodledata directory, enter it and delete the following directories
cache
localcache
in my case, this error come out because of the disk was full and yes deleting cache and localcache solve the problem
Delete all the data from moodledata folder (Try this only with the new instance otherwise will loose the data), then try to open yourdomain/moodle in your browser. It will work.

Why am I getting a protocol error creating a laravel project in Vagrant Homestead?

I keep getting a protocol error when I try to use "laravel new Laravel" inside of the homestead ~/Code directory. If I use the command in the home directory it creates the project without any issues, so I tried moving the created project from the home directory and into the ~/Code directory and still got a protocol error trying to move it. Has anyone run into this issue? I have been googling for about two hours now and haven't found any useful information :/
I installed Laravel on the box using the installer method (composer global require "laravel/installer=~1.1")
Thanks to whoever helps, I really appreciate it this is so frustrating.
Trevor Kavanaugh
Found it out lol, I did not have read/write permissions on the shared host folder facepalm

Categories