Current location: Hot Scripts Forums » Other Discussions » Web Servers » [SOLVED] mysql_real_escape_string() causing Apache to crash?


[SOLVED] mysql_real_escape_string() causing Apache to crash?

Reply
  #1 (permalink)  
Old 08-27-08, 12:59 PM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
[SOLVED] mysql_real_escape_string() causing Apache to crash?

I guess this is a server configuration issue, so I'm posting this here.

I was using XAMPP before, but I wanted to set up PHP/MySQL/Apache by myself, so I uninstalled XAMPP and did so.

I installed PHP 5.3 (Alpha 1), MySQL 6.0 Alpha, and Apache 2.2. (Perhaps I shouldn't work with these beta/alpha releases?)

Now everything seems to be working fine, as long as I don't call mysql_real_escape_string().

MySQL is installed correctly and it's working, just except this one function. (I've established a database connection, using the right username and password).

PHP Code:

echo is_callable('mysql_real_escape_string')
    ? 
'Is callable'
    
'Isnt callable'
... this gives me "Is callable". But as soon as I actually call it, Apache crashes.

This is the MySQL section of my PHP Info:
Code:
Active Persistent Links 	0
Active Links 	0
Client API version 	mysqlnd 5.0.4-dev - 080501 - $Revision: 1.3.2.16 $
Persistent cache	enabled
put_hits 	0
put_misses 	0
get_hits 	0
get_misses 	0
size 	2000
free_items 	2000
references 	2 

mysql.allow_local_infile	On	On
mysql.allow_persistent	On	On
mysql.cache_size	2000	2000
mysql.connect_timeout	60	60
mysql.default_host	localhost	localhost
mysql.default_password	******	******
mysql.default_port	3306	3306
mysql.default_socket	no value	no value
mysql.default_user	root	root
mysql.max_links	Unlimited	Unlimited
mysql.max_persistent	Unlimited	Unlimited
mysql.trace_mode	Off	Off
I have no idea where to even start searching for the error, so any ideas would be appreciated.

Last edited by Nico; 08-28-08 at 03:52 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 08-28-08, 06:10 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
Never mind... I needed the server and switched back to XAMPP.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 08-28-08, 09:30 AM
End User's Avatar
End User End User is online now
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by Nico View Post
Now everything seems to be working fine, as long as I don't call mysql_real_escape_string().
I did some searching on this and found a few things, but I don't know if they're relevant to the specific issue you were experiencing:

http://bugs.mysql.com/bug.php?id=3145

http://forums.mysql.com/read.php?45,151245,151245

There wasn't a whole lot more that seemed to bear on this, so my guess is that this is somehow related to the Alpha releases. Try setting up PHP 4.x or 5.0, mySQL 4.1x (very stable for the most part) and any earlier version of Apache...my bet is that everything would work just fine. I know Apache 2.x still has lost of unresolved problems with all sort of open bug issues right now.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
apache not working on Mozilla and Opera edzjins PHP 5 09-26-07 05:03 PM
apache not working on Mozilla and Opera edzjins Web Servers 0 09-25-07 10:05 AM
FLV video freezes - apache 2.2.4 JanDW Web Servers 1 05-05-07 12:13 PM
How to connect JSP Tomcat to apache or IIS ardie_b Everything Java 1 03-09-05 07:45 PM
php with Apache in windows eDevil PHP 3 08-08-04 01:03 AM


All times are GMT -5. The time now is 10:55 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.