Tagged: php Toggle Comment Threads | Keyboard Shortcuts

  • Ady Romantika 11:12 am on November 6, 2013 Permalink | Reply
    Tags: , php   

    Pear on MacPorts 

    Install:

    sudo port install php5 +pear
    

    Make sure paths are correctly pointing to /opt/local

    sudo port config-show
    
    Advertisements
     
  • Ady Romantika 4:12 pm on October 29, 2013 Permalink | Reply
    Tags: build, , libphonenumber, php   

    libphonenumber 

    https://github.com/adyromantika/vagrant-libphonenumber-build

    Built a new C++ PHP extension referencing libphonenumber, crashed with segmentation fault. Might have something to do with x86_64, still investigating. The annoying part is that the block that crashes it is:

    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &num) == FAILURE)
         RETURN_NULL();
    

    If argument parsing is omitted and parameters hardcoded, the function is able to return expected result.

    Attempted to use 32 bit machine, but libphonenumber build fails:

    [ 74%] Building CXX object CMakeFiles/libphonenumber_test.dir/test/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc.o
    /home/vagrant/libphonenumber-read-only/cpp/test/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc:61:5: error: this decimal constant is unsigned only in ISO C90 [-Werror]
    /home/vagrant/libphonenumber-read-only/cpp/test/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc:63:5: error: this decimal constant is unsigned only in ISO C90 [-Werror]
    cc1plus: all warnings being treated as errors
    make[2]: *** [CMakeFiles/libphonenumber_test.dir/test/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc.o] Error 1
    make[1]: *** [CMakeFiles/libphonenumber_test.dir/all] Error 2
    make: *** [all] Error 2
    

    Also, Ubuntu precise has PHP 5.3

     
    • Ady Romantika 11:15 am on November 6, 2013 Permalink | Reply

      Since we expect a string, the string length is required.

      if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &num, &num_len) == FAILURE)
           RETURN_NULL();
      
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel