Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

RE: FN-FORUM: PHP/Apache path problem

date posted 19th January 2006 10:32

Actually re-reading what you wrote i noticed the bit about pathinfo; =
Looks like the scripts are outputting the physical path of the images to =
the clients? Check the source received from the site. If it is a =
/path/src/assets/ etc then it is the equivalent of linking =
c:\mypage\myimages\ on a website. i.e it points to a local drive on each =
users computer. Thats why it worked on your local computer. This needs =
to be changed so that root of path is determined in relation to the site =
url. If assets is under the root (example.com/assets) then the root will =
always be just / anyway, so you wont need any scripting to work it out.

-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] Behalf Of Jamie
Sent: 19 January 2006 10:49
To: Jamie
Subject: RE: FN-FORUM: PHP/Apache path problem



All files and folders that web users will be accessing need to be a =
subdirectory of the root they access in the a browser.

If they access http://example.com/ and it puts them in the /web folder, they can only access files in the /web folder and =
below. If that is the case they can never access the assets folder, only =
server scripts would be able to. You would have to move the assets =
folder into /web for web users to access it.

If however http://example.com/ points to and the =
users are actually accessing http://example.com/web/ then they should be =
able to access http://example.com/assets so long as the permissions for =
that folder are set correctly. You may need to use a .htaccess to give =
them access to the assets folder but this depends on the host.

Try access the images by direct link rather than through a page and see =
what happens. If an error is returned it may give you a better idea of =
whats going on.

-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] Behalf Of Andy
Creed
Sent: 19 January 2006 07:47
To: Jamie
Subject: FN-FORUM: PHP/Apache path problem



Hi=20

I cannot get round this problem:

I have a client who structures their sites as follows:

For all web pages go into=20

/web - this is the public folder that can accessed =
from
the web

All uploaded images from the site go into

/assets

Where route of the site is determined by:

$PathArray =3D pathinfo(__FILE__);

=3D realpath($PathArray['dirname'] . "/..");=20

I understand all this bit, however=20

Now if I look at the site on my windows machine (running apache) I can =
see
these images fine in my pages as I have access to the root of my drive =
of
course. However, on my host where I am staging the site temporarily =
these
images do not show because, I think, I do not have access to the root of =
the
shared host - Am I right?

Therefore is there a method such as using a .htaccess file or whatever =
that
would help me get around this issue??

Many thanks in advance.

Andy


--=20
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.20/233 - Release Date: =
18/01/2006
=20


--=20
Freelancers, contractors earn more with Prosperity4
Call 0870 870 4414 or visit www.prosperity4.com
and benefit from Inland Revenue approved expenses today.

To advertise here: http://www.freelancers.net/advertising.html


--=20
Freelancers, contractors earn more with Prosperity4
Call 0870 870 4414 or visit www.prosperity4.com
and benefit from Inland Revenue approved expenses today.

To advertise here: http://www.freelancers.net/advertising.html



Messages by Day
January 31st 2006
January 30th 2006
January 29th 2006
January 28th 2006
January 27th 2006
January 26th 2006
January 25th 2006
January 24th 2006
January 23rd 2006
January 22nd 2006
January 21st 2006
January 20th 2006
January 19th 2006
January 18th 2006
January 17th 2006
January 16th 2006
January 15th 2006
January 14th 2006
January 13th 2006
January 12th 2006
January 11th 2006
January 10th 2006
January 9th 2006
January 8th 2006
January 7th 2006
January 6th 2006
January 5th 2006
January 4th 2006
January 3rd 2006
January 2nd 2006
January 1st 2006


Messages by Month
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000