I am going to change my website PHP version from 5.2 to 7.2, I have synced all of setting from php.ini in 5.2 version to the new one, but when running the phpinfo.php file on the server, most of the variables have no value. especially session.save_path and error_log, however, I have set all of them in the php.ini file. also display errors is on.
session.save_path = C:\PHPSessions
error_log = "C:\PHPSessions\php-7.2.10_errors.log"
I have checked for permissions as well, IUSER,IIS_IUSRS,users,admin all have full control.
now my website not loading, and it's my info file:
ps: I have changed the php version on my local using wamp, and there wasn't such problem, so the code is fine.
Related
I am trying to change display_errors = Off to display_errors = On in my php.ini. I ran phpinfo() and verified the Loaded Configuration File (it is located here: /Library/Application Support/appsolute/MAMP PRO/conf/php.ini).
Everytime I edit the display_errors value of this php.ini file and restart my MAMP server, the php.ini file seems to reset. If I open the php.ini file again after restarting MAMP it shows display_errors = Off.
Why might MAMP be resetting the php.ini file?
note - I'm using MAMP Pro if that makes a difference.
The way I have done it was to change the template that MAMP Pro replaces your php.ini file with. In my case the ini file that PHP was loading was found at
/Library/Application Support/appsolute/MAMP PRO/conf/php.ini
but everytime I changed it, MAMP Pro wrote over it with its own version. To change what I wanted to change in the php.ini file, I simply found the template:
/Applications/MAMP PRO/MAMP PRO.app/Contents/Resources/php5.4.4.ini
(PHP 5.4.4 is the version i'm using) and then I changed what I needed to change :D Hope this helps
You can set php.ini values with the template editor in Mamp Pro.
File -> Edit Template -> PHP (php.ini)
Select the same version your instance is running.
When you save the template Mamp will overwrite the php.ini file used for your instance and restart Apache.
I finally figured it out. MAMP Pro works differently than regular MAMP. With regular MAMP you would edit the appropriate php.ini file directly. With MAMP Pro however you have to use the MAMP Pro interface to control the php.ini settings. MAMP Pro recreates the php.ini file each time the server starts based on these settings.
In my case, to display server errors I had to open the MAMP Pro interface. Click on the Server tab. Click on the PHP tab. Check the Display startup errors checkbox. Check the All errors and warnings checkbox. Check the Display checkbox. Apply the changes and restart the server.
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
Macbook pro: 10.9.3
Php: 5.4.25
Apache 2.2
I have downloaded php using homebrew along with mongodb. Everything is working fine but I can not seem to find the php.ini file that apache is using. I used the phpinfo() method and it is telling me that the loaded file is in etc/php.ini. Strange thing about that is my php.ini file is empty. The only line in this file is the extension directive for the mongodb driver. I have been searching for a while now using the usual methods such as php -i and phpinfo(). I have no idea how to configure my php. It must be loading default configurations from somewhere but I can not find where. Anyone have any clue to where it might be?
I have a dedicated server and I'm facing a strange issue. I found there 2 php installations and only one must be used and is correct, which is version 5.2.6, but currently, I see on phpinfo that the php.ini is being loaded isn't the right configuration. The php.ini which I need the server use is located in /opt/php-5.2.6/config/php.ini and the current in use is located in /etc/php.ini. How to turn on the php located in /opt/php-5.2.6/ ? I don't know what happened, maybe after I tried to install the xCache extension, but didn't work and in some way that installation of xCache changed where the php is loaded from.
How to make loading the php which I have in directory /opt/php-5.2.6/ ?
Thanks.
You can make your apache to point to another php.ini using .htaccess file.
I install PHP on IIS 7.0 at Windows Server 2008 and Windows 7. I have setup Wordpress and Joomla and config finished.
But I find I can not upload any file with PHP program but okay under ASP.NET.
I had,
Config the every permission with write of Upload folder to IUSR and IIS_USRS
Config the PHP.ini with file_uploads = On
Setup a temp directory and config for every permission with write. upload_tmp_dir = "E:\Webware\PHP.Upload.Tmp"
Reboot IIS
But I still can not upload file via PHP program.
When you run phpinfo() what is the value of your upload_tmp_dir?
I'd wager your upload_tmp_dir variable in the [PHP] configuration section of php.ini file is being overwritten in the [WebPIChanges] configuration section, towards the end of your php.ini file...
Depending on how you installed PHP, there may be two upload_tmp_dir variables in your php.ini file, and if the the second one is set, it will overwrite the first.
Take a look at this site, it may help you: http://www.radinks.com/upload/config.php
Also i suggest you to don't modify upload_temp_dir