Re: [PHP] PHP and curl

2013-09-26 Thread Shawn McKenzie
Unfortunately this isn't anything to do with PHP.  I don't have any info on
the app, what it's supposed to return or what the parameter passed should
be.  The PHP soap call is working, but the app isn't returning what you
want or expect I guess.


On Thu, Sep 26, 2013 at 8:36 AM, Alf Stockton  wrote:

>  Shawn, that was silly of me. I have now removed the echo but I still do
> not get the expected result from the server.
> var_dump of $result returns:-
>
> object(stdClass)#2 (1) {
>   ["GetSequenceNoResult"]=>
>   object(stdClass)#3 (6) {
> ["iServerNo"]=>
> int(0)
> ["iClientNo"]=>
> int(0)
> ["bNoLimitDownload"]=>
> bool(false)
> ["dtStartDate"]=>
> string(19) "0001-01-01T00:00:00"
> ["dtEndDate"]=>
> string(19) "0001-01-01T00:00:00"
> ["dtServerTime"]=>
> string(19) "0001-01-01T00:00:00"
>   }
> }
>
> whereas the expected result is to have each of those fields containing
> data.
> My code now looks like
>
>  $strTerminalname = "CIS";
> $version = "1.2";
> $client = new SoapClient(
> "http://192.168.0.10/CISWebService/Mediamanager.asmx?WSDL";
> );
> $result = $client->GetSequenceNo($strTerminalname);
> print_r($result);
> var_dump($result);
> ?>
>
>
> On 25/09/13 17:23, Shawn McKenzie wrote:
>
> $result = $client->GetSequenceNo( "CIS" ); shouldn't be throwing that
> error.  Maybe you are trying to do something with $result afterwards?  Try
> var_dump($result);
>
>
> On Wed, Sep 25, 2013 at 10:12 AM, Alf Stockton  wrote:
>
>>
>> On 25/09/13 16:52, Shawn McKenzie wrote:
>>
>> $client->GetSequenceNo( $parameters );
>>
>> That unfortunately returns
>>
>> alf@alf-ThinkPad-T500:~/Development/PHP/DevIt$ php
>> php-soap-web-service.php > test.txt
>> PHP Catchable fatal error:  Object of class stdClass could not be
>> converted to string in
>> /home/alf/Development/PHP/DevIt/php-soap-web-service.php on line 7
>>
>> No matter if I use
>> $result = $client->GetSequenceNo( "CIS" );
>> or
>> $result = $client->GetSequenceNo($strTerminalname);
>>
>>
>>
>>
>> --
>>
>> Regards,
>> Alf Stockton  www.stockton.co.za
>>
>>
>
>
>  --
>  --
> Thanks!
> -Shawn
> --
>
>
> --
>
> Regards,
> Alf Stockton  www.stockton.co.za
>
>


-- 
Thanks!
-Shawn


Re: [PHP] PHP and curl

2013-09-25 Thread Shawn McKenzie
Keep on list.

$result = $client->GetSequenceNo( "CIS" ); shouldn't be throwing that
error.  Maybe you are trying to do something with $result afterwards?  Try
var_dump($result);


On Wed, Sep 25, 2013 at 10:12 AM, Alf Stockton  wrote:

>
> On 25/09/13 16:52, Shawn McKenzie wrote:
>
> $client->GetSequenceNo( $parameters );
>
> That unfortunately returns
>
> alf@alf-ThinkPad-T500:~/Development/PHP/DevIt$ php
> php-soap-web-service.php > test.txt
> PHP Catchable fatal error:  Object of class stdClass could not be
> converted to string in
> /home/alf/Development/PHP/DevIt/php-soap-web-service.php on line 7
>
> No matter if I use
> $result = $client->GetSequenceNo( "CIS" );
> or
> $result = $client->GetSequenceNo($strTerminalname);
>
>
>
>
> --
>
> Regards,
> Alf Stockton  www.stockton.co.za
>
>


-- 
--
Thanks!
-Shawn
--


Re: [PHP] PHP and curl

2013-09-25 Thread Shawn McKenzie
SOAP functions can be called as methods of the SoapClient object.  Maybe:

$client->GetSequenceNo( $parameters );

-Shawn


On Wed, Sep 25, 2013 at 9:17 AM, Alf Stockton  wrote:

> In an attempt to interface with a webservice on a Windows 7 server I have
> started writing the following:-
> [code]
>  $strTerminalname = "CIS";
> $version = "1.2";
> $client = new SoapClient("http://192.168.0.**
> 10/CISWebService/Mediamanager.**asmx?WSDL
> ");
> var_dump($client->__**getFunctions());
> $result = 
> $client->__doRequest("**GetSequenceNo",$**strTerminalname,$version,
> $one_way = 0);
> ?>
> [/code]
> and I execute it via
> php php-soap-web-service.php > test.txt
> on my Ubuntu 13.04 laptop using php version Zend Engine v2.4.0
> in return I get
> array(20) {
>   [0]=>
>   string(59) "GetMediaListResponse GetMediaList(GetMediaList $parameters)"
>   [1]=>
>   string(68) "GetMediaListAllResponse GetMediaListAll(**GetMediaListAll
> $parameters)"
>   [2]=>
>   string(59) "GetSoundListResponse GetSoundList(GetSoundList $parameters)"
>   [3]=>
>   string(77) "GetTerminalDataXMLResponse 
> GetTerminalDataXML(**GetTerminalDataXML
> $parameters)"
>   [4]=>
>   string(59) "GetRouterXmlResponse GetRouterXml(GetRouterXml $parameters)"
>   [5]=>
>   string(80) "GetTerminalSoundXMLResponse 
> GetTerminalSoundXML(**GetTerminalSoundXML
> $parameters)"
>   [6]=>
>   string(62) "SetSequenceNoResponse SetSequenceNo(SetSequenceNo
> $parameters)"
>   [7]=>
>   string(50) "GetConfigResponse GetConfig(GetConfig $parameters)"
>   [8]=>
>   string(62) "GetSequenceNoResponse GetSequenceNo(GetSequenceNo
> $parameters)"
>   [9]=>
>   string(95) "**UpdateClientMediaLogTimeRespon**se
> UpdateClientMediaLogTime(**UpdateClientMediaLogTime $parameters)"
>   [10]=>
>   string(59) "GetMediaListResponse GetMediaList(GetMediaList $parameters)"
>   [11]=>
>   string(68) "GetMediaListAllResponse GetMediaListAll(**GetMediaListAll
> $parameters)"
>   [12]=>
>   string(59) "GetSoundListResponse GetSoundList(GetSoundList $parameters)"
>   [13]=>
>   string(77) "GetTerminalDataXMLResponse 
> GetTerminalDataXML(**GetTerminalDataXML
> $parameters)"
>   [14]=>
>   string(59) "GetRouterXmlResponse GetRouterXml(GetRouterXml $parameters)"
>   [15]=>
>   string(80) "GetTerminalSoundXMLResponse 
> GetTerminalSoundXML(**GetTerminalSoundXML
> $parameters)"
>   [16]=>
>   string(62) "SetSequenceNoResponse SetSequenceNo(SetSequenceNo
> $parameters)"
>   [17]=>
>   string(50) "GetConfigResponse GetConfig(GetConfig $parameters)"
>   [18]=>
>   string(62) "GetSequenceNoResponse GetSequenceNo(GetSequenceNo
> $parameters)"
>   [19]=>
>   string(95) "**UpdateClientMediaLogTimeRespon**se
> UpdateClientMediaLogTime(**UpdateClientMediaLogTime $parameters)"
> }
>
> now this is all great but my question is how do I call each of these
> functions with parameters.
> The call I immediately need to make is to GetSequenceNo() which requires a
> parameter of "CIS" in my current configuration.
> How do I do this ? Obviously $client->__doRequest is not the way to go.
>
> --
>
> Regards,
> Alf Stockton  www.stockton.co.za
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[PHP] PHP and curl

2013-09-25 Thread Alf Stockton
In an attempt to interface with a webservice on a Windows 7 server I 
have started writing the following:-

[code]
$client = new 
SoapClient("http://192.168.0.10/CISWebService/Mediamanager.asmx?WSDL";);

var_dump($client->__getFunctions());
$result = 
$client->__doRequest("GetSequenceNo",$strTerminalname,$version, $one_way 
= 0);

?>
[/code]
and I execute it via
php php-soap-web-service.php > test.txt
on my Ubuntu 13.04 laptop using php version Zend Engine v2.4.0
in return I get
array(20) {
  [0]=>
  string(59) "GetMediaListResponse GetMediaList(GetMediaList $parameters)"
  [1]=>
  string(68) "GetMediaListAllResponse GetMediaListAll(GetMediaListAll 
$parameters)"

  [2]=>
  string(59) "GetSoundListResponse GetSoundList(GetSoundList $parameters)"
  [3]=>
  string(77) "GetTerminalDataXMLResponse 
GetTerminalDataXML(GetTerminalDataXML $parameters)"

  [4]=>
  string(59) "GetRouterXmlResponse GetRouterXml(GetRouterXml $parameters)"
  [5]=>
  string(80) "GetTerminalSoundXMLResponse 
GetTerminalSoundXML(GetTerminalSoundXML $parameters)"

  [6]=>
  string(62) "SetSequenceNoResponse SetSequenceNo(SetSequenceNo 
$parameters)"

  [7]=>
  string(50) "GetConfigResponse GetConfig(GetConfig $parameters)"
  [8]=>
  string(62) "GetSequenceNoResponse GetSequenceNo(GetSequenceNo 
$parameters)"

  [9]=>
  string(95) "UpdateClientMediaLogTimeResponse 
UpdateClientMediaLogTime(UpdateClientMediaLogTime $parameters)"

  [10]=>
  string(59) "GetMediaListResponse GetMediaList(GetMediaList $parameters)"
  [11]=>
  string(68) "GetMediaListAllResponse GetMediaListAll(GetMediaListAll 
$parameters)"

  [12]=>
  string(59) "GetSoundListResponse GetSoundList(GetSoundList $parameters)"
  [13]=>
  string(77) "GetTerminalDataXMLResponse 
GetTerminalDataXML(GetTerminalDataXML $parameters)"

  [14]=>
  string(59) "GetRouterXmlResponse GetRouterXml(GetRouterXml $parameters)"
  [15]=>
  string(80) "GetTerminalSoundXMLResponse 
GetTerminalSoundXML(GetTerminalSoundXML $parameters)"

  [16]=>
  string(62) "SetSequenceNoResponse SetSequenceNo(SetSequenceNo 
$parameters)"

  [17]=>
  string(50) "GetConfigResponse GetConfig(GetConfig $parameters)"
  [18]=>
  string(62) "GetSequenceNoResponse GetSequenceNo(GetSequenceNo 
$parameters)"

  [19]=>
  string(95) "UpdateClientMediaLogTimeResponse 
UpdateClientMediaLogTime(UpdateClientMediaLogTime $parameters)"

}

now this is all great but my question is how do I call each of these 
functions with parameters.
The call I immediately need to make is to GetSequenceNo() which requires 
a parameter of "CIS" in my current configuration.

How do I do this ? Obviously $client->__doRequest is not the way to go.

--

Regards,
Alf Stockton  www.stockton.co.za


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP and Powershell

2013-07-22 Thread Alan Loos
Serge,

  Won't lie, read this from my phone this morning and thought 'No it can't be 
that easy'.
Now that I'm at work in front of a computer I've updated the command to the 
following:

GetTarget.ps1

###
## Variables ##
###

$cred = New-Object System.Management.Automation.PSCredential -ArgumentList 
@('administra...@widget.com',(ConvertTo-SecureString -String 'MyPassword' 
-AsPlainText -Force))
$command = Invoke-Command -computername localhost -credential $cred 
-scriptblock {& Get-IscsiServerTarget -TargetName Target1 | select-object 
TargetIqn,Status | Format-List} -SessionOption (New-PSSessionOption 
-SkipCACheck -SkipCNCheck -SkipRevocationCheck)


#
## Execute Scriptblock ##
#

$command



And it returns:

Array
(
[0] =>
[1] =>
[2] => TargetIqn : iqn.2013-04.com.widget:Target1
[3] => Status: NotConnected
[4] =>
[5] =>
[6] =>
)
0

End Of Scene

In effect, you're a genius!

Thank you for all your help I should be able to tackle it from here!

Alan Loos

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.

From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
Sent: Monday, July 22, 2013 4:09 AM
To: Alan Loos
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP and Powershell

Hi,

Thanks for your change.

I understand what has happend, from MSDN forums
http://social.technet.microsoft.com/Forums/windowsserver/en-US/4b841530-9d8c-4d09-a77c-b89c6e0bafab/how-do-i-capture-data-from-invokecommand

http://technet.microsoft.com/en-us/library/jj612804.aspx describes that
Get-IscsiServerTarget returns an instance of 
Microsoft.Iscsi.Target.Commands.IscsiServerTarget. De output also includes the 
runspaceid and pscomputername. Invoke-Command also returns a runspaceid (when 
executed with -computername).

You need to use Select-Object to output only the relevant fields instead.

HTH

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

--Snip--
--Big Snip--


Please make note of my new email address: alan.l...@genco.com.


Re: [PHP] PHP and Powershell

2013-07-22 Thread Serge Fonville
Hi,

Thanks for your change.

I understand what has happend, from MSDN forums
http://social.technet.microsoft.com/Forums/windowsserver/en-US/4b841530-9d8c-4d09-a77c-b89c6e0bafab/how-do-i-capture-data-from-invokecommand

http://technet.microsoft.com/en-us/library/jj612804.aspx describes that
Get-IscsiServerTarget returns an instance of
Microsoft.Iscsi.Target.Commands.IscsiServerTarget. De output also includes
the runspaceid and pscomputername. Invoke-Command also returns a runspaceid
(when executed with -computername).

You need to use Select-Object to output only the relevant fields instead.

HTH

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/19 Alan Loos 

>  Serge,
>
>   I have, the script itself allows for easy transition into a .ps1, what I
> have done is removed the # from the debug section to get the full command
> that is then easily ‘copy and paste’-able into a Powershell prompt and I
> get the same response in Powershell directly.
>
>   Also in response to the lastest post to the thread I will snip off some
> content here. (Sorry first time at this)
>
>
>
> The ultimate goal is to pull the two variables so I can pass them forward
> via a PHP script to a MySQL Database.
>
> (ie iqn.2013-04.com.widget:Target1 and NotConnected in this case)
>
>
>
> I believe that the command in Powershell is trying to gather the $Status
> on both the Invoke-Command and Get-iSCSIServerTarget commands. Which is why
> I am getting a table in the Powershell Console and browser.
>
>
>
> Per your request I have rewritten the scripts:
>
> (Included inline)
>
> TestGetServerTarget.php
>  --
>
> 
>
>
>
>
> ###
>
> ## Variables ##
>
> ###
>
>
>
> $psCMD = "powershell.exe -ExecutionPolicy Unrestricted";
>
> $psFILE = "C:\\Arc\\scripts\\TestGetTarget.ps1";
>
> $runCMD = $psCMD." ".$psFILE;
>
>
>
> 
>
> ## Variable Checking (For Debug Mode) ##
>
> 
>
>
>
> #echo "\$psCMD = $psCMD";
>
>
>
>
>
> 
>
> ## Run Script ##
>
> 
>
>
>
> exec($runCMD, $out);
>
>
>
>
>
> 
>
> ## Output ##
>
> 
>
>
>
> echo ('');
>
> print_r($out);
>
> echo ('');
>
>
>
>
>
> ###
>
> ## End Of Script ##
>
> ###
>
>
>
> echo "End Of Scene";
>
>
>
>
>
> ?>
>  --
>
>
>
>
>
> TestGetTarget.ps1
>  --
>
> ###
>
> ## Variables ##
>
> ###
>
>
>
> $cred = New-Object System.Management.Automation.PSCredential -ArgumentList
> @('administra...@widget.com',(ConvertTo-SecureString -String 'MyPassword'
> -AsPlainText -Force))
>
> $command = Invoke-Command -computername localhost -credential $cred
> -scriptblock {& Get-IscsiServerTarget -TargetName Target1 | % {
> $_.TargetIqn, $_.Status}} -SessionOption (New-PSSessionOption -SkipCACheck
> -SkipCNCheck -SkipRevocationCheck)
>
>
>
>
>
> #
>
> ## Execute Scriptblock ##
>
> #
>
>
>
> $command
>  --
>
>
>
> Powershell output of TestGetTarget.ps1:
>  --
>
> PS C:\Arc\Scripts> .\TestGetTarget.ps1
>
> iqn.2013-04.com.widget:Target1
>
>
>
> PSComputerName  RunspaceId
>  Value
>
> --
> --  -
>
> localhost
> f3c5063a-85df-49a3-a5ed-7df04a930684NotConnected
>  --
>
>
>
> PHP output webbrowser (Much in the same):
>  --
>
> Array
>
> (
>
> [0] => iqn.2013-04.com.widget:Target1
>
> [1] =>
>
> [2] => PSComputerName RunspaceId Value
>
> [3] => -- -- -
>
> [4] => localhost  f46c9f15-70b4-496c-a9d6...
> NotConnected
>
> [5] =>
>
> [6] =>
>
> )
>
>
>
> End Of Scene
>  --
>
>
>
>
>

RE: [PHP] PHP and Powershell

2013-07-19 Thread Alan Loos
Serge,
  I have, the script itself allows for easy transition into a .ps1, what I have 
done is removed the # from the debug section to get the full command that is 
then easily 'copy and paste'-able into a Powershell prompt and I get the same 
response in Powershell directly.
  Also in response to the lastest post to the thread I will snip off some 
content here. (Sorry first time at this)

The ultimate goal is to pull the two variables so I can pass them forward via a 
PHP script to a MySQL Database.
(ie iqn.2013-04.com.widget:Target1 and NotConnected in this case)

I believe that the command in Powershell is trying to gather the $Status on 
both the Invoke-Command and Get-iSCSIServerTarget commands. Which is why I am 
getting a table in the Powershell Console and browser.

Per your request I have rewritten the scripts:
(Included inline)
TestGetServerTarget.php

');
print_r($out);
echo ('');


###
## End Of Script ##
###

echo "End Of Scene";


?>



TestGetTarget.ps1

###
## Variables ##
###

$cred = New-Object System.Management.Automation.PSCredential -ArgumentList 
@('administra...@widget.com',(ConvertTo-SecureString -String 'MyPassword' 
-AsPlainText -Force))
$command = Invoke-Command -computername localhost -credential $cred 
-scriptblock {& Get-IscsiServerTarget -TargetName Target1 | % { $_.TargetIqn, 
$_.Status}} -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck 
-SkipRevocationCheck)


#
## Execute Scriptblock ##
#

$command


Powershell output of TestGetTarget.ps1:

PS C:\Arc\Scripts> .\TestGetTarget.ps1
iqn.2013-04.com.widget:Target1

PSComputerName  RunspaceId  
Value
--  --  
-
localhost   f3c5063a-85df-49a3-a5ed-7df04a930684
NotConnected


PHP output webbrowser (Much in the same):

Array
(
[0] => iqn.2013-04.com.widget:Target1
[1] =>
[2] => PSComputerName RunspaceId Value
[3] => -- -- -
[4] => localhost  f46c9f15-70b4-496c-a9d6... NotConnected
[5] =>
[6] =>
)

End Of Scene



Alan Loos

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.

From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
Sent: Friday, July 19, 2013 12:16 PM
To: Alan Loos
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP and Powershell

Thank you for your clarification.

Have you considered placing the whole powershell -command parameter in a .ps1 
script and executing that instead?

The benefit would be that it is easier to read and test accordingly.

HTH

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

--Big Snip--

Please make note of my new email address: alan.l...@genco.com.


Re: [PHP] PHP and Powershell

2013-07-19 Thread Tedd Sperling
To all:

Sorry for top posting and sorry for sounding like the list-police, but you need 
to trim the excess from your post. Hitting reply without considering that other 
have to read through a bunch of old add-on email is not good.

So, please just trim your post to what is important.

Cheers,

tedd

On Jul 19, 2013, at 1:16 PM, Serge Fonville  wrote:

> Thank you for your clarification.
> 
> Have you considered placing the whole powershell -command parameter in a
> .ps1 script and executing that instead?
> 
> The benefit would be that it is easier to read and test accordingly.
> 
> HTH
> 
> Kind regards/met vriendelijke groet,
> 
> Serge Fonville

> --- BIG SNIP ---


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and Powershell

2013-07-19 Thread Serge Fonville
Thank you for your clarification.

Have you considered placing the whole powershell -command parameter in a
.ps1 script and executing that instead?

The benefit would be that it is easier to read and test accordingly.

HTH

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/19 Alan Loos 

>  According to Technet it is not required (
> http://technet.microsoft.com/en-us/library/hh849719.aspx) as the default
> would be ‘localhost’ which is the same as 127.0.0.1.
>
> ** **
>
> So you are correct it is not required. However when I take away
> ‘-computername 127.0.0.1’ I get a return of:
>
> Array
>
> (
>
> [0] => Invoke-Command : Parameter set cannot be resolved using the
> specified named
>
> [1] => parameters.
>
> [2] => At line:1 char:172
>
> [3] => + $cred = New-Object System.Management.Automation.PSCredential
> -ArgumentList
>
> [4] => @('ad ...
>
> [5] => +
> ~
> 
>
> [6] => ~~~
>
> [7] => + CategoryInfo  : InvalidArgument: (:)
> [Invoke-Command], Parameter
>
> [8] =>BindingException
>
> [9] => + FullyQualifiedErrorId :
> AmbiguousParameterSet,Microsoft.PowerShell.Comma
>
> [10] =>nds.InvokeCommandCommand
>
> [11] => 
>
> )
>
> ** **
>
> End Of Scene
>
> ** **
>
> For whatever reason, the powershell command does not want to execute
> properly without that variable being defined explicitly.
>
> ** **
>
> (Not sure if that is what you are asking exactly but I think that was
> answering the question, if not let me know and I’ll try to answer the best
> I can)
>
> ** **
>
> Thanks in advance!
>
> ** **
>
> *Alan Loos* 
>
> ** **
>
> 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.
>
> ** **
>
> *From:* Serge Fonville [mailto:serge.fonvi...@gmail.com]
> *Sent:* Friday, July 19, 2013 11:13 AM
>
> *To:* Alan Loos
> *Cc:* php-general@lists.php.net
> *Subject:* Re: [PHP] PHP and Powershell
>
> ** **
>
> How have you determined that invoke-command requires -computername?
>
> 
>
> 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/19 Alan Loos 
>
> Thank you for your response Serge!
>
>   The computer name  is for the invoke-command, ComputerName has to be
> specified to tell the computer where the command is to be routed. Since I
> want this to run locally over PHP I figured that it would be a good way to
> avoid running a script as I have read online that when it can be avoided
> it’s a good practice (I also couldn’t get this to work properly… J But
> that is a side note). The piece that outputs the extra RunSpaceID and the
> PSComputerName is the $_.Status portion of everything.
>
>  
>
> If someone knows how to cut it out that would be fine but really I just
> need to pull the Target Name and the Value from result. For the attached
> example it would be $IQNTarget = iqn.2013-04.com.widget:Target1 and $Value
> = NotConnected (Which there are two options for this which is Connected or
> NotConnected).
>
>  
>
> To use Select Object here would I do Select-Object $Value?
>
>  
>
> *Alan Loos*
>
>  
>
> 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)

RE: [PHP] PHP and Powershell

2013-07-19 Thread Alan Loos
According to Technet it is not required 
(http://technet.microsoft.com/en-us/library/hh849719.aspx) as the default would 
be 'localhost' which is the same as 127.0.0.1.

So you are correct it is not required. However when I take away '-computername 
127.0.0.1' I get a return of:
Array
(
[0] => Invoke-Command : Parameter set cannot be resolved using the 
specified named
[1] => parameters.
[2] => At line:1 char:172
[3] => + $cred = New-Object System.Management.Automation.PSCredential 
-ArgumentList
[4] => @('ad ...
[5] => + 
~
[6] => ~~~
[7] => + CategoryInfo  : InvalidArgument: (:) [Invoke-Command], 
Parameter
[8] =>BindingException
[9] => + FullyQualifiedErrorId : 
AmbiguousParameterSet,Microsoft.PowerShell.Comma
[10] =>nds.InvokeCommandCommand
[11] =>
)

End Of Scene

For whatever reason, the powershell command does not want to execute properly 
without that variable being defined explicitly.

(Not sure if that is what you are asking exactly but I think that was answering 
the question, if not let me know and I'll try to answer the best I can)

Thanks in advance!

Alan Loos

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.

From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
Sent: Friday, July 19, 2013 11:13 AM
To: Alan Loos
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP and Powershell

How have you determined that invoke-command requires -computername?

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/19 Alan Loos mailto:alan.l...@genco.com>>
Thank you for your response Serge!
  The computer name  is for the invoke-command, ComputerName has to be 
specified to tell the computer where the command is to be routed. Since I want 
this to run locally over PHP I figured that it would be a good way to avoid 
running a script as I have read online that when it can be avoided it's a good 
practice (I also couldn't get this to work properly... :) But that is a side 
note). The piece that outputs the extra RunSpaceID and the PSComputerName is 
the $_.Status portion of everything.

If someone knows how to cut it out that would be fine but really I just need to 
pull the Target Name and the Value from result. For the attached example it 
would be $IQNTarget = iqn.2013-04.com.widget:Target1 and $Value = NotConnected 
(Which there are two options for this which is Connected or NotConnected).

To use Select Object here would I do Select-Object $Value?

Alan Loos

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.

From: Serge Fonville 
[mailto:serge.fonvi...@gmail.com<mailto:serge.fonvi...@gmail.com>]
Sent: Friday, July 19, 2013 3:05 AM
To: Alan Loos
Cc: php-general@lists.php.net<mailto:php-general@lists.php.net>
Subject: Re: [PHP] PHP and Powershell

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 mailto: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,

Re: [PHP] PHP and Powershell

2013-07-19 Thread Serge Fonville
How have you determined that invoke-command requires -computername?

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/19 Alan Loos 

>  Thank you for your response Serge!
>
>   The computer name  is for the invoke-command, ComputerName has to be
> specified to tell the computer where the command is to be routed. Since I
> want this to run locally over PHP I figured that it would be a good way to
> avoid running a script as I have read online that when it can be avoided
> it’s a good practice (I also couldn’t get this to work properly… J But
> that is a side note). The piece that outputs the extra RunSpaceID and the
> PSComputerName is the $_.Status portion of everything.
>
> ** **
>
> If someone knows how to cut it out that would be fine but really I just
> need to pull the Target Name and the Value from result. For the attached
> example it would be $IQNTarget = iqn.2013-04.com.widget:Target1 and $Value
> = NotConnected (Which there are two options for this which is Connected or
> NotConnected).
>
> ** **
>
> To use Select Object here would I do Select-Object $Value?
>
> ** **
>
> *Alan Loos* | *Flash Anywhere Project*
>
> T 925-640-2977 | 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.
>
> ** **
>
> *From:* Serge Fonville [mailto:serge.fonvi...@gmail.com]
> *Sent:* Friday, July 19, 2013 3:05 AM
> *To:* Alan Loos
> *Cc:* php-general@lists.php.net
> *Subject:* Re: [PHP] PHP and Powershell
>
> ** **
>
> 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 
>
> 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:
> 
>
> ###
> ## 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\" 
>
> 
> ## Variable Checking (For Debug Mode) ##
> 
>
> #echo "\$psCMD = $psCMD";
>
>
> 
> ## Run Script ##
> 
>
> exec($psCMD,$out);
>
>
> 
> ## Output

RE: [PHP] PHP and Powershell

2013-07-19 Thread Alan Loos
Thank you for your response Serge!
  The computer name  is for the invoke-command, ComputerName has to be 
specified to tell the computer where the command is to be routed. Since I want 
this to run locally over PHP I figured that it would be a good way to avoid 
running a script as I have read online that when it can be avoided it's a good 
practice (I also couldn't get this to work properly... :) But that is a side 
note). The piece that outputs the extra RunSpaceID and the PSComputerName is 
the $_.Status portion of everything.

If someone knows how to cut it out that would be fine but really I just need to 
pull the Target Name and the Value from result. For the attached example it 
would be $IQNTarget = iqn.2013-04.com.widget:Target1 and $Value = NotConnected 
(Which there are two options for this which is Connected or NotConnected).

To use Select Object here would I do Select-Object $Value?

Alan Loos | Flash Anywhere Project
T 925-640-2977 | alan.l...@genco.com<mailto: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.

From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
Sent: Friday, July 19, 2013 3:05 AM
To: Alan Loos
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP and Powershell

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 mailto: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:
mailto: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\" ');
print_r($out);
echo ('');


###
## 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<mailto: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 

Re: [PHP] PHP and Powershell

2013-07-19 Thread Serge Fonville
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 

> 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:
> 
>
> ###
> ## 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\" 
>
> 
> ## Variable Checking (For Debug Mode) ##
> 
>
> #echo "\$psCMD = $psCMD";
>
>
> 
> ## Run Script ##
> 
>
> exec($psCMD,$out);
>
>
> 
> ## Output ##
> 
>
> echo ('');
> print_r($out);
> echo ('');
>
>
> ###
> ## 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.
>


[PHP] PHP and Powershell

2013-07-18 Thread Alan Loos
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:
');
print_r($out);
echo ('');


###
## 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.


[PHP] PHP and webmaster tools

2011-11-02 Thread Rick Dwyer

Hello list.

I am looking for someone who knows PHP and has extensive
experience with webmaster tools.

I have a series of crawl errors I need resolved but cannot find the
bad URL's anywhere on the site.

Please contact me off list.

Thanks,

 --Rick



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and Windows 7 g6-bit (Solved)

2011-06-15 Thread Byron Como

On 6/15/2011 1:59 PM, Tim Thorburn wrote:

On 6/15/2011 11:37 AM, Byron Como wrote:

Does the precompiled windows binary work on win 7 64?

It does, however if you're using Apache as your webserver, for PHP 
5.3+ you won't be able to use the binaries from apache.org for 
Windows.  There is a link to Apache Lounge found here: 
http://windows.php.net/download/ which instructs you to download a VC9 
compiled version of Apache.


If you're using IIS, I think you can just download the version of PHP 
you're after and go.



The documentation on this page:

http://windows.php.net/download/

... is wrong/out of date and should be corrected. If I am mistaken I 
humbly apologize.


Sincerly,
Byron Como

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and Windows 7 g6-bit

2011-06-15 Thread Tim Thorburn

On 6/15/2011 11:37 AM, Byron Como wrote:

Does the precompiled windows binary work on win 7 64?

It does, however if you're using Apache as your webserver, for PHP 5.3+ 
you won't be able to use the binaries from apache.org for Windows.  
There is a link to Apache Lounge found here: 
http://windows.php.net/download/ which instructs you to download a VC9 
compiled version of Apache.


If you're using IIS, I think you can just download the version of PHP 
you're after and go.


[PHP] PHP and Windows 7 64-bit

2011-06-15 Thread Byron Como

Does the precompiled windows binary work on win 7 64?

I downloaded the apache installer, works with no problems.
I got the php5 VC6 x86 Thread Safe version. It says "x86" so I'm 
guessing that's the problem. I can't find a current 64-bit version.


Error message:

Faulting application name: httpd.exe, version: 2.2.19.0, time stamp: 
0x4dd6eda8

Faulting module name: php5ts.dll, version: 5.2.17.17, time stamp: 0x4d25fb49
Exception code: 0xc005
Fault offset: 0x000f424c
Faulting process id: 0xa7c
Faulting application start time: 0x01cc2b64b44cc59e
Faulting application path: C:\server\Apache2.2\bin\httpd.exe
Faulting module path: C:\server\PHP\php5ts.dll
Report Id: f2e941ea-9757-11e0-a2f1-005056c8

--
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



[PHP] PHP and Windows 7 g6-bit

2011-06-15 Thread Byron Como

Does the precompiled windows binary work on win 7 64?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and HBCI?

2010-10-08 Thread Per Jessen
Stephan Ebelt wrote:

> 
> common is probably XML via HTTPS transport (at least my bank seems to
> do it that way). I have no C code whatsoever.
> 
> Can PHP call arbitrary C functions? Then it might be possible to use
> AqHBCI/AqBanking somehow?

You (or someone) would need to write a PHP wrapper for the C functions,
but otherwise yes.



-- 
Per Jessen, Zürich (17.9°C)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and HBCI?

2010-10-08 Thread Stephan Ebelt

common is probably XML via HTTPS transport (at least my bank seems to do it
that way). I have no C code whatsoever.

Can PHP call arbitrary C functions? Then it might be possible to use
AqHBCI/AqBanking somehow?

On Fri, Oct 08, 2010 at 03:39:04PM +0200, Sebastian Detert wrote:
> Do you have any specifications for HBCI interfaces? Socket connection,  
> XML Exchange, DB Access ? If you have C code for such things, it should  
> be possible to convert this to php code maybe
>
> Stephan Ebelt schrieb:
>> On Fri, Oct 08, 2010 at 01:50:12PM +0100, a...@ashleysheridan.co.uk wrote:
>>   
>>> How do you mean? Did you want to process payments? Or wad it more of an
>>> actual banking thing you needed? I've not heard of hbci before, so can't
>>> offer much information back.
>>> 
>>
>> HBCI is the german Home Banking Computer Interface which is supported by most
>> banks over here. There are free implementations such as the one used in 
>> gnucash
>> and some other projects: http://www.aquamaniac.de/sites/aqbanking/index.php
>> (sorry, site is german but code is english). I could not find a way to use
>> something like that from PHP code, only C and Java so far.
>>
>> My goal for now would be to access bank account statements in order to show 
>> the
>> balances. I am not too eager to issue transactions.
>>
>> thanks,
>> stephan
>>
>>
>>
>>   
>>> Thanks,
>>> Ash
>>> http://www.ashleysheridan.co.uk
>>>
>>> - Reply message -
>>> From: "Stephan Ebelt" 
>>> Date: Fri, Oct 8, 2010 13:37
>>> Subject: [PHP] PHP and HBCI?
>>> To: "PHP" 
>>>
>>>
>>> Hello,
>>>
>>> is there a way to do HBCI banking with PHP?
>>>
>>> stephan
>>>
>>>
>>> -- 
>>> 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



Re: [PHP] PHP and HBCI?

2010-10-08 Thread Sebastian Detert
Do you have any specifications for HBCI interfaces? Socket connection, 
XML Exchange, DB Access ? If you have C code for such things, it should 
be possible to convert this to php code maybe


Stephan Ebelt schrieb:

On Fri, Oct 08, 2010 at 01:50:12PM +0100, a...@ashleysheridan.co.uk wrote:
  

How do you mean? Did you want to process payments? Or wad it more of an
actual banking thing you needed? I've not heard of hbci before, so can't
offer much information back.



HBCI is the german Home Banking Computer Interface which is supported by most
banks over here. There are free implementations such as the one used in gnucash
and some other projects: http://www.aquamaniac.de/sites/aqbanking/index.php
(sorry, site is german but code is english). I could not find a way to use
something like that from PHP code, only C and Java so far.

My goal for now would be to access bank account statements in order to show the
balances. I am not too eager to issue transactions.

thanks,
stephan



  

Thanks,
Ash
http://www.ashleysheridan.co.uk

- Reply message -
From: "Stephan Ebelt" 
Date: Fri, Oct 8, 2010 13:37
Subject: [PHP] PHP and HBCI?
To: "PHP" 


Hello,

is there a way to do HBCI banking with PHP?

stephan


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




  




Re: [PHP] PHP and HBCI?

2010-10-08 Thread Stephan Ebelt

wikipedia has a good summary: http://en.wikipedia.org/wiki/HBCI#FinTS_4.0

I just learned that its called "FinTS" now. Looking for that didnt bring me
closer yet.

stephan

On Fri, Oct 08, 2010 at 01:50:12PM +0100, a...@ashleysheridan.co.uk wrote:
> How do you mean? Did you want to process payments? Or wad it more of an
> actual banking thing you needed? I've not heard of hbci before, so can't
> offer much information back.
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> - Reply message -
> From: "Stephan Ebelt" 
> Date: Fri, Oct 8, 2010 13:37
> Subject: [PHP] PHP and HBCI?
> To: "PHP" 
> 
> 
> Hello,
> 
> is there a way to do HBCI banking with PHP?
> 
> stephan
> 
> 
> -- 
> 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



Re: [PHP] PHP and HBCI?

2010-10-08 Thread Stephan Ebelt
On Fri, Oct 08, 2010 at 01:50:12PM +0100, a...@ashleysheridan.co.uk wrote:
> How do you mean? Did you want to process payments? Or wad it more of an
> actual banking thing you needed? I've not heard of hbci before, so can't
> offer much information back.

HBCI is the german Home Banking Computer Interface which is supported by most
banks over here. There are free implementations such as the one used in gnucash
and some other projects: http://www.aquamaniac.de/sites/aqbanking/index.php
(sorry, site is german but code is english). I could not find a way to use
something like that from PHP code, only C and Java so far.

My goal for now would be to access bank account statements in order to show the
balances. I am not too eager to issue transactions.

thanks,
stephan



> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> - Reply message -
> From: "Stephan Ebelt" 
> Date: Fri, Oct 8, 2010 13:37
> Subject: [PHP] PHP and HBCI?
> To: "PHP" 
> 
> 
> Hello,
> 
> is there a way to do HBCI banking with PHP?
> 
> stephan
> 
> 
> -- 
> 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



RE: [PHP] PHP and HBCI?

2010-10-08 Thread Jay Blanchard
[snip]
is there a way to do HBCI banking with PHP?
[/snip]

yes.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and HBCI?

2010-10-08 Thread a...@ashleysheridan.co.uk
How do you mean? Did you want to process payments? Or wad it more of an actual 
banking thing you needed? I've not heard of hbci before, so can't offer much 
information back.

Thanks,
Ash
http://www.ashleysheridan.co.uk

- Reply message -
From: "Stephan Ebelt" 
Date: Fri, Oct 8, 2010 13:37
Subject: [PHP] PHP and HBCI?
To: "PHP" 


Hello,

is there a way to do HBCI banking with PHP?

stephan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP and HBCI?

2010-10-08 Thread Stephan Ebelt

Hello,

is there a way to do HBCI banking with PHP?

stephan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP and SpatiaLite

2010-10-01 Thread TR Shaw
Anyone succeeded in geting php and SpatiaLite to work together?





Re: [PHP] PHP and schedules tasks/events

2010-04-16 Thread Ryan Sun
you can setup a schedule table in db
and have a cron php script check the db every time
and send email if the current time is around the scheduled_at time
and close the schedule after you send the email

On Fri, Apr 16, 2010 at 5:35 PM, Adam Richardson  wrote:
> On Fri, Apr 16, 2010 at 5:15 PM, Don Wieland wrote:
>
>> On Apr 16, 2010, at 1:26 PM, Bastien Koert wrote:
>>
>>  Run a cronjob at midnight and send the email. Track who it got sent
>>> to, so you don't duplicate it. Easy peasy!
>>>
>>
>> This is fine if the email is to be sent at midnight.
>>
>> I am looking for more refinement.
>>
>> For example:
>>
>> A user signs up for an event - 4/16/2010 @ 10:45am
>>
>> There is an option:
>>
>> Send me a reminder email X minutes/hours/days/weeks/months/years prior to
>> the Event.
>>
>> so:
>>
>> 30 minute(s) = email sent at 4/16/2010 @ 10:15am
>> 2 hour(s) = email sent at 4/16/2010 @ 8:45am
>> 3 day(s) = email sent at 4/13/2010 @ 10:45am
>> 1 week(s) = email sent at 4/9/2010 @ 10:45am
>> 1 month(s) = email sent at 3/16/2010 @ 10:45am
>> 1 year(s) = email sent at 4/16/2009 @ 10:45am
>>
>> This is really what I need...
>>
>>
>> Don Wieland
>> D W   D a t a   C o n c e p t s
>> ~
>> d...@dwdataconcepts.com
>> Direct Line - (949) 305-2771
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> What about making ics files available for download?  Users could easily
> import the event into the calendar of choice, and they could also (using the
> calendar software they're already familiar with) set the alarm.  For
> instance, I can set the calendar on my cell to ring my phone to alert me to
> events (my preference over email reminders for important events because I
> sometimes get flooded with email.)
>
> Your scripts could generate the files containing event info and then
> automatically start the download.
>
> This allows the users to determine the mode of alarm that works best for
> them in their native calendar app, and you're still greatly facilitating the
> process by providing all of the info so they merely have to drag and drop
> for many apps.
>
> I realize you asked specifically for a server-side email alarm solution (I
> apologize for the tangent if your needs preclude this type of approach), but
> I thought I'd toss out the idea as this approach has proved more effective
> and efficient for websites I maintain.
>
> Adam
>
> --
> Nephtali:  PHP web framework that functions beautifully
> http://nephtaliproject.com
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and schedules tasks/events

2010-04-16 Thread Adam Richardson
On Fri, Apr 16, 2010 at 5:15 PM, Don Wieland wrote:

> On Apr 16, 2010, at 1:26 PM, Bastien Koert wrote:
>
>  Run a cronjob at midnight and send the email. Track who it got sent
>> to, so you don't duplicate it. Easy peasy!
>>
>
> This is fine if the email is to be sent at midnight.
>
> I am looking for more refinement.
>
> For example:
>
> A user signs up for an event - 4/16/2010 @ 10:45am
>
> There is an option:
>
> Send me a reminder email X minutes/hours/days/weeks/months/years prior to
> the Event.
>
> so:
>
> 30 minute(s) = email sent at 4/16/2010 @ 10:15am
> 2 hour(s) = email sent at 4/16/2010 @ 8:45am
> 3 day(s) = email sent at 4/13/2010 @ 10:45am
> 1 week(s) = email sent at 4/9/2010 @ 10:45am
> 1 month(s) = email sent at 3/16/2010 @ 10:45am
> 1 year(s) = email sent at 4/16/2009 @ 10:45am
>
> This is really what I need...
>
>
> Don Wieland
> D W   D a t a   C o n c e p t s
> ~
> d...@dwdataconcepts.com
> Direct Line - (949) 305-2771
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
What about making ics files available for download?  Users could easily
import the event into the calendar of choice, and they could also (using the
calendar software they're already familiar with) set the alarm.  For
instance, I can set the calendar on my cell to ring my phone to alert me to
events (my preference over email reminders for important events because I
sometimes get flooded with email.)

Your scripts could generate the files containing event info and then
automatically start the download.

This allows the users to determine the mode of alarm that works best for
them in their native calendar app, and you're still greatly facilitating the
process by providing all of the info so they merely have to drag and drop
for many apps.

I realize you asked specifically for a server-side email alarm solution (I
apologize for the tangent if your needs preclude this type of approach), but
I thought I'd toss out the idea as this approach has proved more effective
and efficient for websites I maintain.

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com


Re: [PHP] PHP and schedules tasks/events

2010-04-16 Thread Don Wieland

On Apr 16, 2010, at 1:26 PM, Bastien Koert wrote:


Run a cronjob at midnight and send the email. Track who it got sent
to, so you don't duplicate it. Easy peasy!


This is fine if the email is to be sent at midnight.

I am looking for more refinement.

For example:

A user signs up for an event - 4/16/2010 @ 10:45am

There is an option:

Send me a reminder email X minutes/hours/days/weeks/months/years prior  
to the Event.


so:

30 minute(s) = email sent at 4/16/2010 @ 10:15am
2 hour(s) = email sent at 4/16/2010 @ 8:45am
3 day(s) = email sent at 4/13/2010 @ 10:45am
1 week(s) = email sent at 4/9/2010 @ 10:45am
1 month(s) = email sent at 3/16/2010 @ 10:45am
1 year(s) = email sent at 4/16/2009 @ 10:45am

This is really what I need...

Don Wieland
D W   D a t a   C o n c e p t s
~
d...@dwdataconcepts.com
Direct Line - (949) 305-2771

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and schedules tasks/events

2010-04-16 Thread Bastien Koert
On Fri, Apr 16, 2010 at 4:20 PM, Don Wieland  wrote:
> Hi all,
>
> I am in need to schedule reminder emails and was wonder how to do this via
> PHP / mySQL
>
> For example, I would like to give my user the ability to sign-up for an
> event and have an email reminder generated X amount of time before the
> event.
>
> I appreciate any feedback on how to do this...
>
> Thanks!
>
> Don Wieland
> D W   D a t a   C o n c e p t s
> ~
> d...@dwdataconcepts.com
> Direct Line - (949) 305-2771
>
> Integrated data solutions to fit your business needs.
>
> Need assistance in dialing in your FileMaker solution? Check out our
> Developer Support Plan at:
> http://www.dwdataconcepts.com/DevSup.html
>
> Appointment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro 9 or
> higher
> http://www.appointment10.com
>
> For a quick overview -
> http://www.appointment10.com/Appt10_Promo/Overview.html
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Run a cronjob at midnight and send the email. Track who it got sent
to, so you don't duplicate it. Easy peasy!

-- 

Bastien

Cat, the other other white meat

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP and schedules tasks/events

2010-04-16 Thread Don Wieland

Hi all,

I am in need to schedule reminder emails and was wonder how to do this  
via PHP / mySQL


For example, I would like to give my user the ability to sign-up for  
an event and have an email reminder generated X amount of time before  
the event.


I appreciate any feedback on how to do this...

Thanks!

Don Wieland
D W   D a t a   C o n c e p t s
~
d...@dwdataconcepts.com
Direct Line - (949) 305-2771

Integrated data solutions to fit your business needs.

Need assistance in dialing in your FileMaker solution? Check out our  
Developer Support Plan at:

http://www.dwdataconcepts.com/DevSup.html

Appointment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro  
9 or higher

http://www.appointment10.com

For a quick overview -
http://www.appointment10.com/Appt10_Promo/Overview.html


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and javascript

2010-01-19 Thread Rene Veerman
oh, and if you're going to use ajax->non-phphttpd->php->andback, then
check if your dear non-php httpd abuses the CPU while waiting for PHP
to return the results...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and javascript

2010-01-19 Thread Rene Veerman
To do what you want that new httpd server should at least be able to
call up PHP via cli / whatever, and retrieve the output.
It also needs to provide what's in php called $_GET and $_POST.

Assuming you got that covered, then yes, you could route the calls via
ajax (i recommend jquery.com for that) to your non-php httpd, which
then forwards it (and the results back).
What i'd do if it HAD to be done this way, is pass a couple of extra
variables in each call from javascript. It's best to route all the
ajax calls to php to the same script on the non-php httpd, so you'd
need at least the "relative path (from serverside defined absolute
base-path for your php subsystem) to the script being called" (or even
an MD5/SHA256 of this rel path, if you're on the paranoid side; you
then inform (via an array) the non-php httpd about all the scripts
that may be called from javascript, without giving up the scripts
names to spies along the line)

But tbh, whoever thought of changing the type of server used and
thereby giving you this new problem, should have also thought of how
to not-dump tons of existing code. Not to mention developer experience
with a specific language.

If this new httpd is so damn good at something that it has to be used,
it still doesn't mean it has to be used for the entire system either.
You might be giving it more work than it is comfortable with, that
way.

So depending on your backend size (in terms of number of machines
used) & setup, you might even campaign to keep an apache in the
picture and let it perform work on the database / file storage
system..

On Fri, Jan 15, 2010 at 8:07 PM, Andres Gonzalez  wrote:
> How do I call PHP code that will run server side, from javascript code that
> is running client side?
>
> I have a lot of PHP server side code written and working within CodeIgniter.
>  Now, my project
> has changed and (for reasons unimportant to this discussion) we are now NOT
> going to
> use apache and CodeIgniter, but instead, we are going to have to use an http
> server that does
> not support PHP internally.  But I want to reuse my original PHP code. So I
> am thinking that I
> can execute the PHP code via a command line interface using the PHP cli
> interface instead of
> the PHP cgi interface. But, I will have to initiate this serversid call via
> javascript code running
> on the client.
>
> I know...kind of convoluted. But how would one do this if necessary?
>
> -Andres
>
> --
> 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



Re: [PHP] PHP and javascript

2010-01-15 Thread Ashley Sheridan
On Fri, 2010-01-15 at 14:07 -0500, Andres Gonzalez wrote:

> How do I call PHP code that will run server side, from javascript code 
> that is running client side?
> 
> I have a lot of PHP server side code written and working within 
> CodeIgniter.  Now, my project
> has changed and (for reasons unimportant to this discussion) we are now 
> NOT going to
> use apache and CodeIgniter, but instead, we are going to have to use an 
> http server that does
> not support PHP internally.  But I want to reuse my original PHP code. 
> So I am thinking that I
> can execute the PHP code via a command line interface using the PHP cli 
> interface instead of
> the PHP cgi interface. But, I will have to initiate this serversid call 
> via javascript code running
> on the client.
> 
> I know...kind of convoluted. But how would one do this if necessary?
> 
> -Andres
> 


I wouldn't recommend doing it this way at all. What you'd essentially
need, is Javascript make an AJAX request to a server script, which would
then call your PHP shell script, which would then return data to the
[other language] server script, that responds back to the Javascript on
the browser.

What sort of server will you be using that you can' support PHP on it?
PHP runs on most web servers out there, and will happily run alongside
other language modules on a single server.

Who's making the decisions about the new server? Someone really needs to
explain to him/her that it's a massive project converting a website from
one language to another (I've had to convert a large ColdFusion one to
PHP before, so I know) and it will probably cost more in the long term
to convert than might be saved on whatever server 'deal' they're
getting.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] PHP and javascript

2010-01-15 Thread Ryan Sun
I don't think you can call php cli from client javascript unless you have a
wrapper http interface

On Fri, Jan 15, 2010 at 2:07 PM, Andres Gonzalez wrote:

> How do I call PHP code that will run server side, from javascript code that
> is running client side?
>
> I have a lot of PHP server side code written and working within
> CodeIgniter.  Now, my project
> has changed and (for reasons unimportant to this discussion) we are now NOT
> going to
> use apache and CodeIgniter, but instead, we are going to have to use an
> http server that does
> not support PHP internally.  But I want to reuse my original PHP code. So I
> am thinking that I
> can execute the PHP code via a command line interface using the PHP cli
> interface instead of
> the PHP cgi interface. But, I will have to initiate this serversid call via
> javascript code running
> on the client.
>
> I know...kind of convoluted. But how would one do this if necessary?
>
> -Andres
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[PHP] PHP and javascript

2010-01-15 Thread Andres Gonzalez
How do I call PHP code that will run server side, from javascript code 
that is running client side?


I have a lot of PHP server side code written and working within 
CodeIgniter.  Now, my project
has changed and (for reasons unimportant to this discussion) we are now 
NOT going to
use apache and CodeIgniter, but instead, we are going to have to use an 
http server that does
not support PHP internally.  But I want to reuse my original PHP code. 
So I am thinking that I
can execute the PHP code via a command line interface using the PHP cli 
interface instead of
the PHP cgi interface. But, I will have to initiate this serversid call 
via javascript code running

on the client.

I know...kind of convoluted. But how would one do this if necessary?

-Andres

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php and XML BibTeX

2010-01-13 Thread Paul M Foster
On Wed, Jan 13, 2010 at 12:45:53PM -0800, Michael A. Peters wrote:

> Hi -
>
> Currently on my web site, book and article references are just stored in
> the database. While it works, I actually would like to move that out of
> the database and to an XML file, the reason being is that if/when I need
> to add fields etc. to the referenced sources, it's a lot easier to just
> edit a text file than modify database and recode my form interface for
> modifying the database. Also, there's an existing XML format for bibTeX
> and there already are tools to go from that to "real" bibTex, which I
> may need to do at some point.
>
> What I'm hoping is that already exists some php classes / functions for
> dealing with the XML bibTeX but I haven't found them. Anyone know of any?

I don't know, but the first place I look for things like that is
phpclasses.org.

Paul

-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php and XML BibTeX

2010-01-13 Thread Michael A. Peters

Hi -

Currently on my web site, book and article references are just stored in 
the database. While it works, I actually would like to move that out of 
the database and to an XML file, the reason being is that if/when I need 
to add fields etc. to the referenced sources, it's a lot easier to just 
edit a text file than modify database and recode my form interface for 
modifying the database. Also, there's an existing XML format for bibTeX 
and there already are tools to go from that to "real" bibTex, which I 
may need to do at some point.


What I'm hoping is that already exists some php classes / functions for 
dealing with the XML bibTeX but I haven't found them. Anyone know of any?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and SEO Workarounds

2009-12-20 Thread Ashley Sheridan
On Sun, 2009-12-20 at 20:05 -0500, Gautam Bhatia wrote:

> hey guys,
>   Thanks a lot everyone  for the links and suggestions ,
> I will take a look into mod_rewrite and search engine friendly URL's To
> make the site more efficient ,  
> 
> 
> Regards,
> Gautam bhatia.
> mail2gautambha...@gmail.com
> 
> 
> 
> 
> On Sun, 2009-12-20 at 12:44 +, Ashley Sheridan wrote:
> 
> > On Sun, 2009-12-20 at 12:15 -0500, Gautam Bhatia wrote: 
> > 
> > > hey folks,
> > > This is in regards to SEO and PHP, From what i have
> > > read , most (Not all) the PHP Contents is dynamic , which makes it so
> > > powerfull , but it also means that chances of it being indexed in search
> > > engines are less , am i right in saying this ? . If so how do i optimize
> > > my site  for search engines which is being powered by PHP and content is
> > > Dynamic. Please guide in this regard. Thank you.
> > > 
> > > Regards,
> > > Gautam Bhatia
> > > mail2gautambha...@gmail.com
> > 
> > 
> > This is a point you'll see mentioned by most SEO 'experts' none of
> > whom I've seen can provide any evidence of this. Just think about the
> > last time you searched for the answer to a question online. I'd hazard
> > a guess that the most popular results had dynamic URL's such as forum
> > posts, etc.
> > 
> > While it is true that the URL of a page has some weight to the pages
> > ranking, it's miniscule compared to the actual content of the page.
> > There might be an issue with blogs though, the ones where new old
> > posts get pushed to other pages. So a story that appears on
> > blog.php?page=1 might tomorrow appear on page=2, and then page=3 the
> > day after. If you have a setup like this, then you could benefit from
> > making more static type links for the posts, like Wordpress does.
> > 
> > More important for your SEO is getting the content correctly marked
> > up, i.e. headings in  tags, alt text for images, etc. There's a
> > good tool for checking these sorts of things at
> > http://nibbler.silktide.com 
> > 
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> > 
> > 
> > 
> > 
> 
> 


Just to remind you, they really aren't any more friendly to search
engines, that's a myth. Do a search for a question and look at the URLs
of the results and you'll see for yourself.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] PHP and SEO Workarounds

2009-12-20 Thread Gautam Bhatia
hey guys,
  Thanks a lot everyone  for the links and suggestions ,
I will take a look into mod_rewrite and search engine friendly URL's To
make the site more efficient ,  


Regards,
Gautam bhatia.
mail2gautambha...@gmail.com




On Sun, 2009-12-20 at 12:44 +, Ashley Sheridan wrote:

> On Sun, 2009-12-20 at 12:15 -0500, Gautam Bhatia wrote: 
> 
> > hey folks,
> > This is in regards to SEO and PHP, From what i have
> > read , most (Not all) the PHP Contents is dynamic , which makes it so
> > powerfull , but it also means that chances of it being indexed in search
> > engines are less , am i right in saying this ? . If so how do i optimize
> > my site  for search engines which is being powered by PHP and content is
> > Dynamic. Please guide in this regard. Thank you.
> > 
> > Regards,
> > Gautam Bhatia
> > mail2gautambha...@gmail.com
> 
> 
> This is a point you'll see mentioned by most SEO 'experts' none of
> whom I've seen can provide any evidence of this. Just think about the
> last time you searched for the answer to a question online. I'd hazard
> a guess that the most popular results had dynamic URL's such as forum
> posts, etc.
> 
> While it is true that the URL of a page has some weight to the pages
> ranking, it's miniscule compared to the actual content of the page.
> There might be an issue with blogs though, the ones where new old
> posts get pushed to other pages. So a story that appears on
> blog.php?page=1 might tomorrow appear on page=2, and then page=3 the
> day after. If you have a setup like this, then you could benefit from
> making more static type links for the posts, like Wordpress does.
> 
> More important for your SEO is getting the content correctly marked
> up, i.e. headings in  tags, alt text for images, etc. There's a
> good tool for checking these sorts of things at
> http://nibbler.silktide.com 
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> 
> 
> 




Re: [PHP] PHP and SEO Workarounds

2009-12-20 Thread TG
Look into using your web server's mod_rewrite functionality to alter the 
URL that the search engines see.  For an example, look at Wordpress' 
permalinks or Joomla's SEF (search engine friendly) URLs.

What this will do is make all your dynamic pages look more like static 
ones.  If all your PHP pages had unique names like "about.php" and 
"ourmission.php", then the file name sort of lends itself to SEO already, 
but that would be a pretty boring website, and probably one that doesn't 
need PHP, if that was the case.

The big issue are pages that take parameters:

domain.com/catalog.php?catid=55&prodid=23

You could turn this into:

domain.com/catalog/55/23

But that's still not very semantic and doesn't give search engines much to 
work with.  So you can massage it even further with something like:

domain.com/catalog/23_Footware/55_Happy_Bunny_Slippers

Kind of ugly, but you can use mod_rewrite to turn that into:
domain.com/catalog.php?catid=23_Footware&prodid=55_Happy_Bunny_Sliippers  
 then use PHP to extract the 23 and 55 to display the proper data.

Depending on the variables you're passing, you could exclude the numbers 
(which do nothing for SEO) and use PHP to figure out what to display.

domain.com/catalog/Footware/Happy_Bunny_Slippers
or...
domain.com/Footware/Happy_Bunny_Slippers  (shorter URLs are favored by SEO 
as not having "too much information" and some search engines only looking 
at the first XX characters of the URL means that the shorter the URL, the 
more info you can pack into it).

With mod_rewrite, you can tell it to check to see if a file exists, and if 
it doesn't, process a more complicated rewrite.

So if the catalog is your main source of dynamic data, then you could leave 
the "catalog" part out and use the 
domain.com/Footware/Happy_Bunny_Slippers format.If you had other 
dynamic data, you could leave the catalog in as a clue for the 
mod_rewrite as to what PHP script to use to process the rest of the 
parameters.


Another thing you can do is use the canonical tag to indicate which pages 
are duplicates.   You may not think you have duplicates, but a common 
example would be if you have a page, then you have the same page that's 
just sorted differently.  Or if you had a "print friendly" version of a 
page without menus and such.  The content is essentially the same (which 
search engines will see and think you're trying to stuff the ballot box 
and make your site look more relevant to that subject when really you're 
not).   So if you have:

domain.com/catalog.php?catid=55&prodid=23
and...
domain.com/catalog.php?catid=55&prodid=23&sort=alpha
or..
domain.com/catalog.php?catid=55&prodid=23&print=1

Then you'd want to set a canonical tag at the top of each of these listings 
that says:
domain.com/catalog.php?catid=55&prodid=23

(meaning that all these pages are the same as 
"domain.com/catalog.php?catid=55&prodid=23")

You may be saying that pages sorted differently are different output.  
True.. but it's all the same data in the end.  Even with pagination.



And the biggest thing you can do for SEO isn't really even PHP related.
Have good semantic markup.  Make sure it all validates and has a proper 
doctype assigned.  And make your content as organic and human as 
possible.  Don't write content for machines and search engines... don't 
try to "write to keywords" by making your content all awkward by stuffing 
as many keywords in as possible.   The search engines are pretty smart.  
Write good content and write it for humans... make it relevant to the 
topic and your audience and the search engines will see that and deliver 
it to your audience higher in search rankings.


There are other things, but these are some of the big ones.

-TG




- Original Message -
From: Gautam Bhatia 
To: php-general@lists.php.net
Date: Sun, 20 Dec 2009 12:15:45 -0500
Subject: [PHP] PHP and SEO Workarounds

> hey folks,
> This is in regards to SEO and PHP, From what i have
> read , most (Not all) the PHP Contents is dynamic , which makes it so
> powerfull , but it also means that chances of it being indexed in search
> engines are less , am i right in saying this ? . If so how do i optimize
> my site  for search engines which is being powered by PHP and content is
> Dynamic. Please guide in this regard. Thank you.
> 
> Regards,
> Gautam Bhatia
> mail2gautambha...@gmail.com
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and SEO Workarounds

2009-12-20 Thread Ashley Sheridan
On Sun, 2009-12-20 at 12:15 -0500, Gautam Bhatia wrote:

> hey folks,
> This is in regards to SEO and PHP, From what i have
> read , most (Not all) the PHP Contents is dynamic , which makes it so
> powerfull , but it also means that chances of it being indexed in search
> engines are less , am i right in saying this ? . If so how do i optimize
> my site  for search engines which is being powered by PHP and content is
> Dynamic. Please guide in this regard. Thank you.
> 
> Regards,
> Gautam Bhatia
> mail2gautambha...@gmail.com


This is a point you'll see mentioned by most SEO 'experts' none of whom
I've seen can provide any evidence of this. Just think about the last
time you searched for the answer to a question online. I'd hazard a
guess that the most popular results had dynamic URL's such as forum
posts, etc.

While it is true that the URL of a page has some weight to the pages
ranking, it's miniscule compared to the actual content of the page.
There might be an issue with blogs though, the ones where new old posts
get pushed to other pages. So a story that appears on blog.php?page=1
might tomorrow appear on page=2, and then page=3 the day after. If you
have a setup like this, then you could benefit from making more static
type links for the posts, like Wordpress does.

More important for your SEO is getting the content correctly marked up,
i.e. headings in  tags, alt text for images, etc. There's a good
tool for checking these sorts of things at http://nibbler.silktide.com 

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] PHP and XML

2009-11-22 Thread Sudheer Satyanarayana


What do you recommend me to produce XML from those news of the SQL 
database?. What do you suggest to output XML from the existing content 
to then put those XML files into Flash.


The posted news are saved in a MySQL database. I don't know if do I 
need to output from PHP then parse the output and convert it to XML, 
or if Do I need to get the array from the MySQL and directly output 
this to an XML file to then get from this file from Flash.
From your PHP script, query the database, obtain the results in an 
array or object. Using the result variable build the XML file.



--

With warm regards,
Sudheer. S
Tech stuff: http://techchorus.net - Pro PHP XML - Book Review
Business: http://binaryvibes.co.in


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and XML

2009-11-22 Thread Phpster
I would just use concatenations and strings to build the XML. It's not  
gonna matter to the flash swf when it gets the string as it will  
attempt the data as XML.

Bastien

Sent from my iPod

On Nov 22, 2009, at 2:27 PM, Juan Marcelo Rodríguez Monti r> wrote:



Hi people,
I have some doubts about this topic that I'm gonna explain.

I have a few sites in flash, and I was requested to write a PHP  
frontend to send news. I have this already done and it works  
perfect. It's a LAMP App to send and edit news, post video, images  
and so on.


Then, I need to put all this news into the Flash site. So, I need to  
use XML. I'm not gonna discuss about Flash, because this is a PHP  
List, however I would like to talk about PHP and XML.


What do you recommend me to produce XML from those news of the SQL  
database?. What do you suggest to output XML from the existing  
content to then put those XML files into Flash.


The posted news are saved in a MySQL database. I don't know if do I  
need to output from PHP then parse the output and convert it to XML,  
or if Do I need to get the array from the MySQL and directly output  
this to an XML file to then get from this file from Flash.


Thanks,
Juan.


--
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



[PHP] PHP and XML

2009-11-22 Thread Juan Marcelo Rodríguez Monti

Hi people,
I have some doubts about this topic that I'm gonna explain.

I have a few sites in flash, and I was requested to write a PHP frontend 
to send news. I have this already done and it works perfect. It's a LAMP 
App to send and edit news, post video, images and so on.


Then, I need to put all this news into the Flash site. So, I need to use 
XML. I'm not gonna discuss about Flash, because this is a PHP List, 
however I would like to talk about PHP and XML.


What do you recommend me to produce XML from those news of the SQL 
database?. What do you suggest to output XML from the existing content 
to then put those XML files into Flash.


The posted news are saved in a MySQL database. I don't know if do I need 
to output from PHP then parse the output and convert it to XML, or if Do 
I need to get the array from the MySQL and directly output this to an 
XML file to then get from this file from Flash.


Thanks,
Juan.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and Javascript escape character problem, --> those who like to solve things can try to solve this issue, its tricky I think ;)

2009-11-02 Thread Devendra Jadhav
:)

