logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Unable to view php files via web browser
Author
Zavarzin



Joined: 05 Sep 2015
Posts: 5
Location: Italy

PostPosted: Sat 05 Sep '15 21:12    Post subject: Unable to view php files via web browser Reply with quote

Hi there,

I'm trying to configure self-hosted autoresponder by Amazon "Sendy". I have set up everything correctly and previously I got Sendy up and running on a subdomain sendy.domain.com but I decided to change it to mails.domain.com. So I deleted everything related to Sendy and reuploaded and reconfigured back. Also I have disable the mod_security in cPanel as it caused issues with the previous installation.

To properly configure Sendy I need to sync this 2 files with Amazon server:

bounces.php
complaints.php

But the issue is when Sendy folder is named as "mail" I can't just see / find / reach any php files except complaints.php in web browser. Although the files are actually there on the server as I can see them with file manager.

But the weird thing is if I rename the "mails" folder back to "sendy" all the php files are visible in the folder and reachable.

Here are some screenshots:







I'm getting these errors 403 and 404 when I try to reach domain.com/mails/includes/campaigns/bounces.php while I can reach it if I change "mails" to "sendy".

Any suggestions guys?
Thanks


Apache version: 2.2.29

Operating system: linux

Version of php: 5.3.29

Version of mysql: 5.5.45-cll-lve

Indications in the log files:

[Sat Sep 05 15:01:40 2015] [error] [client 2.38.79.244] client denied by server configuration: /home/*******/*******/mails/includes/campaigns/bounces.php
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 08 Sep '15 11:07    Post subject: Reply with quote

how did you configure PHP in your apache?
Back to top
Zavarzin



Joined: 05 Sep 2015
Posts: 5
Location: Italy

PostPosted: Tue 08 Sep '15 13:12    Post subject: Reply with quote

Within my hosting account I didn't touch anything.

I just uploaded files on the server and followed this guide:
https://sendy.co/get-started

But the weird thing is that even when I upload the same files on my other domain, without even setting up a database, the same thing happes as well. That is if I rename the folder back to "sendy" the php files are visible via browser, but if I give any other name to the folder the php files won't show up.

It makes me think like if mod_security "has remembered" the folder name "sendy" from the previous installation but won't "accept" other folder names. Is it possible?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 08 Sep '15 21:17    Post subject: Reply with quote

probably because there is something in the .htaccess that is specifically configured to /sendy being in the path.
Back to top
Zavarzin



Joined: 05 Sep 2015
Posts: 5
Location: Italy

PostPosted: Tue 08 Sep '15 22:36    Post subject: Reply with quote

Here's the .htaccess content that came with Sendy:

Code:
ErrorDocument 404 "[404 error] If you're seeing this error after install, check this FAQ for the fix: https://sendy.co/troubleshooting#404-error"

Options +FollowSymLinks
Options -Multiviews

RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^([a-zA-Z0-9-]+)$ $1.php [L]

# Link tracker
RewriteRule ^l/([a-zA-Z0-9/]+)$ l.php?i=$1 [L]

# Open tracker
RewriteRule ^t/([a-zA-Z0-9/]+)$ t.php?i=$1 [L]

# Web version
RewriteRule ^w/([a-zA-Z0-9/]+)$ w.php?i=$1 [L]

# unsubscribe
RewriteRule ^unsubscribe/(.*)$ unsubscribe.php?i=$1 [L]

# subscribe
RewriteRule ^subscribe/(.*)$ subscribe.php?i=$1 [L]



I'm inexperienced in the things when it comes to code.
Back to top
Zavarzin



Joined: 05 Sep 2015
Posts: 5
Location: Italy

PostPosted: Tue 08 Sep '15 22:43    Post subject: Reply with quote

The code I posted above was in original Sendy zip file I've downloaded from Amazon.

Not sure if you meant any other .htaccess from my server?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 09 Sep '15 20:58    Post subject: Reply with quote

no, the one that came with sendy. I don't see anything that would cause a 403 there. These types of soft
ware love to store their locaions internally for creating links, it may be that you changed the physical location on the server but sendy does it's thinks it's trying to link to a place that doesn't exist, but that usually just 404s.

I see this is linux, UGH! It's probably permissions or ownership. James knows plenty about Linux so I'll leave this to him.
Back to top
Zavarzin



Joined: 05 Sep 2015
Posts: 5
Location: Italy

PostPosted: Thu 10 Sep '15 23:21    Post subject: Reply with quote

Guys, finally got it solved by my host support.

They have blacklisted php files in the "includes" folder to "prevent hacker attacks".

Now I've asked and they whitelisted those files.

I spent a lot of time discussing with them before posting on this forum but I've hit on an incompetent staf member that has adviced me to use MailChimp to "solve my issue".

Now it's over. Thanks for your time!
Back to top


Reply to topic   Topic: Unable to view php files via web browser View previous topic :: View next topic
Post new topic   Forum Index -> Apache