Recent Topics

1 Oct 14, 2015 20:31    

Hello,

I have a windows7 64 bit server running with very latest versions of apache, php, mysql etc.
And since shortly a test install from b2e.
Installation of b2e is no problem and my first impression is, that every thing is working OK.

However upgrades do not work for some reason, to be more precise upgrades are running up to the moment php files have to be copied
(what is so special about that !!???). I did test that a couple of times on a couple of fresh test installs testing with 663 ==> 664 and now form 664 to 665

Whatever the reason is, it does not work, and up to now I do not have any Idea why.
The message is "probably no permissions" , however I am 100% sure that apache has the right permisions on windows level
So there is probably some thing else but what ............

  • Some output of the upgrade script below this message *

Does someone have any suggestions what the problem could be?
Suggestions would be apriciated.

Sincerely,

Louis

----------------- below part of the output of the update script -------

Backing up table «evo_userspostreadstatus» ... OK.
Backing up table «evo_users__reports» ... OK.
Backing up table «evo_users
user_org» ... OK.
Backing up table «evo_users__usersettings» ... OK.
Backing up table «evo_widget» ... OK.

Backup complete. Directory: «W:/<mydomain>/HomePage/Blog/_backup/2015-10-14-20-04-07/»

Copying new folders and files...
Copying «W:/<mydomain>/HomePage/Blog/conf»... OK.

Unavailable copying to «conf/_admin.php», probably no permissions.

copying to «conf/_advanced.php», probably no permissions.

Unavailable copying to «conf/_application.php», probably no permissions.

Unavailable copying to «conf/_stats.php», probably no permissions.
Copying «W:/<mydomain>/HomePage/Blog/cron»... OK.
Copying «W:/<mydomain>/HomePage/Blog/htsrv»... OK.
Copying «W:/<mydomain>/HomePage/Blog/inc»... OK.
Copying «W:/<mydomain>/HomePage/Blog/install»... OK.
Copying «W:/<mydomain>/HomePage/Blog/locales»... OK.
Copying «W:/<mydomain>/HomePage/Blog/media»... OK.
Copying «W:/<mydomain>/HomePage/Blog/plugins»... OK.

The files and database backup was created successfully but all folders and files could not be overwritten.

Please restore the backup files from the «W:/<mydomain>/HomePage/Blog/_backup/» package. The database was not changed.

Switching out of maintenance mode... OK.

Upgrade failed!

3 Oct 14, 2015 23:45

I am 100% sure that apache has the right permisions on windows level

That's your problem.

"on windows level" doesn't mean much.

What you need to be sure of, is that Apache has permission to write to these files (instead of just having permission to read them (which is often a default setting used for security reasons).

4 Oct 15, 2015 07:13

No,

That is far too easy, note that

  • I checked the windows permissions of course (it is my server at home, i did build it / have all permissions)
  • I just logged into the server using the apache account (which is a user account for security reasons). And could without any problems create a folder test within the B2E folder and copy a "xyz.php file to that folder"
  • b2e folder is located on my webserverpartition (not C:) just for info
  • I did check (in the past) with running apache under a system account which did not solve the problem
  • B2E could not run if it did not have permissions to write files in its directorys
  • B2E updater can do other shings like downloading the update and unzipping the download for which it did need same kind of permissions, so also that does not match your verdict
  • I do use php open_basedir but can not link the problem to that as well
  • so I am lost, that is why i did post the request for help :)

Louis

5 Oct 16, 2015 11:09

Hello,

to answer your question:
"are you using the Auto-Upgrade Procedure? Did you try the Standard Upgrade Procedure (http://b2evolution.net/man/upgrade-instructions) ?"

I tryed to upgrade B2E using B2E-itself starting an update from the back-end gui. That is the way it should go IMHO.

I did not try standard upgrade procedure describing how you can by hand / non automatic upgrade B2E. Of course that will work :), but I do not regard that as an exceptable procedure.

  • to much work
  • to big change you make a mistake
    So I regard that as the emergency procedure and not as a normal / standard procedure

Sincerely,

Louis

6 Oct 17, 2015 00:04

@louis2 it still sounds to me like a permissions issue.

Howerver, if you're confident that it is not, would you like to help us trying to find out your problem? If affirmative, please go to the file inc/maintenance/model/_maintenance.funcs.php, locate this line (~511):

if( ! @copy( $src_file, $dest_file ) )

replace it with:

if( ! copy( $src_file, $dest_file ) )

and try the upgrade again.

Also, make sure display_errors is enabled in your server.

A bit more details will be displayed about the errors produced when your PHP tries to copy those files in step 5 of the upgrade process (i.e.: see screenshot below).

Regards!

7 Oct 17, 2015 09:37

Hello,

Thanx! I did test that. The message is a bit different but it still does not work

Warning: copy(W:/x/HomePage/y/conf/_admin.php): failed to open stream: Invalid argument in W:\x\HomePage\y\inc\maintenance\model_maintenance.funcs.php on line 511

Unavailable copying to «conf/_admin.php», probably no permissions.

By the way I checked the display_errors statement (in pnp.ini) and put that explicit on "On", but that should not change any thing scince "On" is the default.

Louis

8 Oct 17, 2015 09:45

Hello,

I just did look at my comment again and looking at the errormessage I notice that the site is interpreting the text as html, so what you see on the screen is different from the real message. To bypas that I replaced all backwards slashed with ^

Warning: copy(W:/x/HomePage/x/conf/_admin.php): failed to open stream: Invalid argument in W:^ x^HomePage^y^inc^maintenance^model^_maintenance.funcs.php on line 511

Unavailable copying to «conf/_admin.php», probably no permissions.

9 Oct 17, 2015 10:48

Hum,

I went one step further and extended the PHP code below line 511 with a few lines to print somesthing when the copy was OK :)

So now you can see that ^not PHP files^ are copied (not that I understand why)

Copying new folders and files...
Copying «W:/FamVanBreda/HomePage/Blog/conf»... OK.

DID copying to «conf/index.html», was OK.

DID copying to «conf/license.txt», was OK.

DID copying to «conf/sample.htaccess», was OK.

DID copying to «conf/upgrade_policy_sample.conf», was OK.

Warning: copy(W:/x/HomePage/Blog/conf/_admin.php): failed to open stream: Invalid argument in W:^x^HomePage^Blog^inc^maintenance\model^_maintenance.funcs.php on line 511

Unavailable copying to «conf/_admin.php», probably no permissions

10 Oct 17, 2015 20:34

Hello,

I did some further testing by including testcode into the _maintenance.funcs.php file (attached). Note that I am not a PHP programmer, so probably room for improvement.

However the result of the extra tests are:

  • source and destination file do exist
  • for the update script it is not possible to copy the source to the destination
  • that seems to be related to the destination, I tried to unlock the file but that does result in a warning
  • I tried some other thing to "free a protential lock on that destination, but the code for that is probably wrong
  • I did log in on the server using the same user account as apache does and tried to remove the files the script can not remove (no problem). Not that apache is still running as well.

Below part of the output of my special maintenance file. Attached that version of the maintance file (see starting line 510)

Sincerely,

Louis

Backing up table «evo_users__usersettings» ... OK.
Backing up table «evo_widget» ... OK.

Backup complete. Directory: «W:/x/HomePage/Blog/_backup/2015-10-17-20-19-13/»

Copying new folders and files...
Copying «W:/x/HomePage/Blog/conf»... OK.

DID copying to «conf/index.html», was OK.

DID copying to «conf/license.txt», was OK.

DID copying to «conf/sample.htaccess», was OK.

DID copying to «conf/upgrade_policy_sample.conf», was OK.

Warning: copy(W:/x/HomePage/Blog/conf/_admin.php): failed to open stream: Invalid argument in W:^x^HomePage^Blog^inc^maintenance^model^_maintenance.funcs.php on line 513

Unavailable copying to «conf/_admin.php», probably no permissions.
OpenBaseDir: C:/ProgramData/PHP/;C:/Windows/Temp/;C:/Users/Apache/AppData/Local/Temp/;W:/x/
Source W:/x/HomePage/Blog/_upgrade/b2evolution-6.6.5-stable-2015-10-14/b2evolution/conf/_admin.php exists
Destination W:/x/HomePage/Blog/conf/_admin.php exists

Warning: unlink(W:/x/HomePage/Blog/conf/_admin.php): Permission denied in W:^x^HomePage^Blog^inc^maintenance^model^_maintenance.funcs.php on line 529
Error deleting W:/x/HomePage/Blog/conf/_admin.php
Trying realpath

Warning: unlink(W:^x^HomePage^Blog^conf^_admin.php): Permission denied in W:^x^HomePage^Blog^inc^maintenance^model^_maintenance.funcs.php on line 533
Trying fclose

Warning: fclose() expects parameter 1 to be resource, string given in W:^x^HomePage^Blog^inc^maintenance^model^_maintenance.funcs.php on line 536

Warning: unlink(W:/x/HomePage/Blog/conf/_admin.php): Permission denied in W:^x^HomePage^Blog^inc^maintenance^model^_maintenance.funcs.php on line 537
YES fclose did not help


Form is loading...