LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-31-2015, 01:53 AM   #16
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145

Blank pages in php sites often point to errors that are not displayed.
In /etc/php5/apache2/php.ini
set
error_reporting = E_ALL
display_errors = 1;

What happens if you direct your browser to
http://localhost/xyz/index.php instead of http://localhost/xyz ?

Probably the server does not send a default index.php because it is not yet configured to do that. Something like the following may help:
<Directory>
DirectoryIndex index.html index.php index.phtml
</Directory>

For phpMyAdmin you need a running mysql server and you have to set the connection data correctly.
 
Old 03-31-2015, 04:54 AM   #17
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by j-ray View Post
Blank pages in php sites often point to errors that are not displayed.
In /etc/php5/apache2/php.ini
set
error_reporting = E_ALL
display_errors = 1;

What happens if you direct your browser to
http://localhost/xyz/index.php instead of http://localhost/xyz ?

Probably the server does not send a default index.php because it is not yet configured to do that. Something like the following may help:
<Directory>
DirectoryIndex index.html index.php index.phtml
</Directory>

For phpMyAdmin you need a running mysql server and you have to set the connection data correctly.
Hi,

Thanks for your advice. Mint 17 looks very strange to me.

$ ls /etc/php5/
Code:
cgi  cli  conf.d  mods-available
Apache2 is NOT there

$ ls /etc/php5/cgi/
Code:
conf.d  php.ini
php.ini is here

Edited php.ini as follows
Code:
change - error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
to - error_reporting = E_ALL

change - display_errors = Off
to - display_errors = 1
$ sudo service apache2 restart

On browser ran;
1) /localhost/xyz
blank page displayed

2) /localhost/zyz/index.php
Code:
Not Found
The requested URL /xyz/index.php was not found on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80

$ apt-cache policy php5
Code:
php5:
  Installed: (none)
  Candidate: 5.5.9+dfsg-1ubuntu4.7
  Version table:
     5.5.9+dfsg-1ubuntu4.7 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     5.5.9+dfsg-1ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
php5 NOT INSTALLED ???

Then start a Mint 16 VM with Apache2 running
$ ls /etc/php5/
Code:
apache2  cli  conf.d  mods-available
apache2 is there

$ apt-cache policy php5
Code:
php5:
  Installed: (none)
  Candidate: 5.5.3+dfsg-1ubuntu2.6
  Version table:
     5.5.3+dfsg-1ubuntu2.6 0
        500 http://archive.ubuntu.com/ubuntu/ saucy-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ saucy-security/main amd64 Packages
     5.5.3+dfsg-1ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
php5 NOT installed?

I'm stuck here.

Regards
satimis
 
Old 03-31-2015, 07:39 AM   #18
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
sudo apt-get install php5
 
Old 03-31-2015, 08:29 AM   #19
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,503

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
To install php with apache modules, take a look at step 3 at the link below. I don't know if you are using or have mysql but that is also expalined if needed. If you changed your Document Root back to /var/www/html, do you have an info.php file there and if so, what happens when you point to it from your web browser.

https://www.digitalocean.com/communi...n-ubuntu-14-04
 
Old 03-31-2015, 10:13 AM   #20
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by yancek View Post
To install php with apache modules, take a look at step 3 at the link below. I don't know if you are using or have mysql but that is also expalined if needed. If you changed your Document Root back to /var/www/html, do you have an info.php file there and if so, what happens when you point to it from your web browser.

https://www.digitalocean.com/communi...n-ubuntu-14-04
Hi,

Thanks for your advice.


Performed following steps;

DocumentRoot /var/www/html
$ sudo ln -s /var/www/info.php /var/www/html/info.php
$ sudo ln -s /var/www/xys /var/www/html/xyz

On browser http://localhost/xyz/info.php
Code:
Not Found

The requested URL /xyz/info.php was not found on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80
http://localhost/hymn/index.php
A blank page displayed


I couldn't recall exactly the steps performed previously to install LAMP. But I can confirm this VM was working properly before upgrade from Mint 16 to Mint 17. Same as other VMs running on Mint 16 are now working without problem.

$ apt-cache policy libapache2-mod-php5
Code:
libapache2-mod-php5:
  Installed: (none)
  Candidate: 5.5.9+dfsg-1ubuntu4.7
  Version table:
     5.5.9+dfsg-1ubuntu4.7 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     5.5.9+dfsg-1ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
$ apt-cache policy php5-mcrypt
Code:
php5-mcrypt:
  Installed: 5.4.6-0ubuntu5
  Candidate: 5.4.6-0ubuntu5
  Version table:
 *** 5.4.6-0ubuntu5 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
# /etc/init.d/mysql status
Code:
 * /usr/bin/mysqladmin  Ver 8.42 Distrib 5.5.41, for debian-linux-gnu on x86_64
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version		5.5.41-0ubuntu0.14.04.1
Protocol version	10
Connection		Localhost via UNIX socket
UNIX socket		/var/run/mysqld/mysqld.sock
Uptime:			21 min 55 sec

Threads: 1  Questions: 174  Slow queries: 0  Opens: 303  Flush tables: 1  Open tables: 74  Queries per second avg: 0.132
MySQL is working



Other VM running Mint 16 for comparison:-

$ apt-cache policy php5
Code:
php5:
  Installed: (none)
  Candidate: 5.5.3+dfsg-1ubuntu2.6
  Version table:
     5.5.3+dfsg-1ubuntu2.6 0
        500 http://archive.ubuntu.com/ubuntu/ saucy-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ saucy-security/main amd64 Packages
     5.5.3+dfsg-1ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
$ apt-cache policy libapache2-mod-php5
Code:
libapache2-mod-php5:
  Installed: 5.5.3+dfsg-1ubuntu2.3
  Candidate: 5.5.3+dfsg-1ubuntu2.6
  Version table:
     5.5.3+dfsg-1ubuntu2.6 0
        500 http://archive.ubuntu.com/ubuntu/ saucy-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ saucy-security/main amd64 Packages
 *** 5.5.3+dfsg-1ubuntu2.3 0
        100 /var/lib/dpkg/status
     5.5.3+dfsg-1ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
$ apt-cache policy php5-mcrypt
Code:
php5-mcrypt:
  Installed: 5.4.6-0ubuntu3
  Candidate: 5.4.6-0ubuntu3
  Version table:
 *** 5.4.6-0ubuntu3 0
        500 http://archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages
        100 /var/lib/dpkg/status
# /etc/init.d/mysql status
Code:
 * /usr/bin/mysqladmin  Ver 8.42 Distrib 5.5.35, for debian-linux-gnu on x86_64
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version		5.5.35-0ubuntu0.13.10.2
Protocol version	10
Connection		Localhost via UNIX socket
UNIX socket		/var/run/mysqld/mysqld.sock
Uptime:			16 min 44 sec

Threads: 1  Questions: 560  Slow queries: 0  Opens: 475  Flush tables: 1  Open tables: 117  Queries per second avg: 0.557
Regards
satimis
 
Old 03-31-2015, 12:00 PM   #21
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,972
Blog Entries: 32

Rep: Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465
satimis,

I could be totally wrong but in Linux Mint 17 I think you need to configure apache2.conf to work with Phpmyadmin.

Code:
gksudo gedit /etc/apache2/apache2.conf
Copy and paste the following line at the bottom of the file, save and quit.

Code:
Include /etc/phpmyadmin/apache.conf
Then restart Apache:

Code:
sudo service apache2 restart
 
Old 03-31-2015, 07:54 PM   #22
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by beachboy2 View Post
satimis,

I could be totally wrong but in Linux Mint 17 I think you need to configure apache2.conf to work with Phpmyadmin.

Code:
gksudo gedit /etc/apache2/apache2.conf
Copy and paste the following line at the bottom of the file, save and quit.

Code:
Include /etc/phpmyadmin/apache.conf
Then restart Apache:

Code:
sudo service apache2 restart
Hi beachboy2,

Thanks for your advice.

Performed your steps. Restarted apache2 including reboot VM.

On browser
/localhost/phpmyadmin
only codes displayed.

/localhost/xyz
only blank page displayed

Regards
satimis
 
Old 04-01-2015, 11:13 AM   #23
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,972
Blog Entries: 32

Rep: Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465
satimis,

When I last set up a LAMP server on Ubuntu, just for test purposes, I followed this HowTo:

http://tuxtweaks.com/2012/04/install...cise-pangolin/

Everything worked fine without any errors.

Comments at the end of the piece suggest that Linux Mint 17 also works.

I hope you manage to track down the cause of the error.
 
  


Reply



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
[SOLVED] BASH: service apache2 start => check apache2 response dragonetti Linux - Newbie 2 10-29-2011 11:01 AM
cannot start apache2 jrella Linux - Software 3 04-28-2009 09:53 AM
Apache2 Installed But Unable to Start and Test rforrister Linux - Server 5 03-19-2007 12:43 PM
How to start Apache2 Rodotheos Linux - Software 4 10-01-2005 06:21 AM
apache2 unable to bind to 0.0.0.0:80 Zaius Linux - Newbie 13 01-23-2004 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:29 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration