Koozali.org: home of the SME Server

Phreebooks install (accounting/ERP package)

Offline Charles2008

  • *
  • 174
  • +0/-0
Phreebooks install (accounting/ERP package)
« on: December 13, 2012, 01:25:53 PM »
I am in the process of trying to setup Phreebooks (http://www.phreesoft.com/) on my SME8 server. It is a small business accounting package - IMHO more user friendly than LedgerSMB (which I have seen discussed on the forums). I am hoping that it is easier to install also.

I am a novice at this, but enthusiastic.

I have installed phpMyAdmin successfully (following the instructions here - http://wiki.contribs.org/PHPMyAdmin) and, having studies  a few other installs, I have tried to install Phreebooks to an i-bay.

I have copied the necessary files across to the i-bay html directory and have begun the install process  ...  I have received the message from Phreedom "I could not find a temporary upload directory on this server".

I have hunted around the forums (this seems a very common problem) and found this workaround:
Code: [Select]
db accounts setprop "iBay" PHPBaseDir /home/e-smith/files/ibays/"iBay":/tmp   (BTW is there a ' / ' missing from in front of the ' : '?)
signal-event ibay-modify "iBay"    (of course, I changed "iBay" to the name of my ibay)

It doesn't seem to have worked as the message didn't disappear . I know this seems to have been dealt with over and over again ('dead horse' and 'flogging' come to mind), but I am clearly missing something. I am not sure what.

I proceeded with the install and of course, it isn't working as I would expect. Although it is set-up and most functionality seems ok (I am sure that the functionality needing the upload directory won't function). I don't seem to be able to 'save' settings, although I could for the first couple ... is this related to the /tmp directory access issue?

Any guidance would be very much appreciated.
Charles





Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #1 on: December 13, 2012, 03:12:28 PM »
I have come across this regarding Front Accounting:

TTown:
I just installed frontaccounting. It actually went pretty smoothly with the exception of the mysql database user. During the installation I had to give him all rights, not just for his own database. I removed the global rights after the installation and played with it for a bit. No problems so far.

How I did it? (ok, this outlines my second try - the first try had smesitemaker create the database user and failed with some database access problems...)
1) created a site with smesitemaker (all settings default) and removed index.htm
2) untared the .tgz file to its rightfull place (myserverip.com/front) (=/opt/front/)           .....   Note "to it's rightful place", /opt
3) browsed to myserverip.com/front/install
4) chowned www:www some (5) directories the installer complained about being unwritable
5) used phpMyAdmin to create a user "somename" with all rights to a database "somename" - I did for the setup have to give him some extra global rights. Since I didn't know which I gave him all and took them away again after the installation.
6) changed password for admin
Bingo
Good luck
Stefan
http://forums.contribs.org/index.php?topic=40754.10;wap2

Perhaps this is the way I should have gone about it.

Is it not possible to install in an i-bay without using Sitemaker? Or is using Sitemaker a very good idea in this sort of situation?
Charles
« Last Edit: December 14, 2012, 11:42:14 AM by Charles2008 »

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #2 on: December 14, 2012, 08:07:36 AM »
Hi,

you need the 'php_admin_value upload_tmp_dir /tmp' set in the /etc/httpd.conf [youribayname] section.

You TEST it by adding this manually to httpd.conf and restart httpd service. But you need to create a custom-template to make it permanent.

HTH 

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #3 on: December 14, 2012, 10:16:12 AM »
@RequestedDeletion
Thank you for the pointer.

I was hoping that there might be a way of doing this without using a 'custom template' as (I think) that I have read that they are broken on upgrade (am I right here?).

Is there a better way of installing Phreebooks - in another directory perhaps (what are the options - /opt, ???)
Is using Sitemaker a better or easier way of installing this app?

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #4 on: December 14, 2012, 10:28:47 AM »
I was hoping that there might be a way of doing this without using a 'custom template' as (I think) that I have read that they are broken on upgrade (am I right here?).

Hi, no, the whole templating system is specifically designed so that custom changes survive. The requirement for a custom template stays when  /opt/dir as an option

There should be a few good examples on the wiki or forums. I just tested it with a manual edit of httpd.conf and it works.

HTH 

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #5 on: December 14, 2012, 11:05:23 AM »
@RequestedDeletion  -   thank you for your response.

In wondering whether I am doing this the 'right way', I re-examined the LedgerSMB install from 2007, here -
http://forums.contribs.org/index.php?topic=37181.0
and notice that he writes :

Install LedgerSMB
"This how-to assumes that you have a ‘software’ ibay for contribs and other downloaded software. It also presumes you are going to install to the recommended /usr/local directory. ... (later) ...  Copy the file to /usr/local And unpack the file  ... (and later still) ... installing an non-ibay directory makes things a little more complicated." (referring to the URL)

He goes on to make a 'custom template' in this method too. In fact, it looks like a complicated install, not least because of the requirement for the Postgres db.

What are the advantages of installing in i-bay, /opt, usr/local? It isn't at all clear to me.

Before I have to tangle with the intimidating sounding 'custom templates', I would be interested to know if I am going about this the right way. i.e. is this the right place (i-bay) to install Phreebooks? I ask because I had a phone conversation with an SME consultant yesterday and he was "surprised" that I was trying to install Phreebooks to an i-bay.

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #6 on: December 14, 2012, 11:26:30 AM »
Charles,

the topic of placing something in an ibay, in /op/dir or /usr/share has been discussed before in the forums and the opinions vary. Basically it comes down to balancing between or choosing for 'ease of use' and security.

Everything in an ibay will be taken into account automatically by SME Server, including backup and access control (local, web and groups). Some would like to beef up security by placing it in a location *ONLY* accessable by the webserver and have custom access rules all defined in the virtual host created by a custom-template, thus bypassing the default ibay way. The exact location is also a matter op opinion on security, backup, default *nix rules, policy etc. So no definite answer here.

Either way, you still need db entries and a custom-template, but not as complicated as the thread you referred to.

I'm not the expert, and I bet you that when the folks over in timezone GMT-6 start waking up, a simple answer or example will pop up :-)

HTH

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #7 on: December 16, 2012, 01:28:34 AM »
@ RequestedDeletion - thanks for that direction.

After a lot of digging, I have come across this discussion:
http://forums.contribs.org/index.php?topic=48816.0

This is pretty up-to-date and relates to SME8 and the infamous 'open_base_dir restriction in PHP'.

I do note however, this comment half way through the discussion  - " ... but I install almost everything to /opt. It makes me feel more secure"

Why isn't he going for the /usr/local directory install, I ask myself? "Clear" and "mud" come to mind.

I am going to continue with the i-bay install for no better reason than I have already started it ...  actually I am very interested to know the pro's and con's of these three (and maybe more) recommended methods of installing applications. I have searched the forum for /usr /opt /i-bay, I didn't find anything covering this in any detail. Is there a thread that anyone can point me to ?
Charles

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #8 on: December 16, 2012, 02:58:46 AM »
Charles2008

Just to clarify for you, in this case you do not need to add a custom template for the PHPBaseDir setting, as suitable code exists in sme server to allow db entries to be used to set this.
So follow the generic instructions here (& as similarly mentioned many times in these forums).
http://wiki.contribs.org/PHP#Modifying_the_PHPBaseDir_setting_for_an_ibay

