BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 05-30-2007, 12:39 PM   #41 (permalink)
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please Login to Remove!

Just to give a quick update, I sent my latest code to jibi to test out for me. This code includes the authentication against an AD tree for access to the options page. jibi tested it out and found a couple small bugs. He has sent me what needs to be fixed. Once I get that done I will upload the latest code to sourceforge. I have a pretty big project I am working on at work that will probably take up the rest of my time this week. I should be able to get the changes made and the code uploaded first thing next week. Once I get that done I am going to start working on the BRK integration.
Offline  
Old 06-20-2007, 06:03 AM   #42 (permalink)
Knows Where the Search Button Is
 
Join Date: Aug 2006
Location: Manchester
Model: 8800
Carrier: Vodafone UK
Posts: 39
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm trying to get it working on my linux box, but failing to understand how to get the freeTDS stuff working!

Quote:
Originally Posted by blubyu View Post
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?
__________________
-------------
8800 - VodafoneUK
BES 4.1.3(hp4)
GroupWise
Offline  
Old 06-20-2007, 11:42 AM   #43 (permalink)
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

goresci -

Well I am not sure how much this is going to help you. Do you have your php compiled with mssql support? You can make a quick php page that has this:

Code:
<?
phpinfo();
?>
Then bring that page up in a browser. Scroll down and see if you have MSSQL support. If you do, check to see if you have the line Library Version = FreeTDS.

If you do then I don't know what might be going on. If you don't have the MSSQL info then you don't have that compiled into php.

I wish I could be more help but I set this linux box up a couple of years ago and haven't touched it since. Let me know if you need anything else.
Offline  
Old 07-16-2007, 05:08 PM   #44 (permalink)
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just dropping by to give an update on my progress....there is none :( I have been very busy at work and haven't had the chance to pick this project back up. I am hoping that next month things will slow down enough for me to start working on this again. I do monitor this thread so if anybody has any questions about anything feel free to post here and I will do my best to answer them.

jibi - If you want to unsticky this thread until I can put some more time into the code, that is fine with me.
Offline  
Old 07-20-2007, 07:48 AM   #45 (permalink)
Knows Where the Search Button Is
 
Join Date: Jun 2005
Location: UK
Model: 8700
Carrier: Voda UK
Posts: 28
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Blubyu

I know in the README it said you don't normally help out with PHP on IIS ... but .... I'm trying to get this working on my BES with PHP installed. As far as I can tell the PHP installation is working correctly as phpinfo produces a nicely formatted page. But when I open phpberrystats it looks like this:

Total Number of Users: (Click on a name for details)

";} } else { ?>
";} } else { ?>
";} } else { ?>
";} } else { ?>
";} } else { ?>
";} } else { ?>
";} } else { ?>
";} } else { ?>
";} } else { ?>

etc

Across the bottom of the page I get:

Display Name Email Address Msgs Forwarded Msgs Sent Msgs Pending

Any thoughts?
__________________
Ben Stokes
--
My Exchange Blog
Offline  
Old 07-20-2007, 10:16 AM   #46 (permalink)
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by st0kes View Post
Hi Blubyu

I know in the README it said you don't normally help out with PHP on IIS ... but .... I'm trying to get this working on my BES with PHP installed. As far as I can tell the PHP installation is working correctly as phpinfo produces a nicely formatted page. But when I open phpberrystats it looks like this:

Total Number of Users: (Click on a name for details)

";} } else { ?>
";} } else { ?>
";} } else { ?>
";} } else { ?>
";} } else { ?>
";} } else { ?>
";} } else { ?>
";} } else { ?>
";} } else { ?>

etc

Across the bottom of the page I get:

Display Name Email Address Msgs Forwarded Msgs Sent Msgs Pending

Any thoughts?
I believe the problem lies in the php tags. There should be a setting in your php.ini file that allows you to use short php tags like this:
Code:
<?
php code
?>
I use short tags throughout my code. By default php.ini defaults to using this:

Code:
<?php
php code
?>
Do a search in your php.ini file for short_open_tag and make sure it is set to on. Let me know if this helps you out.
Offline  
Old 07-20-2007, 10:27 AM   #47 (permalink)
Knows Where the Search Button Is
 
Join Date: Jun 2005
Location: UK
Model: 8700
Carrier: Voda UK
Posts: 28
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hmm .. it's not that. I already have short_open_tag = On in my php.ini.

My feeling is the php is not being parsed properly? Even though I have uncommented the MSSQL bits in php.ini I think it's not handling the SQL connection correctly.
__________________
Ben Stokes
--
My Exchange Blog
Offline  
Old 07-20-2007, 11:43 AM   #48 (permalink)
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have had this problem before too but I can't remember what I did to fix it. I want to say I only had it trying to set things up on a windows box.

Are you only getting text on the screen? No banners or anything?

If it is only text on the screen with no formatting then it isn't reading the options file. Maybe a permissions error? It does seem that it is only reading the html of the file and not parsing the php. Even if the MSSQL wasn't setup and working it still should be parsing the php. I know very little of IIS but I know when I tried to get it running on that platform I had a hard time with permissions.
Offline  
Old 07-23-2007, 07:55 AM   #49 (permalink)
Knows Where the Search Button Is
 
Join Date: Jun 2005
Location: UK
Model: 8700
Carrier: Voda UK
Posts: 28
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK, after much timewasting on IIS I have installed a LAMP with mssql support compiled into the PHP. Seems to be working now (hurrah!) apart from 1 thing - the inactivity for all users is showing as 13718 days which is a bit odd ... so my entire table of users is bright red (and not very pleasing to my eyes!)

Any thoughts with this one? Thanks for your help so far!
__________________
Ben Stokes
--
My Exchange Blog

Last edited by st0kes : 07-23-2007 at 08:07 AM.
Offline  
Old 07-23-2007, 12:51 PM   #50 (permalink)
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

If the inactivity dates are all the same (and therefore wrong) it must be reading the wrong thing. I will look at the code and see if I can help track down why it isn't working correctly.

You should be able to go into the options page and turn off the inactivity indicator. That should be easier on your eyes
Offline  
Old 07-24-2007, 01:00 AM   #51 (permalink)
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by st0kes View Post
OK, after much timewasting on IIS I have installed a LAMP with mssql support compiled into the PHP. Seems to be working now (hurrah!) apart from 1 thing - the inactivity for all users is showing as 13718 days which is a bit odd ... so my entire table of users is bright red (and not very pleasing to my eyes!)

Any thoughts with this one? Thanks for your help so far!
Is the last forward time displaying correctly?

I am pulling the last forward time from the userstats table and using it for both the last forward time and the inactivity time. If it is working for the last forward time but not the inactivity then there is a problem with my inactivity code. If it isn't working for either one then there is something wrong with the data that it is pulling.

I have a hunch I know what and where the problem might be but I will wait to hear back from you.
Offline  
Old 09-25-2007, 11:43 AM   #52 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Model: 8700
PIN: N/A
Carrier: BT
Posts: 62
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

not sure if anyone has had this problem already but I've just installed it, turned on the short tags to get rid of one problem and it looks fine now.

I've just chucked in the DB names and IP and my network credentials as the DB seems to be set to use Windows authentication.

However when i load the page, I get the following,

Any ideas? Is this just the wrong credentials in the DB Username and password?

Cheers,
Offline  
Old 09-25-2007, 12:06 PM   #53 (permalink)
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

AndyT_uk - If you had the wrong credentials then I am pretty sure you would get an error message stating so. I am not a SQL guy so this might be a dumb question but does the user account you are using to log into the database with have the rights to read the database?
Offline  
Old 09-25-2007, 02:19 PM   #54 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Model: 8700
PIN: N/A
Carrier: BT
Posts: 62
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by blubyu View Post
AndyT_uk - If you had the wrong credentials then I am pretty sure you would get an error message stating so. I am not a SQL guy so this might be a dumb question but does the user account you are using to log into the database with have the rights to read the database?
It should do (i was using my network credentials which have I'm sure have worked in the past).

I may try getting query analyser on there tomorrow morning and take a look at the perms. Still I'd have thought the code would have returned an error about not being able to connect to the DB. I may double check through the code tomorrow

Cheers
Offline  
Old 09-25-2007, 05:47 PM   #55 (permalink)
Thumbs Must Hurt
 
blubyu's Avatar
 
Join Date: Jun 2005
Model: 7520
Carrier: nextel
Posts: 116
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

AndyT_uk - I just changed my username in my config.php to something I know won't work and tried to connect. I get a message that says unable to connect to database. So if you are not getting that I can only assume that you are connecting. Which means for some reason it isn't displaying the information
Offline  
Old 09-25-2007, 07:12 PM   #56 (permalink)
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
Post Thanks: 0
Thanked 1 Time in 1 Post
Default

Andy, the easiest thing to do is put SQL into mixed-mode authentication and create a local SQL account. If that is an option, I'd suggest going in that direction.
__________________
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 09-26-2007, 04:39 PM   #57 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Model: 8700
PIN: N/A
Carrier: BT
Posts: 62
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

/edit

Ignore - seems i was missing a dll file in my sys32 folder. Just need to sort out the auth probs now.

CHeers!

/2nd edit

Right, still getting the unable to connect to DB errors now.

I think this is down to Named Pipes and TCP/IP being enabled on the DB. I've done this but I need to restart the SQL services. Can i just double check that there aren't any adverse side effects of restarting these?

Last edited by AndyT_uk : 09-26-2007 at 05:18 PM.
Offline  
Old 09-26-2007, 09:04 PM   #58 (permalink)
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
Post Thanks: 0
Thanked 1 Time in 1 Post
Default

Restarting the SQL services will disrupt some BES functions, but it shouldn't have too much of an impact.
__________________
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 10-18-2007, 06:56 AM   #59 (permalink)
Talking BlackBerry Encyclopedia
 
DavidAdams's Avatar
 
Join Date: Sep 2007
Location: Belfast
Model: NotYe
PIN: N/A
Carrier: O2
Posts: 470
Post Thanks: 2
Thanked 0 Times in 0 Posts
Default

Ok, i guess i am doing something stupid here, but for the life of me i can't get it to conenct to my SQL. i get a nicely formatted header and then the line:

Unable to select database

I suspect there may be something amiss in the config.php but i don't know what

the top of the config looks like this

define('PAGETITLE', 'Php-Berrystats' );
define('VERSION', '0.0.10');
define('COMPANY', 'AVX');
define('COMPANYURL', 'http://YOUR COMAPNY URL HERE');
define('DBUSER', 'sa');
define('DBUSERPW', 'Password is correct here for sa user');
define('DBNAME', 'SQLEXPRESS\BESMgnt');
define('DBHOST', '10.10.7.234');
define('DBPORT', '1433');

Any ideas? i have tried it with/without the refernece to SQLEXPRESS but no luck.
Offline  
Old 10-18-2007, 07:32 AM   #60 (permalink)
BlackBerry Genius
 
hdawg's Avatar
 
Join Date: Aug 2006
Model: hdawg
PIN: port3101.org
Carrier: hdawg
Posts: 6,632
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

is your database name BESMgnt or BESMgmt?
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





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