Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Troubleshooting for a warning:[Web App from scratch series]

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #44385
    Nick01
    Member

    Hi,
    I am trying to follow [the Creating a Web App from Scratch series](https://css-tricks.com/examples/WebAppFromScratch/ “the creating a Web App from scratch series”) ,I have no prior experience with PHP,I’v downloaded the source file and uploaded to a host just to see if it works for myself([Your text to link here…](http://listitbright.nazuka.net/site/ “site”))

    but the screen shows me this error:

    Warning: require_once(inc/FirePHPCore/FirePHP.class.php): failed to open stream: No such file or directory in /home/u265831516/public_html/site/common/base.php on line 13 Fatal error: require_once(): Failed opening required ‘inc/FirePHPCore/FirePHP.class.php’ (include_path=’.:/usr/lib/php’) in /home/u265831516/public_html/site/common/base.php on line 13

    Could anyone guide me through the right way?Did I upload the content in the wrong directory? Thanks in advance.

    #133325
    Nick01
    Member

    I’v uploaded the files in public_html(since all the content here is visible to public) and then I wanted a subdirectory called “site” so, public_html/site/ (here the downloaded file).
    here’s my filezilla screenshot:
    http://oi44.tinypic.com/f0cew6.jpg

    #133333
    __
    Participant

    It’s looking for a file named `FirePHP.class.php` in your `/home/u265831516/public_html` `/site/inc/FirePHPCore/` directory. Does that file exist on your server?

    #133335
    CrocoDillon
    Participant

    You sure @traq? The script causing the error is `/home/u265831516/public_html/site/common/base.php`, so it’s looking for `/home/u265831516/public_html/site/common/inc/FirePHPCore/FirePHP.class.php` unless I’m mistaken. Try:

    require_once(../inc/FirePHPCore/FirePHP.class.php)

    #133341
    Nick01
    Member

    @traq The file FirePHP.class.php hasn’t been provided in the source code download file and isn’t present in /home/u265831516/public_html /site/inc/FirePHPCore/ Am I supposed to create one?


    @CrocoDillon
    The line exists in base.php. This is the code of [base.php](http://oi44.tinypic.com/33yt2sh.jpg “base.php”)

    #133347
    CrocoDillon
    Participant

    I guess you could get a copy from https://github.com/firephp/firephp-core/tree/master/lib/FirePHPCore

    Seeing including the constants doesn’t give a warning I guess my earlier statement was wrong.

    #133349
    Nick01
    Member

    @traq ,@CrocoDillion The link worked like magic!

    But There’s a new warning:

    Connection failed: SQLSTATE[28000] [1045] Access denied for user ‘db_user’@’localhost’ (using password: YES)

    I’m Guessing this is because no permission is granted to the database?
    The series aimed at creating a db in XAMPP,so I am not sure the same steps are supposed to be followed on a web host?

    #133366
    __
    Participant

    How you connect to your DB will depend on how your DB is set up. You should be able to get host/user/pass/etc. from your host.

    #133400
    Nick01
    Member

    What caused that warning? my host doesn’t provide a MySQL database wizards* where permissions can be given to the database users I suppose? [Cpanel](http://i43.tinypic.com/2mw9zpj.jpg “host”)

    #133406
    CrocoDillon
    Participant

    What do you have when you go to MySQL Databases?

    #133413
    Nick01
    Member

    [MySQL Databases](http://i41.tinypic.com/34fidjd.jpg “MySQL Databases”)

    Tried to import the database and tables :

    [Error while importing from database created in XAMPP](http://tinypic.com/view.php?pic=30lj8eb&s=5 “Error while importing from database created in XAMPP”)

    I’v tried :
    GRANT ALL PRIVILEGES ON *.* TO ‘myuser’@’%’ WITH GRANT OPTION;

    Still it keeps giving me the Connection failed error.

    #133415
    CrocoDillon
    Participant

    Probably best to wait for @traq’s reply… but I’d say you’re trying to connect to localhost, try mysql.nazuka.net instead, in your DB connection script.

    #133420
    Nick01
    Member

    If you meant instead of ‘localhost’ I should use ‘mysql.nazuka.net’, it still gives the same error:

    Access denied for user ‘u265831516_nick’@’localhost’ to database ‘u265831516_first’

    #133432
    __
    Participant

    > Still it keeps giving me the Connection failed error.
    `Access denied for user ‘u265831516_nick’@’localhost’ to database ‘u265831516_first’`

    Does it *always* give that error (can you *ever* connect to your DB, even in PHPMyAdmin)?

    How are you trying to create that database? Are you trying to import it using an sql file? Can you create a new table using the [Create table] button in PHPMyAdmin?

    …going back to the [script with your PDO connection](http://tinypic.com/view.php?pic=33yt2sh&s=5), try changing the line

    exit;

    to

    exit( “dsn: $dsn
    DB_USER: “.DB_USER.’
    DB_PASS: ‘.DB_PASS );

    Run the script, copy the output, and then change the script back (*do not* leave it; it’s a security risk to reveal that info to the public).

    Make sure the dsn, your username and password are correct (**do not** post your password here).

    > You sure @traq? The script causing the error is /home/u265831516/public_html/site/common/base.php, so it’s looking for /home/u265831516/public_html/site/common/inc/FirePHPCore/FirePHP.class.php unless I’m mistaken.
    @crocodillon

    sorry: yeah, I missed that. But I think Nick01 has solved that already anyway.

    #133433
    Nick01
    Member

    @BenWalker Yes,It allows to create new databases.I thought of exporting the database I had creating using XAMPP,that failed too due to the same error. Then I tried the manual SQL commands as instructed in the Series. I get the same [Your text to link here…](http://tinypic.com/view.php?pic=30lj8eb&s=5 “Error”)

    @traq
    Sorry I missed your comment before writing this comment.I’m checking the solution posted by you.

Viewing 15 posts - 1 through 15 (of 22 total)
  • The forum ‘Back End’ is closed to new topics and replies.