LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-17-2005, 10:22 PM   #1
elliotfuller
Member
 
Registered: Apr 2005
Location: San Francisco, CA
Distribution: Ubuntu, Debian
Posts: 83

Rep: Reputation: 15
Question Running PHP Scripts in SuSe Linux 9.3 w/o a server.


I want to begin designing my web site without purchasing the space first. Therefore I need somthing to emulate a server so I can test my PHP scripts etc. Is there any way to do this on the linux platform with SuSe 9.3 distro? I am new to PHP of course, I am learning. Should I get an old PC and network it with my laptop and install linux and Apache on the PC and use it as a server? Is there a better (software) way? I want to get started with tutorials in PHP and all, but I have no way of viewing my scripts as they were through a server. I just am left with a PHP file that my browser won't open! Help I am extremely new to all of this!
 
Old 06-17-2005, 10:43 PM   #2
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
You can use any Linux distribution and have LAMP (Linux-Apache-Mysql-Php) for development, testing, and even serving web sites and applications. Not a problem.

I use a mix of Suse 9.1 and 9.3. I keep evaluating other distributions but Suse Just Works(tm) without having to spend weeks configuring it. My second favorite distribution is Slackware.
 
Old 06-17-2005, 10:53 PM   #3
elliotfuller
Member
 
Registered: Apr 2005
Location: San Francisco, CA
Distribution: Ubuntu, Debian
Posts: 83

Original Poster
Rep: Reputation: 15
Well i have Suse 9.3 installed with apache and PHP. When I try and open the PHP scripts I make with my browser (like my tutorial book tells me) It asks me what program i would like to use to open it. Konquerer, Firefox etc.. I am not quite sure how to test the script!
 
Old 06-18-2005, 06:27 PM   #4
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
You may need to manually enable php4

Edit your /etc/sysconfig/apache2 file and look for the

Code:
APACHE_MODULES=
Section. In that section you will want to make sure that php4 or php5 is enabled. because I deal with legacy apps *gag* for some clients, I use php4, as you will see:

Code:
APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include log_config mime mod_rewrite negotiation setenvif ssl suexec userdir php4"
Once you add php4, restart apache with either of the following commands:

Code:
/etc/init.d/apache2 reload
or

Code:
/etc/init.d/apache2 restart
Also, in /etc/apache2/mime.types .php should be defined as anapplication type it hasn't been already. Make sure the following line is present in the mime.types file.

Code:
application/x-httpd-php         phtml pht php
Add any other extensions you might use (e.g., php4, php5, pfoo, or whatever) and after any changes are made to mime.types restart apache.

Now do a hello world script (e.g., echo hello world or do phpinfo) to verify the php processor is working.
 
  


Reply



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
Noob attempt at running SUSE Linux 10 as DHCP/DDNS/NFS/Samba Server Robhemmings Linux - Networking 1 04-12-2006 08:13 AM
SUSE 9.3 scripts not running Master_Simon SUSE / openSUSE 2 12-01-2005 11:30 AM
Parsing PHP Scripts using Apache in SuSe 9.3 (without a dedicated server) elliotfuller SUSE / openSUSE 7 07-27-2005 11:40 AM
Apache not running php scripts Seventh Linux - Newbie 3 01-08-2004 08:35 PM
Can PHP replace Pearl for Linux scripts? 360 Programming 1 06-04-2001 10:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:16 PM.

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