FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » NNTP.PHP without PHP-binary
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
NNTP.PHP without PHP-binary [message #6966] Wed, 30 October 2002 07:43 Go to next message
belmax is currently offline  belmax   Russian Federation
Messages: 114
Registered: October 2002
Location: Saint-Petersburg, Russia
Karma: 0
Senior Member
My hosting-provider dont give access to PHP-binary.

I put in CRON command:
GET http://www.rustrubprom.ru/some_path/nntp.php?1 > /dev/null

I give to myself access to folder "scripts"

Cron successfully eat this command.

But i have some troubles with variable "register_argc_argv" in first row of NNTP.php:
#!/usr/bin/php4/php -d register_argc_argv=1 -q

Can you help me change this procedure?

Can I write parameters of my forum in this script directly, without using his variables?

Thanks for your help.


sorry for my poor english Smile
Re: NNTP.PHP without PHP-binary [message #6970 is a reply to message #6966] Wed, 30 October 2002 12:34 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
If you are going to be running it via the web you need to remove the 1st line of the script. and pass the required arugment like this: nntp.php?argv1=1

Then you need to modify the script itself and change the following:
 if( $HTTP_SERVER_VARS['argc'] < 2 ) exit("Missing Forum ID Paramater\n");
        if( !is_numeric($HTTP_SERVER_VARS['argv'][1]) ) exit("Missing Forum ID Paramater\n");

        /* Switch to the scripts directory */
        chdir(dirname($HTTP_SERVER_VARS['argv'][0]));


The code you need to change this too will need to set appropriate values to:
$HTTP_SERVER_VARS['argc'] - number of arguments (2)
$HTTP_SERVER_VARS['argv'][1] - the numeric argument (argv1)
$HTTP_SERVER_VARS['argv'][0] - full path to current script


FUDforum Core Developer
Re: NNTP.PHP without PHP-binary [message #6972 is a reply to message #6970] Wed, 30 October 2002 14:20 Go to previous message
belmax is currently offline  belmax   Russian Federation
Messages: 114
Registered: October 2002
Location: Saint-Petersburg, Russia
Karma: 0
Senior Member
Thanks, Ilia

sorry for my poor english Smile
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Newsgroup import
Next Topic: MySQL Tables
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 09:40:13 GMT 2024

Total time taken to generate the page: 0.02561 seconds