Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6375227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:35:19+00:00 2026-05-25T01:35:19+00:00

I am running a PHP script on a OS X 10.6 Server via Terminal

  • 0

I am running a PHP script on a OS X 10.6 Server via Terminal like this:

cexa:~ soinro$ php /Volumes/dev1/cron/cron.php

And if the script has errors I get the output:

PHP Notice:  Use of undefined constant ccccc - assumed 'ccccc' in /Volumes/dev1/cron/cron.php on line 6
Notice: Use of undefined constant ccccc - assumed 'ccccc' in /Volumes/dev1/cron/cron.php on line 6
PHP Parse error:  syntax error, unexpected $end in /Volumes/dev1/http/~dev/_cron/cron.php on line 26
Parse error: syntax error, unexpected $end in /Volumes/dev1/http/~dev/_cron/cron.php on line 26

As you can see every notice / error is displayed twice: once as a “PHP Parse error” and once as a “Parse error”.

The file I call is /Volumes/dev1/cron/cron.php. If this file has an error I only get the “Parse error”, but if the files it requires have errors I get both the “PHP Parse error” and “Parse error” messages.

Why is this happening and how could I make it so that I get both messages (or just the ones without the “PHP Parse error”) all the time;

For the discussion’s sake here is the original code I call:

ini_set('display_errors', 1);
$crons = array_merge(glob("/Volumes/dev1/http/*/_cron/*"), glob("/Volumes/dev1/http/~dev/*/_cron/*"));
foreach ($crons as $cron):
/* there is only one file in the array */
require_once $cron;
endforeach;
/* this is the endforeach I leave out when I want an error in this file */

and here is the file it require_once‘s

$mails = $db->result("select * from newsletter where status = 'sending'");
/* there are 3 elements in $mails */
foreach ($mails as $mail):
echo 'x';
endforeach;
/* this is the endforeach I leave out when I want an error in this file */

Thanks so much!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:35:20+00:00Added an answer on May 25, 2026 at 1:35 am

    What is happening is that you have both display_errors and log_errors enabled.

    When log_errors is enabled, PHP writes errors in the file specified by the error_log ini setting (not to be confused with log_errors). If error_log is not set, the errors are wrote to stdout, that’s why you are seeing them twice.

    You have to either disable one of display_errors and log_errors; or to set error_log to some filename (or to syslog if you want to log to syslog).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a php script http://example.com/myapp/myscript.php running on an Apache server. I call this
I have some long-running CLI PHP scripts that run regularly via cron. I'd like
I'm running a php script from the command line against SQL server 2005 using
I have a PHP script (running on a Linux server) that ouputs the names
I am sending an NSData Object to the server script running PHP.Is it possible
There is this situation: Wampserver is running A PHP script is running (set_time_limit(0), endless
I've got a PHP script that my mail server is piping emails to via
The server my PHP script is running on is set to UTC. I can't
I am currently running a PHP script that queries the database and then sends
I have a PHP script running on XAMPP in Windows XP that will open

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.