₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,088 members, 8,420,252 topics. Date: Thursday, 04 June 2026 at 02:44 PM

Toggle theme

Problem With Php And Mysql - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingProblem With Php And Mysql (1747 Views)

1 Reply (Go Down)

Problem With Php And Mysql by chukatony(op): 6:03pm On Aug 23, 2012
I am new to Php and have this create challenge with a script i am trying to Install and configure.

The experience have been quite frustration as i keep getting this erro warning message after setting the the database with myphpadmin.

This is the what i have been geeting and am stocked as i can not understand or solve this issue; Warning: trim() expects parameter 1 to be string, array given in C:\xampp\htdocs\skuapp\oop\ez_sql_core.php on line 394

Warning: trim() expects parameter 1 to be string, array given in C:\xampp\htdocs\skuapp\oop\ez_sql_core.php on line 394

Warning: trim() expects parameter 1 to be string, array given in C:\xampp\htdocs\skuapp\oop\ez_sql_core.php on line 394

Warning: trim() expects parameter 1 to be string, array given in C:\xampp\htdocs\skuapp\oop\ez_sql_core.php on line 394

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\skuapp\oop\ez_sql_core.php:394) in C:\xampp\htdocs\skuapp\index.php on line 38,

Please, help by providing a clue to solving this problem.

Thanks in Advance.
Re: Problem With Php And Mysql by slightlyMad(f): 10:26pm On Aug 23, 2012
trim() was obviously called on line 394 of C:\xampp\htdocs\skuapp\oop\ez_sql_core.php file

trace the variable being trimmed upwards and you'll notice it's an array
php expects you to pass in a string.

once you fix that, the "cannot modify header" information will probably fix itself.
the error message echoed out wont let you modify the header afterwards.
Re: Problem With Php And Mysql by eazyd(m): 3:38am On Aug 24, 2012
post your code if you can and get help ASAP. easy to debug that way cos there might be other errors apart from the stated.
Re: Problem With Php And Mysql by Nobody:
trim() - an invalid argument

headers - make sure there's no space before your <?php opening tags..
Re: Problem With Php And Mysql by slightlyMad(f): 4:48pm On Aug 24, 2012
sheyie2007: headers - make sure there's no space before your <?php opening tags..
it may not be space, it could be any character, the very moment the above error shows up
it's equivalent to the space being talked about.
Re: Problem With Php And Mysql by DualCore1: 7:43pm On Aug 26, 2012
You may have overridden the string variable with an array variable. Consider this among the suggestions given above.

A scenario where this may apply

    ...
$result = "this is the text I want to trim ";

...
...
...
$result = @mysql_fetch_array(@mysql_query("select * from women" ));
...
...
...
trim($result);
Re: Problem With Php And Mysql by mitey(m): 11:36pm On Aug 29, 2012
Why not post the entire script or at least a few lines before the offending line 394 so that we can help you better.
1 Reply

Android Quiz Application With Json Parser, Php And Mysql DatabaseWhy Do Seun Dont Like Php And Mysql Programmers234

What's Your Favourite IDE For Java?Which Is The Best Serve Side Scriptn Language Php Vs Ruby Vs Python Vs PerlHow Many Tables OR Database Do You Use In Your Website?