Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

updateuser.php error when editing users

Asked Modified Viewed 4,912 times
M
mojkan
M
mojkan 10
  • Member, joined since
  • Contributed 129 posts on the community forums.
  • Started 32 threads in the forums
  • Started this discussions
asked
Member

Hi again :)

When I as a superadministrator use user administration I get the following error when deleting their existing avatars:

Warning: unlink(../images/avatars/viggoavatar[1].jpg) [function.unlink]: No such file or directory in /customers/clan-smaka.se/clan-smaka.se/httpd.www/administration/updateuser.php on line 122
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'user_avatar='', , user_location='Dalby, Skåne', user_birthdate='1973-4-16', memb' at line 1


The weird thing is that the image gets removed from the image/avatars folder, but in the database the image-name still exists for the user.

I'm using an un-modded updateuser.php in administration folder.
The code lines that the error refers to look like this:
if (isset($_POST['del_avatar'])) {
      $set_avatar = "user_avatar='', ";
      unlink(IMAGES."avatars/".$user_data['user_avatar']);
   }


Anyone?
0 replies

9 posts

G
googlebot
G
Visit the new home of the merge between Hacking Vs. Security and Security Override!
My copyright removal has been switched over from HvS to SecurityOverride.
  • Senior Member, joined since
  • Contributed 638 posts on the community forums.
  • Started 28 threads in the forums
answered
Senior Member

Download a fresh package of PHPFusion, and the reupload that file.
0 replies
M
mojkan
M
mojkan 10
  • Member, joined since
  • Contributed 129 posts on the community forums.
  • Started 32 threads in the forums
  • Started this discussions
answered
Member

Quote

googlebot wrote:
Download a fresh package of PHPFusion, and the reupload that file.


Did that immediately since I had made some changes to enable that you can use a password including the letters ÅÄÖ. So the updateuser.php that I use now is from a fresh package.

What I have to do now is delete it normally from editing users profile. Then I have to go into database and delete the image-name from users_avatars field. Then it works fine.

Evidentally it seems as if when deleting from user administration, the link to the image-name doesn't get deleted from the database.

I have done another mod, that I got from phpfusion-freak.dk. But that shouldn't make any troubles in this matter I guess:

Find line:
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."' /><br /><br />\n";


Add below it:
} else {
echo "<img src='".IMAGES."avatars/noav.gif' alt='".$locale['567']."' /><br /><br />\n";


All that code does is checking if avatar is empty, if that's the case it should show the noav.gif image. This is changed in viewthread.
Edited by mojkan on 23-08-2008 09:37,
0 replies
M
mojkan
M
mojkan 10
  • Member, joined since
  • Contributed 129 posts on the community forums.
  • Started 32 threads in the forums
  • Started this discussions
answered
Member

I just made a clean installation of php-fusion core 7.

Added 2 members except from myself. Went in to each member and added an avatar through edit profile.

Logged on as superadministrator and tried to remove their avatars through user administration.

Same error:
Warning: unlink(../images/avatars/ztollaavatar[2].jpg) [function.unlink]: No such file or directory in /customers/clan-smaka.se/clan-smaka.se/httpd.www/v7/administration/updateuser.php on line 122
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'user_avatar='', , user_location='', user_birthdate='0000-00-00', user_aim='', us' at line 1


I guess this is something for the dev team to dig into :)
0 replies
— 1 month later —
M
MadMan24
M
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
answered
Newbie

Same thing happens to me, was anything found to fix this?

Warning: unlink(../images/avatars/pic.jpg) [function.unlink]: No such file or directory in /home/scoperea/public_html/TheCrypt/administration/updateuser.php on line 122
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'user_avatar='', , user_location='', user_birthdate='1931-4-15', user_aim='', use' at line 1



This is what i have at line 122:

unlink(IMAGES."avatars/".$user_data['user_avatar']);
Edited by MadMan24 on 06-10-2008 03:20,
0 replies
B
brotherbox
B
  • Junior Member, joined since
  • Contributed 14 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

Yeah I'm also have same problems
0 replies
T
tes
T
tes 10
  • Junior Member, joined since
  • Contributed 16 posts on the community forums.
  • Started 7 threads in the forums
answered
Junior Member

Me too
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
answered
Veteran Member

I have the same problem too.

New fresh installation = same problem.

Any solution on this problem yet ?
0 replies
H
HobbyMan
H
Just some Guy
  • Veteran Member, joined since
  • Contributed 1,486 posts on the community forums.
  • Started 91 threads in the forums
answered
Veteran Member

This was reported to the bugtracker: http://www.php-fusion.co.uk/infusions...item_id=57
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
answered
Veteran Member

Ahh I see - thank you very much.
0 replies

Category Forum

User Administration - 8

Labels

None yet

Statistics

  • Views 0 views
  • Posts 9 posts
  • Votes 0 votes
  • Topic users 7 members

7 participants

S
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
H
H
Just some Guy
  • Veteran Member, joined since
  • Contributed 1,486 posts on the community forums.
  • Started 91 threads in the forums
T
T
tes 10
  • Junior Member, joined since
  • Contributed 16 posts on the community forums.
  • Started 7 threads in the forums
M
M
mojkan 10
  • Member, joined since
  • Contributed 129 posts on the community forums.
  • Started 32 threads in the forums
  • Started this discussions
G
G
Visit the new home of the merge between Hacking Vs. Security and Security Override!
My copyright removal has been switched over from HvS to SecurityOverride.
  • Senior Member, joined since
  • Contributed 638 posts on the community forums.
  • Started 28 threads in the forums
B
B
  • Junior Member, joined since
  • Contributed 14 posts on the community forums.
  • Started 4 threads in the forums
M
M
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet