LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-07-2013, 06:47 AM   #16
bloodstreetboy
Member
 
Registered: May 2012
Posts: 201

Original Poster
Blog Entries: 3

Rep: Reputation: 37

@TenTenths
Sorry I didn't mean this. may be My English is baddest(worst) that's why it looks harsh.
I know this is a free forum and you are giving your precious time to solve my mortal problems.
Once again I apologize.
Thanks for your help.
 
Old 03-07-2013, 10:13 AM   #17
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271
Blog Entries: 7

Rep: Reputation: 18
Hi bloodstreetboy,

Where is your php.ini file located whether it is inside /etc/php/apache2 or /etc/lamp/php/apache2

not sure whether it worths for solving your issue.

Thanks&regards,
Dinesh.

Last edited by dinakumar12; 03-07-2013 at 11:42 AM.
 
Old 03-07-2013, 11:19 PM   #18
bloodstreetboy
Member
 
Registered: May 2012
Posts: 201

Original Poster
Blog Entries: 3

Rep: Reputation: 37
When I run
$ sudo a2enmod php5
or
$ sudo a2enmod php
it shows
ERROR: Module php5 does not exist!
or
ERROR: Module php does not exist!
 
Old 03-07-2013, 11:30 PM   #19
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 300
Blog Entries: 2

Rep: Reputation: 51
It means you do not have php5.conf & php5.load or php.conf & php.load in /etc/apache2/mods-available.
You should create them there.
 
Old 03-07-2013, 11:31 PM   #20
bloodstreetboy
Member
 
Registered: May 2012
Posts: 201

Original Poster
Blog Entries: 3

Rep: Reputation: 37
I don't know how to create them.
 
Old 03-08-2013, 12:00 AM   #21
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 300
Blog Entries: 2

Rep: Reputation: 51
Make two files php5.conf & php5.load in /etc/apache2/mods-available

Contents of php5.conf
Code:
<IfModule mod_php5.c>
     AddType application/x-httpd-php .php .phtml .php3
     AddType application/x-httpd-php-source .phps
   </IfModule>
Contents of php5.load
Code:
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
but it is necessary there should be file libphp5.so in /usr/lib/apache2/modules , otherwise it will not work.
 
1 members found this post helpful.
Old 03-08-2013, 12:10 AM   #22
bloodstreetboy
Member
 
Registered: May 2012
Posts: 201

Original Poster
Blog Entries: 3

Rep: Reputation: 37
It doesn't work, I am still getting the download link of php.
I have restarted the apache2 after creating both files.
 
Old 03-08-2013, 12:40 AM   #23
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 300
Blog Entries: 2

Rep: Reputation: 51
wait, I was waiting for your reply if you have libphp5.so or not.
Because if you don't have, the solution will not work for you and I will have to tell you other method.
But it looks like you have the file otherwise you would mention it.

Now make links of these two files in /etc/apache2/mods-enabled
Run these commands on terminal.
Code:
$ ln -s /etc/apache2/mods-available/php5.conf /etc/apache2/mods-enabled/php5.conf
$ ln -s /etc/apache2/mods-available/php5.load /etc/apache2/mods-enabled/php5.load
When you will create the links, now you should try
Code:
$ sudo a2enmod php5
I hope, it will not give the error
ERROR: Module php5 does not exist! or ERROR: Module php does not exist!

It should give the message.
Code:
Enabling module php.
Run '/etc/init.d/apache2 restart' to activate new configuration!
Now restart apache2 and try to access your index.php
 
1 members found this post helpful.
Old 03-13-2013, 08:43 AM   #24
tombelcher7
Member
 
Registered: Feb 2008
Location: Surrey
Distribution: Debian
Posts: 214

Rep: Reputation: 5
I've just had a skim-read of this thread; but you may find it worthy to try setting up a virtual directory for your web project.

Personally the way I do this:

create folder for project under /var/www (assuming this is your web root) i.e. /var/www/mywebproject
Set permissions for this directory (this may vary depending on your project)

I normally use: sudo chown -R www-data:www-data /var/www/mywebproject

Then make a copy of /etc/apache2/sites-available/default : sudo cp default mywebproject

Then change the web root within mywebproject (its a config file) to match what it should be...........

Make any other pertinent changes to this file and save it out.

Then run sudo a2ensite mywebproject

This may help..................
 
  


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
no browser open index.php files but other *.php files working gal Linux - Server 3 12-24-2012 06:40 AM
public_html not working house_randann Linux - Networking 4 01-05-2007 06:56 PM
httpd ~user/public_html not working belorion Linux - General 11 12-01-2006 04:19 PM
PHP and public_html MurrayL Linux - Security 2 11-08-2004 01:00 AM
User's public_html is not parseing .htaccess files greenhornet Linux - Networking 1 04-02-2002 03:00 AM

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

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