Fatal error: Call to undefined function mysql_pconnect() in D:\Domains\cuti.com\wwwroot\rjn\includes\class_core.php on line 311

Ối giời ơi là giời . . . vui quá đi

Hôm nay Tí mới phát hiện một lỗi cũng cực kỳ thú khá vị lắm. Cái lỗi này dù  có đi tìm kiếm trong cái “kho kiến thức vô tận trên Internet này” cũng giống như  “đi tìm lá diêu bông ” vậy.

Mới đầu Tí cứ  nghĩ là do thằng cu quản trị  server nào đó vọc phá hay rebuild lại PHP + MySQL nhưng không đúng vậy.

Bây giờ chỉ còn lại là code web và thằng cu quản lý hosting,quản lý website đó,nhưng cũng không phải

Nhìn vào thông báo lỗi đó : cứ  ngu ngơ dại khờ như  là cái hàm mysql_pconnect() bị cấm ấy nhỉ ??? Cũng không phải luôn.

Còn 2 thằng nữa đó là thằng IIS và thằng HELM

Đọc tiếp »

Connect to MS SQL 2005 with PHP

Có vài cách để sử  dụng PHP kết nối đến MS SQL server.Bài viết này mình sử  dụng theo cách sau

1.Đầu tiên thay thế tập tin MSSQL Client Library.Nó là thư  viện cũ chỉ hỗ trợ  cho SQL Server 7.0/2000.

Bạn tải về tại đây http://webzila.com/dll/1/ntwdblib.zip

Rồi giải nén ra và copy đè lên tập tin ntwdblib.dll cũ

2.Trong MSSQL 2005,giao thức TCP/IP và NAMED PIPES  mặc định disable vì vậy ta cần enable nó lên theo sau

Đọc tiếp »

Import large sql databases with phpMyAdmin (increase size limit)

The default import limit in phpMyAdmin is 2MB. In this post I will show how you can overcome this problem and import your large database backup.

Let’s take for example that you have successfully exported a backup of your website database in sql format -the process is described in the post on joomla security patch where you can read the steps to backup your database – having a size of 15MB.

Đọc tiếp »

Why can’t I upload big files and PHP memory_limit – Why do I get the error Allowed memory size of Xxx bytes exhausted?

Why can’t I upload big files (over a megabyte or two)?

The upload limits are enforced by the PHP / webserver configuration and not by Gallery 2. Craig Goranson wrote a very informative (but unfortunately Gallery 1 specific) email about how to fix this issue. Marcel Beemster updated it for Gallery2 at his blog.

In short: The administrator can change the upload_max_filesize and post_max_size directives in php.ini (the PHP configuration file). Also, you can try to override the system-wide default settings in a .htaccess file. Example, add this to your .htaccess file in your gallery2/ folder to set a upload limit of 10 Mega Byte:

Đọc tiếp »

Working with MSSQL and PHP

MSSQL Server (or SQL Server) is the Microsoft product of database. SQL Server 2000 has been a popular edition and with the inspiration and experience gained from it, Microsoft has released SQL Server 2005. SQL Server 2005 is also available in “light-weight” edition named, SQL Server 2005 Express Edition. This article focuses executing SQL queries and SQL Stored Procedures on SQL Server and SQL Express using PHP. This article assumes that your webserver is IIS. Any other webserver might also work.

Đọc tiếp »

PHP Email Setup

Here’s how the section might look on a typical Windows server, or on a Linux server without sendmail:

[mail function]
; Setup for Windows systems
SMTP = smtp.my.isp.net
sendmail_from = me@myserver.com

Đọc tiếp »

MySQL Error : Got a packet bigger than ‘max_allowed_packet’ bytes

Database error in vBulletin 3.6.8:

Invalid SQL:

REPLACE INTO datastore
(title, data, unserialize)
VALUES
MySQL Error : Got a packet bigger than ‘max_allowed_packet’ bytes
Error Number : 1153

Đọc tiếp »

“210.245.85.1414″is blocked because of many connection errors. Unblock with ‘mysqladmin flush-hosts’

Chỉ cần chạy  lệnh này mysqladmin flush-hosts với quyền root la ok liền.

disable_functions =”base64_decode()”———–>xuat hien loi Warning: base64_decode() has been disabled for security reasons in /home/vutn/public_html/shop/lib/general.php on line 1916

Warning: base64_decode() has been disabled for security reasons in /home/vutn/public_html/shop/lib/general.php on line 1916

Warning: base64_decode() has been disabled for security reasons in /home/vutn/public_html/shop/lib/general.php on line 1916

Warning: base64_decode() has been disabled for security reasons in /home/vutn/public_html/shop/lib/general.php on line 1916

Warning: base64_decode() has been disabled for security reasons in /home/vutn/public_html/shop/lib/general.php on line 1916

disable_functions =”parse_ini_file”———–>xuat hien loi %%……%%

disable_functions =”parse_ini_file” ———–>xuat hien loi %%……%%

Connecting to MySQL database

Opening a connection to MySQL database from PHP is easy. Just use the mysql_connect() function like this

<?php
$dbhost = ‘localhost’;
$dbuser = ‘root’;
$dbpass = ‘password’;

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die                      (‘Error connecting to mysql’);

$dbname = ‘petstore’;
mysql_select_db($dbname);
?>

Đọc tiếp »