Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2007
    Posts
    688

    html ok, php not ok

    PHP 5.2.5 / Apache 2.2 / suPHP enabled


    index2.html shows "it works" but index.php does not, shows up blank.


    Code:
    <?php
    
      if(!version_compare(phpversion(), '5.0', '>=')) {
        die('<strong>Installation error:</strong> in order to run OpenGoo you need PHP5. Your current PHP version is: ' . phpversion());
      } // if
      if(!defined('PUBLIC_FOLDER')) {
        define('PUBLIC_FOLDER', 'public'); // this file can be included through public/index.php
      } // if
      require 'init.php';
    
    ?>
    
    <html><body><h1>It works!</h1></body></html>
    
    <?php
    if (function_exists('imagecreate')) {
       echo 'OK, you already have GD library installed';
    } else {
       echo 'Sorry, it seems that GD library is not installed/enabled';
    }

    Code:
    -rw-r--r--   1 user user  224 Mar 11 20:07 index2.html
    -rw-r--r--   1 user user  592 Mar 11 20:04 index.php

    Code:
    [email protected] [/home/user/public_html/OpenGOO]# ls -lh
    total 12K
    drwxr-xr-x   3 user user 4.0K Mar 10 15:16 ./
    drwxr-x---   4 user nobody   4.0K Mar 10 15:16 ../
    drwxr-xr-x  12 user user 4.0K Mar 11 20:07 opengoo/
    Code:
    [email protected] [/home/user/public_html]# ls -lh
    total 16K
    drwxr-x---   4 user nobody   4.0K Mar 10 15:16 ./
    drwx--x--x  10 user user 4.0K Mar 10 14:41 ../
    drwxr-xr-x   2 user user 4.0K Mar 10 14:42 cgi-bin/
    -rw-r--r--   1 user user    0 Mar 10 13:50 .htaccess
    drwxr-xr-x   3 user user 4.0K Mar 10 15:16 OpenGOO/

  2. #2
    Join Date
    May 2006
    Location
    India
    Posts
    661
    Try running "php index.php" after descending to the public_html folder ( assuming that you have index pages uploaded to public_html ). Btw, your code shows no index pages under public_html.
    SparkSupport.Com - The Premier Tech Company
    Cloud Solutions|Email Infra setup|VOIP|Video Streaming|Software Development
    Email: [email protected] Phone : 1- 408-600-1449 | Skype : shijils

  3. #3
    Join Date
    Jan 2007
    Posts
    688
    Yes, the index2.html and index.php are inside the subdirectory OpenGoo thats why.

    Code:
    [email protected] [/home/user/public_html/OpenGOO/opengoo]# ls -lh
    total 124K
    drwxr-xr-x  12 user user 4.0K Mar 11 20:07 ./
    drwxr-xr-x   3 user user 4.0K Mar 10 15:16 ../
    drwxr-xr-x   7 user user 4.0K Mar 10 14:41 application/
    drwxr-xr-x   2 user user 4.0K Mar 10 14:41 cache/
    drwxr-xr-x   2 user user 4.0K Mar 10 15:18 config/
    -rw-r--r--   1 user user  321 Mar 10 13:43 dummy.php
    drwxr-xr-x   6 user user 4.0K Mar 10 14:41 environment/
    -rw-r--r--   1 user user 3.0K Mar 12 00:49 error_log
    -rw-r--r--   1 user user 1.2K Mar 10 13:43 favicon.ico
    drwxr-xr-x   3 user user 4.0K Mar 10 14:41 fckeditor/
    -rw-r--r--   1 user user   23 Mar 10 13:43 .htaccess
    -rw-r--r--   1 user user  224 Mar 11 20:07 index2.html
    -rw-r--r--   1 user user  592 Mar 11 20:04 index.php
    -rw-r--r--   1 user user 5.2K Mar 10 13:43 init.php
    drwxr-xr-x   3 user user 4.0K Mar 10 14:41 language/
    drwxr-xr-x   9 user user 4.0K Mar 10 14:41 library/
    -rw-r--r--   1 user user  15K Mar 10 13:43 license.txt
    -rw-r--r--   1 user user  683 Mar 10 13:43 .project
    -rw-r--r--   1 user user  265 Mar 10 13:43 .projectOptions
    -rw-r--r--   1 user user  177 Mar 10 13:43 project.prd
    drwxr-xr-x   6 user user 4.0K Mar 10 15:04 public/
    -rw-r--r--   1 user user 2.2K Mar 10 13:43 readme.txt
    -rw-r--r--   1 user user 1.3K Mar 10 13:43 release\ notes.txt
    -rw-r--r--   1 user user   20 Mar 10 13:43 test.php
    drwxr-xr-x   2 user user 4.0K Mar 10 14:41 tmp/
    drwxr-xr-x   2 user user 4.0K Mar 10 14:41 upload/
    -rw-r--r--   1 user user  625 Mar 10 13:43 version.php

  4. #4
    Join Date
    May 2006
    Location
    India
    Posts
    661
    Ok, try "php index.php" from /home/user/public_html/OpenGOO/opengoo and see whether its throwing any o/p ? Btw, did you get a phpinfo page working with your current setup ?
    SparkSupport.Com - The Premier Tech Company
    Cloud Solutions|Email Infra setup|VOIP|Video Streaming|Software Development
    Email: [email protected] Phone : 1- 408-600-1449 | Skype : shijils

  5. #5
    Join Date
    Jan 2007
    Posts
    688
    php index.php returns blank, no errors that is.

    Not sure what your referring to regarding phpinfo. I have it disabled purposely for security reasons.

  6. #6
    Join Date
    Jan 2006
    Location
    Athens, Greece
    Posts
    1,479
    Probably you have error reporting off and there is and error somewhere and
    code execution stops and blank page is displayed.

  7. #7
    Join Date
    May 2007
    Location
    Ukraine
    Posts
    161
    i do not see php closing angle bracket at the end of index.php ...

    can you check this ?

Posting Permissions

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