Chaosbreaker 0 Newbie Poster

Hi

Sorry for the late reply. Been busy with other issues -_-

Anyway, tried your idea and worked.
Now just to make the code neater :)

Thanks!

Chaosbreaker 0 Newbie Poster

Hi

I have a problem that's been bugging me. I created a page to display all my data. At the same time, I also incorporated 'filters' by using dropdown menu selection. Code snippet attached:-

<?php

    session_start();
    require("db.php");

    if (isset($_SESSION['SESS_CHIA_LOGGEDIN']) == FALSE)
    {
        header("Location: " . $config_basedir);
    }
    else if( $_SESSION['SESS_CHIA_GROUP'] != 1 )
    {
        header("Location: " . $config_basedir);
    }

    $start_time = microtime(true);

    if (isset($_GET['org']) == TRUE) {
        $org_id = $_GET['org'];
    } else {
        $org_id = 0;
    }

    if (isset($_GET['assembly']) == TRUE) {
        $aid = $_GET['assembly'];
    } else {
        $aid = 0;
    }

    if (isset($_GET['proj']) == TRUE) {
        $proj_id = $_GET['proj'];
    } else {
        $proj_id = "ALL";
    }

    require("header.php");

    $sql = "SELECT COUNT(*) FROM ".$dbdatabase.".libraries;";
    $result = mysql_query($sql) or die("Could not connect: " . mysql_error());
    $row = mysql_fetch_array($result);

    echo "Total Number of Libraries: " . $row['0'] . "<p/>";

    echo "<table border = 1>\n";
    // Header
    echo "<tr>\n";
    echo "<th rowspan=2>Library</th>\n";
    echo "<th>Organism</th>\n";
    echo "<th>Assembly</th>\n";
    echo "<th>Project</th>\n";
    echo "<th rowspan=2>Description</th>\n";
    echo "<th rowspan=2 colspan=2>Action</th>";
    echo "</tr>\n";

    echo "<tr>\n";
    //-------------------------------------------- Filter 1 -----------------------------------------
    $sql = "SELECT * FROM ".$dbdatabase.".organisms;";
    $org_result = mysql_query($sql) or die("Could not connect: " . mysql_error());
    $numrows = mysql_num_rows($org_result) or die("Could not connect: " . mysql_error());

    echo "<td><select name=\"organism\" onchange=\"location = this.options[this.selectedIndex].value;\">\n";
    if ($org_id == 0)
    {
        echo "<option selected value='" . $config_basedir . "viewLibraries.php"'>-- Show all Organisms --</option> <br />";
    }
    else
    {
        echo "<option value='" . $config_basedir . "viewLibraries.php"'>-- Show all Organisms --</option> <br />";
    }

    for ($i = 0; $i < $numrows; $i++)
    {
        $org_row = …
Chaosbreaker 0 Newbie Poster

Hi

I'm relatively new to Unix and after setting up PHP5, I was unable to start the Apache Server. The error below was reported:-

httpd: Syntax error on line 53 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: ld.so.1: httpd: fatal: relocation error: file /usr/local/apache2/modules/libphp5.so: symbol xmlTextReaderSetup: referenced symbol not found

I have been reading alot of forum post about relocation error. From what I understood, the problem file is ld.so.1 and the symbol xmlTextReaderSetup could not be found, most likely because the link is incorrect. I did used the ldd command but I have no idea how to even start or even how to find the symbol.

The other thing worth noting is that the server I am working on currently have Apache running with MySQL and PHP 5.2.4 (What I am installing is 5.2.5). All software in this server was installed using source packages so there is no easy way to remove the old PHP. One of the thing I read is that the relocation error is probably cause by multiple similar software installed. But how do I rectify the relocation error if it is really the cause?

Anyone have any tips on how/where do I start to resolve this?

Thanks in advance.