Get answers quicker by searching

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Redirecting to APP_PATH/_install.php
  • Vote Up0Vote Down rgaunyrgauny
    Posts: 12Sendy user

    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', '<a href="http://www.myresponder.co'" target="_blank" rel="nofollow">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', ''); //==================================================================================// ?>
  • 15 Comments
  • Vote Up0Vote Down BenBen
    Posts: 3,484Sendy support

    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

  • Vote Up0Vote Down rgaunyrgauny
    Posts: 12Sendy user

    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

  • Vote Up0Vote Down BenBen
    Posts: 3,484Sendy support

    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.

  • Vote Up0Vote Down rgaunyrgauny
    Posts: 12Sendy user

    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?

  • Vote Up0Vote Down BenBen
    Posts: 3,484Sendy support

    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).

  • Vote Up0Vote Down rgaunyrgauny
    Posts: 12Sendy user

    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.

  • Vote Up0Vote Down BenBen
    Posts: 3,484Sendy support

    Hi @rgauny,

    If I move the config.php out of the includes folder and into the Sendy root your functions.php finds the config.php file.

    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.

    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

    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.

    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.

    This is absolutely not true. There's no such checks or settings.

    Thanks.

    Ben

  • Vote Up0Vote Down rgaunyrgauny
    Posts: 12Sendy user

    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

  • Vote Up0Vote Down BenBen
    Posts: 3,484Sendy support

    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.

  • Vote Up0Vote Down BenBen
    Posts: 3,484Sendy support

    By the way, are you on Windows/IIS or Linux as specified on the FAQs on Sendy's homepage?

  • Vote Up0Vote Down BenBen
    Posts: 3,484Sendy support

    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).

  • Vote Up0Vote Down rgaunyrgauny
    Posts: 12Sendy user

    Well that would explain the weirdness. lol, man sorry Ben will set up a VirtualBox now...Thanks man!

  • Vote Up0Vote Down rgaunyrgauny
    Posts: 12Sendy user

    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

  • Vote Up0Vote Down BenBen
    Posts: 3,484Sendy support

    Hey Ronnie,

    Well that would explain the weirdness. lol, man sorry Ben will set up a VirtualBox now...Thanks man!

    You're welcome!

    I'm guessing that the functions.php requires some linux stuff

    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

This discussion has been closed.
All Discussions