?
Solved

Setup up of PHP on Libranet

Posted on 2005-03-29
8
Medium Priority
?
438 Views
Last Modified: 2013-12-15
I can not get php script to execute.

When I installed Libranet GNU/Linux 2.8.1 it asks me several questions if I wanted to install php, do you want me to fill in the correct information on the php.ini and I answer yes.

But, when I tried to run any php script from the browser it will only ask me if I want to save the file.
There isn't any information on installing phpMyAdmin on Libranet.

So I place phpMyAdmin in the /var/www/ which is asigned root directory and where the index file is for you web page  and setup the config.inc.php file with the following:

$cfg[‘PmaAbsoluteUri’]=’http://localhost:80/phpMyAdmin’;

$cfg[‘Servers’][$i][‘host’]=’localhost’;

$cfg[‘Servers’][$i][‘auth_type’’]=’config’;

$cfg[‘Servers’][$i][‘user’]=’myusername’;

$cfg[‘Servers’][$i][‘password’]=’mypassword’;

When I run the following in my browser http://localhost:80/phpMyAdmin

It changes in the browser to http://127.0.0.1/phpMyAdmin

and It Displays the phpMyAdmin directory content, but will not run the index.php script for phpMyAdmin.

I have checked to see if apache and mysql are running and all seems to be ok.

0
Comment
Question by:starview
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 3

Accepted Solution

by:
pdub79 earned 1200 total points
ID: 13659102
Make sure you have edited your httpd.conf file in the AddType section to this...

AddType application/x-httpd-php .php .phtml

The index page of phpadmin is index.php
So you may also need to change httpd.conf DirectoryIndex

DirectoryIndex index.html index.html.var index.php

also make sure the httpd.conf is reading your php module
For php5,

LoadModule php5_module     modules/libphp5.so

Let me know if this helps or if you have more questions
0
 

Author Comment

by:starview
ID: 13664930
I have done all you have written above, but still get the same thing when I type
http://localhost it gaves me a list of directorys which is fine, but when I click the directory for phpMyAdmin it tells me the ** is of application/x-httpd-php and does not know how to handle this type.
This also happens when I tried to run any php script.

Also, I am getting this when I start apache:
[wed mar 30 07:47.46 2005] [alert apache:could not determine the server's full qualified domain, using 12.0.0.1 for serverName.
0
 
LVL 3

Assisted Solution

by:pdub79
pdub79 earned 1200 total points
ID: 13665753
Can you verify these lines are in your in your httpd.conf file....

LoadModule php5_module     modules/libphp5.so

AddType application/x-httpd-php .php .phtml

ServerName   localhost

Which version of php are you using? If it is not php5, your lib file for modules will be different
0
WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

 

Author Comment

by:starview
ID: 13666341
I am running php4 not php5 so I did'nt put that line in
LoadModule php5_module     modules/libphp5.so

Where is this line?
ServerName   localhost

I have done a search and could not find that line.
0
 

Author Comment

by:starview
ID: 13666686
I found them they were commented out.
I can now run php script, but I can not run phpMyAdmin it go as far as the language menu and stops.

I think I know what the problem is, I am trying to run phpMyAdmin 2.6.pl3
and should go back to and old version for php4.
anyway I think that is the the problem. Let me know if that is correct.
0
 

Author Comment

by:starview
ID: 13668237
OK, I deleted the phpMyAdmin-2.6.1-pl3
and replaced it with phpMyAdmin-2.2.7-pl1
 I have the config,inc.php setup as follows.

$cfg[‘PmaAbsoluteUri’]=’http://localhost/phpMyAdmin’;

$cfg[‘Servers’][$i][‘host’]=’localhost’;

$cfg[‘Servers’][$i][‘auth_type’’]=’config’;

$cfg[‘Servers’][$i][‘user’]=’myusername’;

$cfg[‘Servers’][$i][‘password’]=’mypassword’;

But when I try and run phpMyAdmin Iget the following error.

Error
MySQL said:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 800 total points
ID: 13670448
check if you have  /tmp/mysqld.sock or /tmp/mysql.sock
then you need either to configure that in your php.ini or phpMyAdmin's config file or in ~/.my.cnf (where ~ refers to the user's home directory which runs your httpd)
0
 

Author Comment

by:starview
ID: 13671436
Ok, but know I get this error:
Warning: unable to parse url (http:/localhost/phpMyAdmin/) in /var/www/phpMyAdmin/main.php on line 12
 
 Warning: Cannot add header information - headers already sent by (output started at /var/www/phpMyAdmin/main.php:12) in /var/www/phpMyAdmin/main.php on line 16
 
 Warning: Cannot add header information - headers already sent by (output started at /var/www/phpMyAdmin/main.php:12) in /var/www/phpMyAdmin/libraries/ob.lib.php on line 53
 
 Warning: Cannot add header information - headers already sent by (output started at /var/www/phpMyAdmin/main.php:12) in /var/www/phpMyAdmin/header.inc.php on line 23
 
 Warning: Cannot add header information - headers already sent by (output started at /var/www/phpMyAdmin/main.php:12) in /var/www/phpMyAdmin/header.inc.php on line 24
 
 Warning: Cannot add header information - headers already sent by (output started at /var/www/phpMyAdmin/main.php:12) in /var/www/phpMyAdmin/header.inc.php on line 25
 
 Warning: Cannot add header information - headers already sent by (output started at /var/www/phpMyAdmin/main.php:12) in /var/www/phpMyAdmin/header.inc.php on line 26
 
 Warning: Cannot add header information - headers already sent by (output started at /var/www/phpMyAdmin/main.php:12) in /var/www/phpMyAdmin/header.inc.php on line 28
     

Welcome to phpMyAdmin 2.2.7-pl1

 

MySQL 3.23.49-log running on localhost as oneplace@localhost



0

Featured Post

What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question