• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

2 php applications in root?

My project currently includes 2 different 3rd party php scripts.  I really need both in the root if possible but have never heard of doing it before.  The only common file is index.php and htaccess and all the folders for each application are named differently.
I didn't know if there was some kind of pixie dust or whatever that would make this happen.  

I am running on a dedicated linux box with apache, php, mysql.  

Thanks!
0
Large_Farva
Asked:
Large_Farva
1 Solution
 
ray-solomonCommented:
I'll sell you some genuine pixie dust for $1000 guaranteed to fix your programming problems forever.

As for your real problem, what 3rd-party scripts are you referring to?
0
 
Beverley PortlockCommented:
"I really need both in the root if possible"

Why do they need to be there? What are these scripts intended to do? You can use PHP in command line mode and run it as root.

http://php.net/manual/en/features.commandline.php
0
 
pius_babbunCommented:
In the question title you have mentioned "2 php applications" . In this case these might be in different folders and has different index files for each of these. In this case you can just have one common file  out these files (index.php) and just redirect with the link navigation if needed. or you can include index files of both the applications in this common file  and call the functions of them to work. Hope it helps.
0
 
Large_FarvaAuthor Commented:
ray_solomon: the check is in the mail, can you finish yesterday?

Thanks guys...to frame this a little better:
I am using PhpFox (social network script) and Jrox JEM, which is an integrated cart/affiliate system.  I am fine with having the "cart"  in a subfolder but don't want my affiliate links to have to include the subfolder.  
So when I say "I really need both in the root if possible" I guess I really an saying "I need them to appear as if they are in the root".  I have been trying to get my htaccess to rewrite www.mydomain.com/affiliates/affiliateusername to remove the directory "affiliates" from url so they can distribute the link:  www.mydomain.com/affliateusername and have it give them credit.  

I have asked a couple of times here and thought I had a solution but I have yet to get it working 100%
Here is my .htaccess if you guys want to take a shot:
RewriteEngine On
	
	RewriteBase /

	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule (.*) http://www.mydomain.com/affiliates/$1 [R=301,L]
	#RewriteRule ^(.*) index.php?do=/$1

Open in new window

This is close to working right.  When I navigate to root it lands fine but if I click on any links in the social network site, I go to the affiliate subfolder.  I need the conditions set up to where only traffic with a variable after the trailing slash that is NOT a filename or folder to go to the affiliates directory...which the above code should do but the hangup is the dynamic links?  

Or is there a better way overall to approach this, sans pixie dust?

Thanks.

0
 
pius_babbunCommented:
In this case we can go for Frames to display both at the same page.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now