Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Dummy qn but is this right? > abt crontab

(Page 2 of 2)
> >
Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
Path finder scripts are "cute" but unnecessary if you already have shell access to your account. Learn some UNIX commands.

Regards,

Eliot Lee
Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
Try using the complete FULL PATHS in the require statements in the nph-build.cgi script.

Regards,

Eliot Lee
Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
Why not give people a choice. Some might prefer to issue UNIX commands to get the correct path - some people might like to use a path finder instead.

Thanks anyway Eliot.

"This is not a recording" Smile

Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
The only var that is not in full path is links.cfg so i put that in full path...

by the way, i dun know why i cannot run nph.build.cgi in telnet? http://lazyjuice.com/downloads/telnet3.gif



Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
Probably down to the CHMOD settings on it, and the other files. Also, be careful when using Telnet to run nph-build.cgi as it automatically CHMODs the links.db to 644, which then means you have to re-chmod it to 666 before you can run nph-build.cgi successfully from a browser.

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
Uh...permissions have already been set to 755 as this user has already stated. It is not a permission problem, Andy.

Regards,

Eliot Lee
Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
Maybe you have to use a SSH (Secure Shell) connection when you connect instead of the plain telnet. You can download a telnet and SSH program from the following URL: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

EXAMPLE OF CONFIGURATION

***BUILD LINKS SH**

# Rebuild Links pages and log actions
/www/username/cgi-bin/linksfoldername/admin/nph-build.cgi > /www/username/cgi-bin/linksfoldername/admin/logs/build_links.log


******END OF EXAMPLE****

**MYCRON.TXT*****
# (Re)Build the Links HTML Files each day at 11:00 p.m.
23 * * * /home/username/build_links.sh

***END OF EXAMPLE***

Try to use these two examples for your text files. The linksfoldername has to be replaced with the name for the folder that you use for your links files (same as in links.cfg)

Try to use a ssh connection instead. Hope it works.

Joe,


Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
1. some1 from my webhosting company said this

In Reply To:
This has got to do with the nph-build.cgi itself. Most probably, it's written is such a way so that it does not allow itself to be run from telnet/shell. You may need to spend a bit of time trying to debug that script.
He is pointing fingers at nph-build.cgi. I can't run it in telnet. help~~~

2. i shall try ur suggestion > Joe_G

3. by the way... why did my webhosting company instruct me to put
In Reply To:
The very first line "#!/bin/sh" is important. After that, chmod to 744.
Cos you ppl need not use that and he told me i need.. so should i use or not...



Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
Did you upload the files to your root directory? Do not put them in your htdocs folder.

Good luck

Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
Nope... they are in /htdocs dir.

Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
Try this

build_links.sh

# Rebuild Links pages and log actions
/www/lazyjuice/cgi-bin/searchsg/admin/nph-build.cgi > /www/lazyjuice/cgi-bin/searchsg/admin/logs/build_links.log


mycron.txt

# (Re)Build the Links HTML Files Every 6 Hours at 1/7 a.m. and p.m.
0 1,7,13,19 * * * /home/lazyjuice/build_links.sh

Do not forget to issue the cron tab command again for mycron.txt by using your telnet or ssh connection

Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
That is the problem - put them in your root directory.

Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
u mean /home/lazyjuice/build_links.sh ???

okie i try later.. but i still cannot run 'perl nph-build.cgi'

Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
Put these two files in your root directory:build_links.sh and mycron.txt

Make sure that you change the path as I explained earlier on.

If you use telnet to 'manually' execute nph-build you need to do the following.

After you have logged in using telnet you need to issue the following command:

cd htdocs/cgi-bin/searchsg/admin

Click Enter

Write the following: nph-build.cgi

Click Enter

BTW:
I advised you earlier on to use www in your path - use htdocs instead

Good luck




Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
In Reply To:
cd htdocs/cgi-bin/searchsg/admin

Click Enter

Write the following: nph-build.cgi

Click Enter
if u are telling this will run nph-build.cgi. i didn't work...

Can anybody address my problem of y nph-build.cgi cannot run in telnet? I am quite sure this is y crontab cannot execute nph-build.cgi...



Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
Ask your web hosting company if you are allowed to run nph files via telnet?

Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
my recent email to him and his answer... i didn't understand anything... what should i ask him? *i sound very silly*

In Reply To:
Hi!

I suppose that you are referring to 'non parsed headers' when you use the term nph. If that's the case, what does nph files has to do with telnet?? nph is a web server issue.

You can however run any cgi scripts via command line (telnet).

If you can be more verbose on what you are trying to do, then we can be of better help to you.

cheers!
/shaoming
Support Team

----- Original Message -----
Sent: Saturday, May 26, 2001 9:25 AM
Subject: Fw: Query

----- Original Message -----
Sent: Friday, May 25, 2001 1:14 PM
Subject: Query



Hi

Am I allowed to run nph files via telnet?

Regards,
Guy

Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
I have seen the telnet error mentioned before due to file/folder permissions. When the nobody user is associated with files/folders, your root account no longer has access to them, which in some servers causes the error you receive.

What you should try to do is the following:

1) Delete all pages in the links/pages folder.
2) Change the permission to the links/pages folder to 777 (chmod 777).
3) Manually re-create the following folders in the links/pages folder:

Cool (chmod 777)
New (chmod 777)
Ratings (chmod 777)

4) Then run the nph-build.cgi script.

Code:

perl nph-build.cgi


That will retain your root account access to the files, which will enable crontab to execute the shell file successfully.

If this does not work, then I would suggest applying the NPH fixes posted in the Links 2.0 Installation-UNIX forum.

Regards,

Eliot Lee
Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
okay.. few qns b4 i plunge into it...

1. must i execute those in telnet? deleting pages, change permissions etc.

2. when u say delete all pages, are u referring to the index files in all the directories?

3 I only have to create the 3 folders... cool, new and ratings. so i must delete them first. msut i also delete the other dirs generated by the categories

Thanks alot... for really using ur time to help...

Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
1) It is best to delete all the pages via FTP. You can change permissions either via FTP or telnet.

2) Yes, I mean ALL the files/folders within your links/pages folder.

3) Delete them first, as I stated, and then re-create them either via telnet or FTP. Then change the permissions.

Regards,

Eliot Lee
Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
nopezzz... it didn't work... didn't get my nph-build.cgi to run, http://lazyjuice.com/download/telnet3.gif same error



Quote Reply
Re: Dummy qn but is this right? > abt crontab In reply to
Try to upload a new fresh nph-build.cgi file to your server. Yes, you can run nph files. Another problem is that if you have executed nph-build.cgi via your browser then sometimes it is not possible to execute it via telnet.

Solution:

Try to create a 'test' new folder where you can build your link pages (not in the cgi-bin) include an index.html file in the folder.

Change your links.cfg so that it contains the new foldername instead of the old one.

Hopefully this will do it - otherwise I am sure that one of the Perl gurus like Eliot, Glennu etc will have an answer.

REMEMBER TO BACKUP YOUR FILES FIRST!!!!!!!!
Anyway,

Good luck

> >