Skip to main content
4 votes
Accepted

Running “php -f file.php” prints the file contents instead of executing it

The file is using <? to start the PHP code. It should be using <?php. Usage of bare <? requires having the short_open_tags PHP option enabled (through php.ini or similar). I wouldn't ...
grawity_u1686's user avatar
2 votes

Finding php location on MacOS Ventura

It's possible you installed it with Homebrew. If so, you can try: brew search php This will tell you if it's at least installed. Depending on your Homebrew setup, the location can vary. I just ...
Heisenberg's user avatar
2 votes

Is PHP actually ported to AmigaOS?

http://aminet.net/package/comm/www/thttpd2.21b_working_php A 4.x version, not the latest, but a PHP ;-) And there are some others; http://aminet.net/search?query=PHP
Hannu's user avatar
  • 9,459
2 votes

How to upgrade ICU on Debian 12 for PHP Intl?

ICU is one of those libraries that provide a different soname (essentially the "library version" of libicu.so) with each new release. This means any software using ICU has to be recompiled ...
grawity_u1686's user avatar
2 votes

Installing mod_php for Apache after installing Remi repo version of PHP 5.6

Nowadays, this package seems to be called php<majmin>-php. If you go looking for mod_php in the output of yum search, you'll turn up empty-handed. For the example of PHP 8.2.x, after enabling ...
Kevin E's user avatar
  • 555
1 vote

Trying to make BLOB to PDF in browser using PHP

Thanks a lot to Giacomo1968. I found out that in <object> line with metadata duplicates the data:application/pdf;base64, already in the database field. So we need just remove that part. echo &...
Hopm Mpoн's user avatar
1 vote

Running “php -f file.php” prints the file contents instead of executing it

The code use the short_open_tag which only works with the php.ini setting short_open_tag=1 - invoking it with php -d short_open_tag=1 smart.php would fix that particular problem. However, looks to me ...
hanshenrik's user avatar
  • 1,725
1 vote

Error Installing OCI8 on Ubuntu 23.10 PHP 8.2

I managed to install OCI8 after changing some of the pear settings: pear config-set php_bin /usr/bin/php8.2 pear config-set php_ini /etc/php/8.2/apache2/php.ini pear config-set php_suffix 8.2
arthur k's user avatar
1 vote
Accepted

Issue addressing MODBUS via RS485 and PHP on Windows

This should work: <?php class rapidserial{ function _blocking($device,$mode){ stream_set_blocking($device, $mode); return true; } } $rapidserial = new rapidserial(); $device = ...
Luke Attard's user avatar
1 vote
Accepted

OOM killing my PHP FPM after upgrading LTS Ubuntu version

There was a memory leak due to a Wordpress plugin (WP-Rocket) I was able to identify this thanks to this answer in another question: https://stackoverflow.com/a/20590805/4442122 That pointed out to ...
SirLouen's user avatar
1 vote
Accepted

PHP file_put_contents: Failed to open stream: Permission denied

No need that the permission problem is based on the filesystem permissions (but its possible). Apache has an internal permission system that you have to configure either in the Apache's (virtual-)host ...
dodrg's user avatar
  • 1,492
1 vote
Accepted

How to run website locally?

If you're using an appropriate Windows Edition, you can enable the "Internet Information Services" (aka IIS) feature from add/remove Windows components. You can then set up the application ...
spikey_richie's user avatar
1 vote

Modify the contents of php.ini in my Dockerfile

You can add your own .ini file in the conf.d folder of your php installation. i.e. /usr/local/etc/php/conf.d/my-php.ini This should replace any previous declarations and be picked up automatically. ...
codeasaurus's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible