Posted by Paul Lautman on 07/08/07 08:51
Nicholas wrote:
> hi,
>
> before I get started with my problem would like to say thanks to all
> the people who keep newsgroups going.
>
> I am running WAMP and recently upgrading (after solving a few problems
> getting the rigth php 5.dll file for apache 2.0 )
>
> I upgraded because of the improved functionality such as the ability
> to write to arrays using the foreach construct as an example. However
> there are very few free information resources for these specific
> updgrade problems.
>
> Amongst the few errors I have encountered as a result of the upgrade:
>
> 1/ Error reporting. At first the my code stop working due to the error
> reporting as a result of php 5 E_ALL in php.ini
> After some research found that I could solve this problem by adding
> the line: error_reporting(0); to the files where these errors were
> being displayed. I am slightly uncomfortable with this solution.
>
> 2/I have started getting errors to the tune of undefined col 'xxx' in
> mysql statements using left joins which previously worked ok. After
> some research the only possible solution I could come to was that the
> syntax for left join statements had been changed under mysql 5(mainly
> on website for users updgrading from a earlier version of mysql)
> however I have not upgraded mysql
>
> 3/Call to undefined function mysql_connect has started appearing for
> some reason. Having restructured mysql statements with left joins to
> the 'correct syntax' (see 2) I get this unusual error. Has my database
> dissolved into the ether?
>
> Its difficult trying to plug the particular error when there are
> several stop gap measures already implemented. The lack of information
> on the php 5 upgrade is a problem. if anyone knows of any good faqs or
> has encountered similar problems would be great to hear from you.
You are confusing lots of things here.
1/ Error reporting. E_ALL in php.ini is nothing to do with php 5 per se. The
particular installation of php 5 that you have chosen (the WAMP package),
happens to come with that setting for error reporting. If you prefer
different setting in php.ini, then change it. the WAMP package has an easy
way to access the config files from its task bar icon.
2/ This is nothing to do with php. This is to do with mysql. The details of
how mysql 5 more closely followed the later SQL specifications for "comma"
joins is well documented and was discussed a lot when the new version was
issued. You need to re-write your queries for MySQL 5 compatibility. They
will also end up more readable. As a stopgap, if you really want to, putting
brackets around the tables listed with the comma joins usually cures this.
But I would strongly advise re-writing the queries using the JOIN keywords
which makes the intentions much clearer for maintenance (which I see you
have done).
3/ I can't explain this one I'm afraid. I have no such problem with my WAMP
installation.
[Back to original message]
|