Error - I am killing myself for whole day

15-Sep-2015 11:37:40

Can you please help me to debug following errors? I am working on it whole day. If I try to connect via station.php - there are no errors trying to login with facebook, if i try to login via twitter I get error:

[Tue Sep 15 18:36:11.454334 2015] [:error] [pid 6736] [client 86.58.36.76:40978] PHP Parse error: syntax error, unexpected 'if' (T_IF) in /home/sh6866/domains/odvoz-vozil.si/public_html/test/auth/appconf.php on line 9, referer: http://odvoz-vozil.si/test/station.php

This is error, if I try to login via my custon login page, located at:

www.odvoz-vozil.si/test/login.php

[Tue Sep 15 16:26:15.857565 2015] [:error] [pid 4642] [client 86.58.36.76:45002] PHP Notice: A session had already been started - ignoring session_start() in /home/sh6866/domains/odvoz-vozil.si/public_html/test/auth/appconf.php on line 1, referer: http://odvoz-vozil.si/test/station.php

[Tue Sep 15 16:26:23.901175 2015] [:error] [pid 28171] [client 86.58.36.76:45005] PHP Notice: A session had already been started - ignoring session_start() in /home/sh6866/domains/odvoz-vozil.si/public_html/test/auth/appconf.php on line 1, referer: http://odvoz-vozil.si/test/station.php

[Tue Sep 15 16:26:24.615373 2015] [:error] [pid 28171] [client 86.58.36.76:45005] PHP Notice: Undefined index: oauth_token in /home/sh6866/domains/odvoz-vozil.si/public_html/test/auth/platforms/twitter-app/twitteroauth/twitteroauth.php on line 80, referer: http://odvoz-vozil.si/test/station.php

[Tue Sep 15 16:26:24.615452 2015] [:error] [pid 28171] [client 86.58.36.76:45005] PHP Notice: Undefined index: oauth_token_secret in /home/sh6866/domains/odvoz-vozil.si/public_html/test/auth/platforms/twitter-app/twitteroauth/twitteroauth.php on line 80, referer: http://odvoz-vozil.si/test/station.php

[Tue Sep 15 16:26:24.615492 2015] [:error] [pid 28171] [client 86.58.36.76:45005] PHP Notice: Undefined index: oauth_token in /home/sh6866/domains/odvoz-vozil.si/public_html/test/auth/platforms/twitter-app/twitter.php on line 73, referer: http://odvoz-vozil.si/test/station.php

[Tue Sep 15 16:26:24.615538 2015] [:error] [pid 28171] [client 86.58.36.76:45005] PHP Notice: Undefined index: oauth_token_secret in /home/sh6866/domains/odvoz-vozil.si/public_html/test/auth/platforms/twitter-app/twitter.php on line 74, referer: http://odvoz-vozil.si/test/station.php

[Tue Sep 15 16:39:50.480093 2015] [:error] [pid 28385] [client 86.58.36.76:38764] PHP Notice: A session had already been started - ignoring session_start() in /home/sh6866/domains/odvoz-vozil.si/public_html/test/auth/appconf.php on line 1, referer: http://odvoz-vozil.si/test/station.php

[Tue Sep 15 17:10:11.291044 2015] [:error] [pid 3895] [client 86.58.36.76:39666] PHP Parse error: syntax error, unexpected '$result' (T_VARIABLE) in /home/sh6866/domains/odvoz-vozil.si/public_html/test/login.php on line 80

[Tue Sep 15 17:10:15.220030 2015] [:error] [pid 12648] [client 86.58.36.76:39667] PHP Parse error: syntax error, unexpected '$result' (T_VARIABLE) in /home/sh6866/domains/odvoz-vozil.si/public_html/test/login.php on line 80

[Tue Sep 15 17:10:36.997159 2015] [:error] [pid 9210] [client 86.58.36.76:39676] PHP Notice: A session had already been started - ignoring session_start() in /home/sh6866/domains/odvoz-vozil.si/public_html/test/auth/appconf.php on line 1, referer: http://odvoz-vozil.si/test/index.php

[Tue Sep 15 18:31:25.252232 2015] [:error] [pid 2989] [client 86.58.36.76:40730] PHP Parse error: syntax error, unexpected 'if' (T_IF) in /home/sh6866/domains/odvoz-vozil.si/public_html/test/auth/appconf.php on line 9, referer: http://odvoz-vozil.si/test/login.php

[Tue Sep 15 18:32:00.738841 2015] [:error] [pid 8248] [client 86.58.36.76:40780] PHP Parse error: syntax error, unexpected 'if' (T_IF) in /home/sh6866/domains/odvoz-vozil.si/public_html/test/auth/appconf.php on line 9, referer: http://odvoz-vozil.si/test/login.php

15-Sep-2015 18:26:12

Hi,

It seems you got PHP parse errors, you should check your code where the errors appeared and fix it.

If you do not know how to fix PHP parse errors, you can try to search your "error message" on google or stackoverflow. Usually, you will get solutions for common errors.

Kind regards.

16-Sep-2015 11:03:24

Ok, I`ve fix all the problems. It works like charm. Thank you for your script!!

16-Sep-2015 11:46:02

Can I just ask you,... where is it specified the redirect? I am always redirected to /station.php

16-Sep-2015 11:54:16

Another thing... Where can I define which data will I get when someone authorizes my app?

17-Sep-2015 08:41:29

Hi,

If you want to redirect after login you can set on social network setting pages. In my source code, I use "header("Location..." to set redirect url.

User data you can get is based on social network APIs. Usually, you can get User ID, User full name and email (maybe). Because this scope varies among the APIs so I did not set it in the plugin. Please go to social network API documentations to find more about this information.

Kind regards.