MySQL and PHP problem

Hi

I run a home web server on OpenSuse 11.1 and want to run a script that will display the contents of a database on one of my websites.

The script cannot seem to connect to the database.

I can log-in to the site against the database I want to display so it seems to me that either the script is wrong or there is some wider problem with the configuration of my server.

I ran the script through a debugger and am confident that is OK.

Does anyone have an idea to help me identify where the problem might lie? Could it be some feature of AppArmor? (I know SELinux can cause some weird problems…).

Thanks in advance.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Have the error returned by PHP? Does the PHP script work when run from
the command line (if possible)? Does the user you are using have
permissions to login? Does PHP have the modules required to connect to MySQL?

Good luck.

NormanNippy wrote:
> Hi
>
> I run a home web server on OpenSuse 11.1 and want to run a script that
> will display the contents of a database on one of my websites.
>
> The script cannot seem to connect to the database.
>
> I can log-in to the site against the database I want to display so it
> seems to me that either the script is wrong or there is some wider
> problem with the configuration of my server.
>
> I ran the script through a debugger and am confident that is OK.
>
> Does anyone have an idea to help me identify where the problem might
> lie? Could it be some feature of AppArmor? (I know SELinux can cause
> some weird problems…).
>
> Thanks in advance.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJK+doNAAoJEF+XTK08PnB5C0kP/jJG+/WCJyrPcZcTe1wCA1VB
R2kr7S1XaGDpsDX7o9XS2ikawp5PEOMUsICRQgp0CIvx2+tBR6lcHgTH9+immOAE
BpqWM07jNzdQRSoBqe/Ra/TPX7ir8Dy+wU1hgPnPhi2w/91YtgxC7v+0Ky9COFYY
d+1no4tqzVX9bqRdmsJbLR8jeJWVsKAQyz6gRDGNCwTRtr/5OTDiqyao7Js7vLVO
Ca562nEvf3w9kFyKosw/civlwSD45TmFoiVIyA2QSOlJmCtmlL3Q9F3/HVRf2V8O
4a8rwBkFXfgTa/Bg/mMtTqFabo+8N13uycDzYt/KwtWdDO/UVDmlz8CbEKDI44Zk
ktf/oTL72Ed+L5dx1yOSChGy3hvfynQFRKNpR7oD4gZSCUtfzJaLZ8PLzOlpe42p
RvaN04pRYmI/px+XAtXn5OhGBUwiRlJ6n/QLdfKfy5Wncha2jjOSqc026MBE8F24
wRjZ5T2Rm3k2h7NJiQAUTv25vg4QsbJQp4mtDYbQFIUTlxJvLP3zo0rxSDzxCwlh
c9hx7/8e01CMpwOpK73EdpnFOqgKQ3p9saUnKQg6Hyi47zPSgd0eBJwXrnVs4yl1
jdZFWvHviYR2buFhGbiH+mfBq6czdFKsHay487XijiRNgyZ11ll8a4M76bYLdj9C
WwwhmJx7s/rM1HZpSici
=/6bG
-----END PGP SIGNATURE-----

Thanks for the ideas.

In the end, it was a buggy script. I was using NuSphere under Wine and I don’t think it works as well as I thought it did!

I have amended it and it’s working fine now.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Neato. Thank-you for posting back.

Good luck.

NormanNippy wrote:
> Thanks for the ideas.
>
> In the end, it was a buggy script. I was using NuSphere under Wine and
> I don’t think it works as well as I thought it did!
>
> I have amended it and it’s working fine now.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJK+rFjAAoJEF+XTK08PnB5if4P/0TFUXOfpE/B5VhvLEg7awNG
DWcVdJNGkRx/XNT10tefQJ7qcKM9wfCwka6/Fo/6Vdh9lQnwAQ9v882ilaQ/QNJo
gNZg8qN3ghHwh7DHNLQVaYL9l7loeWMWs/KgONR7I6FGD9CikYAI4qgy4U7qz13S
fUHnPdcRTEEmKTOpjyfSQj4/pkfI3xLoSefh6X8CG5bPr+J6rnSQKVddXEeZMvjc
hlz8jzk6gmiYtpADtlO4H3iV/xAUmuhXdWcwl7ra/gW074Rqfx5qVdohjRShMjjS
zjq6TKk+ikXZmAZbpAG9dMOGFbKr87VV276CC0/VBYadk05gOjxrZLnf98JEtGVV
G1u0Td9QNexeXLx7UexTkygGullSqMOvRuWZgeXmFl9w1KYt9l/VlKwseXSASzjC
2vMNdhNt/pVneAY9RoxeGqlcjLuDOllP5RO9XVyYZwAzpytAasLcPo29t7YPI57A
MKI5UZslFeKj/FMtezqaVB7JcfFjrjGrTKgp4Sci6y4ntmymAj04HtWtlM53ysvv
h2JBFaoF1SJIFU49fpQX1aeI6mxoxNIUNKFkhiwJiz55hZ/5fphQX3iFQnLqcAri
eS6n5zXlHyHOX3/0BAvmZF13OXw0xxrNSjn9c5RM208Uv4aMIYC3dCgAYFKhhVzB
BK54R4yQvgpOcF75TCp4
=fweI
-----END PGP SIGNATURE-----