You need to upgrade your Flash PlayerInstall Flash Player..

FAQ Stats:
 
FAQ Categories:
FAQ Questions:
[ 10 ]
[ 145 ]
    FAQ Search   
 
 



My FAQ >> CGI Scripts and Databases:

  1. Can I use the Ultimate Bulletin Board (UBB.classic) forum on my site?
  2. Can you help me troubleshoot my script?
  3. Do you allow CGI to run on your servers?
  4. How can I troubleshoot an Internal Server Error?
  5. How do I create a MySQL Database?
  6. How do I create a mySQL User and grant them permission to a certain database?
  7. How do I setup Hit Counters, Guestbooks, etc?
  8. I am unable To Delete CGI Related Files.
  9. I keep getting a 500 Internal Server Error. Why?
  10. What are the basics of installing scripts?
  11. What is CGI?
  12. What is PHP?
  13. What is the exact physical path to your root directory on the webserver?
  14. What is the path to ...?
  15. What permissions should I use?
  16. What version of mySQL are you currently running?
  17. What version of Perl are you running?
  18. What version of PHP are you running?
  19. Where can I learn how to use PHP?
  20. Where can I put my CGI scripts?
  21. Where do I put scripts?
  22. Why am I getting a 403 Forbidden Error?
  23. Why does my CGI script give me a Permission Denied Error?
  24. Why doesn't my CGI work?
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1. Can I use the Ultimate Bulletin Board (UBB.classic) forum on my site? [top]
    No. We only accept PHP-based forum boards like phpBB, VBulletin, UBB.threads, etc. Any flat-file database forum like UBB.classic is not permitted on our server due to their extensive overuse of the CPU/memory.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  2. Can you help me troubleshoot my script? [top]
    Our support team would be more than happy to help you with any problem you encounter. However, we will only provide free support for our system and services. We will help you with basic problems associated with getting scripts running, but if you need help with third-party software, contact the authors of that software.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  3. Do you allow CGI to run on your servers? [top]
    We do allow running of cgi scripts on the servers, however they must conform to our acceptable usage policy. If we deem that a script is using an excessive amount of server resources, it will be disabled.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  4. How can I troubleshoot an Internal Server Error? [top]
    Log in to your account with SSH and test your script. To do this, go into the directory in which your script is located, then execute the script.

    simply type "/usr/bin/perl myscript.pl"


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  5. How do I create a MySQL Database? [top]
    To create a mysql database, log into your control panel and select the 'MySQL Databases' link. Enter in the name of the database you want to create and submit it.

    Once you have created a database you must create a database user and then grant that user access to the database you created. This is all done through the same mysql manager page.

    Once you have a mysql database and username you can manage it via your shell account, or via phpMyAdmin which is located in your control panel.

    Make sure you are using the correct login/password and database name as listed on the mysql manager as they will not be exactly the same as the name you entered in when you created the database.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  6. How do I create a mySQL User and grant them permission to a certain database? [top]
    In Telnet/Shell type: "mysql"

    This will load the mysql command line. Next type:

    GRANT ALL PRIVILEGES ON [database].* TO [username]@[domain] IDENTIFIED BY '[password]';

    (where "[database]" is the database you created earlier, [username] is the mysql username you want, [domain] is the domain you'll be connecting from (usually 'localhost') and [password] is the password you'd like to use. Be sure it's enclosed in 's.

    For example:
    GRANT ALL PRIVILEGES ON mydatabase.* TO bob@localhost IDENTIFIED BY 'fruitfly';


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  7. How do I setup Hit Counters, Guestbooks, etc? [top]
    We have a collection of CGI scripts that are already pre-installed on your hosting account. Some of these CGI scripts include: A hit counter, web clock, Guestbook, FormMail, Search Site and more! You can find these scripts within your control panel. To access them click "Scripts & DB -> Pre-Installed CGI Scripts"


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  8. I am unable To Delete CGI Related Files. [top]
    If you have any files or folders that were created by a cgi script running on your account, you will be unable to modify or delete these files because they were created by the user 'nobody' (the webservers itself). To get these files deleted please send in a ticket and include your login/password.


    Timestamp: 05/26/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  9. I keep getting a 500 Internal Server Error. Why? [top]
    There are many different possibilities. If you have a problem, misconfiguration, or syntax error in you script, you will probably be able to find it by checking your error logs which can be found in your control panel under "Statistics -> Show Error Logs".
    Although this is generally caused by a problem within the script, many times it is caused by incorrect file permissions either on the script itself, or another file or directory used by the script.
    You should also verify that the script paths are set correctly.

    You should verify that the first line of your script is the path to Perl, and that it is correct. It should be set to:
    /usr/bin/perl
    OR
    /usr/local/bin/perl

    You should also verify that the scripts were uploaded in the correct mode (ASCII or Binary - check the readme for the scripts to see any special instructions. Normally it is ASCII).

    Another problem could be permissions of the file or directory. Your script permissions should be 755, or rwxr-xr-x. Do Not make your CGI scripts 777 (or rwxrwxrwx). This would make them editable by other customers on the same server. In fact, if your script contains password information to connect to a mySQL database, you should make them 700 (rwx------) so no one else would even be able to read them. The same thing applies to directories where the scripts reside.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  10. What are the basics of installing scripts? [top]
    1) Be sure the file permissions are set correctly on the cgi that you are trying to run start with 755.

    2) Always upload and download a cgi in ASCII transfer mode.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  11. What is CGI? [top]
    CGI, Common Gateway Interface, includes programs that run on the server to enhance the quality and functionality of a web site.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  12. What is PHP? [top]
    The folks over at PHP.net say it best... "PHP is a server-side, cross-platform, HTML embedded scripting language." In other words, PHP is a programming language, similar to HTML, but is parsed by the server, rather than the browser. It is often used with databases to build sites with dynamic content.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  13. What is the exact physical path to your root directory on the webserver? [top]
    The path to your root directory is:
    /home/username/

    Obviously, substitute "username" with the login you were assigned when you first received your account details. Also, keep in mind that when you configure your CGI, that your /public_html is included in your path. For instance, if you have a guestbook.pl script in your /cgi-bin, the exact physical path to that file is:
    /home/username/public_html/cgi-bin/guestbook.pl


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  14. What is the path to ...? [top]
    The paths to some commonly used programs for CGI scripts, mySQL and others are:

    Perl: /usr/bin/perl
    Perl 5: /usr/bin/perl5.00503
    Sendmail: /usr/sbin/sendmail
    Date: /bin/date
    PHP: /usr/bin/php
    mySQL: /usr/bin/mysql
    Document Root: /home/username/
    WWW Directory: /home/username/public_html/
    CGI Directory: /home/username/public_html/cgi-bin/


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  15. What permissions should I use? [top]
    All scripts as well as the directories that contain them, should be set CHMOD 755 unless they contain passwords.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  16. What version of mySQL are you currently running? [top]
    We are using 3.23.32 for our mysql server.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  17. What version of Perl are you running? [top]
    We are running Perl v5.6.1. The path to perl is: /usr/bin/perl


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  18. What version of PHP are you running? [top]
    We are currently running PHP version 4.1.2 with cache. By utilizing a Cache Engine your scripts will run up to 300% faster.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  19. Where can I learn how to use PHP? [top]
    The creators of PHP also provide an excellent tutorial on how to use it at http://www.php.net/tut.php. There are plenty of other resources out there, as well.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  20. Where can I put my CGI scripts? [top]
    CGI scripts are executable from anywhere within your "public_html" directory, or from within the cgi-bin directory in your home directory. If you use Microsoft FrontPage, it is recommended that you put them within your cgi-bin directory so FrontPage will not change your permission settings on these files.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  21. Where do I put scripts? [top]
    You may place your scripts in any directory you'd like within the "www" directory, but you will stay better organized if you place them in the subdirectory named "cgi-bin".


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  22. Why am I getting a 403 Forbidden Error? [top]
    A 403 Forbidden error occurs when the web server finds itself with insufficient permissions to run your script.

    Make sure you have given the script proper permissions. In SSH, this is accomplished with:
    chmod 755 scriptname.cgi

    If you are uploading via FTP, your FTP client probably has some facility for setting file permissions. You want to make sure that all choices (user, group, and other) have execute permission.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  23. Why does my CGI script give me a Permission Denied Error? [top]
    CGI scripts need to be set executable. You need to change the mode, or permissions, of your programs with your FTP program, and make them 755, or rwxr-xr-x.

    Note: A lot of scripts out there will tell you need to make them 775 or even 777. This is not good! It means anyone on the server can write to your script, and since its executable and executes as you, it could delete all your files!


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  24. Why doesn't my CGI work? [top]
    Make sure when you upload the CGI file DO NOT upload in binary mode, instead use ASCII mode. Uploading in binary will cause the server not to recognize the scripts as executables. Most FTP clients will upload .pl or .cgi files in binary mode by default so you will need to change this. You will need to upload the scripts into your cgi-bin directory for security reasons, however they will execute from anywhere within your account.

    The last step is to set the file permissions. This is otherwise known as chmoding and can be done from most FTP clients. Make sure you CHMOD your scripts to "755" otherwise you will get errors.


    Timestamp: 05/25/2003
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

 
Copyright © 2005 by EggStream WebHosts. All Rights Reserved.
Click Here to Read our Terms of Service.