I am having a problem getting phpmyadmin to work correctly on my desktop. Every time I try running phpmyadmin, I get the following error:
Fatal error: Call to undefined function __() in C:\Apache24\htdocs\phpMyAdmin\libraries\sanitizing.lib.php on line 135
I was wondering if anyone has advise on how to make phpmyadmin work correctly. I have Apache v2.4.1.8, php v5.5.33, and phpMAdmin v4.6.0 installed and according to the tutorials I followed, everything works correctly until I get to the phpMyAdmin.
If you need any other info, I will reply what I can.
This is a permissions error.
You need to
Go into php.ini file and make sure extension=mbstring.dll is enabled.
Restart your webserver.
In the newest php versions the "extension_dir" path is not enabled initial. So maybe it helps... :)
screenshot
In addition to making sure extension=mbstring.dll is enabled, you should make sure the extension path is correct.
By default, the extension path is set "/ext" in the php.ini file.
However, when install httpd as a service, the relative path may be incorrect.
So, you should edit the extension path to an absolute path, such as "C:\Program Files\PHP\v5.6.21\ext".
Related
I had two XAMPP installed in my computer. XAMPP1 was in C:\XAMPP and XAMPP2 is in D:\XAMPP. Both were working fine. I needed to delete XAMPP1 (c:\xampp) and deleted. After that My XAMPP2 PHPMyAdmin Stopped Working. It displays error message something like this:
It is searching SESSION DATA in C:\XAMPP\TMP. So I created empty folder C:\XAMPP\TMP
After that it displays error message like this:
This means If I Install another xampp in C: drive it will work. But I don't want to install another xampp in C: drive. Is there any solution to this problem?
Looks like the installation in D:\XAMPP is not properly configured.
Adjust session.save_path in your php.ini. You most likely don't want the session data in the old Xampp directory.
Also check that extension_dir in your php.ini matches the correct path to your php extensions. This could be the reason that the mysqli extension is not loaded, if it's pointing to a different path.
Restart Apache and try again
Check your log files for errors, e.g. failed extension loading etc.
If the error about the missing mysqli extension persists, make sure it is not commented out in your php.ini
Edit:
Sorry, I don't have the rights to comment yet... :(
Not sure, if remote debugging is very effective here. Search the error message and have a look for example here: phpMyAdmin - #1932 Table doesn't exist (collation in use) after reinstalling
I have been a happy user of XAMPP for years,
but today I have updated to the latest Windows 32 bit version on a Windows 10 machine.
I couldn't see a 64 bit version.
Anyway, all went well,
and once I changed some settings, I was able to see all my old databases under the new phpMyAdmin.
But my PHP scripts are bombing out before they start.
Even phpinfo gives the same error message, which is...
"Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'F:/My Documents/OneDrive/Webs/htdocs/index.php'
(include_path='.;C:/xampp/php/pear/PEAR') in Unknown on line 0"
The test script of index.php is nothing more than
<?php echo "HELLO"; ?>
The statement in php.ini is
include_path = ".;C:/xampp/php/pear/PEAR"
and there are no other include_path statements.
The directory C:/xampp/php/pear/PEAR does exist.
The index.php file is there.
I don't know why there's a PEAR folder inside a pear folder - that's how Xampp installed it.
I have tried all variations of that include_path statement to no avail.
I have left out one of the pears.
Leaving out the include_path statement altogether just results in the PHP default which is a folder which is definitely not there, so that's no good.
My localhost is inside the OneDrive folder as you can see from the error message, but I have been doing it that way for years.
Now I cannot run any PHP scripts. Pure HTML is no problem.
The new installation of Xampp has totally replaced the old one, and its Control Panel v3.2.2 looks to be working perfectly.
phpMyAdmin seems to be working fine, but not phpinfo, as said.
I have scanned the web for answers to this, and there is plenty of forum Q&A's, but they all tell me to do what I have done.
The computer is Windows 10 Pro, and is fully up to date. Apache 2.4.33.
PHP 5.6.35. Database server is 10.1.31 MariaDB.
I've run out of ideas. Any help will be appreciated.
Thanks Mike.
You need to fix your include_path system variable to point to the correct location.
To fix it edit the php.ini file. In that file you will find a line that says, "include_path = ...". (You can find out what the location of php.ini by running phpinfo() on a page.) Fix the part of the line that says, "\xampplite\php\pear\PEAR" to read "C:\xampplite\php\pear". Make sure to leave the semi-colons before and/or after the line in place.
Restart PHP and you should be good to go. To restart PHP in IIS you can restart the application pool assigned to your site or, better yet, restart IIS all together.
first: check all the paths in the php. ini ( use a search or a grep to check them)
second: check that you don't have any extensions added twice (one in the beginning and one in the end of the file)
I'm using PHP Version 5.3.3 on a Linux server. When I try to use mysql_connect() or mysqli_connect() to reach the database, I get an error saying:
Fatal error: Call to undefined function mysql_connect()
or
Fatal error: Call to undefined function mysqli_connect()
You can see my testing page here: http://gorp.osg.ufl.edu/BOT3151/testing.php
You can see the phpinfo page here: http://gorp.osg.ufl.edu/phptest.php
The relevant configure commands are here:
'--with-mysql=shared,/usr'
'--with-mysqli=shared,/usr/lib64/mysql/mysql_config'
'--with-pdo-mysql=shared,/usr/lib64/mysql/mysql_config'
It also says that these .ini files are being parsed:
/etc/php.d/mysql.ini
/etc/php.d/mysqli.ini
The php.ini file also includes these lines:
extension=mysql.so
extension=mysqli.so
So what's going wrong here? Is mySQL not properly installed on the server? How can I fix this?
ADDENDUM: I should have explained that this is on a shared server that I don't administer. I just have access to my folder on the server through SFTP. But I do have a php.ini file and I have an extensions folder. So is this something I can fix myself or do I need help from a server administrator?
Try to install PHP MySQL by:
apt-get install php5-mysql
Then your MySQL is easily set with your PHP and Apache setting. If your MySQL is installed already you can uninstall it first and then try to install PHP MySQL by the code above in a terminal.
It is the easiest way to do it without needing any settings.
The "mysqli" extension is not loaded. You can NOT see the section in your phpinfo() file.
http://gorp.osg.ufl.edu/phptest.php
You should see something like this on that page:
https://drive.google.com/open?id=0B7VdYIkRLxQWaDRLYVNLeU84am8
Just because you have uncommented the line extension=mysqli.so does not mean it will load. The file mysqli.so is possibly not in a folder where PHP is looking for it or does not exist at all.
Check "extension_dir" in your php.ini file. Then go and see if the file mysqli.so is actually there.
Have you restarted your web server?
Given that your PHP info page does not list a section displaying the MySQL configuration, it stands to reason that MySQL may not be installed on your server.
I was facing similar issue. There was some problem with the default values in php.ini file. Please have a look at this answer if your problem wasn't solved with the answer given above.
Before I begin, I will add that I've spent much time googling this and have attempted several solutions none of which have worked.
System Info:
Windows 7 Professional (x86, 32 bit )
Apache2 up and running C:\Program Files\Apache Software Foundation\Apache2.2\
PHP 5.3.8 C:\Program Files\PHP Also works.
manually configured httpd.conf to enable php, note that php is working, except for curl.
I have enabled curl in my php.ini C:\Program Files\PHP\php.ini
This is near the end of my php.ini
[PHP]
extension_dir = "ext"
[PHP_CURL]
extension=php_curl.dll
Note also that the file C:\Program Files\PHP\ext\php_curl.dll exists!
I have restarted the apache server and yet curl still does not function.
a quick test.php file:
<?php
$curl_conn = curl_init();
?>
note that I have both php start and end tags correct stackoverflow just isn't showing the start php tag.
puts out:
Fatal error: Call to undefined function curl_init() in E:\path\to_project\test.php on line 3
I have now spent 3 hours trying to get curl to work, google has no helped, most of the solutions seem to involve making sure that the extension=module line in php.ini is not commented out, and as you can see above it is not commented out so that advice doesn't seem to help me.
Any ideas would be appreciated as this is rather frustrating.
Thanks!
You should add "C:\PHP" to the server's PATH environment variable:
Right-click on My Computer, choose Properties
Flip to the Advanced tab
Click the Environment Variables button
Double-click the Path variable in the list of System variables.
Either add "C:\PHP;" to the beginning or ";C:\PHP" to the end (sans quotes, not both).
Restart your computer for it to take effect.
Thanks to:
http://www.webcheatsheet.com/PHP/install_and_configure.php
I know this thread has long been closed, but for anyone like myself who encounters this problem subsequently, for me, the answer turned out to be a DIFFERENT copy of the php.ini file was being loaded than what I thought. I was editing the php.ini file in my PHP 5.4.3 directory, and there is another copy of the php.ini file that resides in the Apache directory - identical as far as I could tell from a quick glance.
De-commenting the extension=php_curl.dll line IN THE RIGHT FILE, the Apache folder, enabled the curl function for me.
Jeff S.
Have you copied cURL dependency files:
libeay32.dll
ssleay32.dll
to C:\Windows\System32 folder?
It could be that PHP cannot find these two files to run cURL extension.
I just recently setup a fresh install of PHP, Mysql and Apache on my Windows 2003 server. Php is working fine and my Navicat MySQL browser can connect to my tables. However no matter what I do. MySQL doesn't show in phpInfo() even though I have the extensions in my ext folder. I installed PHP via the windows binary installer. Any idea what I'm missing? I'm pretty new to PHP is this is the first time I've tried to setup my own server I'm sure I'm missing something simple. Thanks.
--- EDIT ---
So as suggested by Alan Geleynse I added the extension to my php.ini, now Apache crashes every time I try to enable php_mysql.dll any ideas on this one? I may just restart my php from scratch if this is any more trouble.
You probably need to enable the extension in your php.ini
Search through php.ini for extension and you should see a list, some of which will be commented out. If you remove the comment for MySQL, it should load the extension.
If you do not see it, you should be able to add this line to your php.ini. Make sure that the dll listed is the one you want and is located in your extension directory.
extension=mysql.dll
Seems the issue was not only a missing php_mysql.dll but I was also missing libmysql.dll The installer still borked the install of the extension files though. Oh well it happens thanks to everyone for the help.
Probably apache crashes because of missing dll. There is probably a directory 'ext' in your php installation dir. Check whether there is a 'php_mysql.dll' file in it.
Also, check for directive 'extension_dir' in your php.ini, it must point to the location of extensions directory. For example, I have php installed in 'C:\php' and 'C:\php\ext' folder in it. My php.ini contains line:
extension_dir = "C:/php/ext"
I just fixed this problem on my computer by copying libMysql.dll from the MySql server directory to c:/windows/system32/, just a few minutes ago.