Re: [users@httpd] php crashes with msyql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ok first try doing this on the mysql box ( giving liberal permissions initially)

GRANT ALL ON *.* TO 'user'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

where
user--- the mysql user with which your php on apache is accessing mysql.
password-- the users password

i am assuming you know the user/password which is connecting to the mysql database ( look into your php code to find out this info )

and I am sure it would work....

Kishore Jalleda


On 3/21/06, Noah Silverman <noah@xxxxxxxxxxxxxxx> wrote:
Kishore,

I think you are very close!!

Mysql is on a different box than the webserver.

I can use the CLI from the same box as the webserver.  Works for the CLI, doesn't for for apache.

The Crash is literally a segmentation fault of the apache thread.

I tried doing a su to the apache user.  The CLI then seg faults.  I doesn't fault if I call it as root.  This leads me to believe that I need to change permissions on some resource that php is using.  Any ideas which ones?


Thanks!


-Noah


On Mar 21, 2006, at 3:45 PM, Kishore Jalleda wrote:

I am assuming this has to do with permissions on mysql

---- So is the client machine (from which you are loading the php page through a browser) on a different box than the one on which mysql is installed???, if so check to make sure that this client is allowed to access the mysql server by giving appropriate permissions.....
--- What I am guessing is when you are calling the php script from CLI, you may be on the same box on which mysql is installed, so may be the user is allowed to connect from this boxand the script runs fine,  but fails when run in a browser from the client machine....

if this does not solve the problem, the try this

so please answer these questions so that we could get a clearer idea....

-- what exactly do you mean when you say it crashes the apache thread??, do you get a page not found, or does the page hang forever, or the browser closes , etc
-- also please clarify this
-- so you can access mysql from the CLI using the same user as in the php code right???
-- and your browser would load php pages which do not call mysql right ???
-- any hint from apache's error logs..
-- did u try turning on Display_Warnings, and Display_Errors in php.ini file , and see if you can find smething
-- did u check mysql error logs, also do you have any tool which can monitor mysql...

Kishore Jalleda


On 3/21/06, Noah Silverman <noah@xxxxxxxxxxxxxxx > wrote:
Works fine.

I can even call the SAME php file that the browser calls and IT WORKS
FROM THE COMMAND LINE.  It only fails when calling the php file
through a browser (and apache.)

-N


On Mar 21, 2006, at 3:11 PM, Nick Jones wrote:

>
>
> --- Noah Silverman < noah@xxxxxxxxxxxxxxx> wrote:
>
>> Mike,
>>
>> Can't seem to find more than one php.ini file
>>
>> The problem existed with php 4.4.2.
>> I then tried 5.1.2 to see if it would help.
>>
>> The problem is identical for either version...
>>
>> -N
>>
>
> Noah,
>
> What happens if you try to access MySQL from the
> command line and/or run a query that way? Give it a
> shot and see if MySQL returns any errors.
>
> Thanks
> -Nick
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See <URL: http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL: http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux