2,113 Posted Topics
Re: Hi, did you wrote to the Unirgy team or submitted a [bugtruck](http://www.securityfocus.com/)? Follow these instructions: http://www.securityfocus.com/archive/1/description#0.1.8 A part that post on the nexcess blog, it seems nobody else treats the issue, maybe they are already working on a patch. | |
Re: Hi, are you using Apache? Have you loaded the `mod_wsgi` module into Apache? More information here: * https://github.com/GrahamDumpleton/mod_wsgi * https://code.google.com/p/modwsgi/wiki/QuickInstallationGuide | |
Re: You can use `each()` to loop them, and then return false when you get the first empty value, as example: <form> <input type="password" name="passwd" value="" /> <input type="text" name="aaa" value="test 1" /> <input type="text" name="bbb" value="test 2" /> <input type="text" name="ccc" value="" /> <input type="text" name="ddd" value="test 4" /> <input … | |
Re: Use `insertGetId()`: $id = DB::table('item_tbl') ->insertGetId(array('item_name' => $data['itemTb'])); docs: http://laravel.com/docs/queries#inserts | |
![]() | Re: Are you sure the spammer is using your PHP scripts to send spam and not accessing directly to your SMTP server? Usually the config.php file in CI does not execute code, it's a container for variables, can you verify if the file is genuine? Also CI includes `.htaccess` files into … |
Re: Try by adding `GROUP BY ip_username, ip_ip` to the current query, it will return all users' ip, or if searching a specific user `WHERE ip_username = 'Todor' GROUP BY ip_ip`. | |
![]() | Re: It can be done through Java Web Start: http://en.wikipedia.org/wiki/Java_Web_Start You don't need PHP for this. To interact directly with software, instead, in Windows you can use the COM objects: http://php.net/manual/en/book.com.php |
Re: Try Linfo: * http://linfo.sourceforge.net/ * https://github.com/jrgp/linfo You can customize the output. | |
Re: Hi, you can do: Redirect::to('profile')->with('fname', Auth::user()->firstname); Or: Session::put('fname', Auth::user()->firstname); Redirect::to('profile'); Then you have to get the value from session: $data['items'] = DB::table('item_tbl')->get(); $data['fname'] = Session::get('fname'); return View::make('profile')->with('items', $data); But: 1. when using `with()` the value is flashed to session, and won't be available in the next request 2. you can … | |
Re: Hi, assuming the method is $_POST, you get the equivalent of: $_POST['subject'][] = 'subject 1'; $_POST['subject'][] = 'subject 2'; $_POST['subject'][] = 'subject 3'; # and so on ... so you can loop the values: if(is_array($_POST['subject'])) { foreach($_POST['subject'] as $subject) { # code } } When debugging and in doubt, print … | |
Re: > local host index page where the index page is viewable So you have something like `C:\WAMP\www`, you copied the website to this directory and now it is in: C:\WAMP\www\website Correct? Then try: http://localhost/website/index.php/admin Or simply: http://localhost/website/admin Also, CodeIgniter uses an **.htaccess** file to rewrite the urls and avoid the … | |
Re: Check the ownership and the permissions of the script, by writing the file into `/var/www/` you probably used sudo, correct? That gave `root:root` to the script. Apache needs access to read and execute the file, so you can switch the group to **www-data**: sudo chown root:www-data script.php Then, if your … | |
Re: > I am having website error that I still do not know what causes it. In several of my users browsers (firefox), some words in the website content that I build turn into a blue link and also there is a Java ads in it. > Another one, index.html turns … | |
Re: You can use `group_concat()`: SELECT group_concat(DISTINCT MONTH(postDate) ORDER BY postDate) as months, YEAR(postDate) as year FROM posts GROUP BY year; with `DISTINCT` will return unique values, then you can explode the values in the `month` column and loop them in the sub list: while($row = $stmt->fetch()) { $months = explode(',', … | |
Re: Are you sure `smtp2` exists? And which mail server is configured under this domain? Xampp doesn't provide a mail server. Also check the DNS records or your domain, I see: > dig indonusa.net.id ANY ; <<>> DiG 9.8.1-P1 <<>> indonusa.net.id ANY ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- … | |
Re: Hi, try to add `errorInfo()`, for example: if (!$import) { echo "<p>Prepared statement error:</p>"; echo "<pre>" .print_r($dbh->errorInfo(), true) . "</pre>"; } while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $import->execute($data); echo "<p>Execute error:</p>"; echo "<pre>" .print_r($import->errorInfo(), true) . "</pre>"; break; } The `break` will stop the loop after the … | |
Re: In addition, as example you can try `imap_rfc822_parse_headers()`: <?php $header = file_get_contents('email.txt'); $obj = imap_rfc822_parse_headers($header); echo "<pre>"; print_r($obj); echo "</pre>"; Where **email.txt** is: Received: from outmail4.bc.edu (136.167.2.48) by BFRANKLIN04.bc.edu (192.168.1.34) with Microsoft SMTP Server id 14.2.347.0; Thu, 9 Jan 2014 09:52:28 -0500 Received: from o1.outreach.nercomp.org (o1.outreach.nercomp.org [192.254.118.91]) by krait.bc.edu (8.14.5/8.14.5) … | |
Re: Hi, the cookie will be available in the next page request, not in the current, so you cannot use `setcookie` and `$_COOKIE` in the same instance to get the brand new cookie: > Once the cookies have been set, they can be accessed on the next page load with the … | |
Re: > But, it generates error. Which error? It could be the definition of the columns, for example `userrole.userid` here is BIGINT but in `users.id` is INT, the same applies to the other constraint. Then the constraint label must be unique over the database, so if you have another constraint `fk_userid` … | |
Re: Hi, show an html output of the page, not the PHP source, **and** the contents of **print.css**. By the way this: <link href="print.css" rel="stylesheet"> Should be referenced as print: <link href="print.css" rel="stylesheet" media="print" /> Unless you're using **@media print** inside the style. | |
Re: Read this article: * http://www.xaprb.com/blog/2006/12/07/how-to-select-the-firstleastmax-row-per-group-in-sql/ Standing to the examples, you can try a query like this: set @num := 0, @type := ''; select site, cat, title, content, @num := if(@type = concat(site, cat), @num + 1, 1) as row_number, @type := concat(site, cat) as dummy from news group by … | |
Re: No, it's not the same, `ini_set` affects only the current executed script: > Sets the value of the given configuration option. The configuration option will keep this new value during the script's execution, and will be restored at the script's ending. *source:* http://php.net/manual/en/function.ini-set.php Using **php.ini** is like having an included … | |
Re: Hi, try the W3C validator: - http://validator.w3.org/ There are some errors like missing tags or inline styles into the table tags, try to fix them using the tips and the suggestions given by the validator. | |
Re: >Any clue what language is this: It's LUA, and the article refers to the Corona SDK: * http://docs.coronalabs.com/guide/start/introLua/index.html * http://docs.coronalabs.com/api/index.html * [http://en.wikipedia.org/wiki/Lua_(programming_language)](http://en.wikipedia.org/wiki/Lua_(programming_language)) | |
Re: Yes, it is possible, follow these instructions: * http://php.net/manual/en/install.windows.commandline.php Download the installer from: http://php.net/downloads.php | |
Re: Hi, which Chrome version are you using? I've created a little test based on your script, and it seems to works fine for me: - http://runnable.com/U-y6jLZ43dciVJXF/generate-csv-test-file-for-php I'm using Chrome `36.0.1985.143`. | |
Re: So this should work, correct? $forSplitProduct = 'productA,productB'; $values = explode(',', $forSplitProduct); foreach($values as $value) { echo "<input type='text' name='item[]' value='$value' />"; } By setting `item[]` you get an array of results, otherwise you have to set unique names for each input field. | |
Re: Also, if you still want *one* query to return them all, you could use `union` in a subquery: select id, email, tablename from (select u.id, u.email, 'users' as tablename from users as u union select c.id, c.email, 'contacts' as tablename from contacts as c) as sub group by email; It … | |
Re: This is old but it still can be useful: in line 15 of header_view.php file add a slash to the url: [code]'/index.php/home/productsList/'+catId[/code] in line 78 of home.php (the controller) there is a mistake, where did you get $this->params? Refer to the URI Class, you should solve: [code]$data['products'] = $this->m_products->getProducts($this->uri->segment(3));[/code] bye. | |
Re: Hi, you can try to generate an array from the checkboxes, change them like this: <input type="checkbox" id="_org" name="tld[]" value=".org"> <label for="_org">.org</label> Note that the `id` attribute of the input tag matches the label `for` attribute, that way the label becomes clickable, while the `name` attribute is the array: `tld[]`. … | |
Re: Check the code of timthumb script: [url]http://timthumb.googlecode.com/svn/trunk/timthumb.php[/url] I never tried that but it gives the ability to create screenshots of websites, you will need access to the command line of your webserver, in shared hostings this may not be possible. Bye. | |
Re: Hi, you have to set the namespace that defines `slash`, so: <?php $feed = file_get_contents("http://www.trenologi.com/feed/"); $xml = new SimpleXmlElement($feed); $xml->registerXPathNamespace('slash', 'http://purl.org/rss/1.0/modules/slash/'); $result = $xml->xpath('//slash:comments'); foreach($result as $pcount) { echo $pcount; } Documentation: * http://php.net/manual/en/simplexmlelement.registerxpathnamespace.php | |
Re: Hi, make Apache able to access `/usr/share/phpMyAdmin` by assigning the directory to the `www-data` group (or the one in use by the server): chgrp www-data -R /usr/share/phpMyAdmin Then reload the server and it should work fine. Or better, check the security links in the installation process: * https://wiki.phpmyadmin.net/pma/Quick_Install#Extract_files | |
Re: Hi, in practice it happens that because of the fifth argument `2`, `preg_match()` will search the pattern **after** the second byte, counting from zero. So if your `$subject` is `dedfd`, with the offset the function starts to search from `dfd`. If, for example, you change the string to `abdedfd` then … | |
Re: You could use `db2_fetch_row()` and `db2_result()`, check the first example in the documentation: * http://php.net/manual/en/function.db2-fetch-row.php But instead of the loop, that moves the internal pointer to the next row, you can use an `IF` statement and get only the first row: if(db2_fetch_row($result4)) { $number = db2_result($result4, 0); $alphanum = db2_result($result4, … | |
Re: **@DJ** I suppose the OP question is related to his previous thread, check here: * http://www.daniweb.com/web-development/databases/mysql/threads/482938/update-cart-problem bye! ;) | |
Re: Assign a `name` attribute to the **select** tag, a `value` attribute to each **option** tag, set the `method` to the submitting **form** and then read the matching array, for example, if you set the POST method, then you will have to read `$_POST`, here's an example: <form method="post" action="destination.php"> <select … | |
Re: Hi, it could be the encoding of the server, try to add this to the `.htaccess` file: AddDefaultCharset UTF-8 And read this documentation: http://www.ar-php.org/faq-php-arabic.html#apache | |
Re: A problem I see here is related to the attributes `id` and `name` which are the same for all the items, an `id` must be unique over the page, regarding the `name` you can have multiples in case of radio buttons because of the nature of this type of input … | |
Re: Hi, you could use the `explode()` function: $data = array(); foreach($input as $key => $value) { $id = explode('-', $key); if(array_key_exists(1, $id)) $data[$id[1]][$key] = $value; } print_r($data); The `array_key_exists()` is used to avoid errors when processing other keys as `$_POST['submit']`, which doesn't have a dash character and that, otherwise, would … | |
Re: The variable session must be always uppercase, so `$_Session` is not correct, change it to `$_SESSION`: $_SESSION['roleID'] The `session_start();` is included in the config file? Also, in the `IF` statement you have to compare, not assign a value, so this: if ($_Session['roleID']=1) Becomes: if ($_Session['roleID'] == 1) When you're testing … | |
Re: The problem starts with the quotes, you're writing: $q = "'SELECT * FROM mytable'"; If you read carefully you will see double and single quotes surrounding the entire query, use only one type, not both, otherwise the all is interpreted as a single string. > Also how would I go … | |
Re: Try this: $name = Entitydetail::where(function($query) use($fname, $lname, $userID) { $query->where('First_Name','LIKE','%'.$fname.'%') ->where('Last_Name','LIKE','%'.$lname.'%'); }) ->where('Entity_Id','!=', $userID) ->get(array('Entity_Id')) ->toArray(); dd("<pre>".print_r(DB::getQueryLog(),true)."</pre>"); By using `DB::getQueryLog()` you can see the query created by Laravel. The above will return: Array ( [0] => Array ( [query] => select `Entity_Id` from `entitydetails` where (`First_Name` LIKE ? and `Last_Name` … | |
Re: You could use `array_chunk()`, for example in **file.csv** you have: column1,column2,column3,column4,column5 column1,column2,column3,column4,column5 column1,column2,column3,column4,column5 And your script executes a loop: $file = file('./file.csv'); $result = array(); foreach($file as $csv) { $s = array_chunk(str_getcsv($csv), 3); $result[] = $s[0]; } The `$result` array will return only the first three columns of each line. | |
Re: You have two form opening tags, remove: <form id="registration-form"> And it should work. Bye! | |
Re: Hi, it seems the problem is given the `<a>` tag on line `7`: <li> <a href="http://this-node.net/"> <img src="http://this-node.net/This-NodeLogo.ico"> </li> It is not closed, fix it and it should work. Here's the test on jsfiddle: http://jsfiddle.net/v5vas/1/ Bye! | |
Re: You could use foreign keys constraints: * http://dev.mysql.com/doc/refman/5.5/en/create-table-foreign-keys.html If you have doubts, show us the tables schema. | |
Re: On **september 8** the dots are in the first row, only apparently are in the last, because you're using `<br />` on the first child to add new lines, and the second `td` is floating right. On **september 4** the issue is similar. Try to change the table like this: … | |
Re: Can you connect them directly? If yes, you can use replication: * http://dev.mysql.com/doc/refman/5.5/en/replication-solutions.html |
The End.