2,113 Posted Topics

Member Avatar for gilgil2

In FB you can upload images up to 2048 pixel per side, those will be resized to 960x720, which is the max size in the lightbox. But everything depends on your target and in the usage of these images inside your application. If your app, for example, needs to handle …

Member Avatar for cereal
0
101
Member Avatar for nitin1

This is a good start: http://www.debian.org/doc/manuals/debian-reference/ch05.en.html Bye!

Member Avatar for nitin1
0
141
Member Avatar for krutatA

At the moment **unityshell-rotated** is not supported for 12.04, check these links for more information: * http://ubuntuforums.org/showthread.php?t=1974833 * https://launchpad.net/~paullo612/+archive/unityshell-rotated regarding libnux, the latest and available version is 2.0: **libnux-2.0-0**

Member Avatar for krutatA
1
99
Member Avatar for natehome

Try this: <?php $ok = '<a href="msg_update.php" input type="submit" class="button" value="protected page">Update Home Page Message</a>'; # this is mix of input and a tags, it's not correct $error = '<p>This is not the page you were looking for.</p>'; $con = @mysql_connect(my login stuff); $connection_err = false; mysql_select_db(more stuff); if(!$con) { …

Member Avatar for cereal
0
156
Member Avatar for lewashby

@Garret85 to check if PHP is installed type `php -v` in the terminal, you will get the version. Bye!

Member Avatar for cereal
0
382
Member Avatar for mariano.bolanos

Maybe is the **$md5Key**, in your code: $md5Key="44q9dn7WCUrLHgi8bPsdiBIlLi6WaHI0"; //MD5 key but this doesn't seem a valid hash, for two reasons: * it's not lower case * there are invalid characters, an md5 hash is composed by hexadecimal numbers only, so: 0-9 a-f. Now I'm wondering if this key is saved …

Member Avatar for blocblue
1
347
Member Avatar for phpHelp

Explain better please, you have to create a tool? Are you going to use GD, Imagick or something else?

Member Avatar for pritaeas
0
141
Member Avatar for griselndria

