-
-
Laravel 5.5 project cannot work on shared host
Hello all, I managed to find out the error, with some help from the techs at my hosting server. The error message is: Warning: require(/home/domain/subdomain.com/vendor/composer/../symfony/var-dumper/Resources/functions/dump.php): failed to open stream: No such file or directory in /home/domian/subdomain.com/vendor/composer/autoload_real.php on line 66 Where domain is my domain name and subdomain.com is where my Laravel 5.5 project is stored. And on line 66 of autoload is: if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; <- line 66 $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; If anyone can help then it will be much appreciated. Thanks in advance.
-
Laravel 5.5 project cannot work on shared host
Thanks Elite, Just implemented both .htaccess files, one in the root and the other in my public_html folder, (changed from public), this folder holds the index.php. I've changed the index.php back to its original format, the one that works on my localhost. I'm getting a white screen with no error message now. I've checked my laravel.log file for error messages but it's still not writing to it even though the read, write, execute permissions are all set. Just out of interest. I've changed my database settings in the .env file to the settings on my live server but do you have to change anything else inside the .env file? I've also looked in the app.php and set the URL to: 'url' => env('APP_URL', 'http://wwwmysite.com'), I changed the APP_URL inside the .env file to match my domain name and still there are no error messages displayed. If you can let me know what files I have to change in order to get the site to work then that would be great thanks.
-
Laravel 5.5 project cannot work on shared host
Hello all, I'm new to Laravel and I've just finished my first project using this MVC. I copied the files over to my live server and saved my files inside these folders so that they where in the exact same position as they where on my testing server: <mysite.com> <app> <bootstrap> <cgi-bin> <etc....> <public_html> I'm using Laravel 5.5. The only folder I changed was the 'public' to 'public_html' and I stored all of the files inside the folder, for example, index.php, robots.txt and web.config. I moved my .htaccess to the root folder, <mysite.com> I then changed my index.php with the line: ini_set('eaccelerator.enable', 0); at the beginning of the file. I've also tried changing the lines: require __DIR__.'/../vendor/autoload.php'; to: require __DIR__.'/../mysite.com/vendor/autoload.php'; and $app = require_once __DIR__.'/../bootstrap/app.php'; to $app = require_once __DIR__.'/../mysite.com/bootstrap/app.php'; the mysite folder being the folder my files are stored in, but the site still displays the same error message. I also changed my server.php file : if ($uri !== '/' && file_exists(__DIR__.'/public_html'.$uri)) { return false; } and the line: require_once __DIR__.'/public_html/index.php'; As you can see both lines pointed to the public folder, and now they point to the public_html folder I have changed the code so many times, including changing the index.php to the root, adding code to the bootstrap > app.php , (As I read every Laravel tutorial on the Internet, but I still get this error message: 'Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at webmaster@mysite.com to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.' And the Apache error log displays: 'AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace.' My .htaccess file looks like this: <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.mysite\.com RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ ^$1 [N] RewriteCond %{REQUEST_URI} (\.\w+$) [NC] RewriteRule ^(.*)$ public_html/$1 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ server.php </IfModule> I've changed the permissions to full read, write access as all of the online tutorials have stated to the vendor, bootstrap and logs folders but the laravel.log isn't being written to. As I've mentioned I'm using Laravel 5.5. If anyone knows how to fix this problem then any help would be appreciated. Thanks in advance.
-
HTTPS won't display some of my graphics.
Thanks Rallport, I've changed the base_url a number of times to different paths '/' being one of them, and none of them have worked. I'm going to have to check my server configuration to resolve this problem.
-
Ajax POST request doesn't work with HTTPS
Hello all, I've recently updated to HTTPS and I've found that my Ajax functions are not working. At first I got a CORS error message but I've managed to pick up a couple of lines of code from web forums that have had the same problem and the error message has changed to a 403 error message, (meaning that the file is forbidden), which is interesting as since upgrading to HTTPS my site sometimes can't find, or is not accessing some of my images and/or files. Therefore it might be my .htaccess file, (I used to have a basic .htaccess file when the site was HTTP but I've had to google .htaccess with HTTPS). Here's my .htaccess file: Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} !^www\. [OR] RewriteCond %{HTTP_HOST} ^mysite.com\.com$ [NC] RewriteRule ^ https://www.mysite.com%{REQUEST_URI} [R=301,L,NE] RewriteCond %{THE_REQUEST} ^[A-Z]+\ /index\.php(/[^\ ]*)?\ HTTP/ RewriteRule ^index\.php(/(.*))?$ mysite.com/$2 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [PT,L] It's possible that this file is responsible for not allowing my site to access certain files and images. I've also added the snippet of my Ajax request here, (just in case there's something wrong with the function: $.ajax({ url: "/my_php_file/my_function", crossDomain: true, contentType: "application/x-www-form-urlencoded", xhrFields: { withCredentials: true }, headers: { 'Access-Control-Allow-Origin': '*' }, type: 'POST', async:false, data: data, success: function(msg) { alert('success'); } }); I've tried adding the following and/or changing the following lines of code but it still doesn't work: url: "/my_php_file/my_function/", url: "https://www.mysite.com/my_php_file/my_function", dataType: 'jsonp', dataType: 'json', dataType: 'html', The above lines are code I've added, (they've not been added all together), but it's just so everyone knows what different permutations I've tried. It's a good possibility that it's the .htaccess file as some of my images and files don't work, or both so can anyone can help out on both or either? Thanks in advance.
-
What is the best way to change to https using CodeIgniter 2.2?
Sorry guys! Can't see the wood for the trees! Simply change the line in the config.php file to: $config['base_url'] = 'https://yourdomain.com/'; After getting the new SSL certificate!
-
What is the best way to change to https using CodeIgniter 2.2?
Hello all, I've upgraded my site to https using this snippet of code in my config.php file, (CodeIgniter 2.2). $root=(isset($_SERVER['HTTPS']) ? "https://" :"http://".$_SERVER['HTTP_HOST']); $root.= str_replace(basename($_SERVER['SCRIPT_NAME']),'',$_SERVER['SCRIPT_NAME']); $config['base_url'] = $root; The code works fine, however, I had to delete all of my base_url() and site_url() functions and change them to a simple backslash. It's a large site so it took my a while to do. Does anyone know if there's a way to change your site to https without having an effect on your sit_url and base_url functions? Thanks in advance.
-
HTTPS won't display some of my graphics.
Hi Nock, Thanks for the reply but that's not the case. The src is https://, but I'll try the // and see if that works.
-
HTTPS won't display some of my graphics.
Hello all, I'm having a problem with my CodeIgniter project. I updated my site to http using codeigniter, (not by changing the .htaccess file). The HTTPS is fine, the little green padlock is showing next to my URL, however, some of my graphics are not showing as well and my ckeditor is no longer working. Everything was fine before the change to HTTPS. I've tried absolute and relative paths to my files, but some of them don't work, while others, that use the same path are working. Does anyone know what is causing this? Do I need to change a few lines of code in my .htaccess file? Or do I need to get a new SSL certificate? (I got my last SSL certifiacte a couple of weeks ago, before I changed to HTTPS). Any help please? Thanks in advance.
-
Zend 'use' function' does not work
Hello all, I'm currently working on a project using php 5.5.12 and SOAP and I've found an interesting discrepency. If you use the following code below the framework will throw an exception stating that it cannot find the file, (even though it is there: use Zend\Soap\AutoDiscover; However, when you change the line to the code below: require 'Zend\Soap\AutoDiscover.php'; The file is found and everything works fine. I was wondering is there a line in the php.ini file or anyother file in wamp that allows you to use the 'use Zend\Soap\AutoDiscover;' method over the 'require' method? Thanks in advance
-
Setting up laravel with Homestead on WAMP
Thanks, I'm new to Laravel and I simply read a couple of installation tutorials and it didn't say there was a choice. I've tried just using composer and wamp but it still isn't working. I've found out that my version of wamp doesn't recvognise my new version of php, (even though the new version of php it is being displayed on my wamp dasboard when I type phpinfo() it's still displays the older version). And as Laravel needs php5.5 and higher it must be that. I'm going to fix my version of wamp instead. Thanks for the reply, you've both saved me a lot of time.
-
WAMP 2.2 does not recognise PHP5.6.29
Hello all, I'm trying to install PHP5.6.9 on my wamp 2.2 as the old version of php does not support magento or laravel. I've copied the new php folder inside the php folder stored inside wamp and changed the php.ini to include: the extension_dir = "c:/wamp/bin/php/php5.6.29/ext/" and the zend_extension = "c:/wamp/bin/php/php5.6.29/zend_ext/php_xdebug-2.1.2-5.3-vc9.dll" I've also changed the .httpd.conf to include: LoadModule php5_module "c:/wamp/bin/php/php5.6.29/php5apache2_2.dll" I also copied the phpForApache.ini and changed that extension_dir = "c:/wamp/bin/php/php5.6.29/ext/" Although I had to copy the phpapache2_2.dll from my older version as the new version did not include it and restarted wamp. When I clicked on the wamp icon and checked the version, I found two versions, the old and the new. By clicking on the new version wamp restarted and the new version was checked. I typed in phpinfo(); to check if the new version worked and found that the page stated php5.3.8 was running. I checked the wamp again and the version php5.6.29 was still checked. Can anyone help? Thanks in advance.
-
Setting up laravel with Homestead on WAMP
Hello all, I'm new to Laravel and I'm trying to set it up with my WAMP server. I've downloaded composer and vagrant as well as homestead I've installed them using the cmd line and I've generated my private and public keys. When I get to the stage were I open homestead.yaml and type in where my 'virtualboxauthorize' , 'keys' and 'folders' are I can't seem to get it. I've updated the following: virtualboxauthorize: c:/Users/User/.homestead/id_rsa.pub The .homestead folder is located inside the 'User' folder. keys: - c:/Users/User/.homestead/id_rsa Again the .homestead folder is situated inside my 'User'. Although I have my key files saved using PuTTY Key generator application in a different place. Do I have to save them in a specific folder? folders: - map: c:/wamp/www/laravel/myproject/public to: /home/vagrant/Code Where the map points to the public folder where the index.php file is located on my wamp server. I've then typed in 'homestead up' in my cmd line and restarted my server but the line 'No input file specified.' is still present rather than the splash page. Can anyone help? Thanks in advance.
-
-
How to convert a string to an array, (read from a file)
Thanks. I've just inserted the explode function into my other function that outputs the table. You're right it works fine. I put the explode function into my foreach loop and it only read the first element as all I was reading was the first element, (line), but when I inserted it into my other function and typed var[0], var[1] and var[2] it works fine thanks.
-
How to convert a string to an array, (read from a file)
It doesn't work. I've even hard coded the 'John@yahoo.com:7:8.35' assigned to the variable to make sure it wasn't data from the file but all it does is get rid of anything after the ':' so all you get is the email address everything after it is ignored. Thanks anyway. I'm going to try a nested foreach and see if that works.