“Page not found. What’s worse, a hilarious 404 page can’t be found either.” - http-status-code-404

My file structure is:
User/me/www/Craft-2.3.2644/
I am using MAMP and MAMP Points to this folder as my 'server root'.
Everything inside and including my web root has 777 permissions.
Inside this folder are three items:
craft/
public/
readme.txt
I have a MySQL database:
Domain: localhost
User: root
I have pointed the db.php file to my server, with 'root' as the password.
My index.php file in my public folder points to ../craft which reroutes to /app/index.php (a file that does exist in that location).
The most positive result I can get when surfing to localhost/public/index.php is a message that reads as below...
Page not found
What’s worse, a hilarious 404 page can’t be found either.
With any other permissions I cannot access the folder because I'm not allowed (oops message).
And with any other mapping in the index file I receive a message:
File not found

Related

Keep getting Nginx 403 Forbidden error when accessing a react js application

please, I have a react js application that I want to deploy on my server (Centos 7), I have already generated the build and I have installed nginx on my server and I have created the folder www under /var/ where I have put the content of my build following the path : /var/www/merchant-dashboard/html.
and I have already allocated the 777 permissions for the www folder and all its subdirectories and files
I created my configuration file under /etc/nginx/conf.d and named it merchantDashboard.conf here is its content :
.
I have also set the permissions for the nginx user with the command
sudo chown -R nginx:nginx *.
(my user is called nginx) but I still get the 403 forbidden error.
Here is my error logs :
if someone can help me please
I followed this answer:
Why does Nginx return a 403 even though all permissions are set properly?
When I disabled SELinux it worked.
Following command from the above mentioned link solved the problem:
chcon -Rt httpd_sys_content_t /path/to/www

Drupal 7 - can't upload files

I'm getting an error when trying to upload any type of file via Content>Files>Add File. The error reads "The file filename could not be saved. An unknown error has occurred. The file in the Upload a new file field was unable to be uploaded."
I've read through many threads and most seem to indicate a permissions problem. I've checked that all directories are configured properly. Public files are set as sites/default/files; private files are set as sites/default/files/private; and temporary is set as sites/default/files/tmp.
Then I found this error in the server logs:
[Tue Mar 27 10:49:26.932464 2018] [proxy_fcgi:error] [pid 20750:tid 140070898026240] [client nn.nnn.nn.nn:63784] AH01071: Got error 'PHP message: PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0\n', referer: http://ipaddress.com/file/add
Any ideas what might be wrong here?
Thanks,
CJ
This is definitely a permissions issue.
You mention the path of the different folders (public, private, and tmp), but that is a completely different thing.
What you need to check is that user running the webserver has permissions to write on those aforementioned folders.
Now, you don't mention what server are you using, so I'll assume you're running Apache, and the Apache user and group is called apache in CentOS and www-data in Ubuntu.
You should navigate to those folders (actually to the folder where this folders are placed) and type a ls -la sentence in the terminal, to get a list of permissions for them, as well as the name of the user that owns the folders.
The Apache user needs to access and write in those folders.
I have come across the similar problem once. Solution to this problem is to give the 'write' permission to 'others' as well on tmp directory. You might wonder that this is /tmp directory I am talking about, as while uploading a file it must pass through /tmp directory to the desired location.
So give the write (other) permission to /tmp and sites/default/files/tmp directory. Hope this will help.

SuiteCrm Install error

I´m installing suiteCrm version 7.10.2, license agree works fine, system check works fine but when i´m done with the database and sdmin config and hit next don´t appen anything. I check the console and get the ReferenceError: YAHOO is not defined
I´m installing in my domain and not locally.
In chrome console i get this error
install.php:14 GET https://www.digitalinput.pt/SuiteCRM-7.10.2/cache/include/javascript/sugar_grp1_yui.js?s=6.5.25&c= 404 (Not Found)
but the file exists and i add a 777 permission just to try and nothing changes!
Check your .htaccess file. I can see you are using a subdirectory so make sure you have
rewriteBase /SuiteCRM-7.10.2
That should fix the 404.
you need to give the 'cache' folder write access (Recursively)
if you have access to ssh, you can run this commmand on you terminal :
Note : you need to be in the crm folder path
chmod 0777 -R cache/
then you refresh the page back

Production install cake 2.0 in mediatemple/plesk

I'm currently trying to install cake on a new site hosted on mediatemple/plesk on a shared ip. I have added the unzipped cake package to the httpdocs folder (../httpdocs/cake/), which is the server default for the site, as instructed in the cake documentation. It did not however bring me to the cake installation page, so as instructed in the cake documentation i reset the DocumentRoot for the site. The solution for document root that i found online for plesk was to set document root in vhost.conf and vhost_ssl.conf in the conf folder for the site i wanted to redirect. each of these files now has the following line of code (only code in the document):
DocumentRoot /var/www/vhosts/(mydomain.com)/httpdocs/cake/app/webroot/
As it still does not load to the cake homepage/installation page (instead i get the apache test page...) i have continued to search online and in these forums, but just keep coming up with reiterations of creating the vhost.conf and vhost_ssl.conf files as i did above (same line of code and everything)
manually directing my browser through the filepath to cake/app/webroot/ and cake/app/webroot/index.php returns only a blank page.
Is there any other way to get this to direct to the installation page correctly so that i can start to build?
DocumentRoot /var/www/vhosts/(mydomain.com)/httpdocs/cake/app/webroot/
i'd say this will not work.
Your index.php you'll need to access for cake is in "/var/www/vhosts/(mydomain.com)/httpdocs/cake/" if i'm correct.
You should remove the DocumentRoot and then browse to: mydomain.com/cake/index.php
there you should see the cake page
(this should be working before you try to set your DocumentRoot somewhere else)

access static file in public_html/tmp without going trough controller in cakephp

I have uploaded my cakephp app to cpanel and adjust and configure it to works with cpanel. Everything mostly works, however i find out that try to retrieve static file from tmp in public_html result in error. It tries to go to controller i think.
My structure is like this :
/cakephp139
/cake
/vendors
/renttycoons <= this is app folder
/public_html
/tmp
/js
....
I tried to access www.domain.com/tmp/test.csv, but result in errors although the test.csv was there. This is the error :
Error: The requested address '/403.shtml' was not found on this server.
Any idea would be appreciated. Thanks
does it gives you cake like error? it seems like a permission error.
erorr 403 is forbidden error, not a not found or something like that. Your server gives you that error and tries to show you a page for that error that is not found so you are receiving a 404 for not having a page for a 403 error hehe.
It must be a permission error, try changing permission to 705 in the temp folder, your test.csv file included. If you are creating it with php, php normally creates them with the minimun permission, at least that happened to me... you may use chmod function in php to change the permissions after creating a file.

Resources