Fedora Linux Support Community & Resources Center
  #1  
Old 26th March 2007, 02:06 PM
fabie Offline
Registered User
 
Join Date: Mar 2007
Posts: 11
Reading PhP files

Hi All,

I'm a newbe to Linux on my home computer, but would like to get to know better how my server works. I downloaded a backup of one of my websites, and would like to get it running on my home computer. I have Fedora core 6 installed on my home computer with the the minimum server, developer & personal setups. I believe phP is already installed,

My first question is, how do I get Firefox or whatever read my .php files, they read the .html files fine.
Reply With Quote
  #2  
Old 26th March 2007, 02:38 PM
markkuk Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 5,076
PHP is interpreted on the server side, you must access any PHP scripts through the http server, not directly as files.
Reply With Quote
  #3  
Old 26th March 2007, 03:34 PM
sentry Offline
Registered User
 
Join Date: Jul 2005
Posts: 591
You must also correctly install your web app files in /var/www/html/ and view them by turning on the server and going to http://localhost/ in firefox. Going to that address will correctly access your running webserver on your machine.
Reply With Quote
  #4  
Old 26th March 2007, 03:48 PM
zivko_sudarski's Avatar
zivko_sudarski Offline
Registered User
 
Join Date: Feb 2007
Location: Novi Sad
Age: 30
Posts: 88
My first question is, how do I get Firefox or whatever read my .php files, they read the .html files fine.

you must install php .....see step 4 and Apache Web Server (httpd)..see step
2.1




1. su -
2. rpm -qa|grep httpd
(to see ,that you have Apache install)
If there then: 2.1 if not then yum install httpd
3. service httpd start
4. yum install php php-mysql phpMyAdmin . . . etc
5. yum install mysql .....etc
6. service mysqld start
7. gedit /etc/hosts

127.0.0.1 localhost
************************************
8. save and restart Fedora

After all :

http://localhost/ -your Web Server
by default DOCUMENT_ROOT of server(where you put your php,html files)
is in /var/www/html

you can edit this in httpd.conf file

if you install phpMyAdmin in step 5 then
http://localhost/phpMyAdmin - for MySQL

Last edited by zivko_sudarski; 26th March 2007 at 03:51 PM.
Reply With Quote
  #5  
Old 26th March 2007, 06:22 PM
fabie Offline
Registered User
 
Join Date: Mar 2007
Posts: 11
Thanks all. I will try working on this.
Reply With Quote
  #6  
Old 29th March 2007, 12:52 PM
fabie Offline
Registered User
 
Join Date: Mar 2007
Posts: 11
OK so far so good.
1. Now how do I get into PHP MySql. I am used togetting in from my server using cpanel.
2. I get asn error no MySqlD service.
Reply With Quote
  #7  
Old 29th March 2007, 12:54 PM
fabie Offline
Registered User
 
Join Date: Mar 2007
Posts: 11
Sorry didn't read the end of your last post, with linkto MySql server.
Reply With Quote
  #8  
Old 29th March 2007, 01:03 PM
fabie Offline
Registered User
 
Join Date: Mar 2007
Posts: 11
Getting this error:
phpMyAdmin - error

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
Reply With Quote
  #9  
Old 29th March 2007, 01:15 PM
pete_1967 Online
Clueless in a Cuckooland
 
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 3,929
You need to satrt your MySQL server as root: `su -` `service mysqld start`

Or use 'System->Administration->Server Settings->Services'
Reply With Quote
  #10  
Old 29th March 2007, 09:25 PM
fabie Offline
Registered User
 
Join Date: Mar 2007
Posts: 11
Quote:
You need to satrt your MySQL server as root: `su -` `service mysqld start`

Or use 'System->Administration->Server Settings->Services'
Tried that, it doesn't work.
There is no MySql.Sock, which apparently is due to lack of service mysqld.
I've tried -
1. reinstalling mysql,
2. creating a mysql.sock file,
3. changing file to point to mysqql.sock, which anyways didn't get created,
4. looking around the web, it seems to be a common problem.

My only thought is maybe there are other programs to install.

Looking for some help.
Reply With Quote
  #11  
Old 29th March 2007, 10:01 PM
pete_1967 Online
Clueless in a Cuckooland
 
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 3,929
mysql.sock is created when you start the service.

How/ from where did you install apache and mysql?
Reply With Quote
  #12  
Old 29th March 2007, 10:28 PM
fabie Offline
Registered User
 
Join Date: Mar 2007
Posts: 11
Quote:
Originally Posted by pete_1967
mysql.sock is created when you start the service.

How/ from where did you install apache and mysql?
I installed the standard web-server from a burnt DVD, along with personal use and development Fedora core 6. Upgraded the software last night, and installed the other packages reccomended in this thread through yum.
Reply With Quote
  #13  
Old 30th March 2007, 12:20 AM
zivko_sudarski's Avatar
zivko_sudarski Offline
Registered User
 
Join Date: Feb 2007
Location: Novi Sad
Age: 30
Posts: 88
go to :

System->Administration->Security Level and Firewall and disabled SELinux and firewal
it's block mysql.sock

and then start mysql and httpd


[zivko@mail ~]$ su -
Password:
[root@mail ~]# service mysqld start
Starting MySQL: [ OK ]
[root@mail ~]# service httpd start
Starting httpd: [ OK ]
[root@mail ~]#

Last edited by zivko_sudarski; 30th March 2007 at 12:28 AM.
Reply With Quote
  #14  
Old 30th March 2007, 12:23 AM
zivko_sudarski's Avatar
zivko_sudarski Offline
Registered User
 
Join Date: Feb 2007
Location: Novi Sad
Age: 30
Posts: 88
My only thought is maybe there are other programs to install.

[MySQL]
[root@mail ~]# rpm -qa|grep mysql
mysql-administrator-1.1.10-3.fc6
php-mysql-5.1.6-3.4.fc6
mysql-5.0.27-1.fc6
mysql-server-5.0.27-1.fc6
mysql-gui-common-1.1.10-3.fc6
mysql-query-browser-1.1.18-4.fc6

[HTTPD]

[root@mail ~]# rpm -qa|grep httpd
httpd-2.2.3-5

[PHP]
[root@mail ~]# rpm -qa|grep php
php-dbase-5.1.6-1.fc6
php-common-5.1.6-3.4.fc6
php-xmlrpc-5.1.6-3.4.fc6
php-mysql-5.1.6-3.4.fc6
php-ldap-5.1.6-3.4.fc6
php-gd-5.1.6-3.4.fc6
php-mhash-5.1.6-1.fc6
php-cli-5.1.6-3.4.fc6
php-pear-1.4.9-4
php-readline-5.1.6-1.fc6
php-mbstring-5.1.6-3.4.fc6
php-5.1.6-3.4.fc6
php-xml-5.1.6-3.4.fc6
php-mcrypt-5.1.6-1.fc6
phpMyAdmin-2.9.1.1-2.fc6
php-pgsql-5.1.6-3.4.fc6
php-soap-5.1.6-3.4.fc6
php-odbc-5.1.6-3.4.fc6
php-bcmath-5.1.6-3.4.fc6
php-imap-5.1.6-3.4.fc6
php-ncurses-5.1.6-3.4.fc6
php-Smarty-2.6.13-1.fc6
php-pdo-5.1.6-3.4.fc6
php-dba-5.1.6-3.4.fc6
php-snmp-5.1.6-3.4.fc6
php-pear-XML-Parser-1.2.8-1.fc6
Reply With Quote
  #15  
Old 30th March 2007, 12:47 AM
fabie Offline
Registered User
 
Join Date: Mar 2007
Posts: 11
OK, I think I've got it. I did a yum groupinstall mysql, then a service mysqld start, and it worked.

Now I'm having a problem logging into phpMyAdmin. I seem to recall some sort of password setting.
Reply With Quote
Reply

Tags
files, php, reading

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump


Current GMT-time: 19:33 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat