Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2003
    Location
    South Bend, Indiana, USA
    Posts
    320

    Can php create "page cannot be displayed"?

    I have had several people come ask me how to install a script because the script is creating a page cannot be displayed message even when the files are there. When you look at the source code there is nothing that would be causing this and it is running fine on other peoples sites/servers. Any suggestion?
    Daniel
    WLScripting.com - php scripts and tutorials

  2. #2
    check the file permissions. most php scripts require execute permissions on the "other" setting, so an absolute minimum to run a php script would be chmod 405.. however most scripts are chmod 755, but when uploaded, the default is often chmod 644, (read only) without the execute permissions...

    either that or the server configuration is majorly screwed up.

    otherwise, it would be a typo.. what is the exact error number apache returns? 403 error? 404? and are they putting the scripts in the correct folder?? is the port 80 request mapped to the correct folder?

    lots of possibilities I can think of.. check these ones out, but I would bet you get a permissions issue. would help a lot if you gave us a url of one of teh scripts that dont run.

  3. #3
    Join Date
    Sep 2002
    Location
    Illinois
    Posts
    2,304
    Check the permission of directory where script is located
    How's my programming? Call 1-800-DEV-NULL

  4. #4
    Join Date
    Mar 2003
    Location
    South Bend, Indiana, USA
    Posts
    320
    When accessing the folder it says: "The page cannot be displayed" Then in the ie header it says: "Cannot find server" But when you move to the directory before the admin directory I can access it.

    On different servers when I have tried to chmod it differently it says that the folder is forbidden to access. Even trying different levels of chmod. 777, 755,...

    Any suggestions?
    Daniel
    WLScripting.com - php scripts and tutorials

  5. #5
    Join Date
    Sep 2002
    Location
    Illinois
    Posts
    2,304
    Check if there is .htaccess in the directory (usually won't see using ftp)
    How's my programming? Call 1-800-DEV-NULL

  6. #6
    Join Date
    Mar 2003
    Location
    South Bend, Indiana, USA
    Posts
    320
    None, I have even uploaded some basic files.

    I used the -la in ws_ftp to view the files or the file manager in cpanel to view them.
    Daniel
    WLScripting.com - php scripts and tutorials

  7. #7
    Join Date
    Sep 2002
    Location
    Illinois
    Posts
    2,304
    Do other scripts work? (not in that directory)
    How's my programming? Call 1-800-DEV-NULL

  8. #8
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,099
    Turn up your error reporting and check your error logs. PHP will log errors to your webserver error log.
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

  9. #9
    2 suggestions: first, stick in a simple index.html into the folder in question and go to that folder, should display the index.html, secondly make sure of teh spelling of the directory name (re-name the directory and put in index.html, go to the re-named directory.. it's possible you have an empty space in the directory name at start or end of dir name, in which case, your url would have to be like witha %20 in the url foldername. Ive seen that happen before, and spaces dont show up when they are front or back of teh directory name- try re-naming the folder in question and make absolutely SURE there are no spaces in the name.

  10. #10
    Join Date
    Sep 2003
    Location
    UK
    Posts
    184
    This may sound silly but are you sure its a 404 error? and not a Friendly HTTP error message generated by IE? double check in the tools -> options -> advanced, scroll down and uncheck "Show friendly HTTP Error messages"

    As a developer I often get clients reporting that pages are missing and upon investigation its actually a server 500 error, but it looks like the usual 404 error.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •