|
|
 |
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
|
 |
|