Mounir Fasi
-
المساهمات
19 -
تاريخ الانضمام
-
تاريخ آخر زيارة
نوع المحتوى
ريادة الأعمال
البرمجة
التصميم
DevOps
التسويق والمبيعات
العمل الحر
البرامج والتطبيقات
آخر التحديثات
قصص نجاح
أسئلة وأجوبة
كتب
دورات
أجوبة بواسطة Mounir Fasi
-
-
بتاريخ 9 ساعات قال Wael Aljamal:
*** ربما تحتاج للخطوة التالية ****
لديك مشكلة صلاحية في مجلد الجذر للمشروع، عليك تنفيذ الأوامر التالية إما من محرر أوامر الاستضافة إن وجد أو استعمل اتصال SSH سيمكنك من تنفيذ هذه الأوامر لتغيير الصلاحيات على المجلدات والملفات (ربما يمكنك عملها من لوحة التحكم ولكن لا أعلم إن كانت ممكنة)
// استبدل المسار ل root المشروع sudo chown -R www-data:www-data /path/to/laravel sudo find /path/to/laravel -type f -exec chmod 644 {} \; sudo find /path/to/laravel -type d -exec chmod 755 {} \; cd /path/to/laravel sudo chgrp -R www-data storage bootstrap/cache sudo chmod -R ug+rwx storage bootstrap/cache
إتاحة جميع الصلاحيات بغرض التجربة:
sudo chmod -R 777 /"your files location" المسار للمجلد الجذر
أخي موجه الأوامر غير موجود في استضافة عندي.
عندما اقوم برفع سكربت أصلي على استضافة وادخل الى رابط الموقع ادخل مباشرة الى مرحلة تنصيب سكربت بشكل عادي وعند الإنتهاء من تنصيب السكربت يعمل الموقع بشكل عادي لكن عندما ارفع النسخة التي كنت اعمل عليها بالـ localhost لا يعمل الموقع وعندما اقوم بتفحص جميع ملفات السكربت أصلي بدون تعديلات اجد نفس اعدادات والمسارات الموجوده بالملفات الاخرى بالنسخة التي كنت اشتغل عليها.
هل يمكن ان يكون المشكل بملف server.php ?
<?php /** * Laravel - A PHP Framework For Web Artisans * * @package Laravel * @author Taylor Otwell <taylor@laravel.com> */ $uri = urldecode( parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ); // This file allows us to emulate Apache's "mod_rewrite" functionality from the // built-in PHP web server. This provides a convenient way to test a Laravel // application without having installed a "real" web server software here. if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { return false; } require_once __DIR__.'/public/index.php';
-
-
-
بتاريخ منذ ساعة مضت قال Wael Aljamal:
ربما هنالك مشكلة في الملفات المؤقتة، حيث يمكن تنفيذ التعليمة التالية في مجلد المشروع
php artisan optimize:clear
في مدير الأوامر cmd ثم حاول مجدداً رفع المشروع (اعمل نسخة عن الملفات التي عدلها مثل env.)
وفك ضغط الملف المضغوط في publlic_html مباشرة
قمت بتنفيذ الأمر لكن دون جدوى
كيف يمكنني حدف الـ cache من cpanel
او اين يوجد مسار ملف cache علما انه غير موجود بداخل ملف مجلد bootstrap\cache
-
بتاريخ 59 دقائق مضت قال Wael Aljamal:
إن كلمة project تمثل فرقا في المسارات بين البيئة المحلية والاستضافة، تأكد من ذلك
project هو اسم مجلد المشروع على localhost داخل htdocs
-
بتاريخ منذ ساعة مضت قال Wael Aljamal:
هل من الممكن انك تطلب رابط خطأ؟ حاول Domain/public/index.php
نفس المشكلة أخي
ملف الـ index.php موجود على المسار public_html/index.php كما فيlocalhost htdocs/Project/index.php
-
-
-
بتاريخ منذ ساعة مضت قال Ziyad Hasan:
طبعا يجب وضع بيانات القاعده في env. واترك ملف database.php كما كان في localhost
للأسف قمت بالتعديل على ملف env. واعدت التعديل على ملف database.php كما كان على loclhost ولا تزال نفس المشكلة الموقع لا يعمل
This page isn’t working is currently unable to handle this request. HTTP ERROR 500
-
بتاريخ 15 ساعات قال Ziyad Hasan:
-
اولا انقل ملف index.php لمجلد public وضع به هذا الكود
<?php /** * Laravel - A PHP Framework For Web Artisans * * @package Laravel * @author Taylor Otwell <taylor@laravel.com> */ define('LARAVEL_START', microtime(true)); /* |-------------------------------------------------------------------------- | Register The Auto Loader |-------------------------------------------------------------------------- | | Composer provides a convenient, automatically generated class loader for | our application. We just need to utilize it! We'll simply require it | into the script here so that we don't have to worry about manual | loading any of our classes later on. It feels great to relax. | */ require __DIR__.'/../vendor/autoload.php'; /* |-------------------------------------------------------------------------- | Turn On The Lights |-------------------------------------------------------------------------- | | We need to illuminate PHP development, so let us turn on the lights. | This bootstraps the framework and gets it ready for use, then it | will load up this application so that we can run it and send | the responses back to the browser and delight our users. | */ $app = require_once __DIR__.'/../bootstrap/app.php'; /* |-------------------------------------------------------------------------- | Run The Application |-------------------------------------------------------------------------- | | Once we have the application, we can handle the incoming request | through the kernel, and send the associated response back to | the client's browser allowing them to enjoy the creative | and wonderful application we have prepared for them. | */ $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); $response = $kernel->handle( $request = Illuminate\Http\Request::capture() ); $response->send(); $kernel->terminate($request, $response);
ثم ضع هذا الكود في ملف htaccess.
<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ public/$1 [L] </IfModule>
لا يعمل أخي جربت اضافة الكود في ملف htaccess ونقل ملف index.php لمجلد public
عدلت على require __DIR__.'/../vendor/autoload.php'; و
$app = require_once __DIR__.'/../bootstrap/app.php';
نفس المشكلة الخطأ السابق 403 Forbidden
هل من الضروري وضع بيانات القاعدة في .env ام ملف فقط في ملف database.php الموجود داخل مجلد config ?
-
اولا انقل ملف index.php لمجلد public وضع به هذا الكود
-
-
-
-
بتاريخ منذ ساعة مضت قال Ziyad Hasan:
الكود ناقص جرب مره اخري
<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ public/$1 [L] </IfModule>
نفس المشكلة والكود كما هو موجود تم وضعه
Internal Server Error
-
بتاريخ منذ ساعة مضت قال Ziyad Hasan:
نعم
الكود لا يعمل أخي تظهر رسالة
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@info.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.
-
بتاريخ منذ ساعة مضت قال Wael Aljamal:
يوجد شروحات سابقة لنفس المشكلة يمكن أن تجدها في الرابط:
شكرا لك, لكن ليست نفس المشكلة انا لم اضع مجلد المشروع بدومين فرعي
-
بتاريخ منذ ساعة مضت قال Ziyad Hasan:
اسهل طريقه ان تترك كل ملف في مكانه و تقوم بوضع جميع ملفات المشروع في public_html ثم تقوم بانشاء ملف جديد htaccess. داخل المجلد public_html وتضع به هذا الكود
<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ public/$1 [L] </IfModule
أهلا بك أخي,
لكن ملف .htaccess موجود سابقا بالـ public_html
هل أقوم بستبدال ما بداخل htaccess بهدا الكود ?
-
السلام عليكم عليكم ورحمة لله
اخواني الكرام لدي مشكلة بعدما نقلت مشروع لارافيل من سيرفر محلي الى استضافة cpanel الموقع لم يشتغل بعدما رفعت الملفات واستوردت قاعدة البيانات
لا اعرف السبب ولا مصدر المشكلة ?
الخطوات التي قمت بتنفيذها
- قمت برفع ملف المشروع مضغوط بالـ zip حجمه حوالي 630 ميجا الى public_html كما هو بمجلد مشروع لارافيل بالـ localhost
- غيرت بيانات ملف قاعدة البيانات database.php الموجود داخل ملف config
- استوردت قاعدة البيانات القديمة من خلال phpMyAdmin
بعدما قمت بتنفيذ هذه الخطوات وبعد دخول الى رابط الموقع تظهر رسالة خطأ HTTP ERROR 500
This page isn’t Domain.com is currently unable to handle this request. HTTP ERROR 500
لم اعدل على ملف index.php الموجود بالـ public_html/index.php لأنني اراه انه لا يحتاج الى تعديل
<?php /** * Laravel - A PHP Framework For Web Artisans * * @package Laravel * @author Taylor Otwell <taylor@laravel.com> */ define('LARAVEL_START', microtime(true)); /* |-------------------------------------------------------------------------- | Register The Auto Loader |-------------------------------------------------------------------------- | | Composer provides a convenient, automatically generated class loader for | our application. We just need to utilize it! We'll simply require it | into the script here so that we don't have to worry about manual | loading any of our classes later on. It feels great to relax. | */ require __DIR__.'/vendor/autoload.php'; /* |-------------------------------------------------------------------------- | Turn On The Lights |-------------------------------------------------------------------------- | | We need to illuminate PHP development, so let us turn on the lights. | This bootstraps the framework and gets it ready for use, then it | will load up this application so that we can run it and send | the responses back to the browser and delight our users. | */ $app = require_once __DIR__.'/bootstrap/app.php'; /* |-------------------------------------------------------------------------- | Run The Application |-------------------------------------------------------------------------- | | Once we have the application, we can handle the incoming request | through the kernel, and send the associated response back to | the client's browser allowing them to enjoy the creative | and wonderful application we have prepared for them. | */ $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); $response = $kernel->handle( $request = Illuminate\Http\Request::capture() ); $response->send(); $kernel->terminate($request, $response);
للإطلاع على ملف .htaccess الموجود بالـ public_html
<IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews -Indexes </IfModule> RewriteEngine On # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </IfModule> # Disable index view Options -Indexes # Hide a specific file <Files .env> Order allow,deny Deny from all </Files> ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType text/x-javascript "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" ExpiresDefault "access plus 1 days" </IfModule>
مشكلة نقل مشروع لارافيل الاصدار 6 من localhost الى استضافة cpanel
في تطوير الواجهات الأمامية
نشر
للأسف دون جدوى