<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Php error: Illegal string offset]]></title><description><![CDATA[<p dir="auto">Salve a tutti,<br />
durante l'esecuzione di un cronjob riscontro questi tre errori ridondante:</p>
<pre><code>[27-Nov-2016 21:52:44 UTC] PHP Deprecated:  mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/byoryrxn/newsite/euroblitz/bo_update.php on line 49
[COLOR=#000000][FONT=&amp;amp]16 10:16:08 UTC] PHP Warning:  Illegal string offset 'lat' in /home/byoryrxn/newsite/euroblitz/bo_update.php on line 332[/FONT][/COLOR]
[COLOR=#000000][FONT=&amp;amp][27-Nov-2016 10:16:08 UTC] PHP Warning:  Illegal string offset 'lon' in /home/byoryrxn/newsite/euroblitz/bo_update.php on line 333[/FONT][/COLOR]
</code></pre>
<p dir="auto">Queste le linee di codice "incriminate":</p>
<p dir="auto">Riga 49:</p>
<pre><code>$sqlcon = mysql_connect($host, $user, $pass);if($sqlcon) {
  mysql_select_db($db) or die(mysql_error());
</code></pre>
<p dir="auto">Riga 332/333:</p>
<pre><code>foreach ($value as $keyb =&gt; $valueb) {    
$lats[]=$valueb[lat];
$lons[]=$valueb[lon];
</code></pre>
<p dir="auto">Sapreste indicarmi come risolverli?<br />
Grazie mille in anticipo per l'aiuto.<br />
Saluti,</p>
]]></description><link>https://dev.connect.gt/topic/226932/php-error-illegal-string-offset</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 02:28:43 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/226932.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 28 Nov 2016 17:45:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Php error: Illegal string offset on Tue, 29 Nov 2016 15:17:52 GMT]]></title><description><![CDATA[<p dir="auto">C'è la documentazione <a href="http://php.net/manual/en/mysqli.select-db.php" rel="nofollow ugc">php.net/manual/en/mysqli.select-db.php</a></p>
]]></description><link>https://dev.connect.gt/post/1230562</link><guid isPermaLink="true">https://dev.connect.gt/post/1230562</guid><dc:creator><![CDATA[m4v1]]></dc:creator><pubDate>Tue, 29 Nov 2016 15:17:52 GMT</pubDate></item><item><title><![CDATA[Reply to Php error: Illegal string offset on Tue, 29 Nov 2016 15:06:52 GMT]]></title><description><![CDATA[<p dir="auto">Fatto, altro errore:</p>
<pre><code>[29-Nov-2016 14:25:01 UTC] PHP Warning:  mysqli_select_db() expects exactly 2 parameters, 1 given in
</code></pre>
<p dir="auto">Quale altro parametro vuole? <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/1b10cac6-d2a5-4eef-b4c6-8566ef09db77-dull.gif?v=12b9555a9a1" class="not-responsive emoji emoji-customizations emoji--dull" style="height:1.4em;width:auto;vertical-align:middle" title=":dull:" alt="" /></p>
<blockquote>
<p dir="auto"><strong>M4V1</strong></p>
<p dir="auto">Invece di usare quella funzione usa mysqli_select_db()</p>
</blockquote>
]]></description><link>https://dev.connect.gt/post/1230559</link><guid isPermaLink="true">https://dev.connect.gt/post/1230559</guid><dc:creator><![CDATA[i.fiorentino]]></dc:creator><pubDate>Tue, 29 Nov 2016 15:06:52 GMT</pubDate></item><item><title><![CDATA[Reply to Php error: Illegal string offset on Tue, 29 Nov 2016 11:03:52 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>i_fiorentino</strong></p>
<p dir="auto">Ok fatto tutto ma non riesco a sistemare la funzione appena sotto:</p>
<pre><code> mysql_select_db($db) or die(mysql_error());
</code></pre>
</blockquote>
<p dir="auto">Invece di usare quella funzione usa mysqli_select_db()</p>
]]></description><link>https://dev.connect.gt/post/1230561</link><guid isPermaLink="true">https://dev.connect.gt/post/1230561</guid><dc:creator><![CDATA[m4v1]]></dc:creator><pubDate>Tue, 29 Nov 2016 11:03:52 GMT</pubDate></item><item><title><![CDATA[Reply to Php error: Illegal string offset on Tue, 29 Nov 2016 10:47:20 GMT]]></title><description><![CDATA[<p dir="auto">Ok fatto tutto ma non riesco a sistemare la funzione appena sotto:</p>
<pre><code> mysql_select_db($db) or die(mysql_error());
</code></pre>
<p dir="auto">ed infatti mi da questo errore:</p>
<pre><code>[29-Nov-2016 00:20:01 UTC] PHP Deprecated:  mysql_select_db(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/byoryrxn/newsite/euroblitz/bo_update.php on line 51[29-Nov-2016 00:20:02 UTC] PHP Warning:  mysql_select_db(): Access denied for user 'root'@'localhost' (using password: NO) in /home/byoryrxn/newsite/euroblitz/bo_update.php on line 51
[29-Nov-2016 00:20:02 UTC] PHP Warning:  mysql_select_db(): A link to the server could not be established in /home/byoryrxn/newsite/euroblitz/bo_update.php on line 51
</code></pre>
<p dir="auto">Grazie mille!</p>
<blockquote>
<p dir="auto"><strong>M4V1</strong></p>
<p dir="auto">Il primo errore è semplice, usi delle funzioni "vecchie" per accedere a mysql usa le librerie mysqli o PDO.</p>
<p dir="auto">Il secondo errore ti dice che $valueb non ha gli indici lat e lon (che in ogni caso andrebbero richiamati tra virgolette)</p>
<pre><code>foreach ($value as $keyb =&gt; $valueb) {    
$lats[]=$valueb['lat'];
$lons[]=$valueb['lon'];
</code></pre>
</blockquote>
]]></description><link>https://dev.connect.gt/post/1230558</link><guid isPermaLink="true">https://dev.connect.gt/post/1230558</guid><dc:creator><![CDATA[i.fiorentino]]></dc:creator><pubDate>Tue, 29 Nov 2016 10:47:20 GMT</pubDate></item><item><title><![CDATA[Reply to Php error: Illegal string offset on Mon, 28 Nov 2016 18:43:10 GMT]]></title><description><![CDATA[<p dir="auto">Il primo errore è semplice, usi delle funzioni "vecchie" per accedere a mysql usa le librerie mysqli o PDO.</p>
<p dir="auto">Il secondo errore ti dice che $valueb non ha gli indici lat e lon (che in ogni caso andrebbero richiamati tra virgolette)</p>
<pre><code>foreach ($value as $keyb =&gt; $valueb) {    
$lats[]=$valueb['lat'];
$lons[]=$valueb['lon'];
</code></pre>
]]></description><link>https://dev.connect.gt/post/1230560</link><guid isPermaLink="true">https://dev.connect.gt/post/1230560</guid><dc:creator><![CDATA[m4v1]]></dc:creator><pubDate>Mon, 28 Nov 2016 18:43:10 GMT</pubDate></item></channel></rss>