PDA

View Full Version : Total n00b here


Killgore
01-18-2009, 08:10 PM
I'm completely new to PHP, so I'm almost clueless on how to make this work. BUT, i am very good with HTML and CSS so i'm not entirely new to some of these things. so if there's anyone who's willing to give me a walkthrough, I'd be eternally grateful.

BMR777
01-18-2009, 08:21 PM
Fisrt thing to do is get yourself a hosting account somewhere.

Then in the hosting account find the MySQL database section. If using CPanel you can look and find the MySQL Database Wizard which will guide you through the process of creating a database, database user and password. Write these down as you'll need them later.

Then, using an FTP program upload the files inside the adoptables folder to somewhere on your website.

Then open the file inc > config.php in the adoptables download package and insert the info for your site, such as database username, password and database name, plus domain name and script path. See the file for more info. Then re-upload the config.php file, copying over the blank one you had previously uploaded.

Then in your CPanel find the PHPMyAdmin link or icon and click. Then when the page loads click on your database that is listed on the left. Then once the next page loads, click on the "SQL" icon that says SQL on the left, should be the middle icon. In the box that loads paste the contents of sql.txt from the download package in the box and submit.

Then in CPanel go into the legacy file manager and locate your inc directory. On the right you'll see something like file permissions or CHMOD or something. Set the files levels.php and settings.php to CHMOD 777, or check all the boxes. :)

That should be all. :)

BMR777

Killgore
01-18-2009, 09:46 PM
how do i find the database info for the config?

BMR777
01-19-2009, 09:21 AM
how do i find the database info for the config?


When you create the database that is the info. So when you create the database, write down the name of the database and use that. Same for database user and password. You specify these when you make the database. :)

Killgore
01-19-2009, 04:27 PM
i think i did something wrong. none of the pages are coming up as they should (and if they are, they look rather bland, don't they?)
most of them show up as just plain text, except the admin login page. and when i try to log in, it says the url isn't found. do i have to go to the files and manually change the urls for every single document?

BMR777
01-19-2009, 05:33 PM
What is the url / link to your site? Did you upload the template files? If you're missing the templates that would explain the bland look.

Killgore
01-19-2009, 05:42 PM
http://sylonia.superihost.com/index.html

that's my site so far. my goal is to make the template look like what i have done so far.

i uploaded the whole winzip file to my host. my host had an "Unpack" option, so i unpacked it and everything's there. i think so, anyway. i don't have links to the adoptables part yet, so i'll just give you a link to that part.

http://sylonia.superihost.com/adoptables/account.php

something's wrong with the config file then. hmm.....can i PM you with my database info?

BMR777
01-19-2009, 05:46 PM
PM me with the database info provided by your host along with the current content of your config.php file and I'll take a look.

I think the issue is that for the database host you may need to put "localhost" instead of "http".

Also, since your host forces ads on all pages of your site not all features of my script will work properly. :(

BMR777

Killgore
01-19-2009, 05:54 PM
alright, sent. would it be easier if i switched to a new host?

BMR777
01-19-2009, 05:58 PM
Well, some things won't work on your current host because of the forced ads, mainly the BBCode that users will use to have people click on their adoptables won't work fully because of the ads and a problem they cause with the part of the script that shows the images for the adoptables in the BBCode.

For best results, switch to a host without forced ads, but it will still run on your current host, just not 100%.

BMR777

Killgore
01-19-2009, 06:57 PM
now i have another problem. i uploaded the new config file, and this (http://sylonia.superihost.com/adoptables/account.php) is what happened. maybe i need to insert the URLs and extra info in all of the files manually on all of the pages?

EDIT: i'm having all sorts of trouble here. i can't get anything to work right. i have CoffeCup HTML editor downloaded, which shows me what the codes are doing on a web browser, and it shows nothing but the words, letters, symbols, and numbers. i'm very confused. would it be possible to download the website creator, then use that to make the adoptables site?

BMR777
01-20-2009, 05:20 PM
Double check your config.php file, make sure you didn't accidentally remove a quote or variable name when you saved it. Errors could be caused by you forgetting to put something in config.php.

Brandon

Killgore
01-20-2009, 09:54 PM
i think everything is set up correctly except the DB Hostname. how would i find that? get a URL or something?

BMR777
01-21-2009, 03:56 PM
i think everything is set up correctly except the DB Hostname. how would i find that? get a URL or something?


This is usually just localhost but some of the free web providers use something different. Contact your host, they'll be able to tell you which database host to use. :)

Killgore
01-26-2009, 11:44 AM
can you show me an example of a correct config.php file? i still can't manage to get it to work right, and i even switched hosts

BMR777
01-26-2009, 04:01 PM
What errors do you get? The errors you get will determine the solution. If using a free host it could be the same issue, they use non-standard database hosts or something and you have to change the config.php accordingly.

BMR777

Killgore
01-28-2009, 11:42 AM
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/sylonia.freehostia.com/adoptables/account.php on line 14
Error connecting to mysql database!

I get that every time, and when i don't it's usually an unexpected * on line 81. then i fix it, and it goes right back to that message

agnyz
01-28-2009, 01:00 PM
Need to post your config settings please.[hr]
Kilgor you want me just to make you one that works? I can host it and set you up an ftp account so you can upload your pictures and change stuff if you want.

Click the link in my signature for more informaiton.

Killgore
01-28-2009, 01:39 PM
that sounds pretty good, but i have a million junk mail, so i don't think i'd see your response. And if i took you up on your offer, would i still be able to edit the files and upload new ones?

agnyz
01-28-2009, 10:21 PM
that sounds pretty good, but i have a million junk mail, so i don't think i'd see your response. And if i took you up on your offer, would i still be able to edit the files and upload new ones?


Like i said i can give you ftp access to that you can do whatever you want with anything inside your folder, you can run a complete website from there i don't care.

If i made the you an account on my site and set the program up. If you just deleted the config.php file from the copy of the script you have, you could alter the script all you wanted and upload it via ftp without damaging the database connection.

Like i said i don't charge anyone for this i just like to help people.

The email thing i understand, just use the messaging system in this fourm to contact me.

Killgore
01-30-2009, 11:58 PM
Well, i didn't see much sense in starting a new topic for this, but is there a way we can edit the adoptables? Like pokeplushies.com, i want to have a specific image, and then have it change to another at a specific time, rather than a specific level.

BMR777
01-31-2009, 08:55 AM
Currently there isn't an easy way to edit adoptables, but look for this in future releases. :)