PhpSysInfo package problems



  • So where do i begin… well on my sme server i like to add phpsysinfo, so to get my feet wet with this package system i'm trying to add it to my pfSense box as a package.

    Started by following this post

    For the archives:

    * Download http://www.pfsense.com/xmlrpc.tgz …  Extract to root of your webserver.  Or to pfSense's root.
        * Modify /etc/inc/globals.inc and change:

    "xmlrpcbaseurl" => "www.pfsense.com",
        "xmlrpcpath" => "/pfSense/xmlrpc.php",

    Then have a look at the master package manifest located at: http://pfsense.com/cgi-bin/cvsweb.cgi/tools/pkg_config.xml

    Then have a look at the packages themselves:

    http://pfsense.com/cgi-bin/cvsweb.cgi/tools/packages/

    Finally add your package info to pkg_config.xml on the webserver and then populate the packages folder.  pfSense.com example is here: http://www.pfsense.com/packages/

    CoreGUI information is located at: (Note, we are switching over to CoreGUI2, we recommend you learn this)
    http://wiki.pfsense.com/wikka.php?wakka=CoreGUI2
    http://wiki.pfsense.com/wikka.php?wakka=CoreGUI

    i have setup the webserver and downloaded the bandwithD package files as a test package. So getting packages from local webserver is working.

    Adding phpSysInfo to pkg_config.xml

    
     <pfsensepkgs><packages><package><name>phpSysInfo</name>
          <website>http://phpsysinfo.sourceforge.net/</website>
          <descr>PHPSysInfo is a customizable PHP Script that parses /proc, and formats information nicely. It will display information about system facts like Uptime, CPU, Memory, PCI devices, SCSI devices, IDE devices, Network adapters, Disk usage, and more.</descr>
          <category>System</category>
          <version>2.5.1</version>
          <status>BETA</status>
          <required_version>1.0</required_version>     
     <depends_on_package_base_url>ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/All/</depends_on_package_base_url>
          <depends_on_package>phpSysInfo-2.5.1.tbz</depends_on_package>
          <depends_on_package>mbmon-205_3.tbz</depends_on_package>
          <config_file>http://192.168.1.1/packages/config/phpSysInfo/phpSysInfo.xml</config_file>
          <configurationfile>phpSysInfo.xml</configurationfile></package></packages></pfsensepkgs> 
    
    

    The phpSysInfo.xml code for now

    
     <packagegui><name>phpSysInfo</name>
    	<version>1.0</version>
    	<title>phpSysInfo</title>
    
    <menu>
    		<name>phpSysInfo</name>
    
    		Services
    		<url>/pkg_edit.php?xml=phpSysInfo.xml&id=0</url>
    	</menu>
    
    	 <tabs><tab><text>phpSysInfo</text>
    			<url>/pkg_edit.php?xml=phpSysInfo.xml&id=0</url>
    			 <active></active></tab> 
    		 <tab><text>Access phpSysInfo</text>
    			<url>/phpSysInfo</url></tab></tabs> 
    	<aftersaveredirect>/pkg_edit.php?xml=phpSysInfo.xml&id=0</aftersaveredirect>
    	 <additional_files_needed></additional_files_needed> 
    	 <custom_php_install_command></custom_php_install_command> 
    	 <custom_php_deinstall_command></custom_php_deinstall_command> 
    	 <custom_php_resync_config_command></custom_php_resync_config_command> 
    	 <fields><field><fieldname>phpSysInfo</fieldname>
    			<fielddescr>phpSysInfo</fielddescr>
    			<description>phpSysInfo</description>
    			<type>checkbox</type></field></fields></packagegui> 
    

    So now the problems starts. Cause when i try to install it fails, with the following message:

    Downloading package configuration file… done.
    Saving updated package information... done.
    Downloading phpSysInfo and its dependencies... done.
    Checking for successful package installation... failed!

    Installation aborted.

    So what am i doing wrong? what am i missing. If i try with http://192.168.1.1/pkg_edit.php?xml=phpSysInfo.xml&id=0 it seems ok, no errors

    Now that i've gone blind looking at it :) i hope someone else can see my mistake.

    Is it because it's not a self made .tbz build…......
    or a id check somewhere.........

    /Perry



  • do a pkg_info and see if the freebsd package installed.  Assuming it didn't, issue a pkg_add -rv URLTOPACKAGE and see what that comes back with.

    –Bill



  • Thx Bill you got me back to page 1



  • I've got some errors when using the lates phpSysInfo-2.5.3-rc2 release

    File                            Line          Command                          Message
    common_functions.php 372 file_exists(/var/run/dmesg.boot) the file does not exist on your machine
    common_functions.php 158 find_program(vmstat)                   program not found on the machine

    So fare I've read that dmesg.boot could be a freebsd bug and atm i can do a dmesg > /var/run/dmesg.boot to fix it.

    the only thing i could fine concerning vmstat is from the freebsd handbook:

    If you have installed a different version of the kernel from the one that the system utilities have been built with, for example, a -CURRENT kernel on a -RELEASE, many system-status commands like ps and vmstat will not work any more. You should recompile and install a world built with the same version of the source tree as your kernel. This is one reason it is not normally a good idea to use a different version of the kernel from the rest of the operating system.

    Does anyone know what can be done or can explain why they are left out?



    ![pfSense with errors showing.gif](/public/imported_attachments/1/pfSense with errors showing.gif)
    ![pfSense with errors showing.gif_thumb](/public/imported_attachments/1/pfSense with errors showing.gif_thumb)



  • If any wants to try…...


    !!! Before installing read this !!!
    dmesg and vmstat issue are not fixed.
    dmesg can be added manually as shown in the howto below
    Memory Usage is not shown as correctly as if vmstat was available.

    Since the release 2.5.1 version are missing some features i will use 2.5.3-rc2

    My version of phpSysInfo can be downloaded here http://www.megaupload.com/dk/?d=LUMW5BVG

    change made to it:
    config.php.new -> config.php
    pfSense look alike template added
    config.php default settings changed

    or download the real rc2 from
    http://downloads.sourceforge.net/phpsysinfo/phpsysinfo-2.5.3-rc2.tar.gz?modtime=1172435539&big_mirror=0

    Small HowTo / guide

    From a pfSense default install ( 1.0.1-SNAPSHOT-03-08-2007 built on Tue Mar 13 00:39:49 EDT 2007 )

    Enable Secure Shell in System -> Advanced

    unpack the downloaded phpsysinfo file

    upload it to /usr/local/www/ ( i use winscp )

    In pfSense GUI go to Diagnostics -> Command and execute " dmesg > /var/run/dmesg.boot " ( do it after every reboot )

    View the result at http://My_pfSense_IP/phpsysinfo/index.php

    Extra: Add mbmon

    in Shell enter " pkg_add -r mbmon "

    In pfSense GUI go to Diagnostics -> Edit File and load " /usr/local/www/phpsysinfo/config.php "

    find and edit " $sensor_program = ""; " to " $sensor_program = "mbmon"; " and hit save

    View the result at http://My_pfSense_IP/phpsysinfo/index.php



  • i will see if i can find the failt in phpsysinfo
    /var/run/dmesg.boot is a wrong location only run files belong there not log files
    the correct location is
    /var/log/dmesg.boot



  • Thx i didn't think it could be in another place, because everything works by default in normal freebsd 6.2 install

    going to edit class.BSD.common.inc.php



  • Maybe you can make a clean pfsense package out of this once it's working as expected so we can include it in the package repository ;)



  • Will do Hoba, but atm i have no idea how to make a custom .tbz file

    basically i installed my first real freebsd with lighttpd & php5  a week ago…
    so i need links to guides, howtos, walkthrough etc..

    Build world is that like dealing with urbanization problems in China?
    Ports is that like Stargates? yes i can see a wormhole…..



  • @Perry:

    Build world is that like dealing with urbanization problems in China?
    Ports is that like Stargates? yes i can see a wormhole…..

    ;D

    Check the developement section. You'll find some answers there. Additional to that have a look at one of the not so complicated packages and try some reverse-engeneering (nmap package might be a good start for this).



  • I have complete the phpsysinfo.inc & xml.
    so for the final test i need the custom phpsysinfo.tbz
    i've been reading and reading and still don't have a clue how to make it, i might be blind
    all i can find is guides to do with things already in ports.
    so any help would be appreciate.



  • Take a look at the ASSP package.  The files are still present and it used to explode a tarball to set the package up.

    I have a feeling this is what your seeking.



  • Thx Scott for the link to a work around to my problem and adding the vmstat to the snapshot

    here are the files so it can be added to the packages selection.

    http://www.megaupload.com/dk/?d=AGY5X437

    Time to clam my own beer bounty :D



  • Sounds good.  I'll take a look at it a bit later today.  Prod me if nothing happens in the next 2 days, I am playing major catchup right now.



  • No longer a release candidate

    http://www.megaupload.com/dk/?d=P5BGSK92



  • Commited, please test



  • in the phpsysinfo.xml  :'(
    http://http://www.pfsense.com/packages/ALL/phpsysinfo.tgz

    should be http://http://www.pfsense.com/packages/ALL/phpSysInfo-2.5.3.tgz

    sry



  • Downloading package configuration file... done.
    Saving updated package information... done.
    Downloading phpSysInfo and its dependencies... done.
    Checking for successful package installation... failed!
    
    Installation aborted.
    

    mbmon-205_3.tbz - loaded 294 byte =>

    
    <title>404 Not Found</title>
    
    # Not Found
    
    The requested URL /packages/ALL/mbmon-205_3.tbz was not found on this server.
    
    * * *
    
    <address>Apache/1.3.37 Server at www.pfsense.com Port 80</address>
    
    

    …/packages/ALL/mbmon-205_3.tbz
    need correct to
    …/packages/All/mbmon-205_3.tbz



  • Thx

    now i hope everything is right… fingers cross

    http://www.megaupload.com/dk/?d=99ZGP0PT



  • Ohm.. sorry - bad translator  ::)



  • The fixed files needs to be added first….



  • I have fixed the filenames.  Please test again.



  • could u replace all the files

    http://www.megaupload.com/dk/?d=99ZGP0PT



  • I will once more but any further changes need to be supplied in diff format.





  • Done.  I had fixed these prior to you asking me to replace all files. :)





  • Commited



  • Thx and it's working ;)



  • @Perry:

    Thx and it's working ;)

    I confirm… running 1.0.1-SNAPSHOT-03-15-2007 built on Wed Mar 21 00:37:05 EDT 2007, mobo is Abit BP6 with dual celeron. Everything is working perfectly.

    Thank you  :)


Log in to reply