Win7 64位 php
Jun 06, 2016 pm 07:47 PM一:準(zhǔn)備階段 1:php php-5.5.13下載鏈接:http://windows.php.net/downloads/releases/php-5.5.13-Win32-VC11-x64.zip 推薦 Thread Safe(線程安全)V11 x64,也就是64bit的。 現(xiàn)在PHP官網(wǎng)上下載PHP安裝包都有VC11或VC9的字樣,這是什么含義,我們應(yīng)該下載哪
一?:準(zhǔn)備階段
1:php
php-5.5.13下載鏈接:http://windows.php.net/downloads/releases/php-5.5.13-Win32-VC11-x64.zip
推薦 Thread Safe(線程安全)?V11 x64,也就是64bit的。
現(xiàn)在PHP官網(wǎng)上下載PHP安裝包都有VC11或VC9的字樣,這是什么含義,我們應(yīng)該下載哪種安裝包更好呢?
其實(shí)PHP官網(wǎng)給出了答案:
VC9 and VC11
More recent versions of PHP are built with VC9 or VC11 (Visual Studio 2008 and 2012 compiler respectively) and include improvements in performance and stability.
The VC9 builds require you to have the?Visual C++ Redistributable for Visual Studio 2008 SP1?x86?or?x64?installed.
The VC11 builds require to have the?Visual C++ Redistributable for Visual Studio 2012?x86 or x64?installed.
VC9意思就是該版本PHP是用VisualStudio2008編譯的,而VC11則是用VisualStudio2012編譯的。這意味著
如果你下載的是VC9版本的,就需要先安裝VisualC++RedistributableforVisualStudio2008SP1,
如果你下載的是VC11版本的,就需要先安裝VisualC++RedistributableforVisualStudio2012.
V11是微軟的一個(gè)組件,如果不安裝的話會(huì)提示?msvcr110.dll丟失。
下載鏈接:http://www.microsoft.com/zh-CN/download/details.aspx?id=30679
請(qǐng)下載64bit的,安裝完成后,請(qǐng)重啟計(jì)算機(jī)
?2:apache2.4.9,下載鏈接:http://www.apachelounge.com/download/
同樣是推薦 V11,64位的。
3:mysql 5.6.19,下載鏈接:http://dev.mysql.com/downloads/mysql/
同樣是推薦 mysql-5.6.19-winx64.zip
?
二:方法/步驟
?1:安裝配置Apache2.4.9(httpd-2.4.9-win64-VC11.zip?)
解壓下載的安裝包:httpd-2.4.9-win64-VC11.zip?將其放到自己的安裝目錄(我的目錄E:\Apache24)
然后對(duì)http.conf(E:\Apache24\conf\http.conf)配置文件進(jìn)行修改-使用記事本打開(kāi)就行
?(1)修改ServerRoot Apache的根路徑:
???????? (37行)ServerRoot"c:/Apache24"改成=>ServerRoot "E:/Apache24"
???? (2)修改ServerName你的主機(jī)名稱(chēng):
???????? (217行)ServerNamewww.example.com:80將前面的#去掉,該屬性在從命令行啟動(dòng)Apache時(shí)需要用到。
???? (3)修改DocumentRoot Apache訪問(wèn)的主文件夾目錄,就是php、html代碼文件的位置。Apache默認(rèn)的路徑是在htdocs(E:\Apache24\htdocs)下面,里面會(huì)有個(gè)簡(jiǎn)單的入口文件index.html。這個(gè)路徑可以自己進(jìn)行修改,我這里將其配置在我自己新建的文件夾www(E:\php\www)下。
(247行)?DocumentRoot "c:/Apache24/htdocs"
????????
改為=>
????????DocumentRoot "E:\php\www"
????????
???? (4)修改入口文件配置:DirectoryIndex一般情況下我們都是以index.php、index.html、index.htm作為web項(xiàng)目的入口。Apache默認(rèn)的入口只有index.html需要添加其他兩個(gè)的支持,當(dāng)然這個(gè)入口文件的設(shè)置可以根據(jù)自己的需要增減,如果要求比較嚴(yán)格的話可以只寫(xiě)一個(gè)index.php,這樣在項(xiàng)目里面的入口就只能是index.php
(274行)
? ? ? ??DirectoryIndexindex.html
???????
改為=>
??????
? ? ? ??DirectoryIndex? index.php index.htm index.html
????????
? ? (5)設(shè)定serverscript的目錄:
? ? ? ? (358行)ScriptAlias/cgi-bin/ "c:/Apache24/cgi-bin/"改為=> ScriptAlias/cgi-bin/ "e:/Apache24/cgi-bin"
?? (6)(374行)
? ? ? ?
? ? ? ? ? AllowOverride None
? ? ? ? ? Options None
? ? ? ? ? Require all granted
? ? ? ?
改為=>
? ? ? ?
? ? ? ? ? AllowOverride None
? ? ? ? ? Options None
? ? ? ? ? Require all granted
? ? ? ?
?
接下來(lái)就可以啟動(dòng)Apache了
開(kāi)始---運(yùn)行,輸入cmd,打開(kāi)命令提示符。接著進(jìn)入e:\Apache24\bin目錄下回車(chē)httpd回車(chē),?
沒(méi)有報(bào)錯(cuò)的話就可以測(cè)試了(保持該命令窗口為打開(kāi)的狀態(tài))。
把Apache24\htdocs目錄下的index.html放到e:\php\www目錄下,用瀏覽器訪問(wèn)會(huì)出現(xiàn)“It works”那么就說(shuō)明apache已經(jīng)正確安裝并啟動(dòng)了。也可以自己寫(xiě)一個(gè)簡(jiǎn)單的index.html文件也可以打開(kāi)。
說(shuō)明:Apache 默認(rèn)使用80端口,如果80端口被占用,Apache將無(wú)法啟動(dòng),此時(shí)可以更改Apache端口,解決此問(wèn)題。
更改端口:找到Apache安裝目錄下conf目錄下的httpd.conf文件(即e:\Apache24\conf\httpd.conf)。打開(kāi)它。找到“Listen80”,緊接著Listen的數(shù)字就是端口號(hào),我們改為“Listen 8080”。? 修改為其它未使用的端口號(hào)也行。. 重新啟動(dòng)Apache,使新的配置生效。可以使用右下角狀態(tài)欄的“Apache Serive Monitor”啟動(dòng)apache。 也可以點(diǎn)擊“開(kāi)始”>"運(yùn)行>輸入cmd>回車(chē)>定位到apache安裝目錄下到bin目錄,然后輸入“httpd–k start”。
?
將Apache加入到window服務(wù)啟動(dòng)項(xiàng)里面并設(shè)置成開(kāi)機(jī)啟動(dòng)
先關(guān)閉httpd的服務(wù)(將命令窗口關(guān)閉即可)
重新打開(kāi)一個(gè)新的命令窗口進(jìn)入到E:\Apache24\bin目錄下:
添加HTTP服務(wù)的命令是:httpd.exe -kinstall -n "servicename"? servicename是服務(wù)的名稱(chēng),我添加的是:httpd.exe -k install -n "Apache24"命令成功后會(huì)有成功的提示,此時(shí)你可以在window服務(wù)啟動(dòng)項(xiàng)中看到Apache24這個(gè)服務(wù)
或者(e:\apache24\bin\httpd.exe -k install)
此時(shí)如果你出現(xiàn):Installing the Apache2.4 service(OS 5)拒絕訪問(wèn)。? : AH00369: Failed to open the WinNT service manager, perhaps you forgot to log in as Adminstrator? 這個(gè)錯(cuò)誤時(shí),是因?yàn)樵诎惭bApache的時(shí)候,下載的是zip格式,不是msi安裝版,需要自己注冊(cè)服務(wù),才能在桌面任務(wù)欄里有httpd的圖標(biāo)。結(jié)果在cmd命令行里輸入安裝服務(wù)命令的時(shí)候出錯(cuò),出錯(cuò)上述錯(cuò)誤,錯(cuò)誤信息提示我沒(méi)有用管理員身份登錄!
? 解決方案:將cmd以管理員身份運(yùn)行,然后再重新輸入命令即可,執(zhí)行成功后,可在系統(tǒng)服務(wù)中找到Apache24這個(gè)服務(wù)。
然后點(diǎn)擊啟動(dòng)就可以了,如果不想設(shè)置成開(kāi)機(jī)啟動(dòng)的話也可以將啟動(dòng)類(lèi)型修改為手動(dòng)。
如果要卸載這個(gè)服務(wù)的話,先要停止這個(gè)服務(wù),然后輸入httpd.exe -k uninstall -n?"Apache24"卸載這個(gè)服務(wù)。
當(dāng)然也可以通過(guò)E:\Apache24\bin下面的ApacheMonitor.exe來(lái)啟動(dòng)Apache這里就不多說(shuō)了
如此Apache的配置就基本完成了。
2:安裝配置php5.5.13(php-5.5.13-Win32-VC11-x64.zip)
?(1)、將下載的php-5.5.10-Win32-VC11-x64.zip ?解壓到安裝目錄下我的是(D:\phpEnv\php)
?(2)、將目錄下的php.ini-development文件復(fù)制一份并改名為php.ini他是php的配置文件
?(3)、為Apache服務(wù)添加php支持
打開(kāi)Apache的配置文件http.conf在最后加上
# php5 support
LoadModule php5_module e:/php/php5apache2_4.dll
AddType application/x-httpd-php .php .html .htm
# configure thepath to php.ini
PHPIniDir "e:/php"?
這里我添加在LoadModule下面
添加的時(shí)候要保證你的php5apache2_4.dll文件確實(shí)存在php5.5的早期版本里面是沒(méi)有這個(gè)文件的,不過(guò)高點(diǎn)版本里面已經(jīng)有了,可以打開(kāi)php安裝目錄找下這個(gè)文件
PHPIniDir"e:/php"這個(gè)就是你的php根目錄
?(4).重啟Apache服務(wù)器。
?(5).測(cè)試。刪除www中其他文件,新建一個(gè)index.php,內(nèi)容為保存,訪問(wèn)出現(xiàn)php的信息就說(shuō)明php已經(jīng)成功安裝。
?
備注:
Php的一些常用配置修改:(e:\php\php.ini)
時(shí)區(qū)的設(shè)置:date.timezone =?Asia/Shanghai
錯(cuò)誤報(bào)告等級(jí):error_reporting = E_ALL這個(gè)在開(kāi)發(fā)模式下可以全部打開(kāi)。
?
?
Win7 64位 php-5.5.13+Apache 2.4.9+mysql-5.6.19 配置

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

