Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy. This forum is not for asking programming related questions.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\HP_Administrator>php
'php' is not recognized as an internal or external command,
operable program or batch file.
C:\Documents and Settings\HP_Administrator>cd C:\php
C:\php>php -r 'echo "hi";'
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'libeay32.
ll' in Unknown on line 0
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'ssleay32.
ll' in Unknown on line 0
PHP Parse error: syntax error, unexpected $end in Command line code on line 1
Parse error: syntax error, unexpected $end in Command line code on line 1
C:\php>
As you can see, I'm having quite a bit of problems with php command line on windows I could do it fine on my unix OS.
#1.. On unix, it doesn't matter what directory I'm in. I can just type "php - r 'some code'" and php will execute it. Can I do this on windows?
#2.. What's up with those PHP Warnings? =/ And how is there a syntax error in the simple echo "hi";?
Sorry if it seems stupid
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
C:\Documents and Settings\HP_Administrator>php -r 'echo "hi";'
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'libeay32.d
ll' in Unknown on line 0
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'ssleay32.d
ll' in Unknown on line 0
PHP Parse error: syntax error, unexpected $end in Command line code on line 1
Parse error: syntax error, unexpected $end in Command line code on line 1
C:\Documents and Settings\HP_Administrator>
I think the warnings are due to some files being in the wrong place. Is the parsing error attributed to that?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
If this is PHP 4, you'll need to use php-cli.exe not php.exe. You may need to move your ini to a better location.. although I've never needed it to be anywhere outside of php's own directory.
From googling, I think those are curl libraries. I remember when i set up apache/php/mysql I had no clue what I was doing. So I have copies of my files everywhere. I'm going to do a fresh install on all of them.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
C:\Documents and Settings\HP_Administrator>php -r 'print_r(array(1,2,3));'
PHP Parse error: parse error, unexpected $end in Command line code on line 1
Parse error: parse error, unexpected $end in Command line code on line 1
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
feyd...
i took a look at the manual on http://www.php.net/manual/en/install.windows.manual.php...
isnt it the other way around?
like.. php4.exe on php4 and php-cli.exe on php5.
correct me if i am wrong... i never used php cli
pedrotuga wrote:feyd...
i took a look at the manual on http://www.php.net/manual/en/install.windows.manual.php...
isnt it the other way around?
like.. php4.exe on php4 and php-cli.exe on php5.
correct me if i am wrong... i never used php cli
In more recent version, I believe I am correct. I can't recall exactly how it was laid out. If you really want to check, you can download the various archives.
Despite the good advice above I got tired of trying to type multiline php code into a dos window, so I found this nice utility, its like a scratch pad, write some lines of php, press update, show raw or html in a second window.