Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

Lessn Pepper Doesn't Show Data

ShawnM
Minted
Posted on Sep 15, '09 at 11:03 pm

Hello,

I am having trouble getting the new Lessn pepper to show any data. I have mint installed on my main domain (http://abiteclectic.net). lessn is installed on the same server, but a different domain (http://abeurl.us/x).

Is Mint not being updated because they are under different domain names?

These are the lines I added to the index.php at http://abeurl.us/x:

define(‘MINT_ROOT’, $_SERVER[‘DOCUMENT_ROOT’].’/domains/abiteclectic.net/mint/’); include(MINT_ROOT.’pepper/shauninman/lessn/record.php’);

My sites are hosted at Media Temple on the (gs).

Shaun Inman
Mint/Pepper Developer
Posted on Sep 16, '09 at 08:38 am

I wouldn’t be surprised if:

$_SERVER['DOCUMENT_ROOT'].'/domains/abiteclectic.net/mint/'

equals something like:

'/gs1234/domains/abeurl.us/domains/abiteclectic.net/mint/'

You might need to take DOCUMENT_ROOT and replace abeurl.us with abiteclectic.net then tack on just /mint/.

ggamel
Minted
Posted on Sep 16, '09 at 12:52 pm

As does ShawnM, I host on a (mt) (gs) server. I’m using a different domain for link shortening & Mint stats.

I’ve used each of the following paths, but still seem unable to see any Lessn stats:

First, I tried:

define('MINT_ROOT', $_SERVER['DOCUMENT_ROOT'].'/mint/');

But this did not work.

Next I tried:

define('MINT_ROOT', 'home/12345/domains/website.com/html/mint/');

No dice.

Next:

define('MINT_ROOT', '/12345/domains/website.com/html/mint/');

Nope. Dangit.

Then I tried:

define('MINT_ROOT', $ENV{'SITE_HTMLROOT'}.'/mint/');

I used $ENV{'SITE_HTMLROOT'} because (mt) states that it equals the following: home/12345/domains/website.com/html

Any ideas on how I could fix the path?

I’m seeing the same with Dreamhost. My Lessn is on ely.fm but my Mint is david.ely.fm. I suspect there’s a magic formula but can’t seem to find it.

ShawnM
Minted
Posted on Sep 16, '09 at 07:58 pm

I tried everything that ggamel tried and I had no luck either.

I also used Transmit on the Mac and select “copy path” and tried using just that.

It ended up looking like this:

define(‘MINT_ROOT’, ’/nfs/c01/h01/mnt/12345/domains/mainsite.com/html/mint/’);

That didn’t work either.

Shaun Inman
Mint/Pepper Developer
Posted on Sep 16, '09 at 10:03 pm

Have you guys tried turning on error_reporting(E_ALL); to see what the specific problem is? I wonder if it’s a shared server safe mode issue (in which case there’s nothing you can do).

ggamel
Minted
Posted on Sep 17, '09 at 09:23 am

Shaun, where would I place error_reporting(E_ALL); for the best results?

Should I put the line in the Lessn index.php or elsewhere?

ggamel
Minted
Posted on Sep 17, '09 at 10:02 am

Well, I seem to have figured out the true Document Root path for (mt) (gs) servers. I used really basic PHP to print the environment path.

Inside the Lessn directory /lessn/ ( or /x/ or /g/ whatever you renamed the folder to) you can create a file named test.php.

Inside test.php place the following:

<?php print ($_SERVER['DOCUMENT_ROOT']); ?>

Save the file. Then navigate in your browser to that file and it should give you a path along the lines of the following:

/home/12345/domains/website.com/html

Well, that’s not a solution, but it will at least let us know the true path that (mt) is using for our (gs) hosting. Perhaps this will help us figure out if we can or cannot use the Lessn pepper.

ggamel
Minted
Posted on Sep 17, '09 at 10:19 am

And I believe I just got it all working for my (mt) (gs).

Here’s how I edited the Lessn index.php file to get the Lessn Pepper working.

define('MINT_ROOT', '/home/12345/domains/website.com/html/mint/');

It’s now showing a single entry from when I Lessn’d a URL after I made a change, this morning.

It only showing the resolved URL, however, not my Lessn’d URL. Perhaps that is how it’s designed? Might be nice to see both the Lessn’d & resolved URLs, but I digress.

Hope that works for everyone else.

Working on Dreamhost here using the same method.

ShawnM
Minted
Posted on Sep 17, '09 at 11:49 am

It works!

At first it didn’t work so I reinstalled the lessn pepper and reuploaded a new index.php. Everything is no A OK.

Thanks for your help ggamel and Shaun.

Any plans for Lessn Pepper to track Locations, OS, etc?

you can have a look at yourls.org more advanced.

I cannot get this to work still. I tried everything ggamel mentioned above but no luck. I am on a (gs) @ (mt). Any other ideas?

grgry
Minted
Posted on Sep 21, '11 at 08:02 pm

I’m having a hard time finding where in the index.php file to stick the lessn pepper code. I don’t seem to have the header('Location:'.stripslashes($row['url'])); statement in my index.php file.

the closest thing I have is this:

header('Location:'.str_replace('%l', urlencode($new_url), $_GET['redirect'])); exit();

Is this the right spot? Also, how come no else seems to have this issue? :)

grgry
Minted
Posted on Sep 21, '11 at 10:52 pm

Ok, so, I was in the wrong index.php. I had to go up a level. But even there I don’t have the exact line as indicated in the readme. So this is where I stick the code, which doesn’t seem to be working:

// Handle standard redirections, both custom and auto-assigned header($_SERVER['SERVER_PROTOCOL'].' 301 Moved Permanently');
header('Location:'.$row['url']);
define('MINT_ROOT', $_SERVER['DOCUMENT_ROOT'].'/home/wassanova/grgry.ws/public/mint/');
include(MINT_ROOT.'pepper/shauninman/lessn/record.php');
exit();

Any insight you folks might have into what’s going on here would be much appreciated.

Hmmm, seems no one has touched this issue in a year.

I’m on dreamhost and am having the same issue - not getting any data in the lessn pepper.

The code added is this:

        define('MINT_ROOT', $_SERVER['DOCUMENT_ROOT'].'/home/xxxx/mydomain.com/site/mint/');
        include(MINT_ROOT.'pepper/shauninman/lessn/record.php');
        exit();

Has anyone figured out the magic for a dreamhost hosted site?

You must be logged in to reply. Login above or create an account