Mysidia Adoptables v1.3.4[Security Release]

Forum
Last Post
Threads / Messages
Status
Not open for further replies.
(Not sure if I should have put this in Bugs, sorry?)
When you first adopt an adoptable, text tells you to make sure to feed your adoptable so it grows. The link is levelup/# instead of levelup/click/# so it doesn't work.

I changed adoptview.php from this:
$document->add(new Link("levelup/{$aid}", "feed "));
To this:
$document->add(new Link("levelup/click/{$aid}", "feed "));

The link now works. Just make sure you don't forget the / or it'll give you an error like the first one.

The file is in public_html > view.
 
fresh install issues

Hi! Last year, I downloaded the script and gave it a test install and it worked great - but that was a different version. This version is giving me issues on a fresh install!

I have a brand new laptop, and I just downloaded a fresh install of WAMP (this release comes with PHP 5.4 with MySQL 5.6). Immediately I started having troubles. (But luckily nothing that will immediately prevent me from continuing on my way, I think.) I strongly believe all of this is caused because I have 5.4 and the temporary solution is to just turn off php error notices (everything seems to work, despite the notices).

Problem 1 - The index.php in the installer has the following notice at the top of the page:
PHP:
( ! ) Notice: Undefined index: step in C:\wamp\www\Mysidia\install\index.php on line 5

But I could proceed, anyway. Everything passed on the second page. Onto the third page-

Problem 2 - I had to set a password for myphpadmin root, no biggie, that's more secure than not having one, so I got that done. (It wouldn't let me run the install script without a password, anyway.) I attempted to run the install script now that I had a password...

Problem 3 - The install script went and timed out on me (warning sign number one) - so I went into my php.ini file and upped the script timeout from 30 seconds to 5 minutes, cleared the tables in the database it had managed to install, and tried again. Success! I got all the way to step six.

Problem 4 - Installation complete! But wait, there are four php notices at the top of the page:
PHP:
( ! ) Notice: Undefined index: rewardmoney in C:\wamp\www\Mysidia\install\sitesetting.php on line 29

( ! ) Notice: Undefined index: enabletrades in C:\wamp\www\Mysidia\install\sitesetting.php on line 30

( ! ) Notice: Undefined index: tradecost in C:\wamp\www\Mysidia\install\sitesetting.php on line 31

( ! ) Notice: Undefined index: tradeoffercost in C:\wamp\www\Mysidia\install\sitesetting.php on line 32

Well, whatever, right? I clicked proceeded to click on 'View Your Website' and oh my goodness:

Problem 5 - The good news? The site does load... at the bottom of the page after several dozen notice errors. I get one of this:
PHP:
( ! ) Notice: Undefined variable: controller in C:\wamp\www\Mysidia\classes\class_language.php on line 111
And then about 54 of these, and they're all identical:
PHP:
( ! ) Notice: Undefined property: DocumentRenderer::$thematicBreak in C:\wamp\www\Mysidia\classes\class_guirenderer.php on line 184

I didn't bother including the callstack information that came with those specific notice, but I can if you like. Notice that they're just notices and not errors? That's a good thing, in that I can actually force PHP to not display notices on my server. (You can change the error_reporting setting in php.ini from error_reporting = E_ALL to error_reporting = E_ALL & ~E_NOTICE. And then it's important to restart the server so the changes can be activated.) However, these notices should be repaired before they become serious problems in future versions of PHP, right? (Currently, many web hosting providers may have these error notices turned off by default? But they also may not, leaving people unable to turn them off.)

PHP is one of those languages that's constantly upgrading and it's syntax gets a little outdated. Even best practices can become obsolete, given enough time. (e.g., Using an uninitialized variable and relying on the fact it's automatically initialized to an empty string.) As a developer, that sort of stuff makes you want to pull your hair out, I know.

(Oh!! I think it's worth mentioning that I also had the initial 500 Internal Server Error, but that was because mod_rewrite wasn't turned on by default in WAMP's Apache. I turned that on and restarted and everything seemed to have fixed itself.)

Anyway, moving along:

Problem 6 - On the Register page, this time I get an actual, non-notice error:
PHP:
( ! ) Strict standards: Declaration of RadioList::add() should be compatible with GUIContainer::add(GUIComponent $component, $index = -1) in C:\wamp\www\Mysidia\classes\class_radiolist.php on line 68
However, this seems irrelevant, as registration is successful anyway. It's noted that it says I am now logged in, but there is no ajax to automatically whisk away the login panel on the side (but this is obviously something you're probably working on fixing for the next major release, so its barely worth mentioning).

I'm not -sure- if I can turn Strict php error notices off, but I'll give it a shot. I look forward to your next major release but I'll have fun building off what's already provided. Thank you for your hard work!
 
Last edited:
Well most of these aint really problems, especially the notices. All you have to do is to disable notice errors in php.ini. For the strict standard error, go to /classes/class_radiolist.php and change:

PHP:
public function add(){
to this:

PHP:
public function add(GUIComponent $component = NULL, $index = -1){
and the strict standard error should go away as well.
 
Well most of these aint really problems, especially the notices. All you have to do is to disable notice errors in php.ini. For the strict standard error, go to /classes/class_radiolist.php and change:

PHP:
public function add(){
to this:

PHP:
public function add(GUIComponent $component = NULL, $index = -1){
and the strict standard error should go away as well.

Mhmm! And I'm sure you've got plans to clean those away in the future, sorry if reporting them was redundant. ^^;;;

My line in /classes/class_radiolist.php was actually:
PHP:
	public function add(RadioButton $radio, $index = -1){

but changing it to yours gave me this beauty:
PHP:
( ! ) Fatal error: Call to a member function getName() on a non-object in C:\wamp\www\Mysidia\classes\class_radiolist.php on line 44
Call Stack
#	Time	Memory	Function	Location
1	0.0018	275152	{main}( )	..\index.php:0
2	0.0107	389752	IndexController::main( )	..\index.php:78
3	0.9250	5257392	FrontController->render( )	..\index.php:74
4	0.9250	5257632	RegisterView->index( )	..\class_frontcontroller.php:100
5	0.9884	5506096	RadioList->add( )	..\registerview.php:49

Can I get the full function? (Before the edit, mine was:)
PHP:
public function add(RadioButton $radio, $index = -1){
        if($radio->getName() != $this->name) throw new GUIException("Cannot add unrelated radiobuttons to a RadioList.");
	    parent::add($radio, $index);			
	}

I couldn't find an add function with no parameter, just that one. @u@;;

However! I did work around the original Strict alert, with the code my install came with, because I can also turn Strict alerts off in php.ini, apparently. error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT does the trick.
 
Last edited:
Oh I see, then you probably just change RadioButton to GUIComponent instead. PHP is an annoying language in a way that its type hinting is incomplete. RadioButton is a subclass of GUIComponent, this kind of type hinting is normally reasonable but in PHP it generates strict standard errors.
 
Oh I see, then you probably just change RadioButton to GUIComponent instead. PHP is an annoying language in a way that its type hinting is incomplete. RadioButton is a subclass of GUIComponent, this kind of type hinting is normally reasonable but in PHP it generates strict standard errors.

Ah, sorry, doing so is what caused the Fatal Error instead, so I changed it back to what it came with and disabled the Strict warnings from displaying, so it's okay.

I think newer versions of PHP are doing a little better, hence all the complaining it does over code it's changed requirements for, but as a constantly updating language it's lack of backwards compatibility as soon as a server updates makes it quite a headache. Despite having a book or two laying around, and tinkering around with PHP for a couple years, I still end up at a loss of what I'm doing most of the time and end up turning to Google to find nothing but forums full of people going 'have you googled it?' and shaking my head at the irony. Luckily, these warnings aren't major problems (yet, or hopefully anytime soon).

But thank you so much for your time! I won't spend my time troubleshooting stuff I can just shut off, and I'm sure it's all going to get sorted out eventually. You never know what happens when PHP decides to update. It's like buying a new computer, eventually, you just can't find the old version you like in the store anymore.

I'm glad to see activity, and this probably isn't where I'm meant to be posting, so when I have more questions, I'll post elsewhere. Sorry for that!

I'm off to go build a template~
 
I see, and yeah at this moment turning off notice/strict-error reporting is the best choice to take. I kinda forget what the method signature was, but I may take a look at it and see if I can get rid of the error message for you. It does not affect your site's functionality in any way, just some plainly annoying text you wish it to disappear. Good luck making a theme/template btw.
 
What errors do you get? Are you sure you are accessing the correct url path? Sometimes this kind of issues are caused by improper uploads of script files, if you just upload the entire folder through FTP it may not work unless you rename it.
 
Was just installing script and I am unfamiliar with the cPanel, so I might have done something wrong here...but while trying to install I got this error;
Could not connect to database, the following error has occurred:
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Not sure what it means?
 
Your connection information to your database server is wrong. Either it isn't hosted on "localhost" or, the uesrname and password are incorrect.

~judda
 
That problem could have also been just because the MySQL process wasn't started or had an internal error and needed a restart, too. It could have literally fixed itself -- but if not, some setups require localhost to be wired through 127.0.0.1. Some OS don't even care.
 
I will double check the host (pretty sure it's just localhost) and re-run the installation. Hopefully it clears up!

Edit; Yeah, the server is different. Not used to my new host yet, hehe.

Thanks to both of you!
 
Last edited:
Glad it worked out for you. I wonder though, what was the problem with your new host? You dont have to answer that if it was a secret, I am just curious.
 
Do you mean old host, HoF?

If so, we ran into some very frustrating payment problems. I canceled payments and they would take the money out, anyways. Had to jump through hoops to get into contact with someone to be refunded.
 
I have a question.

Would it be possible to only upgrade the trade feature on a 1.3.3 site to the 1.3.4 trade system? Or would that be pretty much impossible?
 
I followed the tutorial exactly as it was written and when I got to the last step, going my mysite.com/install/index.php it said the page didn't exist? I followed this exactly how it said to and no luck. I'm using x10hosting.

Edit I figured it out, I changed the url to mysite.com/mainfoldername/install/index.php


But now all im getting is a blank screen -.-' what did I do wrong? I've done this twice and still the same blank screen shows up.
 
Last edited:
For some reason Mysidia has some serious issues with being installed into a sub-domain. Maybe try moving it to the root/public_html folder of your site and see if that works?
 
The thing is it is in the public_html folder -.- I couldn't get it to work without renameing the actual file MSA file adopt and then changing the URL for rhe instillation. I don't want to change it back now since I already installed it.


But I'll probably have to wip my site and start from scratch and maybe it'll work. And I'm not sure how to do that .-.
 
The thing is it is in the public_html folder -.- I couldn't get it to work without renameing the actual file MSA file adopt and then changing the URL for rhe instillation. I don't want to change it back now since I already installed it.


But I'll probably have to wip my site and start from scratch and maybe it'll work. And I'm not sure how to do that .-.

What's inside your public_html folder? Another folder with mysidia files or the files directly? Is it the install page that appears blank or it's only after installing?
 
Status
Not open for further replies.

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,118
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Top