Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #15410 > unrolled thread

500 internal server error

Started byjans <janis.rough@gmail.com>
First post2015-06-04 14:06 -0700
Last post2015-06-06 07:21 -0700
Articles 20 on this page of 22 — 4 participants

Back to article view | Back to comp.lang.php


Contents

  500 internal server error jans <janis.rough@gmail.com> - 2015-06-04 14:06 -0700
    Re: 500 internal server error jans <janis.rough@gmail.com> - 2015-06-04 14:13 -0700
    Re: 500 internal server error Richard Yates <richard@yatesguitar.com> - 2015-06-04 14:21 -0700
    Re: 500 internal server error "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-04 23:22 +0200
      Re: 500 internal server error jans <janis.rough@gmail.com> - 2015-06-04 15:04 -0700
        Re: 500 internal server error Richard Yates <richard@yatesguitar.com> - 2015-06-04 16:04 -0700
          Re: 500 internal server error jans <janis.rough@gmail.com> - 2015-06-04 16:17 -0700
            Re: 500 internal server error "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-05 01:45 +0200
    Re: 500 internal server error jans <janis.rough@gmail.com> - 2015-06-04 14:37 -0700
      Re: 500 internal server error jans <janis.rough@gmail.com> - 2015-06-04 14:43 -0700
        Re: 500 internal server error jans <janis.rough@gmail.com> - 2015-06-04 14:44 -0700
          Re: 500 internal server error jans <janis.rough@gmail.com> - 2015-06-04 15:05 -0700
            Re: 500 internal server error "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-05 01:55 +0200
              Re: 500 internal server error jans <janis.rough@gmail.com> - 2015-06-05 18:31 -0700
                Re: 500 internal server error "J.O. Aho" <user@example.net> - 2015-06-06 09:33 +0200
                  Re: 500 internal server error jans <janis.rough@gmail.com> - 2015-06-06 00:54 -0700
                  Re: 500 internal server error jans <janis.rough@gmail.com> - 2015-06-06 00:59 -0700
                    Re: 500 internal server error "J.O. Aho" <user@example.net> - 2015-06-06 16:13 +0200
                      Re: 500 internal server error jans <janis.rough@gmail.com> - 2015-06-06 07:20 -0700
                        Re: 500 internal server error jans <janis.rough@gmail.com> - 2015-06-06 07:21 -0700
                        Re: 500 internal server error "J.O. Aho" <user@example.net> - 2015-06-06 22:45 +0200
                      Re: 500 internal server error jans <janis.rough@gmail.com> - 2015-06-06 07:21 -0700

Page 1 of 2  [1] 2  Next page →


#15410 — 500 internal server error

Fromjans <janis.rough@gmail.com>
Date2015-06-04 14:06 -0700
Subject500 internal server error
Message-ID<572f737e-484d-412e-a32d-88505b0cdafd@googlegroups.com>
I can connect to mysql through mysql workbench but my php connection script doesn't work?
I get the 500 internal server error.  It seems like it must be mysql error because php_info.php works.
Mysql workbench query worked:  show databases;use conduit_earth;select * from users;
Mysql@127.0.0.1:3306
Why do I get a 500 error?
<?php

echo '<ul>';

$db_host = "localhost";
$db_user = "root";
$db_password ="root";
$db_name = "earth";
$db_port = "3306";

$db_link = mysqli_connect($db_host.":".$port, $db_user, $db_password,  $db_name);
echo $db_link;
or die ("Unable to connect");

$sqlQuery = "SELECT username,fname  FROM users";

$result = mysqli_query($db_link, $sqlQuery);


if($result)
{
 while ($row=mysqli_fetch_assoc($result)) 
  {
    echo "<li>" .  $row['username'] . "<br>" . $row['fname'] . "</li>\n\t\t<hr>";
}
}
else
{
echo '<p>error displaying resultset</p>';
}

mysqli_close($db_link);
echo '</ul>';



?>

[toc] | [next] | [standalone]


#15411

Fromjans <janis.rough@gmail.com>
Date2015-06-04 14:13 -0700
Message-ID<d39268e3-8104-4157-8438-1858294ca9dd@googlegroups.com>
In reply to#15410
On Thursday, June 4, 2015 at 2:08:31 PM UTC-7, jans wrote:
Does this mean that it isn't TCP/IP it is socket? 
150604 13:01:15 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
Version: '5.5.42'  socket: '/Applications/MAMP/tmp/mysql/mysql.sock'  port: 3306  Source distribution


> I can connect to mysql through mysql workbench but my php connection script doesn't work?
> I get the 500 internal server error.  It seems like it must be mysql error because php_info.php works.
> Mysql workbench query worked:  show databases;use conduit_earth;select * from users;
> Mysql@127.0.0.1:3306
> Why do I get a 500 error?
> <?php
> 
> echo '<ul>';
> 
> $db_host = "localhost";
> $db_user = "root";
> $db_password ="root";
> $db_name = "earth";
> $db_port = "3306";
> 
> $db_link = mysqli_connect($db_host.":".$port, $db_user, $db_password,  $db_name);
> echo $db_link;
> or die ("Unable to connect");
> 
> $sqlQuery = "SELECT username,fname  FROM users";
> 
> $result = mysqli_query($db_link, $sqlQuery);
> 
> 
> if($result)
> {
>  while ($row=mysqli_fetch_assoc($result)) 
>   {
>     echo "<li>" .  $row['username'] . "<br>" . $row['fname'] . "</li>\n\t\t<hr>";
> }
> }
> else
> {
> echo '<p>error displaying resultset</p>';
> }
> 
> mysqli_close($db_link);
> echo '</ul>';
> 
> 
> 
> ?>

does

[toc] | [prev] | [next] | [standalone]


#15412

FromRichard Yates <richard@yatesguitar.com>
Date2015-06-04 14:21 -0700
Message-ID<rsf1na1aq0h55tks0njn6egtun25avuuu5@4ax.com>
In reply to#15410
On Thu, 4 Jun 2015 14:06:42 -0700 (PDT), jans <janis.rough@gmail.com>
wrote:

>I can connect to mysql through mysql workbench but my php connection script doesn't work?
>I get the 500 internal server error.  It seems like it must be mysql error because php_info.php works.
>Mysql workbench query worked:  show databases;use conduit_earth;select * from users;
>Mysql@127.0.0.1:3306
>Why do I get a 500 error?
><?php
>
>echo '<ul>';
>
>$db_host = "localhost";
>$db_user = "root";
>$db_password ="root";
>$db_name = "earth";
>$db_port = "3306";
>
>$db_link = mysqli_connect($db_host.":".$port, $db_user, $db_password,  $db_name);
>echo $db_link;
>or die ("Unable to connect");
>
>$sqlQuery = "SELECT username,fname  FROM users";
>
>$result = mysqli_query($db_link, $sqlQuery);
>
>
>if($result)
>{
> while ($row=mysqli_fetch_assoc($result)) 
>  {
>    echo "<li>" .  $row['username'] . "<br>" . $row['fname'] . "</li>\n\t\t<hr>";
>}
>}
>else
>{
>echo '<p>error displaying resultset</p>';
>}
>
>mysqli_close($db_link);
>echo '</ul>';


$db_link is a resource. You cannot echo it. Delete that line.

'or die ("Unable to connect");' is not a valid php statement. Your
script is probably terminating there and giving you the 500 error.

Try (all one line):

$db_link = mysqli_connect($db_host.":".$port, $db_user, $db_password,
$db_name) or die ("Unable to connect");

[toc] | [prev] | [next] | [standalone]


#15413

From"Christoph M. Becker" <cmbecker69@arcor.de>
Date2015-06-04 23:22 +0200
Message-ID<mkqfhh$o9v$1@solani.org>
In reply to#15410
jans wrote:

> I can connect to mysql through mysql workbench but my php connection script doesn't work?
> I get the 500 internal server error.  It seems like it must be mysql error because php_info.php works.
> Mysql workbench query worked:  show databases;use conduit_earth;select * from users;
> Mysql@127.0.0.1:3306
> Why do I get a 500 error?

Check your error logs.  (I'm assuming that PHP is configured to write
errors and warnings to a log file.)

> <?php
> 
> echo '<ul>';
> 
> $db_host = "localhost";
> $db_user = "root";
> $db_password ="root";
> $db_name = "earth";
> $db_port = "3306";
> 
> $db_link = mysqli_connect($db_host.":".$port, $db_user, $db_password,  $db_name);
> echo $db_link;
> or die ("Unable to connect");

This is a syntax error.

Also see <http://php.net/manual/en/>.

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#15417

Fromjans <janis.rough@gmail.com>
Date2015-06-04 15:04 -0700
Message-ID<4f063ea6-66d9-4c23-a3d3-8ef525559ac9@googlegroups.com>
In reply to#15413
On Thursday, June 4, 2015 at 2:21:57 PM UTC-7, Christoph M. Becker wrote:
It must be something simple because I can hit the page.  I just get a blank page.  It says 500 internal server error,  because I am able to correct error messages in scripts from looking in the php log directly.
> jans wrote:
> 
> > I can connect to mysql through mysql workbench but my php connection script doesn't work?
> > I get the 500 internal server error.  It seems like it must be mysql error because php_info.php works.
> > Mysql workbench query worked:  show databases;use conduit_earth;select * from users;
> > Mysql@127.0.0.1:3306
> > Why do I get a 500 error?
> 
> Check your error logs.  (I'm assuming that PHP is configured to write
> errors and warnings to a log file.)
> 
> > <?php
> > 
> > echo '<ul>';
> > 
> > $db_host = "localhost";
> > $db_user = "root";
> > $db_password ="root";
> > $db_name = "earth";
> > $db_port = "3306";
> > 
> > $db_link = mysqli_connect($db_host.":".$port, $db_user, $db_password,  $db_name);
> > echo $db_link;
> > or die ("Unable to connect");
> 
> This is a syntax error.
> 
> Also see <http://php.net/manual/en/>.
> 
> -- 
> Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#15419

FromRichard Yates <richard@yatesguitar.com>
Date2015-06-04 16:04 -0700
Message-ID<48m1na97dij5025n5lg040dkqmcdplol39@4ax.com>
In reply to#15417
Two people have told you that there is a php syntax error in the code
you posted.
Have you corrected that error?
If you have corrected it, post the corrected code.

On Thu, 4 Jun 2015 15:04:02 -0700 (PDT), jans <janis.rough@gmail.com>
wrote:

>On Thursday, June 4, 2015 at 2:21:57 PM UTC-7, Christoph M. Becker wrote:
>It must be something simple because I can hit the page.  I just get a blank page.  It says 500 internal server error,  because I am able to correct error messages in scripts from looking in the php log directly.
>> jans wrote:
>> 
>> > I can connect to mysql through mysql workbench but my php connection script doesn't work?
>> > I get the 500 internal server error.  It seems like it must be mysql error because php_info.php works.
>> > Mysql workbench query worked:  show databases;use conduit_earth;select * from users;
>> > Mysql@127.0.0.1:3306
>> > Why do I get a 500 error?
>> 
>> Check your error logs.  (I'm assuming that PHP is configured to write
>> errors and warnings to a log file.)
>> 
>> > <?php
>> > 
>> > echo '<ul>';
>> > 
>> > $db_host = "localhost";
>> > $db_user = "root";
>> > $db_password ="root";
>> > $db_name = "earth";
>> > $db_port = "3306";
>> > 
>> > $db_link = mysqli_connect($db_host.":".$port, $db_user, $db_password,  $db_name);
>> > echo $db_link;
>> > or die ("Unable to connect");
>> 
>> This is a syntax error.
>> 
>> Also see <http://php.net/manual/en/>.
>> 
>> -- 
>> Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#15420

Fromjans <janis.rough@gmail.com>
Date2015-06-04 16:17 -0700
Message-ID<a3265f31-9f25-411c-a218-b1da563d1979@googlegroups.com>
In reply to#15419
On Thursday, June 4, 2015 at 4:03:57 PM UTC-7, Richard Yates wrote:
<?php

echo '<ul>';

$db_host = "localhost";
$db_user = "root";
$db_password ="root";
$db_name = "conduit_earth";
$db_port = "3306";

$db_link = mysqli_connect($db_host, $db_user, $db_password,  $db_name) or die ("Unable to connect") . mysqli_error($link);


$sqlQuery = "SELECT username,fname  FROM users";

$result = mysqli_query($db_link, $sqlQuery);


if($result)
{
 while ($row=mysqli_fetch_assoc($result)) 
  {
    echo "<li>" .  $row['username'] . "<br>" . $row['fname'] . "</li>\n\t\t<hr>";
}
}
else
{
echo '<p>error displaying resultset</p>';
}

mysqli_close($db_link);
echo '</ul>';



?>

it works,
> Two people have told you that there is a php syntax error in the code
> you posted.
> Have you corrected that error?
> If you have corrected it, post the corrected code.
> 
> On Thu, 4 Jun 2015 15:04:02 -0700 (PDT), jans <janis.rough@gmail.com>
> wrote:
> 
> >On Thursday, June 4, 2015 at 2:21:57 PM UTC-7, Christoph M. Becker wrote:
> >It must be something simple because I can hit the page.  I just get a blank page.  It says 500 internal server error,  because I am able to correct error messages in scripts from looking in the php log directly.
> >> jans wrote:
> >> 
> >> > I can connect to mysql through mysql workbench but my php connection script doesn't work?
> >> > I get the 500 internal server error.  It seems like it must be mysql error because php_info.php works.
> >> > Mysql workbench query worked:  show databases;use conduit_earth;select * from users;
> >> > Mysql@127.0.0.1:3306
> >> > Why do I get a 500 error?
> >> 
> >> Check your error logs.  (I'm assuming that PHP is configured to write
> >> errors and warnings to a log file.)
> >> 
> >> > <?php
> >> > 
> >> > echo '<ul>';
> >> > 
> >> > $db_host = "localhost";
> >> > $db_user = "root";
> >> > $db_password ="root";
> >> > $db_name = "earth";
> >> > $db_port = "3306";
> >> > 
> >> > $db_link = mysqli_connect($db_host.":".$port, $db_user, $db_password,  $db_name);
> >> > echo $db_link;
> >> > or die ("Unable to connect");
> >> 
> >> This is a syntax error.
> >> 
> >> Also see <http://php.net/manual/en/>.
> >> 
> >> -- 
> >> Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#15421

From"Christoph M. Becker" <cmbecker69@arcor.de>
Date2015-06-05 01:45 +0200
Message-ID<mkqntp$m62$1@solani.org>
In reply to#15420
jans wrote:

Please do not top-post.  That makes it hard to follow the discussion,
and even harder to reply sensibly.

> $db_link = mysqli_connect($db_host, $db_user, $db_password,  $db_name) or die ("Unable to connect") . mysqli_error($link);

> it works,

Lucky you.  If it didn't work, you would get no error messages from
mysqli_error(), because this function will never be called.  Hint: in
PHP there is no life after dying.

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#15414

