Created an application using Codeginiter and is working fine with my local environment which is in XAMPP.
After uploading application folders and files to linux server application is not working at all.
Deployed complete files under "/var/www/html/" and when access from browser it gives me CI error as "404 Page Not Found".
After uploading, I have updated .htaccess file.
I think this is about Linux file permission. You might want to check its file permission.
try to change the permission to read, write and executed by you ONLY example:
sudo chmod 700 var/www/html
Related
I am working on a Laravel project, I am uploading images via Admin Panel which are storing in Storage directory. When I try to access the images then it works fine on localhost. i.e.
The image is accessible by following URL on localhost:
http://localhost:8000/storage/default3.png
But when I try to access the same image on live server:
http://13.57.71.20/serio/storage/default3.png
then it doesn't work.
NOTE: serio is the folder where project is uploaded on server.
But it does work if I try the following way:
http://13.57.71.20/serio/storage/app/public/default3.png
I also tried to re-link the Storage directory by running following command:
php artisan storage:link
but nothing helped.
Change following line in .env file
APP_URL=http://13.57.71.20/serio
The problem in my view, it seems is with production url. You running it on production on url:
http://13.57.71.20/serio/
Seems to me that the directory alias serio is not properly configured for Apache/Nginx. Try running the app under http://13.57.71.20/ or you need to add an alias to the default host configuration for serio which you should map to your laravel app public folder.
I am using a php script from github to capture screenshot of a website. Its working fine in localhost. But not working after uploading the same code to my server (linux hosting). I tried uploading to multiple servers. None of them worked. No error codes are coming.
In the documentation, it says:
Make the bin executable chmod +x /var/www/html/screen/bin/phantomjs,
Make your folder writable
I am not sure what does that mean, so i set file permissions of whole files and folder to 777. Still not working
How did i upload to my server.
I uploaded the whole code to the server. Changed file permissions of all directories and files to 777 using FileZilla. I have attached a screenshot of
it.
I think it is still permissions issue, You need to set the proper permissions using putty.
1. Login using putty
2. Open root directory
3. Set permissions file and folder using this command
===> chmod -R 777 folder name
I have Ubuntu Server with lamp.
When i uploading files like xls or images it works fine, but when I trying to open it says me that the Excel file was broken. Same thing happens with images
Is it possible that php changes the file?
Permissions for /var/www/publick_html/uploads is 777
well, I know,I use windows and maybe this is extremely OFF TOPIC, but I have a simililar problem with uploaded files and my experience can be usefull for other people.
In my case, the uploaded file can not be open because it was written first in
C:\Windows\Temp
and then moved to the upload directory, but my temp folder doesn t have permission to access to it. Infact, if I click on temp folder I see:
After I clicked "Continue", the problem has been solved!
The problem was in versions of apache and php.
Version of apache was 2.2 and php was 5.4
I upgraded my apache to 2.4 version and now it works fine.
This should solve your problem with being unable to open uploaded files with PHP on SQL SERVER. It solved mine.
You may come across the following problem using PHP on Microsoft IIS: getting permission denied errors from the move_uploaded_file function even when all the folder permissions seem correct. I had to set the following to get it to work:
Write permissions on the the folder through the IIS management console.
Write permissions to IUSR_'server' in the folder's security settings.
Write permissions to "Domain Users" in the folder's security settings.
The third setting was required because my application itself lives in a secure folder - using authentication (either Basic or Windows Integrated) to identify the users. When the uploads happen IIS seems to be checking that these users have write access to the folder, not just whether the web server (IUSR_'server') has access.
Also, remember to set "Execute Permissions" to "None" in the IIS management console, so that people can't upload a script file and then run it. (Other checks of the uploaded file are recommended as well but 'Execute None' is a good start.)
reference https://www.php.net/manual/en/features.file-upload.php
I am doing PHP development using Linux OS ,Lampp Apache server.I changed the default root folder htdocs to another folder PHP on my desktop. When I create a hello.php file in the folder ,I can see it in browser and works well.
But I have another folder inside this root folder called 'front_end'.When I try to see it in browser using http://localhost/front_end ,i get access forbidden.
Firebug shows 'Access forbidden'
How can I get access to this folder using localhost?
Another user asked a similar question on stackoverflow ,but it didn't help.
Ubuntu/Apache2/ Forbidden/Permission error
Assuming you have followed the advice regarding the file permissions.
Have you got an index.php file in the front_end directory?
If not that may be why you get 'Access forbidden'. See Apache 403 Forbidden Error and Solution Try accessing the spesific php file in the directory e.g. /front_end/test.php
Permissions on the folder
Check the permissions of the folder.
Use sudo to create the folders.
I have a plesk panel and root dedicated server on 1and1. I'm using custom programed php script to upload the files and create the folders to server. I have the upload folder named upload_data_folder with the 777 permission.
The scenario is the following:
I want to create folder in my upload_data_folder and than upload files in that newly crated folder. I'm doing this over php script so every file or folder that I create has apache user and the group as the owner.
I'm successfully crate the folder in my upload_data_folder and that folder is owned by apache, has apache as a group and has 777 premission. Then When I try to upload some files to that newly created folder It can't.
I think the problem is with some owner permission but if anyone has some idea what this can be I would be very grateful
It was my custom made script. huuu I solved the problem. The php safe mode was turned on. After I turned it off everything works perfectly.
By default apache document root is /var/www/html/. If plesk is installed document root will have a path like:/var/www/httpdocs for non-secure sites. Thus secure sites are stored in /var/www/httpsdocs.