Solution made with pear, db and Smarty


#1

Hi,

I’ve installed these on my PC:

Ubuntu 14.04.1 LTS
Apache 2.4.7
PHP 5.5.12
PEAR 1.10.0
DB 1.10.0
MySQL 14.14

When I write this into bash:
php --ini

it gives me:
Configuration file (php.ini) Path: /usr/local/lib
Loaded Configuration file: (none)
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)

But then in browser phpinfo() gives me:

Configuration File (php.ini) Path /etc/php5/apache2
Loaded Configuration File /etc/php5/apache2/php.ini
Scan this dir for additional .ini files /etc/php5/apache2/conf.d
Additional .ini files parsed /etc/php5/apache2/conf.d/05-opcache.ini,
/etc/php5/apache2/conf.d/10-pdo.ini,
/etc/php5/apache2/conf.d/20-json.ini,
/etc/php5/apache2/conf.d/20-readline.ini

Why the outputs are so different?

I’m having a website(created in WAMP with Smarty) in html-folder: /var/www/html/website

but in the browser(localhost/website) when I try to use website, the browser gives totally empty.

Yes I know: use Composer and use newer platforms etc. I’m not in the postion that I could convert the whole solution to other platform.

Is there anything someone would suggest? Please help


#2

PHP and PEAR I’ve already tested, they are working properly.


#3

Ok, found out that PEAR isn’t working properly, browser gives this error:

Warning: require_once(System.php): failed to open stream: No such file or directory in /var/www/html/check_pear.php on line 2

Fatal error: require_once(): Failed opening required ‘System.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/www/html/check_pear.php on line 2

Can’t find the rigth php.ini -file.


#4

Well those sound correct to me. If you want to use Wamp, you must place your site you are testing in the folder under Wamp folder named www. So, it might be something like D:\WAMP\www\MySite…
In that folder, you would place all the files for the site.

Then, on the WAMP control in the tray, LEFT-CLICK on it and select LOCALHOST and it should open a browser starting at the ROOT of your WAMP server page. On this page is your server’s configuration, various tools and your site projects. The sites you put under the WAMP\www folder show up as projects. You can open the one you are working on and test it from there.

Hope that helps…


#5

I can’t use WAMP.

This is my platform:

Ubuntu 14.04.1 LTS
Apache 2.4.7
PHP 5.5.12
PEAR 1.10.0
DB 1.10.0
MySQL 14.14

As I mentioned, I’m not in the position that I could convert the whole solution to other platform.


#6

Okay, do you have Ubuntu or are you using Ubuntu Desktop on your computer?
If you just have Ubuntu Desktop installed on your computer, you access it’s localhost the same as Windows.
But, you need to know the port number in some cases. With Wamp or Ubuntu running, just bring up your browser and type in localhost and press return.
I found one note online that with your setup, you might need to use: localhost:4567
This included their default port number of 4567, but, depends on your setup.

( PS: I talked about WAMP because that is what you said the website was created under! )