Log in

View Full Version : VPS and PHP Help



Jack!
10-01-2011, 05:21 PM
I have recently acquired a good VPS, But i'm having some problems with running PHP Scripts on it, It just displays the code.

I have ran the following in Putty:


Yum Update


Yum Install PHP

It is running CentOS5, And i dont get why it wont run the code, + Rep for any help :)

Edited by HotelUser (Forum Super Moderator): Thread moved from "Technology Discussion" as I feel it's more suited here.

N!ck
10-01-2011, 05:35 PM
What error does it give?

Jack!
10-01-2011, 05:40 PM
No errors are given from what i can see, On the actual page it is displaying the script, Like if you look at it in notepad, And nothing on the error reports in putty

N!ck
10-01-2011, 06:22 PM
I still don't quite understand. Does yum not say anything at all? Not even something like


Package php-5.1.6-27.el5_5.3.x86_64 already installed and latest version

Have you got your webserver setup properly to serve PHP? Such as installing mod_PHP for apache or setting up a fast_cgi process for an nginx reverse proxy?

Jack!
10-01-2011, 06:35 PM
[root@server ~]# yum install php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: centos.mirror.transip.nl
* base: centos.weepeetelecom.nl
* extras: centos.weepeetelecom.nl
* updates: mirror.denit.net
Setting up Install Process
Package php-5.1.6-27.el5_5.3.i386 already installed and latest version
Nothing to do


How do i got about what you said N!CK?

N!ck
10-01-2011, 07:56 PM
Which webserver are you using?

Jack!
10-01-2011, 08:06 PM
Which webserver are you using?

Apache

HotelUser
10-01-2011, 08:30 PM
If I were you I'd just install XAMPP and then reconfigure apache to suit your needs - that should bundle PHP in for you.

N!ck
10-01-2011, 08:31 PM
You have to tell apache that you have php and to send files that end in .php to php to be processed.

AFAIK, Yum should have done this for you though :S.

Did you restart apache?

Jack!
10-01-2011, 08:36 PM
Nope, Noobie question. How do you do that? :P


If I were you I'd just install XAMPP and then reconfigure apache to suit your needs - that should bundle PHP in for you.

I'm using a VPS Where i have access via putty and FTP, I dont see how XAMPP would help, No GUI or anything :P

HotelUser
10-01-2011, 08:45 PM
Nope, Noobie question. How do you do that? :P



I'm using a VPS Where i have access via putty and FTP, I dont see how XAMPP would help, No GUI or anything :P

You can install XAMPP from the command line, maybe even with yum :P

Jack!
10-01-2011, 08:54 PM
You can install XAMPP from the command line, maybe even with yum :P
Aha, I knew that :P

Anyway, Touch wood, My host has fixed it, And im even unmanaged :P, How nice of them, Cheers for everyones help, +Rep.

Locked.

Want to hide these adverts? Register an account for free!