LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-17-2005, 06:51 AM   #1
mhd
LQ Newbie
 
Registered: Aug 2005
Posts: 1

Rep: Reputation: 0
Apache2/Php Querry


Hi, I'm fairly new to this, I've written some php code to help me sort/caption my photos.
Unfortuately this requires all my photos to be in my public_html directory.

My question is it possible to

i) configure php/apache2 to run php scripts out side of the public_html directory
or
ii) run php with links to files outside public_html directory

As having 10s of Gb of photos in the public_html directory is bad for many reasons.

I'm runing SuSE 9.3 if that helps

Thanks in advance for your help

Dave
 
Old 09-17-2005, 07:24 AM   #2
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
Re: Apache2/Php Querry

Quote:
Originally posted by mhd
i) configure php/apache2 to run php scripts out side of the public_html directory
You can change your public_html folder to whatever you want in the apache config files, but then all your pictures will be directly accessible to the public
Quote:
Originally posted by mhd
ii) run php with links to files outside public_html directory
If you mean a
Code:
<img src="somewhere/outside/public_html" />
then no. You can use php, if compiled with gd support to grab the image, then manipulate (eg resize to a smaller size, or add a water mark) then use php to output the image to the browser, so for example in your html you would have a link
Code:
<img src="images.php?id=1;size=2;watermark=yes" />
and images.php would contain the code to retrive the image and output to the browser, this way the image is not directly accessible to the public
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2.0.52, t1lib-5.0.2, php-apache2-5.0.2 wizard7423 Slackware 2 04-04-2011 08:09 PM
Apache2 and PHP unreal128 SUSE / openSUSE 0 05-10-2005 08:51 PM
php5 apache2 mysql4 don't work, php does not seem to read php.ini atom Linux - Software 5 03-24-2005 11:05 AM
PHP 4.3.4 on Apache2 wenberg Linux - Software 3 02-08-2004 12:03 PM
Apache2 and PhP wolfwolf Linux - Networking 0 03-12-2003 11:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration