~ one ~



NP Random on Nucleus 3.71

troubleshooting Testing the NP Random plugin on Nucleus v. 3.71 with php 5.x, I could not get versions 1.3 and 1.4 to work.

However, when I resurrected a very old copy of NP Random (v1.1), it worked perfectly.

The newer versions require the quotes to be placed in a specific sub-folder in the plugins folder.
The old version requires the quotes to be placed where your index file is.

I finally found a clue in an error log today. All the webhosts nowadays seem to disable the error logs in cpanel, which is a pity since they were a great help for troubleshooting, but fortunately there are still the individual error logs that get saved in your account folders. The only problem with those is they are saved wherever the problem is, so you have to hunt them down because they could show up in any folder!

[05-Jun-2018 23:44:08 UTC] PHP Warning: file(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/user/public_html/test/nucleus/plugins/NP_Random.php on line 70

[05-Jun-2018 23:44:08 UTC] PHP Warning: file(https://test.test/nucleus/plugins/random/quotes.txt): failed to open stream: no suitable wrapper could be found in /home/user/public_html/test/nucleus/plugins/NP_Random.php on line 70

[05-Jun-2018 23:44:08 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/user/public_html/test/note/nucleus/plugins/NP_Random.php on line 75

I looked at the plugin file (v1.4 of NP Random) and could not find any lines in it that corresponded to http or https, so I couldn't change it to say https.

Line 70 actually just says:

$contents = file_get_contents($filename);

which I assume goes to the blog configuration and looks for the site url or path there.

(Ooh! I think I just found a possible reason! I did not change the config file when I upgraded the site from 3.70 to 3.71. The new config files are a little different from the old ones and sometimes they seemed to cause problems for my existing blogs, so this time I thought to just leave it as it was, especially as this particular installation was having problems with set up initially. I think I'll go potter around with that now and see if changing the config file makes a difference.)

Update, Sat, 6-09-2018, 4:10:56 PM:

Aha! It worked!

Still having problems with the new path requirements in the new config files - I seem to be getting them wrong somehow. But it seems to be ok to substitute the old path lines for the media and skin subfolders, you just need to have the new base directory line correct. Now I am able to use NP Random 1.4 without any problems. W00t!!!!!



tags: ,

Posted by: heian
on 06.09.2018 at 15:57:51
456 words

Comments


no comments yet...

Add Comment

Comments are currently disabled for this blog.

This item is closed, it's not possible to add new comments to it or to vote on it

Comments must be approved before being published.

© one.kuroshiro.com (2012-2022) | website by tarasseche solutions | back to top