I am using windows server and have ran the following code to find my php.ini.
<?php
infophp();
?>
Then uncommented the extension=php_curl.dll and set the extension path on my php.ini.
At last downloaded and installed curl and restarted my server but there is still no information about the curl in my info.php
I have php_curl.dll in my ext folder (extension folder), libeay32.dll and ssleay32.dll are also in root of my php folder.
I had this problem a few times and most of them web server was picking up wrong php.ini.
Make sure the one you are editing is being used. Try disabling php in it totally and running your script to find out. Just change
engine = On
to
engine = Off
and try it out. If you still see php info page, that means web server uses wrong php.ini.
If you use Apache, you can specify in httpd.conf which php.ini to use with
PHPIniDir "C:/path/to/your/php/dir"
Related
I know that this question is asked a thousand times, but none has given me the correct answer.
I'm trying to get mailhog working and therefor I need to change the sendmail_path. I haven't installed sendmail by the way. So I changed my php.ini file, but the changes aren't picked up.
When I run phpinfo() it tells me that the loaded configuration file is:
/etc/php/7.1/fpm/php.ini
I edited this php.ini file, restarted apache, but no success. I also restarted php7.1-fpm, no succes either. Restarting the whole server also does not change a thing.
When running from CLI, it uses a different php.ini file > /etc/php/7.1/cli/php.ini. I updated this .ini file, restarted apache and from CLI it works fine.
So the issue is that I can't get this working for php-fpm. What else can I do?
I got it fixed on in a different way.
I added a my.ini file in the /etc/php/7.1/fpm/conf.d/ directory. Added my own modifications to the file and restarted apache and fpm.
Now it picks up te changes and all is working. So the file is added to the Scan this dir for additional .ini files.
I am trying to activate curl on my Apache Server. So far it does not load.
I edited the php.ini file to allow the extension:
And I made sure using phpinfo() that I was editing the proper configuration file.
I restarted the server twice and made sure in php.ini that the extension folder (C:\php7\ext) was loaded correctly but curl still does not show on my phpinfo() page.
Why is this?
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.
I try to run my phpinfo.php file with php5.ini, but still show me "Forbidden: You don't have permission to access /phpinfo.php on this server." error message. My site is working, only that phpinfo not...
But, if rename it the php5.ini to php.ini the phpinfo is working and show all the details. Only the problem is, my site can't working with php.ini. Have to rename it to php5.ini...
Anybody know any solution for fix it and be work with php5.ini as well?
It's possible that your php5 running as CGI instead as an apache module.
So you have to configure Apache to use the PHP CGI modifing the httpd.conf.
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