User voice input is captured and sent to the PHP backend through the MediaRecorder API of the front-end JavaScript; 2. PHP saves the audio as a temporary file and calls STTAPI (such as Google or Baidu voice recognition) to convert it into text; 3. PHP sends the text to an AI service (such as OpenAIGPT) to obtain intelligent reply; 4. PHP then calls TTSAPI (such as Baidu or Google voice synthesis) to convert the reply to a voice file; 5. PHP streams the voice file back to the front-end to play, completing interaction. The entire process is dominated by PHP to ensure seamless connection between all links.

The core method of building social sharing functions in PHP is to dynamically generate sharing links that meet the requirements of each platform. 1. First get the current page or specified URL and article information; 2. Use urlencode to encode the parameters; 3. Splice and generate sharing links according to the protocols of each platform; 4. Display links on the front end for users to click and share; 5. Dynamically generate OG tags on the page to optimize sharing content display; 6. Be sure to escape user input to prevent XSS attacks. This method does not require complex authentication, has low maintenance costs, and is suitable for most content sharing needs.

To realize text error correction and syntax optimization with AI, you need to follow the following steps: 1. Select a suitable AI model or API, such as Baidu, Tencent API or open source NLP library; 2. Call the API through PHP's curl or Guzzle and process the return results; 3. Display error correction information in the application and allow users to choose whether to adopt it; 4. Use php-l and PHP_CodeSniffer for syntax detection and code optimization; 5. Continuously collect feedback and update the model or rules to improve the effect. When choosing AIAPI, focus on evaluating accuracy, response speed, price and support for PHP. Code optimization should follow PSR specifications, use cache reasonably, avoid circular queries, review code regularly, and use X

