I Need An Idiots Guide

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I Need An Idiots Guide

    i would be really grateful if some one could exoplain or post a link to show how i install and setup a script availible here , how to set database etc in php; i have tried and failed a few times , pls help


    ps its chat script if that makes any difference

    if some one can help id be even willing to pay a little :D

    #2
    <div class='quotetop'>QUOTE (doctorbob @ Nov 13 2008, 10:23 PM) <{POST_SNAPBACK}></div>
    i would be really grateful if some one could exoplain or post a link to show how i install and setup a script availible here , how to set database etc in php; i have tried and failed a few times , pls help


    ps its chat script if that makes any difference

    if some one can help id be even willing to pay a little :D[/b]
    Upload files to server the folder depends on server it can be htdocs,html but in most cases it is public_html then create a mysql datbase in your cpanel then go to phpmyadmin click on the database youve just created then click on sql->file import and upload the sql file then go to yor file manager and add the mysql datas in it

    Hope this helps a bit

    PHP Code:
    foreach ($_SERVER as $server => $value)
    {
    echo 
    "$server is $value<br />";

    Comment


      #3
      <div class='quotetop'>QUOTE (drwap @ Nov 14 2008, 03:03 PM) <{POST_SNAPBACK}></div>
      Upload files to server the folder depends on server it can be htdocs,html but in most cases it is public_html then create a mysql datbase in your cpanel then go to phpmyadmin click on the database youve just created then click on sql->file import and upload the sql file then go to yor file manager and add the mysql datas in it

      Hope this helps a bit[/b]

      that helps ive done every thing up to and including ( i think) sql-import..... before and i always get a 500 internal server error , on reading your post i see there is another step......(then go to yor file manager and add the mysql datas in it )

      this part i dont understand......

      where do i add them , do i copy them from the sql-data base which folder etc

      i apologise for the noob questions i am really trying to understand.... but dont lol

      Comment


        #4
        u have to add database name hostname databaseuser database password.
        mostly in config.php or config.inc
        sigpic

        Comment


          #5
          ive done that still get a 500 internal error message

          Comment


            #6
            humm rename .htaccess to php.ini or delete it.
            sigpic

            Comment


              #7
              ok slowly getting there.......

              now i gety this

              Error! Cannot Connect To Database...


              This error happens usually when backing up the database, please be patient...

              and thanks everyone for helping

              Comment


                #8
                <div class='quotetop'>QUOTE (doctorbob @ Nov 14 2008, 09:30 PM) <{POST_SNAPBACK}></div>
                ok slowly getting there.......

                now i gety this

                Error! Cannot Connect To Database...


                This error happens usually when backing up the database, please be patient...

                and thanks everyone for helping[/b]
                then you got the wrong dbsettings it hast to be like
                Code:
                <?php 
                 $dbname = "your database";
                $dbhost = "localhost";
                $dbuser = "your user name for mysql";
                $dbpass = "your password for mysql";
                $max_buds=100;
                $topic_af = 20;
                $post_af = 15;
                $onver = true;
                ?>
                in config.php

                PHP Code:
                foreach ($_SERVER as $server => $value)
                {
                echo 
                "$server is $value<br />";

                Comment


                  #9
                  Setting up most php scripts

                  1. Get yourself a suitable server. If you do not know how to install web server software and you don&#39;t know someone who you can trust with the passwords to do it for you find a host that installs such software for you. If your host provides a web administration panel such as CPanel they will usually install a lot of software for you in order for them to setup that panel (only a very few use languages that do not require web server software and they are rarely seen used).

                  The software you need to run a php site is:
                  • HTTP web server software (apache is most common. I prefer lighthttpd others like nginx and some weird people like MS IIS)
                  • PHP
                  • MySQL


                  Thats all you need for a basic PHP site. Most people also like to have Perl, C, C++ and Python interpreters.

                  It is also a good idea to install PHPMYADMIN which is a web based php driven mysql database manager which lets you interface with teh MySQL server very easily. You can install this using most package management utilities (i.e. apt-get install phpmyadmin) if not you can download teh files and set it up manually. There are many tutorials found via google for helping do this.


                  2. You now need to upload your files to the www serving directory. This is usually /var/www/ on dedicated servers however if your using something like plesk or cpanel to manage the server it could be something like /var/www/vhosts/domain.com/httpdocs.... It&#39;s up to you to find this, generally if your not sure you can either view your httpd.conf file for the path info or if your using a web panel nearly all of them have an upload utility which will place your files in the correct serving directory.

                  3. Next is to setup your database. Some scripts come with installers so you just enter the DB info and it will do the rest, others come with an SQL file which you must run to create ur tables. This is where PHPMYADMIN will help. Simply login to your database via PHPMYADMIN and then create a new database. After that select the SQL tab, copy the sql file contents into the execute box and click the button. Remember there are many ways to import sql files from SSH CLI and web administration tools such as PMA, to SQL import scripts liek big dump and auto installers which can come with some scripts. Which way you import is a user preference.. personally i like PMA as its easier than CLI but still gives me teh power to change stuff before executing and reading what is actually going on.

                  4. Now every things setup you can use your site. However you will most likely notice a few errors mainly to do with database connections. This is because teh script creators cant dynamically change and guess what your passwords gonna be obviously. You need to find the config file. This can be named anything. Generally just find a script where a few variables are setup for mysql connections nearly all developers will have a core script for holding this information. Fill in the required variables according to your server. for example it might be something like
                  Code:
                  $dbhost = "locahost"; //Where your mysql server is , for most people this should be left as localhost
                  $dbuser = "xxxxx"; //The user used to connect to the database. This user must have priveleges on the tables of the site
                  $dbpass = "xxx";   //The password of the above user
                  $dbname = "wapsitedb"; //The name of the database you created before importing teh sql files
                  save and now your site should work. Make sure to check all the included files for variables that you may need to setup such as directory and root data. every script is different but most provide readme files to tell you what requires changing.

                  note: You can usually use the root user for mysql however thats a big security risk. Use google to find a tutorial on how to add a new user to your database for your sites use only. or if your using a web panel like cpanel or plesk that should talk you through the procedure. Generally always create a new user for each database you need. It keeps things more secure

                  --------------------

                  hope that helps anyone somewhat.. it is a very dirty tutorial. Its impossible to write a full tutorial without it being confusing since there are so many ways of doing this and every way of doing something has 100&#39;s of other sub-routes to follow. But it should give a basic understanding at least lol

                  Comment


                    #10
                    thanks loads every one and thanks djlee , for taking the time to post all that , im still not getting much further but there you go lol; ive followed all the steps and read the instructions etc but still end up withit not finding the data base !!!! , tried with both using localhost and mysql4.freehostia.com, but tghere you go maybe im just copying the database wrong at some point , .... or im not activating it anyway ill give it a rest for today and give it a fresh go/ install tomorrow , night all im of to play freespace scp multio......

                    Comment

                    Working...
                    X