PHP redirect not working in exeoutput browser


#1

Hi, I just start using exeoutput application. Right now, I am having problem that my redirect functions are not working in exeoutput browser.

This is my code:
header(“Refresh:0; url=“logIn.php””);

Can you help me to solve this problem. :smiley:
Thanks.


#3

header() is supported but not in that way. For redirections, you should use header(“location:…”)


#4

Not working anymore in version 2018

No BOM :frowning:


#5

We’ll check that. It’s possible that something was broken with the change of Chromium.


#6

Please check it asap :frowning: - it is strange bahavior :frowning:


#7

Did you manage to fix the error of how to do working redirects?


#8

Yes, this is fixed in V2018.1.


#9

great, I can not wait for the new version :slight_smile:


#10

@gdgsupport Header location does not seem fixed in V2018.1

I am using this in my PHP file:

header('Location: success.html');

This of course works fine in my local server testbed, but does not with exeout?

My PHP file and success.html are in the same directory but exeout throws:

ExeOutput Viewer Error
The following error has occurred. Please press Back to return to the previous page or contact the author of this application for further information.

File not found: success.html

The above files are compiled in the final exe.

EDIT/UPDATE: for some reason you must provide full path for location to work in exeout. Had to use:

header('Location: maint/optimizeDB/success.html');

Even though both PHP file with header location and success.html are in the same directory, only using full path works.


#11

Try
header(“Location: /success.html”);

Try
header(“Location: http://www.google.com”);


#12

Thanks for suggestion @servage2

Tried that and even ./success.html and both results with file not found error. Only way I have found is full path. Seems exeout is seeing file success.html as being in root directory.

Guess long as it works with full path, just have to remember to use it:)


#13

Sorry, i don’t understand.
What header works for you?


#14

The one that I showed in my updated post above ( PHP redirect not working in exeoutput browser ):

header('Location: maint/optimizeDB/success.html');

Since I now know must use with path, non-issue. Working fine with header('Location: maint/optimizeDB/success.html');

Thanks for your input @servage2