[PHP] Crash course

2012-08-20 Thread Lester Caine
OK - MySQL is not an area I've had to bother with, but I'm trying to sort out a 
tranche of websites that 11 messed up the DNS on last week and we have take 
over support for. All the databases have backed up and been restored ... 
although after Firebird's backup and restore system having to dump the database 
as raw SQL ... that took a LONG time :(


Anyway I've installed the mysqli driver and that seems to be working and I've 
run 'test connection' in mysql workbench with what I think are the same settings 
in the  joomla without a problem, but the website just gives
Database connection error (2): Could not connect to MySQL. I can browse the 
data in workbench, and changing user admin enables and disables that, but 
nothing seems to sort the php connection.


Can anybody think of something that I have missed in this or point me to a 
suitable 'newbie' guide to debugging mysql connections so I can get all these 
sites back on line again ... If it was Firebird I'd just have mirrored of one of 
my other machines and been working as the security stuff is managed in the 
database, by mysql seems to have layers of security that I'm missing somewhere ;)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Crash course

2012-08-20 Thread Simon Schick
Hi, Lester

Just try to connect to your mysqlserver using a simple php script first.

Example for MySqli:
http://www.php.net/manual/en/mysqli.construct.php#example-1625

Example for MySql:
http://www.php.net/manual/en/function.mysql-connect.php#refsect1-function.mysql-connect-examples

If you still use MySql and not MySqli to connect to your MySql-Server:
Please keep in mind, that this extension is about to die out.

I just know of mysqli and mysql that you can chosse in the
Joomla-Installation process ...
PHP itself does also have PDO. There you have to check first if the
pdo-driver for mysql is installed:
http://www.php.net/manual/en/mysqli.quickstart.prepared-statements.php
And then try to connect to your server:
http://de2.php.net/manual/en/pdo.construct.php#refsect1-pdo.construct-examples

If you're using MySqli, please try a prepared-statement as well.
http://www.php.net/manual/en/mysqli.quickstart.prepared-statements.php
I got access to a server where the administrator had mixed it up that
hard, that mysqli as PHP-extension was installed and worked quite well
excepted by the prepared-statement :D

Bye
Simon

On Mon, Aug 20, 2012 at 12:51 PM, Lester Caine les...@lsces.co.uk wrote:

 OK - MySQL is not an area I've had to bother with, but I'm trying to sort
 out a tranche of websites that 11 messed up the DNS on last week and we
 have take over support for. All the databases have backed up and been
 restored ... although after Firebird's backup and restore system having to
 dump the database as raw SQL ... that took a LONG time :(

 Anyway I've installed the mysqli driver and that seems to be working and
 I've run 'test connection' in mysql workbench with what I think are the same
 settings in the  joomla without a problem, but the website just gives
 Database connection error (2): Could not connect to MySQL. I can browse
 the data in workbench, and changing user admin enables and disables that,
 but nothing seems to sort the php connection.

 Can anybody think of something that I have missed in this or point me to a
 suitable 'newbie' guide to debugging mysql connections so I can get all
 these sites back on line again ... If it was Firebird I'd just have mirrored
 of one of my other machines and been working as the security stuff is
 managed in the database, by mysql seems to have layers of security that I'm
 missing somewhere ;)

 --
 Lester Caine - G8HFL
 -
 Contact - http://lsces.co.uk/wiki/?page=contact
 L.S.Caine Electronic Services - http://lsces.co.uk
 EnquirySolve - http://enquirysolve.com/
 Model Engineers Digital Workshop - http://medw.co.uk
 Rainbow Digital Media - http://rainbowdigitalmedia.co.uk


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Crash course

2012-08-20 Thread Lester Caine

Simon Schick wrote:

Just try to connect to your mysqlserver using a simple php script first.


Actually my next step was to try phpMyAdmin ;)

Having created a new user with the correct rights it just worked out of the box. 
I was simply trying to use 'root' just to get going, but it seems that is 
blocked somewhere and will only work internally. That is I could not log into 
phpMyAdmin using 'root' ...


joomla is using mysqli but as yet is obviously not strict compliant as 
http://gc.lsces.org.uk/ will demonstrate ... that is if I've not found where to 
patch joomla since I don't want to switch E_STRICT off just for that. If I do 
anything with joomla it will be replacing mysql, but to be honest I'll probably 
just move most of the sites to something *I* can work with :) I've already 
sorted the E_STRICT problem with my own stuff. I just need to get them running 
for now!


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Crash course

2012-08-20 Thread Simon Schick
Hi, Lester

I know how you feel ... I didn't want to disable E_STRICT either, but
as most of those errors come from the Joomla-Core or some extensions,
I don't have the nerves to fix code that's not mine and the developer
just says aaa ... those E_STRICTs ... why do you even care 

Therefore I gave up because the developer won't fix those and I don't
want to support my own fork of those extensions.

Bye
Simon

On Mon, Aug 20, 2012 at 1:40 PM, Lester Caine les...@lsces.co.uk wrote:
 Simon Schick wrote:

 Just try to connect to your mysqlserver using a simple php script first.


 Actually my next step was to try phpMyAdmin ;)

 Having created a new user with the correct rights it just worked out of the
 box. I was simply trying to use 'root' just to get going, but it seems that
 is blocked somewhere and will only work internally. That is I could not log
 into phpMyAdmin using 'root' ...

 joomla is using mysqli but as yet is obviously not strict compliant as
 http://gc.lsces.org.uk/ will demonstrate ... that is if I've not found where
 to patch joomla since I don't want to switch E_STRICT off just for that. If
 I do anything with joomla it will be replacing mysql, but to be honest I'll
 probably just move most of the sites to something *I* can work with :) I've
 already sorted the E_STRICT problem with my own stuff. I just need to get
 them running for now!


 --
 Lester Caine - G8HFL
 -
 Contact - http://lsces.co.uk/wiki/?page=contact
 L.S.Caine Electronic Services - http://lsces.co.uk
 EnquirySolve - http://enquirysolve.com/
 Model Engineers Digital Workshop - http://medw.co.uk
 Rainbow Digital Media - http://rainbowdigitalmedia.co.uk



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Crash course

2012-08-20 Thread Lester Caine

Simon Schick wrote:

Hi, Lester

I know how you feel ... I didn't want to disable E_STRICT either, but
as most of those errors come from the Joomla-Core or some extensions,
I don't have the nerves to fix code that's not mine and the developer
just says aaa ... those E_STRICTs ... why do you even care 

Therefore I gave up because the developer won't fix those and I don't
want to support my own fork of those extensions.


Actually all I was trying to work out was overriding the setting for the joomla 
sites ... but I hit another problem first :(


Need to compile mysqli and mysqlnd as shared modules, but can't seem to untangle 
the interrelation on header files ... I'm missing something there when running 
./configure to get them to see the other's ext/ folder on the php5.4 
configuration on the main server ... what should be a 5 minute job always seems 
to take hours :(


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Crash course

2012-08-20 Thread admin
-Original Message-
From: Lester Caine [mailto:les...@lsces.co.uk] 
Sent: Monday, August 20, 2012 6:52 AM
To: php-general@lists.php.net
Subject: [PHP] Crash course

OK - MySQL is not an area I've had to bother with, but I'm trying to sort
out a tranche of websites that 11 messed up the DNS on last week and we
have take over support for. All the databases have backed up and been
restored ... 
although after Firebird's backup and restore system having to dump the
database as raw SQL ... that took a LONG time :(

Anyway I've installed the mysqli driver and that seems to be working and
I've run 'test connection' in mysql workbench with what I think are the same
settings in the  joomla without a problem, but the website just gives
Database connection error (2): Could not connect to MySQL. I can browse
the data in workbench, and changing user admin enables and disables that,
but nothing seems to sort the php connection.

Can anybody think of something that I have missed in this or point me to a
suitable 'newbie' guide to debugging mysql connections so I can get all
these sites back on line again ... If it was Firebird I'd just have mirrored
of one of my other machines and been working as the security stuff is
managed in the database, by mysql seems to have layers of security that I'm
missing somewhere ;)

-- 
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--


First of all, I HIGHLY doubt that 1and1 AKA Cisco messed up the DNS. I would
be very careful blaming them and publically announcing it.
Secondly if you tested mysql connection with Workbench then the error you
describe is configuration error in Joomla, common sense would dictate so.
http://www.inmotionhosting.com/support/edu/joomla-25/database/troubleshootin
g-database-errors


This list is for PHP 








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Crash course

2012-08-20 Thread Lester Caine

admin wrote:

First of all, I HIGHLY doubt that 1and1 AKA Cisco messed up the DNS. I would
be very careful blaming them and publically announcing it.
We can publish the list of sites that were unavailable for 48 hours. It was the 
last straw for the customer as this was not the first occasion it had happened 
and we were asked to sort the matter out after several hours of being given the 
run around. NOW I'm trying to get PHP working with the customers material which 
was running on PHP5.2 but I no longer have 5.2 on my servers.



Secondly if you tested mysql connection with Workbench then the error you
describe is configuration error in Joomla, common sense would dictate so.
http://www.inmotionhosting.com/support/edu/joomla-25/database/troubleshootin
g-database-errors
Which was exactly the sort of help I was asking for, finding some things like 
that can take time when one is in a rush, but ACTUALLY that page gave me nothing 
as the subsequent post indicated. It was the PHP setup with MySQL that I was 
playing with at the time although the actual problem was simply adding a user 
name that PHP could access - not something I was expecting since I can always 
use the system accounts with Firebird.



This list is for PHP

And the problems I am having are getting PHP working!
Current problem simply getting mysqli and mysqlnd compiled so I can add them to 
the PHP5.4 setup. I've been at this for the last 3 hours and am making progress, 
but nothing actually worked first time :(

And the sites still arn't up on my servers.

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Crash Course on PHP WORKS :: Registering Globals

2002-07-10 Thread vins

OK if you are running php on apache and your form variables don't pass
through
fire up your editor and edit php.ini and turn Register Globals ON

Cheerz
Until Next time.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Crash Course on PHP WORKS :: Registering Globals

2002-07-10 Thread Philip Olson

Please read:

  http://www.php.net/manual/en/language.variables.predefined.php

Regards,
Philip Olson


On Wed, 10 Jul 2002, vins wrote:

 OK if you are running php on apache and your form variables don't pass
 through
 fire up your editor and edit php.ini and turn Register Globals ON
 
 Cheerz
 Until Next time.
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php