Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 03:31
    kripper commented #775
  • 02:49
    kripper opened #875
  • Oct 23 22:30
    jakubmisek commented #874
  • Oct 23 22:23
    jakubmisek edited #874
  • Oct 23 22:22
    jakubmisek labeled #874
  • Oct 23 22:21
    jakubmisek commented #874
  • Oct 23 21:49
    ajhalls opened #874
  • Oct 23 21:36

    jakubmisek on master

    PDO fetchAll() fix for FETCH_GR… (compare)

  • Oct 23 19:15

    jakubmisek on master

    travis fixes cwd set to test's… (compare)

  • Oct 23 15:06

    jakubmisek on master

    cleanup (compare)

  • Oct 23 15:06

    jakubmisek on master

    travis fixes (compare)

  • Oct 23 14:24

    jakubmisek on master

    travis - dotnet 3.1, fixes cwd (compare)

  • Oct 23 14:02

    jakubmisek on master

    changed some param names to mat… (compare)

  • Oct 23 13:59

    jakubmisek on master

    xml_set_unparsed_entity_decl_ha… (compare)

  • Oct 23 13:54

    jakubmisek on master

    Exception and Error hides inter… hides php hidden methods in cod… (compare)

  • Oct 23 13:09

    jakubmisek on master

    functions moved to correct exte… (compare)

  • Oct 22 15:42
  • Oct 22 08:15

    roberthusak on target-framework

    (compare)

  • Oct 22 08:15

    roberthusak on chown

    (compare)

  • Oct 22 08:15

    roberthusak on array_merge_recursive

    (compare)

Cory Podojil
@mitazake
btw if this works, I have a very cool use case for the project
Jakub Míšek
@jakubmisek
We're looking forward to it!
Cory Podojil
@mitazake
sweet, and I did Uploads like this - any thoughts?
<Project Sdk="PeachPied.WordPress.Build.Plugin/5.5.1-preview1">
<PropertyGroup>
<PhpRelativePath>wp-content/uploads/</PhpRelativePath>
<WpContentTarget>uploads</WpContentTarget>
</PropertyGroup>
</Project>
image.png
pictures are prettier
Jakub Míšek
@jakubmisek
if you need "uploads" as a separate project
<WpContentTarget></WpContentTarget>
<PhpRelativePath>wp-content/uploads/</PhpRelativePath>
Cory Podojil
@mitazake
Ok cool, but I could just dump in the "Content" project as well?
Jakub Míšek
@jakubmisek
yes
Cory Podojil
@mitazake
perfect, thanks again!
Jakub Míšek
@jakubmisek
let's see what you do :)
when it's done
Cory Podojil
@mitazake
well with a little plug to the site...https://marketstructureedge.com/
WP front end, with MVC core backend
Jakub Míšek
@jakubmisek
sweet
John Carruthers
@DevJohnC_twitter
@jakubmisek every month or so WordPress just stops working; usually around the 30th/1st, it died a week or so ago too and had to be restarted; I have all my logging set to debug in aspnetcore and I get nothing useful from the logs, just usual request routing stuff, no peachpie exceptions, nothing. Just a dead site
Jakub Míšek
@jakubmisek
@DevJohnC_twitter thanks, we'll try some load testing and more tracing. This must be fixed within the final release.
Sogutor
@Sogutor
@jakubmisek
image.png
Jakub Míšek
@jakubmisek
@Sogutor thanks!
Benjamin Fistein
@bfistein

well with a little plug to the site...https://marketstructureedge.com/

that's awesome :) how's it running @mitazake?

John Carruthers
@DevJohnC_twitter
@jakubmisek it's maddening; it appears to be wordpress specific though; we have other non-wordpress peachpie projects that are running for months on end without issuew
Jakub Míšek
@jakubmisek
@DevJohnC_twitter a year ago or so we were getting server error 500. It was due to a wrong version of .NET Core Runtime installed on the server (something like 2.0.400 instead of 2.0.500). It was also after a few weeks of running, seemed like WordPress happened to use a specific API that was not present in 2.0.400 ..
Benjamin Fistein
@bfistein

@jakubmisek it's maddening; it appears to be wordpress specific though; we have other non-wordpress peachpie projects that are running for months on end without issuew

On a sidenote, @DevJohnC_twitter, would you mind sharing (in private) a little more detail with us? We are curious to understand what companies use the project for which use cases etc.

Cory Podojil
@mitazake
@bfistein I had to leave it hanging for a bit, ran into issues with the way the Divi theme works - it wants to modify itself on activation. Ends up in a WSOD and no errors, quite annoying.
Jakub Míšek
@jakubmisek
@mitazake hm, currently peachpie doesn't handle modified source files, so you can only (re)compile the project once the files are already modified
John Carruthers
@DevJohnC_twitter
@jakubmisek I'd love to know how I can help debug the issue: currently I am not getting any debug information from the aspnetcore logging system and I'm at a total loss
@bfistein I'm not at liberty to share all the details but we're using wordpress in an MU config to handle blogging for multiple users, and aggregating that into a social network system with post types and other behind the scenes services
zewar96
@zewar96

