niwa3836 Posted December 3, 2007 Share Posted December 3, 2007 Help Please! Saw that someone has asked this question before, but did not get an answer, not sure if that means it was never sorted, or was such an obvious fix that the author couldnt bare to reply! I want to start doing some ssh2 from my php scripts. Followed the instructions from php.net, i.e. got the PECL zip's, unzipped to c:\php5\exts then added to php.ini: - extension_dir=c:/php5/exts/ extension=php_ssh2.dll then restarted apache (and the server to be sure on the next attempts!) ...Code 500! aaaarrrggghhhh Log file below, any ideas please????? [Mon Dec 03 20:07:47 2007] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? PHP Warning: PHP Startup: Unable to load dynamic library 'c:/php5/exts/php_ssh2.dll' - The operating system cannot run %1.\r\n in Unknown on line 0 [Mon Dec 03 20:07:49 2007] [notice] Apache/2.2.4 (Win32) PHP/5.2.4 configured -- resuming normal operations [Mon Dec 03 20:07:49 2007] [notice] Server built: Jan 9 2007 23:17:20 [Mon Dec 03 20:07:49 2007] [notice] Parent: Created child process 1072 PHP Warning: PHP Startup: Unable to load dynamic library 'c:/php5/exts/php_ssh2.dll' - The operating system cannot run %1.\r\n in Unknown on line 0 [Mon Dec 03 20:07:49 2007] [notice] Child 1072: Child process is running [Mon Dec 03 20:07:49 2007] [notice] Child 1072: Acquired the start mutex. [Mon Dec 03 20:07:49 2007] [notice] Child 1072: Starting 250 worker threads. [Mon Dec 03 20:07:49 2007] [notice] Child 1072: Starting thread to listen on port 80. [Mon Dec 03 20:11:09 2007] [error] [client 172.30.1.78] PHP Fatal error: Call to undefined function ssh2_connect() in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\ssh.php on line 3 [Mon Dec 03 20:19:12 2007] [error] [client 172.30.1.78] PHP Fatal error: Call to undefined function ssh2_connect() in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\ssh.php on line 3 Quote Link to comment Share on other sites More sharing options...
niwa3836 Posted December 6, 2007 Author Share Posted December 6, 2007 Hum, Just a quick note to say that I am still pulling my hair out on this one. I have read lots of stuff about SSH/SSL from google on this error message but nothing really points to actually what is wrong. Some talk about SSL not being installed, have done that and tried copied the dll's into loads of places, messed around with the PHP.ini file too but nothing seems to work. Someone must know whats going on! Help! Quote Link to comment Share on other sites More sharing options...
miseleigh Posted January 16, 2008 Share Posted January 16, 2008 I'm not sure if you've solved this problem yet or not, but I've run into the same issue, so if/when I figure parts out, I'll post here. First thing to do is the two parts you've already done, then also check that the extension directory is in the windows system path. If it's not, add it and reboot. (Or, instead, putting the .dll in the windows/system32 folder often works as a quick hack, but it's not the best solution.) In XP you can get there by Control Panel->System->Advanced->Environment Variables. In your case make sure that c:/php5/exts/ is in the path. If you're not using Windows I don't know where the system path can be edited but I'm sure it's similar. Quote Link to comment Share on other sites More sharing options...
miseleigh Posted January 16, 2008 Share Posted January 16, 2008 If that doesn't work (as it didn't for me) try running Dependency Walker to see if you're missing any files the module depends on. It's turned up a couple for me, so now I get to go find those too... php5ts.dll and dwmapi.dll. Quote Link to comment Share on other sites More sharing options...
miseleigh Posted January 17, 2008 Share Posted January 17, 2008 Alright, so those .dlls weren't my problem. Instead the problem was simply that Apache was running an older version of libeay32.dll than Windows was, so get a new copy of that one and put it in Apach/bin. Quote Link to comment Share on other sites More sharing options...
niwa3836 Posted March 9, 2008 Author Share Posted March 9, 2008 Ok, got this working eventually, not sure what the root problem was, however in case someone else is stuck: - When you install PHP5.2.5 make sure you install to c:\php then there is no issue with spaces in the file name Then when installing php select openssl and ssh together. Obviously a reboot afterwards! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.