|
I was hoping someone could enlighten me on a PHP/SSL problem I am experiencing. I have narrowed this down to one very simple PHP command that works through firefox, but fails via the php cli. Esentially, I can't load any url that starts with https: / # cat t.php <? echo "HTTPS:\n".file_get_contents('https://www.google.co.uk/ig?hl=en'); ?> / # Simple command to go get a web page. If I load it through firefox, I get the google webpage. If I go to a command line and run 'php t.php' I get: Warning: file_get_contents(): SSL: No such file or directory in t.php on line 2 Warning: file_get_contents(): Failed to enable crypto in t.php on line 2 Warning: file_get_contents(https://www.google.co.uk/ig?hl=en): failed to open stream: Invalid argument in t.php on line 2 If I change it to http: it loads just fine on the command-line and via firefox. I'm assuming I've either compiled PHP incorrectly and/or I am missing something glaringly obvious. My searches through google haven't been successful, but I think that's mainly due to my inexperience with PHP; I've only been working with this for a couple weeks. I don't really know what to search google for beyond the error code s themselves. I am Running HP/UX 11.11 with php 5.2.5 and apache 2.0.58. / # uname -a HP-UX bob B.11.11 U 9000/800 2002324811 unlimited-user license /# php -v PHP 5.2.5 (cli) (built: Feb 27 2008 13:58:33) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
|
# ¿ Mar 4, 2008 23:37 |
|
|
# ¿ May 4, 2024 19:13 |
|
bitprophet posted:Yea, you probably managed to compile the CLI version of PHP without SSL support, but mod_php (which is often a separate package in package managers) with. I don't remember if phpinfo() gives meaningful output when run via CLI, but if it does, that should make it explicit - it would list the build args and all the modules it's got set up. I run php -m from the command line and I get: / # p -m [PHP Modules] ctype ... openssl ... [Zend Modules] / # That leads me to believe I have openssl compiled properly, I think. Since the apache/php combo works, perhaps Apache loads some kind of environment variable that I do not have set at the shell. "SSL: No such file or directory" is so incredibly non-descriptive, I have no clue what to look for. I wish I could print more detailed error message about what it is expecting.
|
# ¿ Mar 5, 2008 20:53 |
|
I assume this would be the place for a UNIX sort question? Maybe the linux thread? - except I'm running on HP/UX and the sort is different. Anyway: I'm trying to get UNIX to sort a field numerically, then alpha and I can't come up with a graceful way to do it: code:
code:
I feel like I'm missing something stupid (I usually am); and my natural instinct is to develop a inanely complex solution. I want to ignore that urge and actually find a proper solution. The file isn't just that above, but it's a series of grouped data points that are all perfectly sorted, except the ONS's need to move down to the bottom of each subset. I feel like awk might do it, but every time I man awk I feel like kicking myself in the junk
|
# ¿ May 13, 2011 06:05 |