LinuxQuestions.org
Review your favorite Linux distribution.
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 06-28-2010, 07:26 AM   #1
arun-linux
LQ Newbie
 
Registered: Feb 2008
Posts: 17

Rep: Reputation: 0
LAMP Installation Problem in Ubuntu Lucid 10.04


Hello folks,


I am trying to configure LAMP environment on ubuntu10.04 Lucid system.I am writing the output & attaching files of output of different issues.

PHP is not running,I cant figure out why its not working.

To add this issue I would like to inform you that nanoweb server is working{I can see the page in web browser"It Works"}.Also MySQL is working fine.

To summarize Linux-->Apache/Nanoweb but no bridge between MySQL--X--> PHP.


Please guide me for right direction,how to approach this problem as i am unable to crack this common problem.

output:
----------------------------------------------------------------------
iit@iit-desktop:~$ php
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/curl.so' - /usr/lib/php5/20090626+lfs/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
---------------------------------------------------------------


Step by step solution will be of great help.

--
Regards
Arun
Attached Images
File Type: jpg apache2_start prob.jpg (93.4 KB, 7 views)
File Type: png configuring Php.png (149.7 KB, 7 views)
 
Old 06-28-2010, 02:52 PM   #2
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
Did you install php5-mysql?
sudo apt-get install php5-mysql

How did you go about installing nanoweb and mysql?

Last edited by hanzerik; 06-28-2010 at 03:00 PM.
 
Old 06-29-2010, 03:31 AM   #3
arun-linux
LQ Newbie
 
Registered: Feb 2008
Posts: 17

Original Poster
Rep: Reputation: 0
Lightbulb @hanzerik : Nanoweb & MySQL

Thanks Hanzerik for your reply.

Well I have already installed php5-mysql.But just for your Information,Here is the output of "sudo apt-get install php5-mysql"

