Page 1 of 1
HELP PHP thing
Posted: Wed Jan 21, 2009 12:18 pm
by elm
If you have Apache, PHP and MySQL installed locally – do you still need to submit or upload to web server for checking if its working properly.
The main reason why I installed all this into my local machine was to make sure avoiding that step….I’m not sure about this, but recently created contact form and wanted to test if the php file saved on my local machine is actually doing what it suppose to be doing;
Wanted to know if I’m required to submit/upload both my html form and php script to my web server – or there’s a way to test this locally..
Please note, all my server side apps are properly functioning and able to use; however this question evades me for some reason.
Help….

Re: HELP PHP thing
Posted: Wed Jan 21, 2009 12:20 pm
by Burrito
as long as the two environments are identical, you can do your testing locally. That's actually a much better (safer) way to program. You don't want to make any code changes to production without testing first.
But if there are differences between the two environments, then what you test locally may not produce the same results in production....
Re: HELP PHP thing
Posted: Wed Jan 21, 2009 2:09 pm
by elm
nice! but could you please try again; "as long as the two environments are identical, you can do your testing locally" as far as i'm concerned they should be....have all these apps on my local machine, run and tested php prior to submitting my little code; however, when i submit the form, nothing happens; meaning the script is not performing as it should.
well, i'm well aware of that my comment is not making sense - but please do talk like you're talking to hard headed two year old...cuz, that's how i feel now...
"as long as the two environments are identical" please elaborate............thanks for your qucik reply though.
Re: HELP PHP thing
Posted: Wed Jan 21, 2009 2:12 pm
by Burrito
I mean the settings across both environments are the same (apache, php, server etc).
Re: HELP PHP thing
Posted: Wed Jan 21, 2009 2:24 pm
by elm
Thanks Mr. Burrito; I will roll up my sleeves and dive into the damn thing with the intent to check how identical they’re as far as the setting goes! But wait, when I installed, all these 3 apps were installed into same root folder and given their appropriate functionalities – even when I check one of the test website provided, its perfectly working and returns the scripts as it should…I think this php thing does not like me………..
Thanks tho for giving a shot on my issue despite the fact it remains mystery.
Re: HELP PHP thing
Posted: Wed Jan 21, 2009 2:45 pm
by John Cartwright
A couple things you should begin with:
1. Check your php and apache error logs (your php error log likely has something to complain about).
2. Make sure display_errors error reporting is on (and set to at least E_ALL). If it is not on, then you need to modify your php.ini to change the display_errors, as well as other relevant settings.
phpinfo() will also be very helpful for comparing the two servers.