I have a created a project in HTML/PHP and I am trying to upload everything to the server. I am not that familiar with servers other than the fact that your first page must be an index.php/htm file and that everything goes in the public_html folder. I am using MVC(codeigniter) so adding it to the server doesn't seem so straightforward. I have attached an image of my directories, the first file when viewed locally is the controller class which is home.php inside /application/controllers. If I just drag everything to the server as is, then I receive a 500 Internal Server Error. Can anyone help me fix this please?
The problem with a 500 internal server error is that's it's a generic message.
Try checking:
File / folder permission (No files or folders should be set to 777, 755 should be the maximum permissions setting.)
If you're using short tags: short_open_tag=On in php.ini
Incorrect syntax in .htaccess file (Try removing - test - recreate)
check error.log for more detailed information.
Hope any of this helps, I'll keep an eye on this topic.
Related
I have recently moved one website to new server. I have transferred everything properly including mysql database. But now the internal pages are not opening (sending 404 error). Homepage looks fine.
One thing to consider here is that, the website was on shared cpanel with another domain and residing in a folder. Now after moving, it is placed directly in public_html. I hope, this doesn't create any issue.
The website is: http://nepaltrekking.co.kr/
regards,
When hosting changes, we need to take care of the following steps for codeigniter:
Check required php and apache modules are installed and enabled.
If installation is not in root directory, you must change htaccess.
If domain is changed, you need to edit config file for new base_url.
Clear application cache if enabled. Give required write permision in cache directory.
If nothing works, then see error log and correct error accordingly.
Actually I resolved it. The issue was with .htaccess. I changed the permission to 666 and it started working. I think there was problem writing in the .htaccess file.
I have a wordpress theme with tim-thumb installed, the tim-thumb works fine when site was in local or in staging server (All images are shown as required). But when I upload this into live (Production server) into amazon dedicated server, it stop working for some specific images. Please check this link at Medisetter Image. It always return a blank. I don't know why. My guess is that it is a permission issue but I have recheck the permission with staging server it was same, 755. Oncee I change this to 777 but still it did not work.
Any one can helps me to solve this, Thanks.
I tried giving it a relative path:
http://www.medisetter.com/wp-content/themes/realestate-4/img_resize/timthumb.php?src=../../../uploads/2014/06/di8MEA4ie.png&w=598
But it returns an error that "The file you specified is <= 0 bytes.".
Which means it IS finding the file itself, but is unable to read it?
My laravel site is working correctly on my local apache server and WAS working correctly on my remote live/development server. I carried out an ftp sync last night and now all I can get is a blank white page.
In the console I can see an error status 500 internal server error
I've read similar posts on this suggesting folder permissions and using filezilla I have set the permissions on all files and folders to 777 - I've also tried 775.
I've deleted all the remote files and re-uploaded them (and set permissions again).
I've checked the .htaccess settings (which are standard)
No log files are being created
I'm not sure what I can check next - can anyone help please
Thanks
I have website where I can login , trying to edit the records .. as soon as it displays like this,
Forbidden
You don't have permission to access /backoffice/processfaculty.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I am trying to save data from fckeditor and i don't have any htaccess file on the root ... i also checked permission (755 , tried 777)...
If I edit and save with simple texts , it works fine.. but if i do it with fckeditor data, it does not.
Please check you server configuration, you need to have PHP enabled on your server. Look into the error log of your server it will have more information.
This looks like you have a web-firewall installed on your webserver. Temporarily disable it to test if it is causing the issue.
Here is what i think you should look into:
what is the mask value?
umask();
The umask() function changes the file permissions for files.
I'm on a VPS environment so I have root access, btw.
So take a look at these issues:
http://www.sonikastudios.com/wp-content/themes/sonikas/scripts/timthumb.php?src=/wp-content/uploads/tedleescreenshot1.jpg&w=100&h=100&zc=1&q=100
That returns a 404 error.
However when I move timthumb.php to the root of the site, it works.
I verified file/folder permissions, it's not the issue. Also, another PHP generated image that i use for Captcha, is doing the same thing...
So essentially it boils down to no .php files running from within folders. However this is not an issue otherwise because PHP scripts I have under /admin/ on other sites work fine.
So... what could cause this? Most forum articles I read lean towards a mod_security problem, but I don't even know where to start, as I'm not an apache expert.
As you have root access, try looking for what is happening in Apache logs. To follow latest request you can use tail.
Which version of Apache you are running? In my configuration of Apache 2.2 you can follow error log in terminal by invoking:
tail -f /var/log/httpd/error_log
It seems that default configuration of Apache 2.2 has error log in /usr/local/apache2/logs/error_log, so my configuration is not default.
If you do not have success with error log, try also looking for information in access log, default location at /usr/local/apache2/logs/access_log.
Same error can occur when the file it self is also writable. Make sure the file is 644 and NOT 666 !
Wordpress is probably using some mod_rewrite rules to send every request to its index.php. And there it’s analyzing the request and returning a 404 status code if one of its internals was requested.
This is a problem with your .htaccess file generated by WordPress. It redirects all requests for your site that aren't wp-admin/ or in your uploads directory to the index.php file for WordPress (the request handler that queries for posts, etc.)
In my case, the following PERMISSION changes solved the (Timthumb.php) issue:
The PHP script must be "644".
All of the parent directories must be "755"; Neither "775" nor "777".