Solved

php problems

Posted on 2003-11-14
8
336 Views
Last Modified: 2010-05-18


If I save a file called php.php and put it on my server like this:
It does nothing.  Displays a blank white browser window.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>My First PHP Page</title>
</head>
<body>

<?
phpinfo();
?>

</body>
</html>
#####But if I do this it displays "My First PHP Page" but not the info on version.  So PHP must be on my server right?  But why no info.  Also got another real .php page that when you go to it it just shows the code??
here is the URL to that page  free.livegirllove.com/ttt-install.php it needs version PHP 4.1.2 so maybe thats why it only displays the code??
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>My First PHP Page</title>
</head>
<body>
<h1>My First PHP Page</h1>
<?
phpinfo();
?>

</body>
</html>
0
Comment
Question by:livegirllove
8 Comments
 
LVL 13

Expert Comment

by:lozloz
ID: 9752661
hi,

no i don't think php's on your sever at all - either that or it's setup to not parse .php as a php file, get in contact with your sys admin

loz
0
 
LVL 19

Expert Comment

by:Michael701
ID: 9752711
whenyou say 'my server' would it be a host like godaddy? many hosts disable soem php commands phpinfo() beign one of them. also when you see the (blank) page, do a right click and 'view source' many times there are hints in the code. next change your phpinfo() line to echo 'Hello world!';
0
 
LVL 14

Accepted Solution

by:
ThG earned 500 total points
ID: 9753790

if the host in question is the same you pointed us to, then it seems to have PHP installed:
$ httpver free.livegirllove.com
Server: Apache/2.0.47 (Unix) mod_jk2/2.0.0 PHP/4.2.3

Anyway, either it's bad configured, or you don't have rights to use PHP.
I would try two things:

rename your testscript (first change <? to <?php) to test.php4

if that didn't work, create a file .htaccess (don't miss the dot) containing:
AddType application/x-httpd-php .php

this either makes your script work or makes the page unable to load.
Let me know the result. If this doesn't help, I think you can only contact the admin
0
 
LVL 1

Author Comment

by:livegirllove
ID: 9754611
Ok Apache needed a restart after install of php.  But I can run my .php from mozilla but IE will not, just displays the source code.  I hate to clear my cache and history, is there something else that could keep it from working in IE?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 14

Expert Comment

by:ThG
ID: 9755264
PHP is not browser depedendent, so there can be no differences between mozilla behaviour and IE's. Try reloading/refreshing the page pressing ctrl or shift buttons
0
 
LVL 1

Expert Comment

by:vincevincevince
ID: 9755290
put

header("Cache-Control: no-store, no-cache, must-revalidate");

at the top of each page
0
 
LVL 1

Author Comment

by:livegirllove
ID: 9756778
Ok not sure what to do.  Didn't get exatly the answer but ended up deleting my cookies and IEs history an PHP started to work!!
ThG posted twice so here you go.....
0
 
LVL 14

Expert Comment

by:ThG
ID: 9757119
cool.
the ctrl / shift key while refreshing the page is a trick to override temporarily the cache. The result would have probably been the same but.. it works, that's important. :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now