Cannot access phpmyadmin in apache server - php

I have followed this tutorial for installation of php, mysql, apache and phpmyadmin :http://www.youtube.com/watch?v=kZ2zbO6PABk
and towards the end when he tried to access phpmyadmin he got the following error but resolved it :
Fatal error: Call to undefined function mb_detect_encoding() in
C:\Apache24\htdocs\phpMyAdmin\libraries\php-gettext\gettext.inc on
line 177
I am now still having issue. Like this question:
Fatal error: Call to undefined function mb_detect_encoding()
I have also made sure ive uncommented out and unblocked the following extensions:
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_exif.dll
extension=php_mysql.dll
extension=php_mysqli.dll
What else am I missing?

added PHPINIDir "C:\php" in http.conf and it now works

I faced this problem too. The problem is that settings in PHP.INI is no incorrect. Mysql is not longer enabled by default. you got to enable the dll in the PHP.INI among other dlls.
http://www.hirokoymj.com/Install_phpMyAdmin.php
These are some of the dlls that you have to uncomment in php.ini
curl, gd2, mysql, mqsqli, mbstring, pdo_mysql, phar, soap, zip
It works like a charm after having changed the settings!

On my install I found that the 4 instructions lines above the 'extension_dir="C:/..." entry in the php.ini file were not properly commented out. So nothing after that in the config file seemed to work. Including the set path to the extension_dir. So the mbstring.dll wasn't loading. I added semi-colons to comment them out, restarted Apache, and Viola! The hirokoymj.com page listed above was a big help!

Related

Call to undefined function finfo_open() on cpanel 64.0.36 [duplicate]

Whenever I try to get the mime content type from php, it echos:
Fatal error: Class 'finfo' not found in /home/jobynadel/finadel.com/video/finfo.php on line 4
or
Fatal error: Call to undefined function finfo_open in /home/jobynadel/finadel.com/video/finfo.php on line 4
I just can't figure it out!
The code I am using is:
$file_info = new finfo(FILEINFO_MIME_TYPE);
// See constant value http://php.net/manual/en/fileinfo.constants.php#113687
$mime_type = $file_info->buffer(file_get_contents($file));
Have a look at your php.ini file and check that the fileinfo.soor php_fileinfo.dll is activated (depending on your platform and version).
There should be a line similar to
extension=fileinfo.so
in your php.ini file
If you using XAMPP, you enable extension=php_fileinfo.dll in php.ini
What version of PHP do you have? PHP 5.3.0 and later have Fileinfo built in, but on Windows you must enable it manually in your php.ini. You can find further information in the documentation.
If you are using WAMP then Go to PHP extensions and enbale PHP_fileinfo and restart all serverices.
Windows users: just edit php.ini and uncomment this line:
extension=php_fileinfo.dll
I.e. remove the preceding semicolon from
;extension=php_fileinfo.dll
Remember to restart Apache for new php.ini to take effect.
For those have had it working fine, but then this error appears:
Some hosting providers (e.g., Dreamhost) allow customers to override default PHP settings in a configuration file, often with a path something like:
~/.php/5.4/phprc
That version number in the path can be a problem if you upgrade PHP (or it is upgraded on your behalf). Any custom settings from the prior version, including one enabling the fileinfo extension, will be missing in the newer version. Usually you can just copy the config file to the appropriate new config directory and restart the server.
I had this same issue with PHP.I did the following steps:
- make sure that the fileinfo extension is already installed if you are using < PHP 5.3.0.
- Then you have to add in php.ini ;extension=fileinfo.so or
;extension=php_fileinfo.dll
- If you want to uncomment remove the semicolon(;)
extension=fileinfo.so or extension=php_fileinfo.dll
Then save and restart your web server.
For PHP 7.3 or Higher
Change
;extension=fileinfo
To
extension=fileinfo
in php.ini file.

cURL is enabled in php.ini but still not working

I have enabled the cURL extention in he php.ini folder, I have copied mutliple dll files from the PHP folder into the Apache Bin folder and the System 32 folder but cURL is still not enabled on my system.
All the solutions that I have looked at:
How to enable cURL in PHP / XAMPP
http://php.net/manual/en/curl.installation.php
http://php.net/manual/en/curl.installation.php#115953
http://php.net/manual/en/curl.installation.php#117372
I know this because I still see the following error:
Fatal error: Call to undefined function curl_init() in C:\AMP\sites\ftp-crawl\index.php on line 55
When I run only phpinfo(), there are no cUrl options. The only mention of cURL is under module authors and its value is cURL: Sterling Hughes
I am running a windows 10 developer machine with PHP, MySQL and Apache installed.
What do I still need to do or check to enable curl?
I had the same problem. I fix it replacing the php_curl.dll. Maybe a file corruption.
In php.ini I setup with extension=php_curl.dll.
No more Call to undefined function curl_init() errors.
I resolved the issue by editing my PHP.ini to include the full path of the extension as opposed to just the name.
So where most php.ini files just have this line of code:
extension=php_curl.dll
I changed it to look like this:
extension=C:\amp\PHP\ext\php_curl.dll
I have no idea why PHP/Apache couldn't show an error while I had extension=php_curl.dll in my php.ini. At least saying something like dll missing or something like that, but that resolved my issue.
I believe you edited the demo or wrong php.ini file.
In your phpinfo you will find a path to the used php.ini file. It's next to the text: "Configuration File". Check out that file and make sure that the following option is set (by default it is commented out with a semicolon).
extension=php_curl.dll
If you can not find this line, you might have a different version of Apache. In this case you might find a directory called "mods-available" in which the curl extension lays. You need to move this file to the "mods-enabled" folder. Honestly I think this only applies to Linux environments, not sure about Windows.
It means that the curl module is not installed on the server. This problem generally occurs with php5. You need to check if php5-curl module is installed or not. Also confirm if curl is installed on the system.
Terminal command curl -v.

The mbstring extension is missing?

I know there's tons of topics about my problem, but I can't find a solution.
I'm using wamp and I've changed my version of PHP from 5.5.12 to 5.6.16, then when I go to localhost/phpmyadmin i have this error displayed :
Fatal error: Call to undefined function mb_detect_encoding() in
C:\wamp\apps\phpmyadmin4.1.14\libraries\php-gettext\gettext.inc on
line 177
So I update phpMyAdmin from 4.1.14 to 4.5.2.
And I have this **** error:
phpMyAdmin - Error The mbstring extension is missing. Please check
your PHP configuration.
My php.ini, phpForApache.ini is configured, I have un-commented the extension, set extension_dir to C:\wamp\bin\php\php5.6.16\ext, I stumbled on many topics/forum but none of the solution works.
Do you have any idea?
Please check #36254548
Copying the php.ini file to "wamp64\bin\apache\apache2.4.17\bin" has solved my problem.
Sometimes the extensions directory is well pointed to, the dll files have been uncommented but it still doesn't work.
The next solution to use, that is if your extensions directory is correct and dll files for the mbstring has been uncommented, then copy the php.ini file and paste it into the windows directory (i.e. C:\Windows).
You then restart your wamp/xampp and it will work.
check your php.ini file. In the extensions part of the configuration you should find:
;extension=php_mbstring.dll
remove the leading ';' to uncomment and enable the extension so it looks like this:
extension=php_mbstring.dll
restart your apache and it should work.
I faced the same issue when I start wamp, suddenly my project was not working and when I check the phpmyadmin, it gives the same above error.
My debugging process found php.ini file is missing. However I already installed two PHP versions, 5.6.19 and 7.0.4. I changed the version to 7.0.4 and then re-changed to 5.6.19. It started work.
What I guess, while changing the version, all the configuration files getting re-installed in wamp folder.

Getting error while connecting postgres to php

Hi i am trying to connect postgres server with PHP onm windows with xaampp. I have enabled the extension php_pgsql.dll in php.ini. I have also give the libpq.dll path to httpd.conf.
But still i am getting error Fatal error: Call to undefined function pg_pconnect() Any solution
I used postgres9.2 bin folder and load the libpq.dll in httpd.conf It solved my problem. I think there is some version compatibility first i was using 9.4 postgre bin files which was not working.
I added this line to Loadfile "C:\Program Files\PostgreSQL\9.2\bin\libpq.dll" httpd.conf
And remove ; from extension=php_pgsql.dll
After restarted the sever solved my problem.

ftp_connect fatal error : call undefined function

For some reason the ftp_connect() function doesn't work, when I try to used it it ends with a fatal error stating that this function is undefined... Surprisingly I can still use a ftp client or use an ftp connection through the Terminal. How may I solve this problem ?
I run on Mountain Lion et I've got the 5.3 php version - I reinstalled it once hoping this would solve my problem.
Check PHP FTP installation manual
On PHP 7, You can enable it by adding this line to the php.ini file.
extension=php_ftp.dll
On PHP 8+ enable this line in php.ini:
extension=ftp
I ran into the same issue. After I checked this one setting, it worked just fine.
Sounds like your PHP was not installed with --enable-ftp or that the ftp module is disabled in your php.ini.
To check if ftp is enabled, create a page like this and browse to it:
<?php
phpinfo();
?>
Look for "ftp support", it should be marked "enabled".
I found that (at least for higher versions of PHP), that Luboš Turek's answer is mostly correct. On Windows, at least, you don't need (or want) the ".dll" suffix.
What is very odd is that the PHP.INI default configuration file doesn't even include a commented out line stating:
;extension=php_ftp
So, as Luboš said, adding:
extension=php_ftp
to the INI will work. That said, check your ext folder to make sure the FTP extension is there.
I came here looking for an answer and fixed mine by changing the setting in php.ini as below. I removed the leading semicolon on the ftp extension line (at the bottom).
; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
; extension folders as well as the separate PECL DLL download (PHP 5+).
; Be sure to appropriately set the extension_dir directive.
;
extension=bz2
extension=curl
;extension=dba
extension=com_dotnet
;extension=enchant
extension=fileinfo
extension=ftp
Guys I find the Solution, For me I had PHP 5 and now I have PHP 7. I get this error. Do this:
Open PHP.INI
Search for : allow_url_include = Off
Change Off to ON:
Like this: allow_url_include = On
Restart all Service on Wamp server
I had the same problem, i fix it disabling the antivirus or add the apache server to the exception.

Categories