Trouble with backup plugin

Creating and modifying plugins.
Post Reply
gjpc
Regular
Posts: 9
Joined: Tue Jan 10, 2006 11:58 pm

Trouble with backup plugin

Post by gjpc »

Hi all,

I have just installed 4 blogs on my freebsd 6.0 server using mysql and the multiple user install instructions.

I loaded the backup plugin successfully on one site. However I do not see any backup entries in the administrators menus.

When I attempted to install backup on the second site I got the following plea to report a bug:
Trying to open URL package_event_en.xml...
Fetched 167538 bytes from already existing file on your server. Saving file as /www/blogcircle/htdocs/templates_c/package_event_en.xml...


Trying to open URL lang_ja.inc.php?rev=1.9999...
The URL http://cvs.sourceforge.net/viewcvs.py/* ... rev=1.9999 could not be opened. Maybe the Serendipity or SourceForge.net Server is down - we are sorry, you need to try again later.
Trying to open URL backup.sh?rev=1.9999...
The URL http://cvs.sourceforge.net/viewcvs.py/* ... rev=1.9999 could not be opened. Maybe the Serendipity or SourceForge.net Server is down - we are sorry, you need to try again later.
Trying to open URL serendipity_event_backup.php?rev=1.9999...
The URL http://cvs.sourceforge.net/viewcvs.py/* ... rev=1.9999 could not be opened. Maybe the Serendipity or SourceForge.net Server is down - we are sorry, you need to try again later.
Trying to open URL Tar.php?rev=1.9999...
The URL http://cvs.sourceforge.net/viewcvs.py/* ... rev=1.9999 could not be opened. Maybe the Serendipity or SourceForge.net Server is down - we are sorry, you need to try again later.
Trying to open URL recover.gif?rev=1.9999...
The URL http://cvs.sourceforge.net/viewcvs.py/* ... rev=1.9999 could not be opened. Maybe the Serendipity or SourceForge.net Server is down - we are sorry, you need to try again later.
Trying to open URL e.gif?rev=1.9999...
The URL http://cvs.sourceforge.net/viewcvs.py/* ... rev=1.9999 could not be opened. Maybe the Serendipity or SourceForge.net Server is down - we are sorry, you need to try again later.
Trying to open URL lang_ja.inc.php?rev=1.9999...
The URL http://cvs.sourceforge.net/viewcvs.py/* ... rev=1.9999 could not be opened. Maybe the Serendipity or SourceForge.net Server is down - we are sorry, you need to try again later.
Trying to open URL lang_en.inc.php?rev=1.9999...
The URL http://cvs.sourceforge.net/viewcvs.py/* ... rev=1.9999 could not be opened. Maybe the Serendipity or SourceForge.net Server is down - we are sorry, you need to try again later.
Error: serendipity_event_backup:505dd95d496405ffc7382c43eb54a136 (serendipity_event_backup)
DEBUG: Plugin serendipity_event_backup:505dd95d496405ffc7382c43eb54a136 not an object: .
Input: Array ( [adminModule] => plugins [pluginPath] => serendipity_event_backup [install_plugin] => serendipity_event_backup [spartacus_fetch] => event [action] => [adminAction] => ) .

Please report this bug. This error can happen if a plugin was not properly downloaded (check your plugins directory if the requested plugin was downloaded) or the inclusion of a file failed (permissions?)
Backtrace:
Installing plugin: Array ( [0] => serendipity_event_backup [1] => [2] => event [3] => 0 [4] => serendipity_event_backup )
INSERT INTO serendipity_plugins (name, sort_order, placement, authorid, path) values ('serendipity_event_backup:505dd95d496405ffc7382c43eb54a136', 7, 'event', '0', 'serendipity_event_backup')
No valid path/filename found. Aborting.
Classname serendipity_event_backup still does not exist. Aborting.
Loading plugin failed painfully. File not found?
No valid path/filename found. Aborting.
Classname serendipity_event_backup still does not exist. Aborting.
Should I get a menu entry when I install the backup plugin?
Any other suggestons?

Thanks
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

