After you install VirtueMart you may get one of the following warning messages. We have had several questions about how to, and where to, set up the safe path. The server file structure is understandably confusing for beginners.
Messages you will get:
- “Warning, the safe path is empty, for safety reasons it is very important to create a folder in a path not accessible by an URL, create also a folder invoices in it to store your sensible data secure.”
Or, this error is given when updating an order status and results from not setting the path to your invoices directory.
- “Safe path / vmError: Path wrong to store invoices.”
- “vmError: Path wrong to store invoices, folder invoices does not exist “
The safepath is ideally one that is totally inaccesible by web visitors, but your program can reach it on the server. We’ll show lead you through ithe process in this tutorial.
Immediately after installation you get the warning.
The warning suggests you name the folder vmfiles and that you also set up an invoices directory. You won’t need to set up the invoices directory, just the safe folder. VirtueMart will create the invoices directrory for you.
What you name of the folder is optional, you don’t need to use the name they suggest, you can use any name you want.
Step 1: Use your file manager or FTP program to create a directory.
In the picture above, I’m using the cPanel file manager. I’ve highlighted the home directory. You will want to place the safe directory “above” your public_html directory if your server set up allows it. The public folder is accessible by the public, and the levels above that can’t be reached by a browser.
Add a new folder to this level. Your structure will look like this.
This is what it will look like after you create the folder. Notice that it is on the same level as public_html.
Step 2: Configure the template. Go to Configuration > Templates tab.
Step 3: Add the directory path
Type the complete path to the safe directory, /home/username/safedirectoryname/. Start from the very beginning and do not use a relative or shortened path like /vmsafe/. If you’re confused find the path to your public_html directory, and replace public_html with the name of your safe directory. In other words if /home/username/public_html/ just change it to /home/username/safedirectoryname/. Note that it starts and ends with a “/”.
Go back to the top of the page to find the Save icon and save your changes.
After saving you can see that virtuemart created the invoices directory for you. If it doesn’t you can always add it manually.
The warning message should no longer be visible, and your invoices are more secure.
- JS Jobs Data Dictionary: How to Add New Entity? - January 3, 2017
- JS Jobs Categories: How to Add New Categories? - December 30, 2016
- JS Jobs Message System: Front End Messages - December 30, 2016