I'm sad to report that there was no success here. This is the first MOD that has failed to install on our Forum.
I verified the permissions on the created admincp folder, as well as the copy of ranks.php that was put in to it. I verified that the permissions on functions_ranks.php in the includes folder had the right permissions. The MOD simply doesn't get installed. Neither of the .php files gets backed up, and they don't get modified. The database does get the added field, and when I run the uninstall on the MOD, the database is updated to remove the added field. Everything else in the .xml doesn't work for me.
I'm still wondering if it's our version of PHP that is the issue.
Code:
php -v
PHP 5.5.9-1ubuntu4.20 (cli) (built: Oct 3 2016 13:00:37)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
I suggest this based only on the syntax of the
file_get_contents and
file_put_contents functions. Both utilize
FILE_USE_INCLUDE_PATH, and according to php.net (Documentation):
Quote:
Example #2 Searching within the include_path
<?php
// <= PHP 5
$file = file_get_contents('./people.txt', true);
// > PHP 5
$file = file_get_contents('./people.txt', FILE_USE_INCLUDE_PATH);
?>
|
this implies your version of PHP is greater than version 5.
When I start up PHP interactively (php -a) and execute:
$file = file_get_contents('./admincp/ranks.php', FILE_USE_INCLUDE_PATH);
I don't get any error message, but the contents of the $file variable doesn't appear to contain anything. When I execute:
echo $file
or
print $file
I only get the php prompt.
I won't ask you to spend any more time on this; unless you want to. I'm not going to try and manually modify the two files, as I don't have the knowledge to properly understand what the .xml is saying with regards how the two .php files are changed, and I don't want to make a mess of things.