1. Maximizing the commercial value of the comment system requires combining native advertising precise delivery, user paid value-added services (such as uploading pictures, top-up comments), influence incentive mechanism based on comment quality, and compliance anonymous data insight monetization; 2. The audit strategy should adopt a combination of pre-audit dynamic keyword filtering and user reporting mechanisms, supplemented by comment quality rating to achieve content hierarchical exposure; 3. Anti-brushing requires the construction of multi-layer defense: reCAPTCHAv3 sensorless verification, Honeypot honeypot field recognition robot, IP and timestamp frequency limit prevents watering, and content pattern recognition marks suspicious comments, and continuously iterate to deal with attacks.

PHP does not directly perform AI image processing, but integrates through APIs, because it is good at web development rather than computing-intensive tasks. API integration can achieve professional division of labor, reduce costs, and improve efficiency; 2. Integrating key technologies include using Guzzle or cURL to send HTTP requests, JSON data encoding and decoding, API key security authentication, asynchronous queue processing time-consuming tasks, robust error handling and retry mechanism, image storage and display; 3. Common challenges include API cost out of control, uncontrollable generation results, poor user experience, security risks and difficult data management. The response strategies are setting user quotas and caches, providing propt guidance and multi-picture selection, asynchronous notifications and progress prompts, key environment variable storage and content audit, and cloud storage.

PHP ensures inventory deduction atomicity through database transactions and FORUPDATE row locks to prevent high concurrent overselling; 2. Multi-platform inventory consistency depends on centralized management and event-driven synchronization, combining API/Webhook notifications and message queues to ensure reliable data transmission; 3. The alarm mechanism should set low inventory, zero/negative inventory, unsalable sales, replenishment cycles and abnormal fluctuations strategies in different scenarios, and select DingTalk, SMS or Email Responsible Persons according to the urgency, and the alarm information must be complete and clear to achieve business adaptation and rapid response.

PHPisstillrelevantinmodernenterpriseenvironments.1.ModernPHP(7.xand8.x)offersperformancegains,stricttyping,JITcompilation,andmodernsyntax,makingitsuitableforlarge-scaleapplications.2.PHPintegrateseffectivelyinhybridarchitectures,servingasanAPIgateway

Select the appropriate AI voice recognition service and integrate PHPSDK; 2. Use PHP to call ffmpeg to convert recordings into API-required formats (such as wav); 3. Upload files to cloud storage and call API asynchronous recognition; 4. Analyze JSON results and organize text using NLP technology; 5. Generate Word or Markdown documents to complete the automation of meeting records. The entire process needs to ensure data encryption, access control and compliance to ensure privacy and security.
