Redirecting to APP_PATH/_install.php
This isnt working at all. Keeps on sending me to APP_PATH even though I have set my config.php up properly. It's doing this redirect in the functions.php so I can't trace it or resolve it myself.
Here's my config.php. when I go to http://www.myresponder.co to install it redirects me to http://www.myresponder.co/APP_PATH/_install.php
plz help!
<?php //==================================================================================// // Configuration //==================================================================================// //path to your Sendy installation (without the trailing slash) define('APP_PATH', 'http://www.myresponder.co'); //database connection credentials $dbHost = 'localhost'; //mySQL Hostname $dbUser = 'root'; //mySQL Username $dbPass = 'mypass'; //mySQL Password $dbName = 'myresponder'; //mySQL Database Name //$dbPort = 3306; //mySQL port (only if you need to change it) //domain of cookie (99.99% chance you don't need to edit this) define('COOKIE_DOMAIN', ''); //==================================================================================// ?>This discussion has been closed.
Comments
Hi @rgauny,
I visited http://myresponder.co and it keeps redirecting me to http://myresponder.co/?nr=2 showing Godaddy's website. Is that correct?
Thanks.
Ben
Im running local and have my hosts set for www.myresponder.co to 127.0.0.1....trying to dev before i deploy up to beanstalk
Something might be wrong with www.myresponder.co pointing to your localhost. I googled and found http://serverfault.com/questions/104925/how-to-point-a-public-domain-on-another-server-to-your-localhost-on-linux Maybe that will help.
yes, what's in that link is exactly what im doing.....just setting my hosts file for www.myresponder.co to 127.0.0.1 . This is something that I need to be able to do in order to dev. Since this is a white label solution in which we should be able to extend etc I would think that doing that wouldn't be an issue. I've actually haven't ever had this not work. Is there something special you are doing that would make this not possible?
No there's nothing special that makes this impossible. As long as Sendy sees your licensed domain in the URL bar, you're good to go. There's really nothing else that restricts or forbid you from running Sendy on any host (live or local).
Hopefully this will help. If I move the config.php out of the includes folder and into the Sendy root your functions.php finds the config.php file. But will fail later after install. From my understanding and from what I've have read the config.php file should remain in the "includes" folder. If I have the config.php file in the includes folder the functions.php does a 302 redirect (to http://www.myresponder.co/APP_PATH/_install.php) in the header.php file at line 1. Since it is doing this 302 because it cant find the config.php I can not install it.
Make sense?
PS: If I had to guess, I would bet that your developers are checking for localhost in thier own dev enviroment and setting an ENVIROMENT variable or something and since I am on localhost and dont have the ENVIROMENT variable set, it is failing.
Hi @rgauny,
I have no idea why this is so for you though. If this is true and Sendy only looks for the config.php file outside of the /includes/ folder, thousands of Sendy users would have flooded this forum asking for a fix because the config.php file is not outside the /includes/ folder. That is not true, Sendy looks for the config.php file in the /includes/ folder, not outside.
That is not true either. If this is a bug and Sendy always do a 302 redirect if your config.php file is in the includes folder, again, tons of users will complain. If you search for "302" using the search function in this forum, it returns no result.
This is absolutely not true. There's no such checks or settings.
Thanks.
Ben
Hi Ben,
Most people probably aren't developing locally with your software...They are just deploying it to a host. Which would explain why you haven't heard anything. If I move the define before the include for functions.php in the header.php it works and actualluy finds the config.php...Like this:
define('APP_PATH', 'http://www.myresponder.co');
include('includes/functions.php');?>
Here's a screen shot to show you that it's truly what I'm seeing and what's happeing.
http://screencast.com/t/Z70G5xKsCkG9
Hopefully that will help narrow it down.
Thanks,
Ronnie
http://screencast.com/t/Z70G5xKsCkG9
Are you currently running the app locally or on a live server? When I visited http://www.myresponder.co it redirects to http://www.myresponder.co/login which is correct.
By the way, are you on Windows/IIS or Linux as specified on the FAQs on Sendy's homepage?
I looked at your screenshot and saw that you're on Windows. Sendy does not work on Windows. Sendy is tested and works on a Unix like server, eg. Linux, Ubuntu and even on a Mac (as it's based on Unix).
Well that would explain the weirdness. lol, man sorry Ben will set up a VirtualBox now...Thanks man!
Hey just for my knowledge. I'm guessing that the functions.php requires some linux stuff cause I haven't had this happen before with a PHP app.
Is that correct?
Thanks again,
Ronnie
Hey Ronnie,
You're welcome!
No, the
functions.php
file does not contain any 'Linux only' stuff. It's usually the.htaccess
file. And retrieving of file paths which can be found in some parts of the code base.For .htaccess, see this thread → http://sendy.co/discussion/109/sendy-on-windows/p1
Thanks.
Ben