How to use mbregex on Heroku - php

in order to use mPDF on Heroku I need to add mbregex to PHP. Does anybody know how to enable mbregex on Heroku?
When googling it, I'm not able to find any solution. I cannot believe nobody encountered this problem before.
Thank you!

The change was made in this commit to the Heroku PHP Buildpack (which is how you run PHP on Heroku) which prevented mbregex being used in PHP versions 7.4 or later because libonig wasn't available.
Version 172 of the Heroku PHP Buildpack is nearly ready for release and re-enables mbstring regex on PHP 7.4 for 7.4.3. This is scheduled for release today all being well so in all likelihood if you try pushing to heroku tomorrow this will resolve the problem

Related

I have developed am application using PHP7 but on the server there is PHP5 and we cannot upgrade the PHP there

Please help me, I have developed an application using Yii2 Framework which requires PHP5.6 or greater, and while deployment of the application on the test server I have noticed that on the test server we are using PHP5.5, So please tell me what can I do? The test server is running Ubuntu.
(Minimum requirement of Yii2 is PHP5.6 and we are using PHP5.5)
Thank You.
if I recall correctly, PHP 5.5.X and 5.6.X are not that different. So if you can deploy your application and it runs properly, you should be fine. If you are using composer, it might be harder (or impossible) to spoof your PHP version, though.
My two cents:
You tagged AWS (and therefor probably EC2), so why don't you just update your PHP version? Why don't you run your application on PHP 7.X anyway? It is a great improvement - performance-wise.
You can try a few things...
1) Do you need to have the dev modules from Composer on the test server? If not do a composer install —no-dev
2) Another switch worth trying on the test server is “--ignore-platform-reqs” I don’t recommend it and even though composer install the files the application might not work.
3) If the above isn’t a fix for you, modify your Composer file to put in the constraints of your environments, change your local environment to match the test server, and re-factor the application if necessary. I’d do that instead of rewriting a whole app in Yii1.
You might want to edit your question and add the information about your composer.json file. Do you commit the composer.lock file to source control?
Additionally, not wise for your company to use anything older than PHP 5.6. And PHP 5.6 will have security support ended in Dec 2018. http://php.net/supported-versions.php
Read the following PHP documentation linked below, particularly the backward incompatibility changes and deprecated features. If you use any of those, you need to change your code. If you don't, then you should be fine. You need to test it.
http://php.net/manual/en/migration56.php

How to install php_dba.dll for PHP on Windows?

i try to install PrivMX WebMail but seems like one error still problem here,
php-dba PROBLEM
i try to find php_dba.dll on php.ini but it seems there is nothing there
im trying to find it on google but still fail
currently im using PHP version: 5.6.12 witn wampwebserver on windowns server
Any help?
There is no php_dba.dll distributed officially until PHP 7.2. Even if you compile it yourself for lower, you might need to get drivers you need manually. Particularly for Oracle. Otherwise you should be fine just upgrading to 7.2 as it also suports LMDB.
Thanks.

Loading ffmpeg-php module fails

I've been trying this for a couple of days now. I am trying to install ffmpeg-php on my CentOS server.
OS : CentOS 6
PHP : 5.5
ffmpeg : 1.2.1
ffmpeg-php : 0.6.0
The ffmpeg installation went on without a hitch and I am able to convert files back and forth via the CLI.
While installing ffmpeg-php, I encountered errors while making (after configuring) due to time.h references which was corrected by renaming the files creating with an extension .loT to .lo (as rightly pointed out here)
Once this was done, the make process went on smoothly and the make install went through without a hitch. However, after specifying the extension=ffmpeg.so in the php.ini file and after restarting Apache, the module doesn't load or show up in phpinfo().
The Apache error log shows only "PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'ffmpeg.so' in Unknown on line 0" and nothing else.
make test also shows the same error and FAILS the associated tests. I've checked here which wasn't very helpful. Also, I read somewhere that it may be the issue with permissions but the permissions for the ffmpeg.so file is 755.
Any help is appreciated.
Thanks in advance.
After looking up for hours, it seems that time.h for some apparent reason has been used in ffmpeg 1.2.1 (this is what I tested). This caused conflict with the OS's own file of the same name. This causes the installation to break in CentOS 6.x, RHEL 5.6 and RHEL 6.x
While I cannot code in PHP (and can barely read PHP code), I have found a git repo maintained by tony2001 who has made changes to the original project and using his repo has helped me install it successfully on CentOS-6.2, CentOS-6.3 and CentOS-6.4.
You can find the repo here. This seems to solve the issues in CentOS 6.x, RHEL 5.6 and RHEL 6.x.
Hope this helps anyone else trying this in the future (and maybe someone else who lands up here eventually)
PS: Incidentally, at the time of writing this answer ffmpeg 2.0 has been released but I haven't got a chance to test it yet

