Code Monkey home page Code Monkey logo

Comments (9)

boenrobot avatar boenrobot commented on July 30, 2024

Do you get any other errors when the IP does exist? What is your PHP version?

The parse error leads me to believe the problem is you're using PHP 5.2, but then again, your own file should've triggered its own parse error in that case.

from net_routeros.

Picatek avatar Picatek commented on July 30, 2024

No. No other error. Everything works fine if the IP exist.
X-Powered-By: PHP/5.4.5

from net_routeros.

boenrobot avatar boenrobot commented on July 30, 2024

I tried with 5.4.6 and 5.4.0 and couldn't duplicate this issue. Also tried specifically with 5.4.5, all tried after extracting the tgz archive, and including its Autoload.php with no other code... I'm always getting "Error...", exactly as expected.

Have you made any modifications to /www/cgi-bin/src/PEAR2/Net/Transmitter/Exception.php at all? Could you possibly try with any other PHP version and/or the same setup (including the exact same files) but on Windows?

from net_routeros.

Picatek avatar Picatek commented on July 30, 2024
  1. Thanks for your time I really appreciate it.
  2. I haven't made ANY changes to any of the package files.
  3. FYI I am running it on an Openwrt Metarouter and the PHP package is from :
    http://openwrt.wk.cz/attitude_adjustment/mr-mips/packages/
    I will try next week to install another PHP version (4.4.9-1 ?) but not sure when I will have the time

from net_routeros.

boenrobot avatar boenrobot commented on July 30, 2024

Ah. That's interesting...

How much memory does the MetaRouter have allocated for it? Try giving it some more. I'm thinking maybe by the time PHP decides to parse Exception.php, the router goes out of memory in the middle of parsing, ultimately causing the parse error.

I'm going to try setting up Openwrt too... (I've been meaning to try to anyway, and now I have a good motivation to)

from net_routeros.

boenrobot avatar boenrobot commented on July 30, 2024

Hmm... I'm trying to run those exact images on a MetaRouter with 64MiB RAM, and I get a segmentation fault. I get that even from just a phpinfo()... Although I'm using php-cli, which may be part of my problem.

(I always knew MetaRouter is not exactly a stable environment, but this is ridiculous...)

from net_routeros.

boenrobot avatar boenrobot commented on July 30, 2024

After some more digging, I'm able to almost reproduce the error. The error you're experiencing is likely related. The segfault from before seems to be a known issue that's already fixed in trunk, so that's what I did. I used the 31411 image from http://openwrt.wk.cz/trunk/mr-mips/, with all related modules from there.

With that PHP version (5.3.10), I get no segfaults on phpinfo(), and trying to run your code gives me

Parse error: syntax error, unexpected $end in /usr/share/htdocs/PEAR2_Net_RouterOS
-1.0.0b5/src/PEAR2/Autoload.php on line 243

Further trial&error showed the error is... very silly... There needs to be one blank line at the end of all files, or this particular PHP borks. This is already the case for all files on the "develop" branches of Net_RouterOS and Net_Transmitter.

The only thing that's not yet fixed is PEAR2/Autoload.php, which you can manually modify: Just add a new line at the end.

The exact error you're experiencing might be something different, as you would've seen the Autoload.php error yourself as well... Unless maybe you used composer for the installation? In that case, you don't need to deal with PEAR2/Autoload.php anyway.

from net_routeros.

Picatek avatar Picatek commented on July 30, 2024

This solved the problem(added a few empty lines to Autoload.php)
Thanks

from net_routeros.

boenrobot avatar boenrobot commented on July 30, 2024

The latest version now includes a fixed version of PEAR2_Autoload.

I haven't tried to run it on a MetaRouter again (just because of how ridiculously difficult it still is to set up...), so please let me know if it still happens with it. I'll close this issue now anyway.

from net_routeros.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.