NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] how to access mysql


Joined: 20 Apr 2007
Posts: 25
Location: UK
Reply with quote
Hi, I have can't connect to mysql from php since the install today of V5.0

Has anyone else experienced the same?

I get Fatal error: Call to undefined function mysql_connect()
restarted apache and mysql and rebooted. It may be one of the dll files or php.ini but what and where?

Winxp sp2. PHP 5.1.2 Mysql ? Apache 2.0.49
Thanks FB
phpEd V5 is awesome!!
View user's profileFind all posts by FatBobSend private message
Veteran

Joined: 24 Jan 2006
Posts: 311
Reply with quote
Your local php5 php.ini file must have gotten overwritten (phped install/php5/php.ini) - please restore mysql there, uncomment extension=php_mysql.dll
View user's profileFind all posts by yfaktorSend private message


Joined: 20 Apr 2007
Posts: 25
Location: UK
Reply with quote
Didn't see this reply until now, so what I did yesterday was dump all my data, and restore my system from a week ago as I need mysql running on a daily basis. Should have been simple, but took me all day and I messed up my email Sad

I looked at the /windows/php.ini file before restoration and the php_mysql.dll was uncommented, but I didn't know about the local usage in install/php5/php.ini.

Currently I do not have phpEd installed, and due to poor disk management and being in between swapping drive systems from scsi to esata II I have no more backup drives.
So, If I reinstall phpEd today, how confident are you that that is the sole problem?

Thanks
FB

Edit: Been back into the old disk at nusphere/phped/php5/php.ini and the extension=php_mysql.dll was already uncommented.



NB - Forced to swap back to another editor today and it's terrible compared to phpEd. In fact I have tried many editors recently and the gap between NuSPhere phpEd and 'all the rest' is as wide as the Atlantic Ocean!
View user's profileFind all posts by FatBobSend private message
Veteran

Joined: 24 Jan 2006
Posts: 311
Reply with quote
Hi Bob- of course I am confident that MySQL works in te scripts runnning in PhpED - it is not the matter of IDE actually, it is the matter of PHP working with MySQL
View user's profileFind all posts by yfaktorSend private message


Joined: 20 Apr 2007
Posts: 25
Location: UK
Reply with quote
yfaktor wrote:
Hi Bob- of course I am confident that MySQL works in te scripts runnning in PhpED - it is not the matter of IDE actually, it is the matter of PHP working with MySQL


Thanks Yfaktor, but since the post I have been back into the old disk and at nusphere/phped/php5/php.ini ,the extension=php_mysql.dll was already uncommented.

Anymore ideas, I dare not reinstall phpEd until the cause/solution is remedied?
View user's profileFind all posts by FatBobSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Installation of PhpED v5 can not affect mySQL database in any way.
If you experience problems with accessing mySQL - that's another story but I'd like to emphasize one more time: your database is not touched.

Regarding problems accessing mySQL, please take a look at what php you run and where its php.ini
then check extensions_dir and if mysql extension is loaded and its version matches php version.
Also it makes sense to check if libmysql.dll is available in the path or in current directory for the service that loads php. In case of Apache, it is httpd's directory.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 20 Apr 2007
Posts: 25
Location: UK
Reply with quote
Thanks Dmitri.

Yes you are correct, I have not lost any data through the installation and everything works from inside the IDE, mysql and php are fine. It is the connection between mysql and php in the normal environment that breaks during installation.

The trial version installed fine, it was during the upgrade to V5 that things went awry.

I will download my php version again and take the mysql dll and change it for the current one just in case thats the problem. I can see if the libmysql.dll is available when I try the reinstall again.

Yuri is helping to resolve this behind the scenes Very Happy

It's very difficult for him as I am a bit of a muppet when it comes to a general understanding of how things fit together!
View user's profileFind all posts by FatBobSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
it was during the upgrade to V5 that things went awry

I'm not sure what things might went away during upgrade.
If you have a 3rd party WAMP platform, you need to make sure that:
-it does not use PHPRC
-its php.ini is in Apache's directory, not in Windows one
-IniFilePath in HKEY_LOCAL_MACHINE\SOFTWARE\PHP is not used and this value is not set

If either of the cases is not followed, you may encounter problems with multiple php versions installed on your machine.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 20 Apr 2007
Posts: 25
Location: UK
Reply with quote
Thanks Dmitri, I don't use a 3rd part WAMP platform, but that may help to resolve the problem.

I have found http://www.wampserver.com/en/presentation.php

I will give it a go and see what happens.

If anyone else uses a quality 3rd party WAMP platform, details will be gratefully received.
View user's profileFind all posts by FatBobSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
You may also give a try to NuSphere Tech Platform 5.0

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[resolved] how to access mysql
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic