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

Home » General » PHP discussions » Launching a php script file
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Launching a php script file [message #160300] Mon, 17 August 2009 00:09 Go to next message
wittrs is currently offline  wittrs   United States
Messages: 134
Registered: August 2009
Karma: 0
Senior Member
If I have a php file in the scripts directory of FUDforum, and it contains the right php binary executable path (or whatever), then the script will be executed, right? Nothing else I have to do to get it to run?

You guys provide a generic version of the script at the top of the maillist.php file. It is this:

#!/usr/local/php/bin/php -q

My hosting company said that ours is this:

#!/hsphere/shared/php5/bin/php -q

I have this placed at the top of maillist.php and also popfud.php. My question is, will these scripts be automatically started, and how does the computer know which script to access first? I'm just wondering if there is not something else I should do to get them to execute. Because, as far as I can tell, the files aren't doing anything.

Thanks and regards.
Re: Launching a php script file [message #160301 is a reply to message #160300] Mon, 17 August 2009 02:37 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
You also need to chmod the file to make it executable. Otherwise you can execute it with:
/hsphere/shared/php5/bin/php -q /path/to/maillist.php
Re: Launching a php script file [message #160305 is a reply to message #160300] Mon, 17 August 2009 17:34 Go to previous messageGo to next message
wittrs is currently offline  wittrs   United States
Messages: 134
Registered: August 2009
Karma: 0
Senior Member
Two questions:

1. Do I run BOTH scripts (popfud & Maillist.php), or does the running of one call into action the other?

2. I ran both scripts. But I am getting an error ONLY for maillist.php. It says:

sh: /hsphere/local/home/ludwiggroup/FUDforum2/scripts/maillist.php: Permission denied

Why is it denying me permissions?

Thanks and regards
Re: Launching a php script file [message #160307 is a reply to message #160305] Mon, 17 August 2009 17:50 Go to previous message
wittrs is currently offline  wittrs   United States
Messages: 134
Registered: August 2009
Karma: 0
Senior Member
... never mind on the error message. It is coming from the version of the popfud file I am using. I think I know why. It provides for an array of lists, and I only have one maillist rule. So on the second list I assume it is spitting out the error. I'll figure that one out.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Preg replace problem (again!)
Next Topic: Piping email with php scripts
Goto Forum:
  

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

Current Time: Tue Dec 03 16:56:18 GMT 2024

Total time taken to generate the page: 0.03798 seconds