Array_intersect With Unknown Number Of Arrays
I have a question regarding array_intersect() in PHP 4.3. There are several
arrays created on the fly, such as:
$values['apples'];
$values['bananas'];
$values['pears'];
To extract only the values they have in common I tried this:
$command = "array_intersect(";
for ($i=0; $i<count($values); $i++) {
$command .= "$values['$values[$i]'],";
}
$command = substr($command, 0, -1);
$command .= ");";
$result = eval($command);
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Using Array_intersect() Without Keeyping Keys From The Array1, I.e. Re-number Intersect Array Keys.
I only use indexed arrays. When I use array_intersect function, of $a3 = array_intersect( $a1, $a2 ), I just need the vales of intersect array and let keys to be re-numberred from 0.; I found the intersect array $a3 have the correct values but keep the keys of $a1. When I use for loop from $index=0 to sizeof ($a3)-1, by $a3[$index], php reports "undefined offset " problem. How can I re-number the keys of $a3 from 0 to sizeof($a3)-1;
Merging Unknown Arrays
Is there a better way to do this? $command = '$array = array_merge($array['' . implode(''],$array['',array_keys($array)) . '']);' eval($command);
Get Unknown Number Of Variables From POST Or GET.
I am trying to create a page that redirects users to an advertiser's page. The reason for the redirect is statistics about who clicks where. The situation is simple when I only need to redirect them to a page, but some of the ads on my site include forms which put data in either POST or GET and I need to know how to allow my redirect page to take that data from POST or GET, whatever that data is, and pass it on to the page that the data were intended for. I think that once I get the data I can simply create a hidden form, on the redirect page, with the data from POST or GET already in it. However, I don't know how to get an arbitrary number of variables from POST or GET.
If Statement With Unknown Number Of Cases
I need to break out of a loop if an unknown number of conditions are satisfied. I'm starting with a comma-delineated list of numbers of an unknown length (more than 1). I've got a function (we'll call it what($n) here) that'll return either true or false depending on $n. Now, I want to leave a loop (using continue) if it's not true that all the numbers in the list are true. Eh? well, suppose the list is 1,2,5 then the code would be if (!((what(1)) && (what(2)) && (what(5)))) continue; The problem is, I don't know how long the list is, so I can't code a definite number of &&s! How can I get round this? I'm sure there must be a way but I can't think how!
Better Way Then Array_intersect()?
I got two large arrays with numbers. What I need is a tirth array with the numbers that are in both arrays (doubles). (if the number 523 is in both arrays, that number most be in the result array) At the moment I use array_intersect() $result = array_intersect($array1, $array2); The result will be an array with the size of the largest input array and with empty entrys if the numer was't a double. Does anybody know a way to get an array with just the doubles, and not the empty values if the number wasn't a double?
A Bit Different Array_intersect Or Array_map
Hi I have two arrays. One array is sort array with db names: $sort = array("vname", "sname"); second array is the whole text to display for user: $names = array("user_id"=>"Id of the user", "vname"=>"Vorname", "sname"=>"Surname", "tbl_name"=>"Name of the table"); What I need is to merge somehow these tables. Table sort is generated by the user and may only incorporate from 1 to 8 fields I need the output array to be corresponding to both of them: $output = array("vname"=>"Vorname", "sname"=>"Surname"); however I don't know how to do that. At first I thought, that $output = $names[$sort]; will do the thing,m but it didn't. I couldn't also find anything at www.php.net , however function array_map looks promising, but it makes an array of results' arrays (I want just one level).
Replace Hex Number Or Decimal Number In A String ?
String may contain alphanumeric values. What is the bestway to replace a hex number such as 0x122aaa and decimal number such as 5678 with a string "blah" Example: I want to replace below-- wr_thru1 data or mask mismatch!! for addr=0x00000b73a0540 & mdfid:11 with wr_thru1 data or mask mismatch!! for addr=hexVal & mdfid:decVal
Warning: Unknown():
Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0 What does it mean? how can I fix it?
Unknown IP Address?
I'm using $ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; to get a visitor's IP address, but every once in a while I get "unknown, unknown" instead of an address. Is there something I'm leaving out?
Unknown Array
i am using php4 and trying to run a code that was writen in php5 through soap protocol. when i echo an output i see: $abstr[item] => Object. what is that "item", am i not supposed to see a number instead ($abstr[0] => Object)? this is why i am not getting any data out of the $abstr array. Any suggestions?
Unknown Characters...
I added and sucessfully added a documents in the mysql database... the document are save under the blob datatype in the database.... i just see a code to download the documents from the mysql database.. so it happen that it runs good... Can some explain to me about the added unknown characters... usually added above... and the arrangement of information is affected... Why? sample i uploaded a file file.doc the arrangement looks good. as entering datas arrangement with the microsoft word bulleting, but when i i finished download and open: there are additional boxes ahead and other unknown characters also below.... How to remove this things.. before opening and saving file in the mysql database ..?
Unknown Parse Error
I get a strange parse error in the following lines. Can anyone see what I don't. //Query the Database $query = "SELECT type FROM `map` WHERE map_file = " . $_SESSION['new_map'] . " AND col = " . $_SESSION['new_col'] . " AND row = " . $_SESSION['new_row'] $db_result = mysql_query($query); $db_cell_type = mysql_fetch_array($result);
Makethumb Unknown Function?
I am using a classifieds AD's program called Z Classifieds, it has the ability to add photos to your advert. The problem is that it only allows jpeg/jpg formats, does anyone know a good reason for this? It also uses a function: makeThumb( $newphoto[ $i ], "{$IMAGE_DIR}/thumb/{$photoid}.jpg" ); could someone please tell me what it is calling, is it MySQL, PHP or something else? Also how could i use imagemagick or netpbm to allow all types of files, the way this thing produces thumbnails they sometimes look crap and badly coloured.
POST Params - Getting Unknown
Can anyone tell me if it is possible to generate the actual URL of the current PHP script (with all POST data included)? I have a third-party application that I'd like to use to see HTTP requests to my server. For the most part, it works, but I believe some of the variables are named incorrectly. In a nutshell, the application transmits to http://myserver.com?this=that&that=theOther, where my script grabs the post data. I want to modify my script to save the actual POST url into the database so I can see all of the POST parameter names.
Replacing A Unknown String In A Url
what i need to do is to get a string and replace it, but i don't know what the string is. example: I have the url <a href=http://www.blabla.com>this is a link</a> I want to replace "this is a link" with nothing! remember that "this is a link" isn't always the same, so i can't say $blabla = str_replace("this is a link", "", $blabla);
Unknown Php Error - Anyone Know What It Means??
Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
Unknown Mail Error
I am working on a site and for some reason the mail function keeps returning false for no reason when all the input is correct and should be sending, the script is below. Code:
ERROR 1049 Unknown Database
I have uploaded a script to a server and it all works fine most of the time but occassionally I get the following error. ERROR 1049 Unknown database.If I press the refreseh it all works o.k. Is this a server error and is there any way to combat it.
[error] An Unknown Filter Was Not Added: PHP
I'm getting this error in my error_log in apache. Can anyone offer any assistance in fixing the problem? I'm using RH 9 with apache 2.0.53 and PHP v4.3.11 [Fri Apr 29 09:32:03 2005] [error] an unknown filter was not added: PHP .........
[error] An Unknown Filter Was Not Added: PHP
Anyone know why this message would appear in my error_log. My PHP code executes fine...but it is outputting this to my error_log and I cannot figure out why. I've been looking for a couple days...but have not found any reason/fix on the web for this message. My php.ini and php.conf look fine.
Unknown Zip Header Format Encountered
I'm having real problems trying to get this zip file to open. When it arrives in the inbox I get this message when trying to unzip it with Stuffit: Unknown zip header format encountered. This operation cannot continue. PHP Code:
PHP - Droping & Emtpying Unknown Tables
on my site for some reason if i dont emtpy a database then when i drop it and recreate it, it will have all the entrys still in it. So i was wondering if somone could help me determine some kind of script that will figure out how many tables there are, then emtpy them, after that drop the tables or is this impossible?
Determining Unknown $_GET Vars From The URL
I have been trying to make a script, for my toplist, that allows site owners to put in their incentive link, and whne someone votes, it executes the script. My only problem is that the owners need to be able to set their own $_GET variables, and my script has to be able to pull those variables from the links, and keep them set as the user is voting, and then once the vote is successful, it fopens the incentive link, activating the script... How would I go about making the script figure out what get variables are in the URL???
IIS - Unknown(): Unable To Load Dynamic Library
I use win 2000, php 4.4.2, phpmyadmin 2.8.0.3, iis 5.0, and mysql 5.0. When I try to run http://localhost/phpmyadmin/index.php I get the error messages: --- The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results. PHP Warning: Unknown(): Unable to load dynamic library 'c:phpextphp_mbstring.dll' - The specified module could not be found. in Unknown on line 0 --- The file c:phpextphp_mbstring.dll exists. php ini has extension_dir = "c:phpext" and extension=php_mbstring.dll.
Module 'modulename' Already Loaded In Unknown On Line 0
FYI: The page below describes one possible solution for resolving the following PHP warning: PHP Warning: Module 'modulename' already loaded in Unknown on line 0 (modulename may be bz2, ctype, readline, mysql, curl, etc. http://www.somacon.com/p520.php
Unknown(): Unable To Load Dynamic Library
I just tried to get GD working on my local installation of PHP (under windows 2000). I copied the php_gd2.dll file into my WindowsSystem32 directory and uncommented it in php.ini, but it comes up with this when I try out any scripts.... Unknown(): Unable to load dynamic library './php_gd2.dll' - The specified procedure could not be found.
Unknown Column 'icaodesc' In 'field List'
I'm getting the following error message... Unknown column 'icaodesc' in 'field list' when I try to update a table from a PHP form. What 'field list' is it referring to? My PHP script or the MySQL table??? Here is the PHP script I'm using... <?php //set up table and database names $db_name ="xxx"; $table_name ="yyy"; //connect to server and select database $connection = @mysql_connect("localhost","user_name","password") or die(mysql_error()); $db = @mysql_select_db($db_name,$connection)or die(mysql_error()); //build and issue query $sql ="UPDATE $table_name SET icaodesc ='$_POST[task_icaodesc]', icaosource ='$_POST[task_icaosource]', icaonote ='$_POST[task_exp_outcome]', usposition ='$_POST[task_usposition]', expoutcome ='$_POST[task_exp_outcome]', usposition ='$_POST[task_usposition]', usaction ='$_POST[task_usaction]' WHERE task_id ='$_POST[id]'"; $result = @mysql_query($sql,$connection) or die(mysql_error()); ?> icaodesc was the NAME in the updatable form. task_icaodesc is a "good" field in the table yyy
Unknown MySQL Server Host 'localhost '
I'm rather new to both MySQL and PHP. I've been trying to use PHP to write to a MySQL database. I call mysql_pconnect to get a database connection, but then when I call mysql_db_select, I get the following error : Unknown MySQL Server Host 'localhost ' I can connect to the database via the command line ok. Where can I look to find the source of this problem?
Unknown(): Unable To Laod Dynamic Library
I have installed PHP4.3.2 on a Win2k Server with IIS 5.0. Everything works great till I uncomment this line. extension=php_ldap.dll ; Directory in which the loadable extensions (modules) reside. ;extension_dir = "./" extension_dir = "C:phpextensions" I get this message: Unknown(): Unable to laod dynamic library 'C:phpextensionsphp_ldap.dll' - The operating system cannot run %1 I am not sure if it is setup right but it use to work before the update any suggestions.
Unknown(): Unable To Load Dynamic Library
im running winxp with IIS 5 when i try to load up the php_xslt.dll I get 3 notices saying: "Unknown(): Unable to load dynamic library 'C:phpextensionsphp_xslt.dll' - The specified module could not be found. in Unknown on line 0" and then a warning saying: "PHP Warning: Unknown(): Unable to load dynamic library 'C:phpextensionsphp_xslt.dll' - The specified module could not be found. in Unknown on line 0 " its only a problm with this extension because when i try to load php_zip.dll it loaded just fine .
MySql Error 'Unknown Column' From PHP Variable
I'm getting an error message that makes no sense to me. I have a table with a field named 'testkey' for a list of "keys" in the form of ABC10102. I have a php variable holding a specific key number. The relevant code is - $_testkey = 'LAL10102' $sql = "SELECT * FROM `pro_keys` WHERE `keynum`=`$_testkey`"; $result=mysql_query($sql,$db_conn); echoing the $sql gives - SELECT * FROM `pro_keys` WHERE `keynum`=`LAL10102` But I get the following error - MySQL error #1054 - Unknown column 'LAL10102' in 'where clause' ?
Please Help With This Error: Warning: Unknown(): A Session Is Active.
I've searched high and low for this on the net but stil haven't found an answer. I'm trying to install both postnuke and xoops on a win2k server with php 4.3.3. and mysql installed. Both applications are loading terribly slow. When the page finally has been rendered I got the following error: Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0 Is it a bug in PHP? Has it something to do with the fact that I'm running it at win2k? Since I think it has something to do with sessions, I attach a snapshot of the results for phpinfo() Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 On On session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path D:programfilesphpsessiondata D:programfilesphpsessiondata session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid Off Off
Unknown(): Unable To Load Dynamic Library
i need to enable gd library. i have done it in php.ini but when i restart my apache server i get this error: Unknown(): Unable to load dynamic library './php_gd2.dll' - The specific module could not be found. anyone know why i could be getting this?
Fatal Error: Unknown Function: Islogged()
I am trying to setup a shopping cart, but after I installed it, I got this error. Fatal error: Unknown function: islogged() in /home/mentorlo/public_html/sunshop/global.php on line 2709 Normally I can do troubleshooting on PHP errors, but I have never seen this one before.
PHP Warning: Module 'gd' Already Loaded In Unknown On Line 0
when ever i am running pear i am getting this warning message : ---- PHP Warning: Module 'gd' already loaded in Unknown on line 0 Warning: Module 'gd' already loaded in Unknown on line 0 PHP Warning: PHP Startup: pdf: Unable to initialize module Module compiled with module API=20060613, debug=0, thread-safety=0 PHP compiled with module API=20050922, debug=0, thread-safety=0 These options need to match
PHP Error - No Such File Or Directory In Unknown On Line 0
I'm getting this error on all my websites that deal with PHP. This is the error: Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 Fatal error: Unknown: Failed opening required 'v_global.php' (include_path='.:/usr/lib/php;/usr/local/lib/php:v_library:../v_library') in Unknown on line 0 What could have caused this and how can I fix it?
Reading Form Data In Fields Are Unknown
I have a project where the users can modify their forms and thus their form field names. Is it possible to simply read what is passed through the headers without knowing the names of the fields.
Order Number Or Tracking Number
I need to create some kind of random number within a persons session that can be inserted into a customer id column for their orders, customer, and credit card tables. Unless their is a better way to link a customers information together between a few tables besides using auto increment. Things could get screwed up for me if I use auto increment, especially if someone submits their information but does not actually place an order. My question is " How can I create a random order number that can be used within a persons session and will stay the same throughout the whole program for that one person? "
Warning: Unknown(): Your Script Possibly Relies On A Session
I'm getting a strange error in one of my programs: Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0 Funny thing is I'm not using any globals at all in my script, but I am using $_SESSION. I even did grep GLOBAL *.php in my directory in case it's in one of the functions I included and nothin'. Strangely the error is output at the very end of the code (after a simple print statement which is before the closing php tag). I don't see the point in messing with register_globals when I don't use globals so am hoping for another solution. Any ideas?
Error 1054: Unknown Column Xxxx In WHERE Clause..
I'm trying to run this query $uneRequete = "SELECT * FROM Usager WHERE motDePasse = {$loginPassword}"; and I get this error message : Error 1054: Unknown column 'xxxx' in WHERE clause..... where 'xxxx' is the content of $loginPassword I don't know what is going on
Warning : Unknown(): Unable To Load Dynamic Library
I install php 4.3.1 on Windows XP (Use Apache 2.0.44) I open c:windowsphp.ini and uncomment line extension=php_gd2.dll When I restart Apache It has error pop up every time I open php file in browser like this: Warning : Unknown(): Unable to load dynamic library './php_gd2.dll' - The specified module could not be found.
Pear - PHP Warning: Module 'oci8' Already Loaded In Unknown On Line 0
I always get this message. No matter what package [as411161@spgs php-5.2.0]$ pear install Date PHP Warning: Module 'oci8' already loaded in Unknown on line 0 No releases available for package "pear.php.net/Date" Cannot initialize 'Date', invalid or missing package file Package "Date" is not valid, install failed...
PHP Warning: Unknown(): Unable To Load Dynamic Library Php_mhash.dll
I just downloaded PHP-4.3.3 for win32 and got the extensions folder and dropped it intot he root of the PHP directory and set it's path in the PHP.ini: extension_dir = "c:/php/extensions/" But I am still getting the error that it can't find the php_mhash.dll though I can see that it is indeed in the folder....
Php Java Bridge - Procedure Could Not Be Found In Unknown On Line 0 Error
I am trying to install the java bridge library for php 5.1.2. I have installed the j2see 1.4 and jdk. I have setup the [java] section in php.ini as follows: [java] java.classpath = "c:/PHP/ext/JavaBridge.jar;" java.java_home = "c:/Sun/AppServer/jdk/bin" java.libpath = "c:/PHP/ext" I have downloaded pecl package into the php folder. Have copied the javabridge.jar and .war file to php/ext dir/. I have copied the php_java.dll from javabridge zip file to the php/ext dir. Im running windows xp and apache 2.0.55. Apache will restart, but with an error in the error log file. The error message is: Unable to load dynamic library 'c:/php/extphp_java.dll' - The specified procedure could not be found. in Unknown on line 0 It found the dll but cant find a procedure in it? What the heck is that?
MySQL Query - INSERT - Unknown Column 'test' In 'where Clause'
I have a registration script on my website, and it was working fine, I added a second MySQL INSERT query to it, for another table so I can use JOIN's later on with the second table, but I keep getting the same error: Unknown column 'test' in 'where clause' can someone see whats wrong with this? Code:
Warning: Unknown Persistent List Entry Type In Module Shutdown (11)
I am getting this wanrning: Warning: Unknown persistent list entry type in module shutdown (11) in Unknown on line 0 I have never seen it before or know what it means and line 0 is hard to find especially when no document is specified Everything works as it should at this point just getting that warning on my personal apache server any ideas?
Fatal Error: Exception Thrown Without A Stack Frame In Unknown On Line 0
I'm using PHP 5, my code fully separates code from content, my code throws exceptions (LIZException) when error occurs. but every time I throw exception I get this fatal error: Fatal error: Exception thrown without a stack frame in Unknown on line 0 It must be my fault by the message isn't helping me - any idea what to do? My code looks like this: <? try { // code goes here } catch (LIZException $e) { $e->printDebug(); echo '@@' } catch (Exception $e) { LIZException::printException($e); } echo '!!!' ?> // end of file! If exception thrown: $e->printDebug() will execute, then echo '@@', then echo '!!!' and finally fatal error message
Warning: Unknown(): Your Script Possibly Relies On A Session Side-effect
I had a set of code working just fine as long as i turn on register_globals. I am not using any globals, that I am aware of, yet when I turned them off I get this message: Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0 I went into the php.ini and found those two directives and set them as follows: session.bug_compat_42 = off session.bug_compat_warn = off they had previously both been set to 0 (which is the same isnt it?) I then stopped and started the server, but same error msg came up. I'm a bit stumped, because in my code i dont use globals. Any suggestions?
|