Everything posted by Dredd2000
-
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.
-
How to convert a string to an array, (read from a file)
Hello all, I'm currently converting text from a file and then converting it to an array to display in my browser. I can get the data from the file and using a foreach loop I can convert it into an array, however, I need to convert each word into an array. At the moment I can only convert each line into an array, this line needs to be split up into a name, number and price. For example here's some sample data: John@yahoo.com:7:8.35 Fred@hotmail.com:4:5.59 geoff@gmail.com:3:9.29 I can convert each line in an array but each element must be inserted into its own td inside a table. At the moment I can put each line into a table row but I need to split each element up to: <td>John@yahoo.com</td><td>7</td><td>8.35 at the moment my output is: <td>John@yahoo.com7:8.35</td> Here's a snippet of my code: function display_data($data) { $fh = fopen($data, "r") or die("Unable to open file!"); $content = fread($fh, filesize($data)); $assoc_array = array(); $my_array = explode("\n", $content); sort($my_array); foreach($my_array as $key => $value) { if(is_array($data)) { get_file($value); } elseif(is_object($data)) { get_file($value); } else { $tmp = explode(" ", $value); $tmp = str_replace(array("#",":")," ",$tmp); $assoc_array[$tmp[0]] = $tmp[0]; $this->display_array($assoc_array[$tmp[0]]); } } fclose($fh); } the display_array is simply another function that outputs the code into a table. I know it has to be a explode, preg_split or preg_replace but my reg expression isn't great. Any help? Thanks in advance.
-
How to change the height of an iframe after the page has loaded jquery
I was thinking of that last night. I may need to implement an event handler to fire when the user clicks on the accordian it'll automatically get the height of the child document and create the correct height for the iframe.
-
How to change the height of an iframe after the page has loaded jquery
Hello all, I've been googling for a couple of hours now and have tried a variety of code snippets and changed some snippets to suit my web page but none of them work. I need to change the height of my iframe to fit the content, (that changes dynamically). The other problem is that the iframe is embedded inside a jquery accordian. that is when you click on the button the accordian scrolls down to reveal the iframe. Therefore a window.onload will not work. the closest I've got is to reveal part of the content. Can anyone help? Thanks in advance.
-
File upload does not retrieve name of file codeigniter
Thanks for replying Nock but I've tried the suggested code but it still doesn't seem to pick up the file at all, (it still goes into the if function), as there's no file. I'll keep trying different methods.
-
File upload does not retrieve name of file codeigniter
Hello all, I'm using CodeIgniter and I'm attempting to upload video files. Here's my snippet of code for the view: <input type="file" name="userfile" class="userfile" /> And here's the snippet of code for the controller: $file_name = $_FILES['userfile']['tmp_name']; if(filesize($file_name) == 0) { exit('File does not exist!'); return FALSE; } I have an exact similair piece of code for my upload images file and it works fine, however, my video file upload just does not retrieve the file name or file size. I've googled everywhere but I can't find any answers to this problem. Can anyone help? Thanks in advance.
-
WAMP or HTML5 won't allow me to view embedded video or music files
I've tested an mp4 file with the same type attribute. I'm simply testing at the moment. when it works with the same file type I'm going to design a function that reads the file type of the file uploaded and then outputs an embedded audio or video object that works with that specific file. I've tested an mp4 file with it but it simply displays the same message. I'll keep googling to see if I can find a solution. Thanks.
-
WAMP or HTML5 won't allow me to view embedded video or music files
I've restarted my server a couple of times. I've pretty much tried every HTML tag there is. I've searched google and copied the HTML tags into my web page. Here's one I'm trying at the moment: <video controls> <source src="<?php echo base_url($my_vid_2); ?>" type='video/webm;codecs="vp8, vorbis"'/> <source src="<?php echo base_url($my_vid_2); ?>" type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"'/> </video> The base_url() function simply displays the variable $my_vid_2. This variable is the address where the file is kept.
-
WAMP or HTML5 won't allow me to view embedded video or music files
Hello all, I've designed a controller that uploads videos from a file field into a folder on my WAMP server. However, when I try to display it in my web page I'm confronted with a message stating 'NO VIDEO WITH SUPPORTED MIME TYPE FOUND'. I've tried every plugin on every browser but I'm still getting the same message. I've even tried every HTML tag for video but none of them work. I've added these lines to my .htaccess file: AddType video/mp4 mp4 m4v AddType audio/mp4 m4a AddType video/ogg ogv AddType audio/ogg ogg oga AddType video/webm webm But my browsers still doesn't display them and I still get the same message. The files are uploaded to the folder safely so it can't be the files. Does anyone know if this is a server or browser issue? Or a bit of both? Like I've said I've tried embedding the video in every type of HTML5 tag but it still won't play. Can anyone help? Thanks in advance.
-
How best do you utilize bing and google web master tools?
Hello all, I was just wondering. I've designed my site using HTML5 and CSS3 and I've checked both google and bing web master tools and they both state my mark up has no faults, but I was wondering how to keep maintain my SEO in order for both google and bing keep ranking my site. My site also includes dynamic content. Does anyone know how to maintain ranking for dynamic content as well? Are there any free SEO tools that I can use to maintain this ranking or does google and bing automatically maintain my rank? I'm new to SEO so if there aren't any free tools aout there how can I utilize google and bing to their best advantage? Thanks in advance.
-
Free SEO tools?
Hello all, I was just wondering. I've designed my site using HTML5 and CSS3 and I've checked both google and bing web master tools and they both state my mark up has no faults, but I was wondering how to keep maintain my SEO in order for both google and bing keep ranking my site. Are there any free SEO tools that I can use to maintain this ranking or does google and bing automatically maintain my rank? I'm new to SEO so if there aren't any free tools aout there how can I utilize google and bing to their best advantage? Thanks in advance.