This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~php -i | grep 'php.ini' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/SublimeLinter/base16-ocean.dark (SL).tmTheme", | |
"detect_indentation": false, | |
"detect_slow_plugins": false, | |
"ensure_newline_at_eof_on_save": true, | |
"font_options": | |
[ | |
"gray_antialias", | |
"subpixel_antialias" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Check using which php. This should tell you which is being used. | |
For a more direct solution to the problem: | |
Rename the OLD version of PHP | |
> sudo mv /usr/bin/php /usr/bin/php5424 | |
Create a Symbolic link for your new version of php so it can live in /usr/bin | |
> sudo ln -s /usr/local/php5/bin/php /usr/bin/php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When I realized this was only happening in IE and Chrome, but not Firefox, it led me to the fix. | |
The app was using AddThis share buttons and the javascript was adding an iframe to the pages. | |
This issue is resolved by adding a P3P header to the VerifyCsrfToken Middleware. Hope this saves somebody the hours I lost. | |
<?php | |
public function handle($request, Closure $next) | |
{ | |
$response = $next($request); | |
if (last(explode('\\',get_class($response))) != 'RedirectResponse') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$vi /etc/resolv.conf | |
# Clean all the content and add: | |
nameserver 8.8.8.8 | |
nameserver 8.8.4.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// emails/has-image.blade.php | |
Here's that image we talked about sending: | |
<img src="{{ $message->embed(storage_path('embed.jpg')) }}"> | |
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mail::send('emails.whitepaper', [], function ($m) { | |
$m->to('[email protected]'); | |
$m->subject('Your whitepaper download'); | |
$m->attach(storage_path('pdfs/whitepaper.pdf')); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REMOTE_ADDR} !^999\.99\.99\.99$ | |
RewriteCond %{REQUEST_URI} !/temp.html$ | |
RewriteRule .* /temp.html [R=302,L] | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just a reminder, before deploying your code in production, don't forget to optimize the autoloader: | |
$ composer dump-autoload --optimize | |
This can also be used while installing packages with the --optimize-autoloader option. Without that optimization, you may notice a performance loss from 20 to 25%. | |
http://www.ricardclau.com/2013/03/apc-vs-zend-optimizer-benchmarks-with-symfony2/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo preg_replace("$^http[s]?:\/\/$", "", $url); |
NewerOlder