การใช้ iis กับ mysql
Moderator: mindphp
- buatong
- PHP Jr. Member
- Posts: 20
- Joined: 01/01/1970 7:00 am
ทำทุกขั้นตอนแล้วนะคะ แต่ติดตรง phpmyadmin ที่เรียกแล้ว ไม่สามารถเข้าได้ ก็เลยใช้ mysql-front แทน
มันขี้น
Warning: include(c:\inetpub\wwwroot//ethics/app_include/SEdit/editor/spaw_control.class.php) [function.include]: failed to open stream: No such file or directory in C:\App_old\asp\ethics\index.php on line 23
Warning: include() [function.include]: Failed opening 'c:\inetpub\wwwroot//ethics/app_include/SEdit/editor/spaw_control.class.php' for inclusion (include_path='.;C:\php5\pear') in C:\App_old\asp\ethics\index.php on line 23
ต้องแก้ตรงไหนบ้าง ลอง server อีกเครื่องนึง ก็ได้นะค่ะ ใช้ appserv แต่ server ที่ใช้ iis, PHP Version 5.1.6, mysql 4.1 แก้ config แล้ว แต่ก็ยังไม่ได้คะ ขึ้น error ตามข้างบน ทำตามที่คุณ mind บอกแล้วนะคะ
มันขี้น
Warning: include(c:\inetpub\wwwroot//ethics/app_include/SEdit/editor/spaw_control.class.php) [function.include]: failed to open stream: No such file or directory in C:\App_old\asp\ethics\index.php on line 23
Warning: include() [function.include]: Failed opening 'c:\inetpub\wwwroot//ethics/app_include/SEdit/editor/spaw_control.class.php' for inclusion (include_path='.;C:\php5\pear') in C:\App_old\asp\ethics\index.php on line 23
ต้องแก้ตรงไหนบ้าง ลอง server อีกเครื่องนึง ก็ได้นะค่ะ ใช้ appserv แต่ server ที่ใช้ iis, PHP Version 5.1.6, mysql 4.1 แก้ config แล้ว แต่ก็ยังไม่ได้คะ ขึ้น error ตามข้างบน ทำตามที่คุณ mind บอกแล้วนะคะ
- mindphp
- ผู้ดูแลระบบ MindPHP
- Posts: 26573
- Joined: 22/09/2008 6:18 pm
- Contact:
มันหาไฟล์ที่ตำแหน่งดังกล่าวไม่เจอครับ
ลองเช็คว่ามีไฟล์ นั้นอยู่ จริงมั๊ย ถ้าเป็น โปรแกรมที่ copy มาเป็นไปได้ว่าได้ไฟล์ มาไม่ครบ
ลองเช็คว่ามีไฟล์ นั้นอยู่ จริงมั๊ย ถ้าเป็น โปรแกรมที่ copy มาเป็นไปได้ว่าได้ไฟล์ มาไม่ครบ
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
- buatong
- PHP Jr. Member
- Posts: 20
- Joined: 01/01/1970 7:00 am
คุณ mindphp ค่ะ พอดีทำได้แล้วค่ะ error ข้างบน ได้แบบงงๆเหมือนกัน พอดี set เป็น virtual ค่ะ มีปัญหา ก็เลยเอา folder ที่เป็น code ไปใส่ใน wwwroot อีก (ตอนแรกไม่ได้ไว้ใน wwwroot นะคะ ไปใส่ไว้อีก directory นึง ทำเป็น virtual) ทีนี้ ไม่ขึ้น error ค่ะ แต่ไม่ connect database ให้ ทีนี้ ก็เลยสร้าง code ใหม่ ในการ insert ข้อมูล เพื่อลอง test ข้อมูลดู ปรากฏว่า insert ข้อมูลได้ ทั้ง 2 server ขอคำแนะนำ ดังนี้ค่ะ
1. ตอนนี้ใช้ 2 server คือ server 1 ใช้ iis, php 5.1.6 และ mysql 4.1 ส่วน server 2 ใช้ appserv 1.8.0 (ตัวนี้ไม่ค่อยมีปัญหาอะไรนะคะ)
2. สร้าง code select แบบง่ายๆ ขึ้นมา run server 1 ไม่ผ่าน แต่ run server 2 ผ่านค่ะ
<?
$host="localhost"; //ชื่อโฮส
$db_username="root"; //ชื่อผู้ใช้
$db_password=""; //รหัสผ่าน
$dbname="edb"; //ชื่อฐานข้อมูล
$connect = mysql_connect($host,$db_username,$db_password);
if(!$connect){
echo "ไม่สามารถติดต่อฐานข้อมูลได้"; exit();
}
$sql = "select * from org_g";
$dbquery = mysql_db_query($dbname, $sql);
$cols = 5; //กำหนดจำนวนคอลั่ม
$c = $cols;
?>
<table border="1">
<tr>
<?
while($result = mysql_fetch_array($dbquery)) {
$c --;
?>
<td width="150"><?=$result[g_name];?></td> //ส่วนของการแสดงข้อมูล
<?
if($c == 0) {
$c = $cols;
?>
</tr></tr>
<? } } ?>
</tr></table>
1. ตอนนี้ใช้ 2 server คือ server 1 ใช้ iis, php 5.1.6 และ mysql 4.1 ส่วน server 2 ใช้ appserv 1.8.0 (ตัวนี้ไม่ค่อยมีปัญหาอะไรนะคะ)
2. สร้าง code select แบบง่ายๆ ขึ้นมา run server 1 ไม่ผ่าน แต่ run server 2 ผ่านค่ะ
<?
$host="localhost"; //ชื่อโฮส
$db_username="root"; //ชื่อผู้ใช้
$db_password=""; //รหัสผ่าน
$dbname="edb"; //ชื่อฐานข้อมูล
$connect = mysql_connect($host,$db_username,$db_password);
if(!$connect){
echo "ไม่สามารถติดต่อฐานข้อมูลได้"; exit();
}
$sql = "select * from org_g";
$dbquery = mysql_db_query($dbname, $sql);
$cols = 5; //กำหนดจำนวนคอลั่ม
$c = $cols;
?>
<table border="1">
<tr>
<?
while($result = mysql_fetch_array($dbquery)) {
$c --;
?>
<td width="150"><?=$result[g_name];?></td> //ส่วนของการแสดงข้อมูล
<?
if($c == 0) {
$c = $cols;
?>
</tr></tr>
<? } } ?>
</tr></table>
- mindphp
- ผู้ดูแลระบบ MindPHP
- Posts: 26573
- Joined: 22/09/2008 6:18 pm
- Contact:
คำว่า ผ่าน ไม่ ผ่าน คืออะไรครับ มี error อะไร ออกมา บ้าง
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
- mindphp
- ผู้ดูแลระบบ MindPHP
- Posts: 26573
- Joined: 22/09/2008 6:18 pm
- Contact:
ก่อน อื่น ต้อง เช็ค ว่า webserver ทำงานได้ หรือ ยัง เมื่อทำงานได้ แล้ว ก็ เข็ค ว่ารัน ไฟล์ php ได้หรือยัง โดย เขียน คำสั่ง php ลงไปแล้ว ลองเรียกที่ browser ดู
ถ้าได้ ใช้ เช็ค ว่า php เรา สามารถติดต่อกับ ฐานข้อมูลได้ หรือไม่
โดย เช็คจาก function ที่ php มีให้ก็ได้
$arr = get_defined_functions();
print_r($arr);
ถ้ามี function mysql_*** ก็แสดงว่าใช้งานได้
ถ้าไม่ได้ ก็ ต้องทำตามที่แนะนำไปข้างบนนะครับ
ถ้าได้ ใช้ เช็ค ว่า php เรา สามารถติดต่อกับ ฐานข้อมูลได้ หรือไม่
โดย เช็คจาก function ที่ php มีให้ก็ได้
$arr = get_defined_functions();
print_r($arr);
ถ้ามี function mysql_*** ก็แสดงว่าใช้งานได้
ถ้าไม่ได้ ก็ ต้องทำตามที่แนะนำไปข้างบนนะครับ
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
- firelight
- PHP Newbie
- Posts: 3
- Joined: 01/01/1970 7:00 am
มาตอบเผื่อคนมาอ่านทีหลังนะ คิดว่าเจ้าของกระทู้น่าจะทำได้แล้วล่ะ
การใช้ php กะ iis 6.0+ เนี่ยปัญหาเยอะเลย
ลองตามสเต็ปหลักๆที่จำได้นะ
- ลง iis ก่อน ลงphp (แนะนำ 5.2+นะครับ ปัญหาจะลดลงเยอะเลย)
- ก็อบเว็บไปไว้ใน Interpub (โฟลเดอร์อื่นก็ได้แต่ให้ระวังเรื่อง Authenticate )
- เข้าไปแก้ Execute Permission ใน iis ให้รัน script ด้วย
ตอนลง php แนะนิดนึงถ้าใช้ iis ให้ลงเป็น ตัว cgi จะดีกว่านะครับ
การใช้ php กะ iis 6.0+ เนี่ยปัญหาเยอะเลย
ลองตามสเต็ปหลักๆที่จำได้นะ
- ลง iis ก่อน ลงphp (แนะนำ 5.2+นะครับ ปัญหาจะลดลงเยอะเลย)
- ก็อบเว็บไปไว้ใน Interpub (โฟลเดอร์อื่นก็ได้แต่ให้ระวังเรื่อง Authenticate )
- เข้าไปแก้ Execute Permission ใน iis ให้รัน script ด้วย
ตอนลง php แนะนิดนึงถ้าใช้ iis ให้ลงเป็น ตัว cgi จะดีกว่านะครับ
-
- Similar Topics
- Replies
- Views
- Last post
-
-
ขอความช่วยเหลือ การใช้ php import CSV to mysql ครับ
by mekhong » 06/06/2013 5:15 pm » in Programming - PHP - 4 Replies
- 2155 Views
-
Last post by mekhong
07/06/2013 9:54 am
-
-
-
การใช้ ZF & Mysql กับ ภาษาไทย Zend Framework
by zend_framework » 17/04/2011 5:26 pm » in Share Knowledge - 0 Replies
- 6145 Views
-
Last post by zend_framework
17/04/2011 5:26 pm
-
-
-
อัพเกรด Mysql Ubuntu จาก MySQL 5.5 เป็น MySQL 5.7
by mindphp » 12/06/2016 5:57 pm » in Linux - Web Server - 1 Replies
- 1294 Views
-
Last post by mindphp
12/06/2016 5:58 pm
-
-
-
ปัญหา MySQL is running but PID file could not be found พบบ่อยกับ Innodb ของ Mysql เพราะพื้นที่ไม่พอ
by mindphp » 13/11/2016 9:00 pm » in Linux - Web Server - 2 Replies
- 1378 Views
-
Last post by mindphp
09/03/2017 8:21 pm
-
-
-
ปรับเวลาใน Mysql เพิ่ม จำนวนวันใน mysql ตามต้องการ ด้วย DATE_ADD
by mindphp » 01/07/2011 12:04 am » in SQL - Database - 0 Replies
- 2379 Views
-
Last post by mindphp
01/07/2011 12:04 am
-
-
-
ปัญหา MySQL unknown column 'password_last_changed' หลังการอัพเกรด MySQL เป็นเวอร์ชั่น 5.7
by mindphp » 13/06/2016 5:42 pm » in SQL - Database - 1 Replies
- 1317 Views
-
Last post by mindphp
13/06/2016 5:44 pm
-
-
-
วิธีการหา Error ของการ Insert ข้อมูลลงฐานข้อมูล Mysql โดยใช้ Mysql
by Patipat » 17/06/2019 5:42 pm » in SQL Knowledge - 0 Replies
- 2316 Views
-
Last post by Patipat
17/06/2019 5:42 pm
-
-
-
วิธีการใช้งาน MySql Workbench สร้าง ER สร้างตาราง, ควบคุม Mysql Server ทั้ง Host
by samsonnaze3 » 03/04/2012 1:45 pm » in Share Knowledge - 21 Replies
- 30535 Views
-
Last post by samsonnaze3
03/04/2012 2:57 pm
-
Who is online
Users browsing this forum: Google Adsense [Bot] and 6 guests