Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Cant call method "table" on an undefined value at ...........

Quote Reply
Cant call method "table" on an undefined value at ...........
Hi
I was trying to move the Links SQL site to a new server. I successfully exported the whole database to the new site and also copied all the files. But when I am trying to run the cgi files,they throw errors
I get this when I call jump.cgi


A fatal error has occured:
Can't call method "table" on an undefined value at /home/moniker/www/cgi/admin/Links/User/Jump.pm line 30.

Please enable debugging in setup for more details.


Line 30 in Jumps.pm is
my $db = $DB->table('Links');

Also, can anyone tell me the steps to move a Links SQL site to a new server. I think I forgot to change any settings in configuratoin file?
Globus

Quote Reply
Re: [globus] Cant call method "table" on an undefined value at ........... In reply to
Are your use lib '' paths correct?

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] Cant call method "table" on an undefined value at ........... In reply to
Hi Andy
I think so but still please tell me which files to check for the libs path and I will set them correct. There are so many files that I dont know which files to check.
Also, do you have any idea when I click on the link which calls a cgi file like jump.cgi?ID=23235 the database is read. Now where is this db username/password info stored so that I can change the setttings
Thanks much
Globus
Quote Reply
Re: [globus] Cant call method "table" on an undefined value at ........... In reply to
Hi,

The use lib '' lines are in pretty much all the .cgi files, as well as a few of the .pm ones.

You can get a quick list by running this command in SSH/Telnet;

grep -r -l '/your/old/path/to/admin' .

... and that should give you a list of file.

Regarding the DB settings, these are in /admin/defs/database.def.

Hope that helps Smile

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] Cant call method "table" on an undefined value at ........... In reply to
In Reply To:
Hi,

The use lib '' lines are in pretty much all the .cgi files, as well as a few of the .pm ones.

You can get a quick list by running this command in SSH/Telnet;

grep -r -l '/your/old/path/to/admin' .

... and that should give you a list of file.

Regarding the DB settings, these are in /admin/defs/database.def.

Hope that helps Smile

Thanks for the reply
I have changed the db settings in database.def but I am still getting the same errors as above

Globus
Quote Reply
Re: [globus] Cant call method "table" on an undefined value at ........... In reply to
Mmm.. in Setup > Misc, turn "debug" onto "Debugging enabled" .. and then run the page again. Do you get any more interesting debug info, in regards to MySQL? (should give an error about connecting, or the actual MySQL error).

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] Cant call method "table" on an undefined value at ........... In reply to
In Setup > Misc.......

Sorry but which Setup you are talking about?
Globus
Quote Reply
Re: [globus] Cant call method "table" on an undefined value at ........... In reply to
In your admin panel... http://www.yoursite.com/cgi-bin/links/admin/admin.cgi :)

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: [globus] Cant call method "table" on an undefined value at ........... In reply to
After changing the paths in cgi files and making sure the permission is 755, I am now getting the classic error

---------------------
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost.localdomain and inform them of the time the error occurred, and anything you might have done that may have caused the error.
----------------------------
Server logs say the same thing:
Premature end of script headers: /moniker/public_html/cgi/jump.cgi
Quote Reply
Re: [Andy] Cant call method "table" on an undefined value at ........... In reply to
In Reply To:
In your admin panel... http://www.yoursite.com/cgi-bin/links/admin/admin.cgi :)

Cheers
Funny but Same errror when I am calling the admin.cgi
-----------------------------------------------------
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost.localdomain and inform them of the time the error occurred, and anything you might have done that may have caused the error.
--------------------
Quote Reply
Re: [globus] Cant call method "table" on an undefined value at ........... In reply to
You sure /moniker/public_html/cgi/ is your path? It doesn't look right to me.

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] Cant call method "table" on an undefined value at ........... In reply to
I wrote that in a rush
The exact error is
Premature end of script headers: /home/moniker/public_html/admin/admin.cgi
when calling admin
and
Premature end of script headers: /home/moniker/public_html/cgi/jump.cgi
when calling jump.cgi
Quote Reply
Re: [globus] Cant call method "table" on an undefined value at ........... In reply to
Does you're Perl error log show anything?

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: [globus] Cant call method "table" on an undefined value at ........... In reply to
Ah, one thing to check ... are the folders CHMOD 777, or 755? If they are 777, then you may want to try iton 755, and see how that works.

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] Cant call method "table" on an undefined value at ........... In reply to
All folders are 755
I guess I have to overwrite everything again and try?
May I ask referring to my original post again that what are the necessary steps and precautions to be taken while moving the Links SQL site. Any readme as I have lost the Readme which was provided. Also does it matters I opened the cgi files in wordpad and changed the paths and I have heard there is some ascii format restriction
Many thanks
Quote Reply
Re: [globus] Cant call method "table" on an undefined value at ........... In reply to
Anything Andy?
Quote Reply
Re: [globus] Cant call method "table" on an undefined value at ........... In reply to
Have you checked that your database login/prefix/etc info?

Adrian
Quote Reply
Re: [brewt] Cant call method "table" on an undefined value at ........... In reply to
Have you checked that your database login/prefix/etc info?
As far as I think I did but let me know which all files to check for
Thanks
Quote Reply
Re: [globus] Cant call method "table" on an undefined value at ........... In reply to
Check all the info in the admin => Setup => SQL Server. Select the default of " Create new default Links SQL tables in this database but do not overwrite any existing data." (the first option), and press Submit. You shouldn't get any fatal errors (just table already exists warnings).

Adrian
Quote Reply
Re: [brewt] Cant call method "table" on an undefined value at ........... In reply to
In Reply To:
Check all the info in the admin => Setup => SQL Server. Select the default of " Create new default Links SQL tables in this database but do not overwrite any existing data." (the first option), and press Submit. You shouldn't get any fatal errors (just table already exists warnings).
As I already said above admin.cgi is giving errors
Quote Reply
Re: [globus] Cant call method "table" on an undefined value at ........... In reply to
Check your cgi-bin/admin/Links/Config/data.pm file for path errors. If that doesn't work I suggest you back-up your templates and globals.txt and reinstall links (You shouldn't have to change your sql db at all).

Good Luck!

- Jonathan