Welcome to WebmasterWorld Guest from 54.146.201.80

Forum Moderators: bakedjake

Message Too Old, No Replies

How to Start up a PHP Script in Linux

How To Startup PHP Script in Linux SUSE

     
11:41 am on Dec 20, 2007 (gmt 0)

New User

5+ Year Member

joined:Dec 19, 2007
posts:4
votes: 0


Hello

How can i startup php script in LINUX SUSE,i have one "Socket.php" file which should open and listen some virtual port in the system, when i open Web Browser and type address (http://localhost/Socket.php) manualy - it works, but i need to run that file in STARTUP.

I'm using:
LINUX - SUSE 10.1 (KDE 3.5.1)
WEB SERVER - APACHE 2.2.0
PHP - 5.1.2

11:02 am on Jan 19, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 27, 2005
posts: 181
votes: 0


php Socket.php
7:59 pm on Jan 21, 2008 (gmt 0)

Full Member

10+ Year Member

joined:Feb 4, 2004
posts: 215
votes: 0


Suse appears to use init scripts to launch apps at start up and you will need to write a custom init script to launch your socket.php script.

At the bare minimum, you could create an executable script in /etc/rc2.d named S99socket containing


#!/bin/sh
/path/to/php /path/to/socket.php &
11:39 pm on Jan 21, 2008 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10544
votes: 8


welcome to WebmasterWorld [webmasterworld.com], Khvicha!
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members