spaceman Posted September 15, 2016 Share Posted September 15, 2016 Hello I'm developing a site on 1.6.1.6 (currently in maintenance mode) and it's using 99-100% of my server CPU all of the time. I've checked via SSH and it simply shows a PHP command coming from /bin/php -d open_basedir= -d error_reporting=E_ERROR -c /var/www/vhosts/system/***.co.uk/etc/ I've tried playing about with CCC settings to no avail, but read on the following thread that installing Xcache worked for somebody: https://www.prestashop.com/forums/topic/490187-1613-high-cpu-load/ Is there something else I should look at first as it's not a problem I've had before with Prestashop? Could it be an error with a script on a permanent loop? Server is CentOS 6.5 wiht PHP 5.3. Thanks Scott Link to comment Share on other sites More sharing options...
El Patron Posted September 15, 2016 Share Posted September 15, 2016 Hi Scott, sorry you have issue, my first thought is to run at 'least' 5.6 php...no point in building shop on old version of php. Then see if improvement.... Link to comment Share on other sites More sharing options...
spaceman Posted September 15, 2016 Author Share Posted September 15, 2016 Thanks for the quick reply, El Patron. I always get a bit worried when it comes to changing server components! I've installed PHP 5.6 but the front end now won't load. I get the following error: Fatal error: Uncaught --> Smarty: unable to write file /var/www/vhosts/***.co.uk/httpdocs/cache/smarty/compile/4e/96/77/wrt57da99f2d77557_09880881 <-- thrown in /var/www/vhosts/***.co.uk/httpdocs/tools/smarty/sysplugins/smarty_internal_write_file.php on line 46 Any idea what's wrong there? Thanks Scott Link to comment Share on other sites More sharing options...
El Patron Posted September 15, 2016 Share Posted September 15, 2016 that looks to be permission issue....could be a couple things, folder/file permission is wrong...or group owner is not your domain name, i.e. you don't have proper group owner. and you want to beat that horse to get 5.6...you will be much happier with performance... note: typical permissions 755/foldes 644 files 664 for .htaccess Link to comment Share on other sites More sharing options...
spaceman Posted September 15, 2016 Author Share Posted September 15, 2016 (edited) Hmmm, I've tried setting the folders mentioned in the error message to 777 but still not working. When I clear cache in the back office, I get the following error: Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(/var/www/vhosts/***.co.uk/httpdocs/cache/smarty/compile/db): failed to open dir: Permission denied' in /var/www/vhosts/***.co.uk/httpdocs/tools/smarty/sysplugins/smarty_internal_utility.php:242 Stack trace: #0 [internal function]: RecursiveDirectoryIterator->__construct('/var/www/vhosts...', 0) #1 /var/www/vhosts/***.co.uk/httpdocs/tools/smarty/sysplugins/smarty_internal_utility.php(242): RecursiveDirectoryIterator->getChildren() #2 /var/www/vhosts/***.co.uk/httpdocs/tools/smarty/Smarty.class.php(1469): Smarty_Internal_Utility::clearCompiledTemplate(NULL, NULL, NULL, Object(SmartyCustom)) #3 /var/www/vhosts/***.co.uk/httpdocs/classes/SmartyCustom.php(99): Smarty->clearCompiledTemplate() #4 /var/www/vhosts/***.co.uk/httpdocs/classes/SmartyCustom.php(109): SmartyCustomCore->check_compile_cache_invalidation() #5 /var/www/vhos in /var/www/vhosts/***.co.uk/httpdocs/tools/smarty/sysplugins/smarty_internal_utility.php on line 242 Edited September 15, 2016 by spaceman (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted September 15, 2016 Share Posted September 15, 2016 (edited) omg 777! give me like 500 push ups....never do that... you need to do a full review of how permissions work...especially on owner of file. I think you created this space manually, and not via a hosting control panel.... http://mason.gmu.edu/~montecin/UNIXpermiss.htm Edited September 15, 2016 by El Patron (see edit history) Link to comment Share on other sites More sharing options...
spaceman Posted September 15, 2016 Author Share Posted September 15, 2016 Haha, I do get a bit lost with it all once I start meddling but I just tried it to briefly give me full access, in case I was missing something. It was pointless anyway because it still didn't work! It's an install via Plesk so everything was pretty standard. I'm getting myself into a mess now, I think it might be best if I copy the db and the images and do a fresh install to start again? Link to comment Share on other sites More sharing options...
El Patron Posted September 15, 2016 Share Posted September 15, 2016 (edited) Haha, I do get a bit lost with it all once I start meddling but I just tried it to briefly give me full access, in case I was missing something. It was pointless anyway because it still didn't work! It's an install via Plesk so everything was pretty standard. I'm getting myself into a mess now, I think it might be best if I copy the db and the images and do a fresh install to start again? yes, I use plesk so you should not be having group owner issue...it will create owner with your domain name.... what are permissions for folder cache? how far along are you with catalog build? Edited September 15, 2016 by El Patron (see edit history) Link to comment Share on other sites More sharing options...
spaceman Posted September 15, 2016 Author Share Posted September 15, 2016 I think I've reverted them all back to the original now, so folder permission for /cache is rwx r-x r-x (I believe I'm right in thinking that's 755?). Quite far along with the catalogue build really, but I'm assuming it should be quite straight forward if I just copy the db and start again? Or am setting myself up for a big fall...? Link to comment Share on other sites More sharing options...
El Patron Posted September 15, 2016 Share Posted September 15, 2016 (edited) I think I've reverted them all back to the original now, so folder permission for /cache is rwx r-x r-x (I believe I'm right in thinking that's 755?). Quite far along with the catalogue build really, but I'm assuming it should be quite straight forward if I just copy the db and start again? Or am setting myself up for a big fall...? I'd fix issues....not rebuild....I'm sure you can get it sorted without resorting to doing anything drastic.... Edited September 15, 2016 by El Patron (see edit history) Link to comment Share on other sites More sharing options...
Denver Prophit Jr. Posted September 15, 2016 Share Posted September 15, 2016 Bash commands to fix file and folder permissions recursively from web root [ /home/username/public_html or /var/www/httpd/: find . -type f -exec chmod 0644 () \; find . -type d -exec chmod 0755 () \; Post your /etc/.my.cnf and apache configuration and physical memory installed. Also copy and paste the command free -h 1 Link to comment Share on other sites More sharing options...
spaceman Posted September 15, 2016 Author Share Posted September 15, 2016 Thanks Denver, I need to have a little look into that to work out how to do that via SSH (I have multiple sites on the server and I'm a novice so haven't managed to work it out yet). I need to pop out for a while now but I'll try again later - thanks both of you for your help, much appreciated. Link to comment Share on other sites More sharing options...
Denver Prophit Jr. Posted September 15, 2016 Share Posted September 15, 2016 Thanks Denver, I need to have a little look into that to work out how to do that via SSH (I have multiple sites on the server and I'm a novice so haven't managed to work it out yet). I need to pop out for a while now but I'll try again later - thanks both of you for your help, much appreciated. Try https://winscp.net/eng/download.php comes with Putty for SSH login. I assume you know how to create SSH keys? Link to comment Share on other sites More sharing options...
El Patron Posted September 15, 2016 Share Posted September 15, 2016 (edited) bash commands..@denver way to scare the locals...jajajajaja why they don't put command line processor into back office hostinig...is a mystrey to me. @denver, any of the popular ftp programs allow recursive permission setting? I use dw ftp so don't know others that closely. plesk file manager allows permission changes (mine v12 something) but I don't think recursive. Edited September 15, 2016 by El Patron (see edit history) Link to comment Share on other sites More sharing options...
spaceman Posted September 15, 2016 Author Share Posted September 15, 2016 I think think this might have defeated me. I'm using FireSSH and have tried logging in as 'root' and the domain subscriber but when I enter this: find . -type f -exec chmod 0644 () \; I get this: -bash: syntax error near unexpected token `(' And I don't know how to post the /etc/.my.cnf file (I can't access the /etc files via Plesk but assume there's a way using SSH, but I don't know how). Sorry Denver, I appreciate your help but think I've bitten off a little more than I can chew. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now