locked
PHP again RRS feed

  • Question

  • I have searched these forums and many others for my answers without any luck. Any way here is my problem.

    I am new to WHS and have installed php but am having problems displaying php content. I am getting errors in my log and checked things over and over. Can I please get some assistance off some one with a little more experience than myself with WHS. This server is for private use and testing so I am not hosting any public websites. I can open the php pages but they do not display the php script, so only half the page is loading.

    Link to error log here

    Link to php.ini txt here

    The page on my server here

    What the page should look like here


    The majority of my web design is in php so it would be good to have the server working correctly instead of uploading to my hosted web server.

    Cheers in advance
    Friday, August 1, 2008 12:47 PM

Answers

  • Dhuck, I compared your php.ini file to mine.  Now, I know almost nothing about what these differences do, and although you don't mention what database you're using, some of my settings might be because I'm using MySQL and you might be using something different.  Anyway, the following are the differences between your INI file and mine:

     

    Code Snippet

    ;;;;;;;;;;;;;;;;;;;;
    ; Language Options ;
    ;;;;;;;;;;;;;;;;;;;;

     

    short_open_tag = On

     

    ;;;;;;;;;;;;;;;;;;;
    ; Resource Limits ;
    ;;;;;;;;;;;;;;;;;;;

     

    memory_limit = 32M (shouldn't affect you, though, I would think)

     

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Error handling and logging ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

     

    error_reporting  =  E_ALL & ~E_NOTICE
    display_errors = On
    display_startup_errors = On

     

    ;;;;;;;;;;;;;;;;;
    ; Data Handling ;
    ;;;;;;;;;;;;;;;;;

     

    register_long_arrays = On
    post_max_size = 128M (wouldn't think this would matter for you)
    magic_quotes_gpc = On

     

    ;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Paths and Directories ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;

     

    cgi.fix_pathinfo = 1 (this is commented out in your php.ini file)

     

    ;;;;;;;;;;;;;;;;

    ; File Uploads ;
    ;;;;;;;;;;;;;;;;

     

    upload_max_filesize = 128M (shouldn't affect you, though)

     

    ;;;;;;;;;;;;;;;;;;;;;;
    ; Dynamic Extensions ;
    ;;;;;;;;;;;;;;;;;;;;;;

     

    I noticed that you have ALL of your extensions are turned on (uncommented).  No idea what affect this has (if any).  The only ones that I have turned on (uncommented) are:

     

    extension=php_gd2.dll
    extension=php_mbstring.dll
    extension=php_mysql.dll
    extension=php_mysqli.dll
    extension=php_pdo.dll
    extension=php_pdo_mysql.dll
    extension=php_pdo_odbc.dll
    extension=php_pdo_sqlite.dll
    extension=php_sqlite.dll

     

     

     

    The above extensions may be because I'm only using MySQL, but tried a couple of others once & never set them back off again.

     

    Again, I know almost nothing about what most of these settings do - I'm just comparing your INI file to mine.

     

    And my versions are v5.2.2 for PHP, and v5..0.37 for MySQL.

     

    Sorry I can't help you more.  Good luck.

    Friday, August 1, 2008 4:24 PM

All replies

  • extension_dir is present.

     

    Maybe it isn't looking in the right place for php.ini?

     

    Don't know that it's revelvant, but I had a step in my config like this:

     

    1)     Add HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath = “C:\php” to the registry

    Friday, August 1, 2008 4:01 PM
  • Dhuck, I compared your php.ini file to mine.  Now, I know almost nothing about what these differences do, and although you don't mention what database you're using, some of my settings might be because I'm using MySQL and you might be using something different.  Anyway, the following are the differences between your INI file and mine:

     

    Code Snippet

    ;;;;;;;;;;;;;;;;;;;;
    ; Language Options ;
    ;;;;;;;;;;;;;;;;;;;;

     

    short_open_tag = On

     

    ;;;;;;;;;;;;;;;;;;;
    ; Resource Limits ;
    ;;;;;;;;;;;;;;;;;;;

     

    memory_limit = 32M (shouldn't affect you, though, I would think)

     

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Error handling and logging ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

     

    error_reporting  =  E_ALL & ~E_NOTICE
    display_errors = On
    display_startup_errors = On

     

    ;;;;;;;;;;;;;;;;;
    ; Data Handling ;
    ;;;;;;;;;;;;;;;;;

     

    register_long_arrays = On
    post_max_size = 128M (wouldn't think this would matter for you)
    magic_quotes_gpc = On

     

    ;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Paths and Directories ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;

     

    cgi.fix_pathinfo = 1 (this is commented out in your php.ini file)

     

    ;;;;;;;;;;;;;;;;

    ; File Uploads ;
    ;;;;;;;;;;;;;;;;

     

    upload_max_filesize = 128M (shouldn't affect you, though)

     

    ;;;;;;;;;;;;;;;;;;;;;;
    ; Dynamic Extensions ;
    ;;;;;;;;;;;;;;;;;;;;;;

     

    I noticed that you have ALL of your extensions are turned on (uncommented).  No idea what affect this has (if any).  The only ones that I have turned on (uncommented) are:

     

    extension=php_gd2.dll
    extension=php_mbstring.dll
    extension=php_mysql.dll
    extension=php_mysqli.dll
    extension=php_pdo.dll
    extension=php_pdo_mysql.dll
    extension=php_pdo_odbc.dll
    extension=php_pdo_sqlite.dll
    extension=php_sqlite.dll

     

     

     

    The above extensions may be because I'm only using MySQL, but tried a couple of others once & never set them back off again.

     

    Again, I know almost nothing about what most of these settings do - I'm just comparing your INI file to mine.

     

    And my versions are v5.2.2 for PHP, and v5..0.37 for MySQL.

     

    Sorry I can't help you more.  Good luck.

    Friday, August 1, 2008 4:24 PM
  • (Moved to Developers forum)
    Friday, August 1, 2008 4:57 PM
    Moderator
  • (Not sure what this has to do with being a developer for WHS (add-ins and what not) instead of a user of WHS, but whatever.)

     

    I didn't look at what extensions were uncommented, but uncommenting them all seems a bit over the top. Are all these extensions really present? Is all of the current pecl present?

    Friday, August 1, 2008 5:14 PM
  •  

    I am running the same versions of PHP and MySQL, so I will give it a go. As for the extensions, the post was made while I was trouble shooting and tried uncommenting all. It did not help or get worse. However they are all changed back to what you have there. I followed the We Got Served wiki down to a tee.
    Saturday, August 2, 2008 1:43 AM
  •  JMMBDA wrote:

    Dhuck, I compared your php.ini file to mine.  Now, I know almost nothing about what these differences do, and although you don't mention what database you're using, some of my settings might be because I'm using MySQL and you might be using something different.  Anyway, the following are the differences between your INI file and mine:

     

    Code Snippet

    ;;;;;;;;;;;;;;;;;;;;
    ; Language Options ;
    ;;;;;;;;;;;;;;;;;;;;

     

    short_open_tag = On

     

    ;;;;;;;;;;;;;;;;;;;
    ; Resource Limits ;
    ;;;;;;;;;;;;;;;;;;;

     

    memory_limit = 32M (shouldn't affect you, though, I would think)

     

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Error handling and logging ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

     

    error_reporting  =  E_ALL & ~E_NOTICE
    display_errors = On
    display_startup_errors = On

     

    ;;;;;;;;;;;;;;;;;
    ; Data Handling ;
    ;;;;;;;;;;;;;;;;;

     

    register_long_arrays = On
    post_max_size = 128M (wouldn't think this would matter for you)
    magic_quotes_gpc = On

     

    ;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Paths and Directories ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;

     

    cgi.fix_pathinfo = 1 (this is commented out in your php.ini file)

     

    ;;;;;;;;;;;;;;;;

    ; File Uploads ;
    ;;;;;;;;;;;;;;;;

     

    upload_max_filesize = 128M (shouldn't affect you, though)

     

    ;;;;;;;;;;;;;;;;;;;;;;
    ; Dynamic Extensions ;
    ;;;;;;;;;;;;;;;;;;;;;;

     

    I noticed that you have ALL of your extensions are turned on (uncommented).  No idea what affect this has (if any).  The only ones that I have turned on (uncommented) are:

     

    extension=php_gd2.dll
    extension=php_mbstring.dll
    extension=php_mysql.dll
    extension=php_mysqli.dll
    extension=php_pdo.dll
    extension=php_pdo_mysql.dll
    extension=php_pdo_odbc.dll
    extension=php_pdo_sqlite.dll
    extension=php_sqlite.dll

     

     

     

    The above extensions may be because I'm only using MySQL, but tried a couple of others once & never set them back off again.

     

    Again, I know almost nothing about what most of these settings do - I'm just comparing your INI file to mine.

     

    And my versions are v5.2.2 for PHP, and v5..0.37 for MySQL.

     

    Sorry I can't help you more.  Good luck.

     

     

    Thank You mate my system is running the same versions of PHP an MySQL. You had a couple of extensions I did not and I did the other settings you are running. Hey presto it worked.

     

    However I now have the problem of the pdf's not displaying. Have tried the php_pdflib.dll and downloaded the php_pdf.dll and neither worked. Anyone got any ideas?

    Saturday, August 2, 2008 4:10 AM