• Support will be limited until May 8th, as I will be out of the office travelling. Thank you for your patience and understanding.
Status
Not open for further replies.

Drahnier

Customer
This isn't really a bug, but was the best of the category options available. Sorry!

I recently moved my site over to a new host and installed upgraded versions of all the server software. One of these upgrades was moving the PHP version from 5.3 to 5.5, which is not officially supported by vB 4.2.2 (which, of course, I didn't realize until I'd invested enough hours in porting to not want to start over). We're running the new Ubuntu LTS, so there's no easy way of rolling it back.

Semi-luckily, with depreciation errors suppressed, vB as a whole seems to be running as it should. The Thanks/Likes mod is the only thing I've found that seems to have broken on the move.

Clicking on a button doesn't do anything. The user for whom you've thanked doesn't get a notification, and the fact that you've thanked the post doesn't appear on the thread. It doesn't end up in the database at all.

The script run when the buttons are clicked appears to be partially working, however, as spamming a button gives the popup error about needing to wait X seconds between button clicks.

Could this issue be related to the vB-unsupported PHP 5.5 version? Could there be another issue related to the move that might be causing this? Any suggestions on things to try that may help to repair the addon would be greatly appreciated.
 
You will need to enable error logging to file and find the error log, or inspect the AJAX request with a dev tool like Firebug for Firefox, or the F12 tools in Chrome/Opera/IE.
 
You will need to enable error logging to file and find the error log, or inspect the AJAX request with a dev tool like Firebug for Firefox, or the F12 tools in Chrome/Opera/IE.

Okay.

I was getting a general 500 Internal Server Error on the thanks.php script when the request was initiated. I started by changing the PHP Environment error reporting at the top of the thanks.php script from the default:

PHP:
error_reporting(E_ALL & ~E_NOTICE);

to the following:

PHP:
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

With the file permissions at the default 644, I was getting the same 500 error. Changing these to 777 USUALLY (but not always?) shows the request going through, "status 200 OK" (and yielding a response), but I still do not see the button on the page reflecting that it was clicked. It seems like it should be working; showpost.php is reloaded.

I have also tried turning off PHP error reporting in the script entirely (using the following line in thanks.php), which did not change anything.

PHP:
error_reporting(0);

For reference/if it means anything, this is the response I'm getting according to Chrome.

Code:
<aptl>
	<colorOptions>
		<colorOption numclicks="10" varname="dislikes" settings="12">Red</colorOption>
	</colorOptions>
	<entries />
	<actions><![CDATA[<a href="javascript://" name="dbtech_thanks_button" data-postid="211008" data-button="thanks" style="padding-right:6px;"><img src="dbtech/thanks/images/thanks.png" alt="Thanks" title="Thanks" border="0" style="top:0; vertical-align:middle;" /> Thank for this post</a><a href="javascript://" name="dbtech_thanks_button" data-postid="211008" data-button="likes" style="padding-right:6px;"><img src="dbtech/thanks/images/likes.png" alt="Likes" title="Likes" border="0" style="top:0; vertical-align:middle;" /> Like this post</a><a href="javascript://" name="dbtech_thanks_button" data-postid="211008" data-button="lol" style="padding-right:6px;"><img src="dbtech/thanks/images/lol.png" alt="Lol'd" title="Lol'd" border="0" style="top:0; vertical-align:middle;" /> Lol this post</a><a href="javascript://" name="dbtech_thanks_button" data-postid="211008" data-button="What" style="padding-right:6px;"><img src="dbtech/thanks/images/What.png" alt="WTF" title="WTF" border="0" style="top:0; vertical-align:middle;" /> WTF this</a>]]></actions>
</aptl>
 
That sounds like the PHP files were uploaded under a different user than what Apache has access to.

For instance, a very common instance of this problem is files uploaded via the root account (an incredibly bad practice that is a security breach waiting to happen, yet unfortunately a lot of people do it), whereas Apache runs as "nobody".
 
That sounds like the PHP files were uploaded under a different user than what Apache has access to.

For instance, a very common instance of this problem is files uploaded via the root account (an incredibly bad practice that is a security breach waiting to happen, yet unfortunately a lot of people do it), whereas Apache runs as "nobody".

That might explain the file permissions change giving a proper response, but that wouldn't affect the operation of the actual script, no?

Before worrying about its security, I'd like to at least get to the bottom of the issue of the script 'running' but not actually running. Are there any other PHP files that there is a dependency on when a button is clicked, or anything else that might be getting thrown off by the depreciation warning errors in PHP 5.5?
 
That might explain the file permissions change giving a proper response, but that wouldn't affect the operation of the actual script, no?
No. There's linux security policies in place that I don't fully understand, but for PHP files to execute they can't be uploaded by root unless Apache also runs as root.

Before worrying about its security, I'd like to at least get to the bottom of the issue of the script 'running' but not actually running. Are there any other PHP files that there is a dependency on when a button is clicked, or anything else that might be getting thrown off by the depreciation warning errors in PHP 5.5?
I don't know for certain, but the first step is to deal with the file ownership issue. There's no point worrying about other issues until we're certain that the files are accessible by the web server.
 
Wanted to post back and say I figured it out.

I just suppressed PHP's depreciation notification errors globally via php.ini, this solved the issue. No need to edit specific php files.
 
Status
Not open for further replies.

Legacy Advanced Post Thanks / Like

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
4,031
Customer rating
5.00 star(s) 1 ratings
Back
Top