First try a different repository in the SPARTACUS config. Maybe SourceForge really was having problems at that moment.
Judebert
---
Website | Wishlist | PayPal
gjpc
Regular
Posts: 9
Joined: Tue Jan 10, 2006 11:58 pm

the install went but I have errors in httpd error log

Post by gjpc »

hi,

sourceforge must have come back on line however there is still no menu ithem for backup and this error in the httpd error.log:

[Tue Jan 10 23:25:34 2006] [error] [client 198.182.184.5] PHP Warning: mkdir(): open_basedir restriction in effect. File(/www/blogcircle/htdocs//plugins/serendipity_event_backup/UTF-8/) is not within the allowed path(s): (/usr/local/lib/php/:/usr/local/lib/php/s9y/:/www/blogcircle/htdocs/:/usr/local/bin/) in /usr/local/www/serendipity/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 225, referer: http://blog.circlesoft.com/serendipity_ ... ype]=event
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: the install went but I have errors in httpd error log

Post by garvinhicking »

Hm, the open_basedir restriction should not trigger an error in your case!

Can you check if the backup plugin got downloaded to serendipity_event_backup, and that all files there are existing with non-0 byte size?

Maybe your PHP version has a bug with open_basedir, older versions tend to be picky for open_basedir.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gjpc
Regular
Posts: 9
Joined: Tue Jan 10, 2006 11:58 pm

basedir

Post by gjpc »

Hi Gavin,

Here is /usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup
total 70
-rw-r--r-- 1 www www 819 Jan 10 23:25 backup.sh
-rw-r--r-- 1 www www 3391 Jan 10 23:25 lang_en.inc.php
-rw-r--r-- 1 www www 4079 Jan 10 23:25 lang_ja.inc.php
-rw-r--r-- 1 www www 60075 Jan 10 23:25 serendipity_event_backup.php
I unloaded and loaded the Backup plugin and this time did not get any errors in the error log. The backup directory is in place
total 6
drwxr-xr-x 2 www www 512 Jan 10 23:27 backups
drwxrwxr-x 6 www www 1024 Jan 10 23:30 htdocs
drwxr-xr-x 2 root wheel 512 Jan 11 08:33 logs
There still is no entry in the admin menu for performing backups.

You may find my phpinfo at http://blog.circlesoft.com/phpinfo.php

So it looks like the load is ok now but still no way to perform the backup

Also the Statistics plugin loads and creates its entry in admin mneu.

Thanks,

Gerard
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: basedir

Post by garvinhicking »

If the backup menu item is not in place, this can only mean two things:

1. Your serendipity author userlevel is not the one of a "ADMIN" user

2. The plugin is not installed. Check your serendipity_plugins DB table and see if the backup plugin is listed there?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gjpc
Regular
Posts: 9
Joined: Tue Jan 10, 2006 11:58 pm

more backup info

Post by gjpc »

Hi Gavin,

Thanks very much for the reply.

I am sure that I am the admin user.

here is the serendipity_plugins table

mysql> select * from serendipity_plugins ;
+-------------------------------------------------------------------------+-----------+------------+----------+-----------------------------------+
| name | placement | sort_order | authorid | path |
+-------------------------------------------------------------------------+-----------+------------+----------+-----------------------------------+
| @serendipity_calendar_plugin:201d2d63660b15d6a7419bc71b71dd25 | right | 1 | 0 | |
| @serendipity_quicksearch_plugin:fd7436a24dd2834a5902d0fb1a308a21 | right | 2 | 0 | |
| @serendipity_archives_plugin:4b5bd3929d5021769f98529b03e15517 | right | 3 | 0 | |
| @serendipity_categories_plugin:a59d7268ede3c24023c9dabe5764670c | right | 4 | 0 | |
| @serendipity_syndication_plugin:c4f6ab13165ef6a6d2e807b2e69b0316 | right | 5 | 0 | |
| @serendipity_superuser_plugin:d9b87c2a8b65ac248836f7ff0beed1fb | right | 6 | 0 | |
| @serendipity_plug_plugin:a54cb6b8a003a0e6e6587e6f4a067832 | right | 7 | 0 | |
| serendipity_event_s9ymarkup:cb2fc90636bbc9d83a9fdcffefe46949 | event | 1 | 0 | |
| serendipity_event_emoticate:ec73eabe4faa6a06d175a2cf416771f3 | event | 2 | 0 | |
| serendipity_event_nl2br:b0ec2f9f908ac2b5dbf68c1675fd75d6 | event | 3 | 0 | |
| serendipity_event_browsercompatibility:692da6eb69a40ae798adb32bcb32d4ac | event | 4 | 0 | |
| serendipity_event_spamblock:9ff52d72f93460295b668238a8b23ca8 | event | 5 | 0 | |
| serendipity_event_spartacus:5136e1bd649495086d6c988a038ef9d2 | event | 6 | 0 | serendipity_event_spartacus |
| serendipity_event_backup:435ea39225c8f55d5f185623558236f9 | event | 11 | 0 | serendipity_event_backup |
| serendipity_event_statistics:43328666f36bacd2082cbbcecad4cfcc | event | 8 | 0 | serendipity_event_statistics |
| serendipity_event_entryproperties:1cf49b335c4dfc669d9a128b65d18030 | event | 12 | 0 | serendipity_event_entryproperties |
+-------------------------------------------------------------------------+-----------+------------+----------+-----------------------------------+
16 rows in set (0.00 sec)
Some part of the plugin ran for I have the backup plugin's tables:

mysql> select * from serendipity_dma_htmlbackup ;
+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
| auto_backup | time_backup | last_backup | data_backup | auto_backdel | time_backdel | last_backdel |
+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
| 0 | 0 | 0 | | 0 | 0 | 0 |
+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
1 row in set (0.00 sec)

mysql> select * from serendipity_dma_sqlbackup ;
+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
| auto_backup | time_backup | last_backup | data_backup | auto_backdel | time_backdel | last_backdel |
+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
| 0 | 0 | 0 | | 0 | 0 | 0 |
+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
1 row in set (0.00 sec)
but still no backup selection in the admin menu :(

Does it matter that this is a multi blog install? Here is the listing of the htdoc directory:
circle# ls -l
total 48
-rw-rw-rw- 1 www www 331 Jan 10 13:15 .htaccess
drwxr-xr-x 2 www www 512 Jan 10 12:51 archives
-rw-r--r-- 1 www www 331 Jan 10 12:51 comment.php
-rw-r--r-- 1 www www 325 Jan 10 12:51 exit.php
-rw-r--r-- 1 root www 1078 Jan 10 23:29 favicon.ico
lrwxr-xr-x 1 root wheel 31 Jan 10 12:52 htmlarea -> /usr/local/lib/php/s9y/htmlarea
-rw-r--r-- 1 www www 327 Jan 10 12:51 index.php
-rwxr-xr-x 1 root www 21 Jan 11 08:39 phpinfo.php
drwxrwxr-x 3 www www 512 Jan 10 14:46 plugins
-rw-r--r-- 1 www www 323 Jan 10 12:51 rss.php
-rw-r--r-- 1 www www 347 Jan 10 12:51 serendipity.css.php
-rw-r--r-- 1 www www 351 Jan 10 12:51 serendipity_admin.php
-rw-r--r-- 1 www www 381 Jan 10 12:51 serendipity_admin_image_selector.php
-rw-r--r-- 1 www www 399 Jan 10 12:51 serendipity_config.inc.php
-rwx------ 1 www www 588 Jan 10 13:15 serendipity_config_local.inc.php
-rw-r--r-- 1 www www 359 Jan 10 12:51 serendipity_define.js.php
-rw-r--r-- 1 www www 8243 Jan 10 12:51 serendipity_editor.js
-rw-r--r-- 1 www www 353 Jan 10 12:51 serendipity_xmlrpc.php
lrwxr-xr-x 1 root wheel 32 Jan 10 12:52 templates -> /usr/local/lib/php/s9y/templates
drwxr-xr-x 2 www www 1024 Jan 11 12:27 templates_c
drwxrwxr-x 2 www www 512 Jan 11 09:34 uploads
-rw-r--r-- 1 www www 337 Jan 10 12:51 wfwcomment.php
I am protecting htmlarea and templates directories.

Thanks again...
gjpc
Regular
Posts: 9
Joined: Tue Jan 10, 2006 11:58 pm

more information after some tinkering

Post by gjpc »

Hi Gavin,

I listened to your comment about not being admin level and I performed an experiment. Of course first I checked to see if I was logging into the andmin suite as an admin, and yes indeed, my level is 255.

However I then commented out the test in serendipity_event_backup.php for the event_hook and discovered that $serendipity['userlevel'] is less than USERLEVEL_ADMIN and therefore the "Backup Interface" menu selection does not appear.

I am sorry but this has only led to even more problems surfacing. When I try to perform a SQL or HTML backup I get open_basedir errors and no files are created in the designated backup directory:
circle# cat error.log
[Thu Jan 12 10:13:04 2006] [error] [client 198.182.184.5] PHP Warning: opendir(): open_basedir restriction in effect. File(/www/blogcircle/backups) is not within the allowed path(s): (/usr/local/lib/php/:/usr/local/lib/php/s9y/:/www/blogcircle/htdocs/:/usr/local/bin/) in /usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/serendipity_event_backup.php on line 1299, referer: http://blog.circlesoft.com/serendipity_admin.php?
[Thu Jan 12 10:13:04 2006] [error] [client 198.182.184.5] PHP Warning: opendir(/www/blogcircle/backups): failed to open dir: Operation not permitted in /usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/serendipity_event_backup.php on line 1299, referer: http://blog.circlesoft.com/serendipity_admin.php?
[Thu Jan 12 10:13:04 2006] [error] [client 198.182.184.5] PHP Warning: readdir(): supplied argument is not a valid Directory resource in /usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/serendipity_event_backup.php on line 1300, referer: http://blog.circlesoft.com/serendipity_admin.php?
[Thu Jan 12 10:13:04 2006] [error] [client 198.182.184.5] PHP Warning: closedir(): supplied argument is not a valid Directory resource in /usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/serendipity_event_backup.php on line 1309, referer: http://blog.circlesoft.com/serendipity_admin.php?
[Thu Jan 12 10:13:34 2006] [error] [client 198.182.184.5] PHP Warning: fopen(): open_basedir restriction in effect. File(/www/blogcircle/backups/tmp/last_backup/2006-01-12-10-13_CREATE_serendipity_access.sql) is not within the allowed path(s): (/usr/local/lib/php/:/usr/local/lib/php/s9y/:/www/blogcircle/htdocs/:/usr/local/bin/) in /usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/serendipity_event_backup.php on line 425, referer: http://blog.circlesoft.com/serendipity_ ... on]=backup
[Thu Jan 12 10:13:34 2006] [error] [client 198.182.184.5] PHP Warning: fopen(/www/blogcircle/backups/tmp/last_backup/2006-01-12-10-13_CREATE_serendipity_access.sql): failed to open stream: Operation not permitted in /usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/serendipity_event_backup.php on line 425, referer: http://blog.circlesoft.com/serendipity_ ... on]=backup
[Thu Jan 12 10:13:34 2006] [error] [client 198.182.184.5] PHP Warning: fopen(): open_basedir restriction in effect. File(/www/blogcircle/backups/tmp/last_backup/2006-01-12-10-13_INSERT_serendipity_access.sql) is not within the allowed path(s): (/usr/local/lib/php/:/usr/local/lib/php/s9y/:/www/blogcircle/htdocs/:/usr/local/bin/) in /usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/serendipity_event_backup.php on line 433, referer: http://blog.circlesoft.com/serendipity_ ... on]=backup
[Thu Jan 12 10:13:34 2006] [error] [client 198.182.184.5] PHP Warning: fopen(/www/blogcircle/backups/tmp/last_backup/2006-01-12-10-13_INSERT_serendipity_access.sql): failed to open stream: Operation not permitted in /usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/serendipity_event_backup.php on line 433, referer: http://blog.circlesoft.com/serendipity_ ... on]=backup
[Thu Jan 12 10:13:34 2006] [error] [client 198.182.184.5] PHP Warning: chdir(): No such file or directory (errno 2) in /usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/serendipity_event_backup.php on line 898, referer: http://blog.circlesoft.com/serendipity_ ... on]=backup
[Thu Jan 12 10:13:34 2006] [error] [client 198.182.184.5] PHP Warning: backup_interface(/usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/bundled-libs/Tar.php): failed to open stream: No such file or directory in /usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/serendipity_event_backup.php on line 902, referer: http://blog.circlesoft.com/serendipity_ ... on]=backup
[Thu Jan 12 10:13:34 2006] [error] [client 198.182.184.5] PHP Warning: backup_interface(): Failed opening '/usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/bundled-libs/Tar.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/lib/php/s9y/:/usr/local/lib/php/s9y/bundled-libs/:/www/blogcircle/backups/:/usr/local/www/serendipity/:/usr/local/www/serendipity/bundled-libs/') in /usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/serendipity_event_backup.php on line 902, referer: http://blog.circlesoft.com/serendipity_ ... on]=backup
[Thu Jan 12 10:13:34 2006] [error] [client 198.182.184.5] PHP Fatal error: Cannot instantiate non-existent class: archive_tar in /usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/serendipity_event_backup.php on line 903, referer: http://blog.circlesoft.com/serendipity_ ... on]=backup
So now there are two problems, why is the level of the user not being passed into the pugin and why do all the file creates fail?

One thing I have noticed is on initial startup on the pre-installation page my PHP is 4.4.1 not 4.4.2 as listed on the left. However, the installation checker still deemed the version ok for the install to go ahead.

Thanks,

Gerard
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: more information after some tinkering

Post by garvinhicking »

Hi!

I'm so sorry, this all stemmed from a recent code commit change I did.

In fact the array must be called $serendipity['serendipityUserlevel'] instead of only $serendipity['userlevel']. :-(

The reason for your open_basedir checks is, that your PHP is configured to not to be able to open/read/write dirs outsoide your /www/blogcircle/htdocs directory. Thus you must configure the backup plugin and set the abspath_backupdir to be within your document root.

That however is a large security risk, as then everybody is able to download your server backups, once he knows the directory.

Plus, the chances are that if your provider has enabled open_basedir restrictions, he might also have disabled to execute external scripts like the "backup.sh" script that is required to bundle all files within a backup file.

So, the final reasoning is, you should ask your provider to include /www/blogcircle in your open_basedir path setting, and convince him to allow external execution of files (if that doesn't work yet).

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gjpc
Regular
Posts: 9
Joined: Tue Jan 10, 2006 11:58 pm

Almost completely working

Post by gjpc »

Hi Gavin,

Your solutions have created great progress. Here is what I did.

1. I created a s9ybak directory in usr/local/www
2. I pointed all my blog backups at a sub-directory in here
3. I added the usr/local/www/s9ybak to the opendir for each site

However :( I still have problems.

First run of the backup looked for Tar.php in
htdocs/plugins/serendipity_event_backup/bundled-libs/

This directory was not created on plugin download and install. In my freebsd 6.0 system it is in:
/usr/ports/textproc/php4-xml/work/php-4.4.1/pear/Archive/Tar.php

For expedience I created the requested directories and copied it into the that directory.

Now the SQL backup works every time; I get all the tables in the backup file.

However when the backup runs I always get this error in the httpd err.log:
/www/blogcircle/htdocs/usr, referer: http://blog.circlesoft.com/serendipity_admin.php?
The real problem now is that the HTML backup needs tweaking beyond my current meager PHP experience to work at all.
At first when I ran the HTML backup it reports that the backup went ok:
Automatic HTML backupping stopped
Automatic HTML deletion stopped
Actual HTML backup saved
But no tar files were created and none are listed. However in the master httpd log file I get the following:
./usr/local/www/data/virtuals/blogcircle/htdocs/plugins/serendipity_event_backup/backup.sh
apparently the line of code:
$backupscript = $this->getRelPath()."/backup.sh";
in function MakeHTMLBackup is placing a '.' at the front of the path.

Using my handy sledgehammer, I simply reset the $backupscript to the hard path, just for testing. I got the same error but with the correct path!

Checking the backup.sh file I found that it did not have executeable permissions. I did the "chmod +x backup.sh"

I then discovered that in the backup.sh script assumes that bash is in /usr/bin not /usr/local/bin. I corrected this and I may now backup only selected html directories.

This leads to the final problem that I am having: When the "Whole s9y" box is checked in the HTML backup interface even though the interface states that the backup has happened no backup file is produced and unfortuneatly no error log is produced either.

We are almost there, do you have any more suggestions?

Best Regards,

Gerard
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Almost completely working

Post by garvinhicking »

Hi!

Great you got so much improved until now! The wrong path in some cases could lead up when the blog directory was not the same as the install s9y directory; but I've fixed the real directory call path.

I've also injected code that changes the chmod() of backup.sh when it's not executable.

Last but not least, you can open your backup.sh file. Search for this;:

Code: Select all

${TAR}${OPT} -czpf ${TARGET_DIR}/${date}_htmlbackup.tar.gz --directory=${DIR_TO_CHANGE} ./${DIR_TO_BACKUP} >/dev/null 2>&1 &
There, change it to:

Code: Select all

${TAR}${OPT} -czpf ${TARGET_DIR}/${date}_htmlbackup.tar.gz --directory=${DIR_TO_CHANGE} ./${DIR_TO_BACKUP} >/var/log/backup.sh.log 2>&1 &
which will log to /var/log/backup.sh.log. Or change it to any other file, of course. There you should find what's creating the error :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gjpc
Regular
Posts: 9
Joined: Tue Jan 10, 2006 11:58 pm

very close now

Post by gjpc »

Hi Gavin,

I removed the plugin then deleted the directory and loaded down your new version. The great news is that most everything is working! :)

The blugin is still looking for the Tar.php in a a bundeled-lib directory that does not get installed on the the down load. I tried to link -s to the the a common directory but ran into open_basedir restrictions so I just copied the directories in again.

I also had to adjust the the location of the Bash shell in backup.sh but this is the sort of thing that all freebsd's get very use to, no worry about this unless you really want to script system recognition....

Other then the bundled_lib not showing up, there is only one nit that is going to fill up the error log over time....

Whenever I even enter the backup interface, the following error message appears in the httpd error.log:
[Sun Jan 15 16:48:19 2006] [error] [client 198.182.184.5] File does not exist: /www/obvious/htdocs/usr, referer: http://www.isntitobvious.org/serendipit ... on]=backup
This happens any time any operation is performed in the backup plugin.

So in summary, all your code changes work:

1. I do not need to modify any of the php you are now posting to get the plugin to work with freebsd 6.0.
2. The backup.sh script must be modified to locate the bash shell at /usr/local/bin.
3. The plugin does not create the bundled lib containing Tar.php on download.
4. The plugin always looks for and gets an error looging for a usr directory in the html directory on most events.

Thanks for all your attention,

Gerard Cerchio
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: very close now

Post by garvinhicking »

Hi!

Thanks for the bundled-libs pointer, I forgot that one. I've now added version 0.7 of the backup plugin which checks other appropriate places of Tar.php!

The "file not found" error though is not realy findable for me. The plugin does not contain any reference to a "usr" path! Can it be that this is a directory you configuired inside the plugin?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gjpc
Regular
Posts: 9
Joined: Tue Jan 10, 2006 11:58 pm

We have backup plugin running on FreeBSD 6.0

Post by gjpc »

Hi Garvin,

Looks like this last pass has solved all of the operational problems :)

I downloaded the new plugin with the Tar.php correction and found out that the freebsd port did not download the pear-File_Archive port.
I installed that and everything went fine after I added the pear's location to the include and opendir entries for the site's virtual description in the httpd.conf

Recapping what is now needed for freebsd 6.0 system to run the plugin:

1. install the pear-File_Archive port in /usr/ports/archivers
2. modify the plugin/serendipity_event_backup/backup.sh to point to bash at /usr/loca/bin/bash

I shall send the dependency to the port maintainer and perhaps soon you would not need to hand install the pear port.

I may come back and visit the httpd error.log message looking for the usr directory but there are more pressing matters right now.

Thanks for all the work to get this running on freeBSD!

Best Regards,

Gerard J. Cerchio
Post Reply