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

Home » General » PHP discussions » Launching a php script file
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Launching a php script file [message #160300] Sun, 16 August 2009 20:09 Go to next message
wittrs is currently offline  wittrs   United States
Messages: 134
Registered: August 2009
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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] Sun, 16 August 2009 22:37 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 13:34 Go to previous messageGo to next message
wittrs is currently offline  wittrs   United States
Messages: 134
Registered: August 2009
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 13:50 Go to previous message
wittrs is currently offline  wittrs   United States
Messages: 134
Registered: August 2009
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
... 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.
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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: Thu Oct 19 16:17:04 EDT 2017

Total time taken to generate the page: 0.00765 seconds