Solved

How to keep custom php pages that are outside the template unviewable until logged in?

Posted on 2010-09-11
6
253 Views
Last Modified: 2012-05-10
I have a couple of custom pages in PHP outside of the template. Is there a folder in Joomla that I can put them in so that they cannot be viewed unless a user is logged on to the site? Or something to that effect?

Thank you in advance.
0
Comment
Question by:colonelblue
6 Comments
 
LVL 12

Expert Comment

by:Panagiotis S
ID: 33652376
you can create a folder anywhere to your joomla installation
0
 
LVL 4

Assisted Solution

by:Joomstrup
Joomstrup earned 166 total points
ID: 33652562
Joomla! cannot govern access to external php files no matter where you put them in your Joomla! folder structure. To use Joomla! for access control you need to turn your php files into either a component or a module. Whether it should be a component or a module depends on the functionality of your files.

As an easy start you can take one of the modules that allows inclusion of php or plug ins like JIncluder or DirectPHP, add your code there and see if that works. You can find the extensions at the JED (http://extensions.joomla.org)
0
 
LVL 12

Expert Comment

by:Panagiotis S
ID: 33652697
you can use joomi
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Accepted Solution

by:
slatton earned 167 total points
ID: 33656570
Change the permissions to the individual pages and documents that are outside of the Joomla management system by going into Dreamweaver and:
  1. Select your website ("Remote View")
  2. Right click the document that you want to limit view of
  3. "Set Permissions..."
  4. Type in 700, 600, or 200
  5. Save
0
 
LVL 13

Assisted Solution

by:StormITSolutions
StormITSolutions earned 167 total points
ID: 33656643
Alternatively

You could create articles which are viewed only by logged in users

then use the inbuilt {loadposition  x} code within your article
this enables modules to be included within articles

YOu can enable this via the plugin admin in the backend

NExt copy your php files directly into a custom code module
allowing you to run the php directly from a module

Then assign the module to position X within your article

Then you can have php scripts with the joomla registration in effect so external non logged in users cant see them or view them

Storm
0
 

Author Comment

by:colonelblue
ID: 33657725
Thank you.
Hey guys, I went into my web host files manager.
Made a folder.
Gave it a 700 permissions.


Now when you try to access any files in that folder you get a:
403 Permission Denied

But the pages work as include in Joomla when the user is logged on.
This should be secure enough right?
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First of all, we will need Jumi component or Sourcerer plugin for this to work. We need either of these because the main focus here is custom development outside of the standard modules or articles within Joomla. You can find Jumi here...it's my …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

827 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question