|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Portal System
Hello,
I have a project that I am working on. A portal system. So far eveything seems to work fine on my website but if I have someone else install the poral we get errors. I know some of the errors are becaue I have made certain lines concreat insted of flexable. I fixed these lines but am still having problems with the root directory. If someone uploads my stuff to this web address. www.yoursite.com/portal/ my include paths are absolute and I need to change this. So I gather the location they install the primary file on. In this case www.yoursite.com/portal/ No my functions are inside this folder www.yoursite.com/portal/includes/functions/ how do I set up my includes and reguire paths correctly? Here is a link to the setup.php file Setup file. I took the submit button out. Now after submitting it goes to this file. PHP Code:
So once again how do I make my path (relative) dynamic? So it is not absolute? I added both the setup.php setup1.php and all the include files and the function dbconnect () if someone could please help. Thanks so much, Attila P.S. Can someone refresh me on how to do the Nocaching thing with PHP for my header?
__________________
Thanks, Attila http://www.glorynaspiration.com http://www.abitofthings.com |
|
#2
|
|||
|
|||
|
Hi,
it should work when you work with the absolute path of your html root, for example: $conf['rootDir'] = "/home/youruser/www/"; $conf['portalDir'] = $conf['rootDir']."portal/"; require $conf['portalDir] = $conf['portalDir']; |
|
#3
|
|||
|
|||
|
Thank you.....I am working on that right now.
Would it be safe for me to assume that web host seem to make their root directory connection strings like this. www.devarticles.com would be /home/devartic/www/ and www.oscommerce.com would be /home/oscommer/www/ and www.msn.com would be /home/msn/www/ and www.yahoo.com would be /home/yahoo/www/ No I am not looking for this information to hack....Wouldn;t know were to start. Just this way I can cover a lot of the pitfalls before I release my portal system. Thanks again, Attila |
|
#4
|
|||
|
|||
|
If I think what you mean, you can declare any , dir or folder as dynamic so long as it is under your root you have set.
For example - my root is C:\\FoxServ\www anything inside www can be declared as dynamic - take a look below. Hope this helps! PHP Code:
|
|
#5
|
||||
|
||||
|
from a different angle
I develop on a windows platform, but I think the same logic should still apply. Does Apache use the IIS equivelant of "Virtual Directories"? (you essentially mount a directory from elsewhere on the system e.g. home/shared/, and it appears to be hanging directly off your site, that it is within the same dir structure: home/clientname/wwwroot/virtual,)
If so, for your portal system, don't put your uploaded files, functions, or any other stuff that you want to share in a client specific directory e.g. home/clientname/ dir - put them in a shared directory. For example in IIS, above my wwwroot, I have a scripts dir. eg. inetpub/wwwroot/clientname inetpub/scripts inetpub/scripts/clientname File that are sitting in the scripts directory are accessiable for my other sites. Bottomline - I think you may be going about this the wrong way. I.e. - doing a lot of hard work in your code. If you are setting up a portal, let your webserver handle the tricky stuff! Or maybe I've missed the point entirely???!!! ![]() stumpy |
|
#6
|
|||
|
|||
|
Ok
LMAO.....You probably are telling me what to do and explaining it perfectly although I am not understanding. I gave a copy of what I have done and let a friend try to install it on his website. His site You can see the error he is getting. I have MSN messinger and someone can add me with attilagna@hotmail.com I will be on for several hours. I will send you my website portal system so you can try it and see if you see what I am talking about....I think I understand you so I am goig to try and fix it. |
|
#7
|
|||
|
|||
|
You're writing a portal system with an actual install routine? Hmm, in that case, for each install you'll probabaly run something like:
http://someserver/setup.php ? In that case, couldn't you use something like the $_PHP_SELF variable to make the server tell the script where it is installing to and set the variable from that? Basically: PHP Code:
That would allow you to strip off the amount of characters required to get back to the server base address. |
|
#8
|
||||
|
||||
|
Quote:
Thank you....What you sugested didn't get all of it the way I did it but pushed me in the correct direction. This iw what I got. PHP Code:
This is data that I get from the person installing the script. I give them an example of this Quote:
Well this data is written to a Configfile in the root directory that they installed the program in. Now the weird part is I thought I would have to do a PHP Code:
It will be up and down as I manipulate the setup script but if any of you want to see it you can go here Portal More questions I am sure to come!! Going into sessions after Iget things cleaned up! Thanks everyone for all your help.. A special thanks to Stumpy for catching me on MSN and helping me with this. He tought me a lot in a few minutes. Thanks, Attila |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Portal System |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|