2,113 Posted Topics

Member Avatar for faisaldss

Also, while trying your download link, I got this: [1] 27470 HTTP/1.1 200 OK Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Content-Encoding: gzip Content-Length: 254 Content-Type: text/html Date: Wed, 04 Sep 2013 21:57:30 GMT Expires: Thu, 19 Nov 1981 08:52:00 GMT Pragma: no-cache Server: Apache/2 Set-Cookie: PHPSESSID=[REMOVED]; path=/ Set-Cookie: =1; expires=Wed, …

Member Avatar for cereal
0
197
Member Avatar for rohan.verma.52012

Does the table `comment` exists? The complete error should be something like: > mysql_fetch_array() expects parameter 1 to be resource, boolean given Which means the query on line `19` returned false. In addition from line `12` to `14` you're not executing any query. So if the table does not exists …

Member Avatar for minitauros
0
268
Member Avatar for davy_yg

You can change `$data` to a property of the class, so you can do: class Page extends CI_Controller { // declare property protected $data; public function __construct() { parent::__construct(); // define the property $this->data['assets'] = array( 'style' => base_url().'assets/css/style.css', 'connection' => base_url().'assets/images/connection.jpg', 'collaboration' => base_url().'assets/images/collaboration.jpg', 'solution' => base_url().'assets/images/solution.jpg', 'connectionUrl' => …

Member Avatar for Dani
0
337
Member Avatar for davy_yg
Member Avatar for davy_yg
0
594
Member Avatar for lewashby

Line 8, change it to: if($db = sqlite_open('./ET')) I suppose `ET` is the name of the database file.

Member Avatar for pritaeas
0
382
Member Avatar for Dani

I'm not sure why this happens, but **increment** and **decrement** methods seems to be buggy: the library is still using a deprecated function to retrieve results: `memcached_fetch` instead of `memcached_fetch_result`. On github there are few pull request that solves most of the open issues with the increment function, but it …

Member Avatar for LastMitch
0
433
Member Avatar for Dani

> Could a problem unserializing() be caused by a session cookie size that is too big (and therefore the serialized version wasn't fully writen)? I think this could still be a valid reason, because in `sess_read()` there is: // Decrypt the cookie data if ($this->sess_encrypt_cookie == TRUE) { $session = …

Member Avatar for Dani
0
889
Member Avatar for joshmac

If you're using Google Chrome, open the page of your script, then open the Javascript Console (CTRL+Shift+J), open the `Network` tab and try select an option from the form, if the AJAX works fine you will see a POST request, by clicking on the `Name` (probably the url of the …

Member Avatar for joshmac
0
975
Member Avatar for cereal

Hello, I'm wondering if I can get help to understand the behaviour of a PHP function: `dns_get_record()`. This returns an array with DNS records for the given domain name, here is an example of the output: php > print_r(dns_get_record('php.net', DNS_TXT)); Array ( [0] => Array ( [host] => php.net [type] …

1
345
Member Avatar for rjony321

The problem in your script seems related with this `$data['logo_image']->logo_image`, the script tries to get an object from an array, you should get an error for this. Anyway change this block: if ($result) { if ($result['file_name']) { $data['logo_image'] = $result['file_name']; if ($data['logo_image']->logo_image) { unlink($data['logo_image']->logo_image); } $data['user_id'] = $this->session->userdata('user_id'); $this->user_admin_model->saveProfilelogo($data); // …

Member Avatar for cereal
0
6K
Member Avatar for reececropley

Looking at the code you could get your result just by replacing: return $file; With: return $file . image_type_to_extension($image_info[2]); But you should already get this, since it is used between line `61` and `80`.

Member Avatar for reececropley
0
476
Member Avatar for rahulrevolution

You can use `find` or `tree` for example, or `mc` to use something interactive. But if you explain why you cannot use `ls` maybe we can suggest the best solution for you.

Member Avatar for rch1231
0
154
Member Avatar for Q8iEnG

Hi, late reply, but it can still be useful for people searching. At line 19 you wrote: $link = 'http://search.twitter.com/search.rss?geocode=' . $lat . $sp . $long . $sp . $radius; which it may be valid in API 1.0, but in Twitter API 1.1 the link changes to: $link = "https://api.twitter.com/1.1/search/tweets.json?geocode=$lat,$long,$radius&q=pizza"; …

Member Avatar for cereal
0
195
Member Avatar for BadManSam

Currently it runs twice. Change line 10 to: $sent = mail($email, $subject, $message, $headers); And line 13 to: if($sent === TRUE) { # success } else { # failure }

Member Avatar for cereal
0
112
Member Avatar for PriteshP23

Show the query that you use to select. Also, to remove white space use `trim()`. This function exists in PHP and MySQL, so when you insert from PHP you can just do something like this: $var = trim($var); if you want to fix the rows in your table, you can …

Member Avatar for PriteshP23
0
202
Member Avatar for strongpot

You will probably need to perform a subquery in order to get the results of the cases, and then sum the results in the main query, this should work: SELECT s.soldby AS 'sales person', SUM(sub.packages) AS packages, SUM(sub.sales) AS total FROM sales AS s, (SELECT id, soldby, CASE WHEN package …

Member Avatar for strongpot
0
289
Member Avatar for papa10

Basically when you register the data sent by the registrant, you have to use the E-mail library: * http://ellislab.com/codeigniter/user-guide/libraries/email.html If you're still in doubt show your code.

Member Avatar for cereal
0
51
Member Avatar for davy_yg

`News` is a subdirectory? CodeIgniter is installed there? Try: http://localhost/index.php/pages/create

Member Avatar for paulkd
0
233
Member Avatar for lewashby

It seems a method of the class `FGMembersite()` to start a database connection, check in `./include/fg_membersite.php` for more details.

Member Avatar for veedeoo
0
794
Member Avatar for aVar++

Add mysql_error() to your execution: mysql_query($query) or die(mysql_query()) This will output the error, it should help you to solve the problem.

Member Avatar for cereal
0
194
Member Avatar for asaidi

So, a part the name of the function that is wrong `upolad()` instead of `upload()` what's the problem with your script?

Member Avatar for cereal
0
223
Member Avatar for Bijay_1

**@szabizs** You don't need to add `ALL` to retrieve complete entries from those arrays, just: print_r($this->input->get()); Same applies to `post()` method.

Member Avatar for cereal
0
214
Member Avatar for kevinyu

Have you tried the `Model::find()` method? As example: $row = $this->Test->find('first', array( 'conditions' => array('Test.username' => 'jimmorrison') )); print_r($row); More info: http://book.cakephp.org/2.0/en/models/retrieving-your-data.html

Member Avatar for kevinyu
0
379
Member Avatar for BadManSam

If you want to use a link identifier as second paramenter you should remove the closing quote, so from this: $email = mysql_query("myquery, $connectmysql"); to this: $email = mysql_query("myquery", $connectmysql); Also you have to use `mysql_fetch_*` functions before you can access the resource results: * row: http://www.php.net/manual/en/function.mysql-fetch-row.php * assoc: http://www.php.net/manual/en/function.mysql-fetch-assoc.php …

Member Avatar for cereal
0
148
Member Avatar for asaidi
Member Avatar for cereal
0
488
Member Avatar for ronaldpaul

Works fine for me. Probably it depends by your DNS, try to run this from a terminal: dig www.kovaidonbosco.com and then: dig @8.8.8.8 www.kovaidonbosco.com and: dig www.kovaidonbosco.com.cdn.cloudflare.net In the first two cases, if cloudflare is off, you should get your server IP. For more information check: https://support.cloudflare.com/entries/22066298-Hosting-Partner-Troubleshooting

Member Avatar for cereal
0
284
Member Avatar for oredigger

Not sure if this helps, I checked the source of `thr_lock.c` as suggested here: http://dev.mysql.com/doc/refman/5.5/en/table-locking.html It seems this depends on [`max_write_lock_count`](http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_write_lock_count), once reached the limit, all the pending read locks are released. But it appears possible to change the behaviour of the queue system. This is what is written in …

Member Avatar for cereal
0
318
Member Avatar for AndyFang1998_1

It depends on remote websites, something like facebook allows remote logins only with OAuth methods, this means a user of facebook doesn't need to share his own credentials (as the password) with your service, check this for more information: https://developers.facebook.com/docs/facebook-login/ In other cases (HTTP Basic Authentication & Co.) you can …

Member Avatar for Banderson
0
184
Member Avatar for spetruska

You can do that throught the `attach()` method: http://swiftmailer.org/docs/messages.html#attaching-files If you still don't solve the problem post an example of the code here, bye.

Member Avatar for spetruska
0
3K
Member Avatar for asaidi

Try to remove `['Post']` from the variables, for example: `$post['title']` instead of `$post['Post']['title']`.

Member Avatar for cereal
0
68
Member Avatar for dougsix

Change this line: $srclocation = $_SERVER['SERVER_NAME']."/includes/key.php"; With: $srclocation = $_SERVER['DOCUMENT_ROOT']."/includes/key.php"; `SERVER_NAME` will return the domain name, not the path.

Member Avatar for dougsix
0
214
Member Avatar for cip6791

That loop will generate: $hrs = array("2013-07-27 13:00", "2013-07-27 13:49", "cucu"); If you need a multidimensional array an easy solution is to start like this: $result = array(); $hrs = array(); And after the loop: $result[] = $hrs; var_dump($result); If you don't have other segments to add, i.e.: $result = …

Member Avatar for cip6791
0
191
Member Avatar for knarfs

Try **igbinary** instead of serialize/unserialize, it is faster. Also you can try to store these objects to memory, through **Memcached**. Since session files will be written to disk you get high I/O activity and this, if session directory is in the same disk of the web server, can decrease performance. …

Member Avatar for TomH.PG
0
208
Member Avatar for SaRa Ahmad

This is MySQL forum, not MS-SQL, also you're cross-posting: http://www.daniweb.com/web-development/databases/ms-sql/threads/459794/daily-backup-from-sql-server

Member Avatar for cereal
-1
68
Member Avatar for cereal

Hello, I've an array with different type of values: int, null, strings, arrays. I'm trying to remove nulls and empty strings, but I want to save ints, even when it equals to zero, so I tried with `array_filter()`, by default it will remove `0`, `''` and `null`, but by applying …

Member Avatar for cereal
2
435
Member Avatar for code_rum
Member Avatar for code_rum
0
324
Member Avatar for dany12

I usually use text editors like gedit, jEdit (which is cross-platform and my choice in Windows environments) and nano when working without a gui.

Member Avatar for diafol
0
191
Member Avatar for saadi06

If there aren't any `NULL` values you could use `CONCAT()`. For example you have a table like this: create table posts( id auto_increment primary key not null, title varchar(255) not null, body text not null, created_at datetime not null, updated_at datetime not null ) engine = myisam default charset=utf8; Now …

Member Avatar for cereal
0
217
Member Avatar for wareez

Hi, on line 59 change this: $result=mysql_query($qry); to: $result=mysql_query($qry) or die(mysql_error()); This will display the details of the error, check if it helps to solve the problem, bye!

Member Avatar for cereal
0
125
Member Avatar for mmcdonald

First, remove `global $userInfo;` from line `33`, and set it as public/protected/private variable at the top of the class: class Action { public $userInfo; So, at line `47` you can write: $this->userInfo = $stmt->fetch_array(MYSQLI_ASSOC);

Member Avatar for mmcdonald
0
509
Member Avatar for Martin C++

Not tested, but if I'm not wrong this `$cmd->bind_param("s", $where);` will insert the value of **$where** as a string, so: 'autod.mark=7' instead of: `autod`.`mark`=7 If you try to display the error of the query you should get something like: Warning | 1292 | Truncated incorrect INTEGER value: 'autod.mark=7'

Member Avatar for Martin C++
0
248
Member Avatar for spyros.lois

`use` is a [reserved word](http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html) so, or you use backticks around the word or you alter the table. In addition: the methods available for the form are POST, GET, PUT and [other methods](http://tools.ietf.org/html/rfc2616#section-9.1). REQUEST is a generic method used to retrieve data in PHP, don't use it in the method …

Member Avatar for diafol
0
280
Member Avatar for Tinnin

Yes. The RFC cited in PHP documentation explains that the semicolon is used to separate groups of mails, for example: To: list-a: abc@localhost.tld, cba@localhost.tld;, list-b: admin@localhost.tld, info@localhost.tld;

Member Avatar for cereal
0
926
Member Avatar for cgull

Hi, so, the folder of the subdomain (dev) is inside the `DocumentRoot` of the main domain? Can you show the configuration? The folder structure is something like below? c:\sites\mysite c:\sites\mysite\application c:\sites\mysite\system c:\sites\mysite\public_html\index.php c:\sites\mysite\public_html\dev c:\sites\mysite\public_html\dev\public_html\index.php c:\sites\mysite\public_html\dev\application c:\sites\mysite\public_html\dev\system

Member Avatar for cereal
0
727
Member Avatar for NardCake

Hi, the config seems fine, so it can be a permission issue or the mime-type (each CGI needs the mime-type declaration at the top of the script), check this link for more information: http://httpd.apache.org/docs/2.2/howto/cgi.html#writing Also, check Apache error logs to get more details about the issue. Hope it helps.

Member Avatar for NardCake
0
2K
Member Avatar for cgull

What it does `$this->data['new_comment'] = $this->blog_comment_m->get_new();` ? I see it's used in two cases: 1. GET request, no form submit; 2. and when validation is true, rewriting a previous setting of `$this->data['new_comment']`. In the first case the objects should return null/false, so that the default value for `set_value('name', $default)` is …

Member Avatar for cgull
0
3K
Member Avatar for davy_yg

This is not related to PHP. Search for `jquery sidebar` or `javascript sidebar` in Google, there are many examples.

Member Avatar for cereal
0
43
Member Avatar for Shikha_1

Works fine for me, what error you get? Here's my test, based on your scripts: <?php session_start(); ?> <form method="post"> Validation code: <img src="captcha.php?rand=<?php echo rand();?>" id='captchaimg'><br /> <label for='6_letters_code'>Enter the code above here:</label> <input type="text" name="6_letters_code" /> </form> <?php if($_SERVER['REQUEST_METHOD'] == 'POST') { echo 'POST: '; print_r($_POST); echo '<br …

Member Avatar for cereal
0
726
Member Avatar for yavindu

@Atli One to take in account is this: http://www.php.net/archive/2012.php#id2012-05-03-1 It referes to 5.3 and previous versions. Here's some info: http://www.daniweb.com/web-development/php/threads/422387/vulnerability-in-php-cgi

Member Avatar for Atli
0
270
Member Avatar for joshl_1995

If you want something that runs on background you can consider a [MySQL trigger](http://dev.mysql.com/doc/refman/5.0/en/triggers.html) and Gearman, check the example about URL Processing [in these slides.](http://assets.en.oreilly.com/1/event/21/Map_Reduce%20and%20Queues%20for%20MySQL%20Using%20Gearman%20Presentation.pdf) Bye.

Member Avatar for joshl_1995
0
395

The End.