[resolved] Call to undefined function mysql_pconnect() .. |
Veteran
|
I think you do not have the correct MySQL extension active. The mysql_pconnect() function belongs to the mysql extension, not mysqli. You should uncomment the line
|
||||||||||||||
_________________ |
|
Thank you, anno. No, that did not solve the problem. The same error message still appears. I had chosen mysqli because I read somewhere that it is required if you want to have the full functionality of MySql 4.1 and higher. Besides that I think Dimitry suggested in a similar case to uncomment this extension. |
||||||||||||||||
|
|
I forgot to mention that phpinfo() does not show up with a MySql section.
Can anybody tell me what might have gone wrong? In the MySQL 5.0 Reference Manual I found the following note:
Is there a chance that Nusphere's package NuSphere-phped-5.2evl-Win32.exe has been compiled without support for MySQL? |
||||||||||||||
|
Veteran
|
No MySQL section in the phpinfo() suggests that the MySQL extension is not loading. That explains why mysql_pconnect() does not work.
Things that I would check/try: * Perhaps you are editing the wrong php.ini? In you phpinfo() output, check the location of php.ini (it is displayed near the top of the output). Your previous post suggests it is C:\WINDOWS\php.ini. * Check that php_mysql.dll is present in your extensions folder. * Set "display_startup_errors = On" in your php.ini to see any possible errors with loading of extensions. |
||||||||||||||||
_________________ |
Site Admin
|
Stephen (anno) is correct. Please follow his suggestions.
This is a misleading comment for Win32 system where mysql extension is not compiled in, but provided as a separated module. You have to add extension=php_mysql.dll into your php.ini.
no, there is no chance like this. |
||||||||||||||||
Last edited by dmitri on Sun Dec 30, 2007 3:51 pm; edited 1 time in total _________________ The PHP IDE team |
|
Thank you Annon, thank you Dmitri
I followed your suggestions: - php.ini is in c:\windows and I only have one file php.ini. (I checked that with SEARCH.) - The output of phpinfo still shows up with the same data: Configuration File (php.ini) Path: C:\WINDOWS Loaded Configuration File: C:\WINDOWS\php.ini - php_mysqli.dll and php_mysql.dll are in c:\Pr\nusphere\phped\php5\extensions With "display_startup_errors = On" I got the following warning: "PHP Startup: Unable to load dynamic library 'c:\Pr\nusphere\phped\php5\extensions\php_mysqli.dll - Unzulässiger Zugriff auf einen Speicherbereich." The last sentence means "Unallowed access to storage." I unchecked Write Protection for folder c:\Pr\nusphere\phped\php5\extensions and clicked the OK button. Having selected properties of that folder again, I learned that Write Protection had not been removed. So the warning still appears. You suggested to use php_mysql.dll instead of php_mysqli. But the result is the same, i.e. the same warning. Having invoked phpinfo.php5 an additional warning for php_pdo_mysql.dll showed up. The files php_mysqli.dll and php_mysql.dll are not write protected nor do they have the hidden or archive attribute set. I activated "Make this folder available in the network" and "Network users are allowed to modify files". But that made no difference. Is it necessary to remove Write Protection for that folder? It should be possible to use attrib to modify attributes of a folder. But are there any other consequences? |
||||||||||||
|
Site Admin
|
First of all, remove php.ini from Windows folder and do not put it there.
Then, make sure that you run php from nusphere\php or nusphere\php5 folders if you need php v4 or v5 respectively. Each php should be equipped with its own php.ini and they must be in nusphere\php and nusphere\php5 directories. If you run 3rd party web server such as IIS or Apache, make sure that their copy of php.ini is in their folders. For example if you have Apache 2.2 (httpd.exe) in c:\program files\apache group\apache\bin\httpd.exe, its php.ini should be in c:\program files\apache group\apache\bin This way you'll avoid conflicts between different php versions installed on your system. Regarding file permissions, it's also a misleading error message. It's sufficient to have Read & Execute permissions. On the other hand, php_mysql.dll depends on libmysql.dll and if latter is not found, php will fail to load php_mysql.dll too. So, make sure that libmysql.dll is either available in one of the directories listed in PATH environment variable or is in the php directories (one copy for each) |
||||||||||||
_________________ The PHP IDE team |
[resolved] Call to undefined function mysql_pconnect() .. |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by