Setup up of PHP on Libranet

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.

starviewAsked:
Who is Participating?
 
pdub79Connect With a Mentor Commented:
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
 
starviewAuthor Commented:
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
 
pdub79Connect With a Mentor Commented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
starviewAuthor Commented:
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
 
starviewAuthor Commented:
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
 
starviewAuthor Commented:
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
 
ahoffmannConnect With a Mentor Commented:
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
 
starviewAuthor Commented:
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
All Courses

From novice to tech pro — start learning today.