Error with database

xgcell

Member
any ideas why everytime a member joins, they cannot log back into their account. password is wrong it says. and if i try to edit anything from admin panel i get this:

Fatal error
: Database error in "/homepages/30/d501646963/htdocs/extremeprivateservers/sources/admin/edit.php" on line 432

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 '://extremeprivateservers.com/banners/premium_admin.jpg, email = 'micaholson1212@' at line 1 in/homepages/30/d501646963/htdocs/extremeprivateservers/sources/sql/mysql.php on line 89
 

Mark

Administrator
Staff member
looks like you have modified sources/admin/edit.php

put it back from fresh VisioList download.
 

Mark

Administrator
Staff member
this is localized to your list, its interesting that your banner URL is cut off in the error messgae:

near '://extremepri


this really should probably read something like: near 'http://extremepri
 

xgcell

Member
this is interesting. For some reason the sites I add to it wont work, but I can edit other members. Any ideas? Can someone please make a listing on it so I can double check please? http://extremeprivateservers.com/

UPDATE: alright for some reason when i manually add premium to my account and upload a banner, it freaks it out. Not sure why but when i go into database and remove premium banner from listing, it fixes the problem. Any ideas why this happens?
 
Last edited:

Basti

Administrator
Staff member
Which VL version are you using? I remember there was some issue before 1.3

It could be related. The issue is that your banner not get quotes around the value in the query
'://extremeprivateservers.com/banners/premium_admin.jpg,
Right before the comma should be a '

Please send here as zip
sources/admin/edit.php
sources/misc/classes.php

I assume there is an issue in classes.php, normally it should surround the value if there is one, and if prem banner is blank, it should be NULL ( where quotes are not allowed )
 

xgcell

Member
Using version 1.3 that I patched from 1.2 a while back. Attached is the files you requested. Thanks for your time.
 

Attachments

Basti

Administrator
Staff member
in classes.php please find
Code:
    // If not set Premium Banner, set to null, so it doesnt copy normal banner over
    if (!preg_match('/^https?:\/\/.+/', $TMPL['premium_banner_url'])) {
      $TMPL['premium_banner_url'] = 'NULL';
    }
replace that with
Code:
    // If not set Premium Banner, set to null, so it doesnt copy normal banner over
    if (!isset($TMPL['premium_banner_url']) || !preg_match('/^https?:\/\/.+/', $TMPL['premium_banner_url'])) {
      $TMPL['premium_banner_url'] = 'NULL';
    }
That is an edit from 1.4, but not sure if it fixes your issue.
If not please pm me with ftp and admin login, as i would need to reproduce the issue on your end to see exactly what happens in the background
 

Basti

Administrator
Staff member
Also what are the exact steps to reproduce this?

1) you edit a member
-> you make him premium
-> you add a image path into premium banner field
-> save data

OR

2) you edit a member
-> you make him premium
-> save data
-> you upload a prem banner through user control panel
-> you go back to edit member and have issues
 

xgcell

Member
Fix didn't work.
So if a premium member uploads banner, it throws that error if i do anything but remove the premium banner from admin panel. Once i remove that banner, account goes back to normal.
I will send you ftp and admin
 

Basti

Administrator
Staff member
Ok to start off
any ideas why everytime a member joins, they cannot log back into their account. password is wrong it says
This i could not reproduce, login worked just fine whether im premium or not or whether i have banner uploaded or not.

As for the error when you edit an member if he has a premium banner
check with your host to enable "allow_url_fopen" in the php.ini file. Things fail because that is a function which is required to check the dimensions of members banners ( when banner url is no upload but a actual link ), and because it is not enabled, the proper checks and the missing quotes in the query are not applied
 
Top