PDA

View Full Version : مشکل بعد نصب PHP



xman_dj
چهارشنبه 25 فروردین 1389, 10:24 صبح
با سلام و خسته نباشید به دوستان فعال سایت
من یه سوالی در مورد پی اچ پی داشتم ممکنه پی اچ پی نصب باشه ولی بعضی از توابع اون کار نکنه؟
من پی اچ پی رو نصب کردم رو سیستمم و هر سورسی که می نویسم کار میکنه ولی یک مشکل داره با پایگاه داده mysql نمیشه ارتباط برقرار کرد سورس ارتباط با پایگاه داده درسته چون از همین سایت برداشتم و روی سرور یک سایتی که پی اچ پی ساپورت میکرد آپلود کردم و جواب داد ولی در سیستم خودم به تابع کانکشن ارور میده......الان میخواستم بدنم مشکل از نصب پی اچ پی هست یا نه؟

mojtabadj
چهارشنبه 25 فروردین 1389, 12:56 عصر
با سلام و خسته نباشید به دوستان فعال سایت
من یه سوالی در مورد پی اچ پی داشتم ممکنه پی اچ پی نصب باشه ولی بعضی از توابع اون کار نکنه؟
من پی اچ پی رو نصب کردم رو سیستمم و هر سورسی که می نویسم کار میکنه ولی یک مشکل داره با پایگاه داده mysql نمیشه ارتباط برقرار کرد سورس ارتباط با پایگاه داده درسته چون از همین سایت برداشتم و روی سرور یک سایتی که پی اچ پی ساپورت میکرد آپلود کردم و جواب داد ولی در سیستم خودم به تابع کانکشن ارور میده......الان میخواستم بدنم مشکل از نصب پی اچ پی هست یا نه؟

احتمالا mysql غیر فعالش هست اون رو باید فعال کنی

چه برنامه ای نصب کردی؟

از xampp استفاده کن

xman_dj
چهارشنبه 25 فروردین 1389, 20:20 عصر
آخه مشکل من حل نشد باز الانم به تابع ارور نمیده اینبار کد زیر رو وارد کردم ببینین درسته؟


$link = mysql_connect("localhost", "root", "davod");
if (!$link) {
die('Not connected : ' . mysql_error());
}

ولی ارور
Not connected : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
را میده
در ضمن davod پسوردی هست که در برنامه MySQL Command Line Client برای ورود میدم.وبا یک برنامه دیگه که برای مدیریت پایگاه داده mysql ساخته شده با این مشخصات کانکت میشم
host name/ip address:localhost
port:3306
username:root
password:davod
و برنامه با موفقیت به پایگاه داده متصل میشه
میشه مشکل کار رو واسم بگین این برنامه ای رو که هم گفته بودین نصب کردم

xman_dj
پنج شنبه 26 فروردین 1389, 20:27 عصر
کسی نیست به سوال ما جواب بده؟

funpatogh
پنج شنبه 26 فروردین 1389, 23:42 عصر
phpinfo() بگیر ببین extension mysql وجود داره یا نه

xman_dj
یک شنبه 29 فروردین 1389, 21:10 عصر
phpinfo() بگیر ببین extension mysql وجود داره یا نه




mysql

MySQL Supportenabled Active Persistent Links 0 Active Links 0 Client API version mysqlnd 5.0.5-dev - 081106 - $Revision: 289630 $ Persistent cacheenabled put_hits 0 put_misses 0 get_hits 0 get_misses 0 size 2000 free_items 2000 references 2
DirectiveLocal ValueMaster Value mysql.allow_local_infileOnOn mysql.allow_persistentOnOn mysql.cache_size20002000 mysql.connect_timeout6060 mysql.default_hostno valueno value mysql.default_passwordno valueno value mysql.default_portno valueno value mysql.default_socketno valueno value mysql.default_userno valueno value mysql.max_linksUnlimitedUnlimited mysql.max_persistentUnlimitedUnlimited mysql.trace_modeOffOff
mysqli

MysqlI Supportenabled Client API library version mysqlnd 5.0.5-dev - 081106 - $Revision: 289630 $ Active Persistent Links 0 Inactive Persistent Links 0 Active Links 0 Persistent cacheenabled put_hits 0 put_misses 0 get_hits 0 get_misses 0 size 2000 free_items 2000 references 2
DirectiveLocal ValueMaster Value mysqli.allow_local_infileOnOn mysqli.allow_persistentOnOn mysqli.cache_size20002000 mysqli.default_hostno valueno value mysqli.default_port33063306 mysqli.default_pwno valueno value mysqli.default_socketno valueno value mysqli.default_userno valueno value mysqli.max_linksUnlimitedUnlimited mysqli.max_persistentUnlimitedUnlimited mysqli.reconnectOffOff
mysqlnd

