LinuxQuestions.org
Help answer threads with 0 replies.
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 09-24-2013, 06:47 AM   #1
officerx
Member
 
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Rep: Reputation: Disabled
opening a php script


Hello I have been trying to run my php script on centos it doesn't seem to work I have installed lamp on my box.

I used develop on a wamp setting where i would just start the wamp service open up firefox and type localhost/(and the path to my directory of my php script) in the url box, but on centos it doesn't seem to work that way can some one tell me what am doing wrong and the solution to my problem thanks in advance.

I have already searched for solutions but they don't seem to work.
 
Old 09-24-2013, 07:54 AM   #2
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
What is the problem you are getting? Does it show "unable to connect" on browser or you are facing any permission related problem?
Did you extract the xampp directory in /opt of CentOS?

When you start the LAMPP using command line

Code:
sudo /opt/lampp/lampp start
Have you seen the output carefully?

Is there any error like "Another web demon is already running".

You haven't provided enough information. Paste the output of above command as well as show what browser says when you open http://localhost in it.
 
Old 09-24-2013, 08:26 AM   #3
officerx
Member
 
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Original Poster
Rep: Reputation: Disabled
When I type localhost in the url directed to a xampp page and when I type localhost(and the directory to the script I get a object not found error 404. And before doing all this I have already run the lammp start command
 
Old 09-24-2013, 08:40 AM   #4
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
Ofcourse you have started the lampp otherwise you can not see the http://localhost/xampp page.

Have you put the php script in /opt/lampp/htdocs?

make a file test.php. Paste following content in the file and save it.

Code:
<?php
 
    phpinfo();
 
?>
Put the file in /opt/lampp/htdocs, now run following url in browser. What does it say?
Code:
http://localhost/test.php

Last edited by eklavya; 09-24-2013 at 08:41 AM.
 
Old 09-26-2013, 08:24 AM   #5
officerx
Member
 
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Original Poster
Rep: Reputation: Disabled
Sorry I couldn't reply had problems with my wifi access. Ill try what you suggesting when I get home and let you know how it went.
 
Old 09-26-2013, 12:57 PM   #6
officerx
Member
 
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Original Poster
Rep: Reputation: Disabled
Dude am sorry for being a pain in the ass. Tried to save test.php in the Dir htdocs but I don't have the permission to save the file in htdocs
 
Old 09-26-2013, 01:05 PM   #7
officerx
Member
 
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Original Poster
Rep: Reputation: Disabled
Maybe something is wrong with my lamp settings ill remove it than download it again. If that fails guess am going to be developing on my windows os.
 
Old 09-29-2013, 07:44 AM   #8
officerx
Member
 
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Original Poster
Rep: Reputation: Disabled
Eklavya I have downloaded xampp again and finally it works thanks for landing in a hand.... I appreciate it. All of my problems are done and buried just waiting for new problems to solve.
 
  


Reply

Tags
lampp, php



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
[SOLVED] Strange Debian Apache and PHP file opening problem Cotun Programming 8 04-17-2013 09:18 AM
PHP opening socket to write data ihopeto Linux - Software 7 01-11-2012 01:39 PM
LAMP with severe slowdowns when opening PHP scripts. Heinz09 Linux - Server 2 07-05-2007 04:10 PM
Problem opening PHP Pages firedrow Ubuntu 4 10-13-2006 10:08 PM
LXer: Title: PHP/MySQL Classifieds Script AddAsset1.php Script Insertion LXer Syndicated Linux News 0 07-02-2006 06:21 PM

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

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