3 Replies Latest reply on Jul 3, 2007 8:29 AM by mitanjos

    JBossWeb PHP MySQL

      I have fresh installation of jbossweb-1.0.1.GA and PHP module. On this i deployed php-examples.war and tested them. I was able to run few PHP scripts without any problem bue when i tried to connect my local MySQL database. It show me an error

      Fatal error: Call to undefined function mysql_connect() in D:\jBossInstances\jbossweb-1.0.1.GA\server\cis\deploy\jbossweb.sar\php-examples.war\db_connection.php on line 12


      Attached is the code for reference
      <?php
      // hostname or ip of server (for local testing, localhost should work)
      $dbServer='localhost';
      
      // username and password to log onto db server
      $dbUser='root';
      $dbPass='';
      
      // name of database
      $dbName='test';
      
       $link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or die("Could not connect");
       print "Connected successfully<br>";
       mysql_select_db("$dbName") or die("Could not select database");
       print "Database selected successfully<br>";
       $query = 'SELECT * FROM DUMMY_TABLE';
       $result = mysql_query($query) or die('Query failed: ' . mysql_error());
       echo("<table border='1'>");
       while ($line = mysql_fetch_array($result, MYSQL_ASSOC))
       {
       echo "<tr>";
       foreach ($line as $col_value)
       {
       echo "<td>".$col_value."</td>";
       }
       echo "</tr>";
       }
       echo("</table>");
       mysql_free_result($result);
      // close connection
      mysql_close($link);
      ?>
      

      I want to know how can i change the parameters for php.ini (Whats the location of this ini file for JBossWeb cus I have php 5.2.0 on my local setup but when i am running phpinfo() on JBossWeb it shows me PHP PHP Version 5.1.6 Does JBossWeb have it built Zend Engine?)