Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Oh my gosh what happened?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-05-2003, 08:12 AM
 
japanchick japanchick is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 64
 

Default Oh my gosh what happened?

I am so worried and confused.....my site was working perfectly for the past 4 months, then all of a sudden I check my site (http://www.glamour-hut.com/ghshopping/customer/home.php) and this is what I get:

Warning: SAFE MODE Restriction in effect. The script whose uid is 320 is not allowed to access ../templates_c/151/1512206380/0.php owned by uid 15 in /home/sites/site82/web/ghshopping/Smarty-2.1.1/Smarty.class.php on line 641

Warning: Failed opening '../templates_c/151/1512206380/0.php' for inclusion (include_path='') in /home/sites/site82/web/ghshopping/Smarty-2.1.1/Smarty.class.php on line 641

Can anyone please help me??

Thanks so much

Japanchick
Reply With Quote
  #2  
Old 01-05-2003, 09:45 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

It looks like your host may have switched on safe mode.

Try running cleanup.php and see if that helps then create a php file with this in it to see how things are set up.

Code:
<?php phpinfo() ?>
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 01-05-2003, 11:33 AM
 
japanchick japanchick is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 64
 

Default F$*A&(DSA*&

Ugh I have no idea what is happening. My hosting company said this:



Quote:
Response: Thank you for your email.

To maintain the security of the server we cannot turn safemode off:
But i believe your script can be fixed if all the files are owned by the same user.

I can change the ownership on a directory if you wish, you you can try to reupload
the files with the necessary user.

Let me know how things go!



Thank God I've backed up everything, including the my x-cart sql database.

I am thinking of just reinstalling everything, using the brand new X-Cart release. I just have one question to ask.....my previous X-Cart version was 3.20. I was just wondering:

Since i made a backup of my SQL database from the 3.20 cart, will it be possible to restore it IN VERSION 3.31? i.e. are the databases exchangable?

If not, can anyone suggest the best route for me? Im losing alot of business as we speak =)...and to make matters worse, the guys at X-cart removed version 3.20 so Im not sure what i should do.....I definetly dont want to reinput all my inventory again thats for sure =)
Reply With Quote
  #4  
Old 01-05-2003, 11:55 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

I'm not totally sure if any of the x-cart related php requires safe_mode enabled but if its because of smarty:

Quote:
2.3.1
-----

The mtime on compiled files will now match the source files, in the case where
the source file may not get the current timestamp, recompiling will still work
as expected. Proper support for open_basedir has been added, so Smarty should
work correctly in safe mode. Added a few new features such as formattext block
function, strip variable modifier and optgroup support for html_options. Also
other minor bug fixes, see the Change Log.


Might just try upgrading Smarty to 2.3.1 and see if it helps.

http://smarty.php.net
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #5  
Old 01-05-2003, 12:04 PM
 
japanchick japanchick is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 64
 

Default That seems possible

cool boomer, but how would i go about upgrading Smarty? do i just replace files or something (sorry but im kinda computer illiterate when it comes to php/smarty)

cheers
japanchick
Reply With Quote
  #6  
Old 01-05-2003, 02:07 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

http://forum.x-cart.com/viewtopic.php?t=289

Same deal except note the version number.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #7  
Old 01-05-2003, 05:46 PM
 
japanchick japanchick is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 64
 

Default Hmm...

Hi tried upgrading my smarty, but instead of the previous error, i get this:

Fatal error: Cannot instantiate non-existent class: smarty in /home/sites/site82/web/ghshopping/smarty.php on line 13

does anyone know what this means?

also, boomer, you stated that it was possible to create an .htaccess file that would disable safe mode...

What code do i exactly put in that .htaccess file?

thanks
Reply With Quote
  #8  
Old 01-05-2003, 06:09 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

htaccess information:
http://forum.x-cart.com/viewtopic.php?t=1439

Also make sure you edit smarty.php to reflect the new 2.3.1 smarty directory like so:

Code:
if (!@include("../Smarty-2.3.1/Smarty.class.php")) @include("./Smarty-2.3.1/Smarty.class.php");

This is why your getting the error is because it isn't able to locate the class file(s).

hth.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #9  
Old 01-05-2003, 06:35 PM
 
japanchick japanchick is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 64
 

Default so...

Well, changing smarty doesnt work because I get the following error:

Quote:
Warning: Smarty error: problem creating directory "../templates_c/%%151/%%1512206380" in /home/sites/site82/web/ghshopping/Smarty-2.3.1/Smarty.class.php on line 589

Warning: Smarty error: problem writing '../templates_c/%%151/%%1512206380/home.tpl.php.' in /home/sites/site82/web/ghshopping/Smarty-2.3.1/Smarty.class.php on line 589

Warning: unable to create file ../templates_c/%%151/%%1512206380/home.tpl.php because No such file or directory in /home/sites/site82/web/ghshopping/Smarty-2.3.1/Smarty.class.php on line 968

Warning: Unable to access ../templates_c/%%151/%%1512206380/home.tpl.php in /home/sites/site82/web/ghshopping/Smarty-2.3.1/Smarty.class.php on line 686

Warning: Failed opening '../templates_c/%%151/%%1512206380/home.tpl.php' for inclusion (include_path='') in /home/sites/site82/web/ghshopping/Smarty-2.3.1/Smarty.class.php on line 686

So I think Im going to have to create an htaccess file Just for double checking, in order to DISABLE SAFE MODE i input the following into my htaccess file? I just wanna double check because it says php_flag safe_mode ON instead of off, so im not sure what to put=)

<IfModule mod_php4.c>
php_flag safe_mode On
</IfModule>
Reply With Quote
  #10  
Old 01-06-2003, 04:52 PM
 
deb deb is offline
 

Advanced Member
  
Join Date: Dec 2002
Location: California
Posts: 60
 

Default

I spent DAYS working on a safe mode work around (with 3.1 or 3.2 or something, I forget exactly) with my host.

It's a nightmare. I gave up and my host transferred me to a machine where he could turn safe mode off.

It's primarily a problem with the files in the templates_c dir -- Apache owns them, writes to them, etc. PHP thinks this is a security problem because it doesn't match the owner of the rest of the stuff.

I don't know if other Smarty/X-Cart versions will have this same issue, but what you are describing sounds much like my nightmare...

deb
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:07 PM.

   

 
X-Cart forums © 2001-2020