News:

Wondering if this will always be free?  See why free is better.

Main Menu

"Call to undefined function mysql_fetch_assoc()" Error

Started by addaam, October 19, 2018, 02:22:40 AM

Previous topic - Next topic

addaam

Hello there.
I am entering the Forum Profile.
For example, I enter and record the date of birth.
This gives the error and does not record.
I wonder why?

If I do the save without any action, it gives this error again.

Please give me a solution.

Site: www.genelyorum.com
Image:

Arantor

So you have a modification that is out of date and doesn't follow SMF 2.0 coding... somewhere in the profile. We need more details to help you...

addaam

Quote from: Arantor on October 19, 2018, 02:31:01 AM
So you have a modification that is out of date and doesn't follow SMF 2.0 coding... somewhere in the profile. We need more details to help you...
This is a default theme.
I started editing from 2.0.11.
I've always done manual setup.
What kind of information can I give?

Arantor


addaam

This is a trial site.
I set it up yesterday.
I saw this error.

With private message:
I can give you Cpanel entries.
I can give manager information in the forum.

Kindred

if this is a new installation, why are you using SMF 2.0.11?

What mods do you have installed?


update to 2.0.15 first, though
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

If this is a trial site on 2.0.11, it has an error that shouldn't be possible on an unmodified 2.0.11...

addaam


Kindred

if this is a new installation, then delete it.

Install 2.0.15 directly
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

addaam

Quote from: Kindred on October 19, 2018, 03:42:18 AM
if this is a new installation, then delete it.

Install 2.0.15 directly

There's a lot of effort.
I can't erase everything,
I can't start from scratch.

https://genelyorum.com
testmember
111111

Shambles

What version of PHP are you running?

mysql_fetch_assoc (among other mysql_ functions) was deprecated in PHP 5.5 and removed in PHP 7

Kindred

Well, you did say that it was a new installation...      I still have no idea why you started by installing 2.0.11 and then patched.  If you were making a new installation, why would you not use 2.0.15 right from the start.

However... OK...  in that case, please answer Arantor's question.

WHat mods have you installed?

I'll also note that I think your language files are out of date, since they have a 2013 copyright and should be 2017.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Also please do not randomly PM me, ever, expecting me to fix your problems for you. I help in public where others can learn from it, not in private where it is an imposition on my time.

Also, do not just PM people the admin credentials to your site, because they might be less trustworthy than me... I just deleted the PM and the email notification. Others might have used it to just take over your site.

addaam

Quote from: Sh@mbles on October 19, 2018, 05:40:29 AM
What version of PHP are you running?

mysql_fetch_assoc (among other mysql_ functions) was deprecated in PHP 5.5 and removed in PHP 7

Version Information:
Forum version: SMF 2.0.15 (more detailed)
Current SMF version: SMF 2.0.15
GD version: bundled (2.1.0 compatible)
Database Server: MySQL
MySQL version: 5.6.41-cll-lve
PHP: 7.0.32
Server version: LiteSpeed

Shambles

Quote from: addaam
PHP: 7.0.32

Quote
mysql_fetch_assoc (among other mysql_ functions) was deprecated in PHP 5.5 and removed in PHP 7


Quote from: Kindred on October 19, 2018, 05:47:20 AM
WHat mods have you installed?

addaam

I solved the problems.
There is no case related to the database.
It is completely related to the files in the SOURCES folder.

addaam


vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

addaam

Quote from: vbgamer45 on October 20, 2018, 10:36:21 AM
How did you solve?
Thank you for asking.

When I register the Forum profile from the profile page,

"Call to undefined function mysql_fetch_assoc()" error.

When I delete the following code from the Subs-Post.php file, the error is gone.

while ($row = mysql_fetch_assoc($request))

He gave me that error again.

"Call to undefined function mysql_free_result()"

When I delete the following code from the Subs-Post.php file, the errors are completely gone.

mysql_free_result($request);

--------------------------------------------------

Later ...

I have installed Profile Moderator Management mode.
When entering the profile of this mode, it gave the following error.

"Call to undefined function mysql_free_result()"

When I delete the following code from the Profile-Modify.php file, the error is gone.

mysql_free_result($request);

--------------------------------------------------

Later ...

Clicking on the "New Message" link from the menu of the messages gave the following error.

"Call to undefined function mysql_fetch_assoc()"

When I delete the following code from the PersonalMessage.php file, the error is gone.

while ($row = mysql_fetch_assoc($request))

He gave me that error again.

"Call to undefined function mysql_free_result()"

When I delete the following code from the PersonalMessage.php file, the errors are completely gone.

mysql_free_result($request);

--------------------------------------------------

Later ...

I wanted to open a "New topic" to any partition and gave the following error.

"Call to undefined function mysql_fetch_assoc()"

When I delete the following code from the Post.php file, the error is gone.

while ($row = mysql_fetch_assoc($request))

He gave me that error again.

"Call to undefined function mysql_free_result()"

When I delete the following code from the Post.php file, the errors are completely gone.

mysql_free_result($request);

--------------------------------------------------

Later ...

I have the mode of hiding the subject content.
When he clicked on the sheet, he gave the following error.

"Call to undefined function mysql_free_result()"

When I delete the following code from the HtsAdmin.php file, the error is gone.

mysql_free_result($request);

Thank you for your attention.

Arantor

Ah so you didn't actually solve it, you just took away the lines that did any work... good job.

Shambles

Magnificent sleuthing & corrective activity.

I've learned something here: if sections of code cause problems, simply remove them. Awesome.

Arantor

To be fair, removing the code *will* prevent such errors. But it will have interesting side consequences like not doing whatever it was supposed to be doing.

shawnb61

That approach simply will not work.  You are going to keep finding calls that don't work.  It will never stop.

There is something in your code that is not ready for php7. 

As noted earlier, it is probably an outdated mod.

I suggest starting over.  A fresh 2.0.15 install,  followed by installing your mods one at a time, testing after each.  That will help identify the problem mod.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Shambles

If it were an SMF approved mod, is it likely to have direct function calls to the mysql_ library, or would that have been spotted and not approved?

Without his list of mods I guess we'll never find out.

addaam

I solved it :)
The way I solved this came to my mind :)

The codes I removed belong to the modes I installed.

hawnb61
You say right. I've opened a Wordpress blog right now. I can't deal with too many smf. I'm an officer. Maybe I'il start from scratch. Frankly, I don't know.

Sh@mbles
You're pretty good at it. Use your mind in time, is more important than being smart.

Arantor
The system is now running smoothly. 0 error

I dont know English. Take care of me. Thanks Google Translate. I love you all :)

I made tea
Let's have a cup of tea :)

Arantor

I'm quite impressed, you apparently know more about SMF and PHP than multiple people who literally helped build SMF. You also apparently know more about programming than people with... what... 30 years combined experience?

However, I think I'll stick to my method of solving problems which isn't to just blindly hack out bits of code that I don't understand what they do, but instead replace them with the correct ones. But maybe I'm just old fashioned and don't know anything and should probably return my Zend Certified Engineer certificate and quit my job as a Senior Software Engineer, because clearly you know how modern software is built...


@ Shambles, yes, it's entirely possible to have approved mods that do that if they're old enough; a lot of SMF 1.1.x mods were not properly ported to 2.0 but because they still worked mostly by accident (and that mysql_fetch_assoc and $smcFunc['db_fetch_assoc'] prior to 2.0.14 would work off the last active connection which would notionally be the same one, ditto for mysql_free_result and $smcFunc['db_free_result']) they were largely left alone, even if they need work.

addaam

Thank you for your comment.

Yes, I have a lot of coding information. I'm not proud of that.

With this information, I did not come to a place in Turkey. I had to read and be a civil servant. In our country, there is little support for entrepreneurship.

Information multiplies as you share. Thanks for everything.

Kindred

Addaam....


I think you have missed the point of the previous statements.
Let me make it clear for you, so you can use google translate to figure it out.

1- WHAT YOU DID WAS INCORRECT.
2- What you did was the wrong way to fix the problem.
3- Although you no longer see the error message, what you did will probably break things in your forum. Your system is NOT "running smoothly".
4- You ignored the advice of 3 people who KNOW the system and the coding.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

addaam

Kindreeeedddd.........

The codes I removed belong to the modes I installed.

:D

Illori

then you broke the mods and they will not function correctly.

addaam

He's working super right now.

If it doesn't work as you say, I'll start from scratch.

GigaWatt

Quote from: Arantor on October 20, 2018, 12:53:04 PM
Ah so you didn't actually solve it, you just took away the lines that did any work... good job.

LOL :D
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Advertisement: