LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   LAMP Installation Problem in Ubuntu Lucid 10.04 (https://www.linuxquestions.org/questions/linux-newbie-8/lamp-installation-problem-in-ubuntu-lucid-10-04-a-816773/)

arun-linux 06-28-2010 06:26 AM

LAMP Installation Problem in Ubuntu Lucid 10.04
 
2 Attachment(s)
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

hanzerik 06-28-2010 01:52 PM

Did you install php5-mysql?
sudo apt-get install php5-mysql

How did you go about installing nanoweb and mysql?

arun-linux 06-29-2010 02:31 AM

@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

hanzerik 06-29-2010 10:04 AM

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.

hanzerik 06-29-2010 10:32 AM

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.

arun-linux 06-30-2010 07:00 AM

@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

hanzerik 06-30-2010 08:10 AM

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

arun-linux 07-01-2010 12:22 AM

@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

___________________________________________________________

arun-linux 07-01-2010 12:49 AM

@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

________________________________________________________________

:confused: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:banghead:

--
Best Regards
Arun Singh

arun-linux 07-02-2010 04:49 AM

@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


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