collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: PHP on linux  (Read 5235 times)

0 Members and 1 Guest are viewing this topic.

Offline Sojourner

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
    • http://majestic.webhop.net
PHP on linux
« on: August 27, 2005, 07:35:38 pm »
Running on Ubuntu (Linux, Debian)

I installed php5.0 using "apt-get"  (php5, php5-common, php5-cli)

In start.php I have this configured:
$php_bin = "/usr/bin/php";

When I try to run start.php, I get this message
AOChat class needs the Sockets extension to work.


When I look at the php.net pages, it seems to indicate that Socket Functions can only be installed at the same time you install PHP.

Am I missing something here?

Offline Derroylo

  • Contributor
  • *******
  • Posts: 43
  • Karma: +0/-0
PHP on linux
« Reply #1 on: August 27, 2005, 07:52:05 pm »
Check if your php.ini contains the following line:
extension=php_sockets.dll

and that the file is in the folder from your bot.
Derroylo 220/23 NT RK2

Offline Sojourner

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
    • http://majestic.webhop.net
PHP on linux
« Reply #2 on: August 27, 2005, 08:28:20 pm »
Thought that was for windows only?  Especially the .dll

When php was installed on this box, the php.ini file was placed in
/etc/php5.0/cli


Hmm, digging throught that php.ini file, I do see a directory extension variable, but its commented out
; Directory in which the loadable extensions (modules) reside.
;extension_dir = "/usr/local/lib/php5.0/20041030:/usr/local/lib/php5/20041030:/usr/local/lib/php:/usr/lib/php5.0/20041030:/usr/lib/php5/20041030"


And, a reference to dynamic extensions, just using .so instead of .dll
; If you wish to have an extension loaded automatically, use the following
; syntax:
;   extension=modulename.extension
;
; For example, on Windows:
;
;   extension=msql.dll
;
; ... or under UNIX:
;
;   extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here.  Specify the location of the extension with the
; extension_dir directive above.


But, I can't seem to find any "php_sockets.so" file anywhere

Offline Blondengy

  • BeBot Creator and Founder
  • BeBot Hero
  • ******
  • Posts: 51
  • Karma: +0/-0
PHP on linux
« Reply #3 on: August 27, 2005, 11:01:11 pm »
Yes, you'll have to install a binary with the sockets extension compiled into it.
But I'm quite supprised that its not compiled into the ubuntu binary.... very supprised indeed! Gonna check that out right now...

*edit* what package-source did you download them from? Got a box running ubuntu here but didn't find php5.0-cli in any of the package-sources I'm using. Only as an apache module and php4 (version: "PHP 4.3.10-10ubuntu4.1 (cli) (built: Aug 19 2005 17:58:15)") worked fine with bebot.... Thats definatly got sockets working...

Offline Sojourner

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
    • http://majestic.webhop.net
PHP on linux
« Reply #4 on: August 28, 2005, 12:07:26 am »
Had some problems with php4 working with mysql so I used this link to upgrade to php5

http://www.ubuntuforums.org/showthread.php?t=44082&highlight=php5


Maybe should go back to php4 and then work out the issues with mysql


** Went back to php4 (PHP 4.3.10-10ubuntu4.1 (cli))  The error I get of that version is:
Fatal error: Call to undefined function:  mysql_connect() in /home/majwebadmin/bebot/MySQL.php on line 36

Offline Sojourner

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
    • http://majestic.webhop.net
PHP on linux
« Reply #5 on: August 28, 2005, 12:59:17 am »
Ahh, found it!  thanks for the help.  

needed to install php4-mysql

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 437
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal