VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Dosadon on April 10, 2012, 13:55:51 PM

Title: Warning message Safe path
Post by: Dosadon on April 10, 2012, 13:55:51 PM
I just upgraded from 2.0.2 to 2.0.4

After I upgraded i got this message in the Back End:
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. Our suggested path is for your system /home2/MY Domain path/public_html/vmfiles

And then on the front end I get this message if I continue shopping and go to a different page on my website:
Warning: unserialize() [function.unserialize]: Function spl_autoload_call() hasn't defined the class it was called for in /home2/My Domain path/public_html/My Website/components/com_virtuemart/helpers/cart.php on line 91

Please Help Need to publish my site LiVE like today!!!!

Thanks,
Don
Title: Re: Warning message Safe path
Post by: jenkinhill on April 10, 2012, 15:44:30 PM
1. http://forum.virtuemart.net/index.php?topic=98633.0

2. It is a php warning. Turn off Error Reporting in Joomla config/server/server settings (assuming J2.5.4)
Title: Warning message Safe path
Post by: cpetitclerc73 on April 11, 2012, 03:51:31 AM
A full server path is the path your system uses to define where your own files are located on the server (as opposed to files belonging to other users).
•You can determine the path while you are logged in via FTP (some programs will tell you this) or while using a File Manager tool in your Control or Administrative Panel (if your host provides one for you).

•You can create a pathinfo.php file. Open a plain text editor, and paste in the following:

<?php echo $_SERVER["SCRIPT_FILENAME"]; ?>

Save the text file as pathinfo.php. Upload the file to your server.
Now, type the URL to the file you just uploaded into your browser to view the full server path to that file.

•If none of these solutions work, you may need to ask your host for the full server path for your system and account.
Title: Re: Warning message Safe path
Post by: jenkinhill on April 11, 2012, 11:04:07 AM
No need to do that. Just look in Joomla System Information/Configuration File where the path is shown for tmp_path and for log_path. Just substitute your new directory name got logs or tmp.
Title: Re: Warning message Safe path
Post by: Milbo on April 13, 2012, 04:18:33 AM
much easier now cpetitclerc73 , just delete the whole safe path entry and a message will appear with your path.
Title: Re: Warning message Safe path
Post by: xpozay on April 22, 2012, 03:34:17 AM
While all the technical solutions are correct, I do believe the bigger issue is much simpler.  What are we meant to do?

For me, I know my administrator path through Cpanel (and also VM nicely tells us - when it is blank). 

I read this thread a few times and the other linked thread and still had no idea what to do.  So I did the natural thing to do and ignored it and proceeded to play with VM.  I noticed that message was still there at the top of VM and immediately concluded that there must be a configuration field for this somewhere.  Once I found the setting under templates, entered the safe path /home/adminname/vmfiles (I created vmfiles using cpanel) and problem solved.

My suggestion to the VM guys is to change your message during installation to say where to fix the problem.  Ie go to configuration/templates because when we see this message during installation it implies that I have an installation problem and not a configuration problem.

Perhaps something like this ....

Warning, the Safe path is empty.  For safety reasons it is very important to create a folder, not accessible by an URL, to store secure VM data such as invoices.  Our suggested path is xxxxxxxxxxxxxxxxxxxx.  Once you have finished the installation, please visit the Virtuemart configuration under Configuration/Templates/Media File Settings/Safe Path to enter your file path.

Where xxxxxxxxxxxxxxxxxx   is /home2/MY Domain path/public_html/vmfiles or whatever for that sever.


Title: Re: Warning message Safe path
Post by: curtisvision on May 16, 2012, 21:00:52 PM
can anyone tell me what i am doing wrong?
I followed the instructions here and still am getting the same error message.
any suggestions?
attachments show the folder i created and how i put it into the template section for safe path.

help?

thanks!  :-)

[attachment cleanup by admin]
Title: Re: Warning message Safe path
Post by: curtisvision on May 16, 2012, 21:40:58 PM
this is the error message i get?
Warning, the Safe Path is WRONG, 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. Our suggested path is for your system /home/content/37/3871037/vmfiles
Title: Re: Warning message Safe path
Post by: Milbo on May 16, 2012, 23:20:05 PM
Next version has the fix

I think your path is just missing the / at the end: /home/content/37/3871037/vmfiles/
Title: Re: Warning message Safe path
Post by: curtisvision on May 17, 2012, 03:44:22 AM
i read your post before... tried it both ways with and without the slash

no i get the post on the front end of my whole site...


Warning: require(/home/content/37/3871037/html/includes/version.php) [function.require]: failed to open stream: No such file or directory in /home/content/37/3871037/html/includes/framework.php on line 41

Fatal error: require() [function.require]: Failed opening required '/home/content/37/3871037/html/includes/version.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/37/3871037/html/includes/framework.php on line 41

Help?

:-\



Title: Re: Warning message Safe path
Post by: curtisvision on May 17, 2012, 03:48:02 AM
here is the screen shot of how i input it...

[attachment cleanup by admin]
Title: Re: Warning message Safe path
Post by: curtisvision on May 17, 2012, 04:05:48 AM
my website is in a complete lockdown from viewers right now...




[attachment cleanup by admin]
Title: Re: Warning message Safe path
Post by: Milbo on May 18, 2012, 17:57:58 PM
This has nothing todo with us, this is joomla,... looks like your provider changed the path of your web, without telling you.
Title: Re: Warning message Safe path
Post by: curtisvision on May 18, 2012, 18:08:33 PM
Milbo!  Thanks!  For the record... I HATE GODADDY! They have done nothing but create major problems for me and their support is crap! I appreciate your help and your thoughts on why this is happening is not surprising since it seems that every time I have a problem Godaddy is the problem. They have caused me to lose weeks in website production. For anyone reading this do not use Godaddy!

Do you have any suggestions on a knowledgable webservice provider that has experience with joomla and virtuemart?
Title: Re: Warning message Safe path
Post by: Milbo on May 18, 2012, 19:34:52 PM
Please go on this page http://extensions.virtuemart.net/

Use the banner at the bottom "cloudaccess.net". They are a cloudhoster speshitpilled on joomla and our partners. When they cant solve a virtuemart problem, they ask us and vice versa. I am quite sure you will appreciate it.
Title: Re: Warning message Safe path
Post by: curtisvision on May 18, 2012, 19:44:51 PM
Thanks! I got virtuemart to recognize a safe path that i put into the templates section. I actually created the path from the error message that I was getting on the front end. Example: /home/content/37/3871037/html/includes/      But... the front end still has the error message that has my website completely locked down.

Should there be a version.php or a framework.php file generated within the html folder I created for the safe path?


Warning: require(/home/content/37/3871037/html/includes/version.php) [function.require]: failed to open stream: No such file or directory in /home/content/37/3871037/html/includes/framework.php on line 41

Fatal error: require() [function.require]: Failed opening required '/home/content/37/3871037/html/includes/version.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/37/3871037/html/includes/framework.php on line 41

[attachment cleanup by admin]
Title: Re: Warning message Safe path
Post by: curtisvision on May 18, 2012, 19:48:12 PM
correction should there be a .php file within the includes folder not the html folder?    same question as prior post but wanted to clarify my question since I used the wrong folder name.

thanks!
Title: Re: Warning message Safe path
Post by: Milbo on May 18, 2012, 20:01:35 PM
The files are not vm
Title: Re: Warning message Safe path
Post by: ajmusic24 on June 03, 2012, 19:26:54 PM
Xpozay was on point with his message he submitted below.  Thanks Xpozay!

Quote from: xpozay on April 22, 2012, 03:34:17 AM
While all the technical solutions are correct, I do believe the bigger issue is much simpler.  What are we meant to do?

For me, I know my administrator path through Cpanel (and also VM nicely tells us - when it is blank). 

I read this thread a few times and the other linked thread and still had no idea what to do.  So I did the natural thing to do and ignored it and proceeded to play with VM.  I noticed that message was still there at the top of VM and immediately concluded that there must be a configuration field for this somewhere.  Once I found the setting under templates, entered the safe path /home/adminname/vmfiles (I created vmfiles using cpanel) and problem solved.

My suggestion to the VM guys is to change your message during installation to say where to fix the problem.  Ie go to configuration/templates because when we see this message during installation it implies that I have an installation problem and not a configuration problem.

Perhaps something like this ....

Warning, the Safe path is empty.  For safety reasons it is very important to create a folder, not accessible by an URL, to store secure VM data such as invoices.  Our suggested path is xxxxxxxxxxxxxxxxxxxx.  Once you have finished the installation, please visit the Virtuemart configuration under Configuration/Templates/Media File Settings/Safe Path to enter your file path.

Where xxxxxxxxxxxxxxxxxx   is /home2/MY Domain path/public_html/vmfiles or whatever for that sever.
Title: Re: Warning message Safe path
Post by: finbarr69 on June 28, 2012, 11:34:20 AM
Totally agree - the instructions need to be clear.  Also, I installed the latest version 2.0.6 today, and it still says to go and create the folder and suggests also to create a folder called invoices inside the vmfiles folder - still no mention of how to set the safe path.  I created the suggested folder and the invoices folder within, then went to Configuration -> templates to configure the path.  When I saved it, it said there was an infinite loop detected and it was unable to create the invoices folder and to do it manually.

Methinks the instructions need to be corrected as per your suggestion, but also to remove the bit about creating the invoices folder as it will be done automatically anyway.

Warmest Regards,

Brian

Quote from: xpozay on April 22, 2012, 03:34:17 AM

My suggestion to the VM guys is to change your message during installation to say where to fix the problem.  Ie go to configuration/templates because when we see this message during installation it implies that I have an installation problem and not a configuration problem.

Perhaps something like this ....

Warning, the Safe path is empty.  For safety reasons it is very important to create a folder, not accessible by an URL, to store secure VM data such as invoices.  Our suggested path is xxxxxxxxxxxxxxxxxxxx.  Once you have finished the installation, please visit the Virtuemart configuration under Configuration/Templates/Media File Settings/Safe Path to enter your file path.

Where xxxxxxxxxxxxxxxxxx   is /home2/MY Domain path/public_html/vmfiles or whatever for that sever.



Title: Re: Warning message Safe path
Post by: finbarr69 on June 28, 2012, 12:00:11 PM
Also noticed that the message about infinite loop detected and unable to create the invoices folder appears every time I save the configuration.  I found out this was because there was no / at the end of the safe path (although the message for the suggested safe path does not include a / at the end).

Surely if any path needs a / at the end, virtuemart should silently add it !

Brian
Title: Re: Warning message Safe path
Post by: mascafe on July 01, 2012, 13:20:58 PM
Hi,
One of my sites is using Plesk. I created the 'vmfiles' folder out the  path accesible by URL but Virtuemart was still showing the warning.
I was looking for a solution and finally I noticed that the folder was not accesible due to the open_basedir php directive. You have to add the full path of 'vmfiles' folder to it to make it work.
I hope this is helpful for someone.
Regards
Title: Re: Warning message Safe path
Post by: gldproducts on July 10, 2012, 16:08:18 PM
Quote from: curtisvision on May 18, 2012, 18:08:33 PM
Milbo!  Thanks!  For the record... I HATE GODADDY! They have done nothing but create major problems for me and their support is crap! I appreciate your help and your thoughts on why this is happening is not surprising since it seems that every time I have a problem Godaddy is the problem. They have caused me to lose weeks in website production. For anyone reading this do not use Godaddy!

Do you have any suggestions on a knowledgable webservice provider that has experience with joomla and virtuemart?

curtis, I have had the exact opposite experience with Godaddy. I have installed several dozen sites using all sorts of Joomla versions, even Mambo back in the day. Did you install Joomla yourself, or use Godaddy's wizard? I'd recommend doing it yourself, after you set up the databases of course. Anyway, glad to have support forums around.
Title: Re: Warning message Safe path
Post by: Milbo on July 10, 2012, 16:26:23 PM
Quote from: finbarr69 on June 28, 2012, 12:00:11 PM
Surely if any path needs a / at the end, virtuemart should silently add it !
is done in 2.0.8
Title: Re: Warning message Safe path
Post by: Quiiger on July 13, 2012, 12:08:12 PM
Hi,

I've got this to work today it's quite easy when you know what to do, so ill try to explain:
First of all you need to use a ftp program if aren't already ( I use Filezilla)
Create a new folder on your deskop called vmfiles and upload it on your website (not in any other folder)
so in the same directory you should have administrator, image ect...

Now go to CPanel/media manager copy the directory to your image folder
for example my was:

/customers/8/2/8/domain/httpd.www/images

Copy and exchange images for vmfiles

now it's supposed to look like this

/customers/8/2/8/domain/httpd.www/vmfiles

cope the link into configuration/templates/Safe Path.

I hope I could help! :)
Title: Re: Warning message Safe path
Post by: Milbo on July 13, 2012, 17:18:41 PM
This is wrong and now everyone can access the path,

the correct path would be here /customers/8/2/8/domain/vmfiles, not within the httpd.www.
Title: Re: Warning message Safe path
Post by: finbarr69 on July 28, 2012, 10:14:02 AM
I found out today, another reason for this error (when you have the correct path already set) is if your open_basedir php setting does not allow you access to your safe path folder.  Add your path  (for example /home/content/37/3871037/vmfiles ) after a colon at the end of your open_basedir path, either in your php.ini file or in Plesk if you use it.

Eg, your open_basedir path might be:

/home/content/37/3871037/httpdocs/:/tmp/

You would make it:

/home/content/37/3871037/httpdocs/:/tmp/:/home/content/37/3871037/vmfiles

Hope that helps someone



Quote from: curtisvision on May 16, 2012, 21:40:58 PM
this is the error message i get?
Warning, the Safe Path is WRONG, 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. Our suggested path is for your system /home/content/37/3871037/vmfiles
Title: Re: Warning message Safe path
Post by: Kati on December 27, 2012, 14:20:37 PM
Hi everyone!

I´m writing this down, because there might be others who are not as skilled as you. I feel I´m not  :) And because of that I don´t want "to think too difficult" (sorry my bad english).

1. True, the path is missing. It needs to be done.
2. Copy your servers path for example from your Filezilla.
3. Put the path into Virtue Marts Safe Path at the "Templates" tab (virtue Marts is pointing the path to you).

This is all the information needed, this I didn´t get clearly from all of these responds in here.

Images below....

- Kati

[attachment cleanup by admin]
Title: Re: Warning message Safe path
Post by: guybr on September 16, 2014, 07:25:58 AM
my input:

One problem users may be facing is that the suggest safe path includes "/html/" directory in it - but the VM tutorial recommends removing it (http://docs.virtuemart.net/faqs/37-configuration/110-how-to-set-the-safe-path.html (http://docs.virtuemart.net/faqs/37-configuration/110-how-to-set-the-safe-path.html)).

In my case, when I originally followed their instructions, I did create the /vmfiles/ directory in the root menu - but after ongoing error messages, discovered that the correct address requires including the "/html/" segment that the tutorial suggested removing...
Title: Re: Warning message Safe path
Post by: GJC Web Design on September 16, 2014, 09:30:54 AM
The "suggested path" is just a suggestion and can't be accurate for all server setups and folder structures.

It is calculated by going one back from your Joomla install - if your Joomla is in a subfolder on the server then it will be wrong.

Just simply look at the "Path to Temp Folder" in your Joomla admin ->Global Config->Server

You need your Safe Path just above your public folder - can be called public_html, www, web etc

They test is if you put your safe path in a browser /http://www.mysite.com/mysafefolder and can see it - its wrong!