I'm not programmer and I don't know coding.
I use opencart 2.1.0.1. I cannot access "customer/customer", "customer/customer groups", "customer/custom fields" page it said "You do not have permission to access this page, please refer to your system administrator". Well I'm the only administrator.
All access permission has been selected from settings but I didn't see customer/customer, customer/customer groups and customer/custom fields from permission listings.
So Daniel Kerr suggest me to replace json with the one from master branch.
I replace system/helper/json.php with the code from this link [Branch Master for json.php][1]
I edited json.php by using putty.
But still cannot access customer page. Please someone guide me how to replace json with master branch.
To get code from another branch you have 2 options. One is to check out that one file.
Got checkout master -- /path/to/file.json
The other is to use git show
Git show master:path/to/file.json > path/to/file.json
The first option is probably the preferred one
Make sure that used folders has a insufficient privileges. Try chmod -R 777 for /var/www/your_project folder. I think your problem is in the lack of privileges for the project files.
If it will not help, check your .htaccess file and allow/deny rules (if you getting "access denied" from web browser). See https://github.com/opencart/opencart/blob/master/upload/.htaccess.txt and don't ignore this rules by file (maybe you didn't):
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename htaccess.txt to .htaccess.
# For any support issues please visit: http://www.opencart.com
I finally found the solutions. There are missing files in /www/my_project folder. Recovered the missing customer.php files and resolved! Thanks everyone
Related
So I am trying to get Symfony working on my server by following these install instructions.
http://symfony.com/doc/current/book/installation.html#book-installation-permissions
I got to the part where I ran this command in console in the directory where I wanted the framework to be installed.
symfony new my_project_name
I then followed these instructions to set my web root directory to /web as I believe I'm supposed to do?
It installed all the files correctly since I can see them in the folder. I made sure to restart apache and I'm positive document root is in the correct location.
http://tecadmin.net/how-to-change-document-root-of-primary-domain-in-cpanel/#
Once I did this I was supposed to be able to test the installation, but nothing seems to happen except that 406 error?
This is the exact error I get.
An appropriate representation of the requested resource /app.php could not be found on this server.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
I'm not sure what else to do.
Please note, that since I'm using CPANEL I can't change the virtual host configurations of apache if that is the issue, so I'm looking for a CPanel specific answer. Thank you!
Okay so I finally figured out what to do, I had 2 problems. Because I installed as the 'root' user I had to run the following command on the symfony installation.
chown -R devdistribution:devdistribution .
In my case, my username is devdistribution but you would just put your own. Make sure to do this on the top level not just the /web folder.
I knew this was one of the errors because the apache log said something along these lines
Mismatch between target UID (520) and UID (501) of file "/home/devdistribution/public_html/distribution_tech/web/app.php"
This fixed the 500 error, but not the 406. To fix the 406 error you need to login into WHM and type modsecurity to find it in the search field.
go to the configuration option for it, you will see this.
Rules Engine SecRuleEngine
This setting controls the behavior of the rules engine.
Process the rules.
Do not process the rules.
Process the rules in verbose mode, but do not execute disruptive actions.
Select 'Do not process the rules'. Then save at the bottom. This fixed the issue for me and I was able to see the opening symfony screen!
However, this I'm sure leaves security vulnerabilities now...so I still need help on the proper way to handle mod security with symfony in this case if anyone knows? I'll make a separate question for this.
Step 1:
Login to your cPanel account and start searching for the file manager icon under the files section.
Step 2:
As always, you need to make sure, you see the public_html directory. Depending on the web hosting you have, you may also see the home directory after opening the file manager.
Step 3:
Find the .htaccess file and right-click to edit.
Step 4:
After choosing an edit option, you see a popup asking to disable encoding if you wish. You have to click on the Edit button to continue.
Step 5:
On a new tab, you can see many rewritten rules. You have to add the code to the .htaccess file.
<IfModule mod_security.c>
SecFilterEngineOff
SecFilterScanPOSTOff
</IfModule>
https://github.com/kokspflanze/PServerCMSfull
^ I've been trying to install this website since 2 days, and I've done everything mentioned there properly, I dunno if I should do extra steps/modifications to the files. First, localhost was working fine but the when I surf localhost/pservercmsfull I see the directory files/folders but not the site content, a screenshot to explain what I meant: http://prntscr.com/7vuu4x
Then I've checked httpd.conf again and found a typo, I've fixed it then localhost started saying the following; Forbidden
You don't have permission to access / on this server.
Thanks for reading, if you know any possible solution/something I should do but not mentioned in github, please let me know what is it and some hints to do it.
you have to set the DocumentRoot to the public directory, that is the current problem.
i write this steps there https://github.com/kokspflanze/PServerCMSfull#step-3-configuration-for-apache
The simple solution is to either rename 'init_autoloader.php' to 'index.php', or to create a new file called 'index.php' which consists of the following:
<?php include_once('init_autoloader.php'); ?>
In your Apache2 vhosts file, there is a parameter called 'DirectoryIndex' which defines which filename to render, if present, instead of showing the directory listing. More information on that can be found here.
I checked all the relevant permissions to groups of users do not have any problem, why is wrong?
PHP-fpm users and user groups is nginx
Nginx users and user groups is nginx
WP-content user group is the highest of all permissions
Try this.
go to www.your-domain.com/your-wp-dir/wp-admin/options.php
find option uploads_use_yearmonth_folders
set value to 1
This issue is related to paths
Go to DASHBOARD > MISCELLANEOUS > UPLOADING FILES and check the path to see if it is correct
Check
uploads_use_yearmonth_folders
and
upload_path
in wp-admin/options.php
and verify that upload_path is correct
may be this one helps
This type of issue basically they are just clone or transferred to a new domain name or some other locations, so their media settings in uploading files were affected.
Here's my solution for this:
On your WP Dashboard go-to Settings then Media and check your Uploading Files then look for this section "Store uploads in this folder", mostly this will be affected if you just clone the old domain to a new domain-name, change the path where your domain-name is located. You can check this using Cpanel then using File Manager, if you are familiar using this then you know what i'm saying :)
Please see screenshot below for more details regarding to Media Settings in Wordpress.
Media Settings -screenshot-
well i had writen tutorial to relosve this issue ... might be helpful to you....
Unable to Upload Files in WordPress After Moving to Another Server?
I'm having a problem with a PHP website running on IIS 7 on Windows Server 2008.
There is one line of code calling mkdir which is erroring and the error log reads:
"... permission denied ..."
I have ruled out anything to do with folder permissions (I have tried multiple groups: Everyone, Users, IUSR, Network Service etc. with no luck).
I need to know how mkdir works, does it check the read-only attribute of the parent folder?
If so, then this could be the root of the problem as all folders in Windows Server 2008 are marked as "Read Only" and the checkbox is greyed-out - Microsoft say it is "by design" but I think it is really "bad design".
Please help.
P.S. The line of code which errors can be found here https://github.com/LimeSurvey/LimeSurvey/blob/070d255ba381d7abcd231d7c9e0c7d11f5578c97/admin/templates.php#L1182 it is line 1182.
SOLUTION:
It was a permissions issue after all!
We were applying permissions to the wrong folder (smacks hand to forehead)
There are two "Templates" folders: /Templates and /Uploads/Templates
/Template is for default templates whereas /Uploads/Templates is for user-created ones
We gave the "Users" group r/w/execute/modify permissions to /Uploads/Templates folder
Whereas previously we were applying permissions to /Templates
To debug this I used echo to output the $target value
LESSONS LEARNT:
Always read the error message - it said "permission denied" and I didn't believe it
Don't assume the obvious to be true - /Templates wasn't the right folder
If the code is erroring then debug the code and don't try to guess the problem
Debug the code using simple techniques such as outputting variable values - e.g. echo
Listen to the majority - most people here were right in saying IT IS A PERMISSIONS ISSUE!
Most errors have a simple fix - don't go looking for something complex
Bounty awarded to #BOMEz because of the useful quote from mkdir() documentation which indicated that I should double-think the permissions. #BOMEz also provided a tailored answer and interacted with me via comments which helped.
As a test (preferably in a development environment) give the IIS user full access to the parent folder. If this makes it work, slowly start taking away privileges to see which ones you need.
Try changing:
if(mkdir($target,0777))
to:
if(mkdir($target))
Windows ignores the mode option. Might be some weird bug causing it to fail.
Additionally for your $target variable could you try forcing it to link to the full Windows path? Such as C:\Program Files\ IIS\...
I've ran into situations with windows before where access was denied attempting to use a relative path, but the full path works just fine.
EDIT:
Looking at the comments on the documentation for mkdir() one commenter mentions that you might also need to add execute permissions to the user:
If you're getting a Permission Denied error, but are certain the
permissions and ownership where you are trying to create the directory
are correct, check again:
The location where you are trying to create the directory in must have
the Execute permission for the owner trying to create it, regardless
of if the folder is Readable, or Writable.
This may be obvious to some, but was not to me at first. Hopefully
this will save you the trouble I went through.
Since you didn't mention a control panel of any sort I'm going to assume you have access to the server either physical or remote desktop. I'm also going to assume you checked your php.ini settings.
That being said, there is a work around for some of these permission problems.
You will need to create an administrator account (and add it to the administrators group) for this site to use or simply use your administrator credentials.
Open the IIS manager
Expand Sites
Highlight the site in question
On the right side of the screen click 'Basic Settings', a dialog box should pop up.
Click the button at the bottom that says 'Connect as...'
Select 'Specific user' and then click the 'Set...' button
Type the user name and password of either your account or the account you created.
Hit 'Ok' button 3 times.
This is a bit of a sledge hammer fix since it will grant full unrestricted access to the file system from your scripts.
If you created a new user and you want to maintain some level of script security then you can try pulling the user out of the administrators group and then giving it full permissions on only that site with the following:
Highlight site
Right-Click, Edit Permissions
Security Tab
Click 'Edit' button
Click 'Add' button
Click 'Advanced' then 'Find Now'
Double click on the user you created
Click 'Ok'
Highlight your user, tick the box under allow that is next to full control
click 'Ok' twice
If asked, select that you want to apply to all directories and files.
~
If your still having issues then there is a good chance your php setup is configured incorrectly or corrupt. (Safe mode turned on maybe?)
Following is the explanation of permissions.
Read
On a File: this means reading content of the files
On a Directory: it means viewing the contents of the directory, namely, being able to use ls or dir
Write
On a File: this means being able to edit content of the files
On a Directory: it means being able to create/modify content of the directory, namely making new files or folders in that directory.
Execute
On a File: this means executing the code from the file (for scripts/executables)
On a Directory: it means, entering the directory. You can not cd into that directory without this permission.
--
So, now that makes it clear the answer to your problem (as you guessed correctly), for making new directory or writing new files into the directory you need write permission on that directory. So for making folders into say C:/your_folder/ you need, write and execute permissions on that folder. (Yes you need execute too, as apparently for mkdir you need to go inside the folder first.)
One of the issues that we run into quite often is that files have been moved from any location to the websites location, maintaining the original permissions instead of inheriting the permission needed by the application pool user of the pool that's beeing used by the website.
So one good thing to try would be to right click your document root folder, go to properties and then the security tab. Press the advanced button, check the checkbox a "Replace permission entries on all child objects with entries shown here that apply to child objects". That way you can atleast be sure all your permissions are set on all subfolders and files.
We nerver had any problems with the read only attribute, even though this is checked for all our folders. (grayed out/checked). So i doubt that is your problemen.
I have installed Magento on live server. But the problem is that its not loading css. I have double checked .htaccess file but There is nothing any issue in it. I have given full access permission on Var, Media & app/etc folder.
Please let me know that what is the issue ?
Thanks in advance.
Alex S.
In my case it is due to .htaccess file. In my project there is an .htaccess file in /skin folder with following content:
Header set Access-Control-Allow-Origin "*"
I have removed this file and it works fine.
View the source of your page and click the css links, if it is pointed correctly it should bring you to the css page.
For htaccess, make sure the RewriteBase / is uncommented. So from #RewriteBase / to RewriteBase /. Check the error log if possible. And, another thing i remember, you may need to clear your cache and tmp folder too. Do this first, clear cache and tmp folder.
At the time of installation magento asked about secure URL and unsecure URL. These urls must be changed when we change our server. If you couldn't access admin >> system >> configuration
Then you could change it from database. Find in table
dbprefix . core_config_data
change path
web/unsecure/base_url to your new domain name
web/secure/base_url to your new domain name
Note : Please don't forget to put forward trailing slash at last. like: www.newdomain.com/
Thanks.
When you changed base_url path in Mysql
as : web/secure/base_url = http://example.com/
Must mention / at the end of .com
Then clear session and cache.
Then restart MySQL and Apache2.
Similar for unsecure/base_url.
I will suggest follow step by step.
There is 2 case:
1) You can see your CCS directly from URL, so browser load it by direct URL, example: http://your-magento/skin/frontend/your-package/your-theme/css/styles.css, so in this case you should check points connected with Magento:
Check/Correct Base URL from config or DB
Clear Cache
Clear Sessions
Check Configurations
2) If your CSS is not loading by direct URL. So in this case it is not connected with Magento at all.
In this case you should check follwoing points:
Check files and folders permissions
Check rewrite rules and modules
Server Log files to find error
Check .htaccess for existance and for correctness.
Important, check all .htaccess files in all sub-folders.
In my case, I differed this 2 cases and start seaching my issue in second case.
I found .htaccess in folder /skin/frontend/your-package/your-theme/
The content was following:
Order deny,allow
Deny from all
Remove this file and your CSS files will be loaded.
I don't know how this file was created, I don't have file like this in parent theme. I think Magento is automatically created it. Be attentive and follow changes with GIT.
Check permissions for the folders like app/etc, var, media folders. Try to give 777 permissions to those folders. Recently I have faced the same problem and I tried with this. Then my site works fine.