LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   PHP does not function on my Fedora 7 machine (https://www.linuxquestions.org/questions/linux-software-2/php-does-not-function-on-my-fedora-7-machine-624010/)

khandielas 02-26-2008 01:14 PM

PHP does not function on my Fedora 7 machine
 
my test php file is
[root@localhost html]# cat 1.php
<?php
echo "Hi, I'm a PHP script!";
?>
<?
php phpinfo();
?>

point my firefox to 127.00.00.1/1.php, the page is blank
FYI: 127.00.00.1/index.html works fine.

when checking software, I got this
[root@localhost html]# rpm -qa | grep php
php-common-5.2.4-1.fc7
php-pdo-5.2.4-1.fc7
php-pdo-5.2.2-3
php-5.2.4-1.fc7
php-manual-en-20061119-1.fc7
php-ldap-5.2.2-3
php-cli-5.2.4-1.fc7
php-mysql-5.2.4-1.fc7
php-ldap-5.2.4-1.fc7
php-common-5.2.2-3
php-mysql-5.2.2-3
php-cli-5.2.2-3

can somebody please help me out?

Million thanks.

reddazz 02-26-2008 01:29 PM

Hi and welcome to LQ.

Your script is probably not showing anything due to a minor syntax error in the php delimeter for the second php command. Change your code to
PHP Code:

<?php
    
echo "Hi, I'm a PHP script!";
?>
<?php 
    phpinfo
();
?>


khandielas 02-26-2008 01:35 PM

Thank you, thank you, thank you!

O man, this is unbelievable.

Quote:

Originally Posted by reddazz (Post 3070580)
Hi and welcome to LQ.

Your script is probably not showing anything due to a minor syntax error in the php delimeter for the second php command. Change your code to
PHP Code:

<?php
    
echo "Hi, I'm a PHP script!";
?>
<?php 
    phpinfo
();
?>




All times are GMT -5. The time now is 01:28 PM.