Gossamer Forum
Home : Products : Others : MySQLMan :

Complete Idiot's Guide please!

Quote Reply
Complete Idiot's Guide please!
Hello programming geniuses!

Please can you help me (complete programming idiot) with getting MySQLMan to work?

I uploaded the files to my server, and have all of them in a cgi-bin directory:

www.mydomain.com/cgi-bin/sqlman/

When I go to the mysql.cgi file via my browser I only get the text file-- no functionality.

Now I realize I have to configure perl files, but which ones minimally and what lines of code do I configure? And how do I integrate these with a database I already created on my server? The HTML pages etc. show up fine but there is no relationship with the mySQL database I created (via ISP provided webpanel).

It’s not clear from the readme files how I install this. Any help would be great!

Thanks!
Roger
Quote Reply
Re: [Roger10] Complete Idiot's Guide please! In reply to
Hi. Heres a quick guide;

1) Upload all the files/folders
2) CHMOD all the .cgi scripts to 755.
3) CHMOD the folders to 777
4) CHMOD the .pl/.cfg files to 666.
5) Edit mysql.cfg (going by memory on this one), so that your paths etc match up.
6) Try running it via a browser.
7) If it works, you need to login with your host (normally "localhost"), and your username + password. Once in, you should see the tables, etc.

Hope that helps.

Cheer

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Complete Idiot's Guide please! In reply to
Thanks! I was wondering about the permissions which are now set as per your instructions.

I am unsure how to edit mysql.cfg. Here's examples of what I did so far:

# FILES

script_url => "http://www.mydomain.com/cgi-bin/mysqlman/mysql.cgi", (I BELIEVE THIS IS THE EXACT URL TO THE CGI SCRIPT)

home_url => "http://www. mydomain.com",

template_dir => $SCRIPT_PATH . "/templates", (THIS IS UNCHANGED)


# CONNECTION

direct_db => 'mysql',

direct_host => 'localhost',

direct_port => '',

direct_user => 'root',
direct_pass => '',

As you can see I left the #CONNECTION config unchanged, so the changes to the cfg file are only in the #FILES config. Is this correct?

Do I need to change any of the cookie settings?

Thank you for your help! It's really appreciated!
Smile
Roger
Quote Reply
Re: [Roger10] Complete Idiot's Guide please! In reply to
This is the only part I would edit in mysql.cfg;

Code:
# FILES
# --------------------------------------------------------
# the URL to mysql.cgi.
# You can set it as "mysql.cgi" to make it relative.
script_url => "mysql.cgi",

# The URL to home/top. It is used for the link TOP on each page
# in the tool bar.
home_url => "/",

# The PATH to the template directory.
template_dir => $SCRIPT_PATH . "/templates",

Examples;

home_url => http://www.yoursite.com/cgi-bin/mysqlman/

..and thats it :) Most servers should be able to handle this little amount of configuration, and MySQLMan is pretty good at picking up paths, etc :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Complete Idiot's Guide please! In reply to
Okay,

Hmm, things are still not working.

This is what I have

# FILES
# --------------------------------------------------------

script_url => "http://www.mydomain.com/cgi-bin/mysqlman/mysql.cgi",

home_url => "http://www.mydomain.com/cgi-bin/mysqlman/",

template_dir => $SCRIPT_PATH . "http://www.mydomain.com/cgi-bin/mysqlman/templates",

I set the permissions as specified, but the README file has slightly different permissions (e.g., the README file says to set pl and pm files to 644 and the folders to 755...?)

I set the perl path (top of cgi files) to #!/usr/local/bin/perl which is correct.

Any suggestions?!!! Crazy
Roger
Quote Reply
Re: [Roger10] Complete Idiot's Guide please! In reply to
Quote:
I set the permissions as specified, but the README file has slightly different permissions (e.g., the README file says to set pl and pm files to 644 and the folders to 755...?)

It all depends on what server you are on. Most servers will give an error if trying to write to a 644 CHMODed file (permission error). I normally leave files that needs to be modified by the script, on 666 CHMOD.

Quote:
Any suggestions?!!!

I'll have a quick look for you if you want. Shouldn't take long :) (he says Tongue).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Complete Idiot's Guide please! In reply to
Hi Andy,

I think I need some help here!

The files are here:

http://www.xxx.com/cgi-bin/mysqlman/

Don't tell anyone! Wink

I am also wondering about this message in mysql.cgi

# Auto set the path. If the path is not set automatically then
# uncomment the following line and fill in the full path.
#
# use lib '/path/to/MySQLMan';
#
# (You may need change the auto set path part of mysql.cfg as well.)

???
Roger

Last edited by:

Andy: Jun 29, 2004, 6:44 AM
Quote Reply
Re: [Roger10] Complete Idiot's Guide please! In reply to
Hi. It looks like Perl isn't setup on your server correctly?

A quick fix would be to make a new .htaccess file, with the following contents in it;

Code:
AddHandler cgi-script .cgi

.. and then upload it to the /cgi-bin folder (so you can run other cgi scripts too).

Otherwise, if that doesn't work... it means one of 2 things;

1) Perl isn't setup on your server (or at all)
2) Your ISP needs to edit the main httpd.conf file for you, as you don't seem to be able to specify your own .htaccess files.

Hope that helps :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Complete Idiot's Guide please! In reply to
Hi Andy,

I changed the perl path which is definitely
(I checked with the ISP).

Now when I look at mysql.cgi in the browser I get a Forbidden error message which suggests something is now working...

Forbidden
You don't have permission to access /cgi-bin/mysqlman/mysql.cgi on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

But I did set the permissions for the mysql.cgi to 755 so I am not sure if this has something to do with it...
Roger

Last edited by:

Roger10: Jun 29, 2004, 7:33 AM
Quote Reply
Re: [Roger10] Complete Idiot's Guide please! In reply to
That looks a bit better. Are you sure mysql.cgi is CHMODed to 755?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Complete Idiot's Guide please! In reply to
Yes, I doublechecked (see edited thread)
Roger
Quote Reply
Re: [Roger10] Complete Idiot's Guide please! In reply to
Whats the /mysqlman folder CHMODed to? 777 or 755? If its 777, then give it a go with 755 (some servers don't like 777 CHMODs on folders that need to run a .cgi script).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Complete Idiot's Guide please! In reply to
It's set to 755 so I don't think that's it. Let me think a bit more and soon I'll have another question!
Roger
Quote Reply
Re: [Roger10] Complete Idiot's Guide please! In reply to
I am wondering if this code in the cgi file might be causing a problem...

# Auto set the path. If the path is not set automatically then
# uncomment the following line and fill in the full path.
#
# use lib '/path/to/MySQLMan';
#
# (You may need change the auto set path part of mysql.cfg as well.)

But I don't see how to do this. Any suggestions, please! Unsure
Roger