when I type on the URL: http://localhost/phptest.php....
Moderator: General Moderators
- christian_phpbeginner
- Forum Contributor
- Posts: 136
- Joined: Sat Jun 03, 2006 2:43 pm
- Location: Java
when I type on the URL: http://localhost/phptest.php....
Hello....
I don't know what happened, I've followed the instructions, read the how to install PHP manually, or using Window Installer. But I did install it manually to work with Apache Web Server.
The problem is that....
I have created a phptest.php, and the code is shown below:
<HTML>
<HEAD>
<TITLE>PHP Testing</TITLE>
</HEAD>
<BODY>
<?php echo "<p>Hello, world!</p>"; ?>
</BODY>
</HTML>
Then, I go to my browser, and type http://localhost/phptest.php ...it shows me those HTML tags and codes, just like I wrote it in my notepad.
<HTML>
<HEAD>
<TITLE>PHP Testing</TITLE>
</HEAD>
<BODY>
<?php echo "<p>Hello, world!</p>"; ?>
</BODY>
</HTML>
What's wrong ? Can somebody help ?
Thanks a lot,
Christian
I don't know what happened, I've followed the instructions, read the how to install PHP manually, or using Window Installer. But I did install it manually to work with Apache Web Server.
The problem is that....
I have created a phptest.php, and the code is shown below:
<HTML>
<HEAD>
<TITLE>PHP Testing</TITLE>
</HEAD>
<BODY>
<?php echo "<p>Hello, world!</p>"; ?>
</BODY>
</HTML>
Then, I go to my browser, and type http://localhost/phptest.php ...it shows me those HTML tags and codes, just like I wrote it in my notepad.
<HTML>
<HEAD>
<TITLE>PHP Testing</TITLE>
</HEAD>
<BODY>
<?php echo "<p>Hello, world!</p>"; ?>
</BODY>
</HTML>
What's wrong ? Can somebody help ?
Thanks a lot,
Christian
- christian_phpbeginner
- Forum Contributor
- Posts: 136
- Joined: Sat Jun 03, 2006 2:43 pm
- Location: Java
Hello Oren !Oren wrote:I can think of 2 possible reasons:
1. You forgot to restart Apache.
2. You didn't install it properly. Which instructions did you use?
Thanks for the reply, but I did restart the Apache. Maybe I didn't install it properly, or maybe I did miss something.....but I don't know what I've missed....I am sure that I have followed the instructions.
I have followed the instructions from http://www.php.net/manual/en/install.windows.manual.php
Please help me to install it first. Do you also know how to uninstall PHP ? I have the PHP 5.1.2 which I have downloaded 2 months ago, but now it has a new release PHP 5.1.4.
Regards,
Chris
Run this and see what are the results:
P.S
Use
Code: Select all
<?php phpinfo(); ?>Use
Code: Select all
and [code]- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I don't think that's going to work if PHP isn't workingok wrote:Run this and see what are the results:P.SCode: Select all
<?php phpinfo(); ?>
UseandCode: Select all
Code: Select all
I'd check the paths you've given in php.ini for the locations of the php dll file and make sure the exist. Is it possible you've editted the wrong httpd.conf ?
- christian_phpbeginner
- Forum Contributor
- Posts: 136
- Joined: Sat Jun 03, 2006 2:43 pm
- Location: Java
ok wrote:Run this and see what are the results:P.SCode: Select all
<?php phpinfo(); ?>
UseandCode: Select all
Code: Select all
hi !....I've tried it, and the result was exactly what I have typed in the .php document, which was:
Code: Select all
<HTML>
<HEAD>
<TITLE>PHP Testing</TITLE>
</HEAD>
<BODY>
<?php phpinfo(); ?>
</BODY>
</HTML>The easy way is to install wamp(5): http://www.en.wampserver.com/
The easy way is not recommended.ok wrote:The easy way is to install wamp(5): http://www.en.wampserver.com/
- christian_phpbeginner
- Forum Contributor
- Posts: 136
- Joined: Sat Jun 03, 2006 2:43 pm
- Location: Java
Yes, indeed...the php5ts.dll...into system32. Anyway, did I mention that I am using Win XP ? Lol....Oren wrote:Did you copy the needed files into your system directory? (for Win XP that would be 'system32' and for Win 98 that would be 'system')
Hmm...yes, but I am not a lazy newbie, I want to install it manually, but got stuck in this situation....I'll try your suggestion later when no other solutions available.ok wrote:The easy way is to install wamp(5): http://www.en.wampserver.com/
Ouch...blame me ! I don't know how to uninstall PHP, I think that everyone was too busy writing the newbies on how to install PHP because the installation could sometimes be stressing enough. And even if they wrote the uninstallation, they forgot to give the link in the manual, somehow ! LOL....ok wrote:lol... yeah... I also installed it manually...
christian_phpbeginner: Reinstall PHP and Apache!!! (from the beginning, uninstall everything and install again)
Should I delete the php5ts.dll I copied into system32 by myself (manually), and other things...just delete it or there are some procedures ??? Should I delete this one first, then that one, etc...?
Thanks a lot for the responses so far........
Please help...I want to understand php better, I don't know if I install it manually would also bring me closer to PHP or not, actually.....I am kinda stressed out.
Chris
- christian_phpbeginner
- Forum Contributor
- Posts: 136
- Joined: Sat Jun 03, 2006 2:43 pm
- Location: Java
- christian_phpbeginner
- Forum Contributor
- Posts: 136
- Joined: Sat Jun 03, 2006 2:43 pm
- Location: Java
Maybe I did miss or make mistake with the httpd.conf or maybe in the php.ini, but I am stuck...I don't know which which I have missed or where I made the mistakes....d11wtq wrote:I don't think that's going to work if PHP isn't workingok wrote:Run this and see what are the results:P.SCode: Select all
<?php phpinfo(); ?>
UseandCode: Select all
Code: Select all
I'd check the paths you've given in php.ini for the locations of the php dll file and make sure the exist. Is it possible you've editted the wrong httpd.conf ?
I have opened, read again, and all were just as written in the manual...that's why I am joining this forum....I need help.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
It's not a php.ini problem so you can eliminate that one
PHP will actually work without the ini at all.
PHP isn't being called when the request comes in. You can post you httpd.conf file if you like (or if you'd prefer not to expose it to the public you can PM it to me).
Installing PHP/Apache manually is definitely worth doing but if it's taking too long I would definitely just save yourself the hassle and install WAMP/XAMPP
PHP isn't being called when the request comes in. You can post you httpd.conf file if you like (or if you'd prefer not to expose it to the public you can PM it to me).
Installing PHP/Apache manually is definitely worth doing but if it's taking too long I would definitely just save yourself the hassle and install WAMP/XAMPP
Did you add this:
to the end of the httpd.conf file?
P.S I assumed you run Apache 2, put the php directory on C and named it 'php'.
Code: Select all
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .phpP.S I assumed you run Apache 2, put the php directory on C and named it 'php'.