LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 05-15-2007, 07:09 AM   #1
Misha
LQ Newbie
 
Registered: Apr 2007
Posts: 2

Rep: Reputation: 0
php7 + apache2 installation problems


HI!
I thought I've posted already, but my post didn't appear .
So let's begin, part 2
I'm trying to install php5 with apache2 on Feisty.
I upgraded from 6.06 to Feisty recently.
I can't run php scripts with Firefox(dropping download-box invitation)
Can somebody provide me with solution?

PHP 5.2.1 (cli) (built: Apr 26 2007 15:30:37)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Server version: Apache/2.2.3
Server built: Jan 15 2007 18:14:50

Distributor ID: Ubuntu
Description: Ubuntu 7.04
Release: 7.04
Codename: feisty

Thank you.

(Sorry for php7 in title, PHP5 Should REALLY BE)

Last edited by Misha; 05-15-2007 at 07:11 AM.
 
Old 05-15-2007, 09:02 AM   #2
vxc69
Member
 
Registered: Jul 2004
Distribution: Ubuntu
Posts: 387

Rep: Reputation: 33
Yes. You'll need to install apache2, php5, and libapache2-mod-php5.

Then drop all your .php files to /var/www/ and access them via browser http://localhost/your_file.php

EDIT: Use the package manager to install these and you should be fine.

Hope this helps,
vxc

Last edited by vxc69; 05-15-2007 at 09:13 AM.
 
Old 05-16-2007, 12:39 AM   #3
Misha
LQ Newbie
 
Registered: Apr 2007
Posts: 2

Original Poster
Rep: Reputation: 0
I already did that. 2 times I totally deleted and installed all apache2, php5 and mysql packages.
After installing apache2, it contained empty http.d file. I overwrote httpd.conf from
/usr/local/apache2/conf/original/httpd.conf.
which caused next error:

[Wed May 16 09:33:31 2007] [warn] module php5_module is already loaded, skipping
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
fixed with this link:
http://www.linuxquestions.org/questi...d.php?t=405377

After all that, apache2 still not recognize php extension.
httpd.conf includes :
AddType application/x-httpd-php .php .php5

and my test.php file is located in /var/www, with permission 0755.

any suggestions?


In bash, testing my.php file with command
$ php my.php
(my.php just includes phpinfo() function)
all environment variables are written.

Problem narrows with Firefox using. Isn't it?

Last edited by Misha; 05-16-2007 at 12:45 AM.
 
Old 05-17-2007, 02:42 PM   #4
mikeivanov
LQ Newbie
 
Registered: May 2007
Posts: 1

Rep: Reputation: Disabled
I've got exactly the same problems after upgrade.

Quote:
Originally Posted by Misha
Problem narrows with Firefox using. Isn't it?
No, if you try to save what it returns, you'll see your test.php source code.

That means Apache does not pass php files to the interpreter. Still have no idea what caused that, all the configs seem ok.

P.S. I really wish I didn't upgrade, too much headache...
 
Old 05-23-2007, 08:17 PM   #5
ellen G
LQ Newbie
 
Registered: May 2007
Posts: 3

Rep: Reputation: 0
Smile How about these methods? (I have not tried them out.)

I got exactly the same problem after I upgrade from ubuntu 6.10 to 7.04. I reinstall the whole system again and agin and tried many ways but still can not solve this problem. My apache 2 now can not let firefox to reading in php files. After seraching on the web I found this link:

http://ubuntuforums.org/showthread.php?t=253859

In that post one guy says:
"turns out all i needed was a folder called 'logs' in the root dir of the hosted files (/var/log/www/). i'm not sure if i needed to create the file 'error.log' in the 'logs' folder or not, but doing so caused the problem to go away. after creating said folder and file, run sudo /etc/init.d/apache2 restart and i'm back up and running."

In another post at the following link:

http://www.linuxquestions.org/questi...d.php?t=405377
The issue was fixed by commenting the first line at the top:
#Listen *:80

one guy says that he solved the problem by commenting the first line (#Listen *:80) at the top of his /etc/apache2/httpd.conf file because it overlaps with the other lines in that file.


Note that I have not yet tried them out. I plan to reinstall all things including the system again when I come back from my vocation.

Hope these informations are useful and let's try together to have this problem solved.
 
  


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
Apache2 installation with Yast on Suse10.0 CGI problems DLHOMME SUSE / openSUSE 0 05-20-2006 09:20 AM
apache2.0.55 installation problem linux-idiot Linux - Software 14 03-08-2006 04:51 PM
apache2 and php_apache2.. installation issues. SocialEngineer Slackware 7 12-25-2004 10:39 PM
10.1 installation/Apache2 issues gstark Mandriva 0 09-27-2004 04:33 PM
Need to remove Apache 1.3 default installation under Mandrake 8.1 so Apache2 can run RIOMX Linux - Software 6 12-13-2003 08:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:42 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