Is any difference between -> filename.php and filename.php* ??

Discussion in 'PHP' started by Subikar, Aug 24, 2007.

  1. #1
    Hi Guys,

    Today I am facing a ridiculous problem in my server.
    Whenever any file is getting uploaded in my server, the file name is being displayed as ---> filename.php*

    And whenever I am trying to access the file through a web browser it is not accessible. But deleting the file and then creating the same file at that instant allows me to access it. Is there anyone over here who is facing the same problem? I am really worried about how to fix this bug.

    Any help from you would be appreciated!
    Thanks,
    Subikar
     
    Subikar, Aug 24, 2007 IP
  2. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #2
    When you say you are trying to access it via the web browser but it's not accessible, are you trying to access with or without the asterisk?

    If the former, then I would just try accessing it without it. I'm wondering if it's displaying the asterisk because it has the executable bit set (which is how files are sometimes displayed in a UNIX shell)? You could test this by checking the chmod values...
     
    TwistMyArm, Aug 24, 2007 IP
  3. Subikar

    Subikar Active Member

    Messages:
    241
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #3
    But How to remove the * from the file name.
     
    Subikar, Aug 25, 2007 IP
  4. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I can't answer your questions if you don't answer mine.

    I asked: "When you say you are trying to access it via the web browser but it's not accessible, are you trying to access with or without the asterisk?"

    Depending on that answer, it may be that the asterisk is not really part of the filename and that it's just being displayed beside the name...

    So... after you upload the file and the filename appears to have an asterisk, try and access it through the browser as if the asterisk is NOT there. Ignore it. Now tell us: does it work? What happens when you access the file through the browser with the asterisk appended to the filename?
     
    TwistMyArm, Aug 25, 2007 IP
  5. Subikar

    Subikar Active Member

    Messages:
    241
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Obviously I am trying without the asterisk.

    When I am trying ls - la

    It is showing the filename.php*

    But when I am trying through web browser: http://www.sitename.com/filename.php
    The php file is not executiing and showing blank page.

    I have also trying with http://www.sitename.com/filename.php* Then it is showing 500 internal error.

    I have changed the permission of the file to 766 At that time I am not getting * but the file is not accessible again through web browser it is showing 403 forbidden.
     
    Subikar, Aug 26, 2007 IP
  6. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #6
    "Obviously I am trying without the asterisk."
    Heh... around these forums I find that unless something is stated explicitly, nothing is obvious.

    So what were the permissions before you changed them? I believe that if the server is running PHP in CGI mode then the file would need to be executable. Add to that the probable situation where the server itself runs as a different user to yourself and I would suggest seeing what happens if it's 777. Alternatively, you may need to change the owner / group on the file but in reality, that's something that your host should have told you.
     
    TwistMyArm, Aug 27, 2007 IP
  7. Subikar

    Subikar Active Member

    Messages:
    241
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #7
    Thanks for the help TwistMyArm. I got the solution I have given permission to file 644 and it is working. :)
     
    Subikar, Aug 27, 2007 IP