Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

New Member
Posts: 1
Registered: ‎10-02-2011
My Device: Developer
My Carrier: non-blackberry user

Newbie to BlackBerry Needs PHP help.

I am PHP developer for basic web pages, I am testing jquery mobile libraries with PHP ... works fine on ipad, iphone, & droid ..... of course my customer has a Blackberry 5   ....  I have narrowed the problem down to a couple of lines of code.





<?php include("header.inc"); ?>
<div data-role="header"><h1>Mark's Page</h1><a href="index.php" data-icon="home" rel="external"  data-ajax="false">Home</a></div>
<div data-role="content">

        echo "<h1>Mark's Favorite Music</h1>";
        echo "<ul data-role='listview' data-inset='true' data-filter='true'>";
        echo "<li>The Beatles</li>";
        echo "<li>Lady Gaga    </li>";
        echo "<li>Osmond Brothers</li>";
        echo "<li>Spice Girls</li>";
        echo "</ul>";

<?php include("footer.inc"); ?>


This code is NOT WORKING on the Blackberry 5:  


<?php include("header.inc"); ?>
<div data-role='header'><h1>Service Intervals</h1><a href='index.php' data-icon='home' rel='external'  data-ajax='false' data-theme='b'>Home</a></div>
<div data-role='content'>
    <ul data-role='listview' data-inset='true' data-filter='true'>
        <li data-theme='e'><strong>Engine</strong><p class='ui-li-aside'><strong>HSI (HR)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TBO (HR)</strong></p></li>
                echo "<li>Beer</li>";
            $f = fopen('engineChild.csv','rb');
                echo "<li>Coffee</li>";
            while (($rec = fgets($f)) !== FALSE) {
                echo "<li>Bacon and Eggs</li>";
            $i = explode('|',$rec);
                echo "<li>".$i[11]."</li>\n";
                echo "<li>Yellow</li>";
<?php include('footer.inc'); ?>



The above code appears to crash out on the while() loop ....   it does not bomb on the fopen() or fclose()


I have read about "PHP push"  and declaring HTTP headers, I am not doing any of this nor do I really understand it .... do I need to add some php code to make the connection with the device and my apache php webserver?


Any words of wisdom will be helpful.





Posts: 614
Registered: ‎10-17-2010
My Device: (BlackBerry Z10)-> Q10/Passport Dual Use

Re: Newbie to BlackBerry Needs PHP help.

Based on your class/div attributes, it looks like you're using the jquery mobile library. Browser Based Apps The issue could be that your client has javascript disabled on their BlackBerry OS 5 device, hence they are experiencing a rendering problem. Native Apps You did say your code worked on all devices. If your application is non-native (I.e. Browser based), you should have no issues whatsoever given your database and apache servers are configured correctly. If you are deploying an application through App World. You cannot packager php files into a native app. The solution is then to make: server calls from your html file using jsonp, and return the data, populated into the desired div or other dom element using javascript. Hope that solves your issue.