When i completed my project in codeigniter and uploaded to server it show directory access denied? What to do ...i have configured in config file but it doesn't work..
You will need to change read/write permissions for the directory hosting your codeigniter application. Refer to your hosting company's help section to see how this can be done.
Related
I am using Laravel and it works well. After updating one blade file on my local pc and deployed it with git, Laravel can't open that particular blade anymore.
file_put_contents(/var/www/vhosts/***/httpdocs/memberportal/storage/framework/views/8274d2f145c8a134eb15ccbb69c2df396814d64e.php):
failed to open stream: Permission denied (View: /var/www/vhosts/***/httpdocs/memberportal/resources/views/emails/newsletter/2019-04-2/translations/advertise/en.blade.php)
at /var/www/vhosts/***/httpdocs/memberportal/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122,
ErrorException(code: 0): file_put_contents(/var/www/vhosts/***/httpdocs/memberportal/storage/framework/views/8274d2f145c8a134eb15ccbb69c2df396814d64e.php):
failed to open stream: Permission denied at /var/www/vhosts/***/httpdocs/memberportal/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122)
The folder permission and owner of the storage folder and en.blade.php are correct. However, I noticed that the owner/group of the files in the cache are different.
All caches files with owner root:root are not accessible. Any ideas why Laravel changes the ownership of cache files on my production server, when deploying with git? The storage files are ignored by git, so I do not understand how this happens.
Any advice?
I am installing laravel on server via putty. I linked public with public_html. Files were located inside laravel folder above public_html. After installation its showing "Internal Server Error"
The server encountered an internal error or misconfiguration and was unable to complete your request.
Usually when using cPanel it will usually require your index.php to have the permissions 644 otherwise you'll get a 500 error.
You can change this in cPanel by doing the following:
Login to your cPanel (if not already there)
Click File Manager.
Click the name of the file for which you would like to change the
permissions.
Select the Change Permissions link at the top right of the page.
Select the permissions you would like to set for the file
Owner - Read and write
Group - Read
World - Read
Click Change Permissions.
Alternatively, if you have ssh access you could run the following command on the server:
chmod 644 path/to/index.php
I have a website template that I uploaded to my ftp server using FileZilla. However when I visit the domain I get the error:
Directory Listing Denied
This Virtual Directory does not allow contents to be listed.
in the console it displays a 403 forbidden error. After researching I recognize that the default web page inside the root directory is not set. All my attempts to set the default page have failed. Here is what I tried:
1) Logged into ftp server with FileZilla. Clicked File > Site Manager > Advanced and set the root directory. The root directory contains a file that says index.html
2) Created a .htaccess file in the root that contains the text "DirectoryIndex index.html"
Solutions involving IIS are welcomed as well.
Any advice on how I can get this fixed?
Unfortunately I did not have permissions to access the actual server files so I contacted the hosting company.
They resolved my issue I believe using the approach #alvits recommended, however they have not returned my request to confirm how they solved it.
Thanks for the support
Guys I have created my first Laravel Project and I uploaded it to the server successfully and everything works perfect.
But I can write in the url www.mydomain.com/resources/views and show all my views!
Also user can open my .env file and view my database connection info!
I want only the user to navigate only to my routes not to any folder he guess.
Basic Instruction to Deploy Laravel to shared hosting7
You should point your document root to app/public/
run composer install in the project root directory
set writable permissions to bootstrap cache chmod 777 bootstrap/cache
set writable permissions to storage chmod 777 storage -R
There are many things that can go wrong while deploying application. So, it would be easier for us to help you, if you also provide us step by step process that you followed while deploying the laravel application.
For securing your routes and .env file you need to get into your hosting root directory, create .htaccess file and copy the below code and paste it in there
# Disable index view
Options -Indexes
<FilesMatch "\.env$">
Deny from all
</FilesMatch>
I hope this will solve your problem.
Need an urgent solution about magento Error....
Am getting an error message in Magento 1.5.0.1 version at Magento Connect Manager ... I couldn't install magento extensions ...
The error msg shows as :
Warning: Your Magento folder does not have sufficient write permissions.
If you wish to proceed downloading Magento packages online, please set all Magento folders to have writable permission for the web server user (example: apache) or set up FTP Connection on the Magento Connect Manager Settings tab.
Whereas, I have changed the file permission from our end to 777
The locations are :
app/etc
app/code
var
media
Also, i have uploaded Magento files and folder directly into the root directory .. so, there is no Magento folder existed in the root directory..
Please give some soln ..
Thanks
make sure your web root directory (ie /var/www/public_html/) is actually read and write by apache so having it be the owner and set your permissions to 755 or 775. I bet you don't have a folder/file in the root that Magento Connect it trying to create but cant because the web root permissions are wrong not your magento file permissions themselves (that was my problem at least) ... and yes you shouldn't be 777 everything that is bad.