poirot Posted January 27, 2010 Report Share Posted January 27, 2010 I tried both Production and Development versions of php.ini, but when there are any errors in the php file the server will display a totally blank page, which is extremely counter productive. Why not just show the errors? Instead of showing this: Show this: Parse error: syntax error, unexpected ',' in W:\www\file.php on line 8 (running Uniserver 5.5) EDIT: This problem (I don't know if it's intended "feature") occurs with all versions since 4.4, I had to use 3.5 to avoid this annoyance. Quote Link to comment Share on other sites More sharing options...
Retsel Posted June 4, 2010 Report Share Posted June 4, 2010 I think the answer I just got for my problem might be helpful to you. I don't know how to link to it so I'll repeat the answer (from Ric) here:--------------------------------There are two configuration files for PHP production and development. For security reasons Uniform Server defaults to production and error reporting to screen is disable. To check which file you are using, from UniTray run “Server Status”A script will run, fourth line down shows which file is switch in. For error reporting you need to use the development file.From UniTray select “Advanced”From sub-menu run the third item from bottom “php.ini switch to development”Restart servers to allow new configuration to be picked up. Errors will be displayed to screenAdditional errors are found in file UniServer\usr\local\apache2\logs\error.logThis file is accessible from UniTray “Server information and logs” This answer was from Ric----------------------------------------Hope this helps,Retsel Quote Link to comment Share on other sites More sharing options...
Znote Posted June 7, 2010 Report Share Posted June 7, 2010 Put this is your index.php (main file) of your website. <?php ini_set('error_reporting', E_ALL | E_STRICT); ini_set('display_errors', 'Off'); ini_set('log_errors', 'on'); ini_set('error_log', 'error.txt'); if(filesize('error.txt') > 10485760) ini_set('log_errors', 'off'); ?> With this script, users who surf the website will not see the error, however, it will be saved in a text document, waiting for you to check it out and lets you see and fix the errors. Even those you haven't found yourself, but other users have found. Will be written in the text document. Very handy. :angry: Create a file named error.txt in same dir as index.php and you're good to go :angry: Quote I am representing the open tibia community otland.netotland.net is contributing open source server software to an 2d mmorpg game called Tibia.Here are some Uniform server tutorials/guide contributions from me:VIDEO TUTORIAL: I teach newbreeds to install and operate uniform server: (Updated for Coral 8.x)http://youtu.be/AsyxPhDTOcIUniform Server newbie guide:Securely installing Uniform Server for total newbeginners:http://otland.net/f479/nothing-fully-worki...-0-3-6-a-77593/(also contains how to get our open source tibia game, and connect it successfully to the uniform mysql server).How to add a website for our open source tibia game which includes highscore, create account and so on: (On uniform server)http://otland.net/f479/website-installing-...m-server-91951/ Link to comment Share on other sites More sharing options...
deathcon4 Posted August 12, 2010 Report Share Posted August 12, 2010 I have the same problem, my pages no loads, I tried meny things. I put this code and no worked. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Teste</title></head> <body><? echo "Hellow world"; ?> <?php echo "Este servidor fornece suporte ao PHP";?><?phpini_set('error_reporting', E_ALL | E_STRICT);ini_set('display_errors', 'Off');ini_set('log_errors', 'on');ini_set('error_log', 'error.txt');if(filesize('error.txt') > 10485760) ini_set('log_errors', 'off');?></body> </html>But, if I would put parted in file with php extension, works perfctly.I don't understand what is happening. Quote Link to comment Share on other sites More sharing options...
Ric Posted August 12, 2010 Report Share Posted August 12, 2010 OK Lets take a step back!I assume you have switched to development mode. Reduce your test code to this:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Teste</title> </head> <body> <? echo "Hellow world"; ?> <?php echo "Este servidor fornece suporte ao PHP"; ?> </body> </html>Save the file as test.htm or test.html to folder UniServer\www Run servers and type http://localhost/test.htm or http://localhost/test.html Yep! A blank page. The server is not configured to pass files with extensions .htm or .html to the PHP processor. Hence no matter what you do you will never see an error message! :angry: 1] Now rename your file to test.phpType http://localhost/test.php Result as shown: “Este servidor fornece suporte ao PHP” 2] There is no “ Hellow world” as expected. This is because short tags are not enabled Hence change this: echo "Hellow world"; ?>To <?php echo "Hello world"; ?> 3] If you do want to pass .htm and .html files to the PHP processorQuick fix:Edit file UniServer\www\.htaccessAdd the following line to end of fileAddType application/x-httpd-php .html .htm 4]Alternatively edit Apache config\UniServer\usr\local\apache2\conf\httpd.confLocate this line:AddType application/x-httpd-php .phtml .php3 .phpAnd add the extensionsAddType application/x-httpd-php .phtml .php3 .php .html .htm All .htm and .html pages are passed regardless whether they contain no php. It is a hit on processor time. Hey! Your server, if that’s what you want, no problem All the bestRic Quote Link to comment Share on other sites More sharing options...
Steve-CC Posted August 24, 2010 Report Share Posted August 24, 2010 I am a new user and I am having this problem with blank pages as well. I have read all of the above and I have put UniServer into development mode and tried the test code supplied by Ric above (Thanks Ric) both named as test.htm and test.php.I get a blank page with every time. I checked C:\UniformServer\UniServer\usr\local\apache2\logsI have checked both the error.log and access.log but do not show any errors for when I access the test.htm or test.php or any of the other short php files I have created. If I try to access a page in the directory using an incorrect file name I get a 404 error message but if I type the correct file name I get no error message, my browser shows the name fo the file and I get a blank page. I should add. I have been using Uniform Servers for several days and have several Drupal sites installed under it working A-OK. It is just now that I have begun to try to write some of my own PHP that I hit this snag. Drupal sites still work just fine. Any other ideas on how to get php files to display correctly? Thanks, Steve Quote Link to comment Share on other sites More sharing options...
deathcon4 Posted August 24, 2010 Report Share Posted August 24, 2010 I have the same problem, all pages loads a blank page in any place that I put the file. Quote Link to comment Share on other sites More sharing options...
Steve-CC Posted August 24, 2010 Report Share Posted August 24, 2010 I've been experimenting and had partial success - Some non blank screens - as follows: This code <?php print "Hello Web!";?>gets me a page that says - Hello Web! This code <?php phpinfo(); ?>gets me a page the PHP Info page as expected. This code <html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Test</title></head><body><? echo "Hello world";?><?php print "Este servidor fornece suporte ao PHP";?></body></html>gets me a page that is completely blank. and This code <html><head><title>Listing 3.2 A PHP script including HTML</title></head><body><b><?php print "hello world";?></b></body></html> gets me a page that is completely blank I sure hope somebody will be able to help us out with this Thanks Steve Quote Link to comment Share on other sites More sharing options...
Steve-CC Posted August 25, 2010 Report Share Posted August 25, 2010 Well - I feel like an idiot but I am no longer getting blank pages so I thought I'd better admit my stupidity to save others time and trouble. When some of my php scripts started working I got suspicious that maybe I was saving them incorrectly as formatted files since I was using Wordpad and Notepad as editors. Sure enough that was the problem. Quote Link to comment Share on other sites More sharing options...
Ric Posted August 25, 2010 Report Share Posted August 25, 2010 Welcome to the master class – Of idiots! I checked your code and could not fault it. That little gem had not crossed my mind! :angry: Thanks for the post. All the bestRic Yep! I was looking for something I missed. Quote Link to comment Share on other sites More sharing options...
joejac Posted January 22, 2011 Report Share Posted January 22, 2011 Thanks a lot for this topic.It helped to solve my issue of the blank page.Unfortunately the new php is issuing awful "notices" before rendering the page. Any way, I disabled development and I will check later.Best regardsjoejac Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.