Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Mysidia Adoptables Official Announcement (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=2)
-   -   Mysidia Adoptables v1.3.0[Security Release] (http://www.mysidiaadoptables.com/forum/showthread.php?t=3514)

Chibi_Chicken 03-18-2012 07:58 PM

So I have started with a fresh install of myBB 1.6.6 and Mysidia 1.3.0
I put myBB in root/forum and Mysidia in root/mys130

I made the changes to the config_forum.php

Now when I am on the forums I can still create a new account.
When I jump to the mysidia registration page I can create a new accout. The info is created to both databases.

I can log in to both sites however when I log in to one it doesnt show up in the other.

When logged in to the mysidia portion of the site I can change my email and the effects take place on the adopt db but not the forum db. I can not seem to change my password.
When i go to the forum user CP I can change my password. The new password only works for the forum login but not the mysidia login.


Also on the mysidia site I can not view my profile I get:
( ! ) Notice: Undefined index: page in C:\wamp\www\mys130\profile.php on line 18
Call Stack
# Time Memory Function Location
1 0.0011 456936 {main}( ) ..\profile.php:0

( ! ) Parse error: syntax error, unexpected $end in C:\wamp\www\mys130\inc\tabs.php on line 20
Call Stack
# Time Memory Function Location
1 0.0011 456936 {main}( ) ..\profile.php:0


When I try to jump to the forum from the mysidia top tabs I get
404
Not Found

The requested URL /mys130/forum.php was not found on this server.


My main question is how do I set up the two software so it can reconizie that I have logged in to the forum login and dont need to do it in the mysidia site or vice versa. I am guessing it is the cookies but I am not sure.

Oh and I am useing wamp
Apache Version :
2.2.21
PHP Version :
5.3.8
MySQL Version :
5.5.16

Hall of Famer 03-18-2012 08:09 PM

@ Corsair:
It is weird though... Does this happen to your admin user, or every registered user? Check your /functions/functions.php file and see if the passencr() function is missing or malfunctioning.

@ Silverdragontears:
Well '->' is the most basic operator used to access object properties and methods, while $stmt is just like $result we had before. This script is moving towards the direction we called object-oriented programming. I did it for the security release 'cause I am making a point clear what directions new Addons/Mods for Mys v1.3.x. should follow. But yeah I agree creating addons/mods may be more difficult for beginners nowadays, you need intermediate programming skills to interpret objects and OOP design.

@ Chibi_Chicken:
For now the only thing Mybb forum integration does is to create user in both adoptables and forums database. In future I will make a better bridge between Mys and MyBB, and perhaps adding another tab to user profiles to show users forum activities. I still need to browse more into MyBB's database structure and programming conventions at this point.

AlexC 03-18-2012 09:17 PM

Apparently I'm having trouble with registering? My account works fine on both forums, it appears - but when I try to make a new account via the adoptable site, I get this message;

Deprecated: Function eregi() is deprecated in /home/gloometh/public_html/register.php on line 81
Failed to create forum account

However, I do have a new user on the adoptable site.

Hall of Famer 03-18-2012 09:25 PM

umm what version of PHP are you using? It seems that function eregi() is used to validate email addresses but for certain version of PHP it aint working. No idea why it happens, but at times...

SilverDragonTears 03-19-2012 12:25 AM

How do I get a number for this? Now that I can't use this format :/
Code:

$query = "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='".$loggedinname."' AND currentlevel<='3' AND isfrozen='no'";
$result = mysql_query($query);
$num = mysql_num_rows($result);

if($num >= 5){
$canadopt = "no";
$article_title = "Too many eggs!";
$article_content = "You already have too many eggs to take care of! Come back once you have hatched an egg!";
}


fadillzzz 03-19-2012 12:31 AM

Quote:

Originally Posted by Hall of Famer (Post 21837)
umm what version of PHP are you using? It seems that function eregi() is used to validate email addresses but for certain version of PHP it aint working. No idea why it happens, but at times...

HoF, just change eregi() to preg_match(), then it will go away

Hall of Famer 03-19-2012 01:21 AM

@ Silverdragontears:
You mean to count number of rows? With the new script you will have to write these:

PHP Code:

$stmt $adopts->query("SELECT * FROM ".$prefix."owned_adoptables WHERE owner='".$loggedinname."' AND currentlevel<='3' AND isfrozen='no'");
$data $stmt->fetchAll();
$num count($data);

if(
$num >= 5){ 
$canadopt "no"
$article_title "Too many eggs!"$article_content "You already have too many eggs to take care of! Come back once you have hatched an egg!"


In future we will implement a database class that comes with a num_rows() method so you can call easily.

@Fadillzzz:
I see, its weird how I never noticed eregi() being used in the script right from the start. Was it deprecated in the new PHP versions? If so, we have to update the script asap.

fadillzzz 03-19-2012 01:38 AM

@HoF:
Yes, it's deprecated since PHP 5.3
I guess Gloometh is using PHP 5.3+ :smile:

Hall of Famer 03-19-2012 01:46 AM

I see, should have tested the script on my new server then. XD It worked flawlessly on the old one using PHP 5.2.17, lol.

SilverDragonTears 03-19-2012 03:31 AM

Thanks for the code HoF :)


All times are GMT -5. The time now is 07:37 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.