output:
___________________________________________________________________
iit@iit-desktop:~$ sudo apt-get install php5-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-mysql is already the newest version.
php5-mysql set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 60 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up phppgadmin (4.2.2-1ubuntu1) ...
apache2: Syntax error on line 204 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/php4.load: No such file or directory
...fail!
invoke-rc.d: initscript apache2, action "reload" failed.
dpkg: error processing phppgadmin (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
phppgadmin
E: Sub-process /usr/bin/dpkg returned an error code (1)
iit@iit-desktop:~$
_____________________________________________________________________


all lamp Environment is installed but not configured properly,so please guide me what changes have to made in some files like php.ini,apache.conf ....as these files are having some problem.

when I writes "apache2" on terminal It have following output:

output:
___________________________________________________________________

iit@iit-desktop:~$ apache2
apache2: Syntax error on line 204 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/php4.load: No such file or directory
iit@iit-desktop:~$
___________________________________________________________________


Please Guide me.I will be very thankful to you.

--
Regards
Arun
 
Old 06-29-2010, 11:04 AM   #4
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
Code:
iit@iit-desktop:~$ls /etc/apache2/mods-enabled
iit@iit-desktop:~$ls /etc/apache2/mods-available
See if php4.conf and php4.load are located in these two folders. But if I remember correctly Ubuntu 10.04 uses php5, so you may see pgp5.conf and php5.load.

Code:
iit@iit-desktop:~$sudo a2enmod php5
iit@iit-desktop:~$sudo /etc/init.d/apache2 reload
This will enable the php5 module and restart the Apache2 server. But it looks like something is looking for the php4 module, did you edit any files by hand to look for php4?

Edit To Add: Have a look at this thread: http://ubuntuforums.org/showthread.php?t=354545
You may have the worng php#-pgsql loaded. Are you using phppgadmin for something? if not you might want to remove it.

Code:
iit@iit-desktop:~$sudo a2dismod php4-pgsql
iit@iit-desktop:~$sudo apt-get update
iit@iit-desktop:~$sudo apt-get install php5-pgsql
iit@iit-desktop:~$sudo a2enmod php5-pgsql
iit@iit-desktop:~$sudo /etc/init.d/apache2 reload
This will disable the php4-pgsql mode, then download and install the php5-pgsql module, then enable the module, then restart apache2. Somewhere there is a version mis-match, whether that is for php4 or php5. That version of phpgadmin depends on libapache2-mod-php5, php5-cgi, php5-pgsql, apache2. So make sure you have all of those dependences installed, which you probably do since when phppgadmin was installed it should have downloaded everything else. My suggestion is, if you don't need it, is to remove phppgadmin.

Last edited by hanzerik; 06-29-2010 at 11:28 AM.
 
Old 06-29-2010, 11:32 AM   #5
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
Since you are using Mysql, you probably don't need phppgadmin because that is for PostgreSQL databases.

phpmyadmin is the app for working with mysql databases.
 
Old 06-30-2010, 08:00 AM   #6
arun-linux
LQ Newbie
 
Registered: Feb 2008
Posts: 17

Original Poster
Rep: Reputation: 0
Question @hanzerik : Lamp problem

Hello Hanzerik,

I applied the settings as you wrote in your previous post.I am providing you the output of "ls /etc/apache2/mods-enabled"

Output:
______________________________________________________________
Code:
iit@iit-desktop:~$ openbabel
openbabel: command not found
iit@iit-desktop:~$ ls /etc/apache2/mods-enabled
actions.conf          authz_user.load  mime.conf         rewrite.load
actions.load          autoindex.conf   mime.load         scgi.load
alias.conf            autoindex.load   negotiation.conf  setenvif.conf
alias.load            cgi.load         negotiation.load  setenvif.load
auth_basic.load       deflate.conf     php4.conf         ssl.conf
auth_kerb.load        deflate.load     php4.load         ssl.load
authn_file.load       dir.conf         php5.conf         status.conf
authz_default.load    dir.load         php5.load         status.load
authz_groupfile.load  env.load         reqtimeout.conf   suphp.conf
authz_host.load       jk.load          reqtimeout.load   suphp.load
___________________________________________________________________


In my view,In above output things in bold are conflicting each other and hence apache is not able to start/run as it is not able to decide which PHP version it should run.



output of "ls /etc/apache2/mods-available"

output:
_____________________________________________________________________
Code:
-desktop:~$ apache2
apache2: Syntax error on line 204 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/php4.load: No such file or directory
iit@iit-desktop:~$ ls /etc/apache2/mods-available
000_auth_pgsql.load   axis2c.conf        headers.load         proxy_ftp.load
actions.conf          axis2c.load        ident.load           proxy_http.load
actions.load          cache.load         imagemap.load        proxy.load
alias.conf            cern_meta.load     include.load         proxy_scgi.load
alias.load            cgid.conf          info.conf            reqtimeout.conf
asis.load             cgid.load          info.load            reqtimeout.load
auth_basic.load       cgi.load           jk.load              rewrite.load
auth_digest.load      charset_lite.load  ldap.load            scgi.load
auth_kerb.load        dav_fs.conf        log_forensic.load    setenvif.conf
auth_mysql.load       dav_fs.load        macro.load           setenvif.load
authn_alias.load      dav.load           mem_cache.conf       speling.load
authn_anon.load       dav_lock.load      mem_cache.load       ssl.conf
authn_dbd.load        dbd.load           mime.conf            ssl.load
authn_dbm.load        deflate.conf       mime.load            status.conf
authn_default.load    deflate.load       mime_magic.conf      status.load
authn_file.load       dir.conf           mime_magic.load      substitute.load
authnz_ldap.load      dir.load           modxslt.load         suexec.load
authz_dbm.load        disk_cache.conf    negotiation.conf     suphp.conf
authz_default.load    disk_cache.load    negotiation.load     suphp.load
authz_groupfile.load  dump_io.load       php5.conf            unique_id.load
authz_host.load       env.load           php5.load            userdir.conf
authz_owner.load      expires.load       proxy_ajp.load       userdir.load
authz_user.load       ext_filter.load    proxy_balancer.load  usertrack.load
autoindex.conf        file_cache.load    proxy.conf           version.load
autoindex.load        filter.load        proxy_connect.load   vhost_alias.load
________________________________________________________

-------------------------------------------------------
Code:

iit@iit-desktop:~$sudo a2enmod php5
iit@iit-desktop:~$sudo /etc/init.d/apache2 reload

This will enable the php5 module and restart the Apache2 server. But it looks like something is looking for the php4 module, did you edit any files by hand to look for php4?
--------------------------------------------------------

No I did not edit ANY files by hand in any directory, neither for php4 or php5.


===============================================================
Just to add for your Information,as u suggested I removed "phppgadmin"{sudo apt-get remove phppgadmin}

----------------------------------------------------------------
sudo a2dismod php4-pgsql
[sudo] password for iit:
ERROR: Module php4-pgsql does not exist!
================================================================

apache2 still not starting,it says:

Code:
iit@iit-desktop:~$ sudo /etc/init.d/apache2 reload
apache2: Syntax error on line 204 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/php4.load: No such file or directory
   ...fail!

I am still fighting this situation & have no idea why It has been not solved yet. Very thankful to you for your kind help.

looking forward for your reply.

--
Regards
Arun
 
Old 06-30-2010, 09:10 AM   #7
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
Can you do a
Code:
ls -al /etc/apache2/mods-available/php*
Wonder if the php4 module is a symlink to the php5 module. Apache may be freaking out because two versions of php are tring to be used.


Code:
sudo a2dismod php4
Try Disabling the php4 module, or moving those two php4 files in the mods-enabled directory to the mods-available directory.

Don't forget to restart apache2:
Code:
sudo /etc/init.d/apache2 reload

Last edited by hanzerik; 06-30-2010 at 09:13 AM.
 
Old 07-01-2010, 01:22 AM   #8
arun-linux
LQ Newbie
 
Registered: Feb 2008
Posts: 17

Original Poster
Rep: Reputation: 0
@hanzerik : LAMP problem

Hello Hanzerik,




Output:ls -al /etc/apache2/mods-available/php*
___________________________________________________________
Code:
 sudo su
[sudo] password for iit: 
root@iit-desktop:/home/iit# ls -al /etc/apache2/mods-available/php*
-rw-r--r-- 1 root root 546 2010-05-14 01:45 /etc/apache2/mods-available/php5.conf
-rw-r--r-- 1 root root  59 2010-05-14 01:45 /etc/apache2/mods-available/php5.load
___________________________________________________________
 
Old 07-01-2010, 01:49 AM   #9
arun-linux
LQ Newbie
 
Registered: Feb 2008
Posts: 17

Original Poster
Rep: Reputation: 0
Arrow @hanzerik : LAMP problem

Output:"sudo a2dismod php4"
________________________________________________________________

Code:
root@iit-desktop:/home/iit# sudo a2dismod php4
removing dangling symlink /etc/apache2/mods-enabled/php4.load
________________________________________________________________

Output:"sudo /etc/init.d/apache2 reload"
_________________________________________________________________
Code:
root@iit-desktop:/home/iit# sudo /etc/init.d/apache2 reload
apache2: Syntax error on line 205 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/mods-enabled/php4.conf: No such file or directory
   ...fail!
_____________________________________________________________

Now apache2 is not starting due to another set of problem,related to nanourl file,I am showing output below after i restarted apache2.

______________________________________________________________
Code:
root@iit-desktop:/home/iit# sudo a2dismod php4
ERROR: Module php4 does not exist!
Code:
root@iit-desktop:/home/iit# sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                                                apache2: Syntax error on line 233 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/nanourl: No such file or directory
                                                                         [fail]
You have new mail in /var/mail/root
___________________________________________________________________

Looking forward for your reply.Thanks a lot for suggesting me right direction,but still I am juggling with problem

--
Best Regards
Arun Singh
 
Old 07-02-2010, 05:49 AM   #10
arun-linux
LQ Newbie
 
Registered: Feb 2008
Posts: 17

Original Poster
Rep: Reputation: 0
Lightbulb @hanzerik : LAMP problem

I also tried this on terminal,output of php5:

output: php5

Code:
$ php5
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/curl.so' - /usr/lib/php5/20090626+lfs/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0

@Hanzerik,Thanks a lot for helping out,Looking forward for your reply.

--
Thanks & Regards
Arun

Last edited by arun-linux; 07-02-2010 at 05:50 AM.
 
  


Reply

Tags
installation, lamp, starting


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
LXer: Ubuntu Lucid Lynx 10.04 Post Installation Guide LXer Syndicated Linux News 0 05-01-2010 07:20 PM
Ubuntu Lucid codeblocks problem artur13 Linux - Software 0 04-23-2010 07:53 AM
installation of lamp server in ubuntu 9.10 yasokrish Linux - Software 1 04-15-2010 08:49 AM
LXer: Ubuntu 6.10 (Edgy Eft) LAMP Server Installation with Screenshots LXer Syndicated Linux News 1 11-22-2006 12:32 PM
LXer: LAMP Installation On Ubuntu 6.06 For Linux Newbies LXer Syndicated Linux News 0 07-30-2006 06:54 PM


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