I started a new project...copied in all of my php files from a working website. I used the template that comes with the extension. I am using VS2019. When i try to compile the project (not the server) i get

Error PHP4016 Source file '**\library\rssbuilder\class.ObjectIterator.inc.php' could not be found.

I don't get any help on this in the compiler in errors/warnings or anything else that would point me in the right direction. Obviously the file exists. It is a fully working site already. I am looking for direction on how i can even begin to get started with fixing this

Benjamin Fistein
@bfistein
Hi @zewar96, what version of PeachPie are you using? There used to be a bug related to encoding, which could have been worked around by changing the encoding of the affected PHP files to UTF-8. However, this was fixed roughly 2 weeks ago, so if you're using an older version of PeachPie, give the update a try first.
zewar96
@zewar96

@bfistein Thank you for the quick reply.
I am using NuGet package 1.0.0-preview1 of PeachPie.App and PeachPie.AspNetCore.Web

That was definitely the issue. I am now past that one and on to my next one. Thank you so much

zewar96
@zewar96
Are there certain PHP functions that aren't supported in this? For example, I am trying to migrate an app that uses: get_defined_vars() ...it's always returning null. Not sure how that one works in this.
Jakub Míšek
@jakubmisek
@zewar96 get_defined_vars()is supported; do you have a test case where it doesn't work as expected? thank you
Otherwise; the list of not implemented functions can be found at https://docs.peachpie.io/compatibility-status/
zewar96
@zewar96
@jakubmisek I have a project. Do you want me to send it to you or something? I am probably going to shelf this project for now. Its an awesome idea, but right now I don't have enough free time to dedicate to it. I was trying to do something ambition and put a website like MantisBT in .NET Core so i could get rid of my one nginx docker that i have and keep my whole infrastructure as .NET Core apps. Didn't really work.
Jakub Míšek
@jakubmisek
@zewar96 sounds like a great project, do you have something on github already? I can fork and manage to create some PRs
Benjamin Fistein
@bfistein
ICYMI: we just launched apps.peachpie.io - a catalog where you can find PHP libraries and apps fully running on .NET and also all sorts of WP themes and plugins you can install straight from our feed. If you have any feedback, we'd be happy to hear suggestions!
zewar96
@zewar96
@jakubmisek I added the code i am playing with to the my github. I ripped out everything from my running MantisBT and started with a clean one, so I need to be able to run the install/config checks. I figure that would be needed anyway. Unfortunately this just moved the errors closer to the front for me. When debugging, i can't even get it to show me variable values. Tells me they are not available in the context. It does not seem to break the running code, but breakpoints are about useless without local variables. As i said before, i am not sure how much time i am going to have to put towards this, but if you are able to see what i am doing wrong with the not being able to access variables and even back to my original issue of get_defined_vars() it might fix most of my issues. The repo is here (https://github.com/zewar96/MantisBTPeachPie) if you want to take a look. If you don't, it's no big deal. I was just playing with this product as a POC and thought it was a cool idea.
Jakub Míšek
@jakubmisek
@zewar96 will take a look!
Robert Sundström
@robertsundstrom
How do I invokes Wordpress functions statically from plugin written in C#? Are there any wrapper classes?
Jakub Míšek
@jakubmisek

@robertsundstrom currently it is done using following api

app.Context.Call("function_name", arguments);

as used in https://github.com/iolevel/peachpie-wordpress/blob/a7cf2e198f94b6848cdb8a773d00e77064e53ed3/app/Plugins/ShortcodePlugin.cs#L21

zewar96
@zewar96
trying to understand what conversion is attempting to happen here. Is there a good way to know what it's actually dying on? I have looked for "IntStringKey" but that doesn't exist, so i am assuming it's some sort of derived type that is created at compile time. Any guidance would be appreciated
Severity    Code    Description    Project    File    Line    Suppression State
Error        Cannot implicitly convert 'ADORecordset_mssql' to 'IntStringKey' not implemented at C:\Users\jande\Source\Repos\MantisBTPeachPie\MantisBTPeachPie\vendor\adodb\adodb-php\drivers\adodb-mssql.inc.php(1030, 10)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.EmitIntStringKey(BoundExpression expr)
   at Pchp.CodeAnalysis.Semantics.BoundVariableName.EmitIntStringKey(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.LocalVariableReference.EmitLoadValue(CodeGenerator cg, LhsStack& lhs, BoundAccess access)
   at Pchp.CodeAnalysis.Semantics.BoundReferenceExpression.Emit(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.LhsStack.EmitReceiver(CodeGenerator cg, BoundExpression receiver)
   at Pchp.CodeAnalysis.Semantics.IndirectProperty.EmitLoadPreamble(CodeGenerator cg, LhsStack& lhs)
   at Pchp.CodeAnalysis.Semantics.IndirectProperty.EmitLoadValue(CodeGenerator cg, LhsStack& lhs, BoundAccess access)
   at Pchp.CodeAnalysis.Semantics.BoundReferenceExpression.Emit(CodeGenerator cg)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.EmitConvert(BoundExpression expr, TypeSymbol to, ConversionKind conversion)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.EmitLoadArgument(ParameterSymbol targetp, BoundExpression expr, List`1 writebacks)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.EmitCall(ILOpCode code, MethodSymbol method, BoundExpression thisExpr, ImmutableArray`1 arguments, BoundTypeRef staticType)
   at Pchp.CodeAnalysis.Semantics.BoundRoutineCall.EmitDirectCall(CodeGenerator cg, ILOpCode opcode, MethodSymbol method, BoundTypeRef staticType)
   at Pchp.CodeAnalysis.Semantics.BoundRoutineCall.Emit(CodeGenerator cg)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.EmitSpecialize(BoundExpression expr)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.Emit(BoundExpression expr)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.EmitWithDisabledErrorReporting(BoundExpression expr)
   at Pchp.CodeAnalysis.Semantics.BoundUnaryEx.Emit(CodeGenerator cg)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.EmitConvert(BoundExpression expr, TypeSymbol to, ConversionKind conversion)
   at Pchp.CodeAnalysis.Semantics.Graph.ConditionalEdge.Generate(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.Graph.Edge.Pchp.CodeAnalysis.CodeGen.IGenerator.Generate(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.Graph.BoundBlock.Emit(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.Graph.BoundBlock.Pchp.CodeAnalysis.CodeGen.IGenerator.Generate(CodeGenerator cg)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.GenerateBlock(BoundBlock block)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.LocalScope.ContinueWith(BoundBlock block)
   at Pchp.CodeAnalysis.Semantics.Graph.ConditionalEdge.Generate(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.Graph.Edge.Pchp.CodeAnalysis.CodeGen.IGenerator.Generate(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.Graph.BoundBlock.Emit(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.Graph.BoundBlock.Pchp.CodeAnalysis.CodeGen.IGenerator.Generate(CodeGenerator cg)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.GenerateBlock(BoundBlock block)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.LocalScope.ContinueWith(BoundBlock block)
   at Pchp.CodeAnalysis.Semantics.Graph.ConditionalEdge.Generate(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.Graph.Edge.Pchp.CodeAnalysis.CodeGen.IGenerator.Generate(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.Graph.BoundBlock.Emit(CodeGenerator cg)
   at Pchp.CodeAnalysis.Semantics.Graph.BoundBlock.Pchp.CodeAnalysis.CodeGen.IGenerator.Generate(CodeGenerator cg)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.GenerateBlock(BoundBlock block)
   at Pchp.CodeAnalysis.CodeGen.CodeGenerator.LocalScope.ContinueWith(BoundBlock block)
   at P
Jakub Míšek
@jakubmisek

@zewar96 it seems like a variable of type ADORecordset_mssql is used as an indirect variable name, something like:

   $$this->property
   // or
   ${$this}->property

may I ask what you have on drivers\adodb-mssql.inc.php(1030, 10) ?

zewar96
@zewar96
if (@is_array($$this->fields)) {
Jakub Míšek
@jakubmisek
thanks @zewar96 , isn't it a typo? does not look like a valid PHP code to me. In PHP I'm getting following error as well:
image.png
We'll just fix it in the compiler so it will generate a compile time error instead of crashing on an exception
zewar96
@zewar96

@jakubmisek Thanks for the reply. It is showing as a compiler error for me now. I will change the code. It seems this project i was starting with used is_array() in a weird way in at least 2 places. It's almost like they should have been checking for null and not using is_array.

As a best practice, should is_array not be used for that. For example.... if there is a function that accepts a pararm array, and then you check to make sure it is_array....that should probably be a null check, instead, right? Just asking because it seems to work in PHP but doesn't seem to work that way when compiled. For example:

function test(array $stuff){
if(!is_array($stuff)){
   return
}
}
Jakub Míšek
@jakubmisek
it has nothing to do with is_array ... the issue is $$this which is just wrong (even in PHP), looks like a typo
Jakub Míšek
@jakubmisek
@zewar96
function test(array $stuff) {
  if(!is_array($stuff)) { // compiler will just ignore it, because $stuff is always an array
    return
  }
}