Setting up new relic on Heroku PHP

I have a PHP app on Heroku that keeps giving an Application Error randomly, and the logs don't say anything at all. I can't be sure but it seems that the error comes when 6-8 concurrent users hit the app. To figure this out, I thought of installing the New Relic Add On, and I have been trying to follow the document here - https://rpm.newrelic.com/accounts/343400/applications/setup.
Please excuse my limited knowledge, but it seems that the instructions given here are supposed to be run on an actual server ? How can I run them for my Heroku server ? I use a windows machine. I have installed wget for windows, but then apt, deb ?
There are other discussions about this where people have mentioned that new relic is not supported on Heroku, but those are at least an year old. And Heroku is providing New Relic as an Add On.
Can anyone please help...
As of September 2014, New Relic PHP does support running on Heroku using the official Heroku PHP buildpack.
See:
New Relic documentation
Heroku documentation
New Relic does not officially support our PHP agent on Heroku. Here's the current list of supported languages:
https://devcenter.heroku.com/articles/newrelic#supported-languages-and-frameworks
The setup requires the installation of a PHP extension and a local proxy daemon, which tends to require a bit more access to the app server. If you have any tips, please share them here -- just keep in mind that we cannot support it.
At the moment, PHP on Heroku is unsupported by New Relic. See this SO question for more: Deploying New Relic on Heroku Cedar (PHP)
I can't really give you an answer on this because we are currently in testing phase so we don't have concurrent users yet.
If you are using the official php buildpack from Heroku (if you've never heard of a buildpack you probably are) it's probably best that you ask their support as it might be a bug on their side. If you're using your own buildpack you can find an example of a working Heroku/PHP/Newrelic buildpack here:
https://github.com/iphoting/heroku-buildpack-php-tyler
We haven't experienced the same problem with the above buildpack.

php_monetdb.dll

I need the php_monetdb.dll for php 5.4. I've found that by building the monetDB with the HAVE_PHP=1 option on windows will create the dll, but the build procedure fails at numerous points. I am using the monetdb source from sourceforge which is a little outdated one. The newer version has problems in the .msc files itself so proceeding to the build itself is a pain. The older version that I am trying on is atleast passing the nmake step but failing on the nmake install step. The reasons vary from component to component. One states that the devenv /build does not exist. For this I copied the vcexpress and renamed it to devenv. I am not sure if this is right but when I run it from the command prompt it seems to work ok with a few warning alerts shown. During other make installs, the header files seem to be missing. Could anyone please help me with this. Also please let me know if there is any other alternative for this approach of getting php_monetdb.dll.
P.S: I am using windows 7, MSVC 10 express, PHP 5.4.4
For the build questions, see http://bugs.monetdb.org/show_bug.cgi?id=3121
For php_monetdb.dll, see
http://sourceforge.net/mailarchive/forum.php?thread_name=20120717145132.GU49719%40cwi.nl&forum_name=monetdb-developers
http://sourceforge.net/mailarchive/forum.php?thread_name=500581D5.8030808%40acm.org&forum_name=monetdb-developers

Categories