# PHP Configuration Problem in Linux Ubuntu 12.04

**URL:** <https://www.phphelp.com/t/php-configuration-problem-in-linux-ubuntu-12-04/20588>\
**Category:** PHP Installation and Configuration\
**Created:** [June 30, 2013, 6:28am UTC](https://www.phphelp.com/t/php-configuration-problem-in-linux-ubuntu-12-04/20588 "2013-06-30T06:28:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aplusguy](https://www.phphelp.com/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@aplusguy](https://www.phphelp.com/u/aplusguy)\
**Post date:** [June 30, 2013, 6:28am UTC](https://www.phphelp.com/t/php-configuration-problem-in-linux-ubuntu-12-04/20588/1 "2013-06-30T06:28:57Z")

</div>

I have installed PHP5 into a recent Linux Ubuntu 12.04 installation (over a month ago), and have been working on trying to configure PHP and make it work, but have been unsuccessful. I have nearly always been able to figure out hardware and software problems, but am currently stumped and need some help. I have three PHP technical books I bought a couple of years ago, and I can find nothing in them to help me resolve this problem. There is urgency since I have a website (developed in HTML) that I need to add new features to with PHP. I have coded about 90% of it in PHP and tested it, but my Ubuntu 10.10 stopped working and there was no longer any support for that version. So I had to reinstall a current version of Linux Ubuntu, Apache, PHP, MySQL, and PHPAdmin (LAMP), and get them to work first.  
I installed PHP with the ‘sudo apt-get install php5’ command at the Terminal Window. I got the following information from inserting ‘127.0.1.1/info.php’ in my browser address input space. That is the only PHP command that I can get to work. The version of PHP that was installed is 5.3.10; the localhost port is 127.0.1.1 (the default since the installation was unable to find a port designation); the Apache version is 2.2.22; my root directory is /var/www; my php.ini configuration file is at /etc/php5/apache2; additional .ini files are at /etc/php5/apache2/conf.d; the path is ‘/usr/local/bin; /usr/bin; /bin’. My browser is Firefox version 22.0 (the current and newest version).  
When I double click on a .php file in Nautilus, the editor (gedit) is started, and shows the contents of the .php file, and the PHP commands are not executed (whereas they executed fine in my previous Ubuntu 10.10 installation). When I double click on a .html file that has PHP code in it, I get the output from the HTML commands, but no output from the PHP commands. When I right click on the browser output to view the Page Source, the HTML commands are in purple, and the PHP commands are in red (I think this indicates the PHP commands are not being executed). All of these worked fine in my previous Ubuntu 10.10 and PHP installation, so unless basic coding rules have changed drastically, it cannot be a HTML or PHP coding problem.

My /etc/apache2/httpd.conf file is as follows:

AddType application/x-compress .z  
AddType application/x-gzip .gz .tgz  
AddType application/x-httpd-php .php .phtml .html  
AddType application/x-httpd-php-source .phps  
LoadModule access\_module modules/mod\_access.so  
LoadModule actions\_module /usr/lib/apache2/modules/mod\_actions.so  
LoadModule alias\_module modules/mod\_alias.so  
LoadModule asis\_module /usr/lib/apache2/modules/mod\_asis.so  
LoadModule auth\_basic\_module modules/mod\_auth\_basic.so  
LoadModule ssl\_module modules/mod\_ssl.so  
LoadModule php5\_module modules/libphp5.so

My /etc/php5/apache2/php.ini file (without the commented lines) is as follows:

[PHP]  
engine = On  
short\_open\_tag = On  
asp\_tags = Off  
precision = 14  
y2k\_compliance = On  
output\_buffering = 4096  
zlib.output\_compression = Off  
zlib.output\_compression = Off  
implicit\_flush = Off  
unserialize\_callback\_func =  
serialize\_precision = 17  
allow\_call\_time\_pass\_reference = Off  
safe\_mode = Off  
safe\_mode\_gid = Off  
safe\_mode\_include\_dir =  
safe\_mode\_exec\_dir =  
safe\_mode\_allowed\_env\_vars = PHP\_  
safe\_mode\_protected\_env\_vars = LD\_LIBRARY\_PATH  
disable\_functions = pcntl\_alarm,pcntl\_fork,pcntl\_waitpid,pcntl\_wait,pcntl\_wifexited,pcntl\_wifstopped,pcntl\_wifsignaled,pcntl\_wexitstatus,pcntl\_wtermsig,pcntl\_wstopsig,pcntl\_signal,pcntl\_signal\_dispatch,pcntl\_get\_last\_error,pcntl\_strerror,pcntl\_sigprocmask,pcntl\_sigwaitinfo,pcntl\_sigtimedwait,pcntl\_exec,pcntl\_getpriority,pcntl\_setpriority,  
disable\_classes =  
zend.enable\_gc = On  
expose\_php = On  
max\_execution\_time = 30  
max\_input\_time = 60  
memory\_limit = 128M  
error\_reporting = E\_ALL & ~E\_DEPRECATED  
display\_errors = Off  
display\_startup\_errors = Off  
log\_errors = On  
log\_errors\_max\_len = 1024  
ignore\_repeated\_errors = Off  
ignore\_repeated\_source = Off  
report\_memleaks = On  
track\_errors = Off  
html\_errors = Off  
variables\_order = “GPCS”  
request\_order = “GP”  
register\_globals = Off  
register\_long\_arrays = Off  
register\_argc\_argv = Off  
auto\_globals\_jit = On  
post\_max\_size = 8M  
magic\_quotes\_gpc = Off  
magic\_quotes\_runtime = Off  
magic\_quotes\_sybase = Off  
auto\_prepend\_file =  
auto\_append\_file =  
default\_mimetype = “text/html”  
include\_path = “.:/usr/bin/php5: /usr/share/php5: /usr/lib/php5: /var/lib/php5: /etc/php5”  
doc\_root =  
user\_dir =  
enable\_dl = Off  
file\_uploads = On  
upload\_max\_filesize = 2M  
max\_file\_uploads = 20  
allow\_url\_fopen = On  
allow\_url\_include = Off  
default\_socket\_timeout = 60  
[Date]  
[filter]  
[iconv]  
[intl]  
[sqlite]  
[sqlite3]  
[Pcre]  
[Pdo]  
[Pdo\_mysql]  
pdo\_mysql.cache\_size = 2000  
pdo\_mysql.default\_socket=  
[Phar]  
[Syslog]  
define\_syslog\_variables = Off  
[mail function]  
SMTP = localhost  
smtp\_port = 25  
mail.add\_x\_header = On  
[SQL]  
sql.safe\_mode = Off  
[ODBC]  
odbc.allow\_persistent = On  
odbc.check\_persistent = On  
odbc.max\_persistent = -1  
odbc.max\_links = -1  
odbc.defaultlrl = 4096  
odbc.defaultbinmode = 1  
[Interbase]  
ibase.allow\_persistent = 1  
ibase.max\_persistent = -1  
ibase.max\_links = -1  
ibase.timestampformat = “%Y-%m-%d %H:%M:%S”  
ibase.dateformat = “%Y-%m-%d”  
ibase.timeformat = “%H:%M:%S”  
[MySQL]  
mysql.allow\_local\_infile = On  
mysql.allow\_persistent = On  
mysql.cache\_size = 2000  
mysql.max\_persistent = -1  
mysql.max\_links = -1  
mysql.default\_port =  
mysql.default\_socket =  
mysql.default\_host =  
mysql.default\_user =  
mysql.default\_password =  
mysql.connect\_timeout = 60  
mysql.trace\_mode = Off  
[MySQLi]  
mysqli.max\_persistent = -1  
mysqli.allow\_persistent = On  
mysqli.max\_links = -1  
mysqli.cache\_size = 2000  
mysqli.default\_port = 3306  
mysqli.default\_socket =  
mysqli.default\_host =  
mysqli.default\_user =  
mysqli.default\_pw =  
mysqli.reconnect = Off  
[mysqlnd]  
mysqlnd.collect\_statistics = On  
mysqlnd.collect\_memory\_statistics = Off  
[OCI8]  
[PostgreSQL]  
pgsql.allow\_persistent = On  
pgsql.auto\_reset\_persistent = Off  
pgsql.max\_persistent = -1  
pgsql.max\_links = -1  
pgsql.ignore\_notice = 0  
pgsql.log\_notice = 0  
[Sybase-CT]  
sybct.allow\_persistent = On  
sybct.max\_persistent = -1  
sybct.max\_links = -1  
sybct.min\_server\_severity = 10  
sybct.min\_client\_severity = 10  
[bcmath]  
bcmath.scale = 0  
[browscap]  
[Session]  
session.save\_handler = files  
session.use\_cookies = 1  
session.use\_only\_cookies = 1  
session.name = PHPSESSID  
session.auto\_start = 0  
session.cookie\_lifetime = 0  
session.cookie\_path = /  
session.cookie\_domain =  
session.cookie\_httponly =  
session.serialize\_handler = php  
session.gc\_probability = 0  
session.gc\_divisor = 1000  
session.gc\_maxlifetime = 1440  
session.bug\_compat\_42 = Off  
session.bug\_compat\_warn = Off  
session.referer\_check =  
session.entropy\_length = 0  
session.cache\_limiter = nocache  
session.cache\_expire = 180  
session.use\_trans\_sid = 0  
session.hash\_function = 0  
session.hash\_bits\_per\_character = 5  
url\_rewriter.tags = “a=href,area=href,frame=src,input=src,form=fakeentry”  
[MSSQL]  
mssql.allow\_persistent = On  
mssql.max\_persistent = -1  
mssql.max\_links = -1  
mssql.min\_error\_severity = 10  
mssql.min\_message\_severity = 10  
mssql.compatability\_mode = Off  
mssql.secure\_connection = Off  
[Assertion]  
[COM]  
[mbstring]  
[gd]  
[exif]  
[Tidy]  
tidy.clean\_output = Off  
[soap]  
soap.wsdl\_cache\_enabled=1  
soap.wsdl\_cache\_dir="/tmp"  
soap.wsdl\_cache\_ttl=86400  
soap.wsdl\_cache\_limit = 5  
[sysvshm]  
[ldap]  
ldap.max\_links = -1  
[mcrypt]  
[dba]  
[xsl]

I have downloaded the PHP manual, and read the Configuration section, and have found nothing helpful there. In addition, the PHP manual is outdated, and is primarily about PHP4, and many things in PHP5 seem to have changed since PHP4. The only other clue I have is from the /var/log/apache2/error.log file, and I have been unable to interpret the meaning of the error messages in it. They are as follows:

[Sun Jun 23 18:32:36 2013] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico  
[Sun Jun 23 18:41:35 2013] [error] [client 192.168.210.100] File does not exist: /var/www/currentsetting.htm

A confusing aspect of this for me is that the port address in the second error message is shown as 192.168.210.100 instead of 127.0.1.1. I have spent a lot of time searching with grep for a file with ‘currentsetting.htm’ in it to see where this comes from, but have been unable to find it. The first error message has the default port address in it. And to me, this begs the question, why won’t this work when you install PHP without all of this hassle? I’m beginning to think that even though I have invested a lot of time developing several vitally needed features using PHP in my website, perhaps I should move on to other software to complete this. I feel quite exasperated and frustrated by this experience. I hope at least one of you has the knowledge, experience, and competence to help me resolve this problem soon so I don’t have to start over with something else. Thanks.
