Has anyone compiled WordPress 3.8 successfully?

Discussion about the open-source Phalanger [?] project.

Has anyone compiled WordPress 3.8 successfully?

Postby profnimrod » January 2nd, 2014, 6:59 pm

Hello forum,

I am new to Phalanger and the reason I have installed it is that I would like to develop C#.Net plug-ins for WordPress 3.8. I have successfully installed WP 3.8, but get a 5 errors and 15 warnings, when I tried to compile it. A couple of example errors are:

C:\inetpub\phalanger_emergence\wp-includes\ID3\getid3.lib.php(285,5): error PHP1003: Cannot break/continue 1 level(s)

C:\inetpub\phalanger_emergence\wp-includes\ID3\module.tag.id3v2.php(433,22): error PHP1212: Invalid argument count in a call to the function 'substr'

Has anyone successfully compiled WP 3.8, and if so, what changes did you have to make?

Many thanks in advance.

Kurt
profnimrod
 
Posts: 12
Joined: January 2nd, 2014, 6:12 pm

Re: Has anyone compiled WordPress 3.8 successfully?

Postby Jakub Misek » January 6th, 2014, 6:01 pm

Hi,

Great you are trying Phalanger.

Those 2 errors are bugs in PHP code; Phalanger is strict for such errors and does not allow such code.

- PHP1003: replace it with return;
- PHP1212: fix the function call, they have wrong bracketing

Thanks,
Jakub Misek │ DEVSENSE s.r.o. │ Email: jakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2062
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Has anyone compiled WordPress 3.8 successfully?

Postby Jakub Misek » January 6th, 2014, 6:02 pm

Also I would recommend to report these errors to WP.org

Thanks,
Jakub Misek │ DEVSENSE s.r.o. │ Email: jakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2062
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Has anyone compiled WordPress 3.8 successfully?

Postby profnimrod » January 7th, 2014, 1:48 pm

Many thanks for your assistance Jakub - my interest in Phalanger is that I am a.NET developer who wants to build .NET extensions for WP for a couple of sites I am currently setting up.

As you suggested, I have posted the errors and warning to the WP support forum in the hope that they can fix future releases (http://wordpress.org/support/topic/php- ... st-5077041), and suggested to them that they test their code against Phalanger as a matter of routine.

I currently get the following errors (after each error I have inserted to offending code) ... I also note that 3 of the 4 are related to the Annotum (http://annotum.org/) theme and not the basic WP code:

\wp-includes\ID3\module.tag.id3v2.php(433,22): error PHP1212: Invalid argument count in a call to the function 'substr'

Code: Select all
$id3_flags = ord(substr($footer{5}));


You mentioned that the bracketing is wrong here but I'm afraid my PHP knowledge is too pitiful to know how to fix it. Perhaps this has missing parameters? In C# the similar command expects a start index and length.

For now, I just changed it to:

Code: Select all
$id3_flags = ord($footer{5});


\wp-content\themes\annotum-base\plugins\anno-pdf-download\lib\dompdf\lib\html5lib\TreeBuilder.php(2635,48): error PHP1069: Undefined class constant 'HTML5_TreeBuilder::INBODY'

Code: Select all
$this->processWithRulesFor($token, self::INBODY);


I've just commented this line of code out for now.

\wp-content\themes\annotum-base\plugins\anno-pdf-download\lib\dompdf\include\tcpdf_adapter.cls.php(404,10): error PHP1212: Invalid argument count in a call to the function 'in_array'

\wp-content\themes\annotum-base\plugins\anno-pdf-download\lib\dompdf\include\tcpdf_adapter.cls.php(404,50): error PHP1001: Only variables can be passed by reference

Code: Select all
if ( in_array("Title", "Author", "Keywords", "Subject") && method_exists($this->_pdf, $method) ) {
      $this->_pdf->$method($value);
    }


I've just commented this line of code out for now.

Unfortunately I am not a PHP developer, so any chance you could help correct the lines above. I will test them out and compile WP 3.8, and when I've got it working post the results back here and to the WP support forum.

When I fix the errors above in the way I indicate compilation now ends with the following internal error:

error PHP2007: Internal error!
Please, report this bug via http://www.codeplex.com/WorkItem/List.aspx?ProjectNa
me=Phalanger.
Additional information:
Method 'next' in type '<wp-content/themes/annotum-base/functions/phpquery/phpque
ry.php>.phpQueryObject#1' from assembly 'WebPages, Version=1.0.0.0, Culture=neut
ral, PublicKeyToken=null' does not have an implementation.
at System.Reflection.Emit.TypeBuilder.TermCreateClass(RuntimeModule module, I
nt32 tk, ObjectHandleOnStack type)
at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
at System.Reflection.Emit.TypeBuilder.CreateType()
at PHP.Core.Reflection.PhpType.Bake()
at PHP.Core.Reflection.ScriptCompilationUnit.Bake()
at PHP.Core.Reflection.InclusionGraphBuilder.EmitAllUnits(CodeGenerator codeG
enerator)
at PHP.Core.Emit.ScriptAssemblyBuilder.CompileScripts(IEnumerable`1 sourceFil
es, CompilationContext context)
at PHP.Core.ApplicationCompiler.Compile(ApplicationContext applicationContext
, CompilerConfiguration config, ErrorSink errorSink, CompilationParameters ps)


Any ideas? I'm happy to report it as suggested if that is helpful. Is this just indicating that the next() method (http://us2.php.net/next) is not supported yet by Phalanger?

For completeness, I also get the following warnings:

\wp-admin\includes\file.php(907,9): warning PHP0151: Function 'getmyuid' is not supported

Code: Select all
if ( getmyuid() == @fileowner($temp_file_name) )


\wp-includes\nav-menu.php(744,52): warning PHP0125: Mandatory parameter 'tt_id' declared behind optional parameter

Code: Select all
function _wp_delete_tax_menu_item( $object_id = 0, $tt_id, $taxonomy ) {
   $object_id = (int) $object_id;

   $menu_item_ids = wp_get_associated_nav_menu_items( $object_id, 'taxonomy', $taxonomy );

   foreach( (array) $menu_item_ids as $menu_item_id ) {
      wp_delete_post( $menu_item_id, true );
   }
}


\wp-includes\ID3\module.audio-video.quicktime.php(614,4): warning PHP0121: The 'case' label with value rmla has already been declared

Code: Select all
case 'rmla': // Reference Movie Language Atom


Safe to remove case I think.

\wp-includes\SimplePie\Locator.php(94,55): warning PHP0125: Mandatory parameter 'working' declared behind optional parameter

Code: Select all
public function find($type = SIMPLEPIE_LOCATOR_ALL, &$working)


I guess this is simply a convention relating to where optional parameters appear not being adhered to.

\wp-includes\SimplePie\Misc.php(1424,4): warning PHP0121: The 'case' label with value isoir91 has already been declared

\wp-includes\SimplePie\Misc.php(1429,4): warning PHP0121: The 'case' label with value isoir92 has already been declared

\wp-includes\SimplePie\Decode\HTML\Entities.php(172,4): warning PHP0121: The 'case' label with value ? has already been declared

For these I've just removed the extra cases.

\wp-content\themes\annotum-base\carrington-core\templates.php(197,59): warning PHP0125: Mandatory parameter 'depth' declared behind optional parameter

\wp-content\themes\annotum-base\functions\template.php(86,51): warning PHP0125: Mandatory parameter 'key' declared behind optional parameter

\wp-content\themes\annotum-base\plugins\anno-pdf-download\lib\dompdf\lib\class.pdf.php(4210,58): warning PHP0125: Mandatory parameter 'img' declared behind optional parameter

\wp-content\themes\annotum-base\plugins\anno-pdf-download\lib\dompdf\lib\class.pdf.php(4479,60): warning PHP0125: Mandatory parameter 'data' declared behind optional parameter

\wp-content\themes\annotum-base\plugins\anno-pdf-download\lib\dompdf\lib\class.pdf.php(4795,66): warning PHP0125: Mandatory parameter 'imageWidth' declared behind optional parameter

\wp-content\themes\annotum-base\plugins\anno-pdf-download\lib\dompdf\lib\class.pdf.php(4795,109): warning PHP0125: Mandatory parameter 'imgname' declared behind optional parameter

These 6 above are relating to a convention not being followed I think, although should be OK.

\wp-content\themes\annotum-base\functions\phpquery\phpquery.php(3420,11): warning PHP0123: The variable $this used out of method

Code: Select all
public static function extend($class, $file = null) {
         return $this->plugin($class, $file);
      }


\wp-content\themes\annotum-base\plugins\anno-pdf-download\lib\dompdf\include\functions.inc.php(887,12): warning PHP0151: Function'memory_get_peak_usage' is not supported

Code: Select all
if ( function_exists("memory_get_peak_usage") ) {
  function DOMPDF_memory_usage(){
    return memory_get_peak_usage(true);
  }
}
else if ( function_exists("memory_get_usage") ) {
  function DOMPDF_memory_usage(){
    return memory_get_usage(true);
  }
}


So at this point, although some guidance on how to resolve the errors would be helpful, the 'Internal error!' is probably the biggest concern.

Many thanks, Kurt
profnimrod
 
Posts: 12
Joined: January 2nd, 2014, 6:12 pm


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 1 guest

cron

User Control Panel

Login

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 62 on January 7th, 2012, 10:54 pm

Users browsing this forum: No registered users and 1 guest
Phalanger