Difference between revisions of "Admin:Bin"
Jump to navigation
Jump to search
(→SQL) |
|||
Line 68: | Line 68: | ||
=== THAIMALLPLAZA MONTHLY SUMMARY === | === THAIMALLPLAZA MONTHLY SUMMARY === | ||
สรุปรายการโดเมนของ Thaimallplaza ในเดือนที่ผ่านมา | สรุปรายการโดเมนของ Thaimallplaza ในเดือนที่ผ่านมา | ||
− | https://www.pathosting.co.th/admin/search/custom_query?select_query=SELECT+%0D%0ACONCAT(%0D%0ACASE+`domain_service`%0D%0AWHEN+'register'+THEN+'%E0%B8%88%E0%B8%94%E0%B9%82%E0%B8%94%E0%B9%80%E0%B8%A1%E0%B8%99%E0%B9%80%E0%B8%99%E0%B8%A1'%0D%0AWHEN+'renew'+THEN+'%E0%B8%95%E0%B9%88%E0%B8%AD%E0%B8%AD%E0%B8%B2%E0%B8%A2%E0%B8%B8%E0%B9%82%E0%B8%94%E0%B9%80%E0%B8%A1%E0%B8%99%E0%B9%80%E0%B8%99%E0%B8%A1'%0D%0AWHEN+'transfer'+THEN+'%E0%B8%A2%E0%B9%89%E0%B8%B2%E0%B8%A2%E0%B9%82%E0%B8%94%E0%B9%80%E0%B8%A1%E0%B8%99%E0%B9%80%E0%B8%99%E0%B8%A1'%0D%0AEND,'+',+`domain_name`,'+',`domain_period`,'+%E0%B8%9B%E0%B8%B5','+(',`domain_begin_date`,'+%E0%B8%96%E0%B8%B6%E0%B8%87+',`domain_end_date`,')')+AS+` | + | https://www.pathosting.co.th/admin/search/custom_query?select_query=SELECT+%0D%0ACONCAT(%0D%0ACASE+`domain_service`%0D%0AWHEN+'register'+THEN+'%E0%B8%88%E0%B8%94%E0%B9%82%E0%B8%94%E0%B9%80%E0%B8%A1%E0%B8%99%E0%B9%80%E0%B8%99%E0%B8%A1'%0D%0AWHEN+'renew'+THEN+'%E0%B8%95%E0%B9%88%E0%B8%AD%E0%B8%AD%E0%B8%B2%E0%B8%A2%E0%B8%B8%E0%B9%82%E0%B8%94%E0%B9%80%E0%B8%A1%E0%B8%99%E0%B9%80%E0%B8%99%E0%B8%A1'%0D%0AWHEN+'transfer'+THEN+'%E0%B8%A2%E0%B9%89%E0%B8%B2%E0%B8%A2%E0%B9%82%E0%B8%94%E0%B9%80%E0%B8%A1%E0%B8%99%E0%B9%80%E0%B8%99%E0%B8%A1'%0D%0AEND,'+',+`domain_name`,'+',`domain_period`,'+%E0%B8%9B%E0%B8%B5','+(',`domain_begin_date`,'+%E0%B8%96%E0%B8%B6%E0%B8%87+',`domain_end_date`,')')+AS+`%E0%B8%A3%E0%B8%B2%E0%B8%A2%E0%B8%81%E0%B8%B2%E0%B8%A3`,%0D%0AROUND((domain_price%2Bhost_price%2Bother_price)/(100%2Bvat)*100,2)+AS+`%E0%B8%84%E0%B9%88%E0%B8%B2%E0%B8%9A%E0%B8%A3%E0%B8%B4%E0%B8%81%E0%B8%B2%E0%B8%A3`,%0D%0AROUND((domain_price%2Bhost_price%2Bother_price)/(100%2Bvat)*3,2)+AS+`%E0%B8%88%E0%B8%B3%E0%B8%99%E0%B8%A7%E0%B8%99%E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B5%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%AB%E0%B8%B1%E0%B8%81%E0%B9%84%E0%B8%A7%E0%B9%89`,%0D%0AIF(`payment_date`%3D'0000-00-00',+`pay_by_fund_date`,+`payment_date`)+AS+`%E0%B8%A7%E0%B8%B1%E0%B8%99%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%88%E0%B9%88%E0%B8%B2%E0%B8%A2`%0D%0AFROM+`lnw_lnwhost__orders`%0D%0AWHERE%0D%0A`user_id`%3D36706+AND%0D%0A`status`%3D'complete'+AND%0D%0A(`domain_price`%2B`host_price`%2B`other_price`%3E0+OR+`domain_period`%2B`host_period`%3E0)+AND%0D%0AIF(`payment_date`%3D'0000-00-00',+`pay_by_fund_date`,+`payment_date`)+BETWEEN+DATE_FORMAT(NOW()+-+INTERVAL+1+MONTH,+'%25Y-%25m-01')+AND+LAST_DAY(NOW()+-+INTERVAL+1+MONTH)%0D%0AORDER+BY+`%E0%B8%A7%E0%B8%B1%E0%B8%99%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%88%E0%B9%88%E0%B8%B2%E0%B8%A2` |
== DirectAdmin == | == DirectAdmin == |
Revision as of 18:14, 4 October 2010
คำสั่ง start httpd ขั้นเทพ
* ในกรณีที่ start httpd ไม่ขึ้น
/usr/bin/ipcrm sem $(/usr/bin/ipcs -s | grep apache | awk '{print$2}') /etc/init.d/httpd restart
MySQL Dump
mysqldump --user {username} --password={password} {dbname} > filename.sql mysql --user {username} --password={password} {dbname} < filename.sql
URL
CMS
Wordpress
ตั้งโดเมนที่ใช้กับ Wordpress
เวลาเปลี่ยนโดเมนที่ใช้กับ Wordpress จะทำให้เข้า WP-ADMIN ไม่ได้ ทำให้เข้าไปตั้ง Site URL หรือ Blog URL เนี่ยแหละ เข้าไปตั้งไม่ได้ วิธีการแก้ไข คือ ให้ไป define constant เพิ่มใน wp-config.php ดังนี้
define("WP_HOME","http://www.example.com"); define("WP_SITEURL","http://www.example.com");
Joomla
Check Version Joomla
grep var libraries/joomla/version.php
SQL
แสดง IP Class C ที่เรามี
SELECT SUBSTRING_INDEX(`host_ip`, '.', 3) FROM `lnw_lnwhost__hosts` LEFT JOIN `lnw_lnwhost__host_resellers` USING (`host_reseller_id`) WHERE `host_ip` IS NOT NULL GROUP BY SUBSTRING_INDEX(`host_ip`, '.', 3)
หา IP Class C ที่ยังไม่ได้ใช้ (สำหรับโฮสติ้ง)
เวลาเอาไปใช้ เปลี่ยนตรง WHERE `user_id`=...
SELECT `host_reseller_id`, SUBSTRING_INDEX(`host_ip`, '.', 3) , `host_ip` FROM `lnw_lnwhost__host_resellers` WHERE `username`='pathosting' AND SUBSTRING_INDEX(`host_ip`, '.', 3) NOT IN ( SELECT SUBSTRING_INDEX(`host_ip`, '.', 3) FROM `lnw_lnwhost__hosts` LEFT JOIN `lnw_lnwhost__host_resellers` USING (`host_reseller_id`) WHERE `user_id`=37111 GROUP BY SUBSTRING_INDEX(`host_ip`, '.', 3) )
เวลาเอาใส่ order.extra
{"REQHRESELLID":1}
หา IP Class C ที่ยังไม่ได้ใช้ (แปลกๆ)
SELECT * FROM `lnw_lnwhost__host_servers_ips` WHERE `parent_ip` NOT LIKE AND substring(`ip`,1,9) NOT IN ( '61.19.247', '61.19.250', '61.19.246', '122.155.5', '122.155.5', '122.155.5', '61.19.246', '61.19.250', '61.19.247', '61.19.247', '61.19.246', '61.19.250', '122.155.5') AND `ns1` LIKE 'NS%.PATHOSTING.COM' GROUP BY substring(`ip`,1,9)
THAIMALLPLAZA MONTHLY SUMMARY
สรุปรายการโดเมนของ Thaimallplaza ในเดือนที่ผ่านมา
https://www.pathosting.co.th/admin/search/custom_query?select_query=SELECT+%0D%0ACONCAT(%0D%0ACASE+`domain_service`%0D%0AWHEN+'register'+THEN+'%E0%B8%88%E0%B8%94%E0%B9%82%E0%B8%94%E0%B9%80%E0%B8%A1%E0%B8%99%E0%B9%80%E0%B8%99%E0%B8%A1'%0D%0AWHEN+'renew'+THEN+'%E0%B8%95%E0%B9%88%E0%B8%AD%E0%B8%AD%E0%B8%B2%E0%B8%A2%E0%B8%B8%E0%B9%82%E0%B8%94%E0%B9%80%E0%B8%A1%E0%B8%99%E0%B9%80%E0%B8%99%E0%B8%A1'%0D%0AWHEN+'transfer'+THEN+'%E0%B8%A2%E0%B9%89%E0%B8%B2%E0%B8%A2%E0%B9%82%E0%B8%94%E0%B9%80%E0%B8%A1%E0%B8%99%E0%B9%80%E0%B8%99%E0%B8%A1'%0D%0AEND,'+',+`domain_name`,'+',`domain_period`,'+%E0%B8%9B%E0%B8%B5','+(',`domain_begin_date`,'+%E0%B8%96%E0%B8%B6%E0%B8%87+',`domain_end_date`,')')+AS+`%E0%B8%A3%E0%B8%B2%E0%B8%A2%E0%B8%81%E0%B8%B2%E0%B8%A3`,%0D%0AROUND((domain_price%2Bhost_price%2Bother_price)/(100%2Bvat)*100,2)+AS+`%E0%B8%84%E0%B9%88%E0%B8%B2%E0%B8%9A%E0%B8%A3%E0%B8%B4%E0%B8%81%E0%B8%B2%E0%B8%A3`,%0D%0AROUND((domain_price%2Bhost_price%2Bother_price)/(100%2Bvat)*3,2)+AS+`%E0%B8%88%E0%B8%B3%E0%B8%99%E0%B8%A7%E0%B8%99%E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B5%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%AB%E0%B8%B1%E0%B8%81%E0%B9%84%E0%B8%A7%E0%B9%89`,%0D%0AIF(`payment_date`%3D'0000-00-00',+`pay_by_fund_date`,+`payment_date`)+AS+`%E0%B8%A7%E0%B8%B1%E0%B8%99%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%88%E0%B9%88%E0%B8%B2%E0%B8%A2`%0D%0AFROM+`lnw_lnwhost__orders`%0D%0AWHERE%0D%0A`user_id`%3D36706+AND%0D%0A`status`%3D'complete'+AND%0D%0A(`domain_price`%2B`host_price`%2B`other_price`%3E0+OR+`domain_period`%2B`host_period`%3E0)+AND%0D%0AIF(`payment_date`%3D'0000-00-00',+`pay_by_fund_date`,+`payment_date`)+BETWEEN+DATE_FORMAT(NOW()+-+INTERVAL+1+MONTH,+'%25Y-%25m-01')+AND+LAST_DAY(NOW()+-+INTERVAL+1+MONTH)%0D%0AORDER+BY+`%E0%B8%A7%E0%B8%B1%E0%B8%99%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%88%E0%B9%88%E0%B8%B2%E0%B8%A2`
DirectAdmin
Manual edit User/Reseller
- แก้ที่ไฟล์ /usr/local/directadmin/data/users/reseller/users.list
- ลบออกจาก reseller เดิม
- เพิ่มที่ reseller ใหม่
- แก้ไฟล์ /usr/local/directadmin/data/users/username/user.conf , แก้บรรทัด creator=
- รันคำสั่ง
echo "action=cache&value=showallusers" >> /usr/local/directadmin/data/task.queue