Recompile php

Re: Recompile php

Postby sgripon » Tue May 22, 2012 9:01 pm

I now passed php extensions checks successfully but I have an error completing installation :

Fatal error: Class 'SimpleXMLElement' not found in /usr/htdocs/cloud/lib/app.php on line 323

Probably not all dependencies are satisfied. Moreover, php version may be too old :

"To run ownCloud, your webserver must have the following installed: php5 (>= 5.3), php5-json php-xml php-mbstring php5-zip php5-gd"
sgripon
 
Posts: 15
Joined: Sun Jul 17, 2011 5:09 pm

Re: Recompile php

Postby sgripon » Tue May 22, 2012 9:11 pm

In fact previous owncloud version supports php < 5.3 so ok for that. But still have xml error.

Sorry to spam, now this is not really plugout issues. But if you can help me, I will be happy ! ;o)
sgripon
 
Posts: 15
Joined: Sun Jul 17, 2011 5:09 pm

Re: Recompile php

Postby sgripon » Tue May 22, 2012 9:17 pm

Maybe this is related to this configure option :

--disable-simplexml

?

It is probably the case : http://ca2.php.net/manual/en/simplexml.installation.php

Is it possible to have a php compiled with this option ?
sgripon
 
Posts: 15
Joined: Sun Jul 17, 2011 5:09 pm

Re: Recompile php

Postby fvdw » Tue May 22, 2012 9:28 pm

yes correct, I am sorry but php is compiled with simplexml disabled (see php info in web interface)

Maybe you can setup cloud in a way that it doesn't need simplexml

Recompiling php is probably required to enable it but probably there was a reason to disable it. If it can be loaded as module I can have look to compile the module but I doubt if it will work as the setting is disabled. If that doesn't work thenrecompiling php is the only route left but I will not have time for that on short notice as the big impact it might have on the stability of the firmware and will require a lot of testing
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Recompile php

Postby sgripon » Tue May 22, 2012 9:32 pm

OK, I understand. Anyway, if you have time enough to recompile php without the option, I will be able to test it on my plugout firmware and tell you the result. It is up to you.
sgripon
 
Posts: 15
Joined: Sun Jul 17, 2011 5:09 pm

Re: Recompile php

Postby fvdw » Tue May 22, 2012 9:40 pm

I will give compiling of simplexml as a module a try one of the coming days. maybe it loads despite the fact the simplexml was disabled because xml support is enabled. At least we can try that
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Recompile php

Postby sgripon » Wed May 23, 2012 7:35 pm

I'd really like to be able to compile by myself. Could you explain in detail how you do that ?
sgripon
 
Posts: 15
Joined: Sun Jul 17, 2011 5:09 pm

Re: Recompile php

Postby fvdw » Wed May 23, 2012 9:46 pm

of course I could try to do that but I installed all this some years ago and I forgot the details how I exactly did it. Also the tool set has grown over the year and it is rather big for posting. Also some adaptations are required in the firmware to be able to use it but probably I took already some measures for the last releases.
Basically it comes to installing gcc (C compiler) and the related development tools and lots of shared libraries. The problem is that all those libraries have dependencies and as such the total package is critical for changes. Also having the right headers files is an important part of the tool set. The last issue is that the tool set is far too big to be put in the system partition but this can be solved by using sym links to the big data partition and install the tool set there. Anyhow when I have some time I will look if I can make a package.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Recompile php

Postby sgripon » Thu May 24, 2012 5:57 am

Ok. do you think compiling with something like scratchbox will work ?
sgripon
 
Posts: 15
Joined: Sun Jul 17, 2011 5:09 pm

Re: Recompile php

Postby fvdw » Thu May 24, 2012 8:08 am

sgripon wrote:Ok. do you think compiling with something like scratchbox will work ?

:dontknow
I have no idea of that will work

via optware you can obtain a working compiler (gcc344 is to be preffered but will not work in all cases) and other dvelopment tools you will need like binutils.
ps Be aware that the the system partition is too small for installing a compiler. As such installing it in the /opt folder as it is present in the system directory is not possible. You need to replace the /opt folder by a sym link pointing to a folder on the big data partiton.
This can be done by renaming /opt to for example /opt-run create a new folder on the data partiton (or share by using the web interface, for instance with name opt1 and then make in the root files syetm a symlink (ln -s /share/1000/opt1 /opt)
To keep the nas working you will need to copy the current content of the /opt folder to this new folder including symlinks and correct file permission. You can do this by using the tar command to make an archive of the content of the /opt folder and unpack that in the new folder.
Now you are ready to use optware to install a compiler
If all this makes no sense to you then you need to do some studying first to understand the basics of optware and linux
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 10 guests