This topic is locked

Multiple Projects on same server

5/9/2008 1:18:54 PM
PHPRunner General questions
kujox author

I have a project which was getting very large so I split it into modules and put them in seperate directories on the server but now each project generates the same common files which take space on the server.
Is there any way I can put the common files, images, javascripts etc in a folder common to them all and make each one refer to the common store directory

R
ringlis1 5/10/2008

I have 3 projects on the same server and it was just easier to keep them different, since there is alot that changes when you edit just 1 page.
I am also starting to limit views/ access based on group level. That way it doesnt look so huge to all users.

J
Jane 5/12/2008

Hi,
you can place all common files in another place and then edit location of these files in another generated files.

kujox author 5/16/2008

Hi,

you can place all common files in another place and then edit location of these files in another generated files.


Would I be able to do that in a template file or would I have to do it after every time the files are generated?

J
Jane 5/16/2008

Hi,
it makes no difference. You can edit source or generated files.

K
KeithS 6/26/2008

I think I'm getting to realize that this is an area that could use some advancement.
I'm setting up an environment where I will be adding more and more projects to a single server (automating various workstations in a light factory environment). I want them all to share a single login/logout (sharing the master projects code) so that they do not have to login to each one (project) and I want to share a uniform master style sheet and theme/style across all of them. I want to change a master style sheet and affect the whole set of applications. Currently, it seems like - out of the box anyhow - that you generate a project and install it and it is an island. You cannot simply generate projects into the same web root (maybe to some degree) but that's just going to clobber things. I would love to see a clean way to be able to tie application sub projects into a root/top level master project that provides the core theme/style and security/login. It's a feature that I would pay for with remaining with the product with annual update/new version purchases etc. This is an evolving package and these guys are doing a great job.
This said, I've managed to fiddle with templates to link in a style sheet from the project site AND the master site (relative a couple directory levels up) and redirect all the logins to the top master project login page and such things to seemingly unify them but you can only go so far. Part of doing this means that when I create a new subproject/application, I have to configure the login et al of the project to match the master but then I put a tiny event code into the login onload event to redirect to the master project (organized as 2 directories up relative to the subapps). Sort of a hack but does work nicely once setup. There's a balance between rebuilding/building a project to pick up some master file changes and then theres sharing some singular master files. So much of this sort of depends on how much effort you put up-front in customizing your selection of templates and so on. You also find that you have to get familiar with the guts of the installed phprunner directorys. It is there where you can make copies of templates/styles under your own names and tweak them and so on. But you keep updating your custom copies into these directories and then having to regenerate your projects to update them and this gets old as you scale up by more than a few projects...
The more I dig into phprunner, the more I find out that the while it does great things out of the box, there is enormous customization capability in it - but not without work. I also find that a potentially serious impediment is the difficulty in working on a large project with more than one developer, keeping event code in sync and putting the project into code management and so on... The software seems oriented towards a single developer per project. So if you narrow the scope of a developer to a portion of a larger project, you likewise cannot divide the whole of the web site/application into multiple subprojects (which is a singular phprunner project) very easily.
The manual does not convey much of a sense as to how to address using the product in larger environments - you are left to come up with your own ways/methods. I have not seen much in the way of forum discussions and other user experiences in that overall area (best practices to setup/usage/deploy/code manage/project manage et al).
This would be a great topic in itself for discussion/sharing of technique et al. I'd love to hear what others are doing!!!!
Lastly, I'd really like to have a running phprunner native for Linux desktop - I run linux all the time and treat windows as an application inside vmware machines so I can use apps like this one. It partially works under wine but that's really not an answer. Thanks for listening...

A
alang 6/26/2008

Keith - agree with what you are saying.
I have set up a framework as you suggested for our intranet using a number of projects combined to provide an integrated environment which is basically seamless to the user but very modular for the developer. It did take quite a bit of effort to set up originally but has ended up with a pretty good result. Some of the features are:

  • customised layout template - mainly list view
  • customised business template where custom code modules are kept to override a few of the PHPR modules
  • use of a common directory for code shared by all projects. Common PHP functions are maintained in code modules which can be loaded where required.
  • tweaking of the code to allow seamless hyperlinks between projects
  • the custom list view includes a "breadcrumb" which helps you see where you are in a multilevel view - I have some views down to 4 levels
  • I use CVS to maintain source code
  • navigation around the system is maintained in a database table which defines the code structure
  • projects can be updated independently and are published to a folder under the web root
  • covers sales, maintenance, configuration, and calibration details for complex electronic equipment (in ISO 17025 certified QA system), project management, employee time tracking, training and competency records, supplier and purchase orders
    I can't give too many more specific details as that would be subject to commerical confidence issues but the basic PHPR product is fantastic and the support and ongoing development is great.

kujox author 6/30/2008

I have a project that was quite big and every little change took ages to rebuild so I split it into modules, each module is in a seperate directory and each uses the same mysql db, it's about 10 modules currently.
I have set them up to use the same template layout for lists etc
I have a common php function set so all modbule have access to all the functions, I put this as an include in the login page between a function and a dummy function to take care of the closing bracket.
I would like all the common generated files, connection css etc, to be in one common place I can point the data to these locations but the files still get generated and uploaded, pity I can't just turn off the generation/upload of these flies

S
Scot 8/7/2008

I have a project that was quite big and every little change took ages to rebuild so I split it into modules, each module is in a seperate directory and each uses the same mysql db, it's about 10 modules currently.

I have set them up to use the same template layout for lists etc
I have a common php function set so all modbule have access to all the functions, I put this as an include in the login page between a function and a dummy function to take care of the closing bracket.
I would like all the common generated files, connection css etc, to be in one common place I can point the data to these locations but the files still get generated and uploaded, pity I can't just turn off the generation/upload of these flies


I have 2 projects on one website using the same mysql db but different logins and different tables. As soon as I install the 2nd project, the first does not access it's table. I think a second file is over-writing the first. Is there a beginner's basic routine for keeping the projects separate? I do not know how to "split the project into modules" as Kujox recommends.
Scot

Admin 8/7/2008

Scot,
each project needs to go to separate folder on the web server.

S
Scot 8/11/2008

Scot,

each project needs to go to separate folder on the web server.


Thank you, that make perfect sense. I have placed my built files into a file named A
The only thing then is how to tell the php event script how to get to it's target page when it interfaces with the main website.
I have a file in

http>A>include>events.php
which goes:
[codebox]<?php

// After successful login

function AfterSuccessfulLogin($username, $password,&$data)

{

//** Redirect to another page ****

header("Location: Trade.php");

exit();
} // function AfterSuccessfulLogin

?>

[/codebox]
but now Trade.php is not where it might expect it to be at:
http>A>Trade.php
but at:
http>Trade.php
IE it is back one folder,therefore it is not hitting the page.
What steps would be correct here?
Scot

Admin 8/11/2008

Scot,
you can use full URL of your page:

header("Location: http://www.yourwebsite.com/Trade.php");

S
Scot 8/11/2008

Scot,

you can use full URL of your page:


Thank you, that works well now, Scot

R
ramjamram 8/13/2008

Hi Guys,
I started a new thread since it was suggested. I hope my post helps.
Thanks you guys. Keep it up.
Ramil