You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I consistently get this error on my local machine (OSX running MAMP with PHP 5.3.6) but do not have this problem on a different server running PHP 5.3.3. When I switch my local machine to use PHP 5.2.17 the issue also goes away. I suspect the issue isn't the PHP version, but rather something in the server configuration. However, the reported error message does not give me enough information to debug the problem. The fatal error in question is:
Fatal error: Cannot redeclare services_twilio_autoload() in /local/path/to/twilio.php on line 3
Line 3 is the first place Services_Twilio_autoload is defined, so I cannot figure out why it might be trying to redeclare itself.
The text was updated successfully, but these errors were encountered:
I was able to find where in my code I was triggering the problem. The project in question is using the CakePHP framework. At the spot where the Twilio code is included there were effectively two includes, the second of which triggered the error. The first used CakePHP's App::import() function, which apparently uses a "require" under the hood. The second was a require_once with a comment about how on the live server the previous statement was insufficient.
I am having the same issue doing the phone poll example. Any ideas why?
Fatal error: Cannot redeclare Services_Twilio_autoload() (previously declared in /var/www/html/youDunFoundIt/craigslister/lib/twilio-php/Services/Twilio.php:9) in /var/www/html/youDunFoundIt/craigslister/lib/twilio-php/Services/Twilio.php on line 9
I consistently get this error on my local machine (OSX running MAMP with PHP 5.3.6) but do not have this problem on a different server running PHP 5.3.3. When I switch my local machine to use PHP 5.2.17 the issue also goes away. I suspect the issue isn't the PHP version, but rather something in the server configuration. However, the reported error message does not give me enough information to debug the problem. The fatal error in question is:
Fatal error: Cannot redeclare services_twilio_autoload() in /local/path/to/twilio.php on line 3
Line 3 is the first place Services_Twilio_autoload is defined, so I cannot figure out why it might be trying to redeclare itself.
The text was updated successfully, but these errors were encountered: