BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 05-15-2007, 04:24 PM   #21
merlin
Thumbs Must Hurt
 
Join Date: Jan 2005
Location: Yorkshire, England
Model: 8800
PIN: 2059E07F
Carrier: O2 UK
Posts: 114
Default

Please Login to Remove!

Quote:
Originally Posted by blubyu View Post
It should display everything about how your php is installed and setup. You should be able to scroll down and see the modules that are loaded for your php installation. There should be a section about MSSQL. Let me know what you find.
Thanks. I've done that and noticed that it was defaulting to C:\PHP5 for my php stuff. I've changed it so that it now looks correctly in C:\PHP but now when I browse to my website instead of showing the info, it just sends the test.php but doesn't render it. ie. if I click view source in IE, I see the php source code...Any ideas?

M
Offline  
Old 05-15-2007, 04:35 PM   #22
blubyu
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Default

Quote:
Originally Posted by merlin View Post
Thanks. I've done that and noticed that it was defaulting to C:\PHP5 for my php stuff. I've changed it so that it now looks correctly in C:\PHP but now when I browse to my website instead of showing the info, it just sends the test.php but doesn't render it. ie. if I click view source in IE, I see the php source code...Any ideas?

M
I think that has to do with the a setting in the php.ini file. I use what are called short tags (I think that is what they are called). Basically I use these:

Code:
<?
php code;
?>
Instead of these:

Code:
<?php
php code;
?>
What you need to do is open up the php.ini file and find this line:

Code:
short_open_tag = Off
It needs to be set to On. I think that will do the trick for you.
Offline  
Old 05-15-2007, 04:46 PM   #23
merlin
Thumbs Must Hurt
 
Join Date: Jan 2005
Location: Yorkshire, England
Model: 8800
PIN: 2059E07F
Carrier: O2 UK
Posts: 114
Default

thanks! PHP is now working and I am getting somewhere now.

I now get the top header and then got an error "Can't open database". so I fixed the typo in my config.php file!

Now it sort of works but doesn't! I don't see any error messages but I can't see any users. If I do a find user it looks like it's working but doesn't actually return anything - it says no user found

Quote:
Blackberry Stats Ver. 0.0.10 beta Tuesday May 15th, 2007 - 22:45:01
Your IP: x.x.x.x
Find UserOptionsAboutHelp

Find User


Your search for smith found the following results:
(Click on the name to see individual user stats)

Display Name PIN

Back
Any ideas?
M
Offline  
Old 05-15-2007, 05:06 PM   #24
blubyu
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Default

Do you see any of the server stats? They should be displayed above the user stats. Also can you check one more thing in your php.ini file for me?

Scroll down until you see the Error handling and logging part. If you scroll down a little farther you should see this line uncommented:

Code:
error_reporting  =  E_ALL & ~E_NOTICE
Change it to this:

Code:
error_reporting  =  E_ALL & E_NOTICE
By default php doesn't show you notice messages. Maybe by displaying them it might show us something.
Offline  
Old 05-15-2007, 05:20 PM   #25
merlin
Thumbs Must Hurt
 
Join Date: Jan 2005
Location: Yorkshire, England
Model: 8800
PIN: 2059E07F
Carrier: O2 UK
Posts: 114
Default

Thanks blubyu that did the trick!

In the default config snmp is enabled and I didn't have the php extension for php uncommented. I've uncommented it in the php.ini and its all working now!

Last question (for now) is there a way to filter the stats on the main page by IT policy name?

Ta
M
Offline  
Old 05-15-2007, 05:33 PM   #26
blubyu
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Default

Quote:
Originally Posted by merlin View Post
Thanks blubyu that did the trick!

In the default config snmp is enabled and I didn't have the php extension for php uncommented. I've uncommented it in the php.ini and its all working now!

Last question (for now) is there a way to filter the stats on the main page by IT policy name?

Ta
M
So you have snmp enabled and it is working? If you do I think you would be the first to get it working on a windows box I still can't get it to work on my windows box (it works fine on my linux box though).

So you want to only show users that have a specific IT policy assigned? At the moment no. You should be able to click on the IT Policy header and it should sort the policies alphabetically.
Offline  
Old 05-15-2007, 05:37 PM   #27
merlin
Thumbs Must Hurt
 
Join Date: Jan 2005
Location: Yorkshire, England
Model: 8800
PIN: 2059E07F
Carrier: O2 UK
Posts: 114
Default

Quote:
Originally Posted by blubyu View Post
So you have snmp enabled and it is working? If you do I think you would be the first to get it working on a windows box
No SNMP isn't working, but at least its not stopping phpBerrystats working - might look at SNMP at the weekend...

Quote:
So you want to only show users that have a specific IT policy assigned? At the moment no. You should be able to click on the IT Policy header and it should sort the policies alphabetically.
Thats ok, I may have a look at seeing how easy it is to put a filter in. I need to be able to stop certain users being able to see certain devices - We have 6 policies and 6 "admin teams" and each one needs only to be able to see their own devices. I'll have a play around with it and if I get anything working I'll post it up here.

Thanks for the help tonight
M
Offline  
Old 05-15-2007, 05:42 PM   #28
merlin
Thumbs Must Hurt
 
Join Date: Jan 2005
Location: Yorkshire, England
Model: 8800
PIN: 2059E07F
Carrier: O2 UK
Posts: 114
Wink

Hi all.

Just found a small problem!

In the green.css there is a style missing...

Quote:
.inactive {
background-color: #FF0000;
font-family: Verdana, Arial, Helvetica, Swiss, Futura, sans-serif;
}
Without it, accounts with over 30 days inactivity aren't highlighted in red.

Merlin
Offline  
Old 05-15-2007, 05:46 PM   #29
blubyu
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Default

Ok. I would have been very surprised if the snmp worked. For some reason the windows version sends the wrong OID to the server. I played with it a little bit but never got it to work.

I have toyed with the idea of adding some type of authentication to this project. I have had a couple of people ask me about make the options page have authentication so that not anybody can get in and change things. I might add that to my todo list but I am not sure when I will be able to get to it.

If you want any help going through my code don't be scared to ask One of these days I might actually sit down and comment some of it
Offline  
Old 05-15-2007, 05:50 PM   #30
merlin
Thumbs Must Hurt
 
Join Date: Jan 2005
Location: Yorkshire, England
Model: 8800
PIN: 2059E07F
Carrier: O2 UK
Posts: 114
Default

Quote:
Originally Posted by blubyu View Post
I have toyed with the idea of adding some type of authentication to this project. I have had a couple of people ask me about make the options page have authentication so that not anybody can get in and change things. I might add that to my todo list but I am not sure when I will be able to get to it.
If I can get the filtering working over the weekend, I might have a look at doing some kind of authentication so that I can give certain admins access to different views based on IT policy devices are in...That could probably be extended to the options page (although options page isn't working here - errors when it saves - but thats a problem for another day!)

Merlin
Offline  
Old 05-17-2007, 08:36 PM   #31
jibi
BlackBerry God
 
jibi's Avatar
 
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 8900
OS: 4.6.1.174
Carrier: AT&T
Posts: 11,310
Default

If you simply want to add a column and sort (not filter), then it's quite easy to do. I believe there are 2 or three spots you'll need to copy/paste the current column code and simply add the place for the IT Policy name. Filtering will be a little bit more complicated, as nothing is defined as a function for this purpose.

Umm, I had a suggestion the other day, but I completely forgot it. blubyu, since you have a Windows box online, try to get the user management functions working w/o involving SSH, too. I've been toying with some of the old code, but I got busy doing something else earlier...
__________________
In the beginning the Universe was created. This has made a lot of people very angry and is widely regarded as a bad move.
Offline  
Old 05-18-2007, 10:21 AM   #32
blubyu
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Default

Quote:
Originally Posted by jibi View Post
Umm, I had a suggestion the other day, but I completely forgot it. blubyu, since you have a Windows box online, try to get the user management functions working w/o involving SSH, too. I've been toying with some of the old code, but I got busy doing something else earlier...
Here is a question for you. Do you guys run this on your blackberry servers? If everybody is then it should be pretty easy and straight forward to add the user functions to my code.

The reason I ask is because I don't run mine on the blackberry server. That is where the whole ssh thing came from. I have always tried to make the code work on a stand alone server or on a company's web server.

jibi - Are the user tools pretty much the same between BES version 4.0 and 4.1? Command structure the same? Syntax? Our BES is running 4.0 so that is the only one I have available to test against.
Offline  
Old 05-18-2007, 02:47 PM   #33
merlin
Thumbs Must Hurt
 
Join Date: Jan 2005
Location: Yorkshire, England
Model: 8800
PIN: 2059E07F
Carrier: O2 UK
Posts: 114
Default

Quote:
Originally Posted by blubyu View Post
Here is a question for you. Do you guys run this on your blackberry servers?
Hi.Yes, I am running it on one of my BES servers...
M
Offline  
Old 05-18-2007, 02:58 PM   #34
blubyu
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Default

I downloaded the Blackberry Resource Kit and started looking at it. I didn't know that it had the ability to work from a remote server. As far as the php code goes, it won't matter if it sits on the BES or a remote server. Same commands get issued. I have two problems on my end before I can start working on this though. The first one is that I need to have our BES admins put the latest service pack on. The second thing is that I need to join our BES to our domain. I am hoping to get have these done by next week. After that I can start working on the code. I had it working at one point (using ssh from my linux box to the BES) so it shouldn't be that hard to put back. As a matter of fact it should be alot easier.

So I guess I am the only one out here running this on a Linux box huh?
Offline  
Old 05-21-2007, 04:26 PM   #35
blubyu
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Default

So I started playing around with authenticating users against an AD tree. I currently have my options page ask for a username and password when it is being accessed. If the username is valid and the password is correct then it lets you have access to the options page. If you try and type the url directly to the options page then it will bring up the username and password screen. So far so good. The only problem I have now is that ANY username and password will get you access to the options page. What I need to work on now is seeing if the user trying to authenticate is a member of a certain AD group and if they are grant them access to the options page. If they aren't then spit them back to the index page or the login page.

Since I can now authenticate against AD I should be able to create a users page so that blackberry users could sign in and do things like reset passwords and such.

Anyway, I thought I would give a small update to what I have been working on. I am not sure how much I will be able to work on this in the coming couple of weeks but I will keep plugging away
Offline  
Old 05-21-2007, 06:25 PM   #36
jibi
BlackBerry God
 
jibi's Avatar
 
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 8900
OS: 4.6.1.174
Carrier: AT&T
Posts: 11,310
Default

Nice. As for the BRK integration, we're running on a separate server. The remote user function didn't work in BRK 4.x until 4.1.3 was released here recently. I believe BRK versions are backwards compatible but not forward (although I could be wrong). Our production environment is 4.0.6 with the plans to move towards 4.1.3/4.1.4 here pretty soon. I'd prefer if we could bypass the non-native SSH functionality, if at all possible (yes, I know, veering away from what we used to do), but your being on a linux web server still poses that issue (what happened to your IIS server?)
__________________
In the beginning the Universe was created. This has made a lot of people very angry and is widely regarded as a bad move.
Offline  
Old 05-21-2007, 06:37 PM   #37
blubyu
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Default

I have the IIS server still running. I can do the testing on that to get the BRK stuff up and running. After looking at the readme files it should be pretty straight forward. I downloaded the 4.0.6 version. Our BES isn't at that level yet though so I didn't want to start testing this stuff out on our live BES (although everything else I test is against the live BES). There was talk last week that they might upgrade it to 4.1.3 so who knows.

As for my linux server, if I can get all the functions I want working I will move the phpberrystats to the IIS server. It sounds like I am the only one running on Linux anyway. I can always mess with the ssh stuff here when I get bored

Last edited by blubyu; 05-22-2007 at 10:07 AM.. Reason: because english is suppose to my first language but sometimes you can't tell :(
Offline  
Old 05-21-2007, 06:48 PM   #38
jibi
BlackBerry God
 
jibi's Avatar
 
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 8900
OS: 4.6.1.174
Carrier: AT&T
Posts: 11,310
Default

haha.
__________________
In the beginning the Universe was created. This has made a lot of people very angry and is widely regarded as a bad move.
Offline  
Old 05-22-2007, 01:42 PM   #39
blubyu
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Default

Well I did some searching today on the internet to add group lookup authentication. I found a php module that does exactly what I want. I have worked on it this morning and I now have my options page set up so that you have to enter user/pass and it then does a lookup to see if you are a member of a group (in my case bbtest). If you are then you have rights to view and modify the options page. If you are not a member of the group then you can't view or modify the options page. I will be sending an email to the author to get his blessing on including his module in my code. Once that happens I can zip up all the files and add them to my sourceforge site so that people can test.
Offline  
Old 05-22-2007, 06:03 PM   #40
jibi
BlackBerry God
 
jibi's Avatar
 
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 8900
OS: 4.6.1.174
Carrier: AT&T
Posts: 11,310
Default

nice

...if not, email it to me
__________________
In the beginning the Universe was created. This has made a lot of people very angry and is widely regarded as a bad move.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Associated Research Variable Voltage Meg-Chek;  120VAC 60 Hz 2A picture

Associated Research Variable Voltage Meg-Chek; 120VAC 60 Hz 2A

$225.00



KATO KCR-360 Voltage Regulator AVR (Brand New) picture

KATO KCR-360 Voltage Regulator AVR (Brand New)

$799.24



Sola Constant Voltage Transformer; 95-130-190-260; 120V 60Hz picture

Sola Constant Voltage Transformer; 95-130-190-260; 120V 60Hz

$1200.00



SOLA 25-399 1.5KVA Constant Voltage Transformer 1500VA 112 X 236V picture

SOLA 25-399 1.5KVA Constant Voltage Transformer 1500VA 112 X 236V

$325.00



Voltage Electricity Tester Volt Detector Test Pen AC Non-Contact Sensor 90-1000V picture

Voltage Electricity Tester Volt Detector Test Pen AC Non-Contact Sensor 90-1000V

$14.99



3000W Voltage Transformer Step Up Down 110V 220V 220V 110v Converter US PLUG picture

3000W Voltage Transformer Step Up Down 110V 220V 220V 110v Converter US PLUG

$56.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.