Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-06-2002, 07:45 PM
kpyew's Avatar
Senior Webmaster
 
Join Date: Jul 2001
Location: KL, Malaysia
Posts: 277
Rep Power: 95
kpyew is on a distinguished road
Send a message via ICQ to kpyew
Sockets problem!

I switched to a newer version of php because the older version doesn't support Sockets. This new version comes
with the php_sockets.dll extention. I uncommented the line extention=php_sockets.dll in php.ini but when I tried to
create a socket, I get a Windows popup error message that says "Php has caused an error in MSVCRT.DLL. Php will
now close. If you continue to experience problems, try restarting your computer". No doubt I have restarted my computer
several times :-\


Php version: 4.2.1
System: Windows ME
Build Date: May 12 2002
Server APO: CGI
Sockets Support: enabled

I would appreciate any hints offered. Thanks in advance.
__________________
webmaster @ http://kongtechnology.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-06-2002, 11:00 PM
kpyew's Avatar
Senior Webmaster
 
Join Date: Jul 2001
Location: KL, Malaysia
Posts: 277
Rep Power: 95
kpyew is on a distinguished road
Send a message via ICQ to kpyew
Yeah, I think I know what is the cause :-)
Looks like getservbyname somehow failed to get the port of the service as in getservbyname('www', 'tcp'), and thus a subsequent call to socket_create will cause the above-mentioned error. The solution is simply to set the port to a default value based on an "if" such as:

if($port == "") $port=80;
__________________
webmaster @ http://kongtechnology.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-06-2002, 08:05 AM
Senior Webmaster
 
Join Date: Jul 2001
Location: OCed
Posts: 252
Rep Power: 95
malayneum is on a distinguished road
it's looks like i can't help anything sorry kpyew ... and its also look like your question are answered by yourself ... thank you cause revealed the problem and solutions ... now i know that before i try
__________________
I can't affod to have a signature here, can somebody sponsor me a signature ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with new pc wirfash Mamak Stall 2 07-12-2005 11:39 AM
ISP problem lately? Hunz Mamak Stall 2 05-12-2004 04:08 PM
Any way to get around this problem philin Revenue and Monetization 18 09-10-2004 11:56 PM
jsp problem la dyda Website Programming 12 21-02-2004 09:32 AM
IIS problem kasih Website Programming 1 01-10-2002 11:56 AM



All times are GMT +8. The time now is 08:23 PM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60