Jump to content

Recommended Posts

Quote

Warning: Undefined variable $target_file in /homepages/27/d944683530/htdocs/admin_api.php on line 84

Warning: Cannot modify header information - headers already sent by (output started at /homepages/27/d944683530/htdocs/session.php:12) in /homepages/27/d944683530/htdocs/admin_api.php on line 98

Warning: Undefined array key "add-task" in /homepages/27/d944683530/htdocs/admin_api.php on line 660

Warning: Undefined array key "invites" in /homepages/27/d944683530/htdocs/admin_api.php on line 663

Warning: Undefined array key "points" in /homepages/27/d944683530/htdocs/admin_api.php on line 664

Warning: Cannot modify header information - headers already sent by (output started at /homepages/27/d944683530/htdocs/session.php:12) in /homepages/27/d944683530/htdocs/admin_api.php on line 668

Warning: Undefined array key "r_item" in /homepages/27/d944683530/htdocs/admin_api.php on line 678

Warning: Undefined array key "game_name" in /homepages/27/d944683530/htdocs/admin_api.php on line 770

Warning: Undefined array key "a_title" in /homepages/27/d944683530/htdocs/admin_api.php on line 804

Warning: Undefined array key "afbads" in /homepages/27/d944683530/htdocs/admin_api.php on line 843

Warning: Undefined array key "user_b" in /homepages/27/d944683530/htdocs/admin_api.php on line 859

when i put your "login" file, nothing happen. i read it carefully but still.

So when i change php verison to 8.0 the script if full of errors.... how to solve them... loook

When you put your login file.....   Does that mean you used the one EXACTLY as I gave it to you?  You didnt' get any echo'ed messages indicating how far it ran?  Impossible.

All of those error messages are telling you a line number that has the error on it.  Look at one and try to figure out what is wrong with that line.  Looks like an undefined array or array element to me.  And that means something is not being shown to you as an error which is causing all of these errors.

Add these 2 lines after the session_start line in the code I gave you for login.php

error_reporting(E_ALL);
ini_set('display_errors', '1');
 

Edited by ginerjm

@HawkeNN I want to clarify some things for you.  Most code that was written for PHP 7.x will still run fine under php 8.  For the most part PHP 8 added new features.  There are "Breaking Changes" that were made, listed here:  https://www.php.net/manual/en/migration80.incompatible.php  but it is unlikely that is the problem with your code from some of the errors I saw listed.

For example, the "headers already sent" error is a common one and has been around since php 3 at least.  It has to do with code that sends output to the browser (as in the case of a script that intermixes HTML and php) and then tries to set HTTP header values.  At that point, the HTTP request has already been sent with whatever headers it had, and it's too late to add or modify them.  PHP session use is one function that sets header values because it sets a cookie.  Some of the advice that you got is related to common techniques for trying to solve the issue.

Equally important is your hosting configuration for PHP.  Changes to the configuration of PHP from a version upgrade, can turn on settings that might have been off previously, or warnings being emitted that weren't before.  This can then trigger output which also causes the "headers already sent" message.  I suspect that this is part of your problem here, and really requires some debugging of your hosting setup.  This was already brought up to you, in that there will be a php.ini (and often other assorted xyz.ini files that are included by the main php.ini) where settings can be made or changed to re-configure php.

In conclusion, this is a PHP developer forum.  From looking at this thread, you aren't likely to have a good outcome here, because you aren't a php developer.  My sincere advice is to just find yourself a developer (this forum is chock full of them) you can pay a fee to, in order to resolve your issues and get your site working again.  We have established that the code is bad, and that there is likely a few different things going on that are somewhere between the configuration of your server to possible improvements to the code you have.  In other words, this is a problem for an experienced developer that requires debugging.  I probably shouldn't say this, but my knee jerk reaction is that getting your code to work is not that big of a job, but looking at a thread like this is frustrating to read, because in my experience it is not going anywhere.  There isn't any long term value to it for our forum, and you are not going to become an active member of the forum, nor learn PHP development, so there is nothing in it for us, or the community at large.

  • Great Answer 3
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.