LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-01-2010, 11:11 PM   #1
unknowncat
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Rep: Reputation: 0
xampp / ubuntu = blank screen


Hello.

Just installed xampp 1.7.3 to ubuntu 9.10 (karmic)

localhost will echo phpinfo(), or echo "test"
to the screen, however when i run anyscript
which has an include it fails from there on out.

i.e.

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$droot=".";

$title="Welcome";
include("$droot/themes/default/header.php");

outputs a blank page to browser,
view source shows no output.
 
Old 01-02-2010, 03:45 AM   #2
Dave_Devnull
Member
 
Registered: May 2009
Posts: 142

Rep: Reputation: 24
Take a look at what your Apache logs are reporting.

The are usually called access.log and error.log and located in /var/log. So if you issue:
less /var/log/apache/access.log
less /var/log/apache/error.log

and follow the output to where you've run your script - you should get some answers.

I suspect your script is erroring out and not reporting/displaying errors to the screen. This may help:
http://www.php.net/manual/en/errorfu...display-errors
 
Old 01-02-2010, 03:01 PM   #3
unknowncat
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Hi Thank you Dave,

I appologize I should have mentioned that in my original post. The error logs don't seem to be showing what's wrong. but I'm new at reading them so maybe the answer is there.

The scripts are all working fine on the web server, and worked fine on my windows install of xampp.


from access log:

127.0.0.1 - - [01/Jan/2010:14:40:34 -0600] "GET /index.php HTTP/1.1" 200 -

from error log: (most of this is above my head)


[Fri Jan 01 14:15:46 2010] [notice] suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Fri Jan 01 14:15:46 2010] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Jan 01 14:15:46 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Fri Jan 01 14:15:46 2010] [notice] Digest: generating secret for digest authentication ...
[Fri Jan 01 14:15:46 2010] [notice] Digest: done
[Fri Jan 01 14:15:47 2010] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Jan 01 14:15:47 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Fri Jan 01 14:15:47 2010] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Fri Jan 01 14:31:52 2010] [error] [client 127.0.0.1] script '/opt/lampp/htdocs/affilites.php' not found or unable to stat
[Fri Jan 01 14:44:23 2010] [error] [client 127.0.0.1] PHP Notice: Undefined index: admin1 in /opt/lampp/htdocs/test.php on line 5
[Fri Jan 01 14:46:28 2010] [error] [client 127.0.0.1] PHP Warning: include(/themes/default/header.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in /opt/lampp/htdocs/index.php on line 4
[Fri Jan 01 14:46:28 2010] [error] [client 127.0.0.1] PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening '/themes/default/header.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/index.php on line 4
[Fri Jan 01 14:46:28 2010] [error] [client 127.0.0.1] PHP Notice: Undefined variable: ulevel in /opt/lampp/htdocs/index.php on line 6
[Fri Jan 01 14:46:28 2010] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function sql_query() in /opt/lampp/htdocs/index.php on line 18
[Fri Jan 01 15:00:30 2010] [notice] caught SIGTERM, shutting down
[Fri Jan 01 15:00:41 2010] [notice] suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Fri Jan 01 15:00:41 2010] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Jan 01 15:00:41 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Fri Jan 01 15:00:41 2010] [notice] Digest: generating secret for digest authentication ...
[Fri Jan 01 15:00:41 2010] [notice] Digest: done
[Fri Jan 01 15:00:42 2010] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Jan 01 15:00:42 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Fri Jan 01 15:00:42 2010] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Fri Jan 01 15:08:29 2010] [notice] caught SIGTERM, shutting down
[Fri Jan 01 15:11:49 2010] [notice] suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Fri Jan 01 15:11:49 2010] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Jan 01 15:11:49 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Fri Jan 01 15:11:49 2010] [notice] Digest: generating secret for digest authentication ...
[Fri Jan 01 15:11:49 2010] [notice] Digest: done
[Fri Jan 01 15:11:50 2010] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Jan 01 15:11:50 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Fri Jan 01 15:11:50 2010] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Sat Jan 02 01:56:59 2010] [warn] child process 2210 still did not exit, sending a SIGTERM
[Sat Jan 02 01:56:59 2010] [warn] child process 2215 still did not exit, sending a SIGTERM
[Sat Jan 02 01:56:59 2010] [warn] child process 2220 still did not exit, sending a SIGTERM
[Sat Jan 02 01:56:59 2010] [warn] child process 2221 still did not exit, sending a SIGTERM
[Sat Jan 02 01:56:59 2010] [warn] child process 2328 still did not exit, sending a SIGTERM
[Sat Jan 02 01:56:59 2010] [warn] child process 2338 still did not exit, sending a SIGTERM
[Sat Jan 02 01:56:59 2010] [warn] child process 2339 still did not exit, sending a SIGTERM
[Sat Jan 02 01:56:59 2010] [warn] child process 2463 still did not exit, sending a SIGTERM
[Sat Jan 02 01:56:59 2010] [warn] child process 2464 still did not exit, sending a SIGTERM
[Sat Jan 02 01:56:59 2010] [warn] child process 2465 still did not exit, sending a SIGTERM
 
Old 01-02-2010, 03:37 PM   #4
unknowncat
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Original Poster
Rep: Reputation: 0
oh yeah also, phpmyadmin is running fine
 
Old 01-03-2010, 11:44 PM   #5
unknowncat
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Original Poster
Rep: Reputation: 0
discovered it will include the footer...
but not the header>

Last edited by unknowncat; 01-03-2010 at 11:47 PM.
 
Old 01-04-2010, 12:09 AM   #6
unknowncat
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Original Poster
Rep: Reputation: 0
fixed. i narrowed down the error and it was merely a lack of database login info for the mysql. error reporting was on, i'm not sure if there is another error reporting setting that i had off or why it didn't just say 'access denied' to the database.
 
Old 01-04-2010, 01:05 AM   #7
Dave_Devnull
Member
 
Registered: May 2009
Posts: 142

Rep: Reputation: 24
Apologies for the delayed response - it's great to hear that you have solved it unknowncat.

Just to 'flesh it out' a bit for the benefit of the archives:

For me PHP.INFO gives this as far as errors are concerned:
Quote:
display_errors On On
error_log /var/log/php.err /var/log/php.err
error_reporting 6135 {This is: E_ALL & ~E_NOTICE}
html_errors On On
log_errors On On
track_errors Off Off
There is a debugging option, display_startup_errors which defaults to off, I've never used it myself and I'm told it's a hungry monkey.

Database response issues can be a pain and I've made plenty of errors where I've had the 'white screen of no response' only to find a database had not connected, queried etc. Thankfully 'die' tends to help me lots:

mysql_connect(....) or die( "cant connect to db");



More subtle logic errors, such as when a database fails to return results, give me a headache and I usually check and trap with something like this:

PHP Code:
if (mysql_query($sql))
{
//it's all good here - do our stuff
}
else
{
echo 
mysql_error();

Perl, on the otherhand, has a slightly different way of reporting errors:
Code:
use CGI::Carp qw(fatalsToBrowser);
This is probably of no benefit to you unknowncat, but I hope it will help anyone searching google/archives for the Blank Screen Issue.
 
  


Reply

Tags
localhost, ubuntu, xampp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Blank screen after installing ubuntu leilton Linux - Laptop and Netbook 2 08-19-2009 08:03 AM
Installin Ubuntu - blank screen Braynid Linux - Software 5 02-05-2008 09:07 AM
Ubuntu blank login screen matticus1181 Linux - Software 3 09-24-2007 07:34 AM
Canīt log in to ubuntu, get blank screen... ctkroeker Ubuntu 1 01-20-2007 02:28 PM
Ubuntu blank screen on startup dkbg Linux - Software 4 12-31-2005 04:26 PM


All times are GMT -5. The time now is 01:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration