Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Tutorials and Tips (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=27)
-   -   [guide] Setting up WAMP w/Mysidia (http://www.mysidiaadoptables.com/forum/showthread.php?t=4774)

Kyttias 01-28-2015 01:23 AM

[guide] Setting up WAMP w/Mysidia
 
WARNING: LOTS OF IMAGES.
(And they are gifs.)
What is WAMP?
WAMP is short for Windows-Apache-MySQL-PHP and it's everything you need to turn your very own computer into a server that can host websites - like Mysidia! This is great news for developers who want free testing space before they go live with their projects and pay domain fees, etc. (There are Linux and Mac equivalents, as well as some more multi-platform alternatives - LAMP/MAMP/XAMPP - and if you choose to pursue them, you can still try to follow along with this tutorial.)
Cool! How do I get it?
This part's easy. Head on over to WampServer.com (their site is also available in French and Russian, check the top right corner) and scroll down to the Downloads section. Before you choose a download, find out if your Windows is 32bit or 64bit (on Windows 8 / on Windows 7 / see related articles for others). My computer is 64bit, so I will choose this link:
Once it's done downloading, find the file. We're going to open it by right-clicking and hitting 'Run as Administrator'.
It's going to ask you what you want your default browser to be. You can go through the trouble of finding it, or not, the choice is yours. Immediately afterward it's going to ask Windows Firewall for permission. Leave just the first box checked, as this should be default.
Hit next, and then finish. (If you're curious about SMTP, it has to do with sending out e-mails. If you'd like to configure this, read this article and follow it's steps later -- but it isn't a necessary component, so we'll be leaving the default values!)
Now what?
WAMP is now installed and should be running! Find it in the lower right hand corner (it may be hiding). Right-clicking on it brings up one menu, left-clicking brings up another. Pressing 'Put Online' will activate the server (the icon will change colors as it's working - if it's ever stuck on yellow, something is very wrong!). If the icon is hiding, go ahead and drag its butt out and sit it on the taskbar so you can get to it.
Tip: If WAMP has trouble starting (getting past the icon's yellow stage) now or ever, turn off Skype completely and then try turning WAMP on. They share the same default port, and Skype is smart enough to use a different one if its first choice is taken - so you can safely turn Skype back on once WAMP is on.
WAMP installed into C://wamp. Inside, there is a folder called www. This is where your site's files will be stored. It is safe to delete the contents! The folder must stay named www. You can either move the contents of Mysidia here (after unzipping, of course), or in a subfolder. For the purposes of this example, I won't be using a subfolder (there are benefits to using subfolders, such as ease of making multiple sites).
MySQL Database Setup
Just like you would using a real host, you need to create a database to use for you site. You can name it whatever you like - just remember what you name it. From the WAMP icon in the lower right, open up phpMyAdmin. Select the 'Databases' tab and create a new one right here.
You're also going to need to set a password for the root user. The second tab at the top is SQL, and we're going to use it to run a command that will set the password. (Obviously replace yourpassword with an actual password for yourself, lol?) Put in:
Code:

SET PASSWORD FOR root@localhost = PASSWORD('yourpassword');
Now, open up the C:\wamp\apps\phpmyadmin4.1.14 folder and then open up config.inc.php - if you open in Notepad, this is fine. Find this: $cfg['Servers'][$i]['password'] = ''; (you may need to set the search to 'Up' rather than the default 'Down' to locate it, you might not). In the empty single quotes, place in the same password you created above. For good measure, restart the server using the WAMP icon.
Apache and Mod_Rewrite
Your site can be accessed by visiting http://localhost/ or http://127.0.0.1/ (or these and the name of your subfolder following the slash, if you have it in a subfolder) but not quite yet. Right now you're just going to get a 500 Internal Server error. See, Apache has modules - and on most webhosts, there are a handful of basic ones that are already turned on. But you're going to have to do that yourself! Our .htaccess file (included with the Mysidia files) is trying to access the Rewrite module - so we need to find it and enable it. Use the WAMP icon in the lower corner. You may need to scroll down to find it!
Rename Config
A new 'error' has taken the last one's place. Well, no, actually! In your Mysidia files, pop into the inc/ folder and rename config_adopts.php to merely config.php.
PHP.ini: Disabling Notices & Strict Standards
What?! More errors?! Also, no, haha. It's still just confused. Notices and, a similar warning, strict standards - are not errors, merely recommendations. Let's turn these off so we don't have to stare at them. Use the WAMP icon to open up your php.ini file, search for error_reporting = E_ALL and change the value to E_ALL & ~E_NOTICE & ~E_STRICT. You'll want to restart the server after saving these changes. Be patient and wait for the light to turn green again before proceeding.
Installing Mysidia Adoptables
The only remaining error is that it can't find the database. This is because we haven't actually installed the Mysidia framework yet, silly! Now we're going to visit http://localhost/install and set up just as we would on a normal host. I hope you remember the name of your database and the password you set! The default user for MySQL is root. You must set the Domain field as 127.0.0.1 and you must log into your site using this address. Localhost will not work for this field. If you installed into a subfolder, put the folder into the script path. I zoom through the entire install, leaving many things at their default, but please read it and take your time!
What's next?
That's all! This is all you need as a development environment. Always access your site with 127.0.0.1, not localhost - else you'll have issues logging in/staying logged in. So go ahead and bookmark 127.0.0.1. You could always open up C:\Windows\System32\drivers\etc and open the hosts file up in Notepad and add a line (after those already there, change nothing) like:
Code:

127.0.0.1      mysite.dev
^ And then you could type http://mysite.dev into the browser to access your site. But this only effects YOUR computer, and only ever will, not even others on your area network. If you know the LAN IP of your device, you could punch it in to other computers on your local/wifi network and also see your site. Set your IP to static, and you could even edit the hosts files on those computers to access your site with your special host ruled name - instead of rule with 127.0.0.1 it'd be with your static LAN IP. Get it?

If your router supports NAT Loop Back, you can easily do some port forwarding to allow others to access your site with your public IP. A variety of issues could get in the way of you sharing your site with friends outside of your local wifi network. Some can solved with a few simple steps, others may require you to buy a different router that supports NAT Loop Back, or if your ISP insists you use theirs, your only option is to find a different ISP. Sadly, I cannot guarantee sharing with others is possible, due to your router.

If you super want to give it a shot, start by port forwarding port 80, then sharing your public IP with a friend to see if it worked. If something's amiss, try disabling your computer's firewall to see if it's the culprit, or, it could be your ISP. This site will tell you if the outside world can't access a particular port on your computer.

If all goes well, you can use a service like no-ip.com to associate your public IP with a normal-looking url. You can stop giving your friends a hard to remember IP address! Public IP addresses change/refresh every couple of weeks, usually, because they're dynamic. You can call your ISP and ask for one that will never change, but they usually charge a monthly fee. However, the site I just mentioned can automatically look up your current public IP, so long as you have that site's nifty little Dynamic DNS Update Client program running, and always associate it with a url of your choosing - they have both free and paid options.

For good measure, you can also sync your WAMP www folder to a Dropbox account! It won't backup the database, you'll have to do that manually by exporting it, but it could definitely help you keep your files safe. You could even set up WAMP on various computers and use the same php files (however, each computer would be using its own copy of the database).
AGAIN note:
If WAMP has trouble starting (getting past the icon's yellow stage) now or ever, turn off Skype completely and then try turning WAMP on. They share the same default port, and Skype is smart enough to use a different one if its first choice is taken - so you can safely turn Skype back on once WAMP is on.

Hall of Famer 02-09-2015 01:47 PM

I am sticking this thread since I believe it will be very useful. Many admins would prefer their sites closed for registration or public views at least after several weeks or even months. I think they sure can try installing WAMP first on their local PC, and get familiar with some basic concept before porting it to a live server.

Kesstryl 02-10-2015 12:58 PM

This is a fantastic guide!

Mindcrank 06-16-2015 01:46 AM

Hey this guide was so helpful, thankyou, but I'm having a little bit of trouble. I'm wanting to test out mysidia and see if it's what I'm looking for for my project.

I run on a mac, so instead of using WAMP I decided to use XXAMP, which I already had installed (I use the netbeans IDE with it).

for the most part it's worked the same way, except that I was able to skip the Apache and Mod_Rewrite step of the guide (hope this isn't what is causing the problem because I honestly have no clue how to access the XXAMP equivalent of that step). I also had trouble with file permissions during installation. Everything is set to read only, so I had to make several files writeable in order to get around it (Like the gif and jpg and png folders, the config file obviously, etc.) I ended up setting the entire mysidia folder and all it's contents to writeable by everyone, to dodge any future errors related to this. (but I'm worried about security issues that my pop up later?)

Anyway, it's installed and when I go to 127.0.0.1/Mysidia/ I see all that I should, except that I am not able to log in (and therefore do anything beyond this point ^^).

When I attempt to log in, I receive this error:

http://i.gyazo.com/759e2e9a97d2e0c39cccf9ef8d57845f.png

Any advice? I also receive this error upon trying to register a new user, so I can't do that either.

Kyttias 06-16-2015 08:29 PM

This has everything to do with mod_rewrite.

To enable this module it just takes a little tweak of your httpd.conf file which will be found in xampp\apache\conf. The conf file already contains the line needed to enable the module, but there is a comment mark (#) just before the code which means Apache will ignore the code. The line you are looking for is:

Code:

#LoadModule rewrite_module modules/mod_rewrite.so
In my httpd.conf file this is line 118, but it may vary so just search for "mod_rewrite" in the file. Now, simply remove the comment (#) from before the line, and save the file. You'll need to restart Apache for the changes to take affect, and you should now find you can use clean URLs with XAMPP.

Mindcrank 06-16-2015 11:07 PM

Thanks for the fast response!

Unfortunately it doesn't solve my problem.

My xampp applications file tree is different, There's no xampp\apache\conf\httpd.conf.

the closest thing I've found is
XAMPP\xamppfiles\apache2\conf\httpd.conf

and the entirety of that files text is:
Code:

Alias /bitnami/ "/Applications/XAMPP/xamppfiles/apache2/htdocs/"
Alias /bitnami "/Applications/XAMPP/xamppfiles/apache2/htdocs"

<Directory "/Applications/XAMPP/xamppfiles/apache2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

The file that seems to be identical to the one you're talking about is located at:
XAMPP\xamppfiles\etc\httpd.conf

I made the suggested changes there, an restarted apache as instructed, however there was no change in my error message.

I'm attempting to google this as well but so far I can't quite make heads or tails of the solutions i'm finding; they're all a little to vague for me to follow.

Mindcrank 06-20-2015 12:28 AM

Hey, I'm still looking for a solution to think. In all my googling around, there's a lot of suggestions for editing an .htaccess file. I couldn't help but notice that the last three times I have downloaded a fresh copy of mysidia, none of them contained an .htaccess file. Is that the problem? could it be something else?

Please help x.x this is an extremely frustrating problem. all I want to do is work on my game, not waste hours messing around with apache and server errors.

Thank you for your attention!

Kyttias 06-21-2015 12:21 AM

It should definitely contain such a file. In many FTP uploading programs, you can't actually see this file. But since this is the WAMP thread, you should be working locally and it should definitely be there.

Mindcrank 06-21-2015 12:57 AM

I am working locally; I just unzipped another fresh download of the mysidia script (Downloading the zip from Media fire of mysidia v1.3.4) to double check that I had not accidentally deleted or removed any files.

This is a screenshot of the entire contents of the freshly unzipped folder:

http://i.gyazo.com/b8fbf112287d332387786069e39d1d08.png
http://i.gyazo.com/23b2c85d9c9ba18d82a3aba2dec85492.png

As far as I can tell, all my permissions are set correctly and all files should be visible to me (I'm the root user of the computer)

Is there perhaps a link where I could download just the .htaccess file?

Kyttias 06-21-2015 01:17 AM

After squinting and seeing that you're on a Mac, I can now tell you all you need to do is simply unhide the file. Mac computers like to hide important system files. Because its formatted similarly (not having a real name, just as an extension) the OS assumes it's a system file and tries to keep it safe by hiding it. Here are two different sites explaining the same process for showing hidden files: [x] [x]

I've never owned a Mac, so it's not something I would have thought of. (On Windows, hidden files are a relatively common thing and are much easier to hide/unhide, but basically nothing comes hidden outside of the System file or a software installer automatically does it - files from the internet should never autohide themselves, that's ridiculous!) It's not surprising a Mac owner wouldn't have thought of this, either.

(As a note to not seeing changes after making edits in an earlier post - be aware that you must restart the server before changes can take place. If this means rebooting the entire computer because you can't figure out how, then that's what you'll have to do. I don't know how other setups work.)

Mindcrank 06-21-2015 01:36 AM

Thank you so much for your patience. Honestly, I swear to god I have done those steps a dozen times before to show the hidden files, I assumed I would be able to view them. Apparently I was wrong. I must have at some point changed the settings back to regular view?

And I guess since I unzipped the file before moving it to my directory where I would be developing the site, it didn't move hidden files along with it.

I now no longer have that error, thank goodness. Thank you very much.

I'm now having a couple other problems but I'm going to leave it until tomorrow and try browsing the site and see if those questions have already been answered. Thank you very much for your help!

Kyttias 06-21-2015 02:40 AM

Whew! I'm glad this got figured out at least. :usedusedused:

Mindcrank 06-21-2015 07:07 PM

Hahah yeah, I upgraded my OS recently, so it makes sense that though I had enabled the view of hidden files it the past, it was now disabled. I seem to have gotten everything in great working order now! Im very excited to begin work on my game.

parayna 09-05-2015 03:57 PM

Thanks for sharing this! I got it up and running with no problems at all (except a little hiccup at the beginning where I entered something wrong >.>). I had been wondering if something like this was possible for a while, so I could test new features without breaking the whole site, but never found anything/couldn't figure out how to use things, so thanks! XD This is helpful!

parayna 09-06-2015 08:41 AM

Found a slight error, or problem, or whatever XD

When I copied all files and the database over so I affectively had a carbon copy of the site (but without the users, etc, and unneeded database entries on the one on my computer) I noticed that the images that stored links on my custom pages would still link to the real site (which is fair enough, seeing as that's what they were set to XD)

I then went into the images on the adopt page to change them and see if it worked, it kind of did. It changed the Protocol: http:// bit to <other> automatically when I put the whole address in (including the 127.etc, bit) but when accessing the link it would put pages/view/{page name} twice.... so I removed the pages/view bit and then it worked because it would put just the page name in the address bar (which works fine, and I don't care about that XD)

That leads up to the problem I'm having lol... IntoRain helped me a while ago now to make a 'get' page for adoptables I want people to be able to adopt, so that I can link them through images to the adoption page, and the link is get/id/{id number} but if I put just that into the link for the image, the address bar goes to pages/view/get/id/{id number}. That doesn't work though because the pages/view bit shouldn't be there XD I can't put the link in full though because it assumes that pages/view should be there. Do you know why? D: XD

Thanks :3

EDIT: Well, this is embarrassing XD I fixed it! It works now. I basically had to fiddle about with the settings of the Protocol: thingy and one of them worked XD Phew... XD

AnanoKimi 10-31-2015 04:44 PM

So I'm having an issue with not being able to log in despite putting the info in correctly. Is there any way to edit the log in info from the host thing to be able to log in?

Kyttias 10-31-2015 09:44 PM

Can you be a little more specific? If your admin password just isn't working, you'll have to remove all the tables added to MySQL and start over with visiting the Mysidia installation page. This is because, unfortunately, no you -cannot- edit log in information for an user, including yourself: passwords are encrypted with a hash, and you can't just put in plain text there, it has to run it back through to remove the encryption and it'd just get confused and fail if its been modified at all. You usually can edit information in the MySQL database, but not in this case.

AnanoKimi 11-01-2015 04:39 AM

Quote:

Originally Posted by Kyttias (Post 32729)
Can you be a little more specific? If your admin password just isn't working, you'll have to remove all the tables added to MySQL and start over with visiting the Mysidia installation page. This is because, unfortunately, no you -cannot- edit log in information for an user, including yourself: passwords are encrypted with a hash, and you can't just put in plain text there, it has to run it back through to remove the encryption and it'd just get confused and fail if its been modified at all. You usually can edit information in the MySQL database, but not in this case.

The password is definitely not working. I tried already twice, the first time, and then I deleted everything and redid the installation and its still not working. I'll try one more time to reset everything.

IntoRain 11-02-2015 08:53 AM

The first admin password never works for me. I just create a second new user and go to phpMyAdmin and make it admin.

AnanoKimi 11-02-2015 05:58 PM

Quote:

Originally Posted by IntoRain (Post 32731)
The first admin password never works for me. I just create a second new user and go to phpMyAdmin and make it admin.

I see. Yeah This is the third time I delete everything and try to log in with the admin account it asked me to make and it keeps telling me its not right. So I'll probably do that then because I thought at first it was I couldn't remember the password. So I deleted everything and tried it with a simpler password and it was still wrong. That's when I posted here. I then figured, maybe its the username, its got spaces, I'm a try one with no spaces. Still no go. So I'm a just do what you said and make a new account and make that admin.

Kasandra 02-15-2016 08:24 PM

nvm, I think I've worked it out

Kyttias 02-15-2016 09:01 PM

The Notices exist because you have a higher version of PHP than Mysidia was created on, and some things have since fallen out of best practice, but the code still functions.

Warnings... same deal, the code is still functional. As for the warning, you could try using 127.0.0.1 instead of localhost in Mysidia's configuration file (inc/config.php)?

Stackoverflow: What is the difference between a Notice and a Warning?

You can turn off Notices and Warnings in XAMPP's php.ini file (help finding it) under error_reporting (search for the line that does not begin with a semi-colon, may be the second result rather than the first): Try:
Code:

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
Hosts online already tend to have these disabled, as they're not true error messages. The creator of Mysidia is already aware of these "problems" and they should be fixed in the next version.

Kasandra 02-15-2016 09:20 PM

Urg, I'm getting another problem after install..

Code:

Warning: require(C:/xampp/htdocs//inc/smarty/Smarty.class.php): failed to open stream: No such file or directory in C:\xampp\htdocs\Mysidia\classes\class_mysidia.php on line 326

Fatal error: require(): Failed opening required 'C:/xampp/htdocs//inc/smarty/Smarty.class.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\Mysidia\classes\class_mysidia.php on line 326


Kasandra 02-15-2016 09:41 PM

Okay, I made another install and it works fine now. I noticed that the url wasn't quite right and worked out that I forgot to include the subfolder in the installation. -is shot-

Kasandra 02-15-2016 09:50 PM

And now I can't login...

what am I doing wrong? XD


Saw this in your tutorial,
Code:

Always access your site with 127.0.0.1, not localhost - else you'll have issues logging in/staying logged in. So go ahead and bookmark 127.0.0.1.
I can't access the site under 127.0.0.1/Mysidia
The only way I can access it is with http://localhost:8080/Mysidia

Is that the reason I cannot login? And if so, how can I fix it? Currently the 127.0.0.1 shows only a blank page.

Edit: 127.0.0.1:8080 works >.>

But still unable to login.

Edit2: Made another account, logs in (or at least it says it does, as it comes up with the welcome message) then immediately logs out again when I try to click on any other link.

Kyttias 02-15-2016 11:38 PM

Just make sure your inc/config.php file matches whatever it is that you're trying to access...? If it requires 8080 as part of the url, make sure that's part of the configuration's file.

I have another solution, though it's an added layer of complexity. Because you're acting as your own server, you can create a "Virtual Host" which will allow you essentially make a fake domain name (fake, because only you can access it... I tend to end my fake sites in .dev but you really could make it anything). Here's a guide that should help. Because you'll be accessing the site at something other than either localhost or 127.0.0.1, it'll route it properly every time.

Kasandra 02-16-2016 07:31 PM

Hi Kyttias,

This is my config file;

Code:

<?php
//Mysidia Adoptables Site Configuration File

define('DBHOST', '127.0.0.1');            //DB Hostname
define('DBUSER', 'root');            //DB Username
define('DBPASS', '*****');            //DB Password
define('DBNAME', 'mysite');            //Your database name
define('DOMAIN', '127.0.0.1:8080');            //Your domain name (No http, www or . )
define('SCRIPTPATH', '/Mysidia');    //The folder you installed this script in
define('PREFIX', 'adopts_');
?>

If 127.0.0.1:8080/Mysidia works (but wont let me login) then these settings look correct.

I followed that procedure you linked to, but came up with this error:

ERR_ICANN_NAME_COLLISION

Apparently Chrome does not like you using .dev
So I tried .loc , .local , .localhost
and they all just went to google search instead.

I restarted Xampp each time.

I've even attempted to try this - https://support.apple.com/en-us/HT204684

So, maybe its the files themselves? Well, here's what I have.

.hosts
Code:

        127.0.0.1      localhost
        127.0.0.1      www.mysidia.localhost

I've even tried added the 8080 port, just in case, but that didn't work either.

...-vhosts.config
Code:

NameVirtualHost *:8080

<VirtualHost *:8080>
      DocumentRoot "C:/xampp/htdocs/"
      ServerName localhost
</VirtualHost>

<VirtualHost *:8080>
DocumentRoot "C:/xampp/htdocs/Mysidia"
ServerName mysidia.localhost
ServerAlias www.mysidia.localhost
<Directory "C:/xampp/htdocs/Mysidia">
AllowOverride All
Require all Granted
</Directory>
</VirtualHost>

I am at my wits end trying to work this out >.<

Kasandra 02-16-2016 07:32 PM

Actually, I've even tried to do the same with another site I was working on for a friend, and had to access that through the localhost:8080 because nothing else worked... But that site was static and didn't require any login.

Kasandra 02-26-2016 04:58 AM

Not trying to rush anyone, but if there was someone that could help me set this up so that it works and I can play around with it and build a site it would be greatly appreciated.

Kyttias 02-26-2016 09:49 AM

Alright, see, you're asking 127.0.0.1 to redirect to www.mysidia.localhost, but 127.0.0.1 is not your site, as in your config file you've put in 127.0.0.1:8080. Try updating your hosts file to reflect 127.0.0.1:8080. And once you're done, update Mysidia's config file to have the domain be to what you've got in your hosts file!

There a number of things that can go wrong. Virtual hosts must be enabled in httpd.conf, and then what you have above (more or less) should be, of course, in httpd-vhosts.conf -- and you have to make sure these are the right copies of these files in the XAMPP installation, because I know for certain WAMP keeps backups and editting those won't help (so long as you followed a guide, you're good).

My virtual hosts set up is like this:

Code:

<Directory C:/Users/Kyttias/Dropbox/WAMP>
    Order Deny,Allow 
    Allow from all
</Directory>

<VirtualHost *:80> 
    DocumentRoot "C:\Users\Kyttias\Dropbox\WAMP\Sanctuary"
    ServerName sanctuary.dev
    ServerAdmin kyttias@gmail.com
    ErrorLog "logs/Sanctuary-error.log"
    CustomLog "logs/Sanctuary-access.log" common
</VirtualHost>

(One of many, anyway.) You have ServerAlias in yours, I've never used that. But my ServerName matches what's in the host file exactly, and yours does not. =/

My hosts for this would be (lines for this example only):
Code:

127.0.0.1      localhost
127.0.0.1      sanctuary.dev

And then my Mysidia inc/config.php file is now using:
Code:

define('DOMAIN', 'sanctuary.dev');            //Your domain name (No http, www or . )
But I'm not using 8080. You could always try reconfiguring XAMPP to not need 8080, if you haven't given that a shot. I honestly have no experience with 8080 or needing to work around it.

At some point or another you'd be better of seeking help from people who understand the problem... I can really only help people working with WAMP under a standard port 80. :cfrown:

Kasandra 02-27-2016 10:40 PM

I appreciate you trying to help me out here. I still cant seem to get anything to work correctly.

localhost - shows nothing.
localhost:8080 - shows what its supposed to.

I tried to remove the 8080 port, but it says port 80 is used by something else and I can't find what it is.


Code:

NameVirtualHost *:8080



<VirtualHost *:8080>
      DocumentRoot "C:/xampp/htdocs/"
      ServerName localhost
</VirtualHost>


<VirtualHost *:8080>
        DocumentRoot "C:/xampp/htdocs/Mysidia"
        ServerName mysidia.dev
<Directory "C:/xampp/htdocs/Mysidia">
    AllowOverride All
        Require all Granted
</Directory>
</VirtualHost>

Code:

        127.0.0.1      localhost
#        127.0.0.1      mysidia.dev
        127.0.0.1:8080      mysidia.dev

I've got both here, just # them out and tried them both - neither seems to work but I'll just paste both.

Code:

<?php
//Mysidia Adoptables Site Configuration File

define('DBHOST', '127.0.0.1:8080');            //DB Hostname
define('DBUSER', 'root');            //DB Username
define('DBPASS', '1234ABC');            //DB Password
define('DBNAME', 'mysite');            //Your database name
define('DOMAIN', 'mysidia.dev');            //Your domain name (No http, www or . )
define('SCRIPTPATH', '/Mysidia');    //The folder you installed this script in
define('PREFIX', 'adopts_');
?>


Is there something I missed?


//I did seem to get this error while trying to access the site through various urls such as "localhost:8080/Mysidia"

Code:

Warning: PDO::__construct(): MySQL server has gone away in C:\xampp\htdocs\Mysidia\classes\class_database.php on line 57

Warning: PDO::__construct(): Error while reading greeting packet. PID=13748 in C:\xampp\htdocs\Mysidia\classes\class_database.php on line 57

Warning: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2006] MySQL server has gone away' in C:\xampp\htdocs\Mysidia\classes\class_database.php:57 Stack trace: #0 C:\xampp\htdocs\Mysidia\classes\class_database.php(57): PDO->__construct('mysql:host=127....', 'root', '1234ABC') #1 C:\xampp\htdocs\Mysidia\classes\class_mysidia.php(220): Database->__construct('mysite', '127.0.0.1:8080', 'root', '1234ABC', 'adopts_') #2 C:\xampp\htdocs\Mysidia\classes\class_mysidia.php(164): Mysidia->loadDb() #3 C:\xampp\htdocs\Mysidia\classes\class_initializer.php(109): Mysidia->__construct() #4 C:\xampp\htdocs\Mysidia\classes\class_initializer.php(45): Initializer->initialize() #5 C:\xampp\htdocs\Mysidia\index.php(68): Initializer->__construct() #6 C:\xampp\htdocs\Mysidia\index.php(78): IndexController::main() #7 {main} thrown in C:\xampp\htdocs\Mysidia\classes\class_database.php on line 57

Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\Mysidia\classes\class_database.php on line 57


Kyttias 02-27-2016 11:51 PM

Oh, ah... set script path to nothing.
PHP Code:

define('SCRIPTPATH''');     //The folder you installed this script in 

It should be looking for mysidia.dev, not mysidia.dev/Mysidia now.

Kasandra 03-02-2016 08:35 PM

Ha, you would not believe this, but there isn't an issue with those files. I've been at this for the last few days, sifting through tens of webpages to try and fix this problem. I've managed to return Xampp to port 80. YES!

Xampp finally says that it is running perfectly.

The only issue now..

I get this when I attempt to open "mysidia.dev"

Code:

Could not connect to database, the following error has occurred:
SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.

Both Apache and MySQL are running, no porblems (or so Xampp says)... so now I've hit yet another brick wall.

EDIT::
OMG I fixed it. Thank you so much Kyttias for digging through this and helping me out. I really appreciate it. <3

Kyttias 03-02-2016 09:17 PM

I'm glad you finally got it all working! :3

NobodysHero 09-25-2016 03:06 PM

I was playing around with the idea of making some themes, but I wanted to test them on an unmodded install. Downloaded the program, everything seemed fine, but I'm getting this:

[25-Sep-2016 19:55:56 UTC] PHP Fatal error: Uncaught exception 'LanguageException' with message 'Language var nonexist does not exist.' in C:\wamp64\www\classes\class_language.php:68
Stack trace:
#0 C:\wamp64\www\classes\class_customdocument.php(82) : Language->__get('nonexist')
#1 C:\wamp64\www\classes\class_frame.php(135): CustomDocument->__construct('index')
#2 C:\wamp64\www\view\indexview.php(7): Frame->getDocument('index')
#3 C:\wamp64\www\classes\class_frontcontroller.php(10 0): IndexView->index()
#4 C:\wamp64\www\index.php(74): FrontController->render()
#5 C:\wamp64\www\index.php(78): IndexController::main()
#6 {main}
thrown in C:\wamp64\www\classes\class_language.php on line 68

Also, it isn't adding me as a user to the database, but it makes the tables and inserts the information on the "settings" tables. So... I don't know what that's about either.

Kyttias 09-26-2016 09:36 PM

At this point you'll have to specify what version of WAMP you installed because WAMP will keep updating it's PHP version and Mysidia is now outdated in the world of PHP and will not run on the latest versions. This is going to be a real problem across the board at hosting companies in a few short years so I hope that Mysidia releases its next version soon. :cfrown:

Anyway, make sure you get WAMP with a PHP of 5.4, 5.6, or 5.8, and not PHP 7.

Hall of Famer 09-30-2016 12:29 AM

There is no PHP 5.8 though, PHP 5.x only goes up to 5.6. If I recall correctly, WAMP's default version is PHP 5.6, though I can be mistaken. But anyway, PHP 7 compatibility is something I am thinking about for version 1.4.0, it will require a considerable change to the core script though.

KatFennec 04-21-2017 05:58 AM

Quote:

Originally Posted by Kasandra (Post 34067)
Ha, you would not believe this, but there isn't an issue with those files. I've been at this for the last few days, sifting through tens of webpages to try and fix this problem. I've managed to return Xampp to port 80. YES!

Xampp finally says that it is running perfectly.

The only issue now..

I get this when I attempt to open "mysidia.dev"

Code:

Could not connect to database, the following error has occurred:
SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.

Both Apache and MySQL are running, no porblems (or so Xampp says)... so now I've hit yet another brick wall.

EDIT::
OMG I fixed it. Thank you so much Kyttias for digging through this and helping me out. I really appreciate it. <3



I've been having this exact same issue, so I'd love to know what you guys figured out...
EDIT: and for posterity, it seems the solution is to download WAMP 2.5 from sourceforge, then follow the instructions on here. it seems to be working properly now.

Hall of Famer 04-21-2017 01:29 PM

Well its important to note that Mysidia v1.3.x isnt compatible with PHP 7, this will change in version 1.4 for sure but to continue with version 1.3, you have to use PHP 5.3 - 5.6.

Riverspell 10-07-2017 11:58 PM

Okay, maybe I'm insane or I'm a lot more of a newb than I thought. But I'm stuck and have now spent a hour trying to fix this. I've gotten all the way to the Installing Mysidia Adoptables section. Accessing localhost/install gives me a 404 error. It says the requested URL /install was not found on this server.

Browsing through other articles (including setting up the script through an actual host) shows people pointing at the config file. The one this tutorial has us change from "config_adopts" to "config". My config file is empty. Is it supposed to be? I redownloaded the files and config_adopts is empty. I'm probably missing something obvious but help would be appreciated!


All times are GMT -5. The time now is 07:51 PM.

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