6
Hi,
OK, it's not confidential. I am just in doing some simple tests to investigate xoops.
Here is what I have.
1) I created a new database in ysql called "home". And in there I have a table called "motd", short for "Message of the day".
The table has one field called "message" which is a VARCHAR(128).
The idea is that a simple piece of text is displayed on the home page.
2)So, I now have a custom window in xoops, with the following text:
--- START ---
<?
mysql_connect(localhost, "my_sql_username", "my_sql_password") or die("Unable to connect");
@mysql_select_db("home") or die("Unable to select database");
$query="select * from motd";
$result = mysql_query($query);
$num=mysql_numrows($result);
$i = 0;
while($i < $num)
{
$message = mysql_result($result, $i, "message");
echo $message;
++$i;
}
mysql_close();
?>
--- END ---
As you can see, it is fairly simple.
When I click preview I see the text from the database OK, when I use it for real, on my XOOPS home page all I see is a window with a title, and an empty window. i.e. no content in the window.
I noticed that when I create the custom block I have to select "HTML" and not "PHP". If I select "PHP" then I see nothing in the previes window too!
Does this help?
I have also installed the LAMP stuff onto a different machine. It is all still the same versions of Apache, MySQL and PHP and xoops, but the system RedHat 9.
So, the problem occurs on 2 installations now.
Thanks for looking into this.
Regards
Nick