Apache2 won't load css files on Codeigniter, MacOS (Mojave) - codeigniter

After using apache from Xampp for a few months, which worked pretty well, I decided to switch to apache2 from the terminal. Because I need using the oracle database, and it seems so confusing if I still use Xampp for the oci8 configuration.
Now, I have just installed apache2, but it seems like it won't load my CSS files on my Codeigniter. I've been struggling with it for hours now and I don't know what else to do.
I just did a clean install from Apache2 and reconfiguration for the oci8 but still didn't work.
I've added some code in my
/etc/apache2/ httpd.conf
/usr/local/httpd/httpd.conf
AddType text/css .css
AddType text/javascript .js
My Project structure that should be fine
My config base_url:
$root = "http://".$_SERVER['HTTP_HOST'];
$root .=str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
$config['base_url'] = "$root";
And how I make a call through my CSS on view:
Is there anyone that can solve this?
Thanks.

Related

Add php extentions to xampp 7.3 on linux mint

I need to provide a set of extensions for my local xampp 7.3(on Linux Mint 19). Into the php.ini i'v added lines like extension="intl.so" for an every necessary extention.
When promting /opt/lampp/bin$ ./php -v, I get the following set of Warnings about all the extensions I added into the php.ini:
PHP Startup: Unable to load dynamic library 'intl.so' (tried: /opt/lampp/lib/php/extensions/no-debug-non-zts-20180731/intl.so
Indeed the mentioned folder /opt/lampp/lib/php/extensions/no-debug-non-zts-20180731 does not include these .so files, only loader-wizard.php, opcache.so, pdo_dblib.so, pgsql.so and some files for ioncube.
The dafault folder for extensions /opt/lampp/include/php/ext/ includes .h files. For example:
/opt/lampp/include/php/ext/xml$ ls
expat_compat.h php_xml.h
how can you resolve the issue?
Thank you for your help.

Undefined Class Error in Smarty using PHPStorm 10

I have mac, installed PHPstorm 10, now trying to install smarty, similar to as mentioned in following tutorial , http://phpwebscript.blogspot.com/2009/09/smarty-installation-steps-on-wamp-and.html,
i have installed mamp supporting PHP 5.6. everthing is configured file. as mentioned in the tutorial i have edited php.ini file under correct version. After everything is setup i get error on following;
require ('/Applications/MAMP/Smarty/libs/Smarty.class.php');
$smarty =new Smarty() //Undefined class smarty error;
When i run,
echo (defined('SMARTY_DIR') ? 'Yes' : 'No');
i get yes
any fix please.
I have solved this issue, following were the problems that i fixed,
Include path was not set, i though i have included path in php.ini now its ok, but when you create a project in phpstorm or netbeans, there is a folder created external libraries or include path, you have to include smarty, I did it and now everything ok
i had copied testinsall from net which was causing error, retyped it and now smarty is running perfect on phpstorm 10.

PHPUnit setup with Zend 1.12.3

I am just getting start with Zend Framework and seem to run into this problem
Testing Note: PHPUnit was not found in your include_path, therefore no
testing actions will be created.
I am on mac 10.8.5, Using Zend Server 6 (free), and Zend Framework 1.12.3
Have pear and phpunit installed
which pear
/usr/local/zend/bin/pear
which phpunit
/usr/local/zend/bin/phpunit
from php info and include_path
Loaded Configuration File /usr/local/zend/etc/php.ini
include_path=".:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/bin/pear:/usr/local/zend/bin/phpunit:/usr/local/zend/share/pear:/usr/local/zend/share/pear/phpunit"
No matter what i put in the include_path, i always get the above notice, PHPUnit was not found in your include path.
I been searching and someone said zf.ini can cause this, and that file should be editted, however i can't seem to find such a file anywhere on my Mac. I do have previous Mamp and Xampp installations, but phpinfo() states the correct php.ini file loaded so i doubt that is the problem
Edit:
Okay so i finally managed to fix it. Using "zf.sh --setup" i found the paths to all the config files, including .zf.ini and how to edit it. The file did not exist, so i had to create it, and adding "include_path" to .zf.ini fixed the issue. However in the end i am overriding the php.ini which was probably being over ridden. I still like to know why adding pear path to php.ini didn't work, hopefully someone can explain that

PHP extension "curl" must be loaded

I'm trying to install a Magento on my server, and when I get to "Configuration", the installation launches:
PHP extension "curl" must be loaded.
I've checked my php.ini, and extension=php_curl.dll is not commented. For both Apache and PHP folders. I also checked my Wamp manager, and it looks like this:
.
So I guess that my php_curl is working fine... But I still get the same message when I install Magento:
.
Any idea on what's wrong?
I had the same problem. The mod_curl extension in wamp has a bug.
You can replace it with a newer version. I don't know which PHP-Version you use but here you can download a newer version. Download a TS (TheadSafe) version of the module and replace it with your existing curl module.
http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/
And a helpfull post:
http://forum.wampserver.com/read.php?2,85716
Replaced the old php_curl.dll with the new one in \wamp\bin\php\php5.4.3\ext\ by downloading from http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/ .
Now its working. It is the error with recent wamp installation package.
You have to modify the php.ini files in your xampp folder. Three files in three different places need to be changed.
Follow the following steps to enable curl library with XAMPP in Windows:
Step 1:
Browse and open the following 3 files
C:\Program Files\xampp\apache\bin\php.ini
C:\Program Files\xampp\php\php.ini
C:\Program Files\xampp\php\php4\php.ini
Step 2:
Uncomment the following line in your php.ini file by removing the semicolon (;).
;extension=php_curl.dll
After that it will look something like something below-
extension=php_curl.dll
Step 3:
Restart your Apache server.
Step 4:
Check your phpinfo() to see whether curl has properly enabled or not.
Enjoy using curl() library.

php gd lib is installed but not working

On the localhost the library is working fine, when the function is called on production,php throws a fatal errer.
i checked the phpinfo() its there and it is enabled.
I tired to see if there is anything that i can add on the php.ini but i couldn't find any.
The error is thrown when i call
gd_info();
Is there anything that i can add on the php.ini file that can solve this problem, or is there another library for gd?
The error am getting is the following
Fatal error: Call to undefined function gd_info(
It may be a little bit late, but I hope it helps anyone.
I had the same problem when I tried to run GD over apache.
The problem was in php.ini path for apache. By default it is not using php.ini from php directory.
You need to define PHPIniDir in httpd file or place copy of php.ini to apache folder.
To check if it is your case you can compare output of php --ini from php folder and output of phpinfo() over apache. If it is showing different php.ini destinations you need to fix it.
I had exactly the same problem
although I had installed it using apt-get install php7.0-gd that function was undefined, so I inspected php.ini file in /etc/php/7.0/apache2/php.ini
turned out that the line for gd extension was commented!
so I removed semicolon before the line and it was working!
so crazy wasted an half an hour of mine :D

Resources