installing .php script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pari123
    Junior Member
    • Jun 2005
    • 20

    #1

    installing .php script

    Hi all,

    I recently purchased a php script and am encountering some difficulty installing it. Have to admit not a reall teckie, although do know my way round a pc.

    I have been advised by Dathorn that the folder the script resides in should be 775 and the script 644, see below:

    You had the wrong permissions on your files. Folders must be chmoded to 755 and all PHP scripts chmoded to 644.

    although this is straight forward to do, how do I know which are the actually php scripts within the folder, or do I just cmod all files with the extension .php to 644?

    I would be grateful for any help

    thanks Pari
  • Frank Hagan
    Senior Member
    • Mar 2004
    • 724

    #2
    Just chmod all files with a .php extension to 644. Any of those could be called by another .php file, so they will all need the permissions changed.

    Comment

    • Pari123
      Junior Member
      • Jun 2005
      • 20

      #3
      thanks for the prompt reply Frank,

      According to the guy who I bought the script off, the files will need to be written to, so 644 is not viable. does that make sense?

      Comment

      • Frank Hagan
        Senior Member
        • Mar 2004
        • 724

        #4
        Well, it might. Let him know Dathorn uses "phpsuexec" and he'll have a better idea if his script will work on it. Most of the php scripts work fine with it. I found that I had to use 755 as the folder permission when the script called for 777.

        I just Googled phpsuexec, and found a hosting site that has a brief explanation of the user permissions:

        Originally posted by http://www.digitalpulsehosting.com/support/kb/view/article/9/

        PHPSuexec Information

        File/Directory Permissions

        When PHP runs as an Apache Module it executes as the user/group of the webserver which is usually "nobody". Under this mode, files or directories that you require your php scripts to write to need to have 777 permissions (read/write/execute at user/group/world level). This is not very secure because besides allowing the webserver to write to the file it also allows anyone else to read or write to the file.

        With PHP running as CGI with suexec enabled your php scripts now execute under your user/group level. Files or directories that you require your php scripts to write to no longer need to have 777 permissions. In fact, having 777 permissions on your scripts or the directories they reside in will not run and will instead cause a 500 internal server error when attempting to execute them to protect you from someone abusing your scripts. Your scripts and directories can have a maximum of 755 permissions (read/write/execute by you, read/execute by everyone else). PHP running as CGI/suexec is much more secure than the older Apache module method.
        You can also search the forums here for "phpsuexec" and find a lot of posts where some of us had to reconfigure things when it was turned on. There are quite a few scripts we had to change permissions on, so perhaps yours is already listed.

        Comment

        • Pari123
          Junior Member
          • Jun 2005
          • 20

          #5
          thanks again for the reponse Frank. did search the previous listings on the matter and although helpful did not resolve the matter. Do you mind taking a look at the notes below that came with the script.

          Basically, it allows links from other files within the same folder to be displayed. If need be, I am prepared to give access to my cpanel for testing.

          thanks Pari


          ###NOTE###
          This is a .php script and will only work when placed inside of a .php
          file OR if you have enabled php parsing in your .htm or .html files!!
          If your results pages are not currently in .php format and you don't
          know how to configure php parsing in your .htm or .html files then this
          script will not work for you as I do NOT support configuring your server
          for php parsing.

          BEFORE you do anything, place a copy of all of the files included in a
          safe place, so you can recall them anytime if necessary!!


          1. Create a folder in your site domain called "SSI".
          i.e. "http://www.mydomain.com/SSI/"

          2. Unzip all files into the /SSI folder

          3. CHMOD the properties on all the files to "777"

          4. Run start.php from your browser.
          i.e. "http://www.mydomain.com/SSI/start.php"

          5. If you receive errors at the top of the page - you have not
          successfully changed the properties of the files.

          6. Change the default value in the folder box from "/folder/" to the
          folder where your results pages are.

          7. Specify the number of links to other pages you would like to display
          and a separator value you would like between them. Up to 3 characters is
          supported. Then click the Configure button.

          This script observes all the files in the folder that you specify and
          creates an index file. It "sees" the files in a circular fashion...
          i.e. if you have 8 files in your folder named

          file1.html
          file2.html
          file3.html
          file4.html
          file5.html
          file6.html
          file7.html
          file8.html

          and choose to display 3 prior and 3 post - the links dislayed on the
          file1.html will be file8, file7, file6 PRIOR and
          file2, file3 and file4 POST.

          8. Choose any files that you would like to filter out of the link results
          and click the Filter button.

          i.e. When using TE with the "multiple indexes" option index1.html, index2.html
          get created and if you don't want to display links to those pages you
          should enter them in this list. BY DEFAULT I have included index files up
          to index10.html so you may need to add more. You can specify any other files
          that you don't want displayed. Wildcards are NOT supported.

          9. Click the "Generate Index" button. This could take up to a minute or more
          if you have thousands of pages in your folder. When it's complete you will be
          presented with confirmation text showing how many files were found and how many
          were filtered out.

          10. Include the following line of code in your results page template where you
          want the links to appear (typically, in the footer section or at the bottom of the page).

          <p><?php include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT']."/SSI/footer.html");
          start_linking($HTTP_SERVER_VARS['SCRIPT_NAME'])
          ?></p>

          This code does not change from one site to the next so you can simply leave it as
          is in your results template and use it for every new site if you desire.


          11. To add formatting to the links that get displayed as a result of this script,
          simply put your desired tags around the line of code above. i.e.:

          <center><b><?php include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT']."/SSI/footer.html");
          start_linking($HTTP_SERVER_VARS['SCRIPT_NAME'])
          ?></b></center>

          12. Currently this script will only work when placed in a folder called "SSI".
          If you already have a folder called SSI you can simply add the script files to
          that directory.

          Comment

          • sdjl
            Senior Member
            • Mar 2004
            • 502

            #6
            Try CHMODing the files that are being used to 755. Also CHMOD the folder(s) that these scripts are in to 755 as well.
            That should allow reading and writing.

            David
            -----
            Do you fear the obsolescence of the metanarrative apparatus of legitimation?

            Comment

            • Pari123
              Junior Member
              • Jun 2005
              • 20

              #7
              still not working

              does anyone mind trying to get this script to work on my site? I would be really grateful for this.

              thanks Pari

              Comment

              • fcm
                Junior Member
                • Oct 2005
                • 28

                #8
                Thanks so much for this info- I have been trying to get a php calendar module to work and this did the trick!

                Comment

                Working...