mysqlndenabled Version mysqlnd 5.0.5-dev - 081106 - $Revision: 289630 $ Command buffer size 4096 Read buffer size 32768 Read timeout 31536000 Collecting statistics Yes Collecting memory statistics No
Client statistics
bytes_sent 0 bytes_received 0 packets_sent 0 packets_received 0 protocol_overhead_in 0 protocol_overhead_out 0 bytes_received_ok_packet 0 bytes_received_eof_packet 0 bytes_received_rset_header_packet 0 bytes_received_rset_field_meta_packet 0 bytes_received_rset_row_packet 0 bytes_received_prepare_response_packet 0 bytes_received_change_user_packet 0 packets_sent_command 0 packets_received_ok 0 packets_received_eof 0 packets_received_rset_header 0 packets_received_rset_field_meta 0 packets_received_rset_row 0 packets_received_prepare_response 0 packets_received_change_user 0 result_set_queries 0 non_result_set_queries 0 no_index_used 0 bad_index_used 0 slow_queries 0 buffered_sets 0 unbuffered_sets 0 ps_buffered_sets 0 ps_unbuffered_sets 0 flushed_normal_sets 0 flushed_ps_sets 0 ps_prepared_never_executed 0 ps_prepared_once_executed 0 rows_fetched_from_server_normal 0 rows_fetched_from_server_ps 0 rows_buffered_from_client_normal 0 rows_buffered_from_client_ps 0 rows_fetched_from_client_normal_buffered 0 rows_fetched_from_client_normal_unbuffered 0 rows_fetched_from_client_ps_buffered 0 rows_fetched_from_client_ps_unbuffered 0 rows_fetched_from_client_ps_cursor 0 rows_skipped_normal 0 rows_skipped_ps 0 copy_on_write_saved 0 copy_on_write_performed 0 command_buffer_too_small 0 connect_success 0 connect_failure 0 connection_reused 0 reconnect 0 pconnect_success 0 active_connections 0 active_persistent_connections 0 explicit_close 0 implicit_close 0 disconnect_close 0 in_middle_of_command_close 0 explicit_free_result 0 implicit_free_result 0 explicit_stmt_close 0 implicit_stmt_close 0 mem_emalloc_count 0 mem_emalloc_ammount 0 mem_ecalloc_count 0 mem_ecalloc_ammount 0 mem_erealloc_count 0 mem_erealloc_ammount 0 mem_efree_count 0 mem_malloc_count 0 mem_malloc_ammount 0 mem_calloc_count 0 mem_calloc_ammount 0 mem_realloc_count 0 mem_realloc_ammount 0 mem_free_count 0 proto_text_fetched_null 0 proto_text_fetched_bit 0 proto_text_fetched_tinyint 0 proto_text_fetched_short 0 proto_text_fetched_int24 0 proto_text_fetched_int 0 proto_text_fetched_bigint 0 proto_text_fetched_decimal 0 proto_text_fetched_float 0 proto_text_fetched_double 0 proto_text_fetched_date 0 proto_text_fetched_year 0 proto_text_fetched_time 0 proto_text_fetched_datetime 0 proto_text_fetched_timestamp 0 proto_text_fetched_string 0 proto_text_fetched_blob 0 proto_text_fetched_enum 0 proto_text_fetched_set 0 proto_text_fetched_geometry 0 proto_text_fetched_other 0 proto_binary_fetched_null 0 proto_binary_fetched_bit 0 proto_binary_fetched_tinyint 0 proto_binary_fetched_short 0 proto_binary_fetched_int24 0 proto_binary_fetched_int 0 proto_binary_fetched_bigint 0 proto_binary_fetched_decimal 0 proto_binary_fetched_float 0 proto_binary_fetched_double 0 proto_binary_fetched_date 0 proto_binary_fetched_year 0 proto_binary_fetched_time 0 proto_binary_fetched_datetime 0 proto_binary_fetched_timestamp 0 proto_binary_fetched_string 0 proto_binary_fetched_blob 0 proto_binary_fetched_enum 0 proto_binary_fetched_set 0 proto_binary_fetched_geometry 0 proto_binary_fetched_other 0 init_command_executed_count 0 init_command_failed_count 0
اینم اطلاعات php info درباره my sql
ولی خودم فکر میکنم پی اچ پی مشکلی نداره مشکل از my sql هست .
my sql تنظیماتی برای ارتباط با پی اچ پی داره بازم شما دوستان بهتر از ما میدونید لطفا راهنمایی کنید.

saeid99
دوشنبه 30 فروردین 1389, 11:28 صبح
منم همین مشکلو داشتم به جای server name از localhost استفاده نکن به جاش 127.0.0.1 رو بزار..
http://php.net/manual/en/function.mysql-connect.php

xman_dj
دوشنبه 30 فروردین 1389, 16:01 عصر
ممنون از شما دوست عزیز مشکل ما حل شد قربون دستت