Session in working fine in localhost but not at server - php

Session in working fine in localhost but not at server. I am getting the error"This page isn’t working domain.com is currently unable to handle this request.
HTTP ERROR 500"

I think your config file have some error
host name
username and password check

Related

Can't run PHP website with Laragon because of "This site can’t provide a secure connection localhost sent an invalid response." error

When I try to run a PHP website with Laragon I get This site can’t provide a secure connection localhost sent an invalid response. Try running Windows Network Diagnostics. ERR_SSL_PROTOCOL_ERROR
I already changed the hostname template within Laragon to {name}.local and {name}.mc but didn't worked.
What should I do? (Other PHP built websites are still working)
I right clicked on Apache in Laragon, turned SSL on and now it works.

Localhost refused to connect Xampp issue

i am trying to connect my site from others computers on local network. I can access the site from my system IP address but issue is this when i entered the username and password it will redirect the page from 192.168.0.2/ppp/login to localhost/ppp/auth/login and shows thee error localhost refused to connect.
localhost usually points to 127.0.0.1 . So, if you are getting redirected to localhost/login/ppp then the issue with your site's code. Don't redirect to http://localhost/login/ppp. Just do a redirect to /login/ppp instead.
The reason connection is refused is because the other PC doesn't have XAMPP (or any other web server) running on it.
your only need to change the config.php file in controllers. write your IP instead of localhost. Your code will run properly on network.

Coinbase OAuth works on localhost but not on live server

On my live server i'm getting a The redirect uri included is not valid. error message, whereas on my localhost OAuth works ok.
here's the full urls for both:
Localhost:
https://coinbase.com/oauth/authorize?response_type=code&client_id=xxx&redirect_uri=http%3A%2F%2Flocalhost%2Faccounts-coinbase%2Foauth&scope=balance+addresses+user+transactions
Live server (https://example.com)
https://coinbase.com/oauth/authorize?response_type=code&client_id=xxx&redirect_uri=https%3A%2F%2Fexample.com%2Faccounts-coinbase%2Foauth&scope=balance+addresses+user+transactions
I'm pretty confident I had the live server OAuth working before. Any ideas why it's failing now?
Ok I solved my own problem.
The error message, The redirect uri included is not valid. does NOT accurately reflect the issue at all. What was actually the problem is that my Coinbase OAuth app had a localhost redirect url.
The relevant OAuth redirect url, called a "callback url" is set from this rather hard to find page: https://coinbase.com/oauth/applications.
There I just switched localhost with example.com and it worked.

Codeigniter site login fails after uploading on server

I have used codeigniter and flexi_auth for my project. I setup everything on the localhost, and it works pretty well on localhost without any problem. But as soon as I uploaded the database and files on the live server, it won't log me in using admin#admin.com, and password "password123". I don't know it is happening. The same username and password works fine on localhost but fails on live server. It gives me this error message "Your submitted login details are incorrect." Any help will be much appreciated.

mysql_connect not working in a server over a VPN

My "mysql_pconnect() / connect()"` function doesn't work on a server over a VPN.
I used the VPN to access the server where in there I created a PHP website. When I run my website it's a blank page. I was wondering why it is a blank page, so I find the error, now the error is the database connection. but it's just the same with my localhost, and the website on my localhost is working. but when I transfer my website to the server it's not working. is there something to do with the VPN? My user and pass to connect to the mysql is correct.
main.php
error_reporting(E_ALL);
$settings_dir = "./settings";
require_once("$settings_dir/database2.php");
//etc etc codes..
database2.php
$conn=mysql_connect("localhost","root","passw0rd");
thats because you cant give the same arguments to mysql_pconnect() which you gave in case of your localhost.because where you hosted your website,there u will have diffrent server name ,DBname and DB password.
mysqli_connect(server,user,pwd,newlink,clientflag)
here the first argument is server which is the hostname,in case of local server its localhost but when you are using any remote server than u need to specify that server name.similarly username and password will be different for that server.
read here
http://www.w3schools.com/php/func_mysql_connect.asp

Categories