JInventory

From CLONWiki
Revision as of 15:03, 1 May 2025 by Boiarino (talk | contribs) (→‎General info)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

General info

All inventory information is stored in mysql database JInventory on clondb3.jlab.org. Code resides on clonweb.jlab.org, in two directories: php scripts in /www/inventory/JInventoryHallB/htdocs and smarty templates in /www/inventory/JInventoryHallB/smarty/, with some javascripts in /www/inventory/JInventoryHallB/htdocs/js/. In addition, mysql database JInventory contains Functions and Procedures called from php scripts.

system packages installed on RHEL9 (clonweb)

yum install php
yum install mysqlnd
yum install php-Smarty
yum install php-pear
pear install Pager

system packages installed on RHEL7 (clon10new)

yum install php
yum install php-masterminds-html5  ???
yum install php-mysql
yum install php-Smarty
yum install php-pear-Pager

/etc/httpd/conf.d/webserver.conf:

<IfModule prefork.c>
   StartServers       8
   MinSpareServers    5
   MaxSpareServers   20
   ServerLimit      75
   MaxClients       75
   MaxRequestsPerChild  80
</IfModule>
ServerName clon10new.jlab.org
DocumentRoot    /www/clonwiki0/html/
ServerAdmin boiarino@jlab.org
UseCanonicalName On
LogLevel warn
ExtendedStatus On
PHPINIDir "/etc/httpd/conf.d"
DirectoryIndex index.php
RewriteEngine   On
ScriptAlias /cgi-bin/ "/www/clonwiki0/htbin/"
<Directory /www/clonwiki0/html>
   Options Indexes FollowSymLinks
   AllowOverride None
   Require all granted
</Directory>


systemctl restart httpd


Problem observed

  • Sergey B.: it was not proper 'write' permission to templates_c, blank page appeared; interestingly, if for templates/example _main.tpl newer then templates_c/%%5C^5C1^5C1AB388%%_main.tpl.php, blank page displayed and there is no error message !!!


some stuff

editCable.php:

if ($_REQUEST['action'] == 'save' || $_REQUEST['action'] == 'saveAsNew')
{
  // check for required fields
  // if no errors, insert info from all gui fields into database
}

command was used to copy loc5 name to the coord:

update Item LEFT OUTER JOIN Loc5 ON ITM_Loc5Id = LOC5_ID set ITM_Coord=LOC5_Name where LOC5_Name='bck.slot 21';