Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Module "routing" working differently on live and local servers.
  • I've been working on an app for over a month or so now on a local environment with WAMP. Everything is running fine and as intended. Today I went to test it out on our live server and I'm running into some issues with module routing. Here's my issue: I create a module called "install" that does all the installation for the application - it is tested and works fine on localhost. This module contains a controller called install as well. On my localhost, I access this module via uri by going to localhost/project-folder/install and it loads the view and operates fine. I was told this is intended functionality by the devs and you shouldn't have to type in localhost/project-folder/install/install. Now, I try to do the same exact thing on our web server - except this is also on a subdomain. I got to sub.domain.com/project-fodler/install and I get a "No data received - Unable to load the webpage because the server sent no data. Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data" page - not a fuel error page. If i add the extra /install to the uri - it works fine though. My error logs are not showing anything and I have also tried setting the base url manually instead of fuel auto-detecting - getting the same results. Any ideas on what may be causing this?
  • Note to self, copying and pasting code from the documentation into a new .php file, and forgetting there is no <?php at the top of the file for two hours may cause a hard to trace segmentation fault in Apache, and a segfault in your heart. Problem
    - In Google Chrome "Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data."
    - No PHP errors, due to Apache dying before anything is sent back to the browser
    - In Apache logs, this not helpful message "Error [notice] child pid 19647 exit signal Segmentation fault (11)" Solution
    Double check there is an opening <?php (duh!) or any other silly, rookie syntax mistakes.
  • Looks like its an issue with our server.. tested and works fine on 2 other servers with the same fuel setup - trying to find out what server settings could be causing this now...
  • Turns out we're getting "child pid 4305 exit signal Segmentation fault (11)" - anyone have any experience with these types of notices?
  • So we found the line of code that is producing the segfault for us.. it is
    if (class_exists(ucfirst($match->module).'\\Controller_'.ucfirst($match->directory).'_'.ucfirst($match->controller)))
    
    In the Router class (core/classes/router.php) line 135 of version 1.0. When calling a module without a "directory" we get a segfault from calling a class with 2 underscores ... Controller__Test .. but Controller_Test and Controller_Test_Test both work fine. I've tested on another server with the same php version and the double underscores are still there and works fine though. Is there a reason for the double underscore?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion