From 7f460113cc9c7eca91935549c25d78a9393e0977 Mon Sep 17 00:00:00 2001 From: Pjotr Date: Mon, 28 Sep 2026 14:48:57 +0000 Subject: container: deployment fixes for the Guix container/VM Changes previously carried as bnw-container-paths.patch in guix-bioinformatics, now applied to the source directly: * unify data directories on /var/lib/genenet/bnw (was /tmp/bnw and ./data/ mixed) * make the shell_exec paths __DIR__-relative and the example/octave helper scripts location-independent, so php-fpm can run them from any working directory * use core-octave randn/exp instead of the statistics-package normrnd/normpdf (not available in the container's octave) * nnodes: strtrim before strfind so the node count parses with the container's octave output * python3 instead of a hardcoded /home/jziebart path * add diag.php, a debug page showing the request and data state * bn_genenet.php: serve the GeneNetwork (GN2) handshake server-side; the My_Gennenet POST is converted (commas -> tabs, semicolons -> newlines) in PHP and the prepared-data page is returned in ONE request. This removes the raw-echo of into a JavaScript string (an XSS hole on public deployments) and is backward compatible for GN2 (same POST, better response). --- sourcecodes/network_layout_evd.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sourcecodes/network_layout_evd.php') diff --git a/sourcecodes/network_layout_evd.php b/sourcecodes/network_layout_evd.php index b02d4ce5..154381ea 100644 --- a/sourcecodes/network_layout_evd.php +++ b/sourcecodes/network_layout_evd.php @@ -27,8 +27,8 @@ foreach($leve_l as $l) /////////////Read data from net_figure file///////////// -//$dir="./data/"; -$dir="/tmp/bnw/"; +//$dir="/var/lib/genenet/bnw/"; +$dir="/var/lib/genenet/bnw/"; $keyval=valid_keyval($_GET["My_key"]); @@ -113,7 +113,7 @@ $r_index+=4; $grv=$dir.$keyval."graphviz.txt"; $line=shell_exec('/usr/bin/dot -Tplain -y '.$grv); $grviz_name_list=array(); -//$g_file_name="./data/".$keyval."grviz_name_file.txt"; +//$g_file_name="/var/lib/genenet/bnw/".$keyval."grviz_name_file.txt"; $g_file_name=$dir.$keyval."grviz_name_file.txt"; $grviz_name=file_get_contents("$g_file_name"); $grviz_name_list=explode("\n",$grviz_name); -- cgit 1.4.1