OneAuth Blank Callback - php

I'm using Laravel and OneAuth to build a web application. The user can sign in with his/her Twitter or GitHub account.
This actually works perfectly on my local dev server (with the exception of GitHub because the callback URLs don't match localhost), but when I've uploaded it to production, I get a blank page (/connect/callback/twitter).
Anyone else experienced this with OneAuth?
There are no errors in the error log, and the page has a 200 status code.
Local server:
Mac OS X 10.8
MAMP
PHP 5.4
Production:
CentOS 5
Apache + PHP 5.3

Yeah i had this problem and the work around for this is to manually register your controller instead of doing ,
Route::controller(Controller::detect());
Do this,
Route::controller('connect');
FYI: If you are using nested controller the order in which you register matters.

Related

Getting 404 error when trying to access Laravel app using laravel artisan command on some apps

I have two APIs A & B, A is my core app and they both communicate on a DB level.
Both run on Ubuntu 22.04, firewall is disable.
When I run php artisan on the API A, I can access it from the web browser and it successfuly display Laravel welcome page using this URL & prot 127.0.0.1:5000 and same with postman.
But when I run the same command after stopping the server on API B, I get the following
{"error":"The specified URL cannot be found","code":404}
And in postman the request always hang when try log into the API.
I really don't know what is going on, I was expecting a 500 error but not 404.
Both APIs work on the live server, the issue happen on my local machine.
Note that API A is compatible with both php7.4 & php8.1, API B has php8 synthax so I running both using php8.1 and I setting php version using Laravel valet with nginx.
Also note that when I try to login with postman after running
php artisan serve --port=5000 // API A
Then
php artisan server --port=5001 // API B
I can login with API A, but But the server hang with API B
When I stopped it, and try to run it again API B command, it says port already in use
I try switching port, still getting the same 404 error on API B, I espect it to display Laravel welcome page as with the API A.

AWS Cloud9 PHP Web Server Form POST Error - Undefined Index

I have created a Cloud9 Environment on my Amazon Linux 2 EC2 Server used for a PHP development website, which also has Apache (httpd) installed for the live version of the website both currently use the exact same files and code.
On my Cloud9 Environment I am receiving an undefined index error when trying to access POST data from a form however on the live website the form works as expected with no errors and I can access the POST data from the form.
I'm unsure of what could be causing the issue, as far as I'm aware these environments will the same /etc/php.ini file configuration.
These are the versions installed on my EC2 server.
PHP 5.4.16
Apache 2.4.46
On the Cloud9 environment - I can see that the POST request was successful and that the POST variables have been returned in developer tools under the network tab, but I still receive the error on the page and cannot access the variables.
POST SUCCESSFUL
Is there any reason why the Cloud9 php web server environment would not allow these $_POST variables to be accessed?
Any help or suggestions are massively appreciated, I have been scratching my head at this for hours on end.
Also let me know if you would like me to post the code of the form, however it is just a basic form with one input field which obviously works on the live environment without any issues.
Cheers,
Joab
The issue was resolved by uninstalling PHP 5.4.16 and installing PHP 7.4

Local vs Deployed Laravel Issue

I am having a weird problem with my Laravel 5.5 app deployed on IIS.
The App has been running for 6 months with no problem, with people adding data into it.
Since yesterday (No changes on Code Side) when the people try to save a form the app just hangs, no error what so ever, even if I put debug mode On.
Now for the weird(er) part, this doesn't happen on all forms and only happens when using the app "over the internet”, When I Remote into the Server and use the App “locally” then The app works Fine with No Problems.
I suspect its a php.ini problem but cant be sure
Thanks.

Http request refused on Windows environment but not on OSX (mac)

I am working on a React web app with npm for the first time. I'm done with the development and now putting the built package on the web server (bluehost).
All is working well on my Mac: the web app allows getting data from mySQL via php, and posting back to the database.
But when I try the same app (on the same URL, same server, script, same everything...) on my Windows machine, I get an error on the first http request used for authentication.
OPTION http://example.com/script.php net::ERR_CONNECTION_REFUSED
First I thought this was a browser issue.
But I don't get the error on Chrome on my mac but do on Chrome on my Windows, as well as FireFox.
Again, I do not get this error when I test the app on my mac.
Could anybody please give me some direction to solve this?
Thank you!

IIS not working with Windows 10

I can retreive a simple web page but not php scripts. I get the following message when trying to run a php script.
"there was a problem retreiving the XML Data. Unauthorized (401). However, I have set all of the permissions in inetpub folder to allow access. It's IIS after installing Windows 10 without any mods.
Any ideas what the problem might be?
By trial and error, I found that I needed to go into IIS Default Web Page and click authorization. I then needed to enable Windows authorization.
I can now use localhost for testing web content.

Categories