Fromjans <janis.rough@gmail.com>
Date2015-06-04 14:37 -0700
Message-ID<2f02a6f7-058c-4952-a937-ab8f21ad8090@googlegroups.com>
In reply to#15410
On Thursday, June 4, 2015 at 2:08:31 PM UTC-7, jans wrote:
Okay thanks, I see the syntax error,  Sorry for the trouble now I think it is an internal configuration error I am still getting a blank web page but now I know everything appears to be working except my code I guess :-(.
> I can connect to mysql through mysql workbench but my php connection script doesn't work?
> I get the 500 internal server error.  It seems like it must be mysql error because php_info.php works.
> Mysql workbench query worked:  show databases;use conduit_earth;select * from users;
> Mysql@127.0.0.1:3306
> Why do I get a 500 error?
> <?php
> 
> echo '<ul>';
> 
> $db_host = "localhost";
> $db_user = "root";
> $db_password ="root";
> $db_name = "earth";
> $db_port = "3306";
> 
> $db_link = mysqli_connect($db_host.":".$port, $db_user, $db_password,  $db_name);
> echo $db_link;
> or die ("Unable to connect");
> 
> $sqlQuery = "SELECT username,fname  FROM users";
> 
> $result = mysqli_query($db_link, $sqlQuery);
> 
> 
> if($result)
> {
>  while ($row=mysqli_fetch_assoc($result)) 
>   {
>     echo "<li>" .  $row['username'] . "<br>" . $row['fname'] . "</li>\n\t\t<hr>";
> }
> }
> else
> {
> echo '<p>error displaying resultset</p>';
> }
> 
> mysqli_close($db_link);
> echo '</ul>';
> 
> 
> 
> ?>

[toc] | [prev] | [next] | [standalone]


#15415

Fromjans <janis.rough@gmail.com>
Date2015-06-04 14:43 -0700
Message-ID<f0f18b22-659f-4b33-a2ba-7d7222168b06@googlegroups.com>
In reply to#15414
On Thursday, June 4, 2015 at 2:37:48 PM UTC-7, jans wrote:

does this mean something in apache?

[Thu Jun 04 13:01:14 2015] [notice] Digest: done
[Thu Jun 04 13:01:14 2015] [notice] FastCGI: process manager initialized (pid 26829)
[Thu Jun 04 13:01:14 2015] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.4 Python/2.7.8 PHP/5.3.14 mod_ssl/2.2.29 OpenSSL/0.9.8za DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.8 Perl/v5.20.0 configured -- resuming normal operations
[Thu Jun 04 14:16:45 2015] [notice] caught SIGTERM, shutting down
[Thu Jun 04 14:24:03 2015] [notice] Digest: generating secret for digest authentication ...
[Thu Jun 04 14:24:03 2015] [notice] Digest: done
[Thu Jun 04 14:24:03 2015] [notice] FastCGI: process manager initialized (pid 29315)
[Thu Jun 04 14:24:04 2015] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.4 Python/2.7.8 PHP/5.3.14 mod_ssl/2.2.29 OpenSSL/0.9.8za DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.8 Perl/v5.20.0 configured -- resuming normal operations
> On Thursday, June 4, 2015 at 2:08:31 PM UTC-7, jans wrote:
> Okay thanks, I see the syntax error,  Sorry for the trouble now I think it is an internal configuration error I am still getting a blank web page but now I know everything appears to be working except my code I guess :-(.
> > I can connect to mysql through mysql workbench but my php connection script doesn't work?
> > I get the 500 internal server error.  It seems like it must be mysql error because php_info.php works.
> > Mysql workbench query worked:  show databases;use conduit_earth;select * from users;
> > Mysql@127.0.0.1:3306
> > Why do I get a 500 error?
> > <?php
> > 
> > echo '<ul>';
> > 
> > $db_host = "localhost";
> > $db_user = "root";
> > $db_password ="root";
> > $db_name = "earth";
> > $db_port = "3306";
> > 
> > $db_link = mysqli_connect($db_host.":".$port, $db_user, $db_password,  $db_name);
> > echo $db_link;
> > or die ("Unable to connect");
> > 
> > $sqlQuery = "SELECT username,fname  FROM users";
> > 
> > $result = mysqli_query($db_link, $sqlQuery);
> > 
> > 
> > if($result)
> > {
> >  while ($row=mysqli_fetch_assoc($result)) 
> >   {
> >     echo "<li>" .  $row['username'] . "<br>" . $row['fname'] . "</li>\n\t\t<hr>";
> > }
> > }
> > else
> > {
> > echo '<p>error displaying resultset</p>';
> > }
> > 
> > mysqli_close($db_link);
> > echo '</ul>';
> > 
> > 
> > 
> > ?>

[toc] | [prev] | [next] | [standalone]


#15416

Fromjans <janis.rough@gmail.com>
Date2015-06-04 14:44 -0700
Message-ID<e5ff5b4f-57df-4ee8-8888-a79cf507aeb0@googlegroups.com>
In reply to#15415
On Thursday, June 4, 2015 at 2:43:08 PM UTC-7, jans wrote:

this is my mysql log:
150604 14:16:45 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
150604 14:23:53 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql
150604 14:23:53 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
150604 14:23:53 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
150604 14:23:54 [Note] Plugin 'FEDERATED' is disabled.
150604 14:23:54 InnoDB: The InnoDB memory heap is disabled
150604 14:23:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150604 14:23:54 InnoDB: Compressed tables use zlib 1.2.3
150604 14:23:54 InnoDB: Initializing buffer pool, size = 128.0M
150604 14:23:54 InnoDB: Completed initialization of buffer pool
150604 14:23:55 InnoDB: highest supported file format is Barracuda.
150604 14:23:57  InnoDB: Waiting for the background threads to start
150604 14:23:58 InnoDB: 5.5.42 started; log sequence number 1595675
150604 14:23:58 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150604 14:23:58 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
150604 14:23:58 [Note] Server socket created on IP: '0.0.0.0'.
150604 14:24:00 [Note] Event Scheduler: Loaded 0 events
150604 14:24:00 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
Version: '5.5.42'  socket: '/Applications/MAMP/tmp/mysql/mysql.sock'  port: 3306  Source distribution
 
> On Thursday, June 4, 2015 at 2:37:48 PM UTC-7, jans wrote:
> 
> does this mean something in apache?
> 
> [Thu Jun 04 13:01:14 2015] [notice] Digest: done
> [Thu Jun 04 13:01:14 2015] [notice] FastCGI: process manager initialized (pid 26829)
> [Thu Jun 04 13:01:14 2015] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.4 Python/2.7.8 PHP/5.3.14 mod_ssl/2.2.29 OpenSSL/0.9.8za DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.8 Perl/v5.20.0 configured -- resuming normal operations
> [Thu Jun 04 14:16:45 2015] [notice] caught SIGTERM, shutting down
> [Thu Jun 04 14:24:03 2015] [notice] Digest: generating secret for digest authentication ...
> [Thu Jun 04 14:24:03 2015] [notice] Digest: done
> [Thu Jun 04 14:24:03 2015] [notice] FastCGI: process manager initialized (pid 29315)
> [Thu Jun 04 14:24:04 2015] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.4 Python/2.7.8 PHP/5.3.14 mod_ssl/2.2.29 OpenSSL/0.9.8za DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.8 Perl/v5.20.0 configured -- resuming normal operations
> > On Thursday, June 4, 2015 at 2:08:31 PM UTC-7, jans wrote:
> > Okay thanks, I see the syntax error,  Sorry for the trouble now I think it is an internal configuration error I am still getting a blank web page but now I know everything appears to be working except my code I guess :-(.
> > > I can connect to mysql through mysql workbench but my php connection script doesn't work?
> > > I get the 500 internal server error.  It seems like it must be mysql error because php_info.php works.
> > > Mysql workbench query worked:  show databases;use conduit_earth;select * from users;
> > > Mysql@127.0.0.1:3306
> > > Why do I get a 500 error?
> > > <?php
> > > 
> > > echo '<ul>';
> > > 
> > > $db_host = "localhost";
> > > $db_user = "root";
> > > $db_password ="root";
> > > $db_name = "earth";
> > > $db_port = "3306";
> > > 
> > > $db_link = mysqli_connect($db_host.":".$port, $db_user, $db_password,  $db_name);
> > > echo $db_link;
> > > or die ("Unable to connect");
> > > 
> > > $sqlQuery = "SELECT username,fname  FROM users";
> > > 
> > > $result = mysqli_query($db_link, $sqlQuery);
> > > 
> > > 
> > > if($result)
> > > {
> > >  while ($row=mysqli_fetch_assoc($result)) 
> > >   {
> > >     echo "<li>" .  $row['username'] . "<br>" . $row['fname'] . "</li>\n\t\t<hr>";
> > > }
> > > }
> > > else
> > > {
> > > echo '<p>error displaying resultset</p>';
> > > }
> > > 
> > > mysqli_close($db_link);
> > > echo '</ul>';
> > > 
> > > 
> > > 
> > > ?>

[toc] | [prev] | [next] | [standalone]


#15418

Fromjans <janis.rough@gmail.com>
Date2015-06-04 15:05 -0700
Message-ID<cd804cdb-d719-40e2-b49a-d01e12110aca@googlegroups.com>
In reply to#15416
On Thursday, June 4, 2015 at 2:44:10 PM UTC-7, jans wrote:
> On Thursday, June 4, 2015 at 2:43:08 PM UTC-7, jans wrote:
> 
> this is my mysql log:
> 150604 14:16:45 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
> 150604 14:23:53 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql
> 150604 14:23:53 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
> 150604 14:23:53 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
> 150604 14:23:54 [Note] Plugin 'FEDERATED' is disabled.
> 150604 14:23:54 InnoDB: The InnoDB memory heap is disabled
> 150604 14:23:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins
> 150604 14:23:54 InnoDB: Compressed tables use zlib 1.2.3
> 150604 14:23:54 InnoDB: Initializing buffer pool, size = 128.0M
> 150604 14:23:54 InnoDB: Completed initialization of buffer pool
> 150604 14:23:55 InnoDB: highest supported file format is Barracuda.
> 150604 14:23:57  InnoDB: Waiting for the background threads to start
> 150604 14:23:58 InnoDB: 5.5.42 started; log sequence number 1595675
> 150604 14:23:58 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
> 150604 14:23:58 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
> 150604 14:23:58 [Note] Server socket created on IP: '0.0.0.0'.
> 150604 14:24:00 [Note] Event Scheduler: Loaded 0 events
> 150604 14:24:00 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
> Version: '5.5.42'  socket: '/Applications/MAMP/tmp/mysql/mysql.sock'  port: 3306  Source distribution
>  
> > On Thursday, June 4, 2015 at 2:37:48 PM UTC-7, jans wrote:
> > 
> > does this mean something in apache?
> > 
> > [Thu Jun 04 13:01:14 2015] [notice] Digest: done
> > [Thu Jun 04 13:01:14 2015] [notice] FastCGI: process manager initialized (pid 26829)
> > [Thu Jun 04 13:01:14 2015] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.4 Python/2.7.8 PHP/5.3.14 mod_ssl/2.2.29 OpenSSL/0.9.8za DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.8 Perl/v5.20.0 configured -- resuming normal operations
> > [Thu Jun 04 14:16:45 2015] [notice] caught SIGTERM, shutting down
> > [Thu Jun 04 14:24:03 2015] [notice] Digest: generating secret for digest authentication ...
> > [Thu Jun 04 14:24:03 2015] [notice] Digest: done
> > [Thu Jun 04 14:24:03 2015] [notice] FastCGI: process manager initialized (pid 29315)
> > [Thu Jun 04 14:24:04 2015] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.4 Python/2.7.8 PHP/5.3.14 mod_ssl/2.2.29 OpenSSL/0.9.8za DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.8 Perl/v5.20.0 configured -- resuming normal operations
> > > On Thursday, June 4, 2015 at 2:08:31 PM UTC-7, jans wrote:
> > > Okay thanks, I see the syntax error,  Sorry for the trouble now I think it is an internal configuration error I am still getting a blank web page but now I know everything appears to be working except my code I guess :-(.
> > > > I can connect to mysql through mysql workbench but my php connection script doesn't work?
> > > > I get the 500 internal server error.  It seems like it must be mysql error because php_info.php works.
> > > > Mysql workbench query worked:  show databases;use conduit_earth;select * from users;
> > > > Mysql@127.0.0.1:3306
> > > > Why do I get a 500 error?
> > > > <?php
> > > > 
> > > > echo '<ul>';
> > > > 
> > > > $db_host = "localhost";
> > > > $db_user = "root";
> > > > $db_password ="root";
> > > > $db_name = "earth";
> > > > $db_port = "3306";
> > > > 
> > > > $db_link = mysqli_connect($db_host.":".$port, $db_user, $db_password,  $db_name);
> > > > echo $db_link;
> > > > or die ("Unable to connect");
> > > > 
> > > > $sqlQuery = "SELECT username,fname  FROM users";
> > > > 
> > > > $result = mysqli_query($db_link, $sqlQuery);
> > > > 
> > > > 
> > > > if($result)
> > > > {
> > > >  while ($row=mysqli_fetch_assoc($result)) 
> > > >   {
> > > >     echo "<li>" .  $row['username'] . "<br>" . $row['fname'] . "</li>\n\t\t<hr>";
> > > > }
> > > > }
> > > > else
> > > > {
> > > > echo '<p>error displaying resultset</p>';
> > > > }
> > > > 
> > > > mysqli_close($db_link);
> > > > echo '</ul>';
> > > > 
> > > > 
> > > > 
> > > > ?>

but I'm hitting my database and there is configurations in xml so maybe that is what is wrong .

[toc] | [prev] | [next] | [standalone]


#15422

From"Christoph M. Becker" <cmbecker69@arcor.de>
Date2015-06-05 01:55 +0200
Message-ID<mkqohe$oca$1@solani.org>
In reply to#15418
jans wrote:

> but I'm hitting my database and there is configurations in xml so
> maybe that is what is wrong .

Maybe.  But what's definitely wrong, is your approach to programming.
Learning by doing is fine to a certain degree, but you need to learn
some basics by reading available documentation.  And it is important to
apply analytic skills instead of guessing.

Otherwise you might finally come up with a working solution, but most
certainly that will take much longer than necessary, and you run the
risk that the solution is way more complex than necessary.

Reading and understanding
<http://stackoverflow.com/questions/845021/how-to-get-useful-error-messages-in-php>
might be helpful, for a start.

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#15423

Fromjans <janis.rough@gmail.com>
Date2015-06-05 18:31 -0700
Message-ID<7a5c4d25-85f1-4922-ba3c-21fb4074b37b@googlegroups.com>
In reply to#15422
On Thursday, June 4, 2015 at 4:55:30 PM UTC-7, Christoph M. Becker wrote:
> jans wrote:
> 
> > but I'm hitting my database and there is configurations in xml so
> > maybe that is what is wrong .
> 
> Maybe.  But what's definitely wrong, is your approach to programming.
> Learning by doing is fine to a certain degree, but you need to learn
> some basics by reading available documentation.  And it is important to
> apply analytic skills instead of guessing.
> 
> Otherwise you might finally come up with a working solution, but most
> certainly that will take much longer than necessary, and you run the
> risk that the solution is way more complex than necessary.
> 
> Reading and understanding
> <http://stackoverflow.com/questions/845021/how-to-get-useful-error-messages-in-php>
> might be helpful, for a start.
> 
> -- 
> Christoph M. Becker

thanks, I did have it on but had to reinstall the server and it was left off. Thanks for the links.  Question:
my log seems to have died at 4:00.  I think I was getting too many repeated errors so I turned on ignore_repeated_errors = On
I also turned on ignore_repeated_source= ON
Turning them back Off hasn't restored the log.

All of my error settings in php.ini
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; error_reporting is a bit-field.  Or each number up to get desired error
; reporting level
;  E_ALL             - All errors and warnings
; E_ERROR           - fatal run-time errors
; E_WARNING         - run-time warnings (non-fatal errors)
; E_PARSE           - compile-time parse errors
; E_NOTICE          - run-time notices (these are warnings which often result
;                     from a bug in your code, but it's possible that it was
;                     intentional (e.g., using an uninitialized variable and
;                     relying on the fact it's automatically initialized to an
;                     empty string)
; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
;                     initial startup
; E_COMPILE_ERROR   - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR      - user-generated error message
; E_USER_WARNING    - user-generated warning message
; E_USER_NOTICE     - user-generated notice message
;
; Examples:
;
;   - Show all errors, except for notices
;
error_reporting = E_ALL & ~E_NOTICE
;
;   - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
;   - Show all errors except for notices
;
error_reporting  =  MAMP_error_reporting_MAMP

; Print out errors (as a part of the output).  For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below).  Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = MAMP_display_errors_MAMP

; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed.  It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = MAMP_display_startup_errors_MAMP

; Log errors into a log file (server-specific log, stderr, or error_log (below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = MAMP_php_log_errors_MAMP

; Set maximum length of log_errors. In error_log information about the source is
; added. The default is 1024 and 0 allows to not apply any maximum length at all.
log_errors_max_len = 1024

; Do not log repeated messages. Repeated errors must occur in same file on same
; line until ignore_repeated_source is set true.
ignore_repeated_errors = Off

; Ignore source of message when ignoring repeated messages. When this setting 
; is On you will not log errors with repeated messages from different files or
; sourcelines.
ignore_repeated_source = Off


Also in Mamp Pro is set

What to log:    Display statup error
                       All other errors
then I even tried logging the other options errors warnings and notices still nothing.

did I miss a setting or how can I get the log back?  Its on a mac.   Thanks,

[toc] | [prev] | [next] | [standalone]


#15424

From"J.O. Aho" <user@example.net>
Date2015-06-06 09:33 +0200
Message-ID<ctfm21Fb6egU1@mid.individual.net>
In reply to#15423
On 06/06/15 03:31, jans wrote:


> All of my error settings in php.ini
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ; Error handling and logging ;
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> ; error_reporting is a bit-field.  Or each number up to get desired error
> ; reporting level
> ;  E_ALL             - All errors and warnings
> ; E_ERROR           - fatal run-time errors
> ; E_WARNING         - run-time warnings (non-fatal errors)
> ; E_PARSE           - compile-time parse errors
> ; E_NOTICE          - run-time notices (these are warnings which often result
> ;                     from a bug in your code, but it's possible that it was
> ;                     intentional (e.g., using an uninitialized variable and
> ;                     relying on the fact it's automatically initialized to an
> ;                     empty string)
> ; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
> ; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
> ;                     initial startup
> ; E_COMPILE_ERROR   - fatal compile-time errors
> ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
> ; E_USER_ERROR      - user-generated error message
> ; E_USER_WARNING    - user-generated warning message
> ; E_USER_NOTICE     - user-generated notice message
> ;
> ; Examples:
> ;
> ;   - Show all errors, except for notices
> ;
> error_reporting = E_ALL & ~E_NOTICE
> ;
> ;   - Show only errors
> ;
> ;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
> ;
> ;   - Show all errors except for notices
> ;
> error_reporting  =  MAMP_error_reporting_MAMP

You overwrite the settings, remove the one you have added and use the 
'E_ALL & ~E_NOTICE' only.


> display_errors = MAMP_display_errors_MAMP
> display_startup_errors = MAMP_display_startup_errors_MAMP
> log_errors = MAMP_php_log_errors_MAMP

Use 'On' or 'Off' as option


> ; Set maximum length of log_errors. In error_log information about the source is
> ; added. The default is 1024 and 0 allows to not apply any maximum length at all.
> log_errors_max_len = 1024
>
> ; Do not log repeated messages. Repeated errors must occur in same file on same
> ; line until ignore_repeated_source is set true.
> ignore_repeated_errors = Off
>
> ; Ignore source of message when ignoring repeated messages. When this setting
> ; is On you will not log errors with repeated messages from different files or
> ; sourcelines.
> ignore_repeated_source = Off

[toc] | [prev] | [next] | [standalone]


#15425

Fromjans <janis.rough@gmail.com>
Date2015-06-06 00:54 -0700
Message-ID<fc93e955-c774-4b6e-a84f-141f34438dbd@googlegroups.com>
In reply to#15424
On Saturday, June 6, 2015 at 12:33:27 AM UTC-7, J.O. Aho wrote:
> On 06/06/15 03:31, jans wrote:
> 
> 
> > All of my error settings in php.ini
> > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> > ; Error handling and logging ;
> > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> >
> > ; error_reporting is a bit-field.  Or each number up to get desired error
> > ; reporting level
> > ;  E_ALL             - All errors and warnings
> > ; E_ERROR           - fatal run-time errors
> > ; E_WARNING         - run-time warnings (non-fatal errors)
> > ; E_PARSE           - compile-time parse errors
> > ; E_NOTICE          - run-time notices (these are warnings which often result
> > ;                     from a bug in your code, but it's possible that it was
> > ;                     intentional (e.g., using an uninitialized variable and
> > ;                     relying on the fact it's automatically initialized to an
> > ;                     empty string)
> > ; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
> > ; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
> > ;                     initial startup
> > ; E_COMPILE_ERROR   - fatal compile-time errors
> > ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
> > ; E_USER_ERROR      - user-generated error message
> > ; E_USER_WARNING    - user-generated warning message
> > ; E_USER_NOTICE     - user-generated notice message
> > ;
> > ; Examples:
> > ;
> > ;   - Show all errors, except for notices
> > ;
> > error_reporting = E_ALL & ~E_NOTICE
> > ;
> > ;   - Show only errors
> > ;
> > ;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
> > ;
> > ;   - Show all errors except for notices
> > ;
> > error_reporting  =  MAMP_error_reporting_MAMP
> 
> You overwrite the settings, remove the one you have added and use the 
> 'E_ALL & ~E_NOTICE' only.
> 
> 
> > display_errors = MAMP_display_errors_MAMP
> > display_startup_errors = MAMP_display_startup_errors_MAMP
> > log_errors = MAMP_php_log_errors_MAMP
> 
> Use 'On' or 'Off' as option
> 
> 
> > ; Set maximum length of log_errors. In error_log information about the source is
> > ; added. The default is 1024 and 0 allows to not apply any maximum length at all.
> > log_errors_max_len = 1024
> >
> > ; Do not log repeated messages. Repeated errors must occur in same file on same
> > ; line until ignore_repeated_source is set true.
> > ignore_repeated_errors = Off
> >
> > ; Ignore source of message when ignoring repeated messages. When this setting
> > ; is On you will not log errors with repeated messages from different files or
> > ; sourcelines.
> > ignore_repeated_source = Off

I don't understand you.  Are you saying to turn off the mamp related error display settings?  It does make it really confusing.
 I dont' think I am getting any errors right now because I just commented out a required file in the index page and I didn't get any errors  displayed?   I also read in the manual that if a script switches users then 
it will not write to the error log.  I deleted the error log and created another one.  That has a different user.  The permissions to the diredtory are 777.


; error_reporting is a bit-field.  Or each number up to get desired error
; reporting level
 ;E_ALL             - All errors and warnings
; E_ERROR           - fatal run-time errors
; E_WARNING         - run-time warnings (non-fatal errors)
; E_PARSE           - compile-time parse errors
; E_NOTICE          - run-time notices (these are warnings which often result
;                     from a bug in your code, but it's possible that it was
;                     intentional (e.g., using an uninitialized variable and
;                     relying on the fact it's automatically initialized to an
;                     empty string)
; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
;                     initial startup
; E_COMPILE_ERROR   - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR      - user-generated error message
; E_USER_WARNING    - user-generated warning message
; E_USER_NOTICE     - user-generated notice message
;
; Examples:
;
;   - Show all errors, except for notices
;
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;
;   - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
;   - Show all errors except for notices
;
error_reporting  =  MAMP_error_reporting_MAMP

; Print out errors (as a part of the output).  For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below).  Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = MAMP_display_errors_MAMP

; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed.  It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = MAMP_display_startup_errors_MAMP

; Log errors into a log file (server-specific log, stderr, or error_log (below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = MAMP_php_log_errors_MAMP

; Set maximum length of log_errors. In error_log information about the source is
; added. The default is 1024 and 0 allows to not apply any maximum length at all.
log_errors_max_len = 1024

; Do not log repeated messages. Repeated errors must occur in same file on same
; line until ignore_repeated_source is set true.
ignore_repeated_errors = Off

; Ignore source of message when ignoring repeated messages. When this setting 
; is On you will not log errors with repeated messages from different files or
; sourcelines.
ignore_repeated_source = Off

; If this parameter is set to Off, then memory leaks will not be shown (on
; stdout or in the log). This has only effect in a debug compile, and if 
; error reporting includes E_WARNING in the allowed list
report_memleaks = On

; Store the last error/warning message in $php_errormsg (boolean).
track_errors = On

[toc] | [prev] | [next] | [standalone]


#15426

Fromjans <janis.rough@gmail.com>
Date2015-06-06 00:59 -0700
Message-ID<fe3845c3-7b35-48c9-a85e-f3d4e124d855@googlegroups.com>
In reply to#15424
On Saturday, June 6, 2015 at 12:33:27 AM UTC-7, J.O. Aho wrote:
> On 06/06/15 03:31, jans wrote:
> 
> 
> > All of my error settings in php.ini
> > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> > ; Error handling and logging ;
> > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> >
> > ; error_reporting is a bit-field.  Or each number up to get desired error
> > ; reporting level
> > ;  E_ALL             - All errors and warnings
> > ; E_ERROR           - fatal run-time errors
> > ; E_WARNING         - run-time warnings (non-fatal errors)
> > ; E_PARSE           - compile-time parse errors
> > ; E_NOTICE          - run-time notices (these are warnings which often result
> > ;                     from a bug in your code, but it's possible that it was
> > ;                     intentional (e.g., using an uninitialized variable and
> > ;                     relying on the fact it's automatically initialized to an
> > ;                     empty string)
> > ; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
> > ; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
> > ;                     initial startup
> > ; E_COMPILE_ERROR   - fatal compile-time errors
> > ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
> > ; E_USER_ERROR      - user-generated error message
> > ; E_USER_WARNING    - user-generated warning message
> > ; E_USER_NOTICE     - user-generated notice message
> > ;
> > ; Examples:
> > ;
> > ;   - Show all errors, except for notices
> > ;
> > error_reporting = E_ALL & ~E_NOTICE
> > ;
> > ;   - Show only errors
> > ;
> > ;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
> > ;
> > ;   - Show all errors except for notices
> > ;
> > error_reporting  =  MAMP_error_reporting_MAMP
> 
> You overwrite the settings, remove the one you have added and use the 
> 'E_ALL & ~E_NOTICE' only.
> 
> 
> > display_errors = MAMP_display_errors_MAMP
> > display_startup_errors = MAMP_display_startup_errors_MAMP
> > log_errors = MAMP_php_log_errors_MAMP
> 
> Use 'On' or 'Off' as option
> 
> 
> > ; Set maximum length of log_errors. In error_log information about the source is
> > ; added. The default is 1024 and 0 allows to not apply any maximum length at all.
> > log_errors_max_len = 1024
> >
> > ; Do not log repeated messages. Repeated errors must occur in same file on same
> > ; line until ignore_repeated_source is set true.
> > ignore_repeated_errors = Off
> >
> > ; Ignore source of message when ignoring repeated messages. When this setting
> > ; is On you will not log errors with repeated messages from different files or
> > ; sourcelines.
> > ignore_repeated_source = Off

Is this what you meant?
Its still not working.  I dont' want to hose my Mamp Pro.

; error_reporting is a bit-field.  Or each number up to get desired error
; reporting level
 ;E_ALL             - All errors and warnings
; E_ERROR           - fatal run-time errors
; E_WARNING         - run-time warnings (non-fatal errors)
; E_PARSE           - compile-time parse errors
; E_NOTICE          - run-time notices (these are warnings which often result
;                     from a bug in your code, but it's possible that it was
;                     intentional (e.g., using an uninitialized variable and
;                     relying on the fact it's automatically initialized to an
;                     empty string)
; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
;                     initial startup
; E_COMPILE_ERROR   - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR      - user-generated error message
; E_USER_WARNING    - user-generated warning message
; E_USER_NOTICE     - user-generated notice message
;
; Examples:
;
;   - Show all errors, except for notices
;
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;
;   - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
;   - Show all errors except for notices
;
error_reporting  = On

; Print out errors (as a part of the output).  For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below).  Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = On

; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed.  It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = On

; Log errors into a log file (server-specific log, stderr, or error_log (below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = On

; Set maximum length of log_errors. In error_log information about the source is
; added. The default is 1024 and 0 allows to not apply any maximum length at all.
log_errors_max_len = 1024

; Do not log repeated messages. Repeated errors must occur in same file on same
; line until ignore_repeated_source is set true.
ignore_repeated_errors = Off

; Ignore source of message when ignoring repeated messages. When this setting 
; is On you will not log errors with repeated messages from different files or
; sourcelines.
ignore_repeated_source = Off

; If this parameter is set to Off, then memory leaks will not be shown (on
; stdout or in the log). This has only effect in a debug compile, and if 
; error reporting includes E_WARNING in the allowed list
report_memleaks = On

; Store the last error/warning message in $php_errormsg (boolean).
track_errors = On

; Disable the inclusion of HTML tags in error messages.
;html_errors = Off

[toc] | [prev] | [next] | [standalone]


#15427

From"J.O. Aho" <user@example.net>
Date2015-06-06 16:13 +0200
Message-ID<ctgdfvFh0l5U1@mid.individual.net>
In reply to#15426
On 06/06/15 09:59, jans wrote:

> Is this what you meant?

Yes

> Its still not working.


Did you restart the web server service after you changed?

Are you sure you are editing the php.ini which is used?

[toc] | [prev] | [next] | [standalone]


#15428

Fromjans <janis.rough@gmail.com>
Date2015-06-06 07:20 -0700
Message-ID<e3be935d-45ff-4252-bf71-82ed735a72c8@googlegroups.com>
In reply to#15427
On Saturday, June 6, 2015 at 7:13:28 AM UTC-7, J.O. Aho wrote:
> On 06/06/15 09:59, jans wrote:
> 
> > Is this what you meant?
> 
> Yes
> 
> > Its still not working.
> 
> 
> Did you restart the web server service after you changed?
> 
> Are you sure you are editing the php.ini which is used?

Hey good morning  thanks I was going to reinstall mamp then I just tried reinstall the mamp php version i need didn't help the log.  THen I was going to uninstall mamp pro but it suggested I just revert back to factory settings.  I tried that and it worked.    I was reading in the manual and I think what happened is when you write to the log from another user then it never writes to the log again.  Not sure how I changed users but I think that is what happened.  It would not write to the log  or display errors.  
It could be a setting was off but I had them all turned on.  In any case it works now.

[toc] | [prev] | [next] | [standalone]


#15430

Fromjans <janis.rough@gmail.com>
Date2015-06-06 07:21 -0700
Message-ID<45763b43-f5fa-4fe1-ae78-75f9e70531b4@googlegroups.com>
In reply to#15428
On Saturday, June 6, 2015 at 7:20:49 AM UTC-7, jans wrote:
> On Saturday, June 6, 2015 at 7:13:28 AM UTC-7, J.O. Aho wrote:
> > On 06/06/15 09:59, jans wrote:
> > 
> > > Is this what you meant?
> > 
> > Yes
> > 
> > > Its still not working.
> > 
> > 
> > Did you restart the web server service after you changed?
> > 
> > Are you sure you are editing the php.ini which is used?
> 
> Hey good morning  thanks I was going to reinstall mamp then I just tried reinstall the mamp php version i need didn't help the log.  THen I was going to uninstall mamp pro but it suggested I just revert back to factory settings.  I tried that and it worked.    I was reading in the manual and I think what happened is when you write to the log from another user then it never writes to the log again.  Not sure how I changed users but I think that is what happened.  It would not write to the log  or display errors.  
> It could be a setting was off but I had them all turned on.  In any case it works now.

handy feature in Mamp pro.  Worth the 60.00.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.php


csiph-web