php-general Digest 19 Jul 2013 14:09:45 -0000 Issue 8302
Topics (messages 321646 through 321650):
Re: I am completely lost and need an advice (beginner)
321646 by: Tamara Temple
Re: pass parameter from client to server
321647 by: Tamara Temple
Re: PHP and Powershell
321648 by: Serge Fonville
PHP 5.5.1 is now available
321649 by: Julien Pauli
Re: zend framework & getIdentity
321650 by: Dan Joseph
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
On Jul 18, 2013, at 12:28 PM, Daniel Brown <danbr...@php.net> wrote:
> On Thu, Jul 18, 2013 at 3:08 PM, php colos <phpco...@gmail.com> wrote:
>> Hello world!
>>
>> I'm trying to learn PHP ( first programming language that I learn) and
>> I feel kinda lost. I've read PHP programming 3rd edition( O'reilly),
>> 'getting good with PHP' by Andrew Burgees and some tutorials on the
>> internet but can't code something more complex than 'hello world'.
>>
>>
>> I do understand functions/values/operators/control structures, etc but
>> as I said, I feel that I can't use the language.
>> Am I reading the wrong books for a beginner?
>>
>> Any advices?
>>
>>
>>
>> *Apologies if this email might seem confusing. :)
>
> Perhaps I'm biased, but I think other folks will agree --- the
> official documentation is your best source of learning second only to
> your own experiences with the language. Check through the user notes
> as well, as they often provide very valuable insight and other
> developers' personal experiences.
>
> --
I completely agree with Daniel that the online PHP documentation is the best
way to understand the language. However, It seems our OP does not understand
how to program. The php docs don't help with that.
If you really don't understand what programming is useful for, perhaps this is
the wrong thing to be learning.
That said, what programming is for is to solve problems, provide tools, and
provide means for people to communicate with each other and get work done via
the computer and the internet. So, key, #1 thing: have a problem to solve.
While saying you understand various aspects of the language, I would say you
cannot understand them until you actually put them to use, break things, learn
how to fix them, and finally, teach someone else how to use them.
Almost every text, learning site, and documentation discusses how to write a
program or application in the language or using the framework. Very, very few
teach the essence of solving problems. Even the classics, such as Knuth's,
Djyktra's, Wurth's, and so on, describe ways to solve particular problems.
Patterns books describe how to structure solutions, but not actually how to
solve problems in a general sense.
--- End Message ---
--- Begin Message ---
On Jul 18, 2013, at 6:53 PM, Joshua Kehn <j...@kehn.us> wrote:
> Could also use jquery instead
True, but it's good to see the bare javascript as well in a demo.
>
> Best,
>
> -Josh
> ___________________________
> http://byjakt.com
> Currently mobile
>
> On Jul 19, 2013, at 4:08, Tedd Sperling <t...@sperling.com> wrote:
>
>>
>> One additional comment.
>>
>> Please change the javascript onclick to onchange -- that way the demo will
>> work for Chrome as well as other Browsers.
>>
>> Cheers,
>>
>> tedd
>>
>> _____________________
>> t...@sperling.com
>> http://sperling.com
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hi,
Although this is more powershell related than PHP...
When Powershell returns an object, you can pipe the output through
Select-Object to get only certain object properties.
To better answer your question:
First, why do you specify ComputerName as 127.0.0.1 if the credential is
already specified?
Also, perhaps it is easier to create a .ps1 file that you run, especially
for readability.
HTH
Wh
Kind regards/met vriendelijke groet,
Serge Fonville
http://www.sergefonville.nl
Convince Microsoft!
They need to add TRUNCATE PARTITION in SQL Server
https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table
2013/7/18 Alan Loos <alan.l...@genco.com>
> Good morning everyone,
> First time posting in here, although I've been listening in for a few
> weeks now.
> So this one has got me stumped, I am fairly new to PHP but I cannot seem
> to Google through this one.
> I cannot figure out how to 'exclude' PSComputerName and RunspaceId, which
> is ultimately what I'm struggling with. Please see below for script snips
> and explanations.
>
> Also if there are any best practices you would recommend I'm open to it
> being that I am fairly new and self-taught to PHP scripting.
>
>
> I have a bit of code I've put together (as ugly as it is) as follows in
> line:
> <?php
>
>
> ###############
> ## Variables ##
> ###############
>
> $TargetName = "Target1";
> $login = "\$cred = New-Object System.Management.Automation.PSCredential
> -ArgumentList @('administra...@widget.com',(ConvertTo-SecureString
> -String 'MyPassword' -AsPlainText -Force))";
> $command = "Invoke-Command -computername 127.0.0.1 -credential \$cred
> -scriptblock {& Get-IscsiServerTarget -TargetName " . $TargetName . " | % {
> \$_.TargetIqn, \$_.Status}} -SessionOption (New-PSSessionOption
> -SkipCACheck -SkipCNCheck -SkipRevocationCheck)";
> $psCMD = "powershell -ExecutionPolicy Unrestricted -command \"$login;
> $command\" <NUL";
>
>
> ########################################
> ## Variable Checking (For Debug Mode) ##
> ########################################
>
> #echo "\$psCMD = $psCMD";
>
>
> ################
> ## Run Script ##
> ################
>
> exec($psCMD,$out);
>
>
> ############
> ## Output ##
> ############
>
> echo ('<pre>');
> print_r($out);
> echo ('</pre>');
>
>
> ###################
> ## End Of Script ##
> ###################
>
> echo "End Of Scene";
>
> ?>
>
> The issue I have is that it feeds back:
>
> Array
> (
> [0] => iqn.2013-04.com.widget:Target1
> [1] =>
> [2] => PSComputerName RunspaceId Value
> [3] => -------------- ---------- -----
> [4] => 127.0.0.1 52fb8b1b-8d8b-4eec-9419...
> NotConnected
> [5] =>
> [6] =>
> )
>
> End Of Scene
>
> What I should see so I can then turn it into variables is what I run when
> I run the command straight through the local Powershell command prompt
> which would return:
> PS C:\Users\administrator.WIDGET.000> Get-IscsiServerTarget | % {
> $_.TargetIqn, $_.Status}
> iqn.2013-04.com.widget:Target1
> NotConnected
> iqn.2013-04.com.widget:Target2
> NotConnected
> iqn.2013-04.com.widget:Target3
> NotConnected
> iqn.2013-04.com.widget:Target4
> Connected
> iqn.2013-04.com.widget:Target5
> NotConnected
> iqn.2013-04.com.widget:Target6
> NotConnected
>
> I cannot figure out how to 'exclude' PSComputerName and RunspaceId
>
> Sorry in advance for the wordy explanation.
>
> Cheers!
>
> Alan
>
>
> Please make note of my new email address: alan.l...@genco.com.
>
> CONFIDENTIALITY NOTICE: This e-mail and the attachment(s) hereto (if any)
> contain confidential information that is privileged and intended only for
> the addressee(s) hereof. If you are not an intended recipient, you are
> hereby notified that any disclosure, copying, distribution or use of this
> e-mail and/or the accompanying attachment(s) is strictly prohibited. If you
> have received this e-mail in error, please immediately notify the sender by
> return e-mail.
>
--- End Message ---
--- Begin Message ---
Hello,
The PHP Development team would like to inform you the immediate
availability of PHP 5.5.1. All users are encouraged to upgrade their
version.
This release includes bug fixes as well as a security fix (Bug #65236).
For changes in PHP 5.5.1, please consult the PHP 5 ChangeLog.
Release Announcement:
http://www.php.net/release_5_5_1.php<http://www.php.net/release_5_5_0.php>
Downloads: http://www.php.net/downloads.php#v5.5
Changelog:
http://www.php.net/ChangeLog-5.php#5.5.<http://www.php.net/ChangeLog-5.php#5.5.0>
1
regards,
Julien Pauli & David Soria Parra
--- End Message ---
--- Begin Message ---
On Wed, Jul 17, 2013 at 5:54 PM, Dan Joseph <dmjos...@gmail.com> wrote:
> Fatal error: Uncaught exception 'Zend_Session_Exception' with message
> 'Zend_Session::start() -
> /product/Messenger-dev/Messenger/library/Zend/Session.php(Line:480): Error
> #2 Class __PHP_Incomplete_Class has no unserializer Array' in
> /product/Messenger-dev/Messenger/library/Zend/Session.php:493
>
I see I've stumped everyone here, so I wanted to post a reply on what I
found is the root cause of this.
Somewhere in all the code, there's a session_start happening. Then
elsewhere that our other developer is working, there was another
introduced. This appears to be the trigger for this error.
Hope this helps someone in the future!
--
-Dan Joseph
http://www.danjoseph.me
http://www.dansrollingbbq.com
http://www.youtube.com/DansRollingBBQ
--- End Message ---