X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Oh my gosh what happened? (https://forum.x-cart.com/showthread.php?t=1112)

japanchick 01-05-2003 08:12 AM

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

shan 01-05-2003 09:45 AM

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() ?>

japanchick 01-05-2003 11:33 AM

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 =)

B00MER 01-05-2003 11:55 AM

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.

:arrow: http://smarty.php.net

japanchick 01-05-2003 12:04 PM

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

B00MER 01-05-2003 02:07 PM

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

Same deal except note the version number.

japanchick 01-05-2003 05:46 PM

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

B00MER 01-05-2003 06:09 PM

htaccess information:
:arrow: 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. :wink:

japanchick 01-05-2003 06:35 PM

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>

deb 01-06-2003 04:52 PM

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


All times are GMT -8. The time now is 04:27 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.