Jump to content

SSH2 not loading - The operating system cannot run %1.\r\n in Unknown on line 0


Recommended Posts

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

 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

  • 1 month later...

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.