Skip to main content
GameDev.net gamedev.net
🔒 Locked

[web] PHP beginner

Started by dpadam450 Apr 13, 2007 at 10:42 PM 5 replies 2.6k views
Original Post
dpadam450
dpadam450
So I picked up PHP really easy but I can't test any code. Geocities doesn't "compile" it or whatever. How do I take a .php file and load it to test?
NBA2K, Madden, Maneater, Killing Floor, Sims 
daviangel
daviangel
I usually test my php server with this
phpinfo();
?>
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
AlgorithmX2
AlgorithmX2
PHP requires that the server actually be running PHP most free web servers don't have support for PHP to my knowledge.

you can test it yourself on your machine by installing a web server, apache+php+mysql is the usual good combo, you can find them for Linux and Windows.

For windows XAMPP seems to work pretty good, all ya need to do is install it not as much setup involved works pretty good if all ya want to do is write and test, and not actually host it as a live website.

Any how good luck to ya.

I seek knowledge and to help others whom seek it
dpadam450
dpadam450
So I installed PHP5 and that XAMPP. So how do I open my .php file?

Also, when I first ran XAMPP, the http://localhost worked and now it doesn't after I ran it again.
NBA2K, Madden, Maneater, Killing Floor, Sims 
AlgorithmX2
AlgorithmX2
Well you should dump it in your HTDOCS directory that is provided by XAMPP, should have a link in your start menu, I believe. Once there it should be assesable via http://localhost/YOURFILENAMEHERE.php if not check the control panel to make sure apache is still running, also make sure that you can go to the config provided by it.

I seek knowledge and to help others whom seek it
dpadam450
dpadam450
nevermind, for some reason I had to manually run the apahce, it wouldnt run from the actual program. Anyway I'm up and PHP'ing. peace. thanks.
NBA2K, Madden, Maneater, Killing Floor, Sims 
dpadam450
dpadam450
Does anyone know why mail() function fails? I'm assuming I need something else running or my SMTP = should be something else. my php.ini has:

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com
sendmail_from = me@localhost.com
NBA2K, Madden, Maneater, Killing Floor, Sims 

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.