Click to See Complete Forum and Search --> : Installing PHP problems! Please help!


coldfused
07-23-2006, 12:12 PM
Good Morrow!
I'm a developer who hasn't been developing for over a year due to university. I'm into the game again and the problem is that the apache/php/mysql installation appears to have changed from the php 4 days, and I can't friggin get things to work unfortunately.

Here's my problem:
I've installed Apache correctly because it says everything was good.
in httpd.conf I add these lines in different places along the config script.

DocumentRoot "C:\web"
LoadModule php5_module "C:/php/php5apache2.dll"
AddType application/x-httpd-php .php .html
PHPIniDir "C:/php/"

With php.ini, I modified it exactly to this installation tutorial :
http://www.expertsrt.com/tutorials/Matt/install-apache.html

When I did the phpinfo() it loads up great giving me info, but when I make a new page with <? echo("Hello World!"); ?> - there's nothing showing up, when I try and test a MySQL connection, asking to echo true if connection is true, but theres only a blank page.

I'm kinda wondering whats happening?

I'm using Apache 2.0.58 and PHP Version 5.1.4
Please can anyone help?

Rodney H.
07-23-2006, 12:42 PM
Strange. You get phpinfo() to run, but not a simple echo() statement?

Hmmm...

Try using the FULL opening php tag, or ...

This: <?php

NOT <?



<?php
echo("Hello World!");
?>



(this might help if you do not have enable short tags set to ON in your ini.)

coldfused
07-23-2006, 01:07 PM
Hey wow, thanks - it must have been enabled by default before and changed now. I'll try stop using the short tags.

Houdini
07-23-2006, 06:52 PM
I am not sure but with PHP 5 I would think that not only are short tags turned off by defualy but register_globals would be also. It is just not good practice to use short tags especially now with wider usage of XML. Plus if you always use those kind of tags then your code will work on any server regardless of the php.ini.