VQmod on new VPS not writing vqcache files or log files - php

I am just moving an opencart site to a staging server and have vqmod installed in the site however I can't get vqmod to create the vqcache files and it isn't even logging any errors in the vqmod/log folder. I've basically set the directory structure to 777 to get it to work from a permissions point of view and everything is ownership user:www-data but still no joy.

Just in case anyone has a similar issue, it was a user groups issue, the ownership settings for the vqmod.php file were user:user rather than the required user:www-data

You should actually set the permissions for your vqmod.php to be the same as your index.phpin your main OpenCart folder, not alter the owner of the file. You should also set the permissions of the following be the same as your /system/cache/ folder
/vqmod/
/vqmod/vqcache/
/vqmod/logs/

Related

WordPress admin media upload permission

I have a access to the server where many wordpress blogs are hosted. Initially the permission to uploads folder were set to 777(Recursively) but this caused problems to our server and malicious files where uploaded due to which our server is blacklisted.
I have deleted all those PHP files under uploads folder and set the permission to 755.
Now the problem is that the admin users to wordpress blogs/sites unable to upload media files.
Please guide me what I can do so that they can upload files (images or videos).
Can we set something which will ask FTP details when they upload files using wordpress admin. I can create FTP users for this.
Please Guide.
Not sure what type of error you are getting. But you can try this
add this line to
define('UPLOADS', 'wp-content/uploads');
wp-config.php
just before below line
require_once(ABSPATH.’wp-settings.php’);
If the directory doesn’t already exist, WordPress will automatically create it as long as the wp-content folder is writeable.
Hey I just set the Permission to chmod -v 747 uploads and it worked. Atleast better than 777.
But would like to here suggestion if this is risky. If risky then how much. I am new to permissions and server management.
Thanks !
I know this is an old thread but I found it high in the results for an unrelated issue I am having. It seemed by the permission modes being used #vanurag was actually having a user/group permissions issue rather than the permission modes (755 vs 777) issue.
You can find the web server user with var_dump(whoami()) in php, could be something like www-data.
Once know the user name verify that user is either the owner of the folder or is in the group assigned to the folder. You can use the following in Linux console to find current user/group.
ls -l /path/to/wp-content/uploads
Either add the web server user (www-data) as the owner and leave the group as it is or add the user to the group who have permissions.
Use chown (change owner) to set your users to your needs.
I usually add the user to the group rather than change the owner since the owner could be an FTP user and may mess up permissions used else where in your configuration.
usermod -g www-data foobar where foobar is the name of the group who has permissions to the uploads folder.
Here is a decent article on this issue in respect to WordPress uploads folder.
https://www.digitalocean.com/community/questions/proper-permissions-for-web-server-s-directory

Joomla 3.4.4. tmp directory

I have problem with installing any extensions in Joomla! 3.4.4.
When I try to install any i have error
An error has occurred.
-1 Copy file failed
I set all CHMOD for 777 (for tests) in configuration.php there is correct path to tmp directory. One thing that is strange is info in joomla backend:
The PHP temporary folder is not set. The PHP temporary folder is the
folder that PHP uses to store an uploaded file before Joomla can
access this file. Whilst the folder not being set isn't always a
problem, if you are having issues with manifest files not being
detected or uploaded files not being detected, setting this in your
php.ini file might fix the issue.
I don't have access to php.ini so i can't use upload_tmp_dir . When i try make my own php.ini file and then make rule in .htaccess nothing happens. Maybe someone had the same problem?
Set the directory to 755 firstly. No need for 777.
Make sure the directory is linked via the home i.e.
/home/your_user_account/public_html/tmp
And also then check your hosting package has not run out of diskspace.
These are the common problems.

unable to delete files on joomla install fedora 20

I can't get Fedora to allow med to delete installation files or write the configuration.php. I have chmod 777 all files and directories.
chown apache:apache all files.
It will work correctly if I copy the configuration.php to the directory. But then I can't upload templates because the joomla/tmp folder is not writable.
Any ideas how to get it to work?
Firstly, change back the file permissions. Do not make everything 777. Files should be 644 and folders should be 755.
The reason why you are not able to edit files or upload anything is due to the folder ownership. This is something that you hosting provider will need to sort out for you.
The actual problem was that SELINUX prevented apache from writing to disc.

Drupal Settings file does not exist

I'm trying to set up a fresh install of drupal on on linux box and I'm getting the error:
Settings file The settings file does not exist.
The Drupal installer requires that you create a settings file as part of the installation process. Copy the ./sites/default/default.settings.php file to ./sites/default/settings.php. More details about installing Drupal are available in INSTALL.txt.
I have set the permissions for the settings.php file but it is still doing it. sites,default and files all have 777 permissions but it still won't work. I have both the default.settings.php and settings.php in the default folder.
Thanks
You have to keep in mind some things:
Your web server has to have the permission to run your code. If you are using Ubuntu, it would be better if you give www-data.www-data (user and group) permission to sites/default folder
To give 777 to files is dangerous because someone else can read this sensible file
Remember that all folders, including your Drupal root folder has to be readable, which means it has to have some thing like 755 permission.
Most time, this problem is related to the user running the web server and files.
Change back the settings.php permission.change settings.php permission to 755. (read only, to make protected)
Step by step:
Copy file default.settings.php to settings.php (do not rename). Now you have both files.
Change file permission settings.php to read/write with chmod 644 settings.php
Continue the installation..
After all installation finished, change file permission settings.php to read-only with chmod 755 settings.php
I hope it helps you
I have fixed that by this:
chown -Rv apache:apache /var/www
go to the directory that contain default.settings.php & settings.php files then, right click on each one then click on Get Info then scroll down until you see the permission of that file, make sure it's 'read & write' enter image description here

Wordpress Error: A TimThumb error has occured

I've encountered an error after installing wordpress onto a new domain.
I've contacted the theme developer and have had no luck resolving the issue.
I receive the following error when i copy the image link:
Warning: touch() [function.touch]: Utime failed: Permission denied in /home/domain/public_html/wp-content/themes/folioway/core/thumb.php on line 190
Warning: Cannot modify header information - headers already sent by (output started at /home/domain/public_html/wp-content/themes/folioway/core/thumb.php:190) in /home/domain/public_html/wp-content/themes/folioway/core/thumb.php on line 413
A TimThumb error has occured
The following error(s) occured:
Could note create the index.html file.
Query String : src=/wp-content/uploads/2012/03/CoffeetabeBox-custom_web1.jpg&w=187&h=187&zc=1&q=90
TimThumb version : 2.8.2
I have not modified anything else aside from some CSS.
The thumbnails do not appear on the pages, however, the images do appear in lightbox.
I have set the permissions to the cache folder to 777, but this has not resolved the issue.
Any help would be greatly appreciates. Thanks.
It happened to me too, and this is the second time!
If you don't have time to discover why, but you want to keep it working, just rename, or delete your /cache folder; then, create a brand new /cache folder, set permissions to 777, and it will work again.
I found that the cache folder this is referring to is the one within the same folder as timthumb.php - find that file and the related cache folder and give the cache folder 777 permissions.
if you are on a linux based server,
first find the FILE_CACHE_DIRECTORY from the config file by (ex. in linux server open the file in vi commond)
vi /system/web/esupu/wp-content/themes/gadgetry-parent/framework/timthumb/timthumb-config.php
it could be like
define('FILE_CACHE_DIRECTORY', '../../cache/');
SO we change the cache folder ownership to user "www-data" which is the default user for Apache web server which runs this php codes,
sudo chown -hR www-data:www-data /system/web/esupu/wp-content/themes/gadgetry-parent/cache/
also, now better check if folder can be writable too (chmod permissions to 777)
Instead of using 777 as others have suggested, use 755 to the /cache folder.
I just delete the cache folder and refresh the page where code was, it started working.
I think it is the problem of file permission.
Headers already sent is usually a symptom of whitespace either at the beginning or the end of the file - check timthumb.php and make sure you have no blank lines or space either before the
The other possibility is that /wp-content/uploads/ is not writable by the web server, but I'd bank on the first one being the cause.
I added this to a php.ini file:
display_errors = Off
display_warnings = Off
output_buffering = On
TimThumb is a separate open source project that is used by many WP plugins.
If updating folder permissions doesn't work for you, another solution which worked for me was to update the plugin's TimThumb script with the most recent version. You can download it here:
https://timthumb.googlecode.com/svn/trunk/timthumb.php
In my case this file was in wp-content/plugins/events-manager/includes/thumbnails
For others that have this issue when using the FiatLux Wordpress Theme, as I am here is the solution:
Open FTP like Filezilla
Navigate to yoursite/wp-content/themes/fiatlux/includes*
Delete the cache folder
Recreate the cache folder, with permission setting 755
Download the updated timthumb.php file from GitHub and replace (I renamed the old one timthumb.old to test
If you use a Media server/ CDN, then be sure to add that site to the $ALLOWEDSITES array in TimThumb.php file
*If using another Wordpress theme, then find the TimThumb.php file and corresponding cache folder in that theme/ plugins folder in wp-content
in
src=/wp-content/uploads/2012/03/CoffeetabeBox-custom_web1.jpg&w=187&h=187&zc=1&q=90
try put a '?' between .jpg and &w, so it will be like this
src=/wp-content/uploads/2012/03/CoffeetabeBox-custom_web1.jpg?&w=187&h=187&zc=1&q=90

Categories