ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

$this->db->cache_on(); doesn't work on server

January 26, 2010 2:58pm

Subscribe [3]
  • #1 / Jan 26, 2010 2:58pm

    DeaD SouL

    46 posts

    Hi guys..

    I’ve created this cms faipskuwait.com using codeigniter framework

    but i do have problem with database caching, it works just fine on my local server

    but when i’ve uploaded it on the internet.. it doesn’t work.. and I don’t know why

    is there anything that should be enabled on the server or something?


    btw, it creates the folders based on the controllers and methods, without the files that storing the results

    Best Regards

  • #2 / Jan 27, 2010 2:37pm

    DeaD SouL

    46 posts

    any idea..?

    thanks

  • #3 / Jan 28, 2010 3:25pm

    DeaD SouL

    46 posts

    I’ve activated the logging system

    and this is what I got about the caching:

    ERROR - 2010-01-28 14:07:25 --> Severity: Warning  --> fopen() [<a href="http://function.fopen">function.fopen</a>]: SAFE MODE Restriction in effect.  The script whose uid is 10003 is not allowed to access /*****/caches/default+index owned by uid 48 /*****/system/helpers/file_helper.php 90
    
    ERROR - 2010-01-28 14:07:25 --> Severity: Warning  --> fopen(/*****/caches/default+index/e93229248cba8e7a05bde6bf22bef54f) [<a href="http://function.fopen">function.fopen</a>]: failed to open stream: Success /*****/system/helpers/file_helper.php 90


    I think its because of the safe mode and folders owners

    any idea how to solve this…!!

  • #4 / Jan 28, 2010 3:28pm

    Sbioko

    382 posts

    You need to give those folders correct permissions. It is all about it.

    is not allowed to access

  • #5 / Jan 28, 2010 3:31pm

    Sbioko

    382 posts

    And, also check your safe_mode variable in php.ini. Turn it off. Of course, if you have access to it.

  • #6 / Jan 28, 2010 3:35pm

    DeaD SouL

    46 posts

    but the folder under caches/ have been created automatically by codeigniter, with 777 permissions

    besides i wrote a code that deletes all the caches when i login in the cms control panel

    so, you don’t really mean that i should create the folders manually by ftp each time I login in control panel.. because when i create them they’re bee owned by me, but when php creates them, they’re owned by apache

    thanks

  • #7 / Jan 28, 2010 3:38pm

    Sbioko

    382 posts

    so, you don’t really mean that i should create the folders manually by ftp each time I login in control panel.. because when i create them they’re bee owned by me, but when php creates them, they’re owned by apache

    Of course, no 😊 So, check the safe_mode variable. It needs to be turned off.

  • #8 / Jan 28, 2010 3:46pm

    DeaD SouL

    46 posts

    Oh good :p

    but is not there any other solution instead of turning the safe mode off??

  • #9 / Jan 28, 2010 4:28pm

    Sbioko

    382 posts

    I think, no. Do you need safe mode? Why? There is a gold rule for web developers: never turn safe mode on!

  • #10 / Jan 28, 2010 5:20pm

    DeaD SouL

    46 posts

    to be honest, never heard of that rule..

    in fact I think its increasing the security if safe mode is on

    I believe thats why I turned it on

  • #11 / Jan 28, 2010 6:08pm

    cahva

    662 posts

    Theres so many exploits on safe mode in the history of PHP that safe mode itself is not really very safe 😊 On linux filesystems(ext based atleast) safe mode can be a pain in the arse as apache with mod_php will write files with apache as user and group. This can be finetuned with acl’s on the system by host but the acl’s can be changed by the user with bad chmodding so the acl’s would have to be defined again.

    I work in a hostingfirm and we use also FreeBSD based servers which are more “safe mode” friendly and thats because on freebsd apache writes files with apache user but with users own group and therefore we can set safe_mode_gid, which is safe mode but it uses the group instead of user to restrict usage. So in FreeBSD servers those “The script whose uid is ...” are not very common, but with linux + apache + mod_php that can happen all the time and the only SMART way to get rid of this, is to disable safe mode or use a server which runs PHP as cgi.

    But as I said, safe mode itself is not(and should not be) the only protection for server so.. just ask your host to turn the safe mode off 😊

  • #12 / Jan 28, 2010 6:34pm

    DeaD SouL

    46 posts

    well then.. i guess i’m going to turn it off

    thanks a lot guys 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases