Jump to content


Photo

PHP script - login issue


  • Please log in to reply
8 replies to this topic

#1 rben75

rben75

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 04 February 2013 - 11:47 PM

Hi,

I am trying to use the code from a freeware application found here.

I managed to install it, the database tables are correctly inserted and i can see the demo content.

Now it seems it has an issue with the login. when i try to login, i see a "die?" error in my browser. searching the web, i found some comments saying that it could be a compatibility issue between php4 and 5. on my website i am running php5.

i tried to look into the code, but being no expert or programmer, i am wondering if i could be pointed in the right direction. what do i need to change in the code to make it work. i think the only issue is the login. I also tried to change the password in mysql to "old password", but it made no difference.

i am attaching the index.php and config files, as well as the admin login form.

Finally, just one comment on why i am coming here for help. the support of this website seems to be stopped. I sent many emails as did other users, but it seems the project is dead as nobody replied to anyone...


thank for any advise.

Attached Files



#2 PFMaBiSmAd

PFMaBiSmAd

    Advanced Member

  • Staff Alumni
  • 16,767 posts
  • LocationColorado, U.S.A.

Posted 05 February 2013 - 05:03 AM

It would help if you posted the exact error/output you are getting along with what the URL in your browser's address bar is (if you don't way to post your actual domain name, xxxxxxx that part out, but don't change any of the other information in the URL.)
Signature: (not a comment about anything you posted unless specifically indicated)
Debugging step #1: To get past the garbage-out equals garbage-in stage in your code, you must check that the inputs to your code are what you expect.

Programming is just problem solving, but it is done in another language. You must learn enough of the programming language you are using to be able to read and write code.

#3 rben75

rben75

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 05 February 2013 - 07:54 AM

the thing is i do not get any error apart from this die? thing at the bottom of the browser. when i enter my credentials it comes back to the login page and that's it.

the url i use is mydomain/index.php

#4 PFMaBiSmAd

PFMaBiSmAd

    Advanced Member

  • Staff Alumni
  • 16,767 posts
  • LocationColorado, U.S.A.

Posted 05 February 2013 - 08:12 AM

The "die?" message looks like it is left over from some debugging.

Sadly, the minimal sites like the one where you found that script at are solely for the purpose of earning money based on visitors.

Knowing that the login form is redisplayed after you have entered your credentials, does at least point toward some likely causes. If I have time, I will look at the login form and the login processing code (in the pb_events.php file) to see what might prevent a successful login.
Signature: (not a comment about anything you posted unless specifically indicated)
Debugging step #1: To get past the garbage-out equals garbage-in stage in your code, you must check that the inputs to your code are what you expect.

Programming is just problem solving, but it is done in another language. You must learn enough of the programming language you are using to be able to read and write code.

#5 PFMaBiSmAd

PFMaBiSmAd

    Advanced Member

  • Staff Alumni
  • 16,767 posts
  • LocationColorado, U.S.A.

Posted 05 February 2013 - 08:14 AM

Are you trying to login with a username of admin with a password of test?
Signature: (not a comment about anything you posted unless specifically indicated)
Debugging step #1: To get past the garbage-out equals garbage-in stage in your code, you must check that the inputs to your code are what you expect.

Programming is just problem solving, but it is done in another language. You must learn enough of the programming language you are using to be able to read and write code.

#6 rben75

rben75

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 05 February 2013 - 08:37 AM

I tried first with the 2 logins provided in the sql file.

Admin and test and the user test too.

Then I went to the mysql table users, and tried to apply old password to test to encode it....

No difference.

#7 PFMaBiSmAd

PFMaBiSmAd

    Advanced Member

  • Staff Alumni
  • 16,767 posts
  • LocationColorado, U.S.A.

Posted 05 February 2013 - 08:46 AM

Anything you have found concerning old mysql passwords has nothing todo with the application's login. If the sample data is being displayed, that means that your database connection is working.
Signature: (not a comment about anything you posted unless specifically indicated)
Debugging step #1: To get past the garbage-out equals garbage-in stage in your code, you must check that the inputs to your code are what you expect.

Programming is just problem solving, but it is done in another language. You must learn enough of the programming language you are using to be able to read and write code.

#8 PFMaBiSmAd

PFMaBiSmAd

    Advanced Member

  • Staff Alumni
  • 16,767 posts
  • LocationColorado, U.S.A.

Posted 05 February 2013 - 12:29 PM

I tried that script to see what it would do. There are numerous php detected errors when it runs and it won't run at all, as is, under php5.4 (call-time pass by reference has been eliminated and results in a fatal error.)

There's an error_reporting(0); statement in the lib/site.php file that is hiding all runtime errors you are likely getting on your server. You should comment out that line and see if you get any useful error information. Please don't post a bunch of error messages here and expect to get someone to tell you what to do to fix each one. If finding and fixing what is causing each error is beyond your php skills, hire someone or use a different script.

However, based on what I saw in the code, you should not waste your time. The code is amateurish, has no validation, and would be a hackers dream come true if used on a live site.

Edited by PFMaBiSmAd, 05 February 2013 - 12:33 PM.

Signature: (not a comment about anything you posted unless specifically indicated)
Debugging step #1: To get past the garbage-out equals garbage-in stage in your code, you must check that the inputs to your code are what you expect.

Programming is just problem solving, but it is done in another language. You must learn enough of the programming language you are using to be able to read and write code.

#9 rben75

rben75

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 05 February 2013 - 11:30 PM

ok since you are the experts, i will follow your advise. thank you for the time spent on this. i appreciate. cheers. Ben




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com