LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   php helpppppppppppp! (https://www.linuxquestions.org/questions/linux-newbie-8/php-helpppppppppppp-50847/)

teded34 03-20-2003 11:00 AM

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.

2damncommon 03-20-2003 10:40 PM

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?

Burke 03-21-2003 08:01 AM

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.

teded34 03-21-2003 08:56 AM

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


All times are GMT -5. The time now is 12:38 PM.