Note that you do need to manually create the actual ibay /tmp folder (if not already existing), ie create a /tmp subfolder in the location that you specify with the db command.
You cannot just specify a non existent folder as the tmp folder.
If your webapp is in
/home/e-smith/files/ibays/accountingwebapp/html/
then create a folder
/home/e-smith/files/ibays/accountingwebapp/html/tmp

Do not use or specify the common system /tmp folder or a seperately created common system /temp folder for all web apps, to avoid cross site hacking.
Always create seperate ..../tmp folders for each app, only within the folder structure for that web application.

Re the issues of installing to /opt or to an ibay, there is no significant practical difference.
If you use /opt/webapp then you need to create custom template fragments to point domains or aliases (eg mydomain.com/mywebapp) to the /opt/webapp folder & so on.
Usually a contrib rpm will do that for you, but if you are doing manual installs of less popular webapps for which no contrib rpm has been released, then you will need to manually do this, which if you do not know how can be a stumbling block to get that webapp to be accessible from the web.
Study how other webapps with contribs do this ie install a contrib & look at the template fragments that get added, and also seperately look at what the smesitemaker contrib does.

Installing to an ibay is quite OK & usually easier to setup. Web access is controlled using server manager settings for the ibay, as is the ability to run php or other "dynamic" type content.
The Domains panel in server manager can also forward domain type URL requests to a specified ibay, so that for a certain domain name, content in a certain ibay is used.
So many of the manual "behind the scenes" setting up requirements that are needed for /opt installations, are handled by the server manager GUI interface for ibay installations, much easier for you.

Note too that all ibay content is automatically included in default backups, or backups that conform to sme standards, whereas content in /opt is not included in backups, so you need to manaully add /opt to any backup routine.

Note for installs to either /opt or an ibay you will still need to set the PHPBaseDir setting using a db command.
The reason the PHPBaseDir setting is not automatically created is for security, the less access that is granted to folders & ibays as a default, then the less chance of hacking etc.
So the sme developers have wisely allowed users to specify which folder(s) or ibay(s) they want to individually enable the PHPBaseDir setting for.

The need for setting individual per app PHPBaseDir settings, is not to make life harder for you, but to make it safer.
It's just something that seems to catch many users out & cause them some initial difficulty when setting up webapps.

The important thing to note about using ibays is that they are multi purpose "storage containers", and end users on your network (ie LAN) can have direct access to ALL the ibays if configured that way in server manager, which many less knowledgable sysadmins may do inadvertantly by default.

You should only typically allow end users on the LAN to have Windows file sharing access to ibays that contain user changeable data & files.
End users should not (usually) have access to ibays that contain webapps like Wordpress, Joomla, accounting programs & so on.
These should only be accessible by the administrator or responsible end user(s) who are in charge of updating content on those webapp sites.
You can control local (LAN) file sharing access using sme server Groups.

Where you you have multiple users & multiple webapps in ibays (meaning more than one of each), then create a Group for every ibay webapp, and only allow a certain user or sysadmin to be a member of a group or groups that require access to certain ibays. Some users may have access to some webapp ibays that other users do not have access to etc. This concept prevents unauthorized users from inadvertantly changing web content or changing permissions on files within the webapp ibay & from uploading inappropriate or insecure web content, & so on.

The above issues are one of the reasons why there is a suggestion to use /opt, as no user automatically has access to /opt, and a sysadmin will have to provide access to any authorized user, thus forcing the issue of security & user access to webapp content be dealt with.

Hope that helps you clarify things.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #9 on: December 16, 2012, 01:33:46 PM »
Mary

Thank you for taking the time to put together such a fantastic response. It goes a long way to increasing my understanding of the basic user-related concepts of SME.

Just to make it absolutely clear to me - you are saying that if I continue to install Phreebooks to an i-bay, I shouldn't need to create a custom-template and can do it through db commands (as I try and set out below)?

Funny how I seem to have come full circle, as doesn't my first post relate to db commands - because I tried this and it didn't seem to work for me. Hence my quest to find an alternative. Actually, I now realise that I may have misunderstood and / or missed out step (3a) below.

I will go back and re-try, making sure I have the /tmp directory created etc.

I was beginning to feel quite relieved that I had found mmccarn elegant looking and recent (June 2008 / SME8) i-bay local /tmp directory solution.
http://forums.contribs.org/index.php/topic,48816.0.html

Mary, for the avoidance of any doubt (for myself and others), is the following process what you would recommend:

1) unzip Phreedom to my i-bay (called "bookkeeping") html file:
Code: [Select]
/home/e-smith/files/ibays/bookkeeping/html
2) create a local /tmp directory:
Code: [Select]
mkdir /home/e-smith/files/ibays/bookkeeping/html/tmp
3) follow the instructions that you pointed to :
http://wiki.contribs.org/PHP#Modifying_the_PHPBaseDir_setting_for_an_ibay

3a) I am uncertain about the next line - am I supposed to replace 'value' with my new /tmp directory?
Code: [Select]
db accounts setprop bookkeeping PHPBaseDir value
3b) should 'html' be included at the end of the next line?
Code: [Select]
db accounts setprop bookkeeping PHPBaseDir /home/e-smith/files/ibays/bookkeeping/html/:/tmp/
3c)
Code: [Select]
signal-event ibay-modify bookkeeping
Are the above steps correct?

Once again, I really appreciate your help and encouragement on this.
Charles


guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #10 on: December 16, 2012, 02:39:46 PM »
Charles2008,

I think you're almost there. I've checked the installer source code and it seems that it specifically checks for the php flag 'upload_tmp_dir' to be set for that the iBay, so maybe you still need to create a custom-fragment. I did not try myself, and maybe your app is now working correctly. If not, then I guess the post you've found before (http://forums.contribs.org/index.php/topic,48816.msg243040.html#msg243040 ) may help.

1. Check the permissions on the extracted files (should be www:www)
2. make sure that the new tmp directory has correct rights otherwise the webserver can not write to it
3a value should be /home/e-smith/files/ibays/bookkeeping/html/tmp
3b Not required, same as 3a

HTH

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #11 on: December 16, 2012, 03:05:19 PM »
RequestedDeletion

If 3a) and 3b) are the same - do I need the ' : '  at the end of :

Code: [Select]
db accounts setprop bookkeeping PHPBaseDir /home/e-smith/files/ibays/bookkeeping/html/:/tmp/
Charles

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #12 on: December 16, 2012, 03:08:14 PM »
This is the exact command:

db accounts setprop bookkeeping PHPBaseDir /home/e-smith/files/ibays/bookkeeping/html/tmp

for your setup

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #13 on: December 16, 2012, 03:42:57 PM »
RequestedDeletion

I opened my httpd.conf file:
Code: [Select]
/etc/httpd/conf/httpd.conf
and found the relevant lines referring to my bookkeeping i-bay (which is actually called 'accounts'. I changed it above to try and avoid any confusion), which I copy below:
Code: [Select]
# accounts ibay (accounts)

    ScriptAlias /accounts/cgi-bin /home/e-smith/files/ibays/accounts/cgi-bin
    Alias /accounts/files   /home/e-smith/files/ibays/accounts/files
    Alias /accounts        /home/e-smith/files/ibays/accounts/html

    # skipping SSL directives

    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]


    RewriteRule ^/server-manager(/.*|$)    https://%{HTTP_HOST}/server-manager$1 [L,R]
    <Location /server-manager>
        order deny,allow
        deny from all
        allow from 127.0.0.1 192.168.0.0/255.255.255.0
    </Location>
    RewriteRule ^/server-common(/.*|$)    https://%{HTTP_HOST}/server-common$1 [L,R]
    <Location /server-common>
        order deny,allow
        deny from all
        allow from 127.0.0.1 192.168.0.0/255.255.255.0
    </Location>
    RewriteRule ^/user-password(/.*|$)    https://%{HTTP_HOST}/user-password$1 [L,R]
    <Location /user-password>
        order deny,allow
        deny from all
        allow from 127.0.0.1 192.168.0.0/255.255.255.0
    </Location>

    RewriteRule ^/phpmyadmin(/.*|$)    https://%{HTTP_HOST}/phpmyadmin$1 [L,R]

    RewriteRule ^/webmail(/.*|$)    https://%{HTTP_HOST}/webmail$1 [L,R]
    RewriteRule ^/horde(/.*|$)    https://%{HTTP_HOST}/horde$1 [L,R]

    # alias for Apache icons
    Alias /icons/ /var/www/icons/

    # Alias for server resources
    Alias /server-resources /home/e-smith/files/server-resources/

Code: [Select]
-------------------------------------------------------------
# accounts ibay directories (accounts)
#------------------------------------------------------------

<Directory /home/e-smith/files/ibays/accounts/html>
    Options None
    Options +Indexes
    Options +Includes
    AllowOverride None
    order deny,allow
    deny from all
    allow from 127.0.0.1 192.168.0.0/255.255.255.0
    AuthName "accounts"
    AuthType Basic
    AuthExternal pwauth
    require user accounts
    Satisfy all
</Directory>

<Directory /home/e-smith/files/ibays/accounts/cgi-bin>
    Options ExecCGI
    AllowOverride None
    order deny,allow
    deny from all
    allow from 127.0.0.1 192.168.0.0/255.255.255.0
    AuthName "accounts"
    AuthType Basic
    AuthExternal pwauth
    require user accounts
    Satisfy all
</Directory>

<Directory /home/e-smith/files/ibays/accounts/files>
    AllowOverride None
    order deny,allow
    deny from all
    allow from 127.0.0.1 192.168.0.0/255.255.255.0
    AuthName "accounts"
    AuthType Basic
    AuthExternal pwauth
    require user accounts
    Satisfy all
</Directory>

<Directory /home/e-smith/files/ibays/Primary/html>
    AddType application/x-httpd-php .php .php3 .phtml
    AddType application/x-httpd-php-source .phps
    php_admin_value open_basedir /home/e-smith/files/ibays/Primary/
</Directory>

<Directory /home/e-smith/files/ibays/accounts/html>
    AddType application/x-httpd-php .php .php3 .phtml
    AddType application/x-httpd-php-source .phps
    php_admin_value open_basedir /home/e-smith/files/ibays/accounts/:/tmp/
</Directory>


Alias /wpad.dat /etc/httpd/conf/proxy/proxy.pac
<Location /wpad.dat>
    order deny,allow
    deny from all
    allow from 127.0.0.1 192.168.0.0/255.255.255.0
</Location>
Alias /proxy.pac /etc/httpd/conf/proxy/proxy.pac
<Location /proxy.pac>
    order deny,allow
    deny from all
    allow from 127.0.0.1 192.168.0.0/255.255.255.0
</Location>

<Location /server-manager/cgi-bin/backup>
    SetEnv force-proxy-request-1.0 1
</Location>

You wrote "you need the 'php_admin_value upload_tmp_dir /tmp' set in the /etc/httpd.conf [youribayname] section."
Where does the line you referred to go?

Thanks
Charles

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #14 on: December 16, 2012, 03:50:57 PM »
Charles2008,

that comes from a custom template :-)

Here is how to make that:
http://forums.contribs.org/index.php/topic,48816.msg243040.html#msg243040

Then enter on the console:

expand-template /etc/httpd/conf/httpd.conf

and

signal-event remoteaccess-update

Take a look at your httpd.conf again. My test install of phreebook in an ibay is up and running without any issues

Regards.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #15 on: December 16, 2012, 05:40:16 PM »
Charles2008

This page
http://wiki.contribs.org/DB_Variables_Configuration#Apache_server_ibay_specific_.28httpd-e-smith.29
lists the default PHP base dir location for an ibay when not specified by a db commands as being    
/home/e-smith/files/ibays/ibayname
So if PHP tries to write to other folders then it gives an error.
Commonly php apps are configured by default to to write to /tmp or ....ibays/ibayname/html/tmp


To clarify, this is the generic form of the command
db accounts setprop ibayname PHPBaseDir DIR1:DIR2:DIRn
signal-event ibay-modify ibayname

Example
db accounts setprop myibay PHPBaseDir /home/e-smith/files/ibays/myibay/:/tmp
signal-event ibay-modify myibay

This actually specifies two directories (or more if required), the colon seperator allows the entry of additional directories that PHP can access, and the trailing slash limits access to that directory only (and I believe not to sub directories under that folder).

Using the above gives PHP access to the myibay ibay folder and to (top level) /tmp

For security reasons the /tmp folder should not be used as a common folder by different ibays or webapps (wherever installed) so as to avoid cross site hacking, where bad code can be injected into the /tmp folder from one app, and then affect (or infect) other site apps using the same /tmp folder.


If you want to give access only to the tmp folder within an ibay, which is a much more secure approach (and generally recommended), then this would be appropriate

db accounts setprop myibay PHPBaseDir /home/e-smith/files/ibays/myibay/html/tmp/

If the site requires other folders to be accessed by PHP, then specify a second location as follows, while still keeping (using) the original tmp location within the ibay structure.
db accounts setprop myibay PHPBaseDir /home/e-smith/files/ibays/myibay/html/tmp/:/someotherfolder/tmp/

I think the PHP wiki articles need some updating & clarification, as the commands vary slightly depending where you read it, and while they are correct they are also confusing & possibly even misleading, and suggesting less secure methods (by using a common /tmp).

This post
http://forums.contribs.org/index.php/topic,45422.msg221400.html#msg221400
and a few others on the forum talk about the concept, although note that the author has his command incorrect as the ibay name is in the wrong location in the db command (a typo ?).

Search the forums on PHPBaseDir if you are interested.
I even wrote a good one back in 2010 here
http://forums.contribs.org/index.php/topic,42799.msg224749.html#msg224749
although I think I made a typo too !!!

Hope this is all correct and make sense.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #16 on: December 16, 2012, 05:53:52 PM »
@Mary,

just to double check and my understanding if I may.

Assumption 1.
The PHPBaseDir directive is to tell the SME *WEBSERVER* where a PHP application in that specific iBay has access to on the filesyste, for per default PHP xecution and filesystem access is 'jailed' to only the html directory of the iBay.

Assumption2.
The upload_tmp_dir is to tell the *PHP APPLICATION* what location on the filesystem to use as a temp dir

Assumption 3.
For the what Charles2008 is trying you need both directives set for the PHP application specifically uses upload_tmp_dir setting and not a general /tmp setting.

Any thoughts on this? (anyone?)

Regards,
guest

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #17 on: December 16, 2012, 08:46:09 PM »
Mary

Another superb post. I will have to spend some time going through the threads you have indicated.

I must say that, although it does seem complicated, the idea of non-common /tmp directories makes perfect sense from a security angle. It is all becoming a little clearer to me, and somewhat less daunting.

Thanks once again for your valuable input.




RequestedDeletion

I missed your cryptic comment on first read but have since picked it up on re-read - is this the line in the httpd.conf file that you have spied:

Code: [Select]
php_admin_value open_basedir /home/e-smith/files/ibays/accounts/:/tmp/
does this suggests that my first attempt at doing it 'Mary's way' had some effect (I think so)?
Shouldn't this have worked?

BTW, I checked, I didn't have a local /tmp directory (but then again, not a surprise as I knew nothing about it then) :)
I have one now!

Is there an easy fix here?

Offline johnp

  • ****
  • 312
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #18 on: December 16, 2012, 08:57:52 PM »
I think if you follow Mary's suggestion and replace the myibay with your name i.e accounts you will be set

Quote
db accounts setprop myibay PHPBaseDir /home/e-smith/files/ibays/myibay/html/tmp/

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #19 on: December 16, 2012, 09:05:12 PM »
Charles2008,

indeed we need to elaborate in more detail n PH setting in iBays and in general. Sorry for the confusion and thank you for not giving up.

Please look at my last post @Mary with my assumptions. I'm pretty sure they are 
basically correct and should help you to understand /tmp.

SME Server 8 installs WITH a /tmp directory, so if it is not there, something is wrong.

I'm off line for the next day or 2 so I hope others will pick up on your venture.

Good luck, and thanks for your persistency :-)

Regards,
guest
 

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #20 on: December 16, 2012, 09:26:52 PM »
I have just done the following on the console:

Code: [Select]
db accounts setprop accounts PHPBaseDir /home/e-smith/files/ibays/accounts/html/tmp/
Code: [Select]
signal-event ibay-modify accounts
and now when I browse to:

https://my-server-ip/accounts

I get a white screen  :)

I am also off for a couple of days and I will have another bash at this when I get back.
Thank you for all your help.
Charles

Offline johnp

  • ****
  • 312
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #21 on: December 16, 2012, 09:28:11 PM »
do you have a tmp directory in your html folder?

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #22 on: December 16, 2012, 10:04:54 PM »
Yes. I put it there just prior to entering the above 2 lines.

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #23 on: December 18, 2012, 10:49:34 AM »
When I re-run:

Code: [Select]
db accounts setprop accounts PHPBaseDir /home/e-smith/files/ibays/accounts/html/:/tmp/
signal-event ibay-modify accounts

back comes the Phreedom login screen. This is repeatable.

I also did a :

Code: [Select]
# locate /tmp
/tmp
/etc/cron.daily/tmpwatch
/etc/cron.daily/tmpwatch-formmagick
/etc/e-smith/events/bootstrap-console-save/templates2expand/Maildir/tmp
/etc/e-smith/events/email-update/templates2expand/Maildir/tmp
/etc/e-smith/skel/e-smith/Maildir/tmp
/etc/e-smith/skel/user/Maildir/tmp
/etc/e-smith/skel/user/Maildir/.junkmail/tmp
/home/e-smith/Maildir/tmp
/home/e-smith/Maildir/.junkmail/tmp
/home/e-smith/files/ibays/accounts/html/tmp
/home/e-smith/files/users/cb/Maildir/tmp
/home/e-smith/files/users/cb/Maildir/.junkmail/tmp
/usr/tmp
/usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/POSIX/tmpfile.al
/usr/sbin/tmpwatch
/usr/share/man/man8/tmpwatch.8.gz
/var/tmp

The local i-bay /tmp directory is there.

Also, when I follow Mary's implied command above to give Phreedom access to both local and SME wide (only one level down) /tmp I get the 'white screen' again:

Code: [Select]
db accounts setprop accounts PHPBaseDir /home/e-smith/files/ibays/accounts/html/tmp/:/tmp/


RequestedDeletion

here are the permissions:

Code: [Select]
ls -al  /home/e-smith/files/ibays/accounts/html
total 60
drwxrwsr-x 10 root www  4096 Dec 16 19:40 .
drwxr-xr-x  6 root root 4096 Sep 23 16:35 ..
-rw-rw-r--  1 www  www  1406 Dec 11 00:46 favicon.ico
drwxrwsr-x  3 www  www  4096 Dec 13 10:48 includes
-rw-rw-r--  1 www  www  3173 Dec 11 00:46 index.php
-rw-rw-r--  1 www  www  2237 Dec 11 00:46 install.txt
drwxrwsr-x 10 www  www  4096 Dec 11 00:46 modules
drwxrwsr-x  4 www  www  4096 Dec 13 10:48 my_files
-rw-rw-r--  1 www  www    30 Dec 11 00:46 robots.txt
drwxrwsr-x  4 www  www  4096 Dec 11 00:46 soap
drwxrwsr-x  3 www  www  4096 Dec 11 00:46 themes
drwxrwsr-x  2 root www  4096 Dec 16 19:40 tmp
-rw-rw-r--  1 www  www  3894 Dec 11 00:46 upgrade.txt
drwxrwsr-x  2 www  www  4096 Dec 10 23:12 var
drwxrwsr-x  5 www  www  4096 Dec 11 00:47 xinstall

Changing ownership of local i-bay /tmp:

Code: [Select]
chown www:www /home/e-smith/files/ibays/accounts/html/tmp
It is now www:www.

The Phreedom login screen still dissapears after entering:

Code: [Select]
db accounts setprop accounts PHPBaseDir /home/e-smith/files/ibays/accounts/html/tmp/
signal-event ibay-modify accounts

and reappears after entering:

Code: [Select]
db accounts setprop accounts PHPBaseDir /home/e-smith/files/ibays/accounts/html/:/tmp/
signal-event ibay-modify accounts

When I try and make BOTH /tmp directories available to Phreedom, local i-bay /html/tmp and SME wide /tmp (one level down), I get the 'white screen' also:

Code: [Select]
db accounts setprop accounts PHPBaseDir /home/e-smith/files/ibays/accounts/html/tmp/:/tmp
signal-event ibay-modify accounts

...  Can I feel a 'custom-template' coming on (or perhaps it is more serious, a 'custom-template fragment' - yikes)?

Apologies in advance for the copying of my terminal entries - I feel that it is going to be very obvious to most in the know, what silly mistake I am making.
Charles
« Last Edit: December 18, 2012, 10:51:33 AM by Charles2008 »

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #24 on: December 18, 2012, 11:15:45 AM »
@Charles2008

What is you enter the following command?

Code: [Select]
db accounts setprop accounts \
AllowOverride All \
FollowSymLinks enabled \
Group www \
PHPBaseDir /home/e-smith/files/ibays/accounts/html/tmp \
PublicAccess private \
UserAccess wr-group-rd-everyone

signal-event ibay-modify accounts

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #25 on: December 18, 2012, 11:56:46 AM »
HF  Welcome back! :)

I did as you suggested.
From browser:

https://server-ip-address/accounts

Now unable to establish connection with server.
Also tried from browser:

https://server-ip-address/server-manager

No longer a connection here either
Still quietly confident this end :)

Charles

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #26 on: December 18, 2012, 12:03:03 PM »
hmmm

can you try:

db accounts setprop accounts PublicAccess gobal

and

signal-event ibay-modify accounts


Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #27 on: December 18, 2012, 12:05:09 PM »
done

Still 'Unable to connect'

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #28 on: December 18, 2012, 12:09:14 PM »
db accounts setprop accounts PublicAccess gobal

should be
Code: [Select]
db accounts setprop accounts PublicAccess global

Charles2008: if you are unable to connect to server-manager, before trying anything else, check your logs to find what's going wrong

@RequestedDeletion: if OP reports an error, before suggesting to make other modifications, we should help him to understand what's going on.. :-) all IMVHO

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #29 on: December 18, 2012, 12:21:53 PM »
stefano

Well spotted - thank you. I should have seen that also. That is the danger of a quick 'copy and paste'.


HF

OK, so now I can access 'server-manager' but there is a 'white screen' for 'accounts' from the browser.
BTW I would like to thank you very much for trying to help me  -  without your help (and the help of Mary et al) I would be well and truly lost.


Charles

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #30 on: December 18, 2012, 12:50:07 PM »
Charles, check your logs..

you can also display php errors (if any)

please read here: http://wiki.contribs.org/PHP#Display_Error_Messages

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #31 on: December 18, 2012, 05:01:04 PM »
Hi Stefano

var/log/httpd/error_log :
For today:

Code: [Select]
[Tue Dec 18 09:00:37 2012] [notice] Graceful restart requested, doing restart
[Tue Dec 18 09:00:37 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 18 09:00:37 2012] [notice] Digest: done
[Tue Dec 18 09:00:37 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 18 09:00:37 2012] [warn] RSA server certificate CommonName (CN) `server.home.com' does NOT match server name!?
[Tue Dec 18 09:00:37 2012] [notice] Apache configured -- resuming normal operations
[Tue Dec 18 09:03:11 2012] [notice] Graceful restart requested, doing restart
[Tue Dec 18 09:03:11 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 18 09:03:11 2012] [notice] Digest: done
[Tue Dec 18 09:03:11 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 18 09:03:11 2012] [warn] RSA server certificate CommonName (CN) `server.home.com' does NOT match server name!?
[Tue Dec 18 09:03:11 2012] [notice] Apache configured -- resuming normal operations
[Tue Dec 18 09:06:31 2012] [notice] Graceful restart requested, doing restart
[Tue Dec 18 09:06:31 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 18 09:06:31 2012] [notice] Digest: done
[Tue Dec 18 09:06:32 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 18 09:06:32 2012] [warn] RSA server certificate CommonName (CN) `server.home.com' does NOT match server name!?
[Tue Dec 18 09:06:32 2012] [notice] Apache configured -- resuming normal operations
[Tue Dec 18 09:33:18 2012] [notice] Graceful restart requested, doing restart
[Tue Dec 18 09:33:18 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 18 09:33:18 2012] [notice] Digest: done
[Tue Dec 18 09:33:18 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 18 09:33:18 2012] [warn] RSA server certificate CommonName (CN) `server.home.com' does NOT match server name!?
[Tue Dec 18 09:33:18 2012] [notice] Apache configured -- resuming normal operations
[Tue Dec 18 09:34:22 2012] [notice] Graceful restart requested, doing restart
[Tue Dec 18 09:34:22 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 18 09:34:22 2012] [notice] Digest: done
[Tue Dec 18 09:34:22 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 18 09:34:22 2012] [warn] RSA server certificate CommonName (CN) `server.home.com' does NOT match server name!?
[Tue Dec 18 09:34:22 2012] [notice] Apache configured -- resuming normal operations
[Tue Dec 18 09:39:16 2012] [notice] Graceful restart requested, doing restart
[Tue Dec 18 09:39:16 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 18 09:39:16 2012] [notice] Digest: done
[Tue Dec 18 09:39:16 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 18 09:39:16 2012] [warn] RSA server certificate CommonName (CN) `server.home.com' does NOT match server name!?
[Tue Dec 18 09:39:16 2012] [notice] Apache configured -- resuming normal operations
[Tue Dec 18 10:10:36 2012] [notice] Graceful restart requested, doing restart
[Tue Dec 18 10:10:36 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 18 10:10:36 2012] [notice] Digest: done
[Tue Dec 18 10:10:36 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 18 10:10:36 2012] [warn] RSA server certificate CommonName (CN) `server.home.com' does NOT match server name!?
[Tue Dec 18 10:10:36 2012] [notice] Apache configured -- resuming normal operations


/var/log/messages:

Code: [Select]
Dec 18 11:03:49 server esmith::event[24489]: WARNING: Template processing succeeded for //etc/proftpd.conf: 1 fragment generated warnings
Dec 18 11:03:49 server esmith::event[24489]:  at /etc/e-smith/events/actions/generic_template_expand line 56
Dec 18 11:03:49 server esmith::event[24489]: expanding /etc/securetty
Dec 18 11:03:49 server esmith::event[24489]: expanding /etc/httpd/conf/httpd.conf
Dec 18 11:03:50 server esmith::event[24489]: WARNING in /etc/e-smith/templates//etc/httpd/conf/httpd.conf/90e-smithAccess40ibays: Use of uninitialized value$
Dec 18 11:03:50 server esmith::event[24489]: WARNING in /etc/e-smith/templates//etc/httpd/conf/httpd.conf/90e-smithAccess40ibays: Use of uninitialized value$
Dec 18 11:03:50 server esmith::event[24489]: WARNING in /etc/e-smith/templates//etc/httpd/conf/httpd.conf/90e-smithAccess40ibays: Use of uninitialized value$
Dec 18 11:03:50 server esmith::event[24489]: WARNING: Template processing succeeded for //etc/httpd/conf/httpd.conf: 3 fragments generated warnings
Dec 18 11:03:50 server esmith::event[24489]:  at /etc/e-smith/events/actions/generic_template_expand line 56
Dec 18 11:03:50 server esmith::event[24489]: expanding /etc/samba/smbusers
Dec 18 11:03:50 server esmith::event[24489]: expanding /etc/samba/smb.conf
Dec 18 11:03:50 server esmith::event[24489]: generic_template_expand=action|Event|ibay-modify|Action|generic_template_expand|Start|1355828629 472159|End|135$
Dec 18 11:03:50 server esmith::event[24489]: Running event handler: /etc/e-smith/events/ibay-modify/S15ibay-modify
Dec 18 11:03:50 server esmith::event[24489]: User accounts successfully modified!
Dec 18 11:03:51 server esmith::event[24489]: S15ibay-modify=action|Event|ibay-modify|Action|S15ibay-modify|Start|1355828630 676902|End|1355828631 133203|Ela$
Dec 18 11:03:51 server esmith::event[24489]: Running event handler: /etc/e-smith/events/actions/adjust-services
Dec 18 11:03:51 server esmith::event[24489]: adjusting supervised httpd-e-smith (sigusr1)
Dec 18 11:03:51 server esmith::event[24489]: adjusting supervised httpd-e-smith (up)
Dec 18 11:03:51 server esmith::event[24489]: adjusting supervised smbd (sighup)
Dec 18 11:03:51 server esmith::event[24489]: adjusting supervised smbd (up)
Dec 18 11:03:51 server esmith::event[24489]: adjust-services=action|Event|ibay-modify|Action|adjust-services|Start|1355828631 133670|End|1355828631 260372|E$
Dec 18 11:03:51 server esmith::event[24489]: Running event handler: /etc/e-smith/events/ibay-modify/S95ldap-update-simple
Dec 18 11:03:51 server esmith::event[24489]: S95ldap-update-simple=action|Event|ibay-modify|Action|S95ldap-update-simple|Start|1355828631 260828|End|1355828$
Dec 18 11:16:30 server /sbin/e-smith/db[25251]: /home/e-smith/db/accounts: OLD accounts=ibay|AllowOverride|All|CgiBin|enabled|FollowSymLinks|enabled|Gid|500$
Dec 18 11:16:30 server /sbin/e-smith/db[25251]: /home/e-smith/db/accounts: NEW accounts=ibay|AllowOverride|All|CgiBin|enabled|FollowSymLinks|enabled|Gid|500$
Dec 18 11:16:49 server esmith::event[25271]: Processing event: ibay-modify accounts
Dec 18 11:16:49 server esmith::event[25271]: Running event handler: /etc/e-smith/events/actions/generic_template_expand
Dec 18 11:16:50 server esmith::event[25271]: expanding /etc/services
Dec 18 11:16:50 server esmith::event[25271]: expanding /etc/hosts.allow
Dec 18 11:16:50 server esmith::event[25271]: expanding /etc/shells
Dec 18 11:16:50 server esmith::event[25271]: expanding /etc/hosts.deny
Dec 18 11:16:50 server esmith::event[25271]: expanding /etc/proftpd.conf
Dec 18 11:16:50 server esmith::event[25271]: expanding /etc/securetty
Dec 18 11:16:50 server esmith::event[25271]: expanding /etc/httpd/conf/httpd.conf
Dec 18 11:16:50 server esmith::event[25271]: expanding /etc/samba/smbusers
Dec 18 11:16:50 server esmith::event[25271]: expanding /etc/samba/smb.conf
Dec 18 11:16:51 server esmith::event[25271]: generic_template_expand=action|Event|ibay-modify|Action|generic_template_expand|Start|1355829409 989818|End|135$
Dec 18 11:16:51 server esmith::event[25271]: Running event handler: /etc/e-smith/events/ibay-modify/S15ibay-modify
Dec 18 11:16:51 server esmith::event[25271]: User accounts successfully modified!
Dec 18 11:16:51 server esmith::event[25271]: S15ibay-modify=action|Event|ibay-modify|Action|S15ibay-modify|Start|1355829411 189103|End|1355829411 952453|Ela$
Dec 18 11:16:51 server esmith::event[25271]: Running event handler: /etc/e-smith/events/actions/adjust-services
Dec 18 11:16:52 server esmith::event[25271]: adjusting supervised httpd-e-smith (sigusr1)
Dec 18 11:16:52 server esmith::event[25271]: adjusting supervised httpd-e-smith (up)
Dec 18 11:16:52 server esmith::event[25271]: adjusting supervised smbd (sighup)
Dec 18 11:16:52 server esmith::event[25271]: adjusting supervised smbd (up)
Dec 18 11:16:52 server esmith::event[25271]: adjust-services=action|Event|ibay-modify|Action|adjust-services|Start|1355829411 952913|End|1355829412 79217|El$
Dec 18 11:16:52 server esmith::event[25271]: Running event handler: /etc/e-smith/events/ibay-modify/S95ldap-update-simple
Dec 18 11:16:52 server esmith::event[25271]: S95ldap-update-simple=action|Event|ibay-modify|Action|S95ldap-update-simple|Start|1355829412 79677|End|13558294$
Dec 18 11:18:03 server httpd: PHP Warning:  Unknown: open_basedir restriction in effect. File(/home/e-smith/files/ibays/accounts/html/index.php) is not with$
Dec 18 11:18:03 server httpd: PHP Warning:  Unknown: failed to open stream: Operation not permitted in Unknown on line 0

Is that enough information?
Charles


« Last Edit: December 18, 2012, 05:03:34 PM by Charles2008 »

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #32 on: December 18, 2012, 05:10:35 PM »
Charles2008,

messages log second last row says:

Dec 18 11:18:03 server httpd: PHP Warning:  Unknown: open_basedir restriction in effect. File(/home/e-smith/files/ibays/accounts/html/index.php) is not with$

That is why you get a blank screen

What is the result of:

db accounts show accounts

please?



Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #33 on: December 18, 2012, 05:15:10 PM »
RequestedDeletion

# db accounts show accounts
accounts=ibay
    AllowOverride=All
    CgiBin=enabled
    FollowSymLinks=enabled
    Gid=5002
    Group=www
    Name=accounts
    PHPBaseDir=/home/e-smith/files/ibays/accounts/html/tmp
    PasswordSet=yes
    PublicAccess=global
    Uid=5002
    UserAccess=wr-group-rd-everyone

Charles

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #34 on: December 18, 2012, 05:22:28 PM »
Thinking out loud, could it be that a closing '/' is required?

PHPBaseDir=/home/e-smith/files/ibays/accounts/html/tmp

can you try to change it by:

db accounts setprop accounts PHPBaseDir /home/e-smith/files/ibays/accounts/html/tmp/

and then modify ibay command?

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #35 on: December 18, 2012, 05:26:03 PM »
there's an error

Code: [Select]
db accounts setprop accounts PHPBaseDir /home/e-smith/files/ibays/accounts/html/


Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #36 on: December 18, 2012, 05:27:07 PM »
if you want to have a "local" tmp dir, you should tell it to php or to your application

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #37 on: December 18, 2012, 05:30:10 PM »
@Stefano

ahhhhhh by *ONLY* indicating the /tmp/ directory in as OpenBaseDir, we 'jail' the PHP application execution *ONLY* to the /tmp directory and not allowing access to the htl directory itself....

db accounts setprop accounts PHPBaseDir /home/e-smith/files/ibays/accounts/html/

then we DO need a custom template fragment to tell the PHP app where it's tmp directory is...



guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #38 on: December 18, 2012, 05:34:00 PM »
I guess Charles2008 is completely confused by now, sorry for that :-)

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #39 on: December 18, 2012, 05:36:28 PM »
RequestedDeletion
tried it
db accounts show accounts

Code: [Select]
PHPBaseDir=/home/e-smith/files/ibays/accounts/html/tmp/
still 'white screen' for 'accounts' and normal login for 'server-manager'


Stefano
Ahhh Ha! That has the login screen back - thank you.


RequestedDeletion
Now I still can't modify or add information.
If you still have you i-bay Phreedom install, are you able to add / modify information on yours?
e.g can you enter Phreebooks and, just below the blue control bar there is
"Add Dashboard items to menu"
If you click this and then select 2 or 3 of the offered Dashboard reports - can you then save them by clicking on the 'diskette' image in the top LHS corner? Do they display on the dashboard after having clicked on 'home' top LHS corner?

Charles


guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #40 on: December 18, 2012, 05:42:21 PM »
@Charles2008

my test install in iBay 'phreebooks' is fully functional, including client attachments, reports etc. But the again, I have the custom template fragment. To edit you can use the nano [filename] command.

Code: [Select]
- Make a custom-template copy of 95AddType00PHP2ibays:

mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays .
(don't miss the "." at the end of the last line)

Edit the custom-template version of 95AddType00PHP2ibays and add the three lines preceded by "+" below:


                my $basedir = $ibay->prop('PHPBaseDir')
                    || ("/home/e-smith/files/ibays/" . $ibay->key . "/");
                $OUT .= "    php_admin_value open_basedir $basedir\n";
+                my $tmpdir = $ibay->prop('PHPTmpDir')
+                    || ("/home/e-smith/files/ibays/" . $ibay->key . "/tmp");
+                $OUT .= "    php_admin_value upload_tmp_dir $tmpdir\n";
                $OUT .= "</Directory>\n";

expand-template /etc/httpd/conf/httpd.conf
signal-event remoteaccess-update


Keep in mind that the 3 new lines will add the /html/tmp/ dirctory and the upload_tmp_dir indicator to ALL iBays, existing and newly created.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #41 on: December 18, 2012, 05:55:19 PM »
Charles2008 & all

I think this should achieve both requirements, ie access to .../html and ..../html/tmp
db accounts setprop accounts PHPBaseDir /home/e-smith/files/ibays/accounts/html:/home/e-smith/files/ibays/accounts/html/tmp
(the above all on one line)
signal-event ibay-modify accounts

and further

you should check the configuration file for the app, usually something like config.php or phreeconfig.php or similar and see what it specifies for the temp location  (if anything).
This is usually found in ..../html or ..../html/admin or similar depending on the app folder structure
You csn make changes to this config file, and these will be retained. Make a note of any settings before you change them, and ideally make a safe copy of the config file before you make changes, in case you need to revert to the old file.

I see you access Handisoft, are you or your client a Public Accountant ?
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #42 on: December 18, 2012, 06:04:19 PM »
I think this should achieve both requirements, ie access to .../html and ..../html/tmp
db accounts setprop accounts PHPBaseDir /home/e-smith/files/ibays/accounts/html:/home/e-smith/files/ibays/accounts/html/tmp

I disagree :-)
if tmp is a html's subdirectory, there's no reason to add its path

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #43 on: December 18, 2012, 06:16:21 PM »
...  I guess I should have waited.

I carried out the instructions and still nothing has changed. I am wondering whether it has something to do with one line of my
95AddType00PHP2ibays
wrapping around on itself. I copied and pasted it in, however it is insisting on wrapping around - as shown below. Does this matter, or is it nothing (I think I have seen elsewhere on the forum this sort of innocent looking thing making 'all the difference').


 
Code: [Select]
               # Set the sandbox within which PHP is confined to play
                my $basedir = $ibay->prop('PHPBaseDir')
                    || ("/home/e-smith/files/ibays/" . $ibay->key . "/");
                $OUT .= "    php_admin_value open_basedir $basedir\n";
                 my $tmpdir = $ibay->prop('PHPTmpDir')
                     || ("/home/e-smith/files/ibays/" . $ibay->key .
"/tmp");
                   $OUT .= "    php_admin_value upload_tmp_dir $tmpdir\n";


Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #44 on: December 18, 2012, 06:21:38 PM »
Charles2008:

edit your file with
Code: [Select]
nano -w filename

and check for unwanted wordwrapping

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #45 on: December 18, 2012, 06:26:12 PM »
Charles2008

Use
nano -w filename

when editing to prevent unwanted line wrapping.
Incorrect line wrapping does make a BIG difference !
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #46 on: December 18, 2012, 06:35:37 PM »
Stefano

Quote
if tmp is a html's subdirectory, there's no reason to add its path

I'm not professing to be an expert on this topic & trailing slashes, but if a trailing slash is used I think you need to specify the subfolder seperately after the colon.

The last command I suggested did not use trailing slashes, so superfluous, but cautious.

This bug report is about a very similar issue (almost identical really) and the suggestion is to NOT use trailing slashes.
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/701765

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #47 on: December 18, 2012, 06:58:37 PM »
I did this and it wasn't clear what is was showing me (didn't seem any different than
 nano filename

Anyway I manually edited the line and finished with:
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
signal-event remoteaccess-update

It now looks like this:
Code: [Select]
# Set the sandbox within which PHP is confined to play
                my $basedir = $ibay->prop('PHPBaseDir')
                    || ("/home/e-smith/files/ibays/" . $ibay->key . "/");
                $OUT .= "    php_admin_value open_basedir $basedir\n";
                 my $tmpdir = $ibay->prop('PHPTmpDir')
                     || ("/home/e-smith/files/ibays/" . $ibay->key . "/tmp");
                   $OUT .= "    php_admin_value upload_tmp_dir $tmpdir\n";
                $OUT .= "</Directory>\n";

Still no change. I am nervously hoping I am carrying out your instructions correctly.
This should have worked. Correct?

Mary,

Have you and Stefano agreed that you proposal is ok or not? Should I impliment now. I am not going to rush ahead without confirmation.

Also - "Handisoft" - I have never heard of it. I had imagined it to be hand cream until I looked it up (or a new Microsoft app for Tradesmen). There must be an imposter! :) I do hope that he is polite and not giving me a bad name.

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #48 on: December 18, 2012, 07:03:17 PM »
Just to make sure, close your browser completely to clear cache and can you try again?

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #49 on: December 18, 2012, 07:07:30 PM »
What is the result of:

cat /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays


Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #50 on: December 18, 2012, 08:56:37 PM »
RequestedDeletion

PC restarted. No change.

Code: [Select]
cat /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays
{
    my $status = $php{status} || 'disabled';
    if ($status eq 'enabled')
    {
use esmith::AccountsDB;
my $adb = esmith::AccountsDB->open_ro();
foreach my $ibay ($adb->ibays)
{
    local $dynamicContent = $ibay->prop('CgiBin') || 'disabled';
    if ($dynamicContent eq 'enabled')
    {
$OUT .= "\n<Directory /home/e-smith/files/ibays/" . $ibay->key . "/html>\n";
$OUT .= "    AddType application/x-httpd-php .php .php3 .phtml\n";
$OUT .= "    AddType application/x-httpd-php-source .phps\n";

# Set the sandbox within which PHP is confined to play
my $basedir = $ibay->prop('PHPBaseDir')
    || ("/home/e-smith/files/ibays/" . $ibay->key . "/");
$OUT .= "    php_admin_value open_basedir $basedir\n";
                 my $tmpdir = $ibay->prop('PHPTmpDir')
                     || ("/home/e-smith/files/ibays/" . $ibay->key . "/tmp");
                   $OUT .= "    php_admin_value upload_tmp_dir $tmpdir\n";
$OUT .= "</Directory>\n";
    }
}
    }
}

Charles

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #51 on: December 18, 2012, 08:59:49 PM »
where did you get this from ?

# Set the sandbox within which PHP is confined to play

Please remove that line from the custom template, expand signal modify and update remote access

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #52 on: December 18, 2012, 09:51:53 PM »
RequestedDeletion

# Set the sandbox within which PHP is confined to play
is copied from this file:
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays    ...   which is my new 'custom-template'. Right? (BTW I didn't add it :)).
Here, about 2/3 the way down:
Code: [Select]
{
    my $status = $php{status} || 'disabled';
    if ($status eq 'enabled')
    {
      use esmith::AccountsDB;
        my $adb = esmith::AccountsDB->open_ro();
        foreach my $ibay ($adb->ibays)
        {
            local $dynamicContent = $ibay->prop('CgiBin') || 'disabled';
            if ($dynamicContent eq 'enabled')
            {
              $OUT .= "\n<Directory /home/e-smith/files/ibays/" . $ibay->key . "/html>\n";
                $OUT .= "    AddType application/x-httpd-php .php .php3 .phtml\n";
                $OUT .= "    AddType application/x-httpd-php-source .phps\n";

                # Set the sandbox within which PHP is confined to play
                my $basedir = $ibay->prop('PHPBaseDir')
                    || ("/home/e-smith/files/ibays/" . $ibay->key . "/");
                $OUT .= "    php_admin_value open_basedir $basedir\n";
                 my $tmpdir = $ibay->prop('PHPTmpDir')
                     || ("/home/e-smith/files/ibays/" . $ibay->key . "/tmp");
                   $OUT .= "    php_admin_value upload_tmp_dir $tmpdir\n";
                $OUT .= "</Directory>\n";
            }
}
    }
}

I will remove the line as you suggest. However, should there be an empty line above it? I will leave the empty line there for now - unless you instruct me otherwise.

Code: [Select]
Please remove that line from the custom template, expand signal modify and update remote access   ...   done.

The problems still exist, including:
- can't save modifications to desktop
- can't 'print' reports to html, .pdf,
- doesn't copy ALL customer details across from 'Bill to' to 'Ship to' as it should with one click. It ONLY copies across customers name.
- no additional data field is created in the Sales Order when  'drop ship'  is selected.
- cannot create a stock item
- In the General Journal entry the input boxes are missing   ....   etc etc

I am sorry that this is dragging on for you. Thanks for being patient.
Charles

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #53 on: December 19, 2012, 12:38:49 AM »
3 chefs & a trainee cook all trying to bake a pie, hmmm, wonder what the completed pie will taste like !!???!

There are other errors in those log files that probably should not be ignored.
Charles comments potentially indicate the custom template already existed, so the server may have "red herrings" that the chefs were not expecting and could be impacting upon the result.

Charles can you advise if the custom template was already in existence before you followed advice provided here ?

What is the history of this server ?
Has some other technical sysadmin person been working on it ?
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #54 on: December 19, 2012, 12:56:26 AM »
Hi Mary,

Yes, in retrospect I should have covered this in my opening post.

The SME8 is a fresh install. All I had done with it before the Phreedom attempted install was to install MySQL.

I hadn't make a custom-template (copying a 'template' to a new 'custom-template' file and modifying the code), but, after trawling the forums I had followed the instructions which were v similar to yours with the db and /:/tmp instructions (perhaps they were yours) - I detailed this in the OP.
Nobody else has played with this sever.

Fingers crossed for a souffle and not scrambled egg :)

Charles

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #55 on: December 19, 2012, 01:23:08 AM »
Charles2008

Well here is the original template fragment for 95AddType00PHP2ibays
which has the line hashed out
 # Set the sandbox within which PHP is confined to play
and that is OK & safe to have in there and answers RequestedDeletion query of where did it come from.




    {
        use esmith::AccountsDB;
        my $adb = esmith::AccountsDB->open_ro();
        foreach my $ibay ($adb->ibays)
        {
            local $dynamicContent = $ibay->prop('CgiBin') || 'disabled';
            if ($dynamicContent eq 'enabled')
            {
                $OUT .= "\n<Directory /home/e-smith/files/ibays/" . $ibay->key . "/html>\n";
                $OUT .= "    AddType application/x-httpd-php .php .php3 .phtml\n";
                $OUT .= "    AddType application/x-httpd-php-source .phps\n";

                # Set the sandbox within which PHP is confined to play
                my $basedir = $ibay->prop('PHPBaseDir')
                    || ("/home/e-smith/files/ibays/" . $ibay->key . "/");
                $OUT .= "    php_admin_value open_basedir $basedir\n";
                $OUT .= "</Directory>\n";
            }
        }
    }
}
« Last Edit: December 19, 2012, 01:28:27 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #56 on: December 19, 2012, 01:49:46 AM »
Charles2008

Quote
I did this and it wasn't clear what is was showing me (didn't seem any different than
 nano filename

FYI

nano
and
nano -w
both open the nano editor, but the -w switch tells nano NOT to limit the line length, and so therefore NOT to wrap long lines onto the next line,
That's the difference, it's not in what you "see" but how the end result is saved.

As a general rule always use nano -w and then there is no chance of creating files with inadvertantly wrapped lines.

at command prompt do
man nano

You can use man (short for manual) to look up many things
http://en.wikipedia.org/wiki/Man_page
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #57 on: December 19, 2012, 02:33:15 AM »
Charles2008

Quote
The problems still exist, including:
- can't save modifications to desktop
- can't 'print' reports to html, .pdf,
- doesn't copy ALL customer details across from 'Bill to' to 'Ship to' as it should with one click. It ONLY copies across customers name.
- no additional data field is created in the Sales Order when  'drop ship'  is selected.
- cannot create a stock item
- In the General Journal entry the input boxes are missing   ....   etc etc


Perhaps these user level issues are best taken to the Phreebooks forum
http://www.phreesoft.com/forum/index.php
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

guest22

Re: Phreebooks install (accounting/ERP package)
« Reply #58 on: December 19, 2012, 03:26:57 AM »
@Charles2008

... All I had done with it before the Phreedom attempted install was to install MySQL.

Why did you install MySQL? It comes with SME8 by default.

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #59 on: December 19, 2012, 10:21:56 AM »
Mary
Thank you for the explanation.

Re. Phreebooks forum - yes, you have a point. However, these problems are clearly a symptom of something amiss with the PB / SME install. I installed it on Debian and tested for 2 months without issue. I do think that there is a problem with the install.


RequestedDeletion

It was v late last night - I meant phpMyAdmin - sorry. To set up and administer the database.

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #60 on: January 07, 2013, 09:36:52 PM »
I have consulted with the Phreedom forum and as a result have reinstalled Phreedom. I still however have a (shorter)  list of the same problems.
- can't save added dashboard boxes
- can't 'print' reports to html, .pdf,
- no additional data field is created in the Sales Order when  'drop ship'  is selected.
- cannot create a stock item - I can fill in the first page, but it won't progress to the details page
- In the General Journal entry the input boxes are missing

Now, as things stand, I have created and edited a 'custom-template' and introduced a /tmp directory into the ibay html directory e.g. bookkeeping/html/tmp. I have modified ownership and permissions.
These are the relevant lines from /etc/httpd/conf/httpd.conf :

Code: [Select]
#------------------------------------------------------------
# bookkeeping ibay directories (accounting)
#------------------------------------------------------------

<Directory /home/e-smith/files/ibays/bookkeeping/html>
    Options None
    Options +Indexes
    Options +Includes
    AllowOverride None
    order deny,allow
    deny from all
    allow from 127.0.0.1 192.168.0.0/255.255.255.0
</Directory>

Code: [Select]
<Directory /home/e-smith/files/ibays/bookkeeping/html>
    AddType application/x-httpd-php .php .php3 .phtml
    AddType application/x-httpd-php-source .phps
    php_admin_value open_basedir /home/e-smith/files/ibays/bookkeeping/html/:/tmp            <-------------------
    php_admin_value upload_tmp_dir /home/e-smith/files/ibays/bookkeeping/tmp                   <-------------------
</Directory>

Before I spend more hours trying to straighten out my install, it would be nice to be sure that I am no longer suffering from the open_basedir - /tmp related issue.

Is it possible to tell from the two (arrow indicated) lines in my httpd.conf file if I now have the correct configuration for my bookkeeping/html/tmp directory?
All advice much appreciated.
Charles

Offline Charles2008

  • *
  • 174
  • +0/-0
Re: Phreebooks install (accounting/ERP package)
« Reply #61 on: January 09, 2013, 10:03:19 PM »
Good news - after having reinstalled Phreedom a couple of times from my original Phreedom.zip file, I have deleted the ibay, recreated it, and reinstalled Phreedom from a fresh download. It now works as I would have expected. Somehow in the process of getting the contents of the zip file into the final ibay directory, something got corrupted.

I really like the control one gets over an ibay install. It is very reassuring.

Thank you to RequestedDeletion, Mary, johnp and Stefano for being so patient and helpful. I certainly got my lesson in the 'PHPBaseDir restriction'.
Charles