germs Posted August 23, 2013 Share Posted August 23, 2013 Hi, My VPS is giving me some problems. I hope someone here has encountered the same issue and found a solution to it. I am able to create a product. However when I tried to upload an image for the product using the [image] link on the left of the product screen this appeared "An error occurred when copying the image" and the process stopped. I did some checks and realised that a temporary file has been created in /img/tmp and the owner and group rights is "apache: apache" instead of "user:psacln". It also creates some other sub-folders and files in img/p with the same file ownership. for the img/p - I can CHOWN and CHGRP when they come along. But for the img/tmp even if I did it, the product image would not be uploaded as a new tmp file is created with the "apache;apache" ownership. Seems like I am got going to make it. I tried to search this forum but was unable to dig out any past post. Sorry, if this have been solved. Link to comment Share on other sites More sharing options...
vekia Posted August 23, 2013 Share Posted August 23, 2013 the problem is strictly related to the VPS configuration, not to the prestashop script. you've got managed vps or configuration depends on you? Link to comment Share on other sites More sharing options...
germs Posted August 23, 2013 Author Share Posted August 23, 2013 Hi Vekia, I am given all rights to manage the "container". There is a Plesk 9.5.4 Control Panel and it comes with Virtuozzo for me to SSH in. I also know there is CentOS in it. Using these tools I may be alright except that I am not a Unix person and I just don't know how to tell the VPS not to use 'apache:apache". Any guide from you will be appreciated. Link to comment Share on other sites More sharing options...
El Patron Posted August 23, 2013 Share Posted August 23, 2013 are you running at php as an apache module or fastcgi? if apache module, try fastcgi instead.... else? uhm..I searched and it's mentioned in drupal/joomla/wordpress with varying degrees of helpfulness Link to comment Share on other sites More sharing options...
germs Posted August 24, 2013 Author Share Posted August 24, 2013 El Patron, Thank you for the questions I am now searching information on how to confirm if it is a apache module or fastcgi. Will reply once I get the result. Thanks again! Link to comment Share on other sites More sharing options...
vekia Posted August 24, 2013 Share Posted August 24, 2013 you can change the apache group and user in the /etc/apache2/envvars file you've got there something like: export APACHE_RUN_USER=apache export APACHE_RUN_GROUP=apache Link to comment Share on other sites More sharing options...
germs Posted August 24, 2013 Author Share Posted August 24, 2013 1) Hi El Patron, I visited this page [http://www.mewsoft.com/download/fcgitest.zip] to get a script to run the VPS and the result is "internal error" meaning, according to the author - I do not have a FASTCGI module. I hope the script is written correctly. 2) Hi Vekia, On my VPS, I discovered these information: /etc/apache2/envvars ===> /apache2 folder not present /etc/sysconfig/httpd ===> /httpd file contains remarks only /etc/rc.conf ==> this file not present Regards. Link to comment Share on other sites More sharing options...
vekia Posted August 24, 2013 Share Posted August 24, 2013 may i know what OS you use? and what apache version? Link to comment Share on other sites More sharing options...
germs Posted August 24, 2013 Author Share Posted August 24, 2013 Hi Vekia, I got this from PHPinfo: System: Linux 2.6.18-028stab095.1 #1 SMP Mon Oct 24 20:15:15 MSD 2011 i686 Server API: Apache 2.0 Handler Apache Version: Apache/2.2.3 (CentOS) Apache API Version: 20051115 Server Root: /etc/httpd X-Powered-By: PHP/5.3.3 PHP API: 20090626 Virtual Directory Support: disabled Configuration File (php.ini) Path: /etc Link to comment Share on other sites More sharing options...
vekia Posted August 24, 2013 Share Posted August 24, 2013 so you should have this file: /etc/httpd/conf/httpd.conf you've got there user and group definition it looks like: User www Group www Link to comment Share on other sites More sharing options...
germs Posted August 24, 2013 Author Share Posted August 24, 2013 <p>Hi Vekia,</p> <p> </p> <p>I found this inside the file! I should be close now, right? </p> <p> </p> <pre> # User/Group: The name (or #number) of the user/group to run httpd as. # . On SCO (ODT 3) use "User nouser" and "Group nogroup". # . On HPUX you may not be able to use shared memory as nobody, and the # suggested workaround is to create a user www and use that user. # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET) # when the value of (unsigned)Group is above 60000; # don't use Group #-1 on these systems! # User apache Group apache</pre> <pre> </pre> Link to comment Share on other sites More sharing options...
vekia Posted August 24, 2013 Share Posted August 24, 2013 now define the correct user and group, save changes and try to restart the apache service. Link to comment Share on other sites More sharing options...
germs Posted August 24, 2013 Author Share Posted August 24, 2013 Hi Vekia, I am so grateful to you, and also El Patron for responding. Hmm. I am using "germs" for owner. Because I am doing this at the top-level, do you think it will propagate "germs:psacln" to all other domains residing in this VPS? I am going to log in another domain name for a store for my [spam-filter]'s flower online (once she is ready). Link to comment Share on other sites More sharing options...
germs Posted August 26, 2013 Author Share Posted August 26, 2013 (edited) Hi El Patron, Based on the valuable tips given "apache module, try fastcgi" - I did a research on their uses and this led me to the VPS' Web Hosting Setup (Plesk Panel 9.5.4.) for the particular domain name. At the PHP Support field, it is stated as run as Apache Module and there is another field ["PHP 'Safe mode' on ]. I disabled this 'Safe mode' field and the product images can be uploaded without further issue. Thank you once again to Vekia and El Patron for spending your time on this. Really appreciated. Germs Edited August 26, 2013 by germs (see edit history) 1 Link to comment Share on other sites More sharing options...
vekia Posted August 26, 2013 Share Posted August 26, 2013 great news im going to mark this topic as [solved] best regards 1 Link to comment Share on other sites More sharing options...
Dh42 Posted August 26, 2013 Share Posted August 26, 2013 As a note to this, if you run have php running with DSO as the handler any file that is created will be owned by apache and not the account and will lead to these type of problems. Link to comment Share on other sites More sharing options...
vansrv7 Posted May 21, 2014 Share Posted May 21, 2014 (edited) Hi El Patron, Based on the valuable tips given "apache module, try fastcgi" - I did a research on their uses and this led me to the VPS' Web Hosting Setup (Plesk Panel 9.5.4.) for the particular domain name. At the PHP Support field, it is stated as run as Apache Module and there is another field ["PHP 'Safe mode' on ]. I disabled this 'Safe mode' field and the product images can be uploaded without further issue. Thank you once again to Vekia and El Patron for spending your time on this. Really appreciated. Germs I'm experiencing exactly the same problem. Where do you set "PHP safe mode" to off? Edit: found it in php.ini. It's already off but my problem still exist...... Edited May 21, 2014 by vansrv7 (see edit history) 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