Forum Moderators: coopster
I am trying to install Apache & PHP (& MySQL eventually, but I havent gotten that far) to make some dynamic web-sites. I dont know PHP or MySQL, and havent used Apache before. I cant seem to configure Apache to work with PHP.
I have tried the following
XAMP-didnt seem to do anything, so I uninstalled it
Manually installing it based on instructions on this thread and on the Apache Lounge. Ive downloaded the VC++ thing from Windows
Apache seems to work fine, I can see HTML on it and everything.
With XAMP, and manual installing when I tried viewing PHP files I would get a standard internet explorer error message. I uninstalled everthing & tried installing Webserv (another packaged installer thing, like XAMP...I guess). Now, with Webserv installed, I dont get an error message when viewing PHP files. The browser just seems to ignore the PHP. for example
I type
Hello <? echo "world" ;?>
into a .txt file and save it as a .php file in the document root. All I see in the browser is
Hello
Not sure why it is just ignoring the PHP code. Perhaps someone who knows how Webserv is set up can explain.
Any insight or advise would be helpful. Like I said, I am very new to this. Thanks
P.S. Also, I have uninstalled & installed Apache, PHP & MySQL several times, and may have to do so again. If I just uninstall it might bits of the program remain that would interfere with it if I download it again? How can I be sure that I have gotten rid of it so I can re-install it?
If so, you're not alone, I had setup Apache/MySql quite a few times but the one computer I have on Home edition was my downfall. I tried every step-by-step tutorial on the web and could never get it to work. I finally tried an older version of XAMP and had it working first try. If that's you're situation let me know and I'll try and trace back what I did.
William.
Note: Using short tags should be avoided when developing applications or libraries that are meant for redistribution, or deployment on PHP servers which are not under your control, because short tags may not be supported on the target server. For portable, redistributable code, be sure not to use short tags.Resource:
Basic syntax [php.net]