Home >Backend Development >PHP Tutorial >Words of experience: Summary of PHP installation and setting skills_PHP tutorial
When you are just learning PHP, you may be troubled by PHP installation and setting issues. Here we will introduce some tips on PHP installation and setting, and share them with you here.
1: doc_root setting
The doc_root in php3.ini is like the documentroot of the web. If include "/xxx/xxx"; it will automatically put the first / becomes the setting of doc_root.
For example: doc_root in php3.ini is set to c:mp, then when include "/dir1/aaa.php" your aaa.php should be in the c:mpdir1 directory Next
2: Session settings for php4.00
It is always difficult to set the tmp directory of the session in the php4.00 version. In fact, you only need to set the tmp directory Just set it to the root directory of the current disk of php
For example: if your php4 is on the e disk, just create a tmp directory in the root directory of the e disk. However, the latest version does not seem to have this Problem.
3: I keep making mistakes when uploading files
Sometimes I forget the most basic things, such as whether there is anything in php.ini Set uploadtemp_dir.
4: How can php4.0.0 under solaris support sybase
First you have to install the sybase client software, otherwise it will prompt that it cannot be found when compiling php .h file. Then when running the configure script before compiling php, add the --with-sybase parameter. Then use the make command to compile php, make install to install it, modify httpd.conf and restart the apache daemon. That's all.
5: Why can’t I use crypt()?
crypt() is under UNIX/Linux. You can’t use it directly under MS unless there is a php_crypt.dll file.
6: Are there application variables in ASP in PHP?
No, at least not in the current version! But you can achieve it through other methods.
(1) Under Linux/Unix, it can be implemented through shared memory (there is an article on phpchina.com)
(2) It can be implemented through database or file
(3) Other methods. ..
7: Doubts about Session
Question: If we share an IP address through a proxy server, will the sessions existing on the server conflict?
Answer: Actually, don’t worry about this problem. Session is built on cookies. It is just one information stored on the server and one stored on the client. It has nothing to do with IP.
8: Cookie doubts
Q: I was testing COOKIE on my local machine to save some values in the guestbook so that I don’t have to fill them in when I leave a message next time, but I found this situation : Everything works fine before I close the entire web page, but if I close the web page and reopen it, I cannot read the value retained by the COOKIE. No matter how long I set the validity time of the COOKIE, it is useless. Why is this? ? ? If we share an IP address through a proxy server, will the sessions on the server conflict?