Solved

php problems

Posted on 2003-11-14
8
333 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
Comment Utility
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
Comment Utility
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
Comment Utility

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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 14

Expert Comment

by:ThG
Comment Utility
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
Comment Utility
put

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

at the top of each page
0
 
LVL 1

Author Comment

by:livegirllove
Comment Utility
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
Comment Utility
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

Easy Project Management (No User Manual Required)

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

763 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

6 Experts available now in Live!

Get 1:1 Help Now