PHP upload limit (Webmatrix) - php

I changed the php upload limit in the php.ini file, but it didn't take effect.
I'm using MS Webmatrix on a local machine, and restarted it if that matters.
I'm not sure what to do?

Could you double check the location of the php.ini file used?
Run the following code:
phpinfo();
This will give you the PHP settings.
On the 9th row the ini location should be printed (Loaded Configuration File)
If the file path is correct, please share the actual error you are getting.

I ran phpinfo(); then discovered that another version of php was actually being used.
So, I edited the right php.ini file, which was in a different location.
After restarting WebMatrix, everything worked as expected.

Related

What does xampp expect as a php.ini?

I am using xampp and in the process of trying to debug with netbeans I am getting "Waiting For Connection". In searching the web I found that the php.ini needs to be edited but I am not sure which one. When I go into the PHP folder through xampp there is php.ini-production and php.ini-development. I read the comments in the file but I still do not understand. Any help is appreciated. Thanks.
I have searched around stack overflow and found the proper code for the ini but it seems there is nothing that shows you how to set the ini up in xampp.
I want to fix the php.ini file so that I can debug with netbeans
Well to find out the location of your php.ini file, you can create a file called phpinfo.php with the following function: phpinfo().
This will display information about your Php installation including the path to the php.ini file.
Also see this related question: How to locate the php.ini file (xampp)

Editing php.ini with MAMP 3.5 where is the right ini file?

I'm trying to edit my php.ini file to turn off short tags. Pretty standard.
phpinfo() tells me I am running PHP Version 5.6.10
I have edited 2 php.ini files so far, and neither has taken effect (yes, I restarted MAMP)
MAMP/conf/php5.6.10/php.ini
MAMP/bin/php/php5.6.10/conf/php.ini
Neither file changes the status of short tags
Can anyone direct me where/how to change my php.ini settings?
I really freaking miss WAMP. Whose bright idea was it to buy a Mac?!?
When you run phpinfo() you need to look for the value Loaded Configuration File. This tells you which php.ini file PHP is using in the context of the web server.
Aaannnnnnnnddddd I was being a dufus
I had been commenting the line out instead of changing to "Off"
as you version is 5.6.10, and supposed your apache2 server runing on ubuntu.
php.ini dir is
/etc/php5/apache2/php.ini
On my Mac, running MAMP I have a few locations that would contain the likely php.ini
So I edited the memory_limit to different values in the 2 suspected files,
to test which one effected the actual MAMP PHP INFO page details.
By doing that I was able to determine that this was the correct php.ini:
/Applications/MAMP/bin/php/php7.2.10/conf/php.ini

PHP is working even without php.ini

I have installed php by XAMPP and now I want to install the Phalcon dll, I have to add it to my php.ini
I did all the Phalcon installing steps but I did not get it is not working; I even removed my php.ini content and restarted Apache but php is still working!
IS PHP able to work without php.ini?
How PHP is working without php.ini?
php.ini file is not mandatory for PHP to work. It allows you to set up certain parameters, but if there's none then PHP defaults apply.
Why my php.ini is not working?
You are most likely playing with wrong one. Run script with
<?php
phpinfo();
and then look for location of php.ini. This will be the file you need to edit.
Run this code:
<?php phpinfo(); ?>
to get full path to your php.ini file you are using
Use phpinfo() to check details and the path to php.ini:
<?php phpinfo() ?>
phpinfo():
Outputs information about PHP's configuration
Because every system is setup differently, phpinfo() is commonly used to check configuration settings and for available predefined variables on a given system.

Installing PHP on Linux and php.ini file

I have installed PHP with Apache 2.2 on my Linux machine and all works fine following guide here
During the installation I had to copy the php.ini-development file into /usr/local/lib/php.ini, the question is why? Why exactly in this directory?
Default locations of the PHP configurations vary greatly by distribution. In any case, phpinfo() will allways tell you where is looks for your configurations.
So, create file with extension ".php" in your webroot and past this into it:
<?php
phpinfo();
Also, the default php.ini files contain plenty od usefull comments. Just read them and change what you need. Differences between dev and prod environments are usually only the verbosity. They show and log different ammounts of errors. Production usually shows no error at all.
(Debian and many other distributions put the PHP config into /etc/php5. This is actually the most reasonable place for configurations, but stick with what your distribution uses.)
The document you link to says this
You may edit your .ini file to set PHP options. [...]
If you instead choose php.ini-production, be certain to read the list of changes within, as they affect how PHP behaves.`
Have you tried something like
vi /usr/local/lib/php.ini
to see what's in it?
Maybe you need to read http://www.php.net/manual/en/configuration.file.php
You copied a default PHP.ini file, php.ini-development, to the standard 'php.ini' file in the location '/usr/local/lib/' the guide http://www.php.net/manual/it/install.unix.apache2.php
expected the php.ini file to be.
The php.ini file is a configuration file used by PHP when it is launched (runtime)

phpMyAdmin only works when /etc/php.ini is non-existent

I just set up phpMyAdmin3 with Nginx, and php-fcgi on PHP 5.3.8. Everything works perfectly when I rename php.ini to php.ini.disabled.
I get a generic error that says "Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly." when I run phpMyAdmin while php.ini is in tact.
When I run phpMyAdmin's index.php from the command line, it gives me the expected response: an html page saying "Wrong username/password. Access denied."
Can anyone point me in the right direction of where to look or what configuration option would probably be messed up in php.ini?
Have you made any changes to php.ini? Check your settings with a test php file with the following code
<?php phpinfo(); ?>
If nothing jumps out at you, try resetting the file. This php.ini might work.
If your really having trouble, consider reinstalling everything (assuming your not on a public server). A clean install of PHP and phpMyAdmin should fix any problems you may have.
You could try with disabling the APC settings in your php.ini and setting a valid session.save_path in your config. If phpMyAdmin it's usually because APC is enabled (and that's a problem combined with phpMyAdmin) or the sessions can't be saved locally.

Categories