1 louis2 Oct 14, 2015 20:31
3 fplanque 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 louis2 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 louis2 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 mgsolipa 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 louis2 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 louis2 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 louis2 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 louis2 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
@louis2 are you using the Auto-Upgrade Procedure? Did you try the Standard Upgrade Procedure (http://b2evolution.net/man/upgrade-instructions) ?