I used to write php code under win for a long time, and then run it on linux (Development Environment wampp and running environment lamp/lnmp)But many times I have seen recruitment information when recruiting PHP programmers, I have said that I can develop PHP in linux, and I have recently turned to linux (centos) to develop PHP.
I hope you can evaluate your experience and feelings. By default7 # zbphp.com
1) linux installation and development environment is not convenient
In Windows, it is very convenient to install the ampp environment directly using the Integrated Development Kit. In addition, it is very convenient to enable the extension directly.
In linux, you must manually compile and install apr-util pcre apache php libxml2 mysql ...... After installing php, You have to configure php. ini my. cnf httpd. conf, which does not take effect after modification. This is a strange phenomenon.
Php. ini in/etc/php. ini, but in/usr/local/php5/lib/php. there is another ini file, and I enable the Apache virtual directory vhosts. If I put the directory under/home/username/www, there is no access permission, but it can be accessed again under/var/www.
Then I installed drupal and found that zlib extension was required. I re-compiled PHP. There is a zlib folder in the ext directory of the PHP-5.5.13, when compiling -- with-zlib, how can not be installed.
In addition, I found that I deleted all PHP files, including directories, and restarted httpd. It was strange that I could still open phpinfo. php.
Mysql configuration is also not easy to configure. I can use wamp under win7 to directly modify my. ini to move to any directory, but there are many permissions in linux. Anyway, it is really troublesome to configure the lamp environment in linux. It may take one morning as soon as possible. Because of the compilation and installation of PHP, make test has nearly 10 thousand projects and make install takes a long time.
In addition, configuration of mysql and Apache (with vhosts enabled) may not be successful, and permission issues and directory allocation problems may occur.
2) worries about developing PHP under win
I have been wondering whether to develop PHP in linux. The main factors are: first, I have interviewed PHP programmers once or twice, but I can see that the other programmers develop PHP in linux, then I said that I did not develop PHP in linux, but under win,After hearing this, the other party immediately said that I am a very beginner PHP programmer.The second is PHP 5.6.x. They no longer release versions below WIN; the third is that I recently watched symfony, but found that they were installed by composer, the instructions on the official website are all completed under linux. So I thought in my mind whether PHP cannot be developed under win in the future, and whether PHP programmers outside of China are all developing PHP under linux.
3) Disadvantages and problems of website development in linux
I have also carefully thought about some issues. In this era, the website has a very elegant UI experience,It is impossible to create a decent website if only a PHP programmer can do it. It must be done with the designer.. If you develop a PHP website in linux, the artist often transmits image materials. How can this problem be solved? The artist is responsible for the design. Currently, Chinese companies use QQ to deliver pictures of things on their websites, which is very convenient and fast. How can I transfer the code to linux? First, I received it from QQ in VM win7 and then uploaded it from the FTP client of WIN7 to the website directory of linux. Then I switched to linux to use image resources?
4) At the end, I think the essential difference between PHP and other software programs in JAVA C ++
I have been using PHP for many years. I have always felt that PHP is always disturbed by other software programming languages, such as JAVA C ++. I think PHP should be like C ++ JAVA, but I always feel that they are essentially different,C ++ JAVA seems to require team collaboration, and it is impossible to recruit only oneIn addition, there may be little or no involvement of the artist designer, because the software has no requirements on the interface and requires operation and business logic. However, most of the websites are post content. CMS is sufficient to meet the requirements and then generate static files. The program requirements are secondary, and there are a lot of participation from the art team. In this case, it cannot be developed independently like those in C ++ JAVA. It must be strongly cooperated by artists (because most companies do not understand html css js ). As a website php programmer, you still need to use PS and DW cut Graph Software, which is not supported by linux. Therefore, I have been very entangled in this issue. On the one hand, in actual needs, PHP does not have any team like those in C ++ JAVA. Most companies only have one PHP programmer at most. On the other hand, PHP must be developed in linux in many places, but I think it is really troublesome, inconvenient, and inflexible to develop PHP in linux several times.
I wrote these hopes to get comments, comments, and opinions from everyone. (By default7 # zbphp.com)