PHP on server

Okay, I just installed PHP on my server and I have a Flash "Contact Form" which sends information from textfields/textboxes to my email. I have the Form embedded on a page of my site and when I hit the send button I don't get an email. So that tells me something is going wrong with PHP, I have Apache 2.2 installed on the server to host webpages. Does anyone know how to mess around with PHP? It's obvious that the server isn't running the PHP script when the button on the Flash Form is clicked and I know it's not the Flash objects fault, I checked the code on it, I also know the PHP code is correct. It just won't run the code.

Yes, I selected Apache 2.2 when I installed PHP and I gave it the httpd.conf folder. I do not know what is going wrong, can anyone help me out here?


Thanks
 
I don't have much time so here is a quick replay. If you are using load module then you should have a line like this.
LoadModule php5_module modules/libphp5.so
 
did you reboot since installing it

Yes... I did reboot, I just don't know what else to do...

I don't have much time so here is a quick replay. If you are using load module then you should have a line like this.
LoadModule php5_module modules/libphp5.so

What exactly is a load module for? I used an install guide that someone on the internet made and checked my httpd.conf to make sure everything was right and it was...

As said before, I am clueless with this stuff

Now if I put the PHP script in the htdocs folder along with the Flash file that triggers it, it should work right?

Thanks guys
 
Y
Now if I put the PHP script in the htdocs folder along with the Flash file that triggers it, it should work right?

Thanks guys

Yha, it should work. If you drop the file directly into your htdocs folder then you can type into your browser window http://127.0.0.1/filename.php. You can create a PHP diagnostics page by opening notepad and type in:
<?php
phpinfo();
?>
Then save the file in your htdocs can name it test.php. Then type http://127.0.0.1/test.php. You should see a page like this.
http://www.entropy.ch/software/macosx/php/test.php
 
Yha, it should work. If you drop the file directly into your htdocs folder then you can type into your browser window http://127.0.0.1/filename.php. You can create a PHP diagnostics page by opening notepad and type in:
<?php
phpinfo();
?>
Then save the file in your htdocs can name it test.php. Then type http://127.0.0.1/test.php. You should see a page like this.
http://www.entropy.ch/software/macosx/php/test.php

See there's another problem with my server/network... I cannot find localhost on my network, it won't connect:rolleyes: I am yet to find out why... It sounds like a router problem to me but, I am a newbie to web hosting, etc. Can I find the diagnostic file by doing this?(below)

www.mysite.blogdns.com:8080/filename.php

Thanks

I need to check that httpd.conf for that "loadmodule", now that I think about it, I don't know if I checked that one..
 
Last edited:
Do you have a firewall turned on you might be blocking port 8080.

If you are using port 8080 check to make sure you are listening on port 8080 in the httpd.conf. You can have multiple listen lines.
Listen 8080

Make sure you you are allowing apache access to the htdocs file.
<Directory /apache/htdocs/>
Order allow,deny
allow from all
</Directory>

This page will be your friend.
http://httpd.apache.org/docs/2.2/
 
Last edited:
See there's another problem with my server/network... I cannot find localhost on my network, it won't connect
Are you browsing to the page from the machine it's stored on? If not using localhost wont work. Also, for PHP to mail it needs to be able to access the sendmail binary (assuming this is a unix machine).
 
Are you browsing to the page from the machine it's stored on? If not using localhost wont work. Also, for PHP to mail it needs to be able to access the sendmail binary (assuming this is a unix machine).

Is there a way for him to use a remote smtp server?
 
Ok for XP you need to change some settings in php.ini.

SMTP will be set to localhost by default. Change it to smtp.gmail.com

The smtp_port should be fine at 25. sendmail_from can be set to what you want the from address to show up as, it should be fine to leave alone as well.

I don't know if using gmail will work but you can try it.
 
Back
Top