Questions tagged [php]

PHP is a widely-used general-purpose scripting language that is especially suited for Web development. Questions about programming in PHP are off-topic and should be asked on Stack Overflow.

PHP is often paired with the MySQL relational database. PHP also includes great database support for PostgreSQL, SQLite, Microsoft SQL Server (API ref), Oracle, IBM DB2 & Cloudscape, Apache Derby and even ODBC. All modern versions of PHP include PDO, a built-in data-access abstraction library with comprehensive connectivity options.

1993 questions
33
votes
8 answers

phpinfo() and php -v shows different version of PHP

I wanted to know which php version I am using so I wrote the standard script: phpinfo(); Which gives me PHP version 5.6.10 The correct PHP version needed for my application. When I tried in terminal: php -i or php -v It shows me: PHP version…
Gabf Hann
  • 433
5
votes
2 answers

PHP 5.6: What does "opcache: interned string buffers overflow" mean?

I am running PHP 5.6 and enabled the compiled-in module opcache. Now when I read the warnings inside my error log, I get these messages every few milliseconds: Warning Interned String buffer overflow There is no description to this error using this…
5
votes
1 answer

php .user.ini not loading in a PHP FPM install

I’m managing a self hosted WordPress site with Ninja firewall. To allow a full WAP protection with Ninja, I have to add some auto_prepend_file config in the .user.ini file in my root directory. Actually, Ninja does it for you and I checked the file…
Olivier
  • 181
5
votes
5 answers

Apache showing PHP code - after upgrade on Mac to macOS Sierra

I'm using an iMac which I've just updated to macOS Sierra. Prior to this it was running El Capitan. Under my El Capitan set up I had Apache, PHP and MySQL configured as per this guide. This worked without any problems. When I updated to Sierra it…
Andy
  • 163
4
votes
0 answers

php interactive mode gives no prompt

I'm running Windows 7. I just downloaded the "binaries and source" distribution of Php 5.4.6. When I unzip the download and navigate into the directory and enter the command php.exe -a on my command line, the interactive mode appears to load but…
Jellicle
  • 2,244
  • 4
  • 26
  • 31
4
votes
3 answers

How to get a static version of my site?

I need to save a static version of my site by using the sitemap which has about 400 URLs. What is the best way to do that?
xRobot
  • 491
3
votes
2 answers

Can I add a second php.ini file that supercedes the first?

I've made changes to my php.ini file, so I don't update the php.ini file whenever I update the PHP package. I'd like to "fork" off my changes to a different file, so I can update the actual php.ini file without losing my changes. I realise PHP 5.3…
3
votes
2 answers

What are the .php~ files?

I am working on one PHP project, and I am having some files for that. Some of the files have anextension as file_name.php~ What does it mean and how do those files get created?
user1794794
3
votes
1 answer

sudo pecl install intl and get fatal error: 'ext/standard/php_smart_str.h' file not found

I was trying to install intl, a php extension required by Moodle. I used sudo pecl install intl and received the following error: /private/tmp/pear/install/intl/intl_error.h:24:10: fatal error: 'ext/standard/php_smart_str.h' file not found #include…
2
votes
3 answers

Interpreting PHP offline?

I'm trying to learn PHP, and it's getting annoying having to upload a file to the server every 30 seconds. Is there a way to get a browser (I use Chrome on Mac 10.6.7) to interpret a PHP file (browser plugin or external app)? Or, is there some way…
tkbx
  • 185
2
votes
1 answer

PHP command line blank when I type statements

in Windows 7 I launch PHP.exe but then there's just a pure black command prompt screen and nothing I type results in any feedback at all. If I type: PHP -I Nothing. If I type PHPinfo() Nothing. Nothing beyond a blinking underscore cursor. …
M M
  • 175
2
votes
1 answer

Get rid of old version of PHP on RHEL 6

I have installed a new version (7.1) of PHP on my server running RHEL 6. I can verify the installation and also via the web-server I see version 7.1 to be used. On the command line, however, I get php -v PHP 5.6.8 (cli) (built: Apr 17 2015…
2
votes
1 answer

PHP adds to variable's end a space when used in foreach

Im working on a website with videos, but I have a problem. When I try to make a list of videos using foreach every variable of it includes a space on end even after trying to use str_replace... nothing worked. Here is the code:
Arty
  • 65
2
votes
2 answers

How to upgrade Laravel 5.2 → 5.8

When upgrading laravel from 5.2 to 5.8, do I need to upgrade one by one each with 5.3, 5.4, 5.5, 5,6, 5.7, 5.8, and check each details of changes? Or can I go to 5.8 at once by Composer JSON upgrade? I would like to know general upgrade method of…
1
vote
1 answer

Does PHP server-side processing count towards 'mobile data usage'

This might seem like a stupid question, but I am wondering whether PHP processing counts toward 'mobile data usage/data usage' or if it is only the send data, i.e. the output that does (the HTML). According to my logic is should not but I'm just…
Rasmus Rosengren
1
2 3 4