On Mon, Nov 2, 2009 at 4:56 PM, acetrader  wrote:

>
> lol thank you very much guys :) the escape character worked and now its
> accepting my javascript functions, thank you all very much :)
> :jumping::jumping:
> --
> View this message in context:
> http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156680.html
> Sent from the PHP - General mailing list archive at Nabble.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Devendra Jadhav


Re: [PHP] PHP and Javascript escape character problem, --> those who like to solve things can try to solve this issue, its tricky I think ;)

2009-11-02 Thread acetrader

lol thank you very much guys :) the escape character worked and now its
accepting my javascript functions, thank you all very much :)
:jumping::jumping:
-- 
View this message in context: 
http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156680.html
Sent from the PHP - General mailing list archive at Nabble.com.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and Javascript escape character problem, --> those who like to solve things can try to solve this issue, its tricky I think ;)

2009-11-02 Thread Ashley Sheridan
On Mon, 2009-11-02 at 16:51 +0530, Devendra Jadhav wrote:

> Ashley Sheridan:
> > btw: I know I've written onClik wrong but I wrote it this way in this
> forum
> > cause it wouldn't let me post my thread because it regards it as an
> illegal
> > tag lol. B-)B-)
> 
> :D
> 
> 
> On Mon, Nov 2, 2009 at 4:38 PM, Ashley Sheridan 
> wrote:
> 
> > On Mon, 2009-11-02 at 00:53 -0800, acetrader wrote:
> >
> > > Hi there,
> > >
> > > I am doing an application that allows me to create RSS channels and put
> > > feeds inside of each channel. Everything works so far, but - now I have
> > > started to do the 'Edit Channel', 'Edit Feed', 'Delete Channel' and
> > 'Delete
> > > Feed' functionalities and have run into a problem. For me its a big
> > problem
> > > cause Im not a guru programmer but for you out there it may be a piece of
> > > cake.
> > >
> > > I have the following line of code:
> > >
> > > $myFeedHTML .="
> > $feedItemImagePath 
> > >   > > onClik='javascript:DeleteChannelAndAllOfItsFeeds()' />   > > />DELETE";
> > >
> > > In $myFeedHTML I'am always appending new HTML data to it, in this case
> > I'am
> > > appending a table row/header row that has an image in it and underneath
> > the
> > > image it has two buttons, one is for the EDIT functionality and the other
> > is
> > > for the DELETE functionality.
> > >
> > > Now... notice the onClik events ->
> > > onClik='javascript:DeleteChannelAndAllOfItsFeeds()'. I ususally use
> > that
> > > method to call a javascript function from within a button or a
> > linkand
> > > like this is works (on its own - ie when its not being appended as a
> > normal
> > > string to the variable $myFeedHTML).
> > >
> > > But...When it is appended to a variable so that I echo everything at once
> > in
> > > the end, the onClik action must be included inside a " (double quotes)
> > and
> > > inside  ' (single quotes) so that it can be appeneded to the string, now
> > > when this is being done everything gets mixed because of of all the " and
> > '
> > > thus the program thinks that these are normal escape characters and just
> > > skips over the javascript call function that is nested within the onClik
> > > event. So the onClik is not getting a function assigned to it. (you can
> > see
> > > this in the code I've pasted above)
> > >
> > > What can I do in order to append it to my $myFeedHTML variable and at the
> > > same time have it assigend a javascript function inside of its
> > EDIT/DELETE
> > > button onClik event ?
> > >
> > > Can you give me some example maybe etc ?
> > >
> > > Image Preview:
> > >
> > > http://old.nabble.com/file/p26156627/my%2BEscape%2BProblem.jpg
> > >
> > > btw: I know I've written onClik wrong but I wrote it this way in this
> > forum
> > > cause it wouldn't let me post my thread because it regards it as an
> > illegal
> > > tag lol. B-)B-)
> > >
> > > Thank you very much :) ,
> > > The Ace
> > >
> > >
> > > --
> > > View this message in context:
> > http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156627.html
> > > Sent from the PHP - General mailing list archive at Nabble.com.
> > >
> > >
> >
> >
> > I've noticed also that in your code you've always referred to onclik,
> > when it should be onclick. I hope this was just a typo in the email!
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
> 
> 


oops, lol!

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] PHP and Javascript escape character problem, --> those who like to solve things can try to solve this issue, its tricky I think ;)

2009-11-02 Thread Devendra Jadhav
Ashley Sheridan:
> btw: I know I've written onClik wrong but I wrote it this way in this
forum
> cause it wouldn't let me post my thread because it regards it as an
illegal
> tag lol. B-)B-)

:D


On Mon, Nov 2, 2009 at 4:38 PM, Ashley Sheridan 
wrote:

> On Mon, 2009-11-02 at 00:53 -0800, acetrader wrote:
>
> > Hi there,
> >
> > I am doing an application that allows me to create RSS channels and put
> > feeds inside of each channel. Everything works so far, but - now I have
> > started to do the 'Edit Channel', 'Edit Feed', 'Delete Channel' and
> 'Delete
> > Feed' functionalities and have run into a problem. For me its a big
> problem
> > cause Im not a guru programmer but for you out there it may be a piece of
> > cake.
> >
> > I have the following line of code:
> >
> > $myFeedHTML .="
> $feedItemImagePath 
> >   > onClik='javascript:DeleteChannelAndAllOfItsFeeds()' />   > />DELETE";
> >
> > In $myFeedHTML I'am always appending new HTML data to it, in this case
> I'am
> > appending a table row/header row that has an image in it and underneath
> the
> > image it has two buttons, one is for the EDIT functionality and the other
> is
> > for the DELETE functionality.
> >
> > Now... notice the onClik events ->
> > onClik='javascript:DeleteChannelAndAllOfItsFeeds()'. I ususally use
> that
> > method to call a javascript function from within a button or a
> linkand
> > like this is works (on its own - ie when its not being appended as a
> normal
> > string to the variable $myFeedHTML).
> >
> > But...When it is appended to a variable so that I echo everything at once
> in
> > the end, the onClik action must be included inside a " (double quotes)
> and
> > inside  ' (single quotes) so that it can be appeneded to the string, now
> > when this is being done everything gets mixed because of of all the " and
> '
> > thus the program thinks that these are normal escape characters and just
> > skips over the javascript call function that is nested within the onClik
> > event. So the onClik is not getting a function assigned to it. (you can
> see
> > this in the code I've pasted above)
> >
> > What can I do in order to append it to my $myFeedHTML variable and at the
> > same time have it assigend a javascript function inside of its
> EDIT/DELETE
> > button onClik event ?
> >
> > Can you give me some example maybe etc ?
> >
> > Image Preview:
> >
> > http://old.nabble.com/file/p26156627/my%2BEscape%2BProblem.jpg
> >
> > btw: I know I've written onClik wrong but I wrote it this way in this
> forum
> > cause it wouldn't let me post my thread because it regards it as an
> illegal
> > tag lol. B-)B-)
> >
> > Thank you very much :) ,
> > The Ace
> >
> >
> > --
> > View this message in context:
> http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156627.html
> > Sent from the PHP - General mailing list archive at Nabble.com.
> >
> >
>
>
> I've noticed also that in your code you've always referred to onclik,
> when it should be onclick. I hope this was just a typo in the email!
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>


-- 
Devendra Jadhav


Re: [PHP] PHP and Javascript escape character problem, --> those who like to solve things can try to solve this issue, its tricky I think ;)

2009-11-02 Thread Stuart
2009/11/2 Ashley Sheridan :
> On Mon, 2009-11-02 at 00:53 -0800, acetrader wrote:
>
>> Hi there,
>>
>> I am doing an application that allows me to create RSS channels and put
>> feeds inside of each channel. Everything works so far, but - now I have
>> started to do the 'Edit Channel', 'Edit Feed', 'Delete Channel' and 'Delete
>> Feed' functionalities and have run into a problem. For me its a big problem
>> cause Im not a guru programmer but for you out there it may be a piece of
>> cake.
>>
>> I have the following line of code:
>>
>> $myFeedHTML .=        " $feedItemImagePath 
>> 
>>  > onClik='javascript:DeleteChannelAndAllOfItsFeeds()' />  > />DELETE";
>>
>> In $myFeedHTML I'am always appending new HTML data to it, in this case I'am
>> appending a table row/header row that has an image in it and underneath the
>> image it has two buttons, one is for the EDIT functionality and the other is
>> for the DELETE functionality.
>>
>> Now... notice the onClik events ->
>> onClik='javascript:DeleteChannelAndAllOfItsFeeds()'    . I ususally use that
>> method to call a javascript function from within a button or a linkand
>> like this is works (on its own - ie when its not being appended as a normal
>> string to the variable $myFeedHTML).
>>
>> But...When it is appended to a variable so that I echo everything at once in
>> the end, the onClik action must be included inside a " (double quotes) and
>> inside  ' (single quotes) so that it can be appeneded to the string, now
>> when this is being done everything gets mixed because of of all the " and '
>> thus the program thinks that these are normal escape characters and just
>> skips over the javascript call function that is nested within the onClik
>> event. So the onClik is not getting a function assigned to it. (you can see
>> this in the code I've pasted above)
>>
>> What can I do in order to append it to my $myFeedHTML variable and at the
>> same time have it assigend a javascript function inside of its EDIT/DELETE
>> button onClik event ?
>>
>> Can you give me some example maybe etc ?
>>
>> Image Preview:
>>
>> http://old.nabble.com/file/p26156627/my%2BEscape%2BProblem.jpg
>>
>> btw: I know I've written onClik wrong but I wrote it this way in this forum
>> cause it wouldn't let me post my thread because it regards it as an illegal
>> tag lol. B-)B-)
>>
>> Thank you very much :) ,
>> The Ace
>>
>>
>> --
>> View this message in context: 
>> http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156627.html
>> Sent from the PHP - General mailing list archive at Nabble.com.
>>
>>
>
>
> I've noticed also that in your code you've always referred to onclik,
> when it should be onclick. I hope this was just a typo in the email!

I've noticed also that you didn't read his email properly. I hope that
was just an oversight.

-Stuart

-- 
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and Javascript escape character problem, --> those who like to solve things can try to solve this issue, its tricky I think ;)

2009-11-02 Thread Ashley Sheridan
On Mon, 2009-11-02 at 00:53 -0800, acetrader wrote:

> Hi there,
> 
> I am doing an application that allows me to create RSS channels and put
> feeds inside of each channel. Everything works so far, but - now I have
> started to do the 'Edit Channel', 'Edit Feed', 'Delete Channel' and 'Delete
> Feed' functionalities and have run into a problem. For me its a big problem
> cause Im not a guru programmer but for you out there it may be a piece of
> cake.
> 
> I have the following line of code:
> 
> $myFeedHTML .=" $feedItemImagePath 
> 
>   onClik='javascript:DeleteChannelAndAllOfItsFeeds()' />   />DELETE";
> 
> In $myFeedHTML I'am always appending new HTML data to it, in this case I'am
> appending a table row/header row that has an image in it and underneath the
> image it has two buttons, one is for the EDIT functionality and the other is
> for the DELETE functionality.
> 
> Now... notice the onClik events ->
> onClik='javascript:DeleteChannelAndAllOfItsFeeds()'. I ususally use that
> method to call a javascript function from within a button or a linkand
> like this is works (on its own - ie when its not being appended as a normal
> string to the variable $myFeedHTML). 
> 
> But...When it is appended to a variable so that I echo everything at once in
> the end, the onClik action must be included inside a " (double quotes) and
> inside  ' (single quotes) so that it can be appeneded to the string, now
> when this is being done everything gets mixed because of of all the " and '
> thus the program thinks that these are normal escape characters and just
> skips over the javascript call function that is nested within the onClik
> event. So the onClik is not getting a function assigned to it. (you can see
> this in the code I've pasted above)
> 
> What can I do in order to append it to my $myFeedHTML variable and at the
> same time have it assigend a javascript function inside of its EDIT/DELETE
> button onClik event ?
> 
> Can you give me some example maybe etc ?
> 
> Image Preview: 
> 
> http://old.nabble.com/file/p26156627/my%2BEscape%2BProblem.jpg 
> 
> btw: I know I've written onClik wrong but I wrote it this way in this forum
> cause it wouldn't let me post my thread because it regards it as an illegal
> tag lol. B-)B-)
> 
> Thank you very much :) ,
> The Ace
> 
> 
> -- 
> View this message in context: 
> http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156627.html
> Sent from the PHP - General mailing list archive at Nabble.com.
> 
> 


I've noticed also that in your code you've always referred to onclik,
when it should be onclick. I hope this was just a typo in the email!

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] PHP and Javascript escape character problem, --> those who like to solve things can try to solve this issue, its tricky I think ;)

2009-11-02 Thread Devendra Jadhav
Hey,
You can do it this way as well
$myFeedHTML .=  " $feedItemImagePath 
 
> DeleteChannelAndAllOfItsFeeds()\" />   />DELETE";


So you can escape double quotes by \ (slash)
try this .. It will work...
you can escape any special character that you want to use as it is by
prepend it by \

On Mon, Nov 2, 2009 at 2:23 PM, acetrader  wrote:

>
> Hi there,
>
> I am doing an application that allows me to create RSS channels and put
> feeds inside of each channel. Everything works so far, but - now I have
> started to do the 'Edit Channel', 'Edit Feed', 'Delete Channel' and 'Delete
> Feed' functionalities and have run into a problem. For me its a big problem
> cause Im not a guru programmer but for you out there it may be a piece of
> cake.
>
> I have the following line of code:
>
> $myFeedHTML .=  " $feedItemImagePath 
>   onClik='javascript:DeleteChannelAndAllOfItsFeeds()' />   />DELETE";
>
> In $myFeedHTML I'am always appending new HTML data to it, in this case I'am
> appending a table row/header row that has an image in it and underneath the
> image it has two buttons, one is for the EDIT functionality and the other
> is
> for the DELETE functionality.
>
> Now... notice the onClik events ->
> onClik='javascript:DeleteChannelAndAllOfItsFeeds()'. I ususally use
> that
> method to call a javascript function from within a button or a linkand
> like this is works (on its own - ie when its not being appended as a normal
> string to the variable $myFeedHTML).
>
> But...When it is appended to a variable so that I echo everything at once
> in
> the end, the onClik action must be included inside a " (double quotes) and
> inside  ' (single quotes) so that it can be appeneded to the string, now
> when this is being done everything gets mixed because of of all the " and '
> thus the program thinks that these are normal escape characters and just
> skips over the javascript call function that is nested within the onClik
> event. So the onClik is not getting a function assigned to it. (you can see
> this in the code I've pasted above)
>
> What can I do in order to append it to my $myFeedHTML variable and at the
> same time have it assigend a javascript function inside of its EDIT/DELETE
> button onClik event ?
>
> Can you give me some example maybe etc ?
>
> Image Preview:
>
> http://old.nabble.com/file/p26156627/my%2BEscape%2BProblem.jpg
>
> btw: I know I've written onClik wrong but I wrote it this way in this forum
> cause it wouldn't let me post my thread because it regards it as an illegal
> tag lol. B-)B-)
>
> Thank you very much :) ,
> The Ace
>
>
> --
> View this message in context:
> http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156627.html
> Sent from the PHP - General mailing list archive at Nabble.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Devendra Jadhav


[PHP] PHP and Javascript escape character problem, --> those who like to solve things can try to solve this issue, its tricky I think ;)

2009-11-02 Thread acetrader

Hi there,

I am doing an application that allows me to create RSS channels and put
feeds inside of each channel. Everything works so far, but - now I have
started to do the 'Edit Channel', 'Edit Feed', 'Delete Channel' and 'Delete
Feed' functionalities and have run into a problem. For me its a big problem
cause Im not a guru programmer but for you out there it may be a piece of
cake.

I have the following line of code:

$myFeedHTML .=  " $feedItemImagePath 
   DELETE";

In $myFeedHTML I'am always appending new HTML data to it, in this case I'am
appending a table row/header row that has an image in it and underneath the
image it has two buttons, one is for the EDIT functionality and the other is
for the DELETE functionality.

Now... notice the onClik events ->
onClik='javascript:DeleteChannelAndAllOfItsFeeds()'. I ususally use that
method to call a javascript function from within a button or a linkand
like this is works (on its own - ie when its not being appended as a normal
string to the variable $myFeedHTML). 

But...When it is appended to a variable so that I echo everything at once in
the end, the onClik action must be included inside a " (double quotes) and
inside  ' (single quotes) so that it can be appeneded to the string, now
when this is being done everything gets mixed because of of all the " and '
thus the program thinks that these are normal escape characters and just
skips over the javascript call function that is nested within the onClik
event. So the onClik is not getting a function assigned to it. (you can see
this in the code I've pasted above)

What can I do in order to append it to my $myFeedHTML variable and at the
same time have it assigend a javascript function inside of its EDIT/DELETE
button onClik event ?

Can you give me some example maybe etc ?

Image Preview: 

http://old.nabble.com/file/p26156627/my%2BEscape%2BProblem.jpg 

btw: I know I've written onClik wrong but I wrote it this way in this forum
cause it wouldn't let me post my thread because it regards it as an illegal
tag lol. B-)B-)

Thank you very much :) ,
The Ace


-- 
View this message in context: 
http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156627.html
Sent from the PHP - General mailing list archive at Nabble.com.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php and ODBC

2009-09-04 Thread Marc Fromm
I am trying to figure out how to use ODBC with PHP.
Specifically I need to connect a php script to a SunGard Banner table
I know I need to set up some type of DNS connection, but I am not sure what 
exactly that is.

[r...@dev ~]$ odbcinst -j
unixODBC 2.2.11
DRIVERS: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
USER DATA SOURCES..: /root/.odbc.ini

/etc/odbcinst.ini
  1 # Example driver definitinions
  2 #
  3 #
  4
  5 # Included in the unixODBC package
  6 [PostgreSQL]
  7 Description = ODBC for PostgreSQL
  8 Driver  = /usr/lib/libodbcpsql.so
  9 Setup   = /usr/lib/libodbcpsqlS.so
 10 FileUsage   = 1
 11
 12
 13 # Driver from the MyODBC package
 14 # Setup from the unixODBC package
 15 #[MySQL]
 16 #Description= ODBC for MySQL
 17 #Driver = /usr/lib/libmyodbc.so
 18 #Setup  = /usr/lib/libodbcmyS.so
 19 #FileUsage  = 1

Thanks,

Marc



Re: [PHP] PHP and CGI

2009-08-20 Thread sono-io

Hi Tedd,


In your .htacess file add this:

# handler for phpsuexec. -- makes following prefixes considered for  
php


SetHandler application/x-httpd-php




	Thanks for the code.  I placed it in the .htaccess file for the  
output templates, but unfortunately it didn't work.  It just prints  
out part of the PHP code on the template:


 / '; for ($year = date("Y") ; $year <= date("Y") + 9 ; $year++)  
{ echo "$year\n"; } echo ''; ?>


	Thanks also to everyone else who responded as well.  I'm off to find  
a PHP shopping cart!


Frank

Re: [PHP] PHP and CGI

2009-08-19 Thread tedd

At 5:10 PM -0700 8/18/09, sono...@fannullone.us wrote:
	I've searched high and low for an answer to this.  Hopefully 
someone here might know.  Can PHP be used under a CGI?  I tried to 
put the following code on one of my perl shopping cart pages but it 
doesn't work:


";
for ($year = date("Y") ; $year <= date("Y") + 8 ; $year++) {
echo "$year\n";
}
echo "";
?>

	 It works fine on a .php page.  I know that SSI will not work 
under CGI, so maybe it's the same for PHP.  Is there anyway to get 
this to work?


Thanks,
Frank



Frank:

I won't guarantee that this will work, but it's worth a try.

In your .htacess file add this:

# handler for phpsuexec. -- makes following prefixes considered for php

 SetHandler application/x-httpd-php


If it works, let me know.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP and CGI

2009-08-18 Thread Daevid Vincent
 

> -Original Message-
> From: sono...@fannullone.us [mailto:sono...@fannullone.us] 
> Sent: Tuesday, August 18, 2009 5:10 PM
> To: PHP General List
> Subject: [PHP] PHP and CGI
> 
>   I've searched high and low for an answer to this.  
> Hopefully someone  
> here might know.  Can PHP be used under a CGI?  I tried to put the  
> following code on one of my perl shopping cart pages but it doesn't  
> work:
> 
>  echo "";
> for ($year = date("Y") ; $year <= date("Y") + 8 ; $year++) {
>   echo "$year\n";
> }
> echo "";
> ?>
> 
>It works fine on a .php page.  I know that SSI will 
> not work under  
> CGI, so maybe it's the same for PHP.  Is there anyway to get this to  
> work?

Well, if you already have the page coded in Perl, why not just write those 5
lines in perl?!

It's a straight up for loop basically and some print statements. You're not
hitting a database or using anything remotely PHP-esque there.

I'm not so sure you can just mix and match parsers. I recall years ago some
talk of doing this, but I think it's just so rare and really impractical
that it's not worth setting up even if you can do it with some Apache magic.
Stick to one pre-processor language. Either all PHP or all Perl but not
both.

Daevid.

"Some people, when confronted with a problem, think 'I know, I'll use XML.'"
Now they have two problems. 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP and CGI

2009-08-18 Thread sono-io
	I've searched high and low for an answer to this.  Hopefully someone  
here might know.  Can PHP be used under a CGI?  I tried to put the  
following code on one of my perl shopping cart pages but it doesn't  
work:


";
for ($year = date("Y") ; $year <= date("Y") + 8 ; $year++) {
echo "$year\n";
}
echo "";
?>

	 It works fine on a .php page.  I know that SSI will not work under  
CGI, so maybe it's the same for PHP.  Is there anyway to get this to  
work?


Thanks,
Frank

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and FoxPro

2009-07-21 Thread Floyd Resler

Matt,
	Thanks for the tip on handling memos.  I always thought, "If I could  
just append to the end of the existing string..." but never figured  
out how to do it.  I'll give your method a shot.


Thanks!
Floyd

On Jul 21, 2009, at 2:04 PM, Matt Neimeyer wrote:


What I did to handle memos... and it's a HACK... was to create a
function DoMemo that took as arguments the table, the primary key
field of the table, the value of said pk, the field to update, and the
string.

Take the first 200 characters of the string.
Replace all newlines in that substring with "+CHR(13)+" (Or  
CHR(13)+CHR(10)?)
Then do something like: UPDATE table SET field=First200 WHERE  
pk=pkvalue


Then take the next 200 characters of the string.
Replace all newlines as above
Do something like: UPDATE table SET field=ALLTRIM(field)+Next200 WHERE
pk=pkvalue

Repeat until you've "consumed" the entire string. This works because
you never put in more that 250 odd characters at a time. It can still
fail though if you have enough newlines to push your 200 characters up
over the 250 odd character limit.

It DOES work if you use RECNO() as the pk field and the appropriate
recno() that you would get if you did something like SELECT recno() AS
myrecno,* FROM sometable (I use the myrecno because otherwise you get
some weird exp_1 field name)

It just popped into my head... I wonder if something like this would  
work...


UPDATE sometable SET a=1,a=a+1,a=a+1,a=a+1 WHERE x=y

You might be able to limit the total number of calls to the database
that way... If I wasn't in the process of migrating to MySQL I might
give it a whirl... :)

Hope this helps whatever you decide to do.

On Tue, Jul 21, 2009 at 8:27 AM, Floyd Resler  
wrote:

Matt,
   Thanks for the information.  I'll look into using ODBTP.  I  
noticed
you mentioned the problem with memos.  I currently have that  
problem with

the set up we're using and it is a pain!

Thanks!
Floyd

On Jul 20, 2009, at 3:22 PM, Matt Neimeyer wrote:

We currently use the Easysoft ODBC Bridge to connect to a remote  
FoxPro

database.  The problem is that the bridge, after a while, starts
consuming a
ton of system resources and we have to reboot the machine.   
Afterwards,

it
can take upwards to two hours before everything is running  
quickly again.
We need another solution.  Does anyone know of a any other way to  
connect
to a remote FoxPro database (or any ODBC source that isn't a  
database

server)?


We've had a LOT a luck using ODBTP. Which can be found at
http://odbtp.sourceforge.net

Here's the rough outline...

1. Install Visual FoxPro odbc driver (or whatever drivers you  
want) on

a Windows machine.
2. Install the ODBTP Server on the windows machine
3. Install a PHP module in your php. (Common ones included in the
download)
4. Once you connect the functions are ALMOST exactly the same in  
usage

as the mysql_xyz functions.

A couple gotchas:

1. If you need to compile the PHP ODBTP module from source on x64  
(OS

X Leopard at least) it can be a pain.
2. The VFP 6.0 ODBC driver (not sure about higher versions) does not
allow more than 250 odd characters to be inserted at a single time  
so

memo's can be a PAIN.
3. It does require a port be opened on the Windows machine's
firewall... (Uses TCP/IP for communication)
4. By default the ODBTP server can use up to 32 threads. The VFP  
ODBC

driver is by nature single threaded. We've never had a problem with
that directly but I assume it is what causes threads to slowly hang
and disappear... eventually a message comes up "Unable to create
thread". At that point you simply need to restart the ODBTP  
service in
the Windows Services Control Panel. The bigger the tables and the  
more

heavily used it is the more often this will happen.

Other than that... Works like a charm. Looking forward, once you  
bite

the bullet and convert to MySQL (at least for us) you can almost
change odbtp_ to mysql_ and be up and running. (Assuming you limit
yourself to "pure" SQL and not invoke VFP functions.)

Matt









--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and FoxPro

2009-07-21 Thread Matt Neimeyer
What I did to handle memos... and it's a HACK... was to create a
function DoMemo that took as arguments the table, the primary key
field of the table, the value of said pk, the field to update, and the
string.

Take the first 200 characters of the string.
Replace all newlines in that substring with "+CHR(13)+" (Or CHR(13)+CHR(10)?)
Then do something like: UPDATE table SET field=First200 WHERE pk=pkvalue

Then take the next 200 characters of the string.
Replace all newlines as above
Do something like: UPDATE table SET field=ALLTRIM(field)+Next200 WHERE
pk=pkvalue

Repeat until you've "consumed" the entire string. This works because
you never put in more that 250 odd characters at a time. It can still
fail though if you have enough newlines to push your 200 characters up
over the 250 odd character limit.

It DOES work if you use RECNO() as the pk field and the appropriate
recno() that you would get if you did something like SELECT recno() AS
myrecno,* FROM sometable (I use the myrecno because otherwise you get
some weird exp_1 field name)

It just popped into my head... I wonder if something like this would work...

UPDATE sometable SET a=1,a=a+1,a=a+1,a=a+1 WHERE x=y

You might be able to limit the total number of calls to the database
that way... If I wasn't in the process of migrating to MySQL I might
give it a whirl... :)

Hope this helps whatever you decide to do.

On Tue, Jul 21, 2009 at 8:27 AM, Floyd Resler wrote:
> Matt,
>        Thanks for the information.  I'll look into using ODBTP.  I noticed
> you mentioned the problem with memos.  I currently have that problem with
> the set up we're using and it is a pain!
>
> Thanks!
> Floyd
>
> On Jul 20, 2009, at 3:22 PM, Matt Neimeyer wrote:
>
>>> We currently use the Easysoft ODBC Bridge to connect to a remote FoxPro
>>> database.  The problem is that the bridge, after a while, starts
>>> consuming a
>>> ton of system resources and we have to reboot the machine.  Afterwards,
>>> it
>>> can take upwards to two hours before everything is running quickly again.
>>> We need another solution.  Does anyone know of a any other way to connect
>>> to a remote FoxPro database (or any ODBC source that isn't a database
>>> server)?
>>
>> We've had a LOT a luck using ODBTP. Which can be found at
>> http://odbtp.sourceforge.net
>>
>> Here's the rough outline...
>>
>> 1. Install Visual FoxPro odbc driver (or whatever drivers you want) on
>> a Windows machine.
>> 2. Install the ODBTP Server on the windows machine
>> 3. Install a PHP module in your php. (Common ones included in the
>> download)
>> 4. Once you connect the functions are ALMOST exactly the same in usage
>> as the mysql_xyz functions.
>>
>> A couple gotchas:
>>
>> 1. If you need to compile the PHP ODBTP module from source on x64 (OS
>> X Leopard at least) it can be a pain.
>> 2. The VFP 6.0 ODBC driver (not sure about higher versions) does not
>> allow more than 250 odd characters to be inserted at a single time so
>> memo's can be a PAIN.
>> 3. It does require a port be opened on the Windows machine's
>> firewall... (Uses TCP/IP for communication)
>> 4. By default the ODBTP server can use up to 32 threads. The VFP ODBC
>> driver is by nature single threaded. We've never had a problem with
>> that directly but I assume it is what causes threads to slowly hang
>> and disappear... eventually a message comes up "Unable to create
>> thread". At that point you simply need to restart the ODBTP service in
>> the Windows Services Control Panel. The bigger the tables and the more
>> heavily used it is the more often this will happen.
>>
>> Other than that... Works like a charm. Looking forward, once you bite
>> the bullet and convert to MySQL (at least for us) you can almost
>> change odbtp_ to mysql_ and be up and running. (Assuming you limit
>> yourself to "pure" SQL and not invoke VFP functions.)
>>
>> Matt
>>
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and FoxPro

2009-07-21 Thread Floyd Resler

Matt,
	Thanks for the information.  I'll look into using ODBTP.  I noticed  
you mentioned the problem with memos.  I currently have that problem  
with the set up we're using and it is a pain!


Thanks!
Floyd

On Jul 20, 2009, at 3:22 PM, Matt Neimeyer wrote:

We currently use the Easysoft ODBC Bridge to connect to a remote  
FoxPro
database.  The problem is that the bridge, after a while, starts  
consuming a
ton of system resources and we have to reboot the machine.   
Afterwards, it
can take upwards to two hours before everything is running quickly  
again.
We need another solution.  Does anyone know of a any other way to  
connect

to a remote FoxPro database (or any ODBC source that isn't a database
server)?


We've had a LOT a luck using ODBTP. Which can be found at
http://odbtp.sourceforge.net

Here's the rough outline...

1. Install Visual FoxPro odbc driver (or whatever drivers you want) on
a Windows machine.
2. Install the ODBTP Server on the windows machine
3. Install a PHP module in your php. (Common ones included in the  
download)

4. Once you connect the functions are ALMOST exactly the same in usage
as the mysql_xyz functions.

A couple gotchas:

1. If you need to compile the PHP ODBTP module from source on x64 (OS
X Leopard at least) it can be a pain.
2. The VFP 6.0 ODBC driver (not sure about higher versions) does not
allow more than 250 odd characters to be inserted at a single time so
memo's can be a PAIN.
3. It does require a port be opened on the Windows machine's
firewall... (Uses TCP/IP for communication)
4. By default the ODBTP server can use up to 32 threads. The VFP ODBC
driver is by nature single threaded. We've never had a problem with
that directly but I assume it is what causes threads to slowly hang
and disappear... eventually a message comes up "Unable to create
thread". At that point you simply need to restart the ODBTP service in
the Windows Services Control Panel. The bigger the tables and the more
heavily used it is the more often this will happen.

Other than that... Works like a charm. Looking forward, once you bite
the bullet and convert to MySQL (at least for us) you can almost
change odbtp_ to mysql_ and be up and running. (Assuming you limit
yourself to "pure" SQL and not invoke VFP functions.)

Matt




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and FoxPro

2009-07-20 Thread Matt Neimeyer
> We currently use the Easysoft ODBC Bridge to connect to a remote FoxPro
> database.  The problem is that the bridge, after a while, starts consuming a
> ton of system resources and we have to reboot the machine.  Afterwards, it
> can take upwards to two hours before everything is running quickly again.
>  We need another solution.  Does anyone know of a any other way to connect
> to a remote FoxPro database (or any ODBC source that isn't a database
> server)?

We've had a LOT a luck using ODBTP. Which can be found at
http://odbtp.sourceforge.net

Here's the rough outline...

1. Install Visual FoxPro odbc driver (or whatever drivers you want) on
a Windows machine.
2. Install the ODBTP Server on the windows machine
3. Install a PHP module in your php. (Common ones included in the download)
4. Once you connect the functions are ALMOST exactly the same in usage
as the mysql_xyz functions.

A couple gotchas:

1. If you need to compile the PHP ODBTP module from source on x64 (OS
X Leopard at least) it can be a pain.
2. The VFP 6.0 ODBC driver (not sure about higher versions) does not
allow more than 250 odd characters to be inserted at a single time so
memo's can be a PAIN.
3. It does require a port be opened on the Windows machine's
firewall... (Uses TCP/IP for communication)
4. By default the ODBTP server can use up to 32 threads. The VFP ODBC
driver is by nature single threaded. We've never had a problem with
that directly but I assume it is what causes threads to slowly hang
and disappear... eventually a message comes up "Unable to create
thread". At that point you simply need to restart the ODBTP service in
the Windows Services Control Panel. The bigger the tables and the more
heavily used it is the more often this will happen.

Other than that... Works like a charm. Looking forward, once you bite
the bullet and convert to MySQL (at least for us) you can almost
change odbtp_ to mysql_ and be up and running. (Assuming you limit
yourself to "pure" SQL and not invoke VFP functions.)

Matt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and FoxPro

2009-07-20 Thread Floyd Resler

Paul,
	Believe me I would like nothing more that to get rid of FoxPro and  
convert it to MySQL.  Sadly, that's not possible right now. I'll check  
into dBase.


Thanks!
Floyd

On Jul 19, 2009, at 4:53 PM, Paul M Foster wrote:


On Sun, Jul 19, 2009 at 09:00:49AM -0400, Floyd Resler wrote:


We currently use the Easysoft ODBC Bridge to connect to a remote
FoxPro database.  The problem is that the bridge, after a while,
starts consuming a ton of system resources and we have to reboot the
machine.  Afterwards, it can take upwards to two hours before
everything is running quickly again.  We need another solution.  Does
anyone know of a any other way to connect to a remote FoxPro database
(or any ODBC source that isn't a database server)?


No way to convert the FoxPro to PostgreSQL or MySQL? FoxPro is ancient
and decrepit (I used to code in FoxPro).

There is a dBase module for PHP. I don't know if it handles generic
xBase files. I don't know much about the module, but you could check  
it

out.

Paul
--
Paul M. Foster

--
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



Re: [PHP] PHP and FoxPro

2009-07-19 Thread Paul M Foster
On Sun, Jul 19, 2009 at 09:00:49AM -0400, Floyd Resler wrote:

> We currently use the Easysoft ODBC Bridge to connect to a remote
> FoxPro database.  The problem is that the bridge, after a while,
> starts consuming a ton of system resources and we have to reboot the
> machine.  Afterwards, it can take upwards to two hours before
> everything is running quickly again.  We need another solution.  Does
> anyone know of a any other way to connect to a remote FoxPro database
> (or any ODBC source that isn't a database server)?

No way to convert the FoxPro to PostgreSQL or MySQL? FoxPro is ancient
and decrepit (I used to code in FoxPro).

There is a dBase module for PHP. I don't know if it handles generic
xBase files. I don't know much about the module, but you could check it
out.

Paul
-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP and FoxPro

2009-07-19 Thread Floyd Resler
We currently use the Easysoft ODBC Bridge to connect to a remote  
FoxPro database.  The problem is that the bridge, after a while,  
starts consuming a ton of system resources and we have to reboot the  
machine.  Afterwards, it can take upwards to two hours before  
everything is running quickly again.  We need another solution.  Does  
anyone know of a any other way to connect to a remote FoxPro database  
(or any ODBC source that isn't a database server)?


Thanks!
Floyd


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php and regex help or advice

2009-06-17 Thread Martin Scotta
HTML usually change very often. Especially properties.

A link can change from: Home
to: Home

So, your regex must avoid using the properties to match elements

So, I think this should be a better expresion

preg_match_all(
   '#]*>]*>(.+)(.+)(.+)Critical Violations
Found:#imsU',
   $html, // <-- your variable with the text
   $match // <-- here PHP sets the matches
);

print_r( $match );  // <-- take a look at the results, loop over these are
quite easy

http://php.net/manual/en/function.preg-match-all.php

Also using # as delimiter leaves you the / for simpler use, avoiding an
extra backslash.

On Wed, Jun 17, 2009 at 12:03 PM, Miller, Terion <
tmil...@springfi.gannett.com> wrote:

> Hi Everyone,
> Ok, so I've been plunged further into using php by being tasked to use it
> with regex (yes tylenol extra strength needed please) So far I have my code
> that grabs a full block of text by paragraphs, now I have to somehow write
> a
> snippet that goes inside this block and pulls out each line and puts each
> line in a db, the different lines of text are broken with  tags so that
> should be fairly simple? Right, here is what I have so far, I have played
> with some of the regex tester tools online but am not having any luck once
> inside the first block, which makes me think I'm doing it wrong.
>
> My wobbley code thus far I know it must have a long way to go:
> This grabs everything paragraph by paragraph:
>  $results = preg_match_all('/(.+)(.+)(.+)Critical Violations Found:/imsU');
>
>
> Now I need to grab each line in the paragraph and am stuck:.
>
> //---at some point I have to strip the tags off of what will be put in the
> db--//
> $raw = strip_tags($results);
>
>
> echo $raw;
> ?>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Martin Scotta


[PHP] Php and regex help or advice

2009-06-17 Thread Miller, Terion
Hi Everyone, 
Ok, so I've been plunged further into using php by being tasked to use it
with regex (yes tylenol extra strength needed please) So far I have my code
that grabs a full block of text by paragraphs, now I have to somehow write a
snippet that goes inside this block and pulls out each line and puts each
line in a db, the different lines of text are broken with  tags so that
should be fairly simple? Right, here is what I have so far, I have played
with some of the regex tester tools online but am not having any luck once
inside the first block, which makes me think I'm doing it wrong.

My wobbley code thus far I know it must have a long way to go:
This grabs everything paragraph by paragraph:
(.+)(.+)(.+)Critical Violations Found:/imsU');


Now I need to grab each line in the paragraph and am stuck:.

//---at some point I have to strip the tags off of what will be put in the
db--//
$raw = strip_tags($results);


echo $raw; 
?>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Php and Imagemagick problems

2009-06-10 Thread Simon
What exactly is the problem or error message you get?

Also if this is your script, really, it needs a LOT of cleanup!!

Here's an example that could point out the problem:

>  $FileName =
> str_replace(".jpg", "", $FileName);
>
>  $FileName =
> str_replace("/", "", $ImageName);
>  $FileName = str_replace(".jpg", "",
> $ImageName);
>
>   //actual path to the files with NO file extension
> as found on the hard drive
> $SysPath =
> "C:/Inetpub/wwwroot/HarrisAutomate/output/WebImagesHiRes/test/$FileName";

You realize that you have overwritten the value in $FileName a couple
times in a useless manner?
Here you see, $FileName is _just_ equal to str_replace(".jpg", "",
$ImageName); and nothing more, the 2 previous lines are useless.

Also, you do realize that str_replace("/", "", $ImageName);  will just
strip out the slashes from $ImageName?  So if i have
"some/path/to/some/image.jpg", it would become
"somepathtosomeimage.jpg"... is this really what you want?  Same thing
for the str_replace(".jpg")  it strips out the extension so that
$Filename would be something like "image" and not "image.jpg".
Finally, $SysPath has forward slashes in the windows path, i'm not
sure how PHP can tolerate this on windows, but windows path use
backslashes ( like this: C:\some\path\to\some\image.jpg).

Good luck!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Php and Imagemagick problems

2009-06-09 Thread Miller, Terion
I am having a heck of a time getting a script to convert images to
workit worked fine for a few hours, then someone "tweaked it" and now it
doesn't work and I can't get it back...they "tweaked" the original file

The script runs and uploads files but no longer "converts" them with the
ImageMagick..wondering if anyone else has run into this

Code:
--

// -- Get Images from
folder--- //

 $FileName = $row['Image'];   

 $ImageName = $row['Image'];
 
 $ImageName = str_replace("/",
"", $ImageName);
 
 
 
 //the many confusing paths
 

//Local path on localhost of image names with NO file extenstion on them as
seen through the webserver
 $FilePath =
"http://127.0.0.1/HarrisAutomate/output/WebImagesHiRes/test/$ImageName";;


 
 //same as $SysPath not sure why - as of this point
$FileName and $ImageName are the same thing
 $FullSysPath =
"C:/Inetpub/wwwroot/HarrisAutomate/output/WebImagesHiRes/test/$ImageName";

 $BackupPath =
"C:/Inetpub/wwwroot/HarrisAutomate/output/WebImagesHiRes/backup/test/";
  


//add jpg extenstion to the filename stored in the harris folder


$FileName = str_replace("/", "", $FileName);
  
  $FileName =
str_replace(".jpg", "", $FileName);
 
 
  $FileName =
str_replace("/", "", $ImageName);
  $FileName = str_replace(".jpg", "",
$ImageName);
  
   //actual path to the files with NO file extension
as found on the hard drive
 $SysPath =
"C:/Inetpub/wwwroot/HarrisAutomate/output/WebImagesHiRes/test/$FileName";

 
 
  //lets do some echos
  echo $FileName .'';
  echo
$ImageName  .'';

// include ("VariableReveal3.php");

  
echo
($FileName) . '';
echo ($FilePath) . '';
echo '' . '';

 if (file_exists($SysPath))   {
echo
"The file $ImageName Exists!! Hooray!!"  . '';


} else {

echo "The file $FileName located at $SysPath does not exist"  . '';
}




//--If they exist go ahead and convert them
WINDOWS VERSION//


if (file_exists($SysPath)) {
  
  
   $command =
"convert.exe mogrify -format eps *.jpg -normalize -density 200x200 -trim
-resize 150 -colorspace rgb -filter Sinc -quality 100 ñtrim -identify
-verbose ";
$command .= addslashes($SysPath . $FileName) ." ";

$command .= addslashes($FilePath . $FileName) .".jpg";
   
  /*

$command = "convert.exe -normalize -density 200x200 -trim -resize 150
-colorspace rgb -filter Sinc -quality 100  -identify -verbose ";

$command .= addslashes($SysPath) ." ";
  $command .=
addslashes($FullSysPath) ." ";
 */
  
//echo the command for
the image not so magick
   echo $command . "";


//--Error Reporting about the
Conversions-//



if (system($command, $status) === false) {
echo ($command).
'';

 echo "Image Failed" . '';
} else {

echo "Image Processed" . '';
  }


 


//---Once Converted Then connect to the php
server online//


$ftp_server = "20.20.20.20.";

 $ftp_user_name = "blah blah ";

 $ftp_user_pass = "blahblah";


 $conn_id = ftp_connect($ftp_server);

  $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);


$FilePath =  
"http://127.0.0.1/HarrisAutomate/output/WebImagesHiRes/$FileName";;

$remote_path = "/httpdocs/Announcements/photos/obitsTest/$ImageName";


echo "I'm going to upload $FilePath to $remote_path." . '';


set_time_limit(120);
ftp_pasv($conn_id, true);

// upload a
file
if (ftp_put($conn_id, $remote_path, $SysPath, FTP_BINARY)) {

echo "successfully uploaded $ImageName\n";
} else {

echo "There was a problem while uploading $ImageName\n";
}


 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP and Send Mail

2009-04-09 Thread Jay Blanchard
[snip]
And not one RTFM?
[/snip]

It is because I wasn't online at the time of the crime. 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and Send Mail

2009-04-08 Thread Phpster

And not one RTFM?

Bastien

Sent from my iPod

On Apr 8, 2009, at 20:58, Chris  wrote:


Alejandro Esteban Galvez wrote:
Hi!, I am making a web system and i need known how send a mail  
using PHP


http://www.php.net/manual/en/function.mail.php

--
Postgresql & php tutorials
http://www.designmagick.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



Re: [PHP] PHP and Send Mail

2009-04-08 Thread Chris

Alejandro Esteban Galvez wrote:
Hi!, I am making a web system and i need known how send a mail using PHP 


http://www.php.net/manual/en/function.mail.php

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and Send Mail

2009-04-08 Thread Jason Pruim



Alejandro Esteban Galvez wrote:
Hi!, I am making a web system and i need known how send a mail using PHP 


Bye


  

HTTP://www.php.net/mail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP and Send Mail

2009-04-08 Thread Alejandro Esteban Galvez
Hi!, I am making a web system and i need known how send a mail using PHP 

Bye



---
Alejandro Esteban Galvez
Administrador de Red IPICHMC Rimed,
Radio-Aficionado CL2AEG
Linux User #472120 - http://i18n.counter.li.org/
Correo: alejan...@infomed.sld.cu
Correo y Jabber: alejan...@ipichmc.rimed.cu
www.ipichmc.rimed.cu
---





---
Red Telematica de Salud - Cuba

  CNICM - Infomed




Re: [PHP] PHP and making a ZIP file

2009-03-27 Thread Ashley Sheridan
On Fri, 2009-03-27 at 16:11 +1100, Chris wrote:
> Ron Piggott wrote:
> > Does anyone know how to make a ZIP file using PHP?  This is for an
> > application where the files the user selected will be put into a ZIP
> > file and then the ZIP file made available for download.  Ron
> 
> http://www.php.net/zip would be a good place to start.
> 
> Or http://pear.php.net/package/File_Archive if your host can't/won't 
> install the requirements.
> 
> -- 
> Postgresql & php tutorials
> http://www.designmagick.com/
> 
> 
If you're hosting it yourself, and it's on a Linux platform, you could
shell out and archive it from there. That'll give you the advantage of
using any compression format the OS supports, and lets you do cool
things like spanned rar archives and such.


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and making a ZIP file

2009-03-26 Thread Chris

Ron Piggott wrote:

Does anyone know how to make a ZIP file using PHP?  This is for an
application where the files the user selected will be put into a ZIP
file and then the ZIP file made available for download.  Ron


http://www.php.net/zip would be a good place to start.

Or http://pear.php.net/package/File_Archive if your host can't/won't 
install the requirements.


--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP and making a ZIP file

2009-03-26 Thread Ron Piggott
Does anyone know how to make a ZIP file using PHP?  This is for an
application where the files the user selected will be put into a ZIP
file and then the ZIP file made available for download.  Ron


Re: [PHP] PHP and named groups in regex/PCRE

2009-03-06 Thread Jim Lucas
Daevid Vincent wrote:
> A friend was showing off his regex-fu and the virtues of "named groups"
> and how great Python is, knowing that PHP had to be equally as good
> (since it uses the same PCRE libraries), we whipped up this little test.
> So now us PHP folks can enjoy the same benefit! :-)
> 
> vince...@dev1:~$ cat ./named_groups_test.php 
>  //http://us.php.net/manual/en/function.preg-match.php
> //http://www.regular-expressions.info/named.html
> 
> preg_match("/(?Pabc)(.*)(?Pxyz)/",
>'abcdefghijklmnopqrstuvwxyz',
>$matches);
> print_r($matches);
> ?>
> 
> vince...@dev1:~$ php ./named_groups_test.php 
> Array
> (
> [0] => abcdefghijklmnopqrstuvwxyz
> [foo] => abc
> [1] => abc
> [2] => defghijklmnopqrstuvw
> [bar] => xyz
> [3] => xyz
> )
> 
> 

This needs to be directed to whomever it was about six months ago that was 
asking about this.

They were trying to figure out how to do this, but I believe they were told 
that it could not be done.

Nice example!

-- 
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and named groups in regex/PCRE

2009-03-06 Thread Daniel Brown
On Fri, Mar 6, 2009 at 19:12, Daevid Vincent  wrote:
> A friend was showing off his regex-fu and the virtues of "named groups"
> and how great Python is, knowing that PHP had to be equally as good
> (since it uses the same PCRE libraries), we whipped up this little test.
> So now us PHP folks can enjoy the same benefit! :-)

Appending to Daevid's post, a snippet from the note he posted
about this a little bit ago (it will appear on the manual entry soon):

Note that you actually get the named group as well as the
numerical key value too, so if you do use them, and you're counting
array elements, be aware that your array might be bigger than you
initially expect it to be.

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP and named groups in regex/PCRE

2009-03-06 Thread Daevid Vincent
A friend was showing off his regex-fu and the virtues of "named groups"
and how great Python is, knowing that PHP had to be equally as good
(since it uses the same PCRE libraries), we whipped up this little test.
So now us PHP folks can enjoy the same benefit! :-)

vince...@dev1:~$ cat ./named_groups_test.php 
http://us.php.net/manual/en/function.preg-match.php
//http://www.regular-expressions.info/named.html

preg_match("/(?Pabc)(.*)(?Pxyz)/",
   'abcdefghijklmnopqrstuvwxyz',
   $matches);
print_r($matches);
?>

vince...@dev1:~$ php ./named_groups_test.php 
Array
(
[0] => abcdefghijklmnopqrstuvwxyz
[foo] => abc
[1] => abc
[2] => defghijklmnopqrstuvw
[bar] => xyz
[3] => xyz
)



Re: [PHP] PHP and Apache configuration

2009-01-19 Thread Török Alpár
2009/1/19 R B 

> I like this apache solution, but if i put
>
> SetEnvIf Referer "^http://www.yourdomain.com"; local_referal
>
> Then i can access the file putting this path in the URL:
>
>  http://www.yourdomain.com/xyz/scriptfile.php
> And i don´t want the script to be access by the url. That is the main
> problem.
>
No, you can't , not if you do it properly. imagine that you have a folder
like /srv/www/htdocs that is the document root of you web server, and you
have /srv/www/includes, just annother file. You can have al your protected
files ther, and include them from files that are in the document root of
your web server, and are public. If you don't want this sepparation, you can
use a .htaccess file in the folder, and deny the folder from all. (i recall
hearing/reding that this actually works even if allow overrule is off ,
didn't actually tryed it, but i imagine is more of a hack )

>
> Thanks
>
>
> On Mon, Jan 19, 2009 at 1:38 PM, Richard Heyes  wrote:
>
> > > ...
> >
> > This may be of some help. It's from the Apache website and only allows
> > access if the Referer header is sent by the browser and is
> > www.yourdomain.com, ie. Direct access is not permitted:
> >
> > ###
> > SetEnvIf Referer "^http://www.yourdomain.com"; local_referal
> >
> > Order Deny,Allow
> > Deny from all
> > Allow from env=local_referal
> > ###
> >
> > --
> > Richard Heyes
> >
> > HTML5 Graphing for Firefox, Chrome, Opera and Safari:
> > http://www.rgraph.org (Updated January 17th)
> >
>



-- 
Torok, Alpar Istvan


Re: [PHP] PHP and Apache configuration

2009-01-19 Thread R B
I like this apache solution, but if i put

SetEnvIf Referer "^http://www.yourdomain.com"; local_referal

Then i can access the file putting this path in the URL:

 http://www.yourdomain.com/xyz/scriptfile.php
And i don´t want the script to be access by the url. That is the main
problem.

Thanks


On Mon, Jan 19, 2009 at 1:38 PM, Richard Heyes  wrote:

> > ...
>
> This may be of some help. It's from the Apache website and only allows
> access if the Referer header is sent by the browser and is
> www.yourdomain.com, ie. Direct access is not permitted:
>
> ###
> SetEnvIf Referer "^http://www.yourdomain.com"; local_referal
>
> Order Deny,Allow
> Deny from all
> Allow from env=local_referal
> ###
>
> --
> Richard Heyes
>
> HTML5 Graphing for Firefox, Chrome, Opera and Safari:
> http://www.rgraph.org (Updated January 17th)
>


Re: [PHP] PHP and Apache configuration

2009-01-19 Thread ceo

I doubt that you can use re-direct and do what you want, since a re-direct does 
just that:

re-direct the USER to the URL.



What you *could* do is get rid of the re-direct and just 
include('scriptfile.php'); by using ForceType on imagefile.jpg to be 
application/x-httpd-php



Then scriptfile.php can be outside the webtree where it is inaccessible by 
definition.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and Apache configuration

2009-01-19 Thread Kyle Terry
On Mon, Jan 19, 2009 at 11:38 AM, Richard Heyes  wrote:

> > ...
>
> This may be of some help. It's from the Apache website and only allows
> access if the Referer header is sent by the browser and is
> www.yourdomain.com, ie. Direct access is not permitted:
>
> ###
> SetEnvIf Referer "^http://www.yourdomain.com"; local_referal
>
> Order Deny,Allow
> Deny from all
> Allow from env=local_referal
> ###
>
> --
> Richard Heyes
>
> HTML5 Graphing for Firefox, Chrome, Opera and Safari:
> http://www.rgraph.org (Updated January 17th)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> Richard's solution is much better.


-- 
Kyle Terry | www.kyleterry.com


Re: [PHP] PHP and Apache configuration

2009-01-19 Thread Richard Heyes
> ...

This may be of some help. It's from the Apache website and only allows
access if the Referer header is sent by the browser and is
www.yourdomain.com, ie. Direct access is not permitted:

###
SetEnvIf Referer "^http://www.yourdomain.com"; local_referal

Order Deny,Allow
Deny from all
Allow from env=local_referal
###

-- 
Richard Heyes

HTML5 Graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 17th)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and Apache configuration

2009-01-19 Thread Kyle Terry
On Mon, Jan 19, 2009 at 11:28 AM, R B  wrote:

> Hello,
>
> I need that every time someone access one image file in my server, then
> redirect to a php file.
>
> I make this well with:
>
> Redirect 301 imagefile.jpg scriptfile.php
>
> But i need that the file scriptfile.php can only be accessed by this
> redirect command.
>
> If someone try to access directly from the url
> http://www.mydomain.com/xyz/scriptfile.php, i want to send an error
> access.
>
> I tried with:
>
> 
> Order allow,deny
> Deny from all
> 
> But with this configuration, the redirect command cant access the
> scriptfile.php
>
> Do you have the solution for this?
>
> thanks.
>

You could use sessions. Start a session and set a redirect true variable of
some sort.






Get the idea?

-- 
Kyle Terry | www.kyleterry.com


[PHP] PHP and Apache configuration

2009-01-19 Thread R B
Hello,

I need that every time someone access one image file in my server, then
redirect to a php file.

I make this well with:

Redirect 301 imagefile.jpg scriptfile.php

But i need that the file scriptfile.php can only be accessed by this
redirect command.

If someone try to access directly from the url
http://www.mydomain.com/xyz/scriptfile.php, i want to send an error access.

I tried with:


Order allow,deny
Deny from all

But with this configuration, the redirect command cant access the
scriptfile.php

Do you have the solution for this?

thanks.


Re: [PHP] Php and CSS where to put it

2009-01-12 Thread VamVan
-- 

 should be
placed in between 

Thanks,
V


Re: [PHP] Php and CSS where to put it

2009-01-12 Thread Stephen

Terion Miller wrote:

I have this code and the css seems to not work in IE at all, do I need to
put it somewhere different on the page maybe?


  

I don't see the html headers. Nor a body.

Get that fixed and see what happens.

Stephen


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Php and CSS where to put it

2009-01-12 Thread Terion Miller
I have this code and the css seems to not work in IE at all, do I need to
put it somewhere different on the page maybe?


 xCount ORDER BY RAND()
LIMIT 3";
$result = mysql_query($sql);

echo "




";

while ($row = mysql_fetch_array($result)) {
echo "
{$row['title']}{$row['blurb']}
{$row['href']}";
//Add to exposure count
$views = $row['xCount'] + 1;
mysql_query("UPDATE `textads` SET `xCount` = '{$views}' WHERE `ID` =
'{$row['ID']}'");
}

echo " 
";

?>


Re: [PHP] PHP and Cyrus problem

2008-11-07 Thread Richard Heyes
> ...PHP for webmail.

Did you know you can use Gmail for webmail, even having the From:
address set to your own domain? It will require a little more setup
(well, with ten thousand mailboxes that would be "a lot") but you end
with one of the best webmail clients there is.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated November 1st)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP and Cyrus problem

2008-11-06 Thread Emerson Virti
Hello,
My company have almost ten thousand mailboxes on Cyrus Imap.
We use Thunderbird for IMAP client and PHP for webmail.
We have a problem in a very few mailboxes. This boxes don't have any visible
problem with Thunderbird access but in PHP, the (webmail) access provide a
"segmentation failed".
If I modify the cyrus.header file the "segmentation failed" problem is
resolved.

This is a problematic cyrus.header:
¡^B<8b>^MCyrus mailbox header
"The best thing about this system was that it had lots of goals."
--Jim Morris on Andrew
user.02401695bc4b7c0488731c8
0240169 lrswipcda$Forwarded $label1 $label4 $label2 $label3
$label5 $MDNSent NonJunk acade acgap alfredo andre_porto carneiro chevalier
cida-bruno cida_coutinho claudia concei&aoca4w-o daniela elaine erlan
fazer_reuni&aom-o fernanda godinho helenac inah joao_almeida katia lm luis
mara marcio_rfb marco maria_lucia_-_acbsa nelicio pc pendente plinio pp
resolvido rwagner tema vinicius-oracle
0240169 lrswipcda

If I modify cyrus.header, the "segmentation failed" is resolved, but this
generate a Thunderbird labels messages problem.

Modified cyrus.header:
¡^B<8b>^MCyrus mailbox header
"The best thing about this system was that it had lots of goals."
--Jim Morris on Andrew
user.02401695bc4b7c0488731c8
0240169 lrswipcda$Forwarded $label1 $label4 $label2 $label3
$label5 $MDNSent NonJunk
0240169 lrswipcda

Thunderbird version: 2.0.0.14;
PHP version (Debian Etch): 5.2.0-8+etch7
Cyrus Impad version: cyrus-imapd-2.2.12-8.1.RHEL4

I use this simple php script for tests:

If the cyrus.header file is the problematic one, the result of this script
is a list os subfolders and a "segmentation failed".

Where is the problem?

Thanks.

-- 
Émerson Salvadori Virti
[EMAIL PROTECTED]


Re: [PHP] PHP and SQL Server

2008-10-13 Thread Andrew Ballard
On Tue, Sep 23, 2008 at 10:17 AM, Jason <[EMAIL PROTECTED]> wrote:
> At 15:05 23/09/2008, you wrote:
>
> [snip]
>
>> So, I'm left wondering what that leaves. Is there anything currently
>> available that could be considered stable for a production
>> environment, supports parameterized queries and is not slated to be
>> mothballed in the near future?
>
> Have you considered the MS "official" php extension available from
> http://www.microsoft.com/sql/technologies/php/default.mspx ?
>
> We've played with it here and it seems quite good. It requires SQL 2005 or
> above, so it may not be good for you. YMMV.
>
> I have to admit we've yet to seriously load-test it, but at least we finally
> have Unicode support from PHP to MSSQL. :)
>
> HTH
> J

I know it's been a while since I started this thread, but I wanted to
say thanks for the suggestion and post an update for the archives. I
downloaded the Sqlsrv library from Microsoft. It required us to
install the SQL Native Client (ODBC driver for SQL 2005), but it
connects just fine to our SQL 2K database. We put it into production
on this site a couple weeks ago when the site was crashing routinely
using both PDO_MSSQL and PDO_ODBC due to a (possibly misconfigured?)
spider that was hitting (I should say hammering) our site.  Since
switching, the site has not crashed once. The Microsoft extension also
implements connection pooling internally which is cool.


Andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and getting part of URL

2008-10-08 Thread Per Jessen
Jason ML wrote:

> Hi PHP'ers,
> 
> PHP 4.4.8 and 5.
> 
> say I have a url like:
> 
> http://www.mydomain.tld/jason/index.php
> 
> In that index.php I want to have a piece of code that runs that tells
> me the 'jason' part of the URL so that I can run some custom read only
> queries for 'jason'
> 
> How can I do this? I know how to do everything except what PHP
> commands to run to get the info.


http://php.net/manual/en/function.parse-url.php


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and getting part of URL

2008-10-07 Thread Micah Gersten
Your original post has this as the URL:
> http://www.mydomain.tld/jason/index.php 

That's why I gave you that command.

If you want jason out of what you posted,
Check out the following commands:
http://us.php.net/array_pop
http://us.php.net/explode


Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Jason ML wrote:
> Hi Micah,
>
>> dirname($_SERVER['REQUEST_URI']);
>
>
> I have tried that and I dont get the proper URI:
>
> Example running print_r($_SERVER); I get: [REQUEST_URI] =>
> /net1003/people/jason/
>
> But then doing:
>
> $jason = dirname($_SERVER['REQUEST_URI']);
>
> echo "URL: ";
> echo $jason;
>
> I get: URL: /net1003/people
>
> Thoughts on what I am doing wrong.
>
> Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and getting part of URL

2008-10-07 Thread Jason ML

Daniel,


I get: URL: /net1003/people

Thoughts on what I am doing wrong.


   Yeah.  Not R'ing TFM.  dirname() gives you the name of the
directory ABOVE what you pass.

   http://php.net/dirname


Thanks for the pointer. You are indeed correct.

-Jason


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and getting part of URL

2008-10-07 Thread Daniel Brown
On Tue, Oct 7, 2008 at 7:57 PM, Jason ML <[EMAIL PROTECTED]> wrote:
>
> But then doing:
>
>$jason = dirname($_SERVER['REQUEST_URI']);
>
>echo "URL: ";
>echo $jason;
>
> I get: URL: /net1003/people
>
> Thoughts on what I am doing wrong.

Yeah.  Not R'ing TFM.  dirname() gives you the name of the
directory ABOVE what you pass.

http://php.net/dirname

-- 

More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and getting part of URL

2008-10-07 Thread Jason ML

Hi Micah,


dirname($_SERVER['REQUEST_URI']);



I have tried that and I dont get the proper URI:

Example running 	print_r($_SERVER); I get: [REQUEST_URI] => /net1003/ 
people/jason/


But then doing:

$jason = dirname($_SERVER['REQUEST_URI']);

echo "URL: ";
echo $jason;

I get: URL: /net1003/people

Thoughts on what I am doing wrong.

Jason


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   3   4   5   6   7   8   9   10   >