Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-20-2003, 11:00 AM   #1
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
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, 10:40 PM   #2
Senior Member
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,887

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, 08:01 AM   #3
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:
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, 08:56 AM   #4
LQ Newbie
Registered: Feb 2003
Posts: 11

Original Poster
Rep: Reputation: 0
I have already turned on the short tags, doing
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


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

All times are GMT -5. The time now is 05:31 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration