SnippetMaster Support Forums
Return to main website
 
November 19, 2007, 06:01:27 PM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 19, 2007, 06:01:27 PM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: using PHP compiled as a CGI with #!/usr/bin/php « previous next »
Pages: [1] Print
Author Topic: using PHP compiled as a CGI with #!/usr/bin/php  (Read 280 times)
davarian

Posts: 2


WWW
[-] using PHP compiled as a CGI with #!/usr/bin/php
« on: July 02, 2003, 06:44:08 AM »

I am running on Apache with PHP 4.02. With a twist!
The server has PHP compiled as a CGI, so just about every PHP file within my site must contain the path to PHP within the code of the page. This means that I need to have the following line at the very top of each PHP file:
#!/usr/bin/php
While this is needed in almost every file, I find that when using “include” files, I do not need to use the path in the included file. If the page calling the includes already has the path in its code, that path will apply to any include file which is called by that page (or I end up with the text #!/usr/bin/php #!/usr/bin/php #!/usr/bin/php across the top of my browser window).

So, does anyone know which files of snippetmaster should have the  #!/usr/bin/php

And I have to make sure all PHP files are in UNIX format (not DOS format) for my UNIX Web server or it will not be able to correctly read and execute the file. I am using win98, an html editing program called arachnophilia, and wsftp. Does any one know how I can check to make sure the uploaded files are in UNIX format?

Finally, my server needs PHP files to be in 755 permissions (or higher). Are there any files that need different permissions (except the location files being 777).

Thanks!
dav
Report to moderator   Logged
Pinocchi

Posts: 12


[-] using PHP compiled as a CGI with #!/usr/bin/php
« Reply #1 on: July 18, 2003, 02:53:57 PM »

Hi Dav,

Well I'm not completely sure anymore which files should contain the first line, as I'm not useing it any more (was one of the early users and am waiting now for the new release). But what you can do is just check the demo here at snippetmaster and check what filenames are in the location bar. At least those should have the first line in it if they are php files.

Concerning your chmod status of the files. The same files which get the first line added should be chmodded 755. As you use php as cgi binary, it should not be needed to chmod those other files to 777. That's one of the reasons php is run as cgi binary, so that you don't have to create a thread with setting the file open for the wide public.

Good luck with it.
Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: using PHP compiled as a CGI with #!/usr/bin/php « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!