?
Solved

php problems

Posted on 2003-11-14
8
Medium Priority
?
353 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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
 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
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.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

650 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