LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-23-2012, 09:53 AM   #1
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Cant install addons in wordpress 3.4


Got a brand new server running Ubuntu12
I have 2 wordpress-sites, 1 newly installed with wp 3.4.1, one copied from other server running wp 3.2.1
Apache 2.2.22 & pure-ftpd-mysql

Problem is I can't install add-ons, also can't upgrade the older wp?
The installation starts, package is downloaded and unpacking starts.
I can see files being created under wp-content/upgrade/ until suddenly it stops.
Only message is like "could not copy file . /wp-content/upgrade/wp-table-reloaded.tmp/wp-table-reloaded/languages/wp-table-reloaded-ga_IR.mo"

I have tried with many add-ons, same result.
All site belongs to my user & group, in desperation I tried setting permission 777 on whole site but no difference.
It shouldn't be a permission problem as I can see the files being created? Unfortunately I can't find any other error message than the above ("it didn't work" - great, thanks for info...)

I found a plugin "ftp-upgrade-fix", I manually downloaded & unzipped it just to be told that the installation problem is already fixed in my version...
 
Old 07-23-2012, 11:33 AM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Do your apache error logs tell you anything? There may be an error reporting there that can help identify the issue.

These are usually contained in /var/log/httpd/error_log.
 
Old 07-23-2012, 11:34 AM   #3
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Original Poster
Rep: Reputation: 127Reputation: 127
No, as I said only message is "could not copy file"
 
Old 07-23-2012, 11:42 AM   #4
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Quote:
Originally Posted by pingu View Post
No, as I said only message is "could not copy file"
Thats what wordpress is telling you not apache. What do your apache error logs say?
 
Old 07-23-2012, 11:55 AM   #5
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Original Poster
Rep: Reputation: 127Reputation: 127
Apache doesn't tell me anything!
Unbelievable, I know, but that's a fact.

The server is new so I'm the only one using it right now. I watch both error.log and access.log in 2 terminals with "tail -f /var/log/apache2/error.log / access.log"

error.log does not output anything, access.log gives this one line:
Code:
<myip> - - [23/Jul/2012:18:45:42 +0200] "POST /wp-admin/update.php?action=install-plugin&plugin=wp-table-reloaded&_wpnonce=7f867de65b HTTP/1.1" 200 4135 "http://www.mysite.se/wp-admin/update.php?action=install-plugin&plugin=wp-table-reloaded&_wpnonce=7f867de65b" "Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0"
/var/log/syslog:
Lots of lines telling files are copied, then lots of lines telling files are deleted. Nothing in between.
Here's a short sample
Code:
Jul 23 18:46:33 galax pure-ftpd: (me@myip) [NOTICE] /var/www/mysite/wp-content/upgrade/wp-tab
le-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-pt_PT.txt uploaded  (552 bytes, 0.25KB/sec)
Jul 23 18:46:35 galax pure-ftpd: (me@myip) [NOTICE] /var/www/mysite/wp-content/upgrade/wp-tab
le-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-pt_BR.txt uploaded  (549 bytes, 0.25KB/sec)
Jul 23 18:46:37 galax pure-ftpd: (me@myip) [NOTICE] /var/www/mysite/wp-content/upgrade/wp-tab
le-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-de_DE.txt uploaded  (512 bytes, 0.23KB/sec)
Jul 23 18:46:39 galax pure-ftpd: (me@myip) [NOTICE] /var/www/mysite/wp-content/upgrade/wp-tab
le-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-cs_CZ.txt uploaded  (601 bytes, 0.27KB/sec)
Jul 23 18:46:42 galax pure-ftpd: (me@myip) [NOTICE] /var/www/mysite/wp-content/upgrade/wp-tab
le-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-es_ES.txt uploaded  (551 bytes, 0.25KB/sec)
Jul 23 18:46:44 galax pure-ftpd: (me@myip) [NOTICE] /var/www/mysite/wp-content/upgrade/wp-tab
le-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-fr_FR.txt uploaded  (580 bytes, 0.26KB/sec)
Jul 23 18:46:46 galax pure-ftpd: (me@myip) [NOTICE] /var/www/mysite/wp-content/upgrade/wp-tab
le-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-ro_RO.txt uploaded  (601 bytes, 0.27KB/sec)
Jul 23 18:46:46 galax pure-ftpd: (me@myip) [NOTICE] Deleted /var/www/mysite/wp-content/upgrad
e/wp-table-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-be_BY.txt
Jul 23 18:46:46 galax pure-ftpd: (me@myip) [NOTICE] Deleted /var/www/mysite/wp-content/upgrad
e/wp-table-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-bg_BG.txt
Jul 23 18:46:46 galax pure-ftpd: (me@myip) [NOTICE] Deleted /var/www/mysite/wp-content/upgrad
e/wp-table-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-cs_CZ.txt
Jul 23 18:46:46 galax pure-ftpd: (me@myip) [NOTICE] Deleted /var/www/mysite/wp-content/upgrad
e/wp-table-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-da_DK.txt
Jul 23 18:46:46 galax pure-ftpd: (me@myip) [NOTICE] Deleted /var/www/mysite/wp-content/upgrad
e/wp-table-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-de_DE.txt
Jul 23 18:46:46 galax pure-ftpd: (me@myip) [NOTICE] Deleted /var/www/mysite/wp-content/upgrad
e/wp-table-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-default.txt
 
Old 07-23-2012, 08:51 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,384
Blog Entries: 28

Rep: Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164
Are you trying to do the "auto-update" and "auto-install" over the web?

You could always do it the old-fashioned way, via FTP. http://codex.wordpress.org/Upgrading_WordPress_Extended

Before trying that, I would suggest you check your file permissions. If the files are unpacked, but can't be copied into place, it may well be a permissions problem with the target directories/files.
 
Old 07-24-2012, 01:59 AM   #7
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Original Poster
Rep: Reputation: 127Reputation: 127
I have checked the file permissions!
As I wrote in first post, I also chmoded the whole directory tree to 777, no difference.
The files & directories under wp-content/upgrade are created during installation, then everything is deleted.

But yes I could go the manual way, I probably would if it was a problem with just a few packages.
But it's everything - upgrading, plug-ins & themes just can't be installed.
And no decent error messages at all!

I think I'll go for Joomla, have used it a few times never any problems like this.
 
Old 07-24-2012, 02:06 PM   #8
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
pingu, joomla wordpress and all the other open source CMS systems are very similar. I think this may be related to your open_basedir value for php. If you do a phpinfo page what is your open base dir value set to?
 
Old 07-27-2012, 05:15 AM   #9
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Original Poster
Rep: Reputation: 127Reputation: 127
open_basedir is not set
Code:
echo "<?php phpinfo()?>" | php |grep basedir
open_basedir => no value => no value
 
Old 07-27-2012, 11:33 AM   #10
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Well that would be your issue, you need to set your open_basedir to the folders that you want PHP to be able to write and have access to.

Try reading over kb.mediatemple.net/questions/514/ or do a search on google for how to set open_basedir in php.ini file.

Once you set it, restart Apache and try it again.
 
Old 07-27-2012, 11:35 AM   #11
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Quote:
Originally Posted by pingu View Post
open_basedir is not set
Code:
echo "<?php phpinfo()?>" | php |grep basedir
open_basedir => no value => no value
Just a quick tip:

Code:
php -i | grep basedir
Would have done the same thing, the -i option tells php to do a phpinfo dump. It's only accessible from the command line.
 
1 members found this post helpful.
Old 07-27-2012, 03:05 PM   #12
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Original Poster
Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by Kustom42 View Post
Well that would be your issue, you need to set your open_basedir to the folders that you want PHP to be able to write and have access to.
Thanks for trying, but this can't be the case.
1) open_basedir is off by default, not set means it's not used. mediatemple.net might use it, but, AFAIK, by default its off.

2) The only directory that exists before installation is wp-content/upgrade/.
When installation is started directories are created and files are extracted to subdirs of wp-content/upgrade.
This means apache / php can write to wp-content/upgrade.
Check those lines from syslog posted earlier, example:
"wp-content/upgrade/wp-table-reloaded.tmp/wp-table-reloaded/languages/datatables/lang-pt_PT.txt uploaded"
And I have checked during installation, files and directories are created, it's not a faulty log-message the files & directories are there.

3) I tried to manually download a package and unpack it under wp-content/upgrade. I set the permissions to rwXrwXrwX recursively. Then I tried installing via Wordpress interface and guess what? When installation failed all these files & directories were deleted!

Well, I'm pretty desperate so I'll still try it. Hopefully enabling open_basedir won't wreak havock on the other websites housed on this server...
 
Old 07-27-2012, 03:18 PM   #13
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Quote:
Originally Posted by pingu View Post
Thanks for trying, but this can't be the case.
1) open_basedir is off by default, not set means it's not used. mediatemple.net might use it, but, AFAIK, by default its off.
No it is not. The default value is "NULL" which will inherit the current working directory as your open_basedir value. So if your php script is at /var/www/html/site1/script.php, script.php will only be able to access /var/www/html/site1/.

http://www.php.net/manual/en/ini.cor...i.open-basedir
 
Old 08-06-2012, 08:50 AM   #14
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Original Poster
Rep: Reputation: 127Reputation: 127
HA! Finally I got it working!
Tried a few things, asked in WP forums also.
It's like this:
WP checks if it has write access to complete file system for the site. If it has, meaning that if the user the webserver runs as ('www-data' in my case) owns all files, then WP downloads and installs directly.
If WP does not have write access to whole site user is asked for ftp-credentials.
This should work, but apparently in my case there's something wrong with ftp.

Now WP actually only needs write-access to wp-content to be able to install themes etc, and I do not want apache to have complete write-access to all files
So I found a workaround on cpanel forum (thanks shacker23 whoever you are):
Code:
Put this in the user's wp-config.php file:
define('FS_METHOD', 'direct');
And then make wp-content group-writable and group-owned www-data.
TADA! Direct installation works fine!

Thanks all for helping, now I'm very happy!

Last edited by pingu; 08-06-2012 at 09:01 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to install pre existing wordpress directory on a existing wordpress to run a web ajbardhan Linux - Software 3 04-28-2012 07:01 PM
install of wordpress on cent os meil Linux - Server 2 09-16-2011 06:48 AM
how to install Wordpress ammartahir1978 Linux - Newbie 5 04-08-2011 04:45 AM
How to install joomla or wordpress? AloneWolfCRO Linux - Networking 1 04-16-2010 02:30 PM
Problem with Wordpress install gibson79 Slackware 2 09-09-2009 04:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration