Jump to content

root@localdomain

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

root@localdomain's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for your suggestion. In the end I implemented the includes using the database of the application. So if you have a new plugin installed you need to run a scan script. It reads each subdirectory of plugins/ and gets a plugin info file. The include statement, the class name and the plugin name are read and put in the database. The admin gets a list of installed plugin and can enable them (uses a database column). When the user calls a page that uses plugins, the installed and enabled plugins are used/shown. So the plugin php page gets included (as is in the plugin info file) and an object is created using the name that is also retrieved from the plugin info file (and put in the database when scanning of course). Hope this helps anyone else that is trying to do the same.
  2. Hi all, I am working on php project and willing to use the "everything as a plugin" idea so alot of people can easily contribute. I am wondering how I can make a php page that includes my plugins, without having to hardcode them(as in require_once, ...). And afterwards it should be possible to execute a function on each of the enabled plugins. Especially the "hardcode" part I am not sure on how to fix it. As for executing a function for each plugin (so that will be a Class object), I wonder how I can make an object of each class from an interface and then execute a function without hardcoding the creation of all objects. Any one ideas or experience with something like this? Thanks in advance.
  3. I found what was causing the suppression of the error. I was reusing php code from someone else. The require_once function had a @ in front of the line. I googled and found out this suppresses error messages :s So this is fixed
  4. This morning a friend of mine used a simple piece of code. He got errors for non-existing functions that are called in a page that is required-in. Got to look further. I'll try and see if omitting any html output is messing things up. In my friends case he had no issues when using html code. (I only use very basic html to put a form there, and after that html table) I am pretty sure it is the correct page I am using as I changed the configuration to log to /var/log/php.log and normally errors are logged in there. Thanks anyway for your suggestion. I'll post back if I have an update or fix the issue.
  5. Thanks for your response. I already have these in my config. error_reporting = E_ALL display_errors = On So it should be something else:s
  6. Hi all, I recently started rewriting some code from an existing open source project. I noticed now, for the second time, that I got errors in a php file(the php file with errors was required_once into the main file) however they were not shown. note however that other errors seem to be shown properly in the browser and are logged. The behavior I get is that the page gets executed, the required page is loaded, and at the point that the statement is reached that is incorrect (for example calling a function that is not declared) it stops silently. Only the part that ran and sent output to the client is shown. Nothing is in the browser or in the logs about the error :S Eventually I found out by using XDebug to step through the code. At a certain function it just stopped. Anyone an idea what is wrong?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.