Okta PHP Samples Not Working

Hi,
First of all, I have to say I am not a developer and I am currently trying this in my own test tenant that I have for working for an Okta partner. I am trying to create a simple application that uses Okta for logins.

I’ve downloaded and installed the PHP Samples library for PHP. I’ve installed all the requisite libraries and run the composer. I’ve set up an application in the Okta tenant and entered the necessary details in the .env file.

When I go to the main URL “https://server.domain/”, the “views/index.twig” is displayed by the index.php, as it is pcked up by the “/” in the url.

When I then click on the login button, which should redirect to “login” and be picked up and utilise the “views/login.twig” by the “/login” check in the index.php.

However, I am getting the “The requested URL /login was not found on this server.” 404 error.

the same applies to the “/profile” entry.

Is there something else I should set up or add?

Thanks,
Darren

1 Like

I’m also having this issue with the PHP sample after clicking the login button on the main page I’m redirected to:

http://localhost/login?

which results in

Not Found
The requested URL /login was not found on this server.

I’ve setup the sample on Ubuntu 18.04 and Apache2 and I’ve also installed composer and made sure each of the packages were installed.

I’m having the same issue. I’m running this locally using Apache/2.4.39 (Win32) PHP/7.2.22 with the intention of migrating to IIS 7.5.

Is there any resolution to this? I’m also seeing a similar problem on GitHub under the Golang samples without any responses Not sure if this is a fastroute problem? Any help here is appreciated.

Hi @m88

Do you have mod_rewrite enabled on your IIS server?

Hi @dragos,

Right now I’m using Uniform Server running locally on my pc, but yes, mod_rewite is enabled.