Hi, you have to use a WHERE condition in your query to select only the data related to the logged user. For example: select * from user_details where user_id = 12; If you paste: * the query used to select the data to display * the tables structures (just run …

Member Avatar for griselndria
0
123
Member Avatar for Dan_iweb

Let's start from line 20: if ($fld=='news_added') { $check = " where `inserted_date` = '$date' AND `news_added` = '$value' ";} the problem here is that if this condition is false and the other two conditions (line 21 and 22) are true, **$check** variable will print only: AND `code` = '$value' …

Member Avatar for Dan_iweb
0
135
Member Avatar for dan.nitschke

Try: name.strip().isalpha(); `.strip()` will remove spaces above and at the end of the string, `.isalpha()` will return **true/false**, you will get **false** if there is a space in the middle, to avoid that you can add `.replace`: name.strip().replace(' ','',1).isalpha(); bye!

Member Avatar for vegaseat
0
5K
Member Avatar for jacksantho

This means that your script is using more memory than the allowed. If you post the script maybe somebody will be able to help you.

Member Avatar for riverspart
0
216
Member Avatar for ismailkepee

It [seems there is no driver](https://bugs.launchpad.net/baltix/+bug/959043) but at the end it is suggested a PPA to install the drivers: https://launchpad.net/~michael-gruz/+archive/canon-trunk as alternative there is also a thread that explains how to use the drivers for the ip 2200 and make them work with the 1300, this is old but you …

Member Avatar for cereal
0
223
Member Avatar for nitin1

Go to *Settings » Accounts and Imports* and click on **Import mail and contacts**. For more information you can follow this article: http://support.google.com/mail/bin/answer.py?hl=en&answer=117173

Member Avatar for cereal
0
31
Member Avatar for jacob21

Check for any log available, if you are using Apache server check for acces.log and error.log, then search and check for any uploaded file/image. In order to limit defacements you have to sanitize data, any POST, GET, COOKIE, PUT request: you have to check if you are receving the expected …

Member Avatar for iamthwee
0
126
Member Avatar for gerbil
Member Avatar for happygeek
0
294
Member Avatar for onofej

In addition to deceptikon. Supposing you have a form field named **gender** which sends the data with POST method: <input type="text" name="gender" /> This can work: if(!in_array(strtolower(trim($_POST['gender'])),array('m','male','f','female')) { $errors[] = ''; # message } if nothing is matching the array values then it sends an error. This can work also …

Member Avatar for LastMitch
0
172
Member Avatar for Djmann1013

Line 52 you forgot `;` at the end of the value: `$ans = "Real Glo"; // Answer to image.`

Member Avatar for cereal
0
184
Member Avatar for paine_today

You can use **get_browser()** function or **$_SERVER['HTTP_USER_AGENT']** to read the user agent of the clients and if there is a match with Google bots you will not run the query, something like: <?php $browser = $_SERVER['HTTP_USER_AGENT']; if(!preg_match('/Google[bot]/i',$browser)) { # insert query here } else { echo 'bot'; } ?> the …

Member Avatar for paine_today
0
618
Member Avatar for siaswar

If your computer is enough performant you can install Windows inside VMware: http://www.howtogeek.com/howto/18768/run-windows-in-ubuntu-with-vmware-player/

Member Avatar for rubberman
0
155
Member Avatar for persianprez

Change `$array[1] = Hello World;` to `$array[1] = 'Hello World';` and then it will work, bye :)

Member Avatar for persianprez
0
162
Member Avatar for diafol

Remove the () from the regex, seems to work for me: <?php function translate($content,$lang){ $l = $lang; $pattern = array('en'=>'/\{\{.[^\}\}]*\|\|/','cy'=>'/\|\|.[^\{\{]*\}\}/'); # change this $brackets = array('en'=>'}}','cy'=>'{{'); $content = preg_replace($pattern[$l],'',$content); $content = str_replace($brackets[$l],'',$content); return $content; } $content=<<<CONTENT <p>{{Dyma destun (cy example) rand ||Here's some text en (example) rand}}</p> CONTENT; echo translate($content,'en'); …

Member Avatar for diafol
0
323
Member Avatar for LastMitch

**@LastMitch** if you install an extension like **stylish** in your browser you can add a simple rule to hide that bar: #toolbar { display:none; } besides I like that bar and I use it! bye! :D

Member Avatar for LastMitch
0
243
Member Avatar for lewashby

For a live cd check this link: http://cdimage.debian.org/debian-cd/current-live/i386/iso-hybrid/ more info: http://www.debian.org/CD/live/

Member Avatar for cereal
0
92
Member Avatar for broj1

This happens also in javascript, I found this problem while working on a cart application. Check also these: http://stackoverflow.com/questions/3726721/php-math-precision & http://stackoverflow.com/questions/1458633/elegant-workaround-for-javascript-floating-point-number-problem

Member Avatar for DarkMonarch
3
396
Member Avatar for AMADH

Change your code from line 9 to 26 with this: <?php $file = file('file.txt'); # read file into array $count = count($file); if($count > 0) # file is not empty { $milestone_query = "INSERT into milestones(ID, NAME, URL, EMAIL, LOGO, ADTEXT, CATEGORY, PUBDATE) values"; $i = 1; foreach($file as $row) …

Member Avatar for cereal
0
6K
Member Avatar for vishalonne

In your restricted page enable a $_SESSION to record the `$_SERVER['REQUEST_URI']`, for example: <?php if(!isset($_SESSION['logged'])) # this is where you check if access is allowed { $_SESSION['destination'] = $_SERVER['REQUEST_URI']; header('Location: login.php'); } else { if(isset($_SESSION['destination'])) { unset($_SESSION['destination']); } } ?> And in you login script, after you validate the credentials …

Member Avatar for cereal
0
145
Member Avatar for karthik_ppts

Check this project: http://code.google.com/p/red5-flex-streamer/ it's done with java, flash and php.

Member Avatar for cereal
1
766
Member Avatar for mktrx

In your code you have `$q` declared in line 19 and 22, the first query statement will be overwrited by the second and only this last will be performed by mysql_query. At line 23 add `or die(mysql_error());` to see if there is an error. Also change `$r.mysql_close();` with `mysql_close();` or …

Member Avatar for iamthwee
0
290
Member Avatar for pawan768

You can use **highlight_string()**: http://www.php.net/manual/en/function.highlight-string.php <?php $string = ' <?php if($c==1) { echo $c; } ?> '; echo highlight_string($string,true); ?>

Member Avatar for diafol
0
277
Member Avatar for chandbasha

Usually you ca use `$_SERVER['HTTP_REFERER'];` but it seems that Gmail doesn't send the referer header: https://mail.google.com/mail/help/intl/en_GB/more.html#protecting

Member Avatar for cereal
0
58
Member Avatar for Squidge

Try this: <?php namespace Dbase; class Dbconn { public function conn() { return new \PDO("mysql:host=localhost;dbname=roundth4_rtb2", 'root', ''); } } ?> then inside the class you can include the connection class: <?php require 'dbconn.class.php'; class headScript { private $db; public function __construct() { $this->db = new Dbase\Dbconn(); } public function headLoad() …

Member Avatar for Squidge
0
191
Member Avatar for ali3011

Line 69: $image_random_name= random_name(15).".".$extension ; try this: $image_random_name = $_FILES['image']['name'][$i]; or you can use **$filename** which is declared in line 58 and change line 70 to: $copy = @move_uploaded_file($_FILES['image']['tmp_name'][$i], $images_location.$filename); Bye!

Member Avatar for ali3011
0
199
Member Avatar for bLuEmEzzy

Check the length of the password field in the database, you wrote: > my password is = "y" > the one that i log in =d41d8cd98f00b204e9800998ecf8427e > the one in db = 415290769594460e2e48 now: echo md5('y'); #outputs 415290769594460e2e485922904f345d which is the same of the db version, but it seems that …

Member Avatar for bLuEmEzzy
0
3K
Member Avatar for extjac

In addition, an injection it's a string which can change the behaviour of the query, it's not related directly with XSS: https://www.owasp.org/index.php/SQL_Injection [https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)](https://www.owasp.org/index.php/Cross-site_Scripting_(XSS))

Member Avatar for cereal
0
124
Member Avatar for Rolo Tomassi

This depends on IIS7 which caches each processed file, it is done to increase speed.. to disable caching use these instructions: [http://technet.microsoft.com/en-us/library/cc754957(v=ws.10).aspx](http://technet.microsoft.com/en-us/library/cc754957(v=ws.10).aspx) http://www.ehow.com/how_8532771_turn-off-iis7-caching-php.html bye!

Member Avatar for cereal
0
205
Member Avatar for gacoekchip.pokher

If the server is under linux you can use **dmidecode** for the motherboard serial: sudo dmidecode --type 2 |grep -i serial For the harddisk use **hdparm**: sudo hdparm -I /dev/sda | grep -i serial this will check for the serial of the master hd, for slaves you have to check …

Member Avatar for gacoekchip.pokher
0
4K
Member Avatar for arunpawar

Change it like this: <?php class myClass { public $myVar="this is demo"; public function myTextdemo() { return $this->myVar; # the problem was here } } $obj = new myClass(); echo $obj->myVar; # and here you wrote $obj->$myVar with an extra $ ?> use **return** to output data from a function …

Member Avatar for arunpawar
0
177
Member Avatar for sniga.mareka

From this [example](http://www.flabell.com/files/29_e0507_801783b7bc58aae348c1f53fc8f14f05/deploy/mp3gallery/xml/mp3gallery.xml) file I see there is a **tracks** block in which you have to insert each mp3 data: <tracks> <item id="11"> <title> <![CDATA[ Mix Track 2 ]]> </title> <artist> <![CDATA[ feat. Eo ]]> </artist> <!-- if you want this item to have a different artist(for example featuring artist …

Member Avatar for cereal
0
609
Member Avatar for reibi

Hi, inside the controller create a function to retrieve the sub-category, and then point your javascript to that link, I'm supposing you will use ajax for this. So inside the controller you write a simple function: public function get_subcat() { $cat = $this->uri->segment(3); $this->db->where('category',$cat); $d['query'] = $this->db->get('table_to_query'); $this->load->view('subcat',$d); } inside …

Member Avatar for cereal
0
3K
Member Avatar for PHPuss

I'm not sure this will help but here is missing the ending single quote: $stmt=OCIParse($conn,'SELECT * FROM USERS where USER_NAME = "USER_1"');

Member Avatar for cereal
0
149
Member Avatar for Khav

Change this part: $imgdata[0] = $width; $imgdata[1] = $height; with this: $width = $imgdata[0]; $height = $imgdata[1]; bye!

Member Avatar for Khav
0
182
Member Avatar for PHPuss

The problem is that **$results** is not an array. With **ocifetch()** you get *the next row from a query into internal buffers* so, you get a single part of the *result set*, try **ocifetchinto()**, you can read an example here: * http://www.php.net/manual/en/function.ocifetchinto.php#58115 Or try to use **ocifetchstatement()** which is the …

Member Avatar for PHPuss
0
117
Member Avatar for Khav

Change that *echo* with: while($row = mysql_fetch_object($data)) { echo $row->Column1; } bye!

Member Avatar for Khav
0
126
Member Avatar for James singizi
Member Avatar for Ctechnology24

You can build a restful api: http://en.wikipedia.org/wiki/Representational_state_transfer this will allow you to connect to your database. Bye!

Member Avatar for chrishea
0
195
Member Avatar for natehome

The first argument of `fnmatch()` is the pattern to match, but this variable is not defined inside the function, so this can be a problem, the same seems to happen with `$parameters` at line 7. But a part that, what kind of error do you get? Try to place some …

Member Avatar for cereal
0
101
Member Avatar for thirumal.balu.3

Use strtotime(), you can do it like this: $date = date('Y-m-d', strtotime($_POST['date'])) . ' 00:00:00'; And use a datetime field, since the timestamp: >The TIMESTAMP data type is used for values that contain both date and time parts. TIMESTAMP has a range of '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC. …

Member Avatar for cereal
0
151
Member Avatar for omoayan

I suggest you to create a simple file and try the connection and a query to your database, something like this: <?php # config parameters $host = ''; $user = ''; $pass = ''; $db = ''; $table = ''; $conn = mysql_connect($host,$user,$pass); if (!$conn) { die('connection error: ' . …

Member Avatar for iamthwee
0
118
Member Avatar for Khav

Besides sysctl.conf you have to edit `/proc/sys/vm/swappiness`, just replace with 90. Then you can use `sudo swapoff -a` and `sudo swapon -a` to load the new value without rebooting.

Member Avatar for Khav
0
705
Member Avatar for mr-cracker

Maybe `--mat-time` flag can be helpful for you: http://curl.haxx.se/docs/manpage.html#-m

Member Avatar for cereal
0
244

The End.