Jump to content

Ubuntu 11.04, blank screen when parsing PHP, code used before and fine


Recommended Posts

Hiya,

 

I have set up apache, php5 etc on my computers before, but since I upgraded to 11.04 I get a blank screen when running any PHP file.

 

I have used these PHP files before, so the code is not incorrect. I have check that all packages are installed correctly and restarted apache. This is on two ubuntu computers.

 

I normally use firefox.

 

apache2 php5-mysql libapache2-mod-php5 mysql-server

Chromium browser has this:

 

The website encountered an error while retrieving http://localhost/admin.php. It may be down for maintenance or configured incorrectly.

Here are some suggestions:

Reload this web page later.

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil the request.

  • 4 months later...

Hi i've encountered the same problem the thing is yes you were right it can read .html files

and yes it showed the simple phpinfo(); sourcecode but my source codes seems cannot be parsed

 

my codes works on xampp for linux and xampp for windows but it seems not working when i migrated it to the linux apache mysql php applications

 

here's what i've done

apt-get update

apt-get install php5 mysql-server apache2

apt-get upgrade

 

 

modified my php.ini file and changed

 

output_buffering off

to

output_buffering on

 

because i needed it for most of my sourcecodes

 

i tried restarting the apache2 server by

sudo /etc/init.d/apache2 restart

 

still no effect

 

i also tried

sudo a2enmod php5

and restarted my server

 

it says php5 running

 

Help please :( :'(

 

Edit:

PS and yes im using ubuntu 10.10

 

Edit Number2:

It seems that it has problems when i include this code

 

conn.php

<?php

 

 

 

$HOST = "localhost";

 

$USER = "root";

 

$DBUSERPASS = "";

 

$DBNAME= "smsd";

 

 

 

$connect= mysql_connect($HOST,$USER,$DBUSERPASS);

 

 

 

if(isset($connect)){

 

$dbselect = mysql_select_db($DBNAME,$connect);

 

if(isset($dbselect)){}

 

else echo "Invalid Database Name";

 

}else echo "Cannot Connect to Database";

 

 

?>

 

 

and on index.php i did

include("conn.php");

 

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.