PHP Installation Tips FAQ _php Tutorial

Source: Internet
Author: User
One
Q: I have installed the UNIX version of the Apache module, but my php script source code is displayed in the browser, or the browser prompts me to save the file. Why?
Answer: This is due to the PHP module is not working properly. Please check the following three places:
Verify that the Apache executable file you are running is the one that you finally compiled successfully. Enter the following command:
/path/to/binary/httpd-l
If you don't see mod_php3.c in the list, then you're not running a proper execution file.
Please make sure you have added the correct "Mime Type" in one of your. conf. This should look like this:
AddType application/x-httpd-php3. php3
Please make sure that the above "AddType" is not in or block, otherwise this addtype will only take effect in the current VirtualHost or directory.

Two
Q: I've followed the instructions to install PHP, but my PHP still can't work with IIS, why?
A: You must ensure that the user running PHP has sufficient privileges to run Php.exe. The IIS server uses an anonymous account that is created at the time of installation, and this account needs to run Php.exe permissions. In addition, any user who is to be justified is also authorized to run Php.exe.

Three
Q: How do I compile php with Apache 1.3.X?
Answer: This is simple, just follow the steps below:
-Get the latest Apache bundle from the Apache site
-Unzip/untar files to a directory, such as/usr/local/src/apache-1.3.9
-Enter "./configure--with-apache=/path/to/your/apache" to start compiling PHP for the first time
-Execute "make" in order, create and copy necessary files to Apache directory
-Enter the Apache directory and edit the configuration file. At the end of the file, add: "Addmodule modules/php3/libphp3.a"
Execute "./configure", "make"

All done, you've got an Apache executable file that can run PHP
Four
Q: It seems to be problematic when I compile PHP with Apache. It is always said that the Httpd.h file could not be found, but in fact the file exists. Why?
A: You need to let the PHP configuration/installation script know the highest level directory of your Apache source code, not the directory containing the Httpd.h file. In other words, "--with-apache=/path/to/apache/" should be specified instead of "--WITH-APACHE=/PATH/TO/APACHE/SRC".

Five
Q: I have PHP installed with RPM, but Apache can't handle PHP files. Why?
A: Suppose you use RPM to properly install PHP, you have to either counter-note or add the following lines to the httpd.conf file:
#Extra Modules
Addmodule mod_php.c
Addmodule mod_php3.c
Addmodule MOD_PERLC.
#Extra Modules
LoadModule Php_module modules/mod_php.so
LoadModule Php3_module modules/libphp3.so
LoadModule Perl_module modules/libperl.so
In addition, add:
AddType application/x-httpd-php3. php3
To the global part of httpd.conf, or to the section where you need to provide PHP support.
Six
Q: How do I send mail with the mail function under Windows?
A: PHP in Unix/linux issued mail with the SendMail program, in Windows does not sendmail, but can be done with the SMTP protocol, as follows: Modify the php.ini file's [Mail function] SMTP.
Such as:
[Mail Function]
smtp=public.sta.net.cn; Win32 only
Seven
Ask:p Hp+apache under the Win9x set a question
The runtime appears: "Cannot determine local host name,use servername to set it manually"
If you have an IP address, simply add it in the httpd.conf:
ServerName HTTP//Your IP
Example: ServerName http://162.105.38.100

http://www.bkjia.com/PHPjc/531755.html www.bkjia.com true http://www.bkjia.com/PHPjc/531755.html techarticle First, Q: I have installed the UNIX version of the Apache module, but my php script source code is displayed in the browser, or the browser prompts me to save the file. Why? Answer: This is ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.