LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-20-2003, 12:00 PM   #1
teded34
LQ Newbie
 
Registered: Feb 2003
Posts: 11

Rep: Reputation: 0
Unhappy php helpppppppppppp!


I cannot get php scripting to work, all I get is the code reflected back in the browser window. I have looked and looked and cannot find the answer to this.

I have REDHAT 8.0 installed comletely from the cd's, with Apache 2.0.40 and php 4.2.2 installed. I did the phpinfo and it works but anything else does not, i turned on the short tag in the php ini file and still no php scripting works except the phpinfo line.

<?
echo "WELCOME";
?>
----does not work----, just get this back in my web browser

here are my config,php,etc files. Have a look and let me know as I am getting a bit upset with REDHAT 8.0 and might go to 7.3 if I cannot get this solved soon.

As I am a beginner with Linux I would appreciate any help with this.


connect to 142.59.205.214
download the files I have shown as I am not sure how to post the file here, I can paste the text but not the file. If anyone can tell me how that would be great.

For some reason I can download them from my linux machine but not my windows machine, I will look into this.
 
Old 03-20-2003, 11:40 PM   #2
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: Debian Wheezy
Posts: 2,872

Rep: Reputation: 88
I'm new to PHP.
Pasting your code in a file works for me.
Are you using .php extension?
If so, how are you accessing the phpinfo?
 
Old 03-21-2003, 09:01 AM   #3
Burke
Member
 
Registered: Dec 2002
Location: Virginia, USA
Posts: 131

Rep: Reputation: 15
You say that
<?
echo "WELCOME";
?>
Comes back as is but phpinfo works fine.. my first thought is short tags...
to verify, try this code instead:
<?php
echo "WELCOME";
?>

If this works, you need to edit your /etc/php.ini file if you want the short tags (<?) to work the way you're trying:

Find the line in php.ini that says:
short_open_tag = Off

Change the "Off" to "On"

Now, restart Apache:
/etc/init.d/httpd restart

and try your original code again.
 
Old 03-21-2003, 09:56 AM   #4
teded34
LQ Newbie
 
Registered: Feb 2003
Posts: 11

Original Poster
Rep: Reputation: 0
I have already turned on the short tags, doing
<?php
echo "WELCOME";
?>

does not work, the code just shows up on the netscape browser. I save the files as .php.

Confused and looking for guidence
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Are PHP session variables held in memory when you leave a PHP site? Locura Programming 11 11-16-2008 09:37 PM
php5 apache2 mysql4 don't work, php does not seem to read php.ini atom Linux - Software 5 03-24-2005 12:05 PM
php apache or php cgi - php learner rblampain Linux - Security 3 12-18-2004 12:10 AM
PHP -- How to execute a shell script from PHP using FTP functions?? zoonalex Programming 3 07-29-2004 12:51 PM
Updating php 4.3.1 from tar and keeping current php configuration with mandrake 9.1 mrjeep Linux - General 0 04-02-2003 08:50 AM


All times are GMT -5. The time now is 03:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration