Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOF error #4

Closed
mxride opened this issue Sep 26, 2016 · 14 comments
Closed

EOF error #4

mxride opened this issue Sep 26, 2016 · 14 comments
Assignees

Comments

@mxride
Copy link

mxride commented Sep 26, 2016

Good Day. Thanks for sharing the code.
I have an issue and receiving

An uncaught Exception was encountered

Type: ParseError

Message: syntax error, unexpected end of file

Filename: /home/mklein/webrootpartner.com/www/application/controllers/Login.php

Line Number: 245

Backtrace:

File: /home/mklein/webrootpartner.com/www/index.php
Line: 315
Function: require_once

Any help is greatly appreciated

@mxride
Copy link
Author

mxride commented Sep 26, 2016

This is the frst time install, I dont see it creating the DB and tables when I visit login/manage_permissions

@portapipe
Copy link
Owner

Hi.
Did you changed something in the Login.php controller?
If you changed it check your changes. EOF is like you forgot a semicolon or a bracket.
If there are errors the link to create the table needed is not shown.

@mxride
Copy link
Author

mxride commented Sep 27, 2016

Thank you for the responds.
I didnt change anything in the Login.php controller.
It looks I even grabbed the latest Login.php controller file from github.
I'll look through it now to see if I see anything with the syntax.

Mark

On Tue, Sep 27, 2016 at 1:58 AM, portapipe notifications@github.com wrote:

Hi.
Did you changed something in the Login.php controller?
If you changed it check your changes. EOF is like you forgot a semicolon
or a bracket.
If there are errors the link to create the table needed is not shown.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#4 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAvFqOlrsldK2tUv5-AyfIOwIbtY7dsvks5quLB-gaJpZM4KG-8o
.

Sent from Android....

@mxride
Copy link
Author

mxride commented Sep 27, 2016

So loading my URL
http://www.webrootpartner.com (this is an internal domain)
It redirects to
http://www.webrootpartner.com/main/login/

I receive the login screen
[image: Inline image 1]
I try to log in with usr = admin and pwd = admin
and redirect to
http://www.webrootpartner.com/login/makeLogin
which displays the error
An uncaught Exception was encountered

Type: ParseError

Message: syntax error, unexpected end of file

Filename: /home/mklein/
webrootpartner.com/www/application/controllers/Login.php

Line Number: 245

Backtrace:

File: /home/mklein/webrootpartner.com/www/index.php
Line: 315
Function: require_once

On Tue, Sep 27, 2016 at 1:58 AM, portapipe notifications@github.com wrote:

Hi.
Did you changed something in the Login.php controller?
If you changed it check your changes. EOF is like you forgot a semicolon
or a bracket.
If there are errors the link to create the table needed is not shown.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#4 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAvFqOlrsldK2tUv5-AyfIOwIbtY7dsvks5quLB-gaJpZM4KG-8o
.

Sent from Android....

@mxride
Copy link
Author

mxride commented Sep 27, 2016

Sorry for the questions.
should the default controller be login?
$route['default_controller'] = 'login';

Thanks in advance
Mark

On Tue, Sep 27, 2016 at 1:58 AM, portapipe notifications@github.com wrote:

Hi.
Did you changed something in the Login.php controller?
If you changed it check your changes. EOF is like you forgot a semicolon
or a bracket.
If there are errors the link to create the table needed is not shown.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#4 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAvFqOlrsldK2tUv5-AyfIOwIbtY7dsvks5quLB-gaJpZM4KG-8o
.

Sent from Android....

@mxride
Copy link
Author

mxride commented Sep 27, 2016

I found the issue. It appears to be white space in the login.php Controller
I cleaned the file and it worked. I have attached the clean copy here

Thanks again
Mark

On Tue, Sep 27, 2016 at 1:58 AM, portapipe notifications@github.com wrote:

Hi.
Did you changed something in the Login.php controller?
If you changed it check your changes. EOF is like you forgot a semicolon
or a bracket.
If there are errors the link to create the table needed is not shown.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#4 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAvFqOlrsldK2tUv5-AyfIOwIbtY7dsvks5quLB-gaJpZM4KG-8o
.

Sent from Android....

@portapipe
Copy link
Owner

Good to hear that!
Of course you can let the login controller to be the default route. If the user is logged will be redirected to the page you specify in the Login.php controller (on the top).

I can close this 😄

@portapipe portapipe self-assigned this Sep 27, 2016
@mxride
Copy link
Author

mxride commented Sep 27, 2016

So I I have the everything working. However when I tested if I could load
the grocery_grud by going to the url direct, it bypassed the login and
displayed the table data.
I see you mentioned this function (below) where do I place that to redirect
to login page if not logged in? Thanks in advance

if($this->login_model->isLogged()){ $name =
$this->login_model->name(); echo "HI $name! You are Logged
IN!";}else{ redirect("/login");}

On Tue, Sep 27, 2016 at 11:09 AM, portapipe notifications@github.com
wrote:

Good to hear that!
Of course you can let the login controller to be the default route. If the
user is logged will be redirected to the page you specify in the Login.php
controller (on the top).

I can close this 😄


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#4 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAvFqEF1vcv48MftxmOsoU9cBXdfgJEBks5quTGogaJpZM4KG-8o
.

Sent from Android....

@portapipe
Copy link
Owner

To make it work as page protection follow this wiki page 😃
If you have a constructor put that there, if you don't just add it to every function, as you wish.

@jknigga
Copy link
Contributor

jknigga commented Aug 10, 2017

I am getting the same EOF error.

@portapipe
Copy link
Owner

I need some more information. Can you gist or pastebin your code?

@portapipe portapipe reopened this Aug 10, 2017
@jknigga
Copy link
Contributor

jknigga commented Aug 11, 2017

Fresh install of codeignitor and grocerycrud. I copied your files over (without any editing) and I get this error:

A PHP Error was encountered
Severity: Parsing Error
Message: syntax error, unexpected end of file
Filename: controllers/Login.php
Line Number: 246

@jknigga
Copy link
Contributor

jknigga commented Aug 11, 2017

Alright found the issue. It was a short tag. I made a pull request to fix it: #10

@portapipe
Copy link
Owner

Good, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants