Support

Admin Tools

#25056 Running non-joomla gallery in subfolder

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Monday, 13 June 2016 17:20 CDT

sambob
 Hi, I am wanting to have a subfolder in my joomla site to run an image gallery (KOKEN) that will be separate from the workings of Joomla (I would love to integrate/bridge but no mechanism yet) - I currently have it working on a separate domain.

When I add the KOKEN site into a folder and try to access it I get a 4.3 error from Admin tools with the log showing:
DFIShield http://reddirtstudio.com.au/portfolio/photos/index.php (not the real folder, listed here as example)

I thought if I allowed access to the folder via htaccess making it would be ok, but obviously WAF is doing its job and not allowing access to the folder and scripts to run (php)

My question is 2 fold:
1) Is there a way to allow this gallery to run in a new/unique folder in the root?
2) Is it a bad idea to run a gallery system from with root that is separate to Joomla.

Thanks in advance for any suggestions how to achieve.

Regards

Simon

dlb
Simon,

I think it is better to run the gallery in a subfolder. You will need to crate an exception in .htaccess Maker to allow all files to run in the gallery folder, including PHP files. You need to do that because the gallery does not run through the Joomla! index.php file as Joomla! extensions do. There is a possibility that when you start your gallery you will be redirected to your Joomla! site. If that happens we just need to change another option. I think that is off by default, so we'll be OK.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

sambob
Hi Dale, thanks for your reply.

I have tried that and still no luck.
http://reddirtstudio.com.au/photo/koken/index.php

I also tried it with AdminTools turned off and it is tying to open within joomla,as you mention, but says page not found.

If I 'disable' root .htaccess, it will allow access. (htaccess has been restored).

So what do I need to change to stop it trying to go via Joomla.

Thanks in advance.

sambob
Hi Dale, got it!

A bit of fiddling with the image site and all good now.

Thanks again for the pointers, appreciate it.

dlb
You are welcome! I'm glad you got it working.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

sambob
Hi again Dale,

I spoke a bit too soon... it will work if I rename the .htaccess file.

With the htacess file in place, it creates an API error... but I am not sure how I can determine the error/conflict.

I have already added the following to the .htacess file via Admintools:
Direct acess to these files:
photo/koken/index.php
photo/koken/api.php

Direct access to these folders:
photo/koken/
photo/

Any clues what I might need to add/remove from the .htacess?

Regards

Simon

dlb
I thought that was too easy.

In .htaccess Maker, in the Optimisation and utility section towards the bottom of the screen, "Redirect index.php to the site's root" should be No. Setting that to Yes would be a problem but I'm not sure how it could cause an API error.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

sambob
Hi Dale... it is often the case :)

Ok, settings in htacess maker were already as you suggest.

Looking at the page in question, it opens fine so that is good but for some reason the API/file is being blocked as removing the htacess file enables it to work.

Looking at the page, the Browser Console reveals an error:
GET http://reddirtstudio.com.au/photo/koken/api.php [HTTP/1.1 404 NOT FOUND 391ms]

That file is definitely there and I have added to the 'allowed' in htacess maker, and checked to see if is in there:
RewriteRule ^photo\/koken\/api\.php$ - [L]

Is there another reason/cause within Admin Tools that might be blocking that file?

dlb
Wait, didn't we allow all files including PHP in the entire gallery folder? We need to do that because none of those programs are called through Joomla! and so they need direct access.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

sambob
Hi Dale, yes we did, which makes it even more strange.

I have added the folder/s:
photo
photo/koken

And direct file access as well to api.php

dlb
Ah! What are the permissions on the 404 file?


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

sambob
Morning Dale,

Not sure, where in the directory is my 404 page? (funny I don't know that)

sambob
Do you mean edit permissions (confused what that may have to do with the conflict)

Looking at the 404 page, backend, the permissions are
Delete: Not Allowed.
Edit: Not Allowed.
Edit State: Not Allowed.

dlb
I'm sorry, I was not very clear.

What are the permissions on the file
http://reddirtstudio.com.au/photo/koken/api.php
that we are having trouble with? If the file is not readable, that could result in a 404, although a 403 would make more sense.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

sambob
Morning Dale (afternoon for you), how has your day been?

That one had me stumped and looking for the 404 file.

The permissions on the api.php is 644

dlb
Let's temporarily disable the system - Admin Tools plugin to disable Admin Tools and see if that fixes the 404 error.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

sambob
Hi Dale,

With Plugin Disabled, same problem (not access)

it is something in the htacess file becuase if I rename that to bak-htaccess it works.

dlb
We allowed access to the /photo folder, for all files including PHP files. That should be the only .htaccess directive regarding that folder. If there are overrides for specific files, that could confuse the permissions.

Is there any message in the server error log? I was thinking maybe the 404 was a secondary error, but the browser message sure doesn't look like it.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

sambob
Hi Dale, yep, very strange.

I am going to delete the transferred install and do a fresh install on the of the photo gallery and see if that makes a difference.

If that doesnt work, then I will but it in a subdomain. It will just be easier.

Again, thanks so much for your time on looking into this, it is greatly appreciated.

Regards

Simon

dlb
It isn't supposed to be this hard. :-(

Please let us know if you need more help.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

sambob
Hi Dale, no it isn't... but sometimes things just dont work as they are supposed to.

Joomla/AdminTools much more important than the gallery, which is now in subdomain.

Thanks again.

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!