vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Rank Ordering (https://vborg.vbsupport.ru/showthread.php?t=319659)

Snowhog 02-06-2017 08:14 PM

Nothing in config.php that would suppress error logging.

grep error config.php returns:

Code:

| If you get any errors while attempting to connect to    |
        //        If any database errors occur, they will be emailed to the address specified here.
        //        Leave this blank to not send any emails when there is a database error.
        // may receive collation errors.  Ignore this setting unless you

What version of PHP are you running? Our server is running 5.5.9.

Snowhog 02-07-2017 01:58 AM

Should this be? Two versions of the Install code? Version 1.0 appears complete. Version 1.1 is only a fragment. Not even sure where version 1.1 came from.
https://vborg.vbsupport.ru/external/2017/02/12.png

MarkFL 02-07-2017 02:17 AM

Quote:

Originally Posted by Snowhog (Post 2581980)
Should this be? Two versions of the Install code? Version 1.0 appears complete. Version 1.1 is only a fragment. Not even sure where version 1.1 came from.
https://vborg.vbsupport.ru/external/2017/02/12.png

Yes, that looks correct. :)

After I initially released version 1.0, I realized I missed a file edit, so the install code for version 1.1 catches that missing edit.

Snowhog 02-07-2017 02:40 AM

Thank you.

I have verified that folder and file permissions on the server are correct (didn't really think they weren't, but...)

The only thing I can come up with as to why this MOD isn't getting installed is either, the php commands are not correct (for our installation), or the relative path to the two files isn't correct. I find both possibilities rather unlikely given the author. ;)

I can provide you with my SSH login credentials via separate PMs if you are still inclined to go in and look around. I would like to get this problem resolved so the MOD can actually get installed.

sub_ubi 02-10-2017 08:42 PM

Working well with 4.2.5 Beta 1 + PHP 7.0

Did an edit+replace on the xml file for my custom admincp, otherwise no issues.

Snowhog 02-10-2017 09:24 PM

I wish that were true here. Still waiting for MarkFL to ascertain why it won't install on our Forum.

Snowhog 02-13-2017 09:38 PM

The first part of the .xml instructions was executed properly.
Code:

$vbulletin->db->hide_errors();
$vbulletin->db->query_write("
        ALTER TABLE`" . TABLE_PREFIX . "ranks`
                ADD rankorder SMALLINT
");

The ranks database was altered to add rankorder.
https://vborg.vbsupport.ru/external/2017/02/6.png

But the remaining code isn't being executed, or is failing, as the two files: ranks.php and functions_ranks.php; are not being backed up or modified. This leaves me to believe that the (php ?) commands aren't correct (for us), or the permissions on the folders and/or .php files are wrong.

The folders containing ranks.php and functions_ranks.php are set with permissions 755 (rwxr-xr-x) and the .php files are set with permissions 644. I'm 99.999% confident that these are correct.

MarkFL@

I understand that you are quite busy at the moment, so I am more than willing to try and debug this installation issue on my own.

When the .xml file is executed, is it PHP that is running the code?

MarkFL 02-14-2017 01:28 PM

Hey Paul,

The only things I can think of that would prevent the files from being altered is either the folder permissions aren't correct, or the files are not located where they need to be. I have installed this product a multitude of times on many sites and never had any issues. However, none of these sites had the "admincp" folder renamed.

The install code is PHP, and I have used it on sites running PHP 5.2.x - 7.x. :)

Just to double check, before you install:
  1. Did you create a folder called "admincp" in the same folder your renamed "admincp" folder is located?
  2. Did you put a copy of your "ranks.php" file there?
  3. Ensure permissions of "admincp" folder is 0755 and permissions of "admincp/ranks.php" is 0644?
  4. After install, copy the files (the backup and the altered "ranks.php" file) in the "admincp" folder to your renamed "admincp" folder?

Snowhog 02-14-2017 01:36 PM

Yes, I did that previously, but I'll repeat it again, making sure that the permissions on the created folder and the file put in it are as stated. I'll also ensure that the other file; functions_ranks.php has the indicated permissions.

I'll report back on the results.

Snowhog 02-14-2017 03:34 PM

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.


All times are GMT. The time now is 11:58 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02895 seconds
  • Memory Usage 1,751KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete