Results 1 to 14 of 14

Thread: more php extensions

  1. #1

    more php extensions

    Who is interested in more php extensions? I am currently compiling more extensions for php to use on my router. This is how I am doing it...

    Download the php 5.2.6 source

    Navigate to <src>/ext/<extension>

    phpize

    ./configure

    make

    make install


    Note that configure may need additional modules

    I currently have iconv and gmp already done. iconv is needed for some php scripts and uses the built in iconv implementation however you may need gconv-modules (it gets listed as "unknown") and gmp uses libgmp which is available in ipkg. I have not been able to verify that iconv actually works with the implementation that is present. If you can give me something that I can use to test it then let me know. I'll post both modules up when I get home. They were compiled directly on the router.

    EDIT: Well no responses so far so I'll go ahead and attach the two extension that I have done so far. I wanted to do an updated eaccelerator extension but it gets stuck trying to use sysvipc. In 0.9.5.3 they made it so that you have to define a uid (other than zero) that eaccelerator will be running as. Kinda a pain and a brick road.

    For each extension simply drop them into /opt/lib/php/extensions and then add the appropriate extension line to /opt/etc/php.ini. I'll do more if there is demand for it but in the meantime I'll do them as needed.

    P.S. - gmp is a faster and better library than bcmath. Typically scripts as for either one and recommend gmp if available. The stock php setup include bcmath.
    Attached Files Attached Files
    Last edited by shinji257; 17-06-2008 at 18:44.

  2. #2
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    hey wow, that's good
    more php extensions! yummy

    question: did you use my how-to?

  3. #3
    Yes I did and I am open to suggestions as to which ones I should do next.

    Oh and you may need php-dev to compile php extensions although I doubt it. I have it installed anyways just in case. Looks like phpize and php-config is included in the main php stuff.
    Last edited by shinji257; 18-06-2008 at 00:48.

  4. #4
    It would be better to make .mk files for the extra php-extensions.

    This way they can be added to the optware-feeds.

    advantages:
    -they become available to other devices
    -if php gets updated, the extentions also get rebuild
    -easer to install on your router

  5. #5
    Yes. I plan on doing that. This is to satisfy those that want it now until I get a chance. It should work on any mips-based router though.

  6. #6
    Hi,
    I need an upload-progress-bar (for a html-post-form) for my websites running on the router. I am currently using
    -lighttpd 1.4.20-1
    -php - 5.2.6-2
    -php-fcgi - 5.2.6-1
    I have read on some pages that with the php APC extension it should work (c.f. here)
    I hope that someone of you can help me to get the extension working that I can use some sort of upload progress bar with lighttpd.

  7. #7
    Which router?

    I just checked and it looks like I had 3.0.19 already built but never tested it I guess. apc.so is present in the .libs folder from the compile.

    I have attached it to this message. Drop it in the same folder as where all the usual extensions go to.
    Attached Files Attached Files
    WL500g Premium R1.14 with 128MB mod and serial port mod
    Oleg 1.9.2.7-10 - Lighttpd w/ PHP using eAccelerator - multi-user ready - dropbear secured setup

  8. #8
    thank you very much,
    I can load the extension. But somehow the progress bars still don't work.
    Can you try it out? php script is for example here or here.

    I think it is maybe the caching of lighttpd which gives the file to php not until it is already downloaded. Do you know any solution so that the upload progress can be displayed??

  9. #9
    Quote Originally Posted by shinji257 View Post
    Which router?
    It is the WL-500gP V2 with the newest oleg-fw.

    in my php.ini I have the following section:
    Code:
    [APC]
    extension=apc.so
    apc.enabled=1
    apc.shm_segments=1
    apc.shm_size=128
    apc.ttl=7200
    apc.user_ttl=7200
    apc.num_files_hint=1024
    apc.mmap_file_mask=/tmp/apc.XXXXXX
    apc.max_file_size = 200M
    apc.post_max_size = 200M
    apc.upload_max_filesize = 200M
    apc.enable_cli=1
    apc.rfc1867=1
    while I am uploading a file, I don't see a file named /tmp/apc.XXXXXX in my tmp folder on the router.

  10. #10
    Actually can I see your phpinfo information?

    BTW, My php install seems to have issues of their own. It is seg faulting so I will need to fix that first. Probably just need to either update or reboot the router.

    EDIT: Updated and rebooted and that took care of the seg fault. I switched the caching engine from eAccelerator to APC for now.

    I found this while looking at the comments on the first link.
    After my tests, it seems:

    this progress bar cannot work with:
    suhosin's patch.

    and if php works as fastcgi - it cannot work too.

    So if you are under (ubuntu 8.04) where php comes with suhosin already - you must rebuild witout suhosin.

    I can help you with that. just email me at
    huglester@gmail.com

    good luck!
    Please note that it doesn't use shared memory but rather mmap files on my compile. The ASUS routers would not have sufficient ram for a shm (shared memory) setup.

    We use fastcgi in order to allow caching setups to work. I found apc to not work well but eaccelerator works quite well.
    Last edited by shinji257; 10-12-2008 at 02:15.
    WL500g Premium R1.14 with 128MB mod and serial port mod
    Oleg 1.9.2.7-10 - Lighttpd w/ PHP using eAccelerator - multi-user ready - dropbear secured setup

  11. #11
    I have attached my phpinfo.

    How can I use php without fastcgi? Or is it not worth a try?

    Or is the only solution for an upload progress bar to use apache?
    Do you know if apache runs stable and fast enough on the router?

    I hope you can help me somehow to get it working.
    many thank's
    Attached Images Attached Images

  12. #12
    The only way to use APC is either as fastcgi or with mod_php on Apache. I havn't personally tried Apache on the router so I do not know how well it would work.
    WL500g Premium R1.14 with 128MB mod and serial port mod
    Oleg 1.9.2.7-10 - Lighttpd w/ PHP using eAccelerator - multi-user ready - dropbear secured setup

  13. #13
    Ok, so I can forget about lighttpd 1.4.
    I have seen in another thread that you managed to compile lighttpd 1.5.
    And with that version there is probably a much easier solution (c.f. here) without PHP extensions.
    Do you think that this prerelease is already usable?
    And is it possible to compile it directly on the router (in this way)?
    I have found the mod_uploadprogress.so in your compiled package, so it should work, right?

  14. #14
    Yes. In fact my initial compile was done right on the router. With a cross-compile I could nearly duplicate all the options. The ipk file is attached to the message you linked to so you can use that to install it. It is able to re-use some stuff from the original one but stability was never tested. Just that it worked. I don't know if a new release was done since r2349.
    WL500g Premium R1.14 with 128MB mod and serial port mod
    Oleg 1.9.2.7-10 - Lighttpd w/ PHP using eAccelerator - multi-user ready - dropbear secured setup

Similar Threads

  1. Установка и настройка vnStat + vnStat PHP frontend
    By VoVuX in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 219
    Last Post: 16-10-2015, 13:37
  2. How to execute php scripts ?
    By simistef in forum WL-500gP Q&A
    Replies: 13
    Last Post: 11-03-2008, 09:35
  3. PHP on ASUSWL500-G Premium
    By simistef in forum WL-500gP Q&A
    Replies: 1
    Last Post: 20-02-2008, 18:44
  4. Tip: lighttpd & php code in html files
    By rj.2001 in forum WL-500g Q&A
    Replies: 0
    Last Post: 22-05-2007, 20:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •