After you install VirtueMart you may get one of the following warning messages inn the configuration section.
This is sometimes hard to understand what it means.
Messages you will see.
- "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 you how to set this up in this tutorial.
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. VirteuMart 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.
Use your File Manager to create a directory.
Login to your cPanel accoung and go to the file manager.
You will want to place the safe directroy "above" your public_html directory if your server set up allows it. The public folder is accessible by the publc, 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.
Configure the template.
Go back into virtuemart to the Configuration >> Templates tab.
Look for the Media File Settings